1import{j as s}from"./jsx-runtime-DHesG5eV.js";import{aI as a,L as b,e as g,t as I,H as w}from"./index-CFbNN_S_.js";import{u as f}from"./store-Cj5UB0U0.js";import{c as v}from"./index-mMvBXwGX.js";import{t as A}from"./bundle-mjs-D696Ktp4.js";import{a as E}from"./carriers-Cv2ppFEQ.js";import{u as _}from"./util-DGk6BYvO.js";import{g as F}from"./errorMessage-F9bWgXDg.js";import{a as N}from"./index-Cv9WPQe9.js";import{u as S}from"./index-BvOfzxDr.js";import{S as R}from"./share-2-BXKhx6Yr.js";const P=r=>{const{className:e=""}=r,o=A("inline-block w-6 h-6 fill-black",e);return s.jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 10L15 5.88C15.113 5.42213 15.1212 4.94464 15.0237 4.4832C14.9263 4.02176 14.7259 3.5883 14.4374 3.2152C14.1489 2.84211 13.7799 2.53902 13.3578 2.3286C12.9357 2.11817 12.4716 2.00584 12 2L8.55 8.89C8.40478 9.18225 8.19058 9.43389 7.92676 9.62364C7.97398 9.73981 8 9.86687 8 10V22H17.5C17.9327 22 18.3538 21.8596 18.7 21.6C19.0462 21.3404 19.2988 20.9754 19.42 20.56L21.75 12.56C21.8369 12.2619 21.8533 11.9477 21.7977 11.6422C21.7422 11.3367 21.6163 11.0484 21.43 10.8C21.2437 10.5516 21.0021 10.35 20.7244 10.2111C20.4467 10.0723 20.1405 10 19.83 10H14ZM6 22V10H4C3.46957 10 2.96086 10.2107 2.58579 10.5858C2.21071 10.9609 2 11.4696 2 12V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H6Z"})})},T=()=>s.jsxs("svg",{className:"inline-block w-4 h-4 align-text-bottom",viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("circle",{cx:"128",cy:"128",r:"128",fill:"#F83F36"}),s.jsx("path",{d:` 2 M53 158 3 C54 166 58 174 64 177 4 L97 169 5 C101 168 102 164 100 159 6 L98 147 7 C109 143 121 141 132 141 8 C142 142 151 144 158 146 9 C160 150 159 155 156 159 10 C155 162 158 165 160 166 11 L166 172 12 L193 176 13 C199 177 203 171 203 165 14 C203 151 197 141 187 136 15 C172 129 153 125 135 124 16 C114 124 93 127 76 132 17 C65 136 58 141 57 147 18 L53 158 19 Z 20 `,fill:"white"}),s.jsx("path",{d:"M105 65L128 88L160 56",stroke:"white",strokeWidth:"11",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M139 56H160V77",stroke:"white",strokeWidth:"11",strokeLinecap:"round",strokeLinejoin:"round"})]}),$=r=>{const{interested_count:e=0,order_number:o=1,closed_number:n=0}=r;return!e&&o<=1?null:s.jsxs(g,{items:"center",gap:"sm",children:[e?s.jsxs(w,{size:"xs",shape:"rounded",variant:"light",children:[e," Interested"]}):null,o>1?s.jsxs("p",{className:"text-sm text-primary",children:[n,"/",o]}):null]})},k=r=>{if(!r.show)return null;const{size:e="sm"}=r;return s.jsx(w,{variant:"destructive",size:e,className:`${e==="xs"?"px-1":"px0.5"} [&_svg]:size-4`,children:s.jsx(T,{})})},y=r=>r.notes?s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("p",{className:"text-muted-foreground text-sm",children:"Notes:"}),s.jsx("p",{className:"font-medium",children:r.notes})]}):null,H=r=>`ðð Trucks required ðð %0A%0A#${r.id} ð ${r.truck_type_name} %0AFrom: ${r.source}%0ATo: ${r.destination} | ${r.material_type} %0A%0ACheers, %0ATeam OPENFR8, ${r.traffic_name}%0A${r.traffic_no}`,M=r=>{const{indent:e,size:o="sm",className:n}=r,l=m=>{m.stopPropagation();try{window.open(`${v.webUrls.whatsApp}${H(e)}`)}catch(u){const c=F(u);I.error("Share",{description:c||"Error! Sharing application not open"})}};return s.jsx(b,{variant:"ghost",size:o,ghostVariant:"success",onClick:l,className:n,children:s.jsx(R,{className:"size-4"})})},J=r=>{var i;const{indent:e,hideShare:o,detailPage:n}=r,l=N(),{dispatchFilter:m}=f(),[u]=S(),{id:c=null}=e||{},h=()=>{l(`./${c}`),m({type:"INDENTS",payload:`${u}`})},t=_.nullToUndefined({...e,created_at:e==null?void 0:e.created_at,expiry_at:e==null?void 0:e.expiry_at}),p=t!=null&&t.interested_count?Number(t==null?void 0:t.interested_count):0,d=(t==null?void 0:t.order_number)||1,x=s.jsx($,{interested_count:p,order_number:d,closed_number:t==null?void 0:t.closed_number}),j=s.jsxs(g,{items:"center",gap:"xs",children:[s.jsx(k,{show:!!((i=t==null?void 0:t.call_data)!=null&&i.partner_called_count)}),o?null:s.jsx(M,{indent:t})]}),C=()=>l(`${v.employee.shipper}/${t==null?void 0:t.shipper_id}`);return s.jsxs(a,{gotoIndent:n?void 0:h,gotoCustomer:t!=null&&t.shipper_id?C:void 0,indentData:t,routeSlot:x,footerSlot:j,indentSlot:n?s.jsx(y,{notes:t==null?void 0:t.notes}):void 0,className:"h-full",children:[s.jsx(a.Header,{}),s.jsx(a.Route,{}),s.jsx(a.Footer,{})]})},Q=r=>{const{indent:e,detailPage:o}=r,n=N(),{dispatchFilter:l}=f(),[m]=S(),{id:u,interested_count:c,order_number:h,closed_number:t}=e,p=()=>{n(`./${u}`),l({type:"INDENTS",payload:`${m}`})},d=_.nullToUndefined({...e,created_at:e==null?void 0:e.created_at,expiry_at:e==null?void 0:e.expiry_at}),x=s.jsx($,{interested_count:c?Number(c):0,order_number:h||1,closed_number:t});return s.jsxs(a,{gotoIndent:o?void 0:p,indentData:d,routeSlot:x,indentSlot:o?s.jsx(y,{notes:d==null?void 0:d.notes}):void 0,className:"h-full",children:[s.jsx(a.Header,{}),s.jsx(a.Route,{}),o?s.jsx(a.Slot,{}):null]})},X=r=>{const{indent:e,user:o,detailPage:n}=r,l=N(),{dispatchFilter:m}=f(),[u]=S(),{id:c,expiry_at:h,interested_count:t,call_data:p}=e,d=_.isExpired(h||""),x=!!(p!=null&&p.employee_called_count),j=()=>
20{l(`./${c}`),m({type:"INDENTS",payload:`${u}`})},C={carrier_id:o.company_id,carrier_name:o==null?void 0:o.company_name,carrier_contact:o==null?void 0:o.phone_number,shipper_company_id:e==null?void 0:e.shipper_id,indent_id:e.id,lead_channel_id:v.LEAD_CHANNEL.APP},i=_.nullToUndefined({...e,created_at:e==null?void 0:e.created_at,expiry_at:e==null?void 0:e.expiry_at,shipper_name:void 0,traffic_name:n||e==null?void 0:e.traffic_name}),L=s.jsxs(g,{items:"center",gap:"xs",children:[s.jsx(k,{show:x,size:"xs"}),Number(t)>0?s.jsx(b,{variant:"ghost",ghostVariant:"secondary",className:"[&_svg]:fill-secondary",children:s.jsx(P,{})}):s.jsx(E,{interestData:C,disabled:d,hide_label:!0})]});return s.jsxs(a,{gotoIndent:n?void 0:j,indentData:i,routeSlot:n?null:L,indentSlot:n?s.jsx(y,{notes:i==null?void 0:i.notes}):void 0,className:"h-full",children:[s.jsx(a.Header,{}),s.jsx(a.Route,{}),n&&(i!=null&&i.notes)?s.jsx(a.Slot,{className:"border-t"}):null]})};export{X as C,J as E,Q as S,P as T,M as a}; 21//# sourceMappingURL=indentCard-CcmQ_n9T.js.map
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.