mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 17:02:55 +08:00
1 line
4.7 KiB
JavaScript
1 line
4.7 KiB
JavaScript
import{f as $,d as l,c as B,v as h,aj as O,h as y,k as _,ag as r,x as e,y as m,D as i,u as s,B as x,_ as R}from"./_plugin-vue_export-helper-3f67fb71.js";import{a as j}from"./index-3189f120.js";import{aj as N}from"./billing-356772f3.js";import{u as E}from"./shipment-2ef796e7.js";import{b as n}from"./runtime-dom.esm-bundler-6e07ef74.js";const V={class:""},z={class:"bg-white rounded-sm shadow-sm hover:shadow-lg duration-500 px-4 py-4"},A={class:"grid grid-cols-12 gap-1"},F={class:"col-span-12 flex justify-between font-bold text-medium mb-2"},I={class:"flex"},U={class:"mr-10"},M={type:"button",class:"bg-sky-800 text-white px-2 py-1 rounded-sm leading-none"},T={class:"ml-2"},q={class:"absolute mt-4 py-0 bg-gray-300 rounded-sm shadow-xl z-20"},G={class:"col-span-12 sm:col-end-13 px-3 sm:px-0"},H=e("hr",null,null,-1),J={class:"grid grid-cols-2 mt-2"},K={class:"col-span-1"},P={class:"flex"},Q=e("span",{class:"text-gray-800 text-sm font-semibold w-1/6"},"External Laboratory",-1),W={class:"text-gray-600 text-sm md:text-md"},X={class:"flex"},Y=e("span",{class:"text-gray-800 text-md font-semibold w-1/6"},"Courier:",-1),Z={class:"text-gray-600 text-sm md:text-md"},ee={class:"flex"},te=e("span",{class:"text-gray-800 text-sm font-semibold w-1/6"},"Assigned Count:",-1),oe={class:"text-gray-600 text-sm md:text-md"},se={class:"col-span-1"},re={class:"flex"},ne=e("span",{class:"text-gray-800 text-sm font-semibold w-1/6"},"Comment:",-1),ae={class:"text-gray-600 text-sm md:text-md"},ie=$({__name:"Shipment",setup(de){const b=j(),p=N(),{actionShipment:f}=E();p.fetchReferralLaboratories(),p.fetchShipmentByUid(b.params.shipmentUid);const t=l(()=>p.getShipment),c=B({dropdownOpen:!1}),u=l(()=>!!["due"].includes(t?.value?.state?.toLowerCase())),g=l(()=>!!["preperation"].includes(t?.value?.state?.toLowerCase())),w=l(()=>!!["preperation","ready"].includes(t?.value?.state?.toLowerCase())),k=l(()=>!!["ready"].includes(t?.value?.state?.toLowerCase())),C=l(()=>!!["failed"].includes(t?.value?.state?.toLowerCase())),d=v=>{if(!t.value?.incoming&&!(t.value?.laboratory?.url&&t.value?.laboratory?.password&&t.value?.laboratory?.username&&t.value?.courier)){alert("The External Laboratory has missing information or the courier missing");return}f(t.value?.uid,v)};return(v,o)=>{const S=h("font-awesome-icon"),D=h("router-view"),L=O("motion-slide-top");return y(),_("div",V,[r((y(),_("div",z,[e("div",A,[m(" Meta Column "),e("div",F,[e("div",I,[e("h3",U,i(s(t)?.shipmentId),1),e("h3",null,i(s(t)?.incoming?"InBound":"OutBound"),1)]),e("div",null,[e("div",{onClick:o[0]||(o[0]=a=>c.dropdownOpen=!c.dropdownOpen),class:"hidden md:block md:flex md:items-center ml-2 mt-2"},[e("button",M,i(s(t)?.state||"unknown"),1),e("div",T,[x(S,{icon:"chevron-down",class:"text-gray-400"})])]),r(e("div",{onClick:o[1]||(o[1]=a=>c.dropdownOpen=!1),class:"fixed inset-0 h-full w-full z-10"},null,512),[[n,c.dropdownOpen]]),r(e("div",q,[r(e("div",{onClick:o[2]||(o[2]=a=>d("reject")),class:"no-underline text-gray-900 py-0 opacity-60 px-4 border-b border-transparent hover:opacity-100 md:hover:border-grey-dark hover:bg-sky-800 hover:text-white"}," Reject ",512),[[n,s(u)]]),r(e("div",{onClick:o[3]||(o[3]=a=>d("receive")),class:"no-underline text-gray-900 py-0 opacity-60 px-4 border-b border-transparent hover:opacity-100 md:hover:border-grey-dark hover:bg-sky-800 hover:text-white"}," Receive ",512),[[n,s(u)]]),r(e("div",{onClick:o[4]||(o[4]=a=>d("finalise")),class:"no-underline text-gray-900 py-0 opacity-60 px-4 border-b border-transparent hover:opacity-100 md:hover:border-grey-dark hover:bg-sky-800 hover:text-white"}," Finalise ",512),[[n,s(g)]]),r(e("div",{onClick:o[5]||(o[5]=a=>d("dispatch")),class:"no-underline text-gray-900 py-0 opacity-60 px-4 border-b border-transparent hover:opacity-100 md:hover:border-grey-dark hover:bg-sky-800 hover:text-white"}," Dispatch ",512),[[n,s(k)]]),r(e("div",{onClick:o[6]||(o[6]=a=>d("dispatch-now")),class:"no-underline text-gray-900 py-0 opacity-60 px-4 border-b border-transparent hover:opacity-100 md:hover:border-grey-dark hover:bg-sky-800 hover:text-white"}," Retry Notification ",512),[[n,s(C)]]),r(e("div",{onClick:o[7]||(o[7]=a=>d("cancel")),class:"no-underline text-gray-900 py-0 opacity-60 px-4 border-b border-transparent hover:opacity-100 md:hover:border-grey-dark hover:bg-sky-800 hover:text-white"}," Cancel ",512),[[n,s(w)]])],512),[[n,c.dropdownOpen]])])]),m(" Summary Column "),e("div",G,[H,e("div",J,[e("div",K,[m(" Client Details "),e("div",P,[Q,e("span",W,i(s(t)?.laboratory?.name),1)]),e("div",X,[Y,e("span",Z,i(s(t)?.courier),1)]),e("div",ee,[te,e("span",oe,i(s(t)?.assignedCount),1)])]),e("div",se,[e("div",re,[ne,e("span",ae,i(s(t)?.comment),1)])])])])])])),[[L]]),x(D)])}}}),ve=R(ie,[["__file","/home/aurthurm/Development/felicity-lims/webapp/views/shipment/_id/Shipment.vue"]]);export{ve as default};
|