PageSourceSearch

https://cdn.myijack.com/spa/client/index-CkOLWdtG.js

js myijack.com collected 2026-10-10 00:09:06 UTC 16,065 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="fcd6bf71-a70d-401a-9ba1-43ee23951748")}catch(e){}}();import{j as e,R as l}from"./vendor-charts-ZyOnrnOL.js";import{g as pe,T,d as J,B as K,al as me,$ as ue}from"./main-B0AbJiqc.js";import{gF as Y,h4 as L,h3 as A,gL as xe,gM as he,gN as ge,gO as fe,gP as je,gJ as g,h5 as B,gG as q,gH as X,gI as Z,h6 as S}from"./use-neutralize-inertia-scroll-Dx1arWFQ.js";import{ca as ye,gv as be,gw as we,ak as f,ai as $,cf as ee,g8 as C,gx as ke,gy as Ne,gz as Ee,gA as Te,gB as Ce,gC as Se,cQ as Oe,c1 as Me,cR as Re,gD as Pe,gE as De,gF as Fe,gG as Ie,cU as W,c2 as ve,cV as Le,a3 as Ae,gH as Be,gI as Ke,gJ as Ve,E as Ge,c3 as Ue,ef as _e,bL as ze,bM as Qe,m as $e,gK as We}from"./admin-BB-n6j3e.js";import{T as te,a as O}from"./toggle-group-C6tBnr8V.js";import{L as He}from"./list-B8Div5Uz.js";import{F as Je}from"./file-text-Cdzb35Cj.js";import{T as Ye}from"./dashboard-tab-styles-CzMOM8_f.js";import{S as qe}from"./settings-2-B7-0lLf_.js";import{G as Xe}from"./grid-3x3-Bip1WpwZ.js";import{A as Ze}from"./arrow-up-down-pX4P4MEr.js";import{F as et}from"./funnel-CiR7hksw.js";import{P as tt}from"./part-picker-inactive-matches-LzXFwbi6.js";import"./index-Da6jBqK0.js";import"./ijack-logo-yold39tW.js";import"./vendor-table-B1Yyu8Rd.js";import"./auth-DqTSZZIL.js";import"./shield-check-B_j1nm6b.js";import"./shield-C2laEIRp.js";import"./route-error-component-Dn3zQ4r8.js";import"./contactProtection-CndFIq8r.js";import"./lazyRouteComponent-ClkG6AAQ.js";import"./index-BusKJOfF.js";import"./coerce-CYWctWnj.js";import"./alert-dialog-BZB7c3lC.js";import"./card-BG9SBMsZ.js";import"./checkbox-DWnb-tjS.js";import"./table-IPAv69Xs.js";import"./resizable-columns-COk_u85N.js";import"./command-Ci7M6WEM.js";import"./word-search-BeDRgRlZ.js";import"./search-BUjJ73br.js";import"./chevrons-up-down-XYOIi_Y9.js";import"./trash-2-QK9fBpDK.js";import"./select-CQlzdH2C.js";import"./chevron-up-DdgQsJ9Z.js";import"./skeleton-BlBxCM49.js";import"./useWorkOrderCapabilities-rW7rIatj.js";import"./build-table-features-CMRYTL6D.js";import"./popover-drawer-Ksaw0ICI.js";import"./table-hooks-Du9eBx1E.js";import"./index.esm-C23rdHMP.js";import"./calendar-Dimu8Y5y.js";import"./mobile-table-grid-BsdlWVTI.js";import"./globe-D2-OAp5G.js";import"./map-pin-Du_QaBY-.js";import"./layout-grid-ljIGnqi4.js";import"./circle-question-mark-CJ27Cwf4.js";import"./circle-check-big-CDWBzGzk.js";import"./timer-CZHxXnpT.js";import"./switch-CsrzE3Gv.js";import"./kpi-tooltip-MgaMbrTi.js";import"./use-column-value-filter-DXXpiDY6.js";import"./arrow-up-BNOCRiqf.js";import"./arrow-down-C8yvvsCr.js";import"./eye-off-BQw8359p.js";import"./multi-select-D4Xi2Esz.js";import"./use-toast-uvFSCPZA.js";import"./clamped-cell-B-rTP6zc.js";import"./arrow-right-D36cU_Pv.js";import"./book-open-Djju37pn.js";import"./lock-open-B3SRG6pN.js";import"./cpu-BtlopiNX.js";import"./cloud-D2_c6ILZ.js";import"./circle-check-DMZO9JpY.js";import"./circle-x-DGieTuz7.js";import"./square-Br8IfbtZ.js";import"./play-B1JqSUgC.js";import"./chevrons-right-XoitNxzF.js";import"./settings-BDNFDYba.js";import"./trending-down-CizXzUad.js";import"./work-order-url-C1Ne-1-J.js";import"./encode-CcCT6psV.js";import"./package-search-GN0LQ7oO.js";import"./save-D8cq8kbG.js";import"./copy-BnjwhtY3.js";import"./useRouterState-Ccc6iPZm.js";import"./external-link-BeE8KK7A.js";import"./folder-open-BHQsF6d9.js";import"./undo-2-DARllCwL.js";import"./zap-Dh33E1eN.js";import"./circle-plus-DA2nmU6w.js";import"./phone-DhH9VxV8.js";import"./vendor-dnd-jxa_n4JX.js";import"./eye-DmTg29GK.js";import"./combobox-CvrXVS9K.js";import"./sparkles-BSXlS5Oz.js";import"./upload-CNozlDb8.js";import"./radio-group-DzUUcoGF.js";import"./circle-BeJcBHK0.js";import"./format-utils-Dlg4MQhJ.js";import"./arrow-left-SXMXTu9g.js";import"./layers-BMvAWEh2.js";import"./calculator-C-jDP4oU.js";import"./index-Bpxl-TLt.js";
1import"./square-pen-Z7kKvZ8v.js";import"./rotate-ccw-CdLVAGZB.js";import"./vendor-xlsx-bSqeFMvo.js";import"./smartphone-ISVWsOXI.js";import"./printer-De7uPfbs.js";import"./calendar-clock-Cc7TGe5a.js";import"./calendar-check-CTmGvV3W.js";import"./progress-DKrZ8IbP.js";function st(){const{data:s}=ue.useQuery("get","/v1/admin/work-order/types/"),o=We(s?.result??[]);return e.jsx("p",{className:"text-muted-foreground flex max-w-[200px] flex-wrap items-center gap-x-2 gap-y-0.5 text-[10px] sm:max-w-none",title:"The Type column shows what kind of order each row is. Use the Type filter in the Filters sidebar to narrow the grid to one kind.",children:o.map(({type:n,icon:i,label:m,className:d})=>e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(i,{className:J("h-3 w-3",d),"aria-hidden":"true"}),m]},n))})}function lr(){const s=be.useSearch(),o=Y(),n=s.layout??"table";return e.jsx(rt,{mode:"production",layout:n,onLayoutChange:i=>{i!==n&&o({to:"/work-orders/production",search:{...s.workOrderId!==void 0?{workOrderId:s.workOrderId}:{},...i==="timeline"?{layout:"timeline"}:{}},replace:!0})}})}function rt({mode:s,layout:o="table",onLayoutChange:n}){return e.jsx(ye,{children:e.jsx(pt,{mode:s,layout:o,...n?{onLayoutChange:n}:{}})})}const H="data-[state=on]:bg-ijack-green/15 data-[state=on]:ring-ijack-green gap-1.5 px-2.5 data-[state=on]:ring-2 data-[state=on]:ring-inset";function it({layout:s,onLayoutChange:o}){return e.jsxs(te,{type:"single",value:s,onValueChange:n=>{(n==="table"||n==="timeline")&&o(n)},variant:"outline",size:"sm","aria-label":"Production layout",children:[e.jsxs(O,{value:"table","aria-label":"Table",className:H,children:[e.jsx(Ye,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden @md/actions:inline",children:"Table"})]}),e.jsxs(O,{value:"timeline","aria-label":"Timeline",className:H,children:[e.jsx(Ve,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden @md/actions:inline",children:"Timeline"})]})]})}const nt=[{id:"master-list",label:"Master List",icon:He},{id:"quotes",label:"Quotes",icon:Je},{id:"production",label:"Production",icon:xe},{id:"procurement",label:"Procurement",icon:he},{id:"inventory",label:"Inventory",icon:ge},{id:"logistics",label:"Logistics",icon:fe},{id:"work-orders",label:"Work Orders",icon:je},{id:"change-orders",label:"Change Orders",icon:Ae}],ot={production:{title:"Production",description:"Confirmed orders by build configuration",route:"/work-orders/production"},procurement:{title:"Procurement",description:"Supplier purchase orders on order",route:"/work-orders/procurement"}};function at(){const{isMobile:s,setOpen:o,setOpenMobile:n}=$e(),i=f.useSelector(a=>a.context.filters),m=f.useSelector(a=>a.context.sidebarOpen),d=f.useActorRef(),c=(i.search!==""?1:0)+(i.workOrderId!==null?1:0)+(i.statusIds.length>0?1:0)+(i.workOrderTypeIds.length>0?1:0)+(i.customerIds.length>0?1:0)+(i.dateRanges.length>0?1:0)+(i.locationSearch!==null?1:0)+(i.modelSearch!==null?1:0)+(i.warrantyFilter!==null?1:0)+(i.serialNumberFilters&&i.serialNumberFilters.length>0?1:0);return e.jsxs(K,{variant:"outline",size:"sm",className:"relative gap-2",onClick:()=>{const a=!m;d.send({type:"setSidebarOpen",open:a}),s?n(a):o(a)},children:[e.jsx(et,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden @sm:inline",children:"Filters"}),c>0&&e.jsx("span",{className:"bg-primary text-primary-foreground absolute -top-1.5 -right-1.5 flex h-5 min-w-5 items-center justify-center rounded-full px-1 text-xs font-medium",children:c})]})}function lt(){const{isEditMode:s,toggleEditMode:o,hasPendingEdits:n,batchEditDisabled:i}=ee();return e.jsxs(g,{onClick:o,title:i?"Close all work-order panes to batch edit":void 0,className:s?"bg-ijack-green/15":"",children:[e.jsx(tt,{className:"h-4 w-4"}),e.jsx("span",{children:s?"Exit Batch Edit":"Batch Edit"}),n()&&e.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-orange-500"}),e.jsx(S,{children:"E"})]})}function se({cellSelectionEnabled:s,onSelectionModeChange:o,onRefresh:n,onResetSort:i,isSorted:m,isFullscreen:d,onToggleFullscreen:c,onOpenTableOptions:a}){return e.jsxs(e.Fragment,{children:[e.jsx(L,{children:"Table Settings"}),e.jsxs(A,{children:[e.jsxs(te,{type:"single",value:s?"cell":"row",onValueChange:u=>{u&&o(u==="cell")},variant:"outline",size:"sm",className:"w-full",children:[e.jsxs(O,{value:"cell","aria-label":"Cell selection",className:"data-[state=on]:bg-ijack-green/15 data-[state=on]:ring-ijack-green flex flex-1 items-center gap-1.5 data-[state=on]:ring-2 data-[state=on]:ring-inset",children:[e.jsx(Xe,{className:"h-4 w-4"}),e.jsx("span",{children:"Cell"})]}),e.jsxs(O,{value:"row","aria-label":"Row selection",className:"data-[state=on]:bg-ijack-green/15 data-[state=on]:ring-ijack-green flex flex-1 items-center gap-1.5 data-[state=on]:ring-2 data-[state=on]:ring-inset",children:[e.jsx(Ue,{className:"h-4 w-4"}),e.jsx("span",{children:"Row"})]})]}),e.jsx(B,{}),e.jsx(lt,{}),e.jsxs(g,{onClick:a,children:[e.jsx(_e,{className:"h-4 w-4"}),e.jsx("span",{children:"Table Options"})]}),e.jsx(g,{onClick:c,children:d?e.jsxs(e.Fragment,{children:[e.jsx(ze,{className:"h-4 w-4"}),e.jsx("span",{children:"Exit Full Screen"}),e.jsx(S,{children:"Esc"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Qe,{className:"h-4 w-4"}),e.jsx("span",{children:"Full Screen"}),e.jsx(S,{children:"F"})]})}),e.jsxs(g,{onClick:i,disabled:!m,children:[e.jsx(Ze,{className:"h-4 w-4"}),e.jsx("span",{children:"Reset Sort"})]}),e.jsxs(g,{onClick:n,children:[e.jsx(me,{className:"h-4 w-4"}),e.jsx("span",{children:"Refresh Table Data"}),e.jsx(S,{children:"R"})]})]})]})}function ct({cellSelectionEnabled:s,onSelectionModeChange:o,onRefresh:n,onResetSort:i,isSorted:m,isFullscreen:d,onToggleFullscreen:c,onOpenTableOptions:a,className:u}){return e.jsxs(q,{children:[e.jsx(X,{asChild:!0,children:e.jsxs(K,{variant:"outline",size:"sm",className:u,children:[e.jsx(qe,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Table settings"})]})}),e.jsx(Z,{align:"end",className:"w-56",children:e.jsx(se,{cellSelectionEnabled:s,onSelectionModeChange:o,onRefresh:n,onResetSort:i,isSorted:m,isFullscreen:d,onToggleFullscreen:c,onOpenTableOptions:a})})]})}function dt({children:s,className:o}){return e.jsxs(q,{children:[e.jsx(X,{asChild:!0,children:e.jsxs(K,{variant:"outline",size:"sm",className:o,children:[e.jsx(Ge,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"More options"})]})}),e.jsx(Z,{align:"end",className:"w-56",children:s})]})}function pt({mode:s,layout:o,onLayoutChange:n}){const i=we(),{canUseTimeline:m,effectiveLayout:d}
1=Te({mode:s,canSeeCalculatedDate:i,layout:o,hasLayoutHandler:n!=null}),c=f.useSelector(t=>t.context.entity),a=f.useSelector(t=>t.context.filters),u=f.useSelector(t=>t.context.sortModel),j=f.useActorRef(),b=$.useSelector(t=>t.context.entity),M=$.useActorRef(),{isEditMode:V,toggleEditMode:R}=ee(),h=Y(),G=pe(),y=ot[s],[w,re]=l.useState(!0),[x,P]=l.useState(!1),[ie,ne]=l.useState(0),[oe,D]=l.useState(!1),U=l.useRef(null);l.useEffect(()=>{c!==b&&j.send({type:"setEntity",entity:b})},[j,c,b]);const E=JSON.stringify(u)!==JSON.stringify(C),_=Ne[c],z=l.useMemo(()=>ke(a,_),[a,_]),ae=l.useMemo(()=>({currentEntity:b,currentView:s,isEditMode:V,cellSelectionEnabled:w,isFullscreen:x,isSorted:E}),[b,s,V,w,x,E]),F=l.useCallback(t=>{re(t)},[]),k=l.useCallback(()=>{if(ne(t=>t+1),d==="timeline"){const t=Ee(s);G.invalidateQueries({predicate:r=>r.queryKey.includes(t)}),T.success("Timeline data refreshed")}},[d,s,G]),le=l.useCallback(async()=>{const t=Ce(s),r=T.loading(`Exporting ${y.title.toLowerCase()}...`);try{const p=await fetch(`https://web-api.myijack.com${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filter:z,sortModel:u.length>0?u:null,limit:5e4,today:Se()}),credentials:"include"});if(!p.ok)throw new Error(`Export failed: ${p.status}`);const N=await p.blob(),Q=URL.createObjectURL(N),v=document.createElement("a");v.href=Q;const de=p.headers.get("Content-Disposition")?.match(/filename="(.+)"/);v.download=de?.[1]??`${y.title.toLowerCase()}-export.xlsx`,v.click(),URL.revokeObjectURL(Q),T.success("Excel file downloaded",{id:r})}catch{T.error("Failed to export to Excel",{id:r})}},[z,s,y.title,u]),I=l.useCallback(()=>{P(t=>!t)},[]);l.useEffect(()=>{const t=r=>{const p=document.activeElement,N=p instanceof HTMLInputElement||p instanceof HTMLTextAreaElement||p?.getAttribute("contenteditable")==="true";r.key==="f"&&!N&&!r.ctrlKey&&!r.metaKey&&!r.altKey&&(r.preventDefault(),P(!0)),r.key==="Escape"&&x&&(r.preventDefault(),P(!1)),r.key==="r"&&!N&&!r.ctrlKey&&!r.metaKey&&!r.altKey&&(r.preventDefault(),k()),r.key==="e"&&!N&&!r.ctrlKey&&!r.metaKey&&!r.altKey&&(r.preventDefault(),R())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[k,x,R]);const ce=l.useCallback(t=>{if(M.send({type:"setActiveView",view:t}),t!==s){if(t==="production"){h({to:"/work-orders/production"});return}if(t==="procurement"){h({to:"/work-orders/procurement"});return}if(t==="logistics"){h({to:"/work-orders/logistics"});return}if(t==="inventory"){h({to:"/work-orders/inventory",search:{view:"parts"}});return}h({to:"/work-orders",search:{view:t}})}},[s,h,M]);return e.jsx(Oe,{config:ae,onToggleBatchEdit:R,onToggleSelectionMode:F,onToggleFullscreen:I,onRefresh:k,onExportExcel:le,onResetSort:()=>j.send({type:"setSort",sortModel:C}),children:e.jsxs(Me,{isFullscreen:x,sidebar:e.jsx(Ke,{mode:s,onResetFilters:()=>{U.current?.scrollToTop(),h({to:y.route,replace:!0})}}),headerStart:e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx(at,{}),e.jsxs("div",{className:"hidden @xs:block",children:[e.jsxs("h1",{className:"flex items-center gap-1.5 text-base font-semibold sm:text-xl",children:[e.jsx("button",{type:"button",onClick:()=>{const t=c==="INC"?"CORP":"INC";M.send({type:"setEntity",entity:t}),j.send({type:"setEntity",entity:t})},className:"rounded p-0.5 transition-colors hover:bg-gray-100",title:`Switch to ${c==="INC"?"Corp":"Inc"}`,children:e.jsx(Be,{entity:c,className:"h-4 w-6"})}),y.title]}),e.jsx("p",{className:"text-muted-foreground text-[10px]",children:y.description}),e.jsx(st,{})]})]}),headerActions:e.jsxs("div",{className:"@container/actions flex w-full min-w-0 flex-wrap items-center justify-end gap-1.5 sm:gap-2",children:[e.jsx(Ie,{}),m&&n?e.jsx(it,{layout:d,onLayoutChange:n}):null,e.jsxs("div",{className:"hidden items-center gap-2 @lg:flex",children:[e.jsx(ct,{cellSelectionEnabled:w,onSelectionModeChange:F,onRefresh:k,onResetSort:()=>j.send({type:"setSort",sortModel:C}),isSorted:E,isFullscreen:x,onToggleFullscreen:I,onOpenTableOptions:()=>D(!0)}),e.jsx(W,{}),e.jsx(ve,{activeView:s})]}),e.jsx(Le,{}),e.jsxs(dt,{className:"@lg:hidden",children:[e.jsx(L,{className:"text-xs text-gray-500",children:"Views"}),e.jsx(A,{children:nt.map(t=>{const r=t.icon,p=t.id===s;return p?e.jsxs(g,{className:J("flex items-center gap-2",p&&"bg-ijack-green/15 ring-2 ring-ijack-green ring-inset"),children:[e.jsx(r,{className:"h-4 w-4"}),e.jsx("span",{className:"flex-1",children:t.label}),e.jsx("span",{className:"text-primary text-xs font-medium",children:"Active"})]},t.id):e.jsxs(g,{onClick:()=>ce(t.id),className:"flex items-center gap-2",children:[e.jsx(r,{className:"h-4 w-4"}),e.jsx("span",{className:"flex-1",children:t.label})]},t.id)})}),e.jsx(B,{}),e.jsx(L,{className:"text-xs text-gray-500",children:"Corporate Entity"}),e.jsx(A,{children:e.jsx("div",{className:"flex w-full items-start justify-start px-2",children:e.jsx(W,{})})}),e.jsx(B,{}),e.jsx(se,{cellSelectionEnabled:w,onSelectionModeChange:F,onRefresh:k,onResetSort:()=>j.send({type:"setSort",sortModel:C}),isSorted:E,isFullscreen:x,onToggleFullscreen:I,onOpenTableOptions:()=>D(!0)})]})]}),children:[e.jsx(Re,{}),e.jsx(Pe,{open:oe,onOpenChange:D}),d==="timeline"?e.jsx(De,{}):e.jsx(Fe,{mode:s,cellSelectionEnabled:w,isFullscreen:x,refreshNonce:ie,tableHandleRef:U})]})})}export{rt as ProductionPageWithBulkEdit,lr as component};
2
3//# chunkId=fcd6bf71-a70d-401a-9ba1-43ee23951748

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.