(()=>{(self.webpackChunkics_operations=self.webpackChunkics_operations||[]).push([[179],{1843:(v,p,e)=>{"use strict";e.d(p,{Z:()=>h});var t=e(5881),l=e.n(t),f=e(2354),u=e.n(f),m=u()(l());m.push([v.id,"",""]),m.locals={"brand-primary-navy":"#182d55","brand-primary-teal":"#6ec6aa","brand-secondary-buttercup":"#f2a71e","brand-secondary-cornflowerblue":"#3e8ccc","brand-secondary-seagull":"#85d3ea","brand-secondary-apple":"#7dc242","brand-secondary-tropicalrainforest":"#007d59","brand-neutral-athensgray":"#eff0f3","brand-neutral-westar":"#e3e1dd","brand-neutral-iceberg":"#daf0f4","grayscale-white":"#fff","grayscale-gray200":"#f8f8f8","grayscale-gray300":"#e4e4e4","grayscale-gray400":"#cecece","grayscale-gray600":"#adadad","grayscale-gray700":"#6c6c6c","grayscale-gray800":"#333","grayscale-black":"#000","status-positive-main":"#319b51","status-positive-light":"#50fd84","status-positive-dark":"#277c41","status-positive-darker":"#1c5934","status-negative-main":"#df5d5f","status-negative-light":"#ef5350","status-negative-dark":"#d1292c","status-negative-darker":"#991e20","status-information-main":"#3e8ccc","status-information-light":"#1294ff","status-information-dark":"#2d71a9","status-information-darker":"#21547d","status-warning-main":"#f2a71e","status-warning-light":"#f7a50f","status-warning-dark":"#bc7e0b","status-warning-darker":"#6b4705"};const h=m},400:(v,p,e)=>{"use strict";e.d(p,{Z:()=>h});var t=e(5881),l=e.n(t),f=e(2354),u=e.n(f),m=u()(l());m.push([v.id,"",""]),m.locals={fontFamily:"Tahoma,Calibri,Arial"};const h=m},2754:(v,p,e)=>{"use strict";e.d(p,{B:()=>l});var t=e(3452);const l=f=>async u=>{const{accessToken:m}=await t.U.acquireTokenSilent({scopes:[f]});return u.append("Authorization",`Bearer ${m}`),u}},1340:(v,p,e)=>{"use strict";e.d(p,{YS:()=>u,sT:()=>f,zA:()=>l});var t=e(6902);const l=t.D.api.logistics,f=["getReceipt","getReceiptImages"],u={Prefer:"code=200, dynamic=true",Accept:"application/json"},m={Prefer:"code=200",Accept:"application/json"}},4829:(v,p,e)=>{"use strict";e.d(p,{GW:()=>E,fY:()=>S,OR:()=>D});var t=e(2754);const l=y=>y.query({query:()=>({url:"/user"})});var f=e(6902),u=e(9665),m=e(4119);const h=y=>y.query({query:({role:M})=>({url:"/users",params:{role:M}})}),E=(0,u.LC)({reducerPath:"iamApi",baseQuery:(0,m.ni)({baseUrl:f.D.api.iam,prepareHeaders:y=>{try{return(0,t.B)(f.D.scope)(y)}catch(M){console.log(M)}}}),endpoints:y=>({getUserWorkContext:l(y),getAuthorizedUsersForRoles:h(y)})}),{useGetUserWorkContextQuery:D,useGetAuthorizedUsersForRolesQuery:S}=E},6563:(v,p,e)=>{"use strict";e.d(p,{wU:()=>M,_o:()=>N,hr:()=>W,Ov:()=>b,E6:()=>z});var t=e(1340);const l=I=>I.query({query:({receiptId:s})=>{console.log("[getReceipt] Fetching receipt with ID:",s);const c={url:`${t.zA}/receipts/${s}`,headers:t.YS};return console.log("[getReceipt] Request configuration:",{url:c.url,headers:Object.keys(c.headers||{})}),c},transformResponse:(s,c,C)=>(console.log("[getReceipt] Successfully received receipt data for ID:",C.receiptId),console.log("[getReceipt] Response data:",{receiptId:s?.id||"N/A",status:s?.returnReceiptId||"N/A",responseSize:JSON.stringify(s).length}),s),transformErrorResponse:(s,c,C)=>{const A=s;return console.log("[getReceipt] Error fetching receipt with ID:",C.receiptId),console.log("[getReceipt] Error details:",{status:A.status,error:A.error,data:A.data}),s}}),f=I=>I.query({query:()=>({url:"/receipts/documenttypes"})}),u=null,m=I=>I.query({query:({assignedTo:s,hub:c,operatingEntity:C,receivingStatus:A,assignedToUser:L,inventoryGroups:F=[]})=>{const B=new URLSearchParams;B.append("operatingEntity",C),B.append("hub",c),B.append("assignedTo",s);for(let j=0;jI.query({query:s=>{console.log("[getReceiptStatusViewsById] Starting query with receiptId:",s);const c=`/receipts/views/status/${s}`;return console.log("[getReceiptStatusViewsById] Generated URL:",c),{url:c}},transformResponse:s=>(console.log("[getReceiptStatusViewsById] Raw response received:",s),s),transformErrorResponse:s=>(console.log("[getReceiptStatusViewsById] Error response:",s),s)});var E=e(6902),D=e(9665),S=e(4119),y=e(2754);const M=(0,D.LC)({reducerPath:"logisticsApi",baseQuery:(0,S.ni)({baseUrl:E.D.api.logistics,prepareHeaders:(I,s)=>t.sT.includes(s.endpoint)?I:(0,y.B)(E.D.scope)(I)}),endpoints:I=>({getReceipt:l(I),getReceiptStatusViews:m(I),getReceiptStatusViewsById:h(I),getReceiptDocumentTypes:f(I)})}),{useGetReceiptQuery:W,useLazyGetReceiptStatusViewsQuery:z,useLazyGetReceiptStatusViewsByIdQuery:b,useGetReceiptDocumentTypesQuery:N}=M},3239:(v,p,e)=>{"use strict";e.d(p,{L:()=>h,r:()=>E});var t=e(6902),l=e(9665),f=e(4119),u=e(2754),m=e(7260);const h=(0,l.LC)({reducerPath:"microsoftGraphApi",baseQuery:(0,f.ni)({baseUrl:t.D.api.microsoftGraph,prepareHeaders:(0,u.B)(m.f1)}),endpoints:D=>({currentUser:D.query({query:()=>"me"})})}),{useCurrentUserQuery:E}=h},3452:(v,p,e)=>{"use strict";e.d(p,{U:()=>m});var t=e(1825),l=e(9600),f=e(6902);const u={auth:{clientId:f.D.authentication.clientId,authority:f.D.authentication.authority,redirectUri:window.location.origin,postLogoutRedirectUri:window.location.origin},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1}},m=new t.L(u);m.handleRedirectPromise().then(h=>{h&&m.setActiveAccount(h.account)}).catch(h=>{console.error("Redirect authentication error:",h)}),m.addEventCallback(h=>{if(h.eventType===l.t.LOGIN_SUCCESS&&h.payload){const D=h.payload.account;m.setActiveAccount(D)}})},7260:(v,p,e)=>{"use strict";e.d(p,{X3:()=>u,f1:()=>f,s5:()=>m});const t=null,l={prod:"api://b42aa4a0-7833-4601-91e0-cd9e26b96401/ICSService.DefaultScope",dev:"api://a390d735-8347-4ef1-8a65-875d1410e88c/ICSService.DefaultScope",localhost:"api://a390d735-8347-4ef1-8a65-875d1410e88c/ICSService.DefaultScope"},f="User.Read",u=h=>l[h]||l.prod,m=h=>[u(h),f]},888:(v,p,e)=>{"use strict";e.d(p,{V:()=>t});const t=(l,f)=>{if(console.log(`[getEnvironmentFromHost] Input host: "${l}"`),console.log(`[getEnvironmentFromHost] Input namespace: "${f}"`),l.startsWith("localhost"))return console.log("[getEnvironmentFromHost] Localhost detected - returning dev environment"),"localhost";const u=l.split(".")[0];console.log(`[getEnvironmentFromHost] Host part: "${u}"`);let m;return u==="chemops"?m="prod":u.startsWith("chemops-")?m=u.replace("chemops-",""):m="prod",console.log(`[getEnvironmentFromHost] Determined environment: "${m}"`),m}},6902:(v,p,e)=>{"use strict";e.d(p,{D:()=>E});var t=e(888),l=e(7260);const f={namespace:"ics-operations-app",authentication:{clientId:"18a25ed5-b469-4694-a8a6-475fdf28e31a",authority:"https://login.microsoftonline.com/c7354023-f985-41a6-966e-da42877461b4"},api:{microsoftGraph:"https://graph.microsoft.com/v1.0",logistics:"https://chemops-dev.incora.com/chemicals/api/logistics",iam:"https://chemops-dev.incora.com/chemicals/api/iam",customerOps:"https://chemops-dev.incora.com/chemicals/api/customer-ops"},scope:(0,l.X3)("dev")},u={namespace:"ics-operations-app",authentication:{clientId:"a14295c2-fc21-4cf7-892d-73bd92cf2086",authority:"https://login.microsoftonline.com/c7354023-f985-41a6-966e-da42877461b4"},api:{microsoftGraph:"https://graph.microsoft.com/v1.0",logistics:"https://chemops.incora.com/chemicals/api/logistics",iam:"https://chemops.incora.com/chemicals/api/iam",customerOps:"https://chemops.incora.com/chemicals/api/customer-ops"},scope:(0,l.X3)("prod")},m={namespace:"ics-operations-app",authentication:{clientId:"18a25ed5-b469-4694-a8a6-475fdf28e31a",authority:"https://login.microsoftonline.com/c7354023-f985-41a6-966e-da42877461b4"},api:{microsoftGraph:"https://graph.microsoft.com/v1.0",logistics:"https://chemops-dev.incora.com/chemicals/api/logistics",iam:"https://chemops-dev.incora.com/chemicals/api/iam",customerOps:"https://chemops-dev.incora.com/chemicals/api/customer-ops"},scope:(0,l.X3)("dev")},E=(()=>{if(console.log("Configuration initialization started"),console.log("Current host:",window.location.host),console.log("Full location:",window.location.href),window.location.host.startsWith("localhost"))return console.log("Localhost detected - using development configuration"),console.log("Development configuration loaded:",f),{...f,scope:(0,l.X3)("localhost")};console.log("Non-localhost environment detected");const D=(0,t.V)(window.location.host,"ics-operations-app");console.log("Environment detected:",D);let S,y;return D==="prod"?(console.log("Loading production configuration"),S=u,y=(0,l.X3)("prod")):(console.log("Loading development configuration"),S=m,y=(0,l.X3)(D)||(0,l.X3)("dev")),console.log("Final configuration loaded:",S),{...S,scope:y}})()},4822:(v,p,e)=>{"use strict";e.d(p,{mA:()=>h,I0:()=>l,Tt:()=>E,TE:()=>s,v9:()=>f});var t=e(3583);const l=t.I0,f=t.v9;var u=e(9288),m=e(8051);const h=()=>{const{instance:c,accounts:C}=(0,u.Fp)(),[A,L]=(0,m.useState)(c.getActiveAccount()??C[0]??null);return(0,m.useEffect)(()=>{const F=c.getActiveAccount();if(F){L(F);return}C.length>0?(c.setActiveAccount(C[0]),L(C[0])):L(null)},[C,c]),A},E=c=>{(0,m.useEffect)(()=>{document.title=c},[c])};var D=(c=>(c.Default="Default",c.QATechnician="ics-qa-technician",c.QASupervisor="ics-qa-supervisor",c.InventoryManager="Inventory Manager",c))(D||{});const{Default:S,QATechnician:y,QASupervisor:M,InventoryManager:W}=D,z={"user.read":[S],"user.write":[S],"sds.read":[S],"warehouse-operations.read":[y,M,W],"inbound-quality.read":[y,M],"inbound-quality.assign":[M],"receiving.read":[y,M,W],"qvr.read":[y,M]},b=c=>Object.entries(z).reduce((C,[A,L])=>((L.includes(c)||L.includes(D.Default))&&C.push(A),C),[]),N=c=>c.reduce((A,L)=>[...A,...b(L)],[]).filter((A,L,F)=>F.indexOf(A)===L),I=c=>!c||c.length===0?[D.Default]:c,s=()=>{const c=h(),C=I(c?.idTokenClaims?.roles),A=N(C);return{hasPermission:j=>(j||(j="user.read"),!0),hasRole:j=>C.includes(j),getPermissions:()=>A}}},5639:(v,p,e)=>{"use strict";var t=e(9470),l=e(8051),f=e(8236),u=e(1632),m=e(7924);const h=({children:o})=>(0,t.jsx)(m.Z,{sx:{display:"flex"},children:o});var E=e(2522),D=e(2097),S=e(6367),y=e(5344),M=e(366),W=e(5909),z=e(1155),b=e(4822),N=e(3813),I=e(9951),s=e(2485),c=e(2322);const C=(0,N.ZP)(I.Z)(()=>({"& .MuiTypography-root":{fontSize:"0.875rem"}})),A=({icon:o,label:r,path:g})=>{const a=(0,b.v9)(U=>U.portal.sideNavOpen),O=(0,u.s0)(),{pathname:G}=(0,u.TH)();return(0,t.jsxs)(s.Z,{disableRipple:!0,selected:G===g,onClick:()=>O(g),sx:U=>({minHeight:48,justifyContent:a?"space-evenly":"center",margin:"0.25rem","&.MuiButtonBase-root.MuiListItemButton-root":{borderRadius:"0.25rem",":hover:not(.Mui-selected)":{backgroundColor:U.palette.primary.light,filter:"brightness(1.2)",opacity:.8,"& .MuiListItemIcon-root, .MuiListItemText-root":{color:U.palette.grey[400]}},"&.Mui-selected":{backgroundColor:U.palette.primary.main,"& .MuiListItemIcon-root, .MuiListItemText-root":{color:U.palette.getContrastText(U.palette.primary.main)}}}}),children:[(0,t.jsx)(c.Z,{sx:{minWidth:0,mr:a?"0.5rem":"auto",justifyContent:"center",opacity:a?.7:1},children:o}),(0,t.jsx)(C,{primary:r,sx:{opacity:a?1:0}})]},r)},L=({links:o})=>{const{hasPermission:r}=(0,b.TE)();return(0,t.jsx)(t.Fragment,{children:o.map(g=>r(g.permission)?(0,t.jsx)(A,{...g},g.label):null)})};var F=e(3192);const B="15rem",j=o=>({width:B,transition:o.transitions.create("width",{easing:o.transitions.easing.sharp,duration:o.transitions.duration.enteringScreen}),overflowX:"hidden"}),fe=o=>({transition:o.transitions.create("width",{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${o.spacing(7)} + 1px)`,[o.breakpoints.up("sm")]:{width:`calc(${o.spacing(8)} + 1px)`}}),ge=(0,N.ZP)(F.ZP,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:r})=>({width:B,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...r&&{...j(o),"& .MuiDrawer-paper":j(o)},...!r&&{...fe(o),"& .MuiDrawer-paper":fe(o)}})),he=(0,N.ZP)("div")(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",backgroundColor:o.palette.primary.light,padding:o.spacing(0,1),...o.mixins.toolbar}));var Y=e(3841);const ve={sideNavOpen:!0},k=(0,Y.oM)({name:"portal",initialState:ve,reducers:{toggleDrawer(o){o.sideNavOpen=!o.sideNavOpen}}}),{toggleDrawer:q}=k.actions,ye=k.reducer;var xe=e(1233),De=e(6974),Pe=e(3070);const Ee=[{label:"Warehouse Operations",links:[{icon:(0,t.jsx)(xe.Z,{}),label:"Invoice Problem Management",path:"/warehouse-operations/invoice-problem-management",permission:"user.write"}]}],Ie={links:[{icon:(0,t.jsx)(De.Z,{}),label:"Account",path:"/account"},{icon:(0,t.jsx)(Pe.Z,{}),label:"Logout",path:"/logout"}]};var _=e(7150),H=e(5444);const Ce=({label:o,open:r})=>(0,t.jsx)(H.Z,{fontWeight:"bold",fontSize:"0.6rem",sx:r?{m:"1rem",opacity:.8}:{m:"1rem",textAlign:"center",visibility:"hidden"},children:o.toUpperCase()},o),ee=()=>(0,t.jsx)(E.Z,{sx:{marginTop:"0.75rem"}}),Se=()=>{const o=(0,b.v9)(a=>a.portal.sideNavOpen),r=(0,b.I0)(),g=(0,u.s0)();return(0,t.jsxs)(ge,{variant:"permanent",open:o,sx:{fontSize:"0.875rem"},children:[(0,t.jsx)(he,{children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Z,{onClick:()=>g("/"),sx:{marginRight:"4rem"},children:(0,t.jsx)("img",{alt:"Incora Logo",src:_,style:{maxHeight:"2.0rem"}})}),(0,t.jsx)(S.Z,{onClick:()=>r(q()),children:(0,t.jsx)(M.Z,{})})]}):(0,t.jsx)(S.Z,{color:"inherit","aria-label":"open drawer",onClick:()=>r(q()),sx:{marginRight:"0.25rem"},children:(0,t.jsx)(W.Z,{})})}),(0,t.jsx)(E.Z,{}),(0,t.jsxs)(y.Z,{component:"nav","data-testid":"side-nav",children:[(0,t.jsx)(A,{icon:(0,t.jsx)(z.Z,{}),path:"/",label:"Home"}),(0,t.jsx)(ee,{}),Ee.map(a=>(0,t.jsxs)("div",{children:[a?.label?(0,t.jsx)(Ce,{label:a.label,open:o}):null,(0,t.jsx)(L,{...a}),(0,t.jsx)(ee,{})]},a.label))]}),(0,t.jsx)(y.Z,{sx:{mt:"auto"},component:"nav",children:(0,t.jsx)(L,{...Ie})})]})};var te=e(9902);const Ae=({children:o})=>(0,t.jsx)(te.Z,{disableGutters:!0,maxWidth:!1,sx:{maxWidth:"100%",height:"100vh",overflow:"auto"},children:o}),Re=({children:o})=>(0,t.jsxs)(h,{children:[(0,t.jsx)(Se,{}),(0,t.jsx)(Ae,{children:o})]}),V=o=>(0,t.jsx)(Re,{children:o});var oe=e(9540),ne=e(4776),n=e(3661);const i=(0,N.ZP)(n.Z)(({theme:o})=>({backgroundColor:o.palette.primary.light,boxShadow:"none",zIndex:o.zIndex.drawer+1})),d=o=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(i,{position:"relative",children:(0,t.jsx)(ne.Z,{children:(0,t.jsx)("img",{alt:"Incora Logo",src:_,style:{maxHeight:"2rem",paddingLeft:"2rem"}})})}),(0,t.jsx)(m.Z,{sx:{pt:1},children:o.children})]}),T=o=>(0,t.jsx)(d,{children:o});var Z=e(5110);const Fe=(0,Z.ZP)(()=>Promise.all([e.e(216),e.e(267)]).then(e.bind(e,4640)),{resolveComponent:o=>o.Form}),Me=(0,Z.ZP)(()=>e.e(713).then(e.bind(e,9648)),{resolveComponent:o=>o.Summary}),at=(0,Z.ZP)(()=>e.e(12).then(e.bind(e,8960)),{resolveComponent:o=>o.Specifications}),st=(0,Z.ZP)(()=>Promise.all([e.e(216),e.e(567)]).then(e.bind(e,632)),{resolveComponent:o=>o.ReceiptDetails}),rt=(0,Z.ZP)(()=>Promise.all([e.e(216),e.e(47)]).then(e.bind(e,8306)),{resolveComponent:o=>o.Notes}),lt=[{id:"qvr",path:"/qvr/:receiptId",children:[{id:"qvr-form",index:!0,element:T((0,t.jsx)(Fe,{}))},{id:"qvr-summary",path:"summary",element:T((0,t.jsx)(Me,{}))},{id:"qvr-specification",path:"specification",element:T((0,t.jsx)(at,{}))},{id:"qvr-receipt-details",path:"receipt-details",element:T((0,t.jsx)(st,{}))},{id:"qvr-notes",path:"notes",element:T((0,t.jsx)(rt,{}))}]}],ct=(0,Z.ZP)(()=>Promise.all([e.e(216),e.e(378)]).then(e.bind(e,1982)),{resolveComponent:o=>o.Account}),dt=[{id:"account",path:"/account",element:V((0,t.jsx)(ct,{}))}];var We=e(6902),Le=e(9665),ie=e(4119),ut=e(2754),mt=e(1340);const pt=o=>o.query({query:r=>{const g=new URLSearchParams;return r["delivery-date-max"]&&g.append("delivery-date-max",r["delivery-date-max"]),r["delivery-date-min"]&&g.append("delivery-date-min",r["delivery-date-min"]),r.facilityId&&g.append("facility-id",r.facilityId),r.page!==void 0&&g.append("page",r.page.toString()),r.shipment!==void 0&&g.append("shipment",r.shipment.toString()),r.size!==void 0&&g.append("size",r.size.toString()),r.sort&&r.sort.forEach(a=>g.append("sort",a)),r.workArea&&g.append("work-area",r.workArea),{url:"/put-away-errors",params:g}}}),ae=(0,Le.LC)({reducerPath:"customerOpsApi",baseQuery:(0,ie.ni)({baseUrl:We.D.api.customerOps,prepareHeaders:(o,r)=>mt.sT.includes(r.endpoint)?o:(0,ut.B)(We.D.scope)(o)}),endpoints:o=>({getPutAwayErrors:pt(o)})}),{useGetPutAwayErrorsQuery:ft,useLazyGetPutAwayErrorsQuery:No}=ae;var J=e(8868);const gt={tabIndex:0,selection:[],showFilters:!1,rows:[]},Ve=(0,Y.oM)({name:"invoiceProblemManagement",initialState:gt,reducers:{setTabIndex(o,r){o.tabIndex=r.payload,o.selection=[]},setSelection(o,r){o.selection=r.payload},setShowFilters(o,r){o.showFilters=r.payload},setRows(o,r){o.rows=r.payload},reset(o){o.tabIndex=0,o.selection=[],o.showFilters=!1,o.rows=[]}}}),{setTabIndex:ht,setSelection:vt,setShowFilters:yt,setRows:Bo,reset:Fo}=Ve.actions,xt=Ve.reducer,Ge="Awaiting Put Away",ze=[Ge,"Awaiting Delivery Confirmation","Missing Price","MR Over Issued","PO Line Over Received","Receipt Over Issued"],Dt="Something went wrong fetching data! Please contact support.",Pt="Loading data...";var Et=e(2704),It=e(8860),Te=e(8810),Ke=e(4263),Ct=e(7271),se=e(5236),St=e(7316),At=e(9197),Rt=e(9722),Mt=e(4008),Lt=e(6105),Tt=e(2866),jt=e(5815),Ot=e(5688),bt=e(8305),Zt=e(1369),Qe=e(6928);function Ut(o){if(!o)return"-";const r=Qe.ou.fromISO(String(o));return r.isValid?r.toLocaleString(Qe.ou.DATE_MED):String(o)}const Nt=()=>{const o=(0,Ot.Z)();return(0,t.jsxs)(Mt.D,{sx:{borderRadius:"0.4rem 0.4rem 0 0",backgroundColor:o.palette.grey[800],color:o.palette.common.white},children:[(0,t.jsx)(Lt.S,{sx:{color:"inherit"}}),(0,t.jsx)(Tt.M,{sx:{color:"inherit"}})]})},Bt=({rows:o,onSelectionChange:r})=>{const g=[{field:"cabinetName",headerName:"Cabinet",flex:1.2,minWidth:180,renderCell:a=>(0,t.jsx)(bt.Z,{title:String(a.value),placement:"bottom-start",children:(0,t.jsx)(m.Z,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:a.value})})},{field:"mrNumber",headerName:"MR Number",flex:.7,minWidth:120},{field:"mrLine",headerName:"MR Line",flex:.7,minWidth:120},{field:"quantity",headerName:"Quantity",flex:.7,minWidth:100},{field:"partNumber",headerName:"Part Number",flex:1,minWidth:140},{field:"partDescription",headerName:"Part Description",flex:1.2,minWidth:180},{field:"itemId",headerName:"Item ID",flex:.7,minWidth:100},{field:"dateDelivered",headerName:"Date Delivered",flex:.9,minWidth:140,valueFormatter:({value:a})=>Ut(a),renderCell:a=>(0,t.jsx)(Zt.Z,{size:"small",label:String(a.formattedValue??a.value)})},{field:"errorDetail",headerName:"Error Detail",flex:1.2,minWidth:180},{field:"shipmentId",headerName:"Shipment ID",flex:.7,minWidth:100},{field:"issueId",headerName:"Issue ID",flex:.7,minWidth:100},{field:"receiptId",headerName:"Receipt ID",flex:.7,minWidth:100},{field:"poNumber",headerName:"PO Number",flex:.7,minWidth:120},{field:"poLine",headerName:"PO Line",flex:.7,minWidth:120}];return(0,t.jsx)(jt.K,{rows:o,columns:g,getRowId:a=>a.id,autoHeight:!0,checkboxSelection:!0,disableRowSelectionOnClick:!0,pageSizeOptions:[10,25,50,100],initialState:{pagination:{paginationModel:{page:0,pageSize:10}}},onRowSelectionModelChange:a=>{r(a.map(String))},density:"standard",showCellVerticalBorder:!0,slots:{toolbar:Nt},sx:{"--unstable_DataGrid-radius":0,width:"100%",backgroundColor:a=>a.palette.common.white,border:"1px solid rgba(0,0,0,0.2)",".MuiDataGrid-columnHeader, .MuiDataGrid-cell":{textAlign:"center"},".MuiDataGrid-columnHeaderTitle":{width:"100%",textAlign:"center"}}})};var w=e(7362),je=e(8199),Ft=e(8908);const Wt=({onSearch:o})=>(0,t.jsxs)(w.ZP,{container:!0,spacing:2,children:[(0,t.jsx)(w.ZP,{item:!0,xs:12,md:4,children:(0,t.jsx)(je.Z,{label:"Company",fullWidth:!0,disabled:!0,placeholder:"(future)"})}),(0,t.jsx)(w.ZP,{item:!0,xs:12,md:4,children:(0,t.jsx)(je.Z,{label:"Facility",fullWidth:!0,disabled:!0,placeholder:"(future)"})}),(0,t.jsx)(w.ZP,{item:!0,xs:12,md:4,children:(0,t.jsx)(je.Z,{label:"Area / Building",fullWidth:!0,disabled:!0,placeholder:"(future)"})}),(0,t.jsx)(w.ZP,{item:!0,xs:12,children:(0,t.jsx)(E.Z,{})}),(0,t.jsx)(w.ZP,{item:!0,xs:12,display:"flex",justifyContent:"flex-end",children:(0,t.jsx)(m.Z,{children:(0,t.jsx)(D.Z,{variant:"contained",endIcon:(0,t.jsx)(Ft.Z,{}),onClick:o,children:"Search"})})})]}),Vt=()=>{const o=(0,J.I0)(),r=(0,J.v9)(P=>P.invoiceProblemManagement.tabIndex),g=(0,J.v9)(P=>P.invoiceProblemManagement.selection),a=(0,J.v9)(P=>P.invoiceProblemManagement.showFilters),O=(0,J.v9)(P=>P.invoiceProblemManagement.rows);(0,l.useEffect)(()=>{},[r]);const G=ze[r]===Ge,U=new Date,ot=U.getUTCFullYear(),nt=U.getUTCMonth(),Ro=new Date(Date.UTC(ot,nt-1,1,0,0,0)),Mo=new Date(Date.UTC(ot,nt+1,0,23,59,59)),Lo=Ro.toISOString().replace(/\.\d{3}Z$/,"Z"),To=Mo.toISOString().replace(/\.\d{3}Z$/,"Z"),Ne=ft({"delivery-date-min":Lo,"delivery-date-max":To},{skip:!G}),me=Ne.data,jo=Ne.isLoading,Oo=Ne.error,bo=(0,l.useMemo)(()=>me&&Array.isArray(me)?me.flatMap(P=>Array.isArray(P.putAwayErrors)?P.putAwayErrors.map(R=>({id:`${P.facilityId}-${R.issueId}-${R.receiptId}-${R.itemId}`,cabinetName:R.cabinetName??"",mrNumber:R.mrNumber??0,mrLine:R.mrLine??"",quantity:R.quantity??0,partNumber:R.partNumber??"",partDescription:R.partDescription??"",itemId:R.itemId??0,dateDelivered:R.dateDelivered??"",errorDetail:R.errorDetail??"",shipmentId:R.shipmentId??0,issueId:R.issueId??0,receiptId:R.receiptId??0,poNumber:R.poNumber??0,poLine:R.poLine??0})):[]):O,[me,O]);let it=O,Be=!1,pe=null;G&&(Be=jo,pe=Oo,it=bo);const Zo=()=>{console.log("Submit action with rows:",g)},Uo=()=>{console.log("Print action with rows:",g)};return(0,t.jsxs)(m.Z,{sx:{p:2},children:[(0,t.jsx)(H.Z,{variant:"h5",fontWeight:600,sx:{mb:1},children:"Invoice Problem Management"}),(0,t.jsx)(Et.Z,{value:r,onChange:(P,R)=>{o(ht(R))},variant:"fullWidth",allowScrollButtonsMobile:!0,TabScrollButtonProps:{sx:P=>({color:P.palette.primary.main,opacity:.85,"&:hover":{color:P.palette.primary.dark}})},sx:{py:"10px","& .MuiTab-root":{textTransform:"none",fontWeight:600},"& .Mui-selected":P=>({background:P.palette.grey[200],borderRadius:1})},children:ze.map(P=>(0,t.jsx)(It.Z,{label:P},P))}),(0,t.jsx)(Te.Z,{elevation:0,sx:P=>({background:P.palette.common.white,border:"1px solid rgba(0,0,0,0.2)",borderRadius:1,mb:1,px:1}),children:(0,t.jsxs)(ne.Z,{disableGutters:!0,sx:{justifyContent:"space-between",mb:1},children:[(0,t.jsxs)(Ke.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,t.jsx)(S.Z,{onClick:()=>o(yt(!a)),children:(0,t.jsx)(St.Z,{})}),(0,t.jsxs)(H.Z,{variant:"body2",color:"text.secondary",children:[g.length," selected"]})]}),(0,t.jsxs)(Ke.Z,{direction:"row",spacing:1,children:[(0,t.jsx)(D.Z,{variant:"outlined",startIcon:(0,t.jsx)(At.Z,{}),onClick:Uo,disabled:g.length===0,children:"Print Packing List"}),(0,t.jsx)(D.Z,{variant:"contained",startIcon:(0,t.jsx)(Rt.Z,{}),onClick:Zo,disabled:g.length===0,children:"Submit"})]})]})}),(0,t.jsxs)(Ct.Z,{in:a,unmountOnExit:!0,children:[(0,t.jsx)(se.Z,{severity:"info",sx:{mb:2},children:"Filters are provided as a prepared section for future requirements. They are not required at the moment."}),(0,t.jsx)(Wt,{onSearch:()=>{}}),(0,t.jsx)(E.Z,{sx:{my:2}})]}),(0,t.jsxs)(Te.Z,{elevation:0,sx:P=>({background:P.palette.common.white,border:"1px solid rgba(0,0,0,0.2)",borderRadius:1,p:1}),children:[!!pe&&(0,t.jsxs)(se.Z,{severity:"error",sx:{mt:2},children:[(0,t.jsx)(H.Z,{variant:"subtitle2",fontWeight:600,gutterBottom:!0,children:"Error"}),Dt]}),Be&&!pe&&(0,t.jsx)(se.Z,{severity:"info",sx:{mt:2},children:Pt}),!Be&&!pe&&(0,t.jsx)(Bt,{rows:it,onSelectionChange:P=>o(vt(P))})]})]})};var Gt=e(2743);const zt=()=>((0,b.Tt)("Unauthorized"),(0,t.jsx)(te.Z,{sx:{pt:5},children:(0,t.jsx)(Te.Z,{children:(0,t.jsxs)(se.Z,{severity:"error",children:[(0,t.jsx)(Gt.Z,{children:"Authorization"}),"You are not authorized to view this content."]})})})),He=({children:o,permission:r})=>{const{hasPermission:g}=(0,b.TE)();return g(r)?o:(0,t.jsx)(zt,{})},Kt=(0,Z.ZP)(()=>Promise.all([e.e(216),e.e(371)]).then(e.bind(e,7207)),{resolveComponent:o=>o.InboundQuality}),Qt=[{id:"warehouse-operations",path:"/warehouse-operations",children:[{id:"warehouse-operations",index:!0,element:V((0,t.jsx)(oe.LoadableNotFound,{}))},{id:"inbound-quality",path:"inbound-quality",element:V((0,t.jsx)(He,{permission:"inbound-quality.read",children:(0,t.jsx)(Kt,{})}))},{id:"invoice-problem-management",path:"invoice-problem-management",element:V((0,t.jsx)(He,{permission:"user.write",children:(0,t.jsx)(Vt,{})}))}]}],Ht=(0,Z.ZP)(()=>Promise.all([e.e(216),e.e(177)]).then(e.bind(e,6490)),{resolveComponent:o=>o.Home}),wt=(0,Z.ZP)(()=>e.e(227).then(e.bind(e,5107)),{resolveComponent:o=>o.SDS}),$t=(0,Z.ZP)(()=>e.e(535).then(e.bind(e,1643)),{resolveComponent:o=>o.Login}),Xt=(0,Z.ZP)(()=>e.e(170).then(e.bind(e,9841)),{resolveComponent:o=>o.Logout}),Yt=[{id:"home",path:"/",element:V((0,t.jsx)(Ht,{}))},{id:"login",path:"/login",element:(0,t.jsx)($t,{})},{id:"logout",path:"/logout",element:(0,t.jsx)(Xt,{})},{id:"sds",path:"/sds",element:V((0,t.jsx)(wt,{}))},...lt,...dt,...Qt,{id:"not-found",path:"*",element:V((0,t.jsx)(oe.LoadableNotFound,{}))}],Jt=()=>(0,u.V$)(Yt);var we=e(9288);const kt=()=>{const o=(0,b.mA)(),r=(0,u.TH)(),g=(0,u.s0)(),{inProgress:a}=(0,we.Fp)(),O=r.pathname==="/login",G=r.pathname==="/logout",U=O||G;return(0,l.useEffect)(()=>{!o&&!U&&a==="none"?g("/login"):o&&O&&a==="none"&&g("/")},[o,U,O,g,a]),a!=="none"&&O?null:(0,t.jsx)("div",{"data-testid":"app-test-id",children:(0,t.jsx)(Jt,{})})};var re=e(280);typeof document<"u"&&(document.cookie="i18next=; Max-Age=0; Path=/; SameSite=Strict; Secure"),re.z2.use((0,re.Xf)((o,r)=>e(2071)(`./${o.replace("-","_")}/${r}.json`))).use(re.qB).use(re.Db).init({fallbackLng:"en-US",debug:!1,load:"currentOnly",ns:["translation"],defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","queryString","navigator","htmlTag"],caches:["localStorage"],cookieOptions:{secure:!0,sameSite:"strict"}}});const Qo=null;var qt=e(6588),_t=e(5527),eo=e(2204),to=e(8346),K=e(3683),oo=e(3379),$e=e.n(oo),no=e(7795),Xe=e.n(no),io=e(569),Ye=e.n(io),ao=e(3565),Je=e.n(ao),so=e(9216),ke=e.n(so),ro=e(4589),qe=e.n(ro),le=e(1843),$={};$.styleTagTransform=qe(),$.setAttributes=Je(),$.insert=Ye().bind(null,"head"),$.domAPI=Xe(),$.insertStyleElement=ke();var Ho=$e()(le.Z,$);const x=le.Z&&le.Z.locals?le.Z.locals:void 0;var ce=e(400),X={};X.styleTagTransform=qe(),X.setAttributes=Je(),X.insert=Ye().bind(null,"head"),X.domAPI=Xe(),X.insertStyleElement=ke();var wo=$e()(ce.Z,X);const lo=ce.Z&&ce.Z.locals?ce.Z.locals:void 0;var _e=e(3834);const co=o=>{switch(o){case"ar_AE":return K.gP;case"de_DE":return K.y1;case"fr_FR":return K.gQ;case"it_IT":return K.KL;case"pl_PL":return K.sv;case"tr_TR":return K.Xl;case"zh_CN":return K.U1;default:return K._z}},uo=({children:o})=>{const[,r]=(0,_e.$G)(),g=(0,eo.Z)({typography:{fontFamily:lo.fontFamily},palette:{common:{black:x["grayscale-black"],white:x["grayscale-white"]},primary:{main:x["brand-primary-navy"],contrastText:x["grayscale-white"]},secondary:{main:x["brand-primary-teal"]},neutral:{main:x["grayscale-gray700"],dark:x["grayscale-gray800"]},error:{main:x["status-negative-main"],light:x["status-negative-light"],dark:x["status-negative-dark"],darker:x["status-negative-darker"]},warning:{main:x["status-warning-main"],light:x["status-warning-light"],dark:x["status-warning-dark"],darker:x["status-warning-darker"]},info:{main:x["status-information-main"],light:x["status-information-light"],dark:x["status-information-dark"],darker:x["status-information-darker"]},success:{main:x["status-positive-main"],light:x["status-positive-light"],dark:x["status-positive-dark"],darker:x["status-positive-darker"]},grey:{200:x["grayscale-gray200"],300:x["grayscale-gray300"],400:x["grayscale-gray400"],600:x["grayscale-gray600"],700:x["grayscale-gray700"],800:x["grayscale-gray800"]},background:{default:"rgb(239, 240, 243)",paper:x["grayscale-white"]}},components:{MuiTab:{styleOverrides:{root:({theme:a})=>({background:a.palette.common.white,borderRadius:".4rem",boxShadow:a.shadows[1],borderBottom:".1rem",borderBottomColor:a.palette.grey[400],borderBottomStyle:"solid",fontWeight:"bold","&.Mui-selected":{backgroundColor:a.palette.secondary.main,color:a.palette.common.white}})}},MuiDataGrid:{styleOverrides:{root:({theme:a})=>({"& .Mui-even":{backgroundColor:a.palette.grey[200]},"& .MuiDataGrid-pinnedColumnHeaders .MuiDataGrid-columnHeader":{backgroundColor:a.palette.primary.main},"& .MuiDataGrid-columnHeader":{backgroundColor:a.palette.primary.light,color:a.palette.common.white},"& .MuiDataGrid-columnHeader--dragging":{color:a.palette.common.black},"& .MuiDataGrid-iconSeparator":{color:a.palette.common.white},"& .MuiDataGrid-sortIcon":{color:a.palette.common.white},"& .MuiDataGrid-menuIconButton":{color:a.palette.common.white},"& .MuiDataGrid-cell:focus-within":{outline:"none"},"& .MuiDataGrid-cell:focus":{outline:"none"},"& .row-status--greyed":{backgroundColor:a.palette.grey[600]}," & .row-status--greyed:hover":{backgroundColor:a.palette.grey[400]}})}},MuiInputBase:{styleOverrides:{input:({theme:a})=>({"&.MuiFilledInput-input.Mui-disabled":{WebkitTextFillColor:a.palette.grey[700]}})}},MuiInputLabel:{styleOverrides:{root:({theme:a})=>({"&.MuiInputLabel-root.Mui-disabled":{color:a.palette.grey[700]}})}},MuiDrawer:{styleOverrides:{paper:({theme:a})=>({backgroundColor:a.palette.grey[400]})}}}},co(r.resolvedLanguage));return(0,t.jsx)(to.Z,{theme:g,children:o})};var mo=e(7262),po=e(9488);const fo=({children:o})=>{const[,r]=(0,_e.$G)(),g=r.language.toLowerCase().replace("_","-");return(0,t.jsx)(mo._,{dateAdapter:po.Y,adapterLocale:g,dateFormats:{monthShort:"MMM M"},children:o})};var go=e(1846);const ho=({children:o})=>(0,t.jsx)(go.VK,{children:o}),vo=o=>o.query({query:({itemId:r,inventoryGroup:g})=>`/item/${r}/inventorygroup/${g}/parts`}),de=(0,Le.LC)({reducerPath:"catalogApi",baseQuery:(0,ie.ni)({baseUrl:"https://stoplight.io/mocks/incora/catalog-api/70635011"}),endpoints:o=>({catalogParts:vo(o)})}),{useCatalogPartsQuery:$o}=de,yo=o=>o.query({query:({itemId:r,radianPo:g,poLine:a})=>`/item/${r}/po/${g}/poline/${a}/customernotes`}),ue=(0,Le.LC)({reducerPath:"fulfillmentApi",baseQuery:(0,ie.ni)({baseUrl:"https://stoplight.io/mocks/incora/fulfillment-api/73869180"}),endpoints:o=>({customerNotes:yo(o)})}),{useCustomerNotesQuery:Xo}=ue;var Oe=e(6563),be=e(3239),xo=e(9545),Do=e(137),Ze=e(4829);const et=(0,Y.xC)({reducer:{portal:ye,qvrForm:xo.ZP,inboundQuality:Do.ZP,invoiceProblemManagement:xt,[de.reducerPath]:de.reducer,[ue.reducerPath]:ue.reducer,[Oe.wU.reducerPath]:Oe.wU.reducer,[be.L.reducerPath]:be.L.reducer,[Ze.GW.reducerPath]:Ze.GW.reducer,[ae.reducerPath]:ae.reducer},middleware:o=>o({serializableCheck:{ignoredActions:["qvrForm/uploadDocuments"]}}).concat([de.middleware,ue.middleware,Oe.wU.middleware,be.L.middleware,Ze.GW.middleware,ae.middleware])});(0,ie.sj)(et.dispatch);var Po=e(3583);const Eo=({children:o})=>(0,t.jsx)(Po.zt,{store:et,children:o});var Q=e(3452),Ue=e(9600);const Io=({children:o})=>((0,l.useEffect)(()=>{if(!Q.U.getActiveAccount()){const a=Q.U.getAllAccounts();a.length===1&&Q.U.setActiveAccount(a[0])}const g=Q.U.addEventCallback(a=>{if(a.eventType===Ue.t.LOGIN_SUCCESS||a.eventType===Ue.t.ACQUIRE_TOKEN_SUCCESS||a.eventType===Ue.t.SSO_SILENT_SUCCESS){const O=a.payload;if(O&&typeof O=="object"&&"account"in O&&O.account){const G=O.account;G&&Q.U.setActiveAccount(G)}}});return()=>{g&&Q.U.removeEventCallback(g)}},[]),(0,t.jsx)(we.rL,{instance:Q.U,children:o})),Co=({children:o})=>(0,t.jsx)(Eo,{children:(0,t.jsx)(Io,{children:(0,t.jsx)(ho,{children:(0,t.jsx)(qt.Z,{injectFirst:!0,children:(0,t.jsx)(fo,{children:(0,t.jsxs)(uo,{children:[(0,t.jsx)(_t.ZP,{}),o]})})})})})});var So=e(1442),Ao=e(4553);Ao.T.setLicenseKey("d8e46f3df97261c934293ecedb7e6280Tz02Mjk3NyxFPTE3MTE2NDc2ODY5MDMsUz1wcmVtaXVtLExNPXN1YnNjcmlwdGlvbixLVj0y");const tt=document.getElementById("root");if(!tt)throw new Error("Failed to find the root element");(0,f.s)(tt).render((0,t.jsx)(l.StrictMode,{children:(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)(So.g,{}),children:(0,t.jsx)(Co,{children:(0,t.jsx)(kt,{})})})}))},8815:(v,p,e)=>{"use strict";e.d(p,{ou:()=>t.ou});var t=e(6928)},280:(v,p,e)=>{"use strict";e.d(p,{Db:()=>l.Db,Xf:()=>m.Z,ei:()=>t.$,qB:()=>u.Z,z2:()=>f.ZP});var t=e(9089),l=e(1336),f=e(6894),u=e(1660),m=e(3477)},9288:(v,p,e)=>{"use strict";e.d(p,{Fp:()=>t.Fp,rL:()=>t.rL});var t=e(3047)},3583:(v,p,e)=>{"use strict";e.d(p,{I0:()=>t.I0,v9:()=>t.v9,zt:()=>t.zt});var t=e(8868)},3834:(v,p,e)=>{"use strict";e.d(p,{$G:()=>l,iu:()=>f,y4:()=>u});var t=e(280);const l=t.ei,f=Object.freeze({"ar-AE":"\u0639\u0631\u0628\u064A","de-DE":"Deutsch","en-US":"English (US)","en-GB":"English (UK)","fr-FR":"Fran\xE7ais","it-IT":"Italiano","pl-PL":"Polski","tr-TR":"T\xFCrk","zh-CN":"\u4E2D\u56FD\u4EBA"}),u=Object.keys(f)},1442:(v,p,e)=>{"use strict";e.d(p,{g:()=>u});var t=e(9470),l=e(493),f=e(1240);const u=()=>(0,t.jsx)(l.Z,{open:!0,sx:{height:"100vh",width:"100vw",position:"fixed",top:0,left:0,zIndex:1e4,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,t.jsx)(f.Z,{size:"10em"})})},9540:(v,p,e)=>{"use strict";e.r(p),e.d(p,{LoadableNotFound:()=>S,NotFound:()=>D});var t=e(9470),l=e(7362),f=e(5236),u=e(2743),m=e(3834),h=e(4822),E=e(5110);const D=()=>{(0,h.Tt)("Not Found");const[y]=(0,m.$G)();return(0,t.jsxs)(l.ZP,{container:!0,spacing:3,children:[(0,t.jsx)(l.ZP,{item:!0,xs:!0}),(0,t.jsx)(l.ZP,{item:!0,xs:6,children:(0,t.jsxs)(f.Z,{severity:"error",sx:{marginTop:"3em"},children:[(0,t.jsx)(u.Z,{children:y("missingpage.title","Content Not Found")}),y("noKey.message"," Sorry it seems that the content you are looking for is not available.")]})}),(0,t.jsx)(l.ZP,{item:!0,xs:!0})]})},S=(0,E.ZP)(()=>Promise.resolve().then(e.bind(e,9540)),{resolveComponent:y=>y.NotFound})},2697:()=>{"use strict"},9545:(v,p,e)=>{"use strict";e.d(p,{kx:()=>s,ZP:()=>ne,iH:()=>ye,zF:()=>he,Fv:()=>ge,sb:()=>xe,bv:()=>Se,j:()=>Ce,z3:()=>Ee,oE:()=>Pe,RU:()=>De,g$:()=>k,aQ:()=>ve,Ub:()=>_,w1:()=>te,on:()=>ee,L9:()=>Y,Ik:()=>Re,I0:()=>H,dx:()=>V,mz:()=>Ie,_l:()=>Ae,Ws:()=>oe,GA:()=>q});var t=e(3841);const f={catalogPartShelfLifeVerification:[{id:"",company:"",catalog:"",catalogPartNumber:"",perMfg:"",basis:"",duration:"",customerStorageTemperature:"",partVerified:!1,receiptPartExpireDate:"",verified:!1}]},u={ghsLabelRequirements:[],specifications:[],nonConformanceCodes:[]},m={id:0,type:"",flowDown:0,description:"",reviewDate:"",catalog:"",company:""},h={id:"",date:"",link:"",type:"",name:"",company:"",delete:!1,file:void 0},E={description:{value:"",verified:!1},notes:{internal:"",external:""},flowDowns:[m]};var D=e(2697);const W={receiptData:{itemVerification:E,inboundDocuments:[h],receivedVerification:{quantity:{ordered:"",received:"",verified:!1},manufacturerLot:{value:"",verified:!1},deliveryTicket:{value:"",verified:!1}},shelfLifeBasis:{dateOfReceipt:""}},complianceChecks:u,catalogPartData:f},z={submitted:!1,current:!1};var b=e(8815),N=e(7939),I=e(6563);const s=[{name:"Receipt Data",steps:["Verify Item","Review & Categorize Inbound Documents","Verify Received","Shelf Life Basis Date"]},{name:"Compliance Checks",steps:["GHS Label Requirements","Verify Specifications","Non-Conformance Codes"]},{name:"Compliance Checks",steps:["Catalog Part Shelf Life Verification"]}],c={initialized:!1,form:W,section:0,step:0},C=(0,t.oM)({name:"qvrForm",initialState:c,reducers:{initializeQVRForm(n,i){n.initialized||(n.initialized=!0,n.form=i.payload)},setQVRForm(n,i){n.form=i.payload},setSectionAndStep(n,i){if(i.payload.section<0||i.payload.section>s.length-1)return;const d=s[i.payload.section].steps;i.payload.step<0||i.payload.step>d.length-1||(n.section=i.payload.section,n.step=i.payload.step)},setSection(n,i){i.payload<0||i.payload>s.length-1||(n.section=i.payload)},setStep(n,i){const d=s[n.section].steps;i.payload<0||i.payload>d.length-1||(n.step=i.payload)},previousStep(n){n.step>0?n.step-=1:n.section>0&&(n.section-=1,n.step=s[n.section].steps.length-1)},nextStep(n){const i=s[n.section].steps;n.step({id:crypto.randomUUID(),date:b.ou.fromMillis(T.lastModified).toISODate(),name:T.name,file:"File"}));n.form.receiptData.inboundDocuments.push(...d)},deleteDocument(n,i){const d=[...n.form.receiptData.inboundDocuments],T=d.findIndex(Me=>Me.id===i.payload),Z=d[T];Z.delete=!0,Z.file!==void 0&&d.splice(T,1),n.form.receiptData.inboundDocuments=d},restoreDocument(n,i){n.form.receiptData.inboundDocuments=n.form.receiptData.inboundDocuments.map(d=>(d.id===i.payload&&(d.delete=!1),d))},setDocumentType(n,i){n.form.receiptData.inboundDocuments=n.form.receiptData.inboundDocuments.map(d=>(d.id===i.payload.id&&(d.type=i.payload.type,(0,N.E)(d.name)&&(d.name=i.payload.type)),d))},setDocumentName(n,i){n.form.receiptData.inboundDocuments=n.form.receiptData.inboundDocuments.map(d=>(d.id===i.payload.id&&(d.name=i.payload.name),d))},setDocumentCompany(n,i){n.form.receiptData.inboundDocuments=n.form.receiptData.inboundDocuments.map(d=>(d.id===i.payload.id&&(d.company=i.payload.company),d))},toggleQuantityReceivedVerified(n){n.form.receiptData.receivedVerification.quantity.verified=!n.form.receiptData.receivedVerification.quantity.verified},setManufacturerLot(n,i){n.form.receiptData.receivedVerification.manufacturerLot.value=i.payload},toggleManufacturerLotVerified(n){n.form.receiptData.receivedVerification.manufacturerLot.verified=!n.form.receiptData.receivedVerification.manufacturerLot.verified},setDeliveryTicket(n,i){n.form.receiptData.receivedVerification.deliveryTicket.value=i.payload},toggleDeliveryTicketVerified(n){n.form.receiptData.receivedVerification.deliveryTicket.verified=!n.form.receiptData.receivedVerification.deliveryTicket.verified},setDateOfReceipt(n,i){n.form.receiptData.shelfLifeBasis.dateOfReceipt=i.payload},setReceiptPartExpireDate(n,i){n.form.catalogPartData.catalogPartShelfLifeVerification=n.form.catalogPartData.catalogPartShelfLifeVerification.map(d=>(d.id===i.payload.id&&(d.receiptPartExpireDate=i.payload.date),d))},toggleReceiptPartVerified(n,i){n.form.catalogPartData.catalogPartShelfLifeVerification=n.form.catalogPartData.catalogPartShelfLifeVerification.map(d=>(d.id===i.payload&&(d.verified=!d.verified),d))},toggleGhsLabelVerified(n,i){n.form.complianceChecks.ghsLabelRequirements.includes(i.payload)?n.form.complianceChecks.ghsLabelRequirements=n.form.complianceChecks.ghsLabelRequirements.filter(d=>d!==i.payload):n.form.complianceChecks.ghsLabelRequirements=[...n.form.complianceChecks.ghsLabelRequirements,i.payload]},toggleNonConformanceCodes(n,i){const d=n.form.complianceChecks.nonConformanceCodes.findIndex(T=>T.id===i.payload);n.form.complianceChecks.nonConformanceCodes[d].isApplied=!n.form.complianceChecks.nonConformanceCodes[d].isApplied},toggleSpecifications(n,i){const d=n.form.complianceChecks.specifications.findIndex(T=>T.id===i.payload.id);n.form.complianceChecks.specifications[d].verifiedCertificates.includes(i.payload.certificate)?n.form.complianceChecks.specifications[d].verifiedCertificates=n.form.complianceChecks.specifications[d].verifiedCertificates.filter(T=>T!==i.payload.certificate):n.form.complianceChecks.specifications[d].verifiedCertificates=[...n.form.complianceChecks.specifications[d].verifiedCertificates,i.payload.certificate]}},extraReducers:n=>{n.addMatcher(I.wU.endpoints.getReceipt.matchFulfilled,(i,{payload:d})=>{A(i,d)})}}),A=(n,i)=>{n.form.complianceChecks.ghsLabelRequirements?.length===0&&(n.form.complianceChecks.ghsLabelRequirements=i.quality?.ghsLabels.verified??[]),n.form.complianceChecks.nonConformanceCodes?.length===0&&(n.form.complianceChecks.nonConformanceCodes=i.quality?.nonConformanceCodes??[]),n.form.complianceChecks.specifications?.length===0&&(n.form.complianceChecks.specifications=i.quality?.specifications.map(d=>({id:d.purchasedSpecification.specificationRef.id,verifiedCertificates:d.latestVerifiedCertificates??[]}))??[])},{initializeQVRForm:L,setQVRForm:F,setSection:B,setStep:j,setSectionAndStep:fe,previousStep:ge,nextStep:he,toggleDescriptionVerified:Y,setInternalNote:ve,setExternalNote:k,uploadDocuments:q,deleteDocument:ye,restoreDocument:xe,setDocumentType:De,setDocumentName:Pe,setDocumentCompany:Ee,toggleQuantityReceivedVerified:Ie,setManufacturerLot:_,toggleManufacturerLotVerified:H,setDeliveryTicket:Ce,toggleDeliveryTicketVerified:ee,setDateOfReceipt:Se,setReceiptPartExpireDate:te,toggleReceiptPartVerified:Ae,toggleGhsLabelVerified:Re,toggleNonConformanceCodes:V,toggleSpecifications:oe}=C.actions,ne=C.reducer},5927:(v,p,e)=>{"use strict";e.d(p,{Lc:()=>u,qJ:()=>l,sA:()=>t,vB:()=>f});const t={InReceiving:"In Receiving",QaReady:"QA Ready",SentForReimaging:"Sent for Reimaging",PutAwayReady:"Put Away Ready"},l=[t.InReceiving,t.QaReady,t.SentForReimaging,t.PutAwayReady],f={All:"All",MyAssignments:"My Assignments",Unassigned:"Unassigned"},u=[f.All,f.MyAssignments,f.Unassigned]},137:(v,p,e)=>{"use strict";e.d(p,{$9:()=>D,Bu:()=>S,Ow:()=>h,RM:()=>E,ZP:()=>I,_e:()=>M,co:()=>N,ei:()=>b,kA:()=>y,lA:()=>z,n0:()=>W,pg:()=>m});var t=e(3841),l=e(5927);const f={operatingEntity:{selected:"",error:!1},distributionCenter:{selected:"",error:!1,inventoryGroups:{selected:[]}},statuses:{selected:[],error:!1},assignment:{selected:l.vB.All,error:!1},receiptIdSearchValue:void 0},u=(0,t.oM)({name:"inboundQuality",initialState:f,reducers:{setOperatingEntity:(s,c)=>({...s,operatingEntity:{...s.operatingEntity,selected:c.payload,error:!1},distributionCenter:{...s.distributionCenter,selected:"",inventoryGroups:{...s.distributionCenter.inventoryGroups}}}),setDistributionCenter:(s,c)=>({...s,distributionCenter:{...s.distributionCenter,selected:c.payload,error:!1,inventoryGroups:{...s.distributionCenter.inventoryGroups}}}),setInventoryGroups:(s,c)=>{s.distributionCenter.inventoryGroups.selected=c.payload},setStatuses:(s,c)=>{s.statuses.selected=c.payload,s.statuses.error=!1},setAssignment:(s,c)=>{s.assignment.selected=c.payload,s.assignment.error=!1},setReceiptIdSearchValue:(s,c)=>{s.receiptIdSearchValue=c.payload,s.isReceiptIdSearch=!0},setOperatingEntityError:(s,c)=>{s.operatingEntity.error=c.payload},setDistributionCenterError:(s,c)=>{s.distributionCenter.error=c.payload},setStatusesError:(s,c)=>{s.statuses.error=c.payload},setIsReceiptIdSearch:(s,c)=>{s.isReceiptIdSearch=c.payload},setReceiptIdSearchError:(s,c)=>{s.isReceiptIdSearchError=c.payload}}}),{setOperatingEntity:m,setDistributionCenter:h,setInventoryGroups:E,setStatuses:D,setAssignment:S,setReceiptIdSearchValue:y,setOperatingEntityError:M,setDistributionCenterError:W,setStatusesError:z,setIsReceiptIdSearch:b,setReceiptIdSearchError:N}=u.actions,I=u.reducer},7939:(v,p,e)=>{"use strict";e.d(p,{E:()=>t});const t=l=>!l||l.trim().length===0},2071:(v,p,e)=>{var t={"./ar_AE/translation.json":[6611,611],"./de_DE/translation.json":[9061,61],"./en_GB/translation.json":[9758,758],"./en_US/translation.json":[5916,916],"./fr_FR/translation.json":[6606,606],"./it_IT/translation.json":[1640,640],"./pl_PL/translation.json":[4778,778],"./tr_TR/translation.json":[6908,908],"./zh_CN/translation.json":[9871,871]};function l(f){if(!e.o(t,f))return Promise.resolve().then(()=>{var h=new Error("Cannot find module '"+f+"'");throw h.code="MODULE_NOT_FOUND",h});var u=t[f],m=u[0];return e.e(u[1]).then(()=>e.t(m,19))}l.keys=()=>Object.keys(t),l.id=2071,v.exports=l},7150:(v,p,e)=>{"use strict";v.exports=e.p+"bffc5e001d7d9eab09d5.png"}},v=>{var p=t=>v(v.s=t);v.O(0,[363,328,216],()=>p(5639));var e=v.O()}]);})();