PageSourceSearch

https://app.nuport.io/_next/static/chunks/pages/inventory-5765185216bf47f1.js

js nuport.io collected 2026-10-01 12:13:56 UTC 8,323 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2157],{83559:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/inventory",function(){return t(25409)}])},19157:function(e,n,t){"use strict";var a=t(85893),i=t(29838),r=t(10227);n.Z=e=>{let{visible:n,onCancel:t,onComplete:o}=e;return(0,a.jsx)(i.Z,{title:"Upload Inventory",type:"inventory",fields:[{label:"Warehouse",key:"locationId"},{label:"Product",key:"productId"},{label:"Pallet Number",key:"palletNumber"},{label:"Serial Number",key:"serialNumber"},{label:"Created At",key:"createdAt"}],firstStepPrompt:"Download an example CSV file. Do not modify the first row of the CSV. This CSV will inform you on how to structure your data.",secondStepPrompt:"Edit the CSV file by adding new rows. Rows will create new inventory data in the platform.",visible:n,onCancel:t,onComplete:o,downloadTask:r.g.downloadInventoryCsv,uploadTask:r.g.uploadInventoryCsv})}},25409:function(e,n,t){"use strict";t.r(n);var a=t(85893),i=t(87984),r=t.n(i),o=t(19893),s=t(65765),l=t(93831),c=t(70449),d=t(47871),u=t(56469),y=t(54922),p=t(57517),h=t(41664),v=t.n(h),g=t(51259),m=t(16517),x=t(67294),k=t(76141),_=t(33956),j=t(23463),N=t(30381),f=t.n(N),C=t(17702),I=t(11163),b=t(80657),w=t(44839),S=t(19157),Z=t(91531);let{Content:P}=s.default,T=[{title:"Inventory",value:"inventory",path:C.Hb.INVENTORY},{title:"Warehouses",value:"warehouses",path:"".concat(C.Hb.INVENTORY,"?warehouse=true")}],E=[{title:"ID",key:"id",render:e=>{let n;return e.product.internalId?n=e.product.internalId:e.product.sku&&(n=e.product.sku),n?(0,a.jsx)(v(),{href:"products/".concat(e.product.id),className:r().link,children:n}):(0,a.jsx)("div",{className:r().unassigned,children:"No Identifier"})}},{title:"Product Name",key:"name",render:e=>(0,a.jsx)(v(),{href:"products/".concat(e.product.id),className:r().link,children:e.product.name})},{title:"Category",key:"category",render:e=>{let{category:n,subCategory1:t,subCategory2:i,subCategory3:r,subCategory4:o,subCategory5:s}=e.product;return(0,a.jsx)(l.Z,{style:{marginBottom:0,marginLeft:16},children:[n,t,i,r,o,s].map((e,n)=>(0,a.jsx)(l.Z.Item,{children:(0,p.Nb)(e)},n))})}},{title:"Warehouse",key:"location",render:e=>(0,a.jsx)(v(),{href:"warehouses/".concat(e.location.id),className:r().link,children:(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[e.location.label?(0,a.jsx)("span",{children:e.location.label}):(0,a.jsx)("span",{className:r().unassigned,children:"No label"}),(0,a.jsx)("span",{style:{fontSize:12},children:e.location.address})]})})},{title:"Package Quantity",key:"packageQuantity",render:e=>(0,a.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:e.inventoryPackageItems&&e.inventoryPackageItems.length>0?e.inventoryPackageItems.map(e=>(0,a.jsxs)("div",{className:r().packageContainer,children:[(0,a.jsx)("div",{className:r().quantity,children:e.quantity}),(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,a.jsx)("div",{className:r().packaging,children:"(".concat(e.packaging.size," ").concat(e.packaging.sizeUnit," ").concat(e.packaging.type,")")}),e.quantity<0&&(0,a.jsx)("div",{className:r().understocked,children:"Understocked"})]})]},e.packageId)):(0,a.jsx)("div",{className:r().unassigned,children:"No Packages"})})},{title:"Quantity",key:"quantity",render:e=>(0,a.jsxs)("div",{style:{display:"flex"},children:[(0,a.jsx)("div",{className:r().quantity,children:e.quantity}),e.quantity<0&&(0,a.jsx)("div",{className:r().understocked,children:"Understocked"})]})},{title:"Updated At",key:"updatedAt",render:e=>f()(e.updatedAt).format("MMM D, YYYY HH:mm A")}],q=[{title:"Label",key:"label",render:e=>(0,a.jsx)(v(),{href:"warehouses/".concat(e.id),className:e.label?r().link:r().unassigned,children:e.label||"No Label"})},{title:"Warehouse Type",key:"warehouseType",render:e=>e.description?(0,a.jsx)("div",{children:(0,p.Nb)(e.description)}):(0,a.jsx)("div",{className:r().unassigned,children:"No Type"})},{title:"Address",key:"address",render:e=>e.address},{title:"Coordinates",key:"coordinates",render:e=>(0,a.jsx)("div",{style:{fontSize:12},children:"".concat(e.latitude,", ").concat(e.longitude)})},{title:"Total Unique Products",key:"products",render:e=>e.inventoryItems.length},{title:"Total Quantity",key:"products",render:e=>e.inventoryItems.reduce((e,n)=>{let t=n.inventoryPackageItems.reduce((e,n)=>e+n.packaging.size*n.quantity,0);return e+n.quantity+t},0)}],H=()=>{let e=(0,I.useRouter)(),{warehouse:n}=e.query,t=(0,m.I0)(),{searchParams:i}=(0,_.Z)(),{inventoryTotalCount:o,inventoryPage:l,inventory:p}=(0,m.v9)(e=>
1e.productsReducer),{warehousesTotalCount:h,warehousesPage:v,warehouses:N}=(0,m.v9)(e=>e.locationsReducer),[f,C]=(0,x.useState)(!1),[H,R]=(0,x.useState)(!1),[A,U]=(0,x.useState)(T[0].value),[z,D]=(0,x.useState)(!1),[W,L]=(0,x.useState)(!1);(0,x.useEffect)(()=>{"true"===n?(U(T[1]),O()):(U(T[0]),Y(),t((0,k.gS)()))},[n]),(0,x.useEffect)(()=>{"inventory"===A.value&&Y()},[i]);let Y=async e=>{C(!0),await t((0,k.dH)({page:e,...i})),C(!1)},O=async e=>{C(!0),await t((0,b.t)({page:e})),C(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:r().container,children:[(0,a.jsx)("div",{className:r().contentHeader,children:(0,a.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,a.jsx)("div",{className:r().tabContainer,children:T.map(n=>(0,a.jsxs)("div",{onClick:()=>{U(n),e.push(n.path)},className:A.value===n.value?r().tabSelected:r().tab,children:[(0,a.jsx)("div",{className:n.title,children:n.title}),(0,a.jsx)("div",{className:A.value===n.value?r().indicator:r().indicatorGone})]},n.path))}),"inventory"===A.value?(0,a.jsxs)("div",{className:r().contentHeaderContainer,children:[(0,a.jsx)(c.Z,{overlay:()=>(0,a.jsx)(d.Z,{children:(0,a.jsx)(d.Z.Item,{icon:(0,a.jsx)(w.Z,{}),onClick:()=>D(!0),children:"Upload Inventory"},"2")}),trigger:["click"],children:(0,a.jsx)(u.Z,{style:{margin:"0 16px"},loading:!1,onClick:()=>{},children:"Action"})}),(0,a.jsx)(u.Z,{onClick:()=>R(!0),type:"primary",children:"Update Inventory"})]}):(0,a.jsxs)("div",{className:r().contentHeaderContainer,children:[(0,a.jsx)(u.Z,{onClick:()=>e.push("/generate-labels"),style:{marginRight:16},children:"Generate Labels"}),(0,a.jsx)(u.Z,{onClick:()=>L(!0),type:"primary",children:"Add Warehouse"})]})]})}),(0,a.jsx)("div",{className:r().content,children:(0,a.jsxs)(s.default,{style:{marginTop:24},children:["inventory"===A.value&&(0,a.jsx)(P,{className:r().layoutContent,children:f||p.length>0?(0,a.jsx)(g.Z,{loading:f,columns:E,dataSource:p,pagination:{pageSize:50,total:o,position:["topRight"],onChange:e=>{Y(e-1)},showSizeChanger:!1,current:l+1},scroll:{y:"calc(100vh - 340px)"},rowKey:e=>"".concat(e.productId,"_").concat(e.locationId)}):(0,a.jsx)(y.Z,{style:{marginTop:"128px"},description:"Inventory is empty, please update your inventory."})}),"warehouses"===A.value&&(0,a.jsx)(P,{className:r().layoutContent,children:f||p.length>0?(0,a.jsx)(g.Z,{loading:f,columns:q,dataSource:N,pagination:{pageSize:50,total:h,position:["topRight"],onChange:e=>{O(e-1)},showSizeChanger:!1,current:v+1},scroll:{y:"calc(100vh - 340px)"},rowKey:"locationId"}):(0,a.jsx)(y.Z,{style:{marginTop:"128px"},description:"No warehouses added."})})]})})]}),H&&(0,a.jsx)(j.Z,{onCancel:()=>R(!1),onUpdated:()=>{R(!1),Y(l)},visible:H}),z&&(0,a.jsx)(S.Z,{visible:z,onCancel:()=>D(!1),onComplete:()=>Y()}),W?(0,a.jsx)(Z.ZP,{visible:W,onCancel:()=>L(!1),selectableTypes:[Z.aD.WAREHOUSE],onLocationAdded:()=>O()}):null]})};H.getLayout=function(e){return(0,a.jsx)(o.Z,{children:e})},n.default=H},87984:function(e){e.exports={container:"Inventory_container__6n9MN",contentHeader:"Inventory_contentHeader__qS7Yd",contentHeaderContainer:"Inventory_contentHeaderContainer__CaFRW",layoutContent:"Inventory_layoutContent__ffdgT",quantity:"Inventory_quantity__7_SJQ",link:"Inventory_link__CUNp7",understocked:"Inventory_understocked__j5E8K",tabContainer:"Inventory_tabContainer__r3kkf",tab:"Inventory_tab__PO57E",tabSelected:"Inventory_tabSelected__zMdJ6",indicator:"Inventory_indicator__sEwjW",indicatorGone:"Inventory_indicatorGone__NptQx",unassigned:"Inventory_unassigned__tcER1",packageContainer:"Inventory_packageContainer__a6Lts",packaging:"Inventory_packaging__sPtbP"}}},function(e){e.O(0,[8287,3463,2888,9774,179],function(){return e(e.s=83559)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.