PageSourceSearch

https://ops.shiptis.com/assets/Panel-3Fjbn7eC.js

js shiptis.com collected 2026-10-08 02:31:53 UTC 6,062 bytes, 1 lines download raw bytes

1import{A as e,J as t,et as n}from"./chunk-62JRHF6Z-CZLhzQUZ.js";import{t as r}from"./jsx-runtime-CI99cYnF.js";import{t as i}from"./Button-c-cm0uZL.js";import{t as a}from"./ArrowPathIcon-B_eyrG_x.js";import{t as o}from"./CheckCircleIcon-0agPviTs.js";import{t as s}from"./Sync-D20xjDf9.js";import{t as c}from"./SyncShipment-BuiD1NXx.js";var l=n(t(),1),u=r();function d({shipmentId:t}){let n=e(),r=e();(0,l.useEffect)(()=>{n.state===`idle`&&!n.data&&n.load(`/api/quickbooks/cadSync?shipmentId=${t}`)},[n,t]);let s=n.data;return(0,u.jsxs)(`div`,{className:`text-sm`,children:[s&&!s.isCad&&(0,u.jsx)(`div`,{children:`N/A`}),s&&s.isCad&&s.qbCadSync&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o,{width:16,className:`mr-1 inline-block align-text-bottom text-green-700`}),(0,u.jsxs)(`div`,{className:`mt-1 inline-block text-gray-700`,children:[`CAD synced `,s.qbCadSync]})]}),s&&s.isCad&&!s.qbCadSync&&(0,u.jsx)(`div`,{children:(0,u.jsxs)(i,{color:`secondary`,disabled:r.state!==`idle`,onClick:async()=>{window.confirm(`Are you sure you want to mark this as CAD synced?`)&&r.submit({shipmentId:t.toString()},{method:`post`,action:`/api/quickbooks/cadSync`})},children:[r.state!==`idle`&&(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{width:16,className:`mr-1 inline-block animate-spin align-text-bottom text-muted-foreground`}),(0,u.jsx)(`span`,{className:`text-gray-600`,children:`Syncing...`})]}),r.state===`idle`&&(0,u.jsx)(u.Fragment,{children:`Mark as CAD synced`})]})})]})}function f({shipment:e,qbAccounts:t}){let n=(0,l.useMemo)(()=>{let t=new Set;return e.branch.usdQbAccountId&&t.add(e.branch.usdQbAccountId),e.branch.cadQbAccountId&&t.add(e.branch.cadQbAccountId),t},[e.branch.usdQbAccountId,e.branch.cadQbAccountId]),r=(0,l.useMemo)(()=>[...t].sort((e,t)=>{let r=n.has(e.id),i=n.has(t.id);return r&&!i?-1:!r&&i?1:0}),[t,n]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`div`,{className:`space-y-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:py-5`,children:[(0,u.jsx)(`div`,{children:(0,u.jsxs)(`label`,{htmlFor:`accounts`,className:`block text-sm text-muted-foreground sm:mt-px sm:pt-2`,children:[e.branch.name,` Accounts`]})}),(0,u.jsxs)(`div`,{className:`pr-4 pt-2 sm:col-span-2 sm:pr-6`,children:[(0,u.jsxs)(`div`,{className:`mb-2 grid grid-cols-2 text-sm`,children:[(0,u.jsx)(`div`,{className:`text-muted-foreground`,children:`USD`}),(0,u.jsx)(`div`,{children:e.branch.usdQbAccountName})]}),(0,u.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,u.jsx)(`div`,{className:`text-muted-foreground`,children:`CAD`}),(0,u.jsx)(`div`,{children:e.branch.cadQbAccountName})]})]})]}),(0,u.jsxs)(`div`,{className:`space-y-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:py-5`,children:[(0,u.jsx)(`div`,{children:(0,u.jsx)(`label`,{htmlFor:`shipper`,className:`block text-sm text-muted-foreground sm:mt-px sm:py-2`,children:(0,u.jsx)(`div`,{children:`Sync All To Default Accounts`})})}),(0,u.jsx)(`div`,{className:`pt-1 sm:col-span-2`,children:(0,u.jsx)(c,{id:e.id})})]}),(0,u.jsxs)(`div`,{className:`space-y-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:py-5`,children:[(0,u.jsx)(`div`,{children:(0,u.jsxs)(`label`,{htmlFor:`shipper`,className:`block text-sm text-muted-foreground sm:mt-px sm:py-2`,children:[(0,u.jsx)(`div`,{children:`Shipper`}),e.shipper&&(0,u.jsx)(`div`,{className:`mt-2 text-foreground`,children:e.shipper.companyName})]})}),(0,u.jsx)(`div`,{className:`sm:col-span-2`,children:(0,u.jsx)(`div`,{className:`pb-5 pr-2 pt-2`,children:e.shipper&&(0,u.jsx)(u.Fragment,{children:r.filter(t=>t.currency===e.shipper.currency).map(t=>(0,u.jsx)(s,{quickbooksEntityType:`Customer`,id:e.shipper.id,qbAccountId:t.id,qbAccountName:t.accountName,defaultOpen:n.has(t.id),highlighted:n.has(t.id)},t.id))})})})]}),e.company&&(0,u.jsxs)(`div`,{className:`space-y-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:py-5`,children:[(0,u.jsx)(`div`,{children:(0,u.jsxs)(`label`,{htmlFor:`carrier`,className:`block text-sm text-muted-foreground sm:mt-px sm:pt-2`,children:[(0,u.jsx)(`div`,{children:`Carrier`}),e.company&&(0,u.jsx)(`div`,{className:`mt-2 text-foreground`,children:e.company.legalName})]})}),(0,u.jsx)(`div`,{className:`sm:col-span-2`,children:(0,u.jsx)(`div`,{className:`pb-5 pr-2 pt-2`,children:e.company&&(0,u.jsx)(u.Fragment,{children:r.filter(t=>t.currency===e.company.currency).map(t=>(0,u.jsx)(s,{quickbooksEntityType:`Vendor`,id:e.company.id,qbAccountId:t.id,qbAccountName:t.accountName,defaultOpen:n.has(t.id),highlighted:n.has(t.id)},t.id))})})})]}),(0,u.jsxs)(`div`,{className:`space-y-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:sp
1ace-y-0 sm:py-5`,children:[(0,u.jsx)(`div`,{children:(0,u.jsx)(`label`,{htmlFor:`shipper`,className:`block text-sm  text-muted-foreground sm:mt-px sm:pt-2`,children:`Invoice`})}),(0,u.jsx)(`div`,{className:`sm:col-span-2`,children:(0,u.jsx)(`div`,{className:`pb-5 pr-2 pt-2`,children:r.filter(t=>t.currency===e.shipperCurrency).map(t=>(0,u.jsx)(s,{quickbooksEntityType:`Invoice`,id:e.id,qbAccountId:t.id,qbAccountName:t.accountName,defaultOpen:n.has(t.id),highlighted:n.has(t.id)},t.id))})})]}),e.company&&(0,u.jsxs)(`div`,{className:`space-y-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:py-5`,children:[(0,u.jsx)(`div`,{children:(0,u.jsx)(`label`,{htmlFor:`shipper`,className:`block text-sm  text-muted-foreground sm:mt-px sm:pt-2`,children:`Bill`})}),(0,u.jsx)(`div`,{className:`sm:col-span-2`,children:(0,u.jsx)(`div`,{className:`pb-5 pr-2 pt-2`,children:r.filter(t=>t.currency===e.carrierCurrency).map(t=>(0,u.jsx)(s,{quickbooksEntityType:`Bill`,id:e.id,qbAccountId:t.id,qbAccountName:t.accountName,defaultOpen:n.has(t.id),highlighted:n.has(t.id)},t.id))})})]}),(0,u.jsxs)(`div`,{className:`space-y-1 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:py-5`,children:[(0,u.jsx)(`div`,{children:(0,u.jsx)(`label`,{htmlFor:`shipper`,className:`block text-sm  text-muted-foreground sm:mt-px sm:pt-2`,children:`CAD Sync`})}),(0,u.jsx)(`div`,{className:`sm:col-span-2`,children:(0,u.jsx)(`div`,{className:`pb-5 pr-2 pt-2`,children:e&&(0,u.jsx)(d,{shipmentId:e.id})})})]})]})}export{f as t};

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.