1import{j as g,r as C,e as v,c as m,o,w as u,d as r,a as i,g as l,t as p,n as D,b as n,f,F as T,k as q,i as A,W as I,N as E}from"./app-CrgWC8i3.js";import{_ as W}from"./AppLayout-Bs5Qn_XX.js";import{_ as Y}from"./BackButton-B3XKudhM.js";import{_ as h}from"./CardLayout-DWbQcinY.js";import H from"./ProductShow-CzcwO53w.js";import{_ as J}from"./DefaultVars-DPBdnu6o.js";import Q from"./PackageVars-CDZLkUaK.js";import R from"./PricingSummary-lLeGj668.js";import X from"./PendingPackageNotice-B3I8gAse.js";import Z from"./CustomerShow-CICYC9t4.js";import ee from"./ShowActions-CJvBIEqa.js";import{_ as te}from"./PrimaryButton-BDLmBza3.js";import{_ as re}from"./PdfPrintModal-BPrvWZhh.js";import{_}from"./CopyButton-Cl6LMNhH.js";import{_ as z}from"./StatusBadge-SdJRDJYy.js";import{M as k}from"./MdrBadge-DcFS0SMF.js";import{e as ae}from"./alert-BGpb9tEC.js";import{u as oe}from"./useBulkShipment-D0vy8AZN.js";import{p as U,i as se,h as ie}from"./order-CbvFzUIJ.js";import"./DangerButton-dqWPMf1C.js";import"./BaseButton-DnUci74h.js";import"./plan-Cj2q9jdG.js";import"./addDays-Db2LM6jR.js";import"./MdrFormField-5FGt57Ds.js";import"./MdrDropdown-CSoKRDdf.js";import"./MdrDropdownItem-CaDNcIHZ.js";import"./MdrDivider-D8-fPntJ.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./status-FI5-xUc0.js";import"./index-BDyLRxKu.js";import"./index-DzM69MWB.js";import"./MdrModal-C5xuW1rF.js";import"./MdrCheckboxField-BpgIt0c0.js";import"./axios-BnDblX3W.js";import"./MdrSelect-BEl3C78v.js";import"./WarehouseDropdown-DJfw5aJB.js";import"./useCargoCompany-BOpZPMFb.js";import"./CardStepTitle-owCZN5ZG.js";import"./fields-CcL-t-Z3.js";import"./SecondaryButton-DEWlplMo.js";import"./partnerPricing-Ce4WWQ0J.js";const le={class:"flex flex-col gap-2 mb-4"},ne={class:"flex space-x-2 h-min items-center"},de={class:"flex xl:text-sm text-xs text-gray-400"},me={class:"lg:grid lg:grid-cols-5 xl:grid-cols-4 gap-4 space-y-4 lg:space-y-0 w-full"},ue={class:"lg:col-span-3 flex flex-col gap-4"},ce={class:"flex flex-col lg:col-span-2 xl:col-span-1 gap-4"},pe={class:"flex flex-col gap-3"},fe=["href"],ge={key:0,class:"flex flex-col"},xe={class:"text-sm"},ye={key:1,class:"flex flex-col"},ve={class:"inline-flex items-center gap-1.5 text-sm font-mono"},he={key:2,class:"flex flex-col"},_e={class:"inline-flex items-center gap-1.5 text-sm font-mono"},ke=["href"],be={class:"flex flex-col gap-3"},we={key:0,class:"flex flex-col"},Ve={class:"text-sm"},$e={class:"flex flex-col"},Se={class:"inline-flex items-center gap-1.5 text-sm font-mono"},Be={class:"flex flex-col divide-y divide-gray-100 dark:divide-neutral-700"},Ne=["href"],Ce={class:"flex flex-col gap-4"},yt={__name:"Show",props:{order:Object,siblingOrders:{type:Array,default:()=>[]}},setup(e){const c=e,b=g(()=>U(c.order)),x=g(()=>se(c.order)),w=g(()=>ie(c.order)),y=g(()=>!c.order.shipment_id&&!x.value&&!w.value),G=d=>U({sale_channel:c.order.sale_channel,platform_status:d.platform_status}),a=C({cargo_integration_id:0,warehouse_id:0,package_type:"",package_count:1,payor_type:"",payment_type:"",desi:null,kg:null,is_pay_at_door:c.order.payment_type==="cod",processing:!1}),V=g(()=>a.value.package_type==="document"||Number(a.value.desi)>0||Number(a.value.kg)>0),{statuses:O,processing:F,start:K}=oe(),$=C(null),L=()=>{var d;(d=$.value)==null||d.open(route("print-pdf",{shipments:[c.order.shipment.id]}),"barkod.pdf")},M=async()=>{var t;if(F.value||!y.value)return;a.value.processing=!0;const d=await K([c.order.id],{cargo_integration_id:a.value.cargo_integration_id,warehouse_id:a.value.warehouse_id,package_type:a.value.package_type,package_count:a.value.package_count,payor_type:a.value.payor_type,payment_type:a.value.payment_type,is_pay_at_door:a.value.is_pay_at_door,desi:a.value.desi});if(a.value.processing=!1,!d.length){ae({title:"Gönderi oluÅturulamadı",message:((t=O[c.order.id])==null?void 0:t.message)||"Gönderi oluÅturulamadı."});return}E.visit(route("shipment.show",{shipment:d[0],new:!0}))};return(d,t)=>{const P=v("printer-icon"),j=v("time-format"),S=v("arrow-top-right-on-square-icon");return o(),m(W,{title:"SipariÅler"},{default:u(()=>{var B,N;return[r("div",le,[r("div",ne,[i(Y,{link:d.route("order.index")},null,8,["link"]),r("p",null,"#"+p(e.order.platform_id||e.order.id),1),b.value?(o(),m(k,{key:0,class:D(x.value?"!bg-gray-100 !text-gray-600":"!bg-emerald-50 !text-emerald-700"),title:x.value?"Bu durumda gönderi oluÅturulamaz":""},{default:u(()=>[n(p(b.value),1)]),_:1},8,["class","title"])):e.order.shipment?l("",!0):(o(),m(k,{key:1,class:"!bg-gray-100 !text-gray-800"},{default:u(()=>
1[...t[4]||(t[4]=[n(" Gönderi OluÅturulmadı ",-1)])]),_:1})),((B=e.order.shipment)==null?void 0:B.status)==="non_processed"&&((N=e.order.shipment)!=null&&N.barcode)?(o(),m(te,{key:2,class:"!ml-auto",onClick:L},{default:u(()=>[i(P,{class:"w-4 h-4 mr-1.5"}),t[5]||(t[5]=n(" Barkod Yazdır ",-1))]),_:1})):l("",!0)]),r("div",de,[i(j,{date:e.order.created_at,showText:!0},null,8,["date"]),t[6]||(t[6]=n("  oluÅturuldu. ",-1))])]),r("div",me,[r("div",ue,[i(Z,{shipping:e.order.shipping_address,billing:e.order.billing_address,"order-id":e.order.id,editable:!e.order.sale_channel_id},null,8,["shipping","billing","order-id","editable"]),i(H,{lines:e.order.lines||[],subtotal:e.order.subtotal,tax:e.order.tax,discount:e.order.discount,total:e.order.total,currency:e.order.currency},null,8,["lines","subtotal","tax","discount","total","currency"]),y.value?(o(),m(Q,{key:0,modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=s=>a.value=s)},null,8,["modelValue"])):l("",!0)]),r("div",ce,[e.order.shipment?(o(),m(h,{key:0},{title:u(()=>[...t[7]||(t[7]=[n("Gönderi",-1)])]),default:u(()=>{var s;return[r("div",pe,[r("a",{href:d.route("shipment.show",e.order.shipment.id),title:"Gönderi detayına git",class:"inline-flex items-center gap-1.5 hover:opacity-80"},[i(z,{status:e.order.shipment.status},null,8,["status"]),i(S,{class:"w-4 h-4 text-gray-400"})],8,fe),(s=e.order.shipment.cargo_company)!=null&&s.title?(o(),f("div",ge,[t[8]||(t[8]=r("span",{class:"text-xs text-gray-400"}," Kargo Firması ",-1)),r("span",xe,p(e.order.shipment.cargo_company.title),1)])):l("",!0),e.order.shipment.barcode?(o(),f("div",ye,[t[9]||(t[9]=r("span",{class:"text-xs text-gray-400"},"Barkod",-1)),r("span",ve,[n(p(e.order.shipment.barcode)+" ",1),i(_,{variant:"icon",text:e.order.shipment.barcode,"icon-class":"size-4 text-gray-400 hover:text-primary-700"},null,8,["text"])])])):l("",!0),e.order.shipment.tracking_number&&e.order.shipment.tracking_number!==e.order.shipment.barcode?(o(),f("div",he,[t[10]||(t[10]=r("span",{class:"text-xs text-gray-400"},"Takip No",-1)),r("span",_e,[n(p(e.order.shipment.tracking_number)+" ",1),i(_,{variant:"icon",text:e.order.shipment.tracking_number,"icon-class":"size-4 text-gray-400 hover:text-primary-700"},null,8,["text"])])])):l("",!0),e.order.shipment.tracking_link?(o(),f("a",{key:3,href:e.order.shipment.tracking_link,target:"_blank",rel:"noopener",class:"inline-flex items-center gap-1 text-sm text-primary-700 hover:underline"},[t[11]||(t[11]=n(" Kargo Takip ",-1)),i(S,{class:"w-4 h-4"})],8,ke)):l("",!0)])]}),_:1})):w.value?(o(),m(h,{key:1},{title:u(()=>[...t[12]||(t[12]=[n("Kargo",-1)])]),default:u(()=>[r("div",be,[e.order.cargo_provider?(o(),f("div",we,[t[13]||(t[13]=r("span",{class:"text-xs text-gray-400"}," Kargo Firması ",-1)),r("span",Ve,p(e.order.cargo_provider),1)])):l("",!0),r("div",$e,[t[14]||(t[14]=r("span",{class:"text-xs text-gray-400"},"Takip No",-1)),r("span",Se,[n(p(e.order.cargo_tracking_number)+" ",1),i(_,{variant:"icon",text:e.order.cargo_tracking_number,"icon-class":"size-4 text-gray-400 hover:text-primary-700"},null,8,["text"])])])])]),_:1})):l("",!0),e.siblingOrders.length?(o(),m(h,{key:2},{title:u(()=>[...t[15]||(t[15]=[n("Bu SipariÅin DiÄer Paketleri",-1)])]),default:u(()=>[r("div",Be,[(o(!0),f(T,null,q(e.siblingOrders,s=>(o(),f("div",{key:s.id,class:"flex items-center justify-between gap-2 py-2.5 first:pt-0 last:pb-0"},[r("a",{href:d.route("order.show",s.id),class:"text-sm font-medium text-primary-700 hover:underline"}," Paket #"+p(s.platform_d_id||s.id),9,Ne),s.shipment?(o(),m(z,{key:0,status:s.shipment.status},null,8,["status"])):(o(),m(k,{key:1,class:"!bg-gray-100 !text-gray-600"},{default:u(()=>[n(p(G(s)),1)]),_:2},1024))]))),128))])]),_:1})):l("",!0),y.value?(o(),f(T,{key:3},[A(r("div",Ce,[i(J,{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=s=>a.value=s)},null,8,["modelValue"]),i(R,{modelValue:a.value,"onUpdate:modelValue":t[2]||(t[2]=s=>a.value=s)},null,8,["modelValue"]),i(ee,{modelValue:a.value,"onUpdate:modelValue":t[3]||(t[3]=s=>a.value=s),order:e.order,onCreateShipment:M},null,8,["modelValue","order"])],512),[[I,V.value]]),V.value?l("",!0):(o(),m(X,{key:0}))],64)):l("",!0)])]),i(re,{ref_key:"pdfModal",ref:$},null,512)]}),_:1})}}};export{yt as default};
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.