1import{_ as V}from"./yYCBymCh.js";import{_ as O}from"./Bvv39AX0.js";import{_ as S}from"./qOuTkMOW.js";import{_ as T}from"./CIrO3U6B.js";import{_ as L}from"./DlAUqK2U.js";import{x as n,A as d,B as t,b as j,I as u,M as C,O as k,H as r,E as o,u as M,f as D,D as l,G as y,y as A,F as w}from"./DYriBPGp.js";import{_ as Y}from"./BdgbAsCU.js";import{_ as E}from"./DFx-0H1J.js";import{P as F,e as R,d as Z,W as q,N as W,O as z,o as G,p as f,_ as J,a as K}from"./Dd0Zzzml.js";import{_ as Q}from"./C2WZRva9.js";import{u as P}from"./CMF9CH8n.js";import{_ as U}from"./DQ9lX3sS.js";import"./DQPk8chx.js";import"./CB9b-SG5.js";const X={},$={width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tt(i,s){return n(),d("svg",$,[...s[0]||(s[0]=[t("path",{d:"M21 12.0607C21.0002 14.4268 20.0686 16.6979 18.4069 18.3823C16.7451 20.0667 14.4869 21.0289 12.1209 21.0607H12C9.70149 21.0664 7.48903 20.1868 5.82189 18.6044C5.7503 18.5367 5.69274 18.4556 5.65251 18.3656C5.61229 18.2757 5.59017 18.1787 5.58743 18.0802C5.58468 17.9817 5.60137 17.8836 5.63653 17.7915C5.67169 17.6995 5.72464 17.6152 5.79236 17.5436C5.86007 17.4721 5.94122 17.4145 6.03117 17.3743C6.12113 17.334 6.21813 17.3119 6.31663 17.3092C6.41513 17.3064 6.51321 17.3231 6.60527 17.3583C6.69732 17.3935 6.78155 17.4464 6.85314 17.5141C7.92545 18.5254 9.27197 19.1983 10.7245 19.4487C12.177 19.6992 13.6711 19.5161 15.0202 18.9223C16.3692 18.3286 17.5134 17.3505 18.3098 16.1102C19.1062 14.8699 19.5195 13.4225 19.4981 11.9487C19.4766 10.4749 19.0214 9.04009 18.1893 7.82352C17.3571 6.60695 16.1849 5.66254 14.8192 5.10827C13.4534 4.55401 11.9546 4.41446 10.51 4.70707C9.06538 4.99967 7.73901 5.71145 6.69658 6.75349C6.68892 6.76178 6.68078 6.7696 6.6722 6.77693L5.68408 7.68162L7.27782 9.27537C7.38428 9.37983 7.45718 9.51367 7.48719 9.65977C7.5172 9.80588 7.50297 9.95761 7.44631 10.0956C7.38965 10.2336 7.29314 10.3515 7.16911 10.4344C7.04508 10.5172 6.89917 10.5612 6.75001 10.5607H2.25001C2.0511 10.5607 1.86033 10.4817 1.71968 10.341C1.57903 10.2004 1.50001 10.0096 1.50001 9.81068V5.31068C1.49915 5.16194 1.54253 5.0163 1.62465 4.89228C1.70677 4.76826 1.82391 4.67145 1.96118 4.61417C2.09845 4.55689 2.24966 4.54172 2.39557 4.57059C2.54149 4.59946 2.67552 4.67107 2.78064 4.77631L4.62283 6.62318L5.64845 5.68568C6.90843 4.43059 8.51201 3.57693 10.2568 3.23246C12.0015 2.88799 13.8092 3.06815 15.4516 3.7502C17.0941 4.43225 18.4976 5.58561 19.4851 7.06469C20.4726 8.54377 20.9997 10.2823 21 12.0607Z",fill:"currentColor"},null,-1)])])}const st=L(X,[["render",tt]]),et={class:"ml-4 h-full overflow-y-clip"},ot={class:"mb-1 block text-xs text-[#737373]"},it={class:"mb-1 font-bold"},at={class:"max-w-[21rem] text-sm"},nt={class:"flex flex-wrap gap-2"},lt=["href"],rt=j({__name:"index",props:{list:{type:Array,default:()=>[]},showAll:{type:Boolean,default:!1}},setup(i){const s=P(),c=i,a=D(c,"list"),e=D(c,"showAll");return(g,v)=>{const b=Q;return n(),d("div",et,[t("ol",{class:u(["relative transition-all duration-200 ease-in-out",e.value?"max-h-[2000px]":"max-h-96"])},[(n(!0),d(C,null,k(a.value,(_,p)=>(n(),d("li",{key:p,class:u(["pl-6",[p===0?"border-s border-[#16A34A] pb-10 text-green-600":p>0&&p<a.value.length-1?"border-s border-gray-400 pb-10 text-gray-400":"pb-5 text-gray-400"]])},[r(b,{class:"absolute -start-[0.6rem] h-5 w-5 bg-white ring-2 ring-white"}),t("span",ot,o(M(s)(_.date).format("MMM DD, YYYY - hh:mm A")),1),t("h3",it,o(_.status),1),t("p",at,o(_.message),1),t("div",nt,[(n(!0),d(C,null,k(_.pods,(x,h)=>(n(),d("a",{key:x,href:x,target:"_blank",class:"max-w-[21rem] text-sm"}," POD-"+o(h+1),9,lt))),128))])],2))),128))],2)])}}}),dt={setup(){const{notify:i}=G(),{$api:s}=R(),c=P(),a=Z();return{notif:i,api:s,dayjs:c,router:a,getClassBadge:z,statusEN_IDMap:W,statusID_ENMap:q}},data(){return{isShowAll:!1,isLoadingModal:!1,detail:{order:{order_id:"",short_order_id:"",awb:"",created:"",source:"",status:""},trackings:[{date:"",status:"",message:""}],parcel:{service:"",cod:"",insured_value:"",quantity:0,weight:"",estimated_cost:"",savings:"",items:[{name:"",amount:"",quantity:0}]},destination:{name:"",phone_number:"",address:""},origin:{pic_name:"",phone_number:"",address:""}},labelsPerPage:null,labelsToPrint:[]}},async created(){await this.getDetail()},methods:{copyToClipboard(i){this.notif({title:"Link Coppied",type:"success",text:"Nomor AWB berhasil disalin"}),navigator.clipboard.writeText(i)},async getDetail(){this.isLoadingModal=!0;const{data:i,status:s}=await this.api.shipping.getDetailOrder((this._.provides[F]||this.$route).params.id);s==="success"&&(this.detail=i),this.isLoadingModal=!1},async printLabel(i,s="A4"){this.isLoadingModal=!0,this.textLoadingModal="Label sedang di proses, mohon menunggu";const c={id:this.detail.order.order_id,perpage:i,pageSize:s},{success:a,error:e}=await this.api.shipping.printLabelOrder(c);a||(console.error(e),this.notif({title:"Print Label Failed!",type:"error",text:"Silakan coba lagi, atau hubungi bantuan."})),this.isLoadingModal=!1},disablePrintButton(i,s){return!i||["created","paid","scheduled"].includes(s.toLowerCase())}}},ct=f("/icons/order-detail.svg"),gt=f("/icons/detail-tracking.svg"),_t=f("/icons/detail-product.
1svg"),pt=f("/icons/detail-penerima.svg"),mt=f("/icons/detail-sender.svg"),ut={class:"mb-6 flex items-center justify-between gap-2 rounded-2xl bg-white p-6"},ft={class:"flex items-center gap-2"},xt={class:"text-2xl font-medium text-gray-900"},bt={class:"mb-6 rounded-2xl bg-white p-6"},ht={class:"grid gap-2 md:grid-cols-3 lg:grid-cols-4"},yt={class:"grid gap-1"},wt={class:"font-bold text-gray-900"},Ct={class:"grid gap-1"},vt={class:"flex gap-1 font-bold text-gray-900"},kt=["innerHTML"],Dt={class:"grid gap-1"},Lt={class:"font-bold text-gray-900"},Mt={class:"grid gap-1"},At={class:"font-bold text-gray-900"},Pt={class:"mb-6 grid gap-6 rounded-2xl bg-white p-6 md:grid-cols-3"},Bt=["disabled"],Ht={class:"mb-6 rounded-2xl bg-white p-6"},Nt={class:"mb-6 rounded-2xl bg-white p-6"},It={class:"mb-2 grid gap-2 md:mb-6 md:grid-cols-3 lg:grid-cols-4"},Vt={class:"grid gap-1"},Ot={class:"font-bold text-gray-900"},St={class:"grid gap-1"},Tt={class:"flex gap-1 font-bold text-gray-900"},jt={class:"grid gap-1"},Yt={class:"font-bold text-gray-900"},Et={class:"grid gap-1"},Ft={class:"font-bold text-gray-900"},Rt={class:"grid gap-2 md:grid-cols-3 lg:grid-cols-4"},Zt={class:"grid gap-1"},qt={class:"font-bold text-gray-900"},Wt={class:"grid gap-1"},zt={class:"flex gap-1 font-bold text-gray-900"},Gt={class:"grid gap-1"},Jt={class:"font-bold text-gray-900"},Kt={class:"grid gap-1"},Qt={class:"font-bold text-gray-900"},Ut={class:"mb-6 rounded-2xl bg-white p-6"},Xt={class:"mb-6 grid grid-cols-2"},$t={class:"grid gap-1"},ts={class:"font-bold text-gray-900"},ss={class:"grid gap-1"},es={class:"flex gap-1 font-bold text-gray-900"},os={class:"grid gap-1"},is={class:"font-bold text-gray-900"},as={class:"mb-6 rounded-2xl bg-white p-6"},ns={class:"mb-6 grid grid-cols-2"},ls={class:"grid gap-1"},rs={class:"font-bold text-gray-900"},ds={class:"grid gap-1"},cs={class:"flex gap-1 font-bold text-gray-900"},gs={class:"grid gap-1"},_s={class:"font-bold text-gray-900"};function ps(i,s,c,a,e,g){const v=V,b=O,_=S,p=T,x=st,h=Y,B=E,H=J,N=rt,I=U;return n(),d(C,null,[r(v,{"is-show-modal":e.isLoadingModal,string:"Data sedang di proses, mohon menunggu."},null,8,["is-show-modal"]),t("div",ut,[t("div",ft,[t("button",{type:"button",class:"focus:outline-none",onClick:s[0]||(s[0]=m=>a.router.back())},[r(b,{class:"h-8 w-8"})]),t("h1",xt," Order Detail: "+o(e.detail.order.short_order_id),1)]),t("span",{class:u(a.getClassBadge(a.statusID_ENMap(e.detail.order.status)))},o(a.statusEN_IDMap(e.detail.order.status)),3)]),t("div",bt,[s[10]||(s[10]=t("h2",{class:"mb-6 flex gap-2 text-gray-900"},[t("img",{src:ct,alt:"Order Detail"}),l(" Order Detail ")],-1)),t("div",ht,[t("div",yt,[s[5]||(s[5]=t("h3",{class:"font-normal text-gray-600"},"Order ID",-1)),t("span",wt,o(e.detail.order.short_order_id),1)]),t("div",Ct,[s[7]||(s[7]=t("h3",{class:"font-normal text-gray-600"},"AWB",-1)),t("span",vt,[l(o(e.detail.order.awb===""?"Belum Tersedia":e.detail.order.awb)+" ",1),e.detail.order.awb?(n(),d("button",{key:0,class:"text-xs",onClick:s[1]||(s[1]=m=>g.copyToClipboard(e.detail.order.awb))},[...s[6]||(s[6]=[t("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M18.066 2.69824H13.828C13.027 2.69824 12.273 3.01024 11.707 3.57724L8.879 6.40524C8.312 6.97124 8 7.72524 8 8.52724V16.6982C8 17.8012 8.867 18.6982 9.934 18.6982H18.067C19.133 18.6982 20 17.8012 20 16.6982V4.69824C20 3.59524 19.133 2.69824 18.066 2.69824ZM13 5.11224V7.69824H10.414L13 5.11224ZM10 16.6982V9.69824H13C14.103 9.69824 15 8.80124 15 7.69824V4.69124L17.994 4.67224C17.994 4.67224 18 4.68024 18 4.69824L18.066 16.6982H10Z",fill:"#1F2A37"}),t("path",{d:"M14 19.6982V20.6982H6L5.999 8.69824H7V6.69824H6C4.897 6.69824 4 7.59524 4 8.69824V20.6982C4 21.8012 4.867 22.6982 5.934 22.6982H14.034C14.58 22.6982 15.091 22.4822 15.471 22.0892C15.832 21.7162 15.981 21.2332 15.995 20.6982L16 19.6982H14Z",fill:"#1F2A37"})],-1)])])):y("",!0),e.detail.order.awb===""?(n(),A(p,{key:1,id:"tooltips-awb"},{button:w(()=>[r(_,{class:"h-4 w-4 text-gray-900"})]),text:w(()=>[t("div",{class:"text-left",innerHTML:e.detail.order.awb_availability},null,8,kt)]),_:1})):y("",!0)])]),t("div",Dt,[s[8]||(s[8]=t("h3",{class:"font-normal text-gray-600"},"Order Dibuat",-1)),t("span",Lt,o(a.dayjs(e.detail.order.created).format("DD MMM YYYY hh:mm A")),1)]),t("div",Mt,[s[9]||(s[9]=t("h3",{class:"font-normal text-gray-600"},"Sumber",-1)),t("span",At,o(e.detail.order.source),1)])])]),t("div",Pt,[t("button",{class:"flik-button-outline flex items-center justify-center gap-1",onClick:s[2]||(s[2]=(...m)=>g.getDetail&&g.getDetail(...m))},[r(x,{class:"h-4 w-4"}),s[11]||(s[11]=l(" Perbarui Status ",-1))]),t("button",{class:u(["flex items-center justify-center gap-1",g.disablePrintButton(e.detail.order.awb,e.detail.order.status)?"flik-button-secondary":"flik-button-outline"]),disabled:g.disablePrintButton(e.detail.order.awb,e.detail.order.status),onClick:s[3]||(s[3]=m=>g.printLabel(1,"A6"))},[r(h,{class:"h-4 w-4"}),s[12]||(s[12]=l(" Cetak Label ",-1))],10,Bt),r(H,{to:"/bantuan",class:"flik-button-outline flex items-center justify-center gap-1"},{default:w(()=>[r(B,{class:"h-4 w-4"}),s[13]||(s[13]=l(" Bantuan ",-1))]),_:1})]),t("div",Ht,[s[14]||(s[14]=t("h2",{class:"mb-6 flex gap-2 text-2xl text-gray-900"},[t("img",{src:gt,alt:"Detail Pelacakan"}),l(" Detail Pelacakan ")],-1)),r(N,{list:e.detail.trackings,"show-all":e.isShowAll},null,8,["list","show-all"]),e.detail.trackings.length>3?(n(),d("button",{key:0,class:"flik-button-outline mt-5 flex w-full items-center justify-center gap-1",onClick:s[4]||(s[4]=m=>e.isShowAll=!e.isShowAll)},[l(" Muat lebih "+o(e.isShowAll?"sedikit":"banyak")+" ",1),r(I,{class:u(["h-4 w-4",e.isShowAll?"rotate-180":""])},null,8,["class"])])):y("",!0)]),t("div",Nt,[s[23]||(s[23]=t("h2",{class:"mb-6 flex gap-2 text-gray-900"},[t("img",{src:_t,alt:"Order Detail"}),l(" Detail Produk ")],-1)),t("div",It,[t("div",Vt,[s[15]||(s[15]=t("h3",{class:"font-normal text-gray-600"},"Layanan",-1)),t("span",Ot,o(e.detail.parcel.service),1)]),t("div",St,[s[16]||(s[16]=t("h3",{class:"font-normal text-gray-600"},"COD",-1)),t("span",Tt,o(e.detail.parcel.cod),1)]),t("div",jt,[s[17]||(s[17]=t("h3",{class:"font-normal text-gray-600"},"Nilai diasuransikan",-1)),t("span",Yt,o(e.detail.parcel.insured_value),1)]),t("div",Et,[s[18]||(s[18]=t("h3",{class:"font-normal text-gray-600"},"Isi Parcel/Nama Produk",-1)),t("span",Ft,o(e.detail.parcel.items[0].name),1)])]),t("div",Rt,[t("div",Zt,[s[19]||(s[19]=t("h3",{class:"font-normal text-gray-600"},"Jumlah (Quantity)",-1)),t("span",qt,o(e.detail.parcel.items[0].quantity),1)]),t("div",Wt,[s[20]||(s[20]=t("h3",{class:"font-normal text-gray-600"},"Berat (kg)",-1)),t("span",zt,o(e.detail.parcel.weight),1)]),t("div",Gt,[s[21]||(s[21]=t("h3",{class:"font-normal text-gray-600"},"Estimasi Biaya",-1)),t("span",Jt,o(e.detail.parcel.estimated_cost),1)]),t("div",Kt,[s[22]||(s[22]=t("h3",{class:"font-normal text-gray-600"},"Kamu Hemat",-1)),t("span",Qt,o(e.detail.parcel.savings),1)])])]),t("div",Ut,[s[27]||(s[27]=t("h2",{class:"mb-6 flex gap-2 text-gray-900"},[t("img",{src:pt,alt:"Detail Penerima"}),l(" Detail Penerima ")],-1)),t("div",Xt,[t("div",$t,[s[24]||(s[24]=t("h3",{class:"font-normal text-gray-600"},"Nama",-1)),t("span",ts,o(e.detail.destination.name),1)]),t("div",ss,[s[25]||(s[25]=t("h3",{class:"font-normal text-gray-600"},"Nomor Telepon",-1)),t("span",es,o(e.detail.destination.phone_number),1)])]),t("div",os,[s[26]||(s[26]=t("h3",{class:"font-normal text-gray-600"},"Alamat",-1)),t("span",is,o(e.detail.destination.address),1)])]),t("div",as,[s[31]||(s[31]=t("h2",{class:"mb-6 flex gap-2 text-gray-900"},[t("img",{src:mt,alt:"Detail Pengirim"}),l(" Detail Pengirim ")],-1)),t("div",ns,[t("div",ls,[s[28]||(s[28]=t("h3",{class:"font-normal text-gray-600"},"Nama",-1)),t("span",rs,o(e.detail.origin.pic_name),1)]),t("div",ds,[s[29]||(s[29]=t("h3",{class:"font-normal text-gray-600"},"Nomor Telepon",-1)),t("span",cs,o(e.detail.origin.phone_number),1)])]),t("div",gs,[s[30]||(s[30]=t("h3",{class:"font-normal text-gray-600"},"Alamat",-1)),t("span",_s,o(e.detail.origin.address),1)])])],64)}const ms=L(dt,[["render",ps]]),Ps={__name:"[id]",setup(i){return K({title:"Order Detail"}),(s,c)=>(n(),A(M(ms)))}};export{Ps 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.