1(this["webpackJsonpweb-oms"]=this["webpackJsonpweb-oms"]||[]).push([[18],{1191:function(e,a,t){"use strict";t.r(a);var n=function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"filters"}],a=[{alias:null,args:[{kind:"Variable",name:"filters",variableName:"filters"}],concreteType:"LabelErrorLog",kind:"LinkedField",name:"labelErrorLogs",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"orderID",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"shipmentWarehouseID",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fulfillmentWarehouseID",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"waveNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cartonID",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"location",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"printerNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"customerCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"serviceMethod",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"LabelErrorSearchHelperQuery",selections:a,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"LabelErrorSearchHelperQuery",selections:a},params:{cacheID:"d0a1c10610e90e83188695fb52027969",id:null,metadata:{},name:"LabelErrorSearchHelperQuery",operationKind:"query",text:"query LabelErrorSearchHelperQuery(\n $filters: LabelErrorLogFilter!\n) {\n labelErrorLogs(filters: $filters) {\n id\n orderID\n shipmentWarehouseID\n fulfillmentWarehouseID\n waveNumber\n cartonID\n location\n printerNumber\n customerCode\n serviceMethod\n error\n createdAt\n }\n}\n"}}}();n.hash="8eda277ab547f338398dcb0c402a6da0",a.default=n},1192:function(e,a,t){"use strict";t.r(a);var n=function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"filters"}],a=[{alias:null,args:[{kind:"Variable",name:"filters",variableName:"filters"}],kind:"ScalarField",name:"exportLabelErrorLogs",storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"LabelErrorSearchHelperExportQuery",selections:a,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"LabelErrorSearchHelperExportQuery",selections:a},params:{cacheID:"eb357b8457ff9f8087bdf997343877d2",id:null,metadata:{},name:"LabelErrorSearchHelperExportQuery",operationKind:"query",text:"query LabelErrorSearchHelperExportQuery(\n $filters: LabelErrorLogFilter!\n) {\n exportLabelErrorLogs(filters: $filters)\n}\n"}}}();n.hash="0ad3c74e7986dd57e7d3d1e0bcfed8ca",a.default=n},1674:function(e,a,t){"use strict";t.r(a),t.d(a,"LabelErrorsRoute",(function(){return _}));var n,r,l=t(80),c=t(0),s=t(251),o=t(11),u=t(7),i=t(12),d=t(156),b=t(74),m=t(384),f=t(40),p=t(839),j=t(840),y=t(259),x=t(843),O=t(179),v=t(124),g=t(125),h=t(836),k=t(833),L=t(855),w=t(846),N=t(383),S=["inventoryLocation","printerNumber","customerCode","warehouseId","createdDate"],C=t(832),E=t(85),D=t(36),F=t(105),I=t(81),K=t(260),Q=t(65),A=void 0!==n?n:n=t(1191),H=void 0!==r?r:r=t(1192),P=t(1),T=function(e){var a=e.filters,t=Object(D.useQueryLoader)(H),n=Object(i.a)(t,2),r=n[0],l=n[1],o=Object(Q.a)("common").t;return Object(P.jsx)(c.Suspense,{fallback:Object(P.jsx)(I.a,{mode:"outline",size:"small",disabled:!0},"Exporting...")},Object(P.jsx)(E.a,{fallback:Object(P.jsx)(F.a,{message:o("oopsSomethingWentWrongWithTheExport"),isDismissable:!0})},r&&Object(P.jsx)(q,{queryRef:r})),Object(P.jsx)(I.a,{mode:"outline",size:"small",onClick:function(){return l(a,{fetchPolicy:"network-only"})}},Object(P.jsx)(s.a,{i18nKey:"common:exportCsv"})))},q=function(e){var a=e.queryRef,t=Object(D.usePreloadedQuery)(H,a).exportLabelErrorLogs,n=Object(c.useState)(!1),r=Object(i.a)(n,2),l=r[0],s=r[1],o=Object(Q.a)("common").t;return Object(c.useEffect)((function(){a&&s(!0)}
1),[a]),console.log("export",t),l?Object(P.jsx)(K.Modal,{title:o("dataExport"),buttonText:o("ok"),open:l,onClose:function(){return s(!1)},variant:"success"},Object(P.jsx)("div",null,o("dataExportQueued"))):null},R=["HJ Order Number","Fulfillment ID","Customer Code","Wave Number","Service","Printer Number","Created Date","Location","Error"],W=function(e){var a=e.queryRef,t=e.filters,n=Object(D.usePreloadedQuery)(A,a).labelErrorLogs;return Object(P.jsx)("div",{className:"mt-3 flow-root"},Object(P.jsx)("div",{className:"w-full flex justify-between mb-4"},Object(P.jsx)("h1",{className:"text-base font-semibold leading-6 text-gray-900"},"Label Error Logs"),Object(P.jsx)(T,{filters:{filters:t}})),Object(P.jsx)("div",{className:"table-responsive -mx-4 -my-2 overflow-x-auto overflow-y-auto sm:-mx-6 lg:-mx-8",style:{maxHeight:"80vh"}},Object(P.jsx)("div",{className:"inline-block min-w-full align-middle sm:px-6 lg:px-8"},Object(P.jsx)("table",{className:"table min-w-full divide-y divide-gray-300"},Object(P.jsx)("thead",{className:"border-b border-gray-300 bg-white bg-opacity-75 text-left text-sm text-gray-900 backdrop-blur backdrop-filter sticky top-0"},Object(P.jsx)("tr",null,R.map((function(e){return Object(P.jsx)("th",{key:e,scope:"col",className:"font-semibold py-3.5 pl-2 pr-3"},e)})))),Object(P.jsx)("tbody",{className:"bg-white"},n.map((function(e){return Object(P.jsx)("tr",{key:e.id,className:"even:bg-gray-50"},Object(P.jsx)("td",{className:"whitespace-nowrap py-4 pl-4 pr-3 font-medium text-gray-900 sm:pl-3"},e.shipmentWarehouseID),Object(P.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-gray-800"},Object(P.jsx)(v.a,{to:"orders/".concat(e.orderID),openNewTab:!0},e.fulfillmentWarehouseID)),Object(P.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-gray-800"},e.customerCode),Object(P.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-gray-800"},e.waveNumber),Object(P.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-gray-800"},e.serviceMethod),Object(P.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-gray-800"},e.printerNumber),Object(P.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-gray-800"},Object(P.jsx)(C.b,{datetime:e.createdAt})),Object(P.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-gray-800"},e.location),Object(P.jsx)("td",{className:"break-words whitespace-normal px-3 py-4 text-gray-800"},e.error))})))))))},V=function(e){var a=e.filters,t=Object(D.useQueryLoader)(A),n=Object(i.a)(t,2),r=n[0],s=n[1];return Object(c.useEffect)((function(){s(a)}),[a]),Object(P.jsx)(E.a,null,Object(P.jsx)(c.Suspense,{fallback:Object(P.jsx)(l.a,null)},r&&Object(P.jsx)(W,{queryRef:r,filters:a.filters})))},M=function(){var e=Object(p.a)({}),a=e.formFields,t=e.setFormFields,n=e.createInputChangeHandler,r=e.createSelectChangeHandler,l=e.createValueChangeHandler,C=Object(c.useState)({}),E=Object(i.a)(C,2),D=E[0],F=E[1],I=Object(f.useLocation)(),K=Object(j.a)(),Q=Object(O.a)(),A=Object(O.b)(),H=Object.values(a).includes(""),T=Object.keys(a),q=Object(y.c)({inventoryLocations:K}),R=Object(x.a)({inventoryLocations:K});Object(c.useEffect)((function(){var e=new URLSearchParams(I.search),a=Object(g.h)(e);Object(k.isEmpty)(Object.keys(a))?t({printerNumber:""}):t(a),F(a)}),[I]);var W=S.some((function(e){return!Object.keys(a).includes(e)}));return Object(P.jsx)("div",{className:"space-y-2 h-screen"},Object(P.jsx)(d.a,null,Object(P.jsx)("div",{className:"flex flex-col xl:max-w-[910px]"},Object(P.jsx)("div",{className:"opacity-75 font-semibold text-[17px] mb-4"},Object(P.jsx)(s.a,{i18nKey:"common:filter"})),Object(P.jsx)("div",{className:"space-y-6 sm:space-y-4"},T.map((function(e){var c;return Object(P.jsx)("div",null,Object(P.jsx)("div",{className:"flex flex-col sm:flex-row justify-between space-x-0 sm:space-x-2 space-y-2 sm:space-y-0 items-center"},Object(P.jsx)("div",{className:"w-full sm:w-[470px]"},Object(P.jsx)(b.a,{value:{value:e,label:Q(e)},handleChange:function(a){var n=a.value;t((function(a){return Object(h.d)(a,e,n)}))},options:S.map((function(e){return{label:Q(e),value:e}}))})),["inventoryLocation"].includes(e)&&Object(P.jsx)(b.a,{value:a[e]&&R(e,a[e]),handleChange:r(e),options:q(e),placeholder:A(e),className:"w-full"}),function(e){return["printerNumber","customerCode","warehouseId"].includes(e)}(e)&&Object(P.jsx)("div",{className:"flex items-center relative w-full"},Object(P.jsx)("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2"},Object(P.jsx)(L.a,{style:{color:"black",opacity:.6}})),Object(P.jsx)("input",{placeholder:A(e),value:null!==(c=a[e])&&void 0!==c?c:"",onCh
1ange:n(e),className:"w-full border border-[#DBDDDF] outline-none focus:outline-none focus:border-primary focus:ring-0 py-1.5 pl-8 pr-4 rounded-lg font-sans text-base leading-relaxed placeholder-black/60 placeholder:text-[12px]"})),function(e){return["createdDate"].includes(e)}(e)&&Object(P.jsx)(m.a,{handleChange:l(e),showTimeSelect:!1,required:!0,value:a[e]}),T.length>1&&Object(P.jsx)("button",{className:"text-black opacity-70 cursor-pointer hover:opacity-95",onClick:function(){return t((function(a){return delete a[e],Object(u.a)({},a)}))}},Object(P.jsx)(w.b,null))))})),Object(P.jsx)("button",{className:"text-black opacity-80 hover:opacity-95 pl-1 tracking-wide disabled:opacity-40 disabled:cursor-not-allowed",disabled:!W,onClick:function(){return t((function(e){var a=S.find((function(a){return!Object.keys(e).includes(a)}));return a?Object(u.a)(Object(u.a)({},e),{},Object(o.a)({},a,"")):e}))}},Object(P.jsx)("div",{className:"flex space-x-1 pr-6"},Object(P.jsx)(w.a,null),Object(P.jsx)(s.a,{parent:"span",i18nKey:"common:addFilter"})))),Object(P.jsx)("div",{className:"".concat(T.length>1&&"sm:pr-6"," space-y-4 sm:space-y-0 text-right space-x-2 flex flex-col-reverse justify-end sm:flex-row sm:items-center")},Object(P.jsx)("div",null,Object(P.jsx)("button",{className:"text-black opacity-80 hover:opacity-95 py-2 px-4 tracking-wide",onClick:function(e){e.preventDefault(),Object(v.d)("/dashboard/label-errors","")}},Object(P.jsx)(s.a,{parent:"span",i18nKey:"common:reset"}))),Object(P.jsx)("div",null,Object(P.jsx)("button",{className:"rounded-lg font-normal text-white bg-primary py-2.5 px-10 hover:bg-primary/80 tracking-wider disabled:bg-primary/40 disabled:cursor-auto",disabled:H,onClick:function(e){e.preventDefault();var t=a.inventoryLocation,n=a.printerNumber,r=a.customerCode,l=a.warehouseId,c=a.createdDate,s=new URLSearchParams;t&&s.set("inventory_location",t),n&&s.set("printer_number",n),r&&s.set("customer_code",r),l&&s.set("warehouse_id",l),c&&s.set("created_date",Object(g.b)(c)),Object(v.d)("/label-errors","?".concat(s.toString())),F(a)}},Object(P.jsx)("div",{className:"flex justify-center space-x-2"},Object(P.jsx)(s.a,{parent:"span",i18nKey:"common:search"}),Object(P.jsx)(N.a,null))))))),Object(P.jsx)(d.a,null,Object(P.jsx)(V,{filters:{filters:D}})))},_=function(){return Object(P.jsx)("div",{className:"h-screen space-y-6 py-2 px-2"},Object(P.jsx)("div",{className:"text-xl font-bold"},Object(P.jsx)(s.a,{i18nKey:"orders:labelErrorLogs"})),Object(P.jsx)(c.Suspense,{fallback:Object(P.jsx)(l.a,null)},Object(P.jsx)(M,null)))}},832:function(e,a,t){"use strict";t.d(a,"a",(function(){return b}));var n=t(0),r=t(43),l=t.n(r),c=t(157),s=t.n(c),o=t(158),u=t.n(o),i=t(334),d=t.n(i);l.a.extend(s.a),l.a.extend(u.a),l.a.extend(d.a);var b=Object(n.memo)((function(e){var a=e.datetime,t=e.format,n=void 0===t?"YYYY-MM-DD H:mm:ss z":t,r=l.a.utc(a);return r.isValid()?r.tz().format(n):"INVALID_DATE"}));a.b=b},836:function(e,a,t){"use strict";t.d(a,"b",(function(){return s})),t.d(a,"d",(function(){return o})),t.d(a,"e",(function(){return u})),t.d(a,"a",(function(){return i})),t.d(a,"c",(function(){return d}));var n=t(22),r=t(11),l=t(7),c=t(833),s=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},o=function(e,a,t){return Object.keys(e).reduce((function(n,c){return Object(l.a)(Object(l.a)({},n),c===a?Object(r.a)({},t,""):Object(r.a)({},c,e[c]))}),{})},u=function(e,a){var t;return null===(t=Object(c.find)(e,{id:a}))||void 0===t?void 0:t.name},i=function(e,a){return e?e.includes(a)?e:[].concat(Object(n.a)(e),[a]):[a]},d=function(e){return!["WILLCALL","REVIEW","PASSPORT","GLOBAL-E"].includes(e.toUpperCase())}},839:function(e,a,t){"use strict";t.d(a,"a",(function(){return s}));var n=t(11),r=t(7),l=t(12),c=t(0);function s(e){var a=Object(c.useState)(e),t=Object(l.a)(a,2),s=t[0],o=t[1];return{formFields:s,setFormFields:o,createInputChangeHandler:function(e){return function(a){var t="checkbox"===a.target.type?a.target.checked:a.target.value;o((function(a){return Object(r.a)(Object(r.a)({},a),{},Object(n.a)({},e,t))}))}},createSelectChangeHandler:function(e,a){return function(t){var l=Array.isArray(t)?t.map((function(e){return e.value})):a?t:t.value;o((function(a){return Object(r.a)(Object(r.a)({},a),{},Object(n.a)({},e,l))}))}},createToggleChangeHandler:function(e){return function(a){o((function(t){return Object(r.a)(Object(r.a)({},t),{},Object(n.a)({},e,a))}))}},createValueChangeHandler:function(e){return function(a){o((function(t){return Object(r.a)(Object(r.a)({},t),{},Object(n.a)({},e,a))}))}}}}},840:function(e,a,t){"use strict";t.d(a,"a",(function(){return l}));var n,r=t(36),l=function(){var e=Object(r.useLazyLoadQuery)(c,{});return(null===e||void 0===e?void 0:e.inventoryLocations)||[]},c=void 0!==n?n:n=t(845)},843:function(e,a,t){"use strict";t.d(a,"a",(function(){return b}));var n=t(389),r=t(387),l=t(388),c=t(0),s=t(65),o=t(390),u=t(391),i=t(259),d=t(179),b=function(e){var a=e.inventoryLocations,t=e.accounts,b=e.getSelectOptions,m=Object(s.a)().t,f=Object(o.a)(),p=Object(n.b)(),j=Object(d.d)(),y=Object(d.c)(),x=Object(r.a)(),O=Object(u.a)(),v=Object(l.a)();return Object(c.useCallback)((function(e,n){switch(e){case"accountSlug":return n.map((function(e){return t&&Object(i.a)(t).find((function(a){return a.value===e}))}));case"allAccountSlugs":return n.map((function(e){return t&&Object(i.a)(t,!0).find((function(a){return a.value===e}))}));case"slug":return t&&Object(i.a)(t).find((function(e){return e.value===n}));case"inventoryLocation":case"assignedInventoryLocation":case"suggestedInventoryLocation":case"receivingInventoryLocation":return a&&Object(i.b)(a).find((function(e){return e.value===n}));case"allInventoryLocations":return a&&Object(i.b)(a,!0).find((function(e){return e.value===n}));case"priority":case"shipperServicePriority":return{value:n,label:m("shipping:".concat(n))};case"rmaType":return n.map((function(e){return{value:e,label:p(e)}}));case"backorderPolicy":return n.map((function(e){return{value:e,label:x(e)}}));case"splitPolicy":return n.map((function(e){return{value:e,label:O(e)}}));case"routingPolicy":return n.map((function(e){return{value:e,label:v(e)}}));case"entryType":return n.map((function(e){return{value:e,label:e}}));case"orderType":return n.map((function(e){return{value:e,label:f(e)}}));
1case"rush":case"ormd":case"nonCompliance":return{value:n,label:"true"===n?"Yes":"No"};case"nonComplianceReasons":return n.map((function(e){return{value:e,label:e}}));case"reasonCode":return n.map((function(e){return{value:e,label:m("rmas:".concat(e))}}));case"tradePartner":return{value:n,label:j(n)};case"shippingInfo":case"orderShippingInfo":var r=(Array.isArray(n)?n:[n]).map((function(e){var a=e.provider,t=e.serviceLevel;return{label:"all"===t?"".concat(a," - ").concat(m("common:all")):"".concat(a," ").concat(y(t.toUpperCase())),value:{provider:a,serviceLevel:t}}}));return Array.isArray(n)?r:r[0];case"asnStatus":case"rmaStatus":case"inventoryStatus":return n.map((function(e){return{value:e,label:m("statuses:".concat(e))}}));case"billingStatus":return{value:n,label:m("billing:".concat(n))};case"status":return n.map((function(e){return{value:e,label:m("statuses:".concat(e.status.replaceAll(" ","")))}}));case"warehousePod":return b?b("warehousePod").flatMap((function(e){return e.options})).find((function(e){return e.value===n})):void 0;case"orderSourceShippingName":case"vas":case"productCategories":return n.map((function(e){return{value:e,label:e}}));case"productType":case"inventoryLevel":return{value:n,label:m("skus:".concat(n))};case"productTypes":case"skuTypes":return n.map((function(e){return{value:e,label:m("skus:".concat(e))}}));default:return{value:n,label:n}}}),[m,t,a,f,y])}},845:function(e,a,t){"use strict";t.r(a);var n=function(){var e=[{alias:null,args:null,concreteType:"InventoryLocation",kind:"LinkedField",name:"inventoryLocations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"shortCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"daysOff",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useLocationsQuery",selections:e,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"useLocationsQuery",selections:e},params:{cacheID:"00588faba7a7221a52df85c38fa53330",id:null,metadata:{},name:"useLocationsQuery",operationKind:"query",text:"query useLocationsQuery {\n inventoryLocations {\n id\n name\n shortCode\n daysOff\n }\n}\n"}}}();n.hash="8ba033b706c80ddbf20f5d8ff27eddbc",a.default=n}}]);
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.