mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 08:53:00 +08:00
1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
import{ao as ee,bD as Ue,ak as ue,d as ie,b0 as de,P as Se,a8 as Ae,r as b,U as O,A as pe,V as te,o as s,g as n,h as e,i as r,F as _,z as g,t as d,j as u,R as A,w as $,C,l as X,E as se,G as F,L as Te,ai as L,bE as Re,bF as Ee,_ as ce,an as We,aa as Ve,ad as De,B as Be,k as ae,y as E,H as le,D as Z,v as Ne,ah as Ie}from"./index-cd9e6ac8.js";import{F as re}from"./Button-11ddd444.js";import{h as j,o as P,a as K}from"./constants-99d18042.js";import{u as Me}from"./analysis-efb3ac18.js";import{t as je}from"./AuditLog-efe68260.js";function Pe(){const{withClientMutation:Y}=ue();return{unAssignSamples:async p=>{try{ee.fire({title:"Are you sure?",text:"You want to Un-Assign these analyses",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, Un-Assign now!",cancelButtonText:"No, cancel UnAssign!"}).then(async x=>{x.isConfirmed&&(await Y(Ue,p,"updateWorksheet").then(U=>{}),ee.fire("Its Happening!","Selected analyses have been UnAssigned.","success").then(U=>location.reload()))})}catch{}}}}const Ke=e("hr",null,null,-1),Oe={action:"post",class:"mt-4"},He={class:"flex justify-start items-center mr-4"},qe=e("span",{class:"text-gray-700"},"Worksheet Template",-1),Fe={class:"block mx-4"},Le=e("option",null,null,-1),Ye=["value"],Qe=e("hr",{class:"mt-4 mb-2"},null,-1),ze=e("h3",{class:"font-bold"},"Manual Analyses Assignment",-1),Ge=e("hr",{class:"mb-4 mt-2"},null,-1),Je={class:"overflow-x-auto mt-4"},Xe={action:"post",class:"p-1"},Ze={class:"flex justify-start mb-4"},et={class:"flex justify-between items-center"},tt=e("span",{class:"text-gray-700 mr-2"},"SampleType",-1),st=["value"],ot={class:"flex justify-between items-center ml-6"},nt=e("span",{class:"text-gray-700 mr-2"},"Analyses",-1),at=["value"],lt={class:"ml-6 mt-2"},rt={class:"overflow-x-auto mt-4"},it={class:"align-middle inline-block min-w-full shadow overflow-hidden bg-white shadow-dashboard px-2 pt-1 rounded-bl-lg rounded-br-lg"},dt={key:0,class:"py-4 text-center"},ct={key:1,class:"min-w-full"},ut={class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"},pt=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"},null,-1),ht=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"}," Sample ID ",-1),mt=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Analysis ",-1),yt=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Date Created ",-1),_t=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Date Received ",-1),bt=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Status ",-1),gt={class:"bg-white"},ft=["onUpdate:modelValue","onChange"],kt=e("td",{class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},null,-1),vt={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},xt={class:"text-sm leading-5 text-sky-800 font-semibold"},wt={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},$t={class:"text-sm leading-5 text-sky-800"},Ct={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Ut={class:"text-sm leading-5 text-sky-800"},St={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},At={class:"text-sm leading-5 text-sky-800"},Tt={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Rt={class:"text-sm leading-5 text-sky-800"},Et={class:"my-4"},Wt={action:"post",class:"mb-4"},Vt={class:"flex justify-start items-center mr-4"},Dt=e("span",{class:"text-gray-700"},"Apply QC Template",-1),Bt={class:"block mx-4"},Nt=e("option",null,null,-1),It=["value"],Mt=ie({__name:"WorkSheetAssign",setup(Y){const m=de(),p=Se(),x=Ae(),{withClientMutation:U}=ue(),T=b();m.fetchWorkSheetTemplates();const W=O(()=>m.getWorkSheet),f=O(()=>m.getWorkSheetTemplates),B=async()=>{try{ee.fire({title:"Are you sure?",text:"You want to apply this template to add samples?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, apply now!",cancelButtonText:"No, cancel apply!"}).then(c=>{c.isConfirmed&&U(Re,{worksheetUid:W?.value?.uid,templateUid:T.value},"updateWorksheetApplyTemplate").then(i=>{})})}catch{}};p.fetchAnalysesServices({first:void 0,after:"",text:"",sortBy:["name"]}),x.fetchSampleTypes(),p.fetchQCTemplates();const H=O(()=>p.getQCTemplates),k=b(void 0),v=pe({sampleTypeUid:void 0,analysisUid:void 0}),y=b(!1),V=O(()=>{const c=Q;return m.getAnalysisResults?.forEach(w=>{c?.some(R=>R.uid===w.uid)||c.push(w)}),c}),S=()=>{z(),m.fetchForWorkSheetsAssign({first:50,after:"",text:"",sortBy:void 0,...v})},N=()=>{const c=q();try{ee.fire({title:"Are you sure?",text:"You want to assign selected to worksheet?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, assign now!",cancelButtonText:"No, cancel apply!"}).then(i=>{i.isConfirmed&&U(Ee,{uid:W?.value?.uid,qcTemplateUid:k.value,analysesUids:c},"updateWorksheetApplyTemplate").then(w=>{})})}catch{}};let Q=[];function z(){let c=[];return V?.value?.forEach(i=>{i.checked&&c.push(i)}),Q=c,c}function q(){const c=z();let i=[];return c?.forEach(w=>i.push(w.uid)),i}function oe(c){ne()?y.value=!0:y.value=!1}function I(c){c.checked=!0}function G(c){c.checked=!1}async function J(){await V?.value?.forEach(c=>y.value?I(c):G(c))}function ne(){return V?.value?.every(c=>c.checked===!0)}return(c,i)=>{const w=te("motion-slide-right"),R=te("motion-slide-left");return s(),n(_,null,[e("section",null,[Ke,r((s(),n("form",Oe,[e("div",He,[qe,e("label",Fe,[r(e("select",{class:"form-select block w-full py-1","onUpdate:modelValue":i[0]||(i[0]=a=>T.value=a)},[Le,(s(!0),n(_,null,g(u(f),a=>(s(),n("option",{key:a.uid,value:a.uid},d(a.name),9,Ye))),128))],512),[[A,T.value]])]),r(e("button",{type:"button",onClick:i[1]||(i[1]=$(a=>B(),["prevent"])),class:"border border-sky-800 bg-sky-800 text-white rounded-sm px-2 py-1 transition-colors duration-500 ease select-none hover:bg-sky-800 focus:outline-none focus:shadow-outline"}," Apply Template ",512),[[C,j(K.CREATE,P.WORKSHEET)]])])])),[[w]])]),Qe,ze,Ge,e("div",Je,[r((s(),n("form",Xe,[e("div",Ze,[e("label",et,[tt,r(e("select",{name:"analyses_uids","onUpdate:modelValue":i[2]||(i[2]=a=>v.sampleTypeUid=a),class:"form-input mt-1 block w-full py-1"},[(s(!0),n(_,null,g(u(x).sampleTypes,a=>(s(),n("option",{key:a.uid,value:a.uid},d(a.name),9,st))),128))],512),[[A,v.sampleTypeUid]])]),e("label",ot,[nt,r(e("select",{name:"analyses_uids","onUpdate:modelValue":i[3]||(i[3]=a=>v.analysisUid=a),class:"form-input mt-1 block w-full py-1"},[(s(!0),n(_,null,g(u(p).analysesServices,a=>(s(),n("option",{key:a.uid,value:a.uid},d(a.name),9,at))),128))],512),[[A,v.analysisUid]])]),e("div",lt,[r(X(re,{onClick:i[4]||(i[4]=$(a=>S(),["prevent"])),color:"sky-800",class:"p-1"},{default:se(()=>[F("Apply Filters")]),_:1},512),[[C,!0]])])])])),[[R]])]),e("div",rt,[e("div",it,[u(m).fetchingAnalysisResults?(s(),n("div",dt,[X(Te,{message:"Fetching analytes ..."})])):(s(),n("table",ct,[e("thead",null,[e("tr",null,[e("th",ut,[r(e("input",{type:"checkbox",onChange:J,"onUpdate:modelValue":i[5]||(i[5]=a=>y.value=a)},null,544),[[L,y.value]])]),pt,ht,mt,yt,_t,bt])]),r((s(),n("tbody",gt,[(s(!0),n(_,null,g(u(V),a=>(s(),n("tr",{key:a?.uid},[e("td",null,[r(e("input",{type:"checkbox","onUpdate:modelValue":D=>a.checked=D,onChange:D=>oe()},null,40,ft),[[L,a.checked]])]),kt,e("td",vt,[e("div",xt,d(a?.sample?.sampleId),1)]),e("td",wt,[e("div",$t,d(a?.analysis?.name),1)]),e("td",Ct,[e("div",Ut,d(a?.sample?.createdAt),1)]),e("td",St,[e("div",At,d(a?.sample?.dateReceived),1)]),e("td",Tt,[e("div",Rt,d(a?.sample?.status),1)])]))),128))])),[[w]])]))])]),e("section",Et,[e("form",Wt,[e("div",Vt,[Dt,e("label",Bt,[r(e("select",{class:"form-select block w-full py-1","onUpdate:modelValue":i[6]||(i[6]=a=>k.value=a)},[Nt,(s(!0),n(_,null,g(u(H),a=>(s(),n("option",{key:a.uid,value:a.uid},d(a.name),9,It))),128))],512),[[A,k.value]])])])]),r(X(re,{onClick:$(N,["prevent"]),color:"orange-600"},{default:se(()=>[F("Assign Analyses")]),_:1},8,["onClick"]),[[C,!0]])])],64)}}}),jt=ce(Mt,[["__file","/home/aurthur/Development/Python/felicity/felicity-lims/webapp/views/worksheet/_id/WorkSheetAssign.vue"]]),Pt={class:""},Kt=e("hr",{class:"mt-4"},null,-1),Ot={class:"flex justify-between items-center"},Ht={for:"toggle",class:"text-medium text-gray-700 my-4"},qt={class:"relative inline-block w-10 mr-2 align-middle select-none transition duration-200 ease-in"},Ft=e("label",{for:"toggle",class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"},null,-1),Lt={action:"post",class:"p-1"},Yt={class:"flex justify-start items-center mb-4"},Qt={class:"flex justify-between items-center"},zt=e("span",{class:"text-gray-700 mr-2"},"Analyst",-1),Gt=["value"],Jt={class:"flex justify-between items-center ml-4"},Xt=e("span",{class:"text-gray-700 mr-2"},"Instrument",-1),Zt=["value"],es={class:"flex justify-between items-center ml-4"},ts=e("span",{class:"text-gray-700 mr-2"},"Method",-1),ss=["value"],os={class:"ml-6 mt-2"},ns=e("hr",{class:"mb-4"},null,-1),as={class:"overflow-x-auto"},ls={class:"align-middle inline-block min-w-full shadow overflow-hidden bg-white shadow-dashboard px-2 pt-1 rounded-bl-lg rounded-br-lg"},rs={class:"min-w-full"},is={class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"},ds=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"},null,-1),cs=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"}," Sample ID ",-1),us=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Analysis/Test ",-1),ps=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Instrument ",-1),hs=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Method ",-1),ms=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Interim ",-1),ys=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Result ",-1),_s=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Unit ",-1),bs=e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Status ",-1),gs={class:"bg-white"},fs=["onUpdate:modelValue","disabled"],ks={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},vs=e("i",{class:"fa fa-star"},null,-1),xs=[vs],ws={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},$s={class:"text-sm leading-5 text-gray-800 font-semibold"},Cs={key:1},Us={key:0},Ss={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},As={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Ts={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Rs={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Es={key:0,class:"text-sm leading-5 text-sky-800"},Ws={key:1,class:"block col-span-2 mb-2"},Vs=["onUpdate:modelValue","onChange"],Ds=e("option",{value:""},null,-1),Bs=["value"],Ns={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Is={key:0},Ms={key:1,class:"block"},js=["onUpdate:modelValue","onKeyup"],Ps={key:2,class:"block col-span-2 mb-2"},Ks=["onUpdate:modelValue","onChange"],Os=e("option",{value:""},null,-1),Hs=["value"],qs={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Fs={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Ls={type:"button",class:"bg-sky-800 text-white py-1 px-2 rounded-sm leading-none"},Ys={class:"my-4"},Qs=ie({__name:"WorkSheetResults",setup(Y){const m=de(),p=We(),x=Ve(),U=De();let T=b(!1),W=b(!1),f=b(!1),B=b(!1),H=b(!1),k=b(!1),v=b(!1),y=O(()=>m.getWorkSheet);const V=()=>{m.fetchWorksheetByUid(U.params.workSheetUid)};x.fetchUsers({}),p.fetchInstruments(),p.fetchMethods();const S=pe({analystUid:void 0,instrumentUid:void 0,methodUid:void 0}),N=b(!1),Q=()=>{N.value=!0,m.updateWorksheet({worksheetUid:U.params.workSheetUid,...S}).then(()=>{N.value=!1,V()})};function z(){return y.value?.analysisResults?.every(l=>l.checked===!0)}function q(){let l=[];return y.value?.analysisResults?.forEach(o=>{o.checked&&l.push(o)}),l}function oe(){z()?k.value=!0:k.value=!1,D()}function I(l){if(G(l)){J(l);return}l.checked=!0,D()}function G(l){return["retracted","approved"].includes(l.status)}function J(l){l.checked=!1,D()}function ne(){y?.value?.analysisResults?.forEach(l=>k.value?I(l):J(l)),D()}function c(l){l.editable=!0}function i(l){return l.status!=="pending"?!1:l?.editable||Ie(l?.result)?(c(l),!0):!1}function w(){let l=q(),o=[];return l?.forEach(M=>o.push({uid:M.uid,result:M.result})),o}function R(){const l=q();let o=[];return l?.forEach(M=>o.push(M.uid)),o}function a(l){switch(l?.status){case"retracted":return"bg-gray-300 text-sm italic text-gray-500";case"pending":return l?.retest===!0?"bg-sky-800 text-sm leading-5 text-sky-800":"";case"resulted":return l?.retest===!0?"bg-sky-800 text-sm leading-5 text-sky-800":"";case"approved":return l?.retest===!0?"bg-sky-800 text-sm leading-5 text-sky-800":"";default:return"text-sm leading-5 text-sky-800"}}function D(){T.value=!1,H.value=!1,W.value=!1,f.value=!1,B.value=!1;const l=q();l.length!==0&&(l.every(o=>o.status==="pending")&&(T.value=!0,H.value=!0),l.every(o=>o.status==="resulted")&&(W.value=!0,f.value=!0,B.value=!0))}const{submitResults:he,approveResults:me,retractResults:ye,retestResults:_e}=Me(),{unAssignSamples:be}=Pe(),ge=()=>be(R()),fe=()=>he(w(),"worksheet",y.value?.uid),ke=()=>me(R(),"worksheet",y.value?.uid),ve=()=>ye(R()),xe=()=>_e(R());return(l,o)=>{const M=Be("router-link"),we=te("motion-slide-left"),$e=te("motion-slide-right");return s(),n("div",Pt,[Kt,r((s(),n("div",Ot,[e("label",Ht,[F("More Sample Detail "),e("div",qt,[r(e("input",{type:"checkbox",name:"toggle",id:"toggle","onUpdate:modelValue":o[0]||(o[0]=t=>ae(v)?v.value=t:v=t),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer outline-none"},null,512),[[L,u(v)]]),Ft])]),r(e("form",Lt,[e("div",Yt,[e("label",Qt,[zt,r(e("select",{name:"instrument_uid","onUpdate:modelValue":o[1]||(o[1]=t=>S.analystUid=t),class:"form-input mt-1 block w-full py-1"},[(s(!0),n(_,null,g(u(x).users,t=>(s(),n("option",{key:t.uid,value:t.uid},d(t.firstName)+" "+d(t.lastName),9,Gt))),128))],512),[[A,S.analystUid]])]),e("label",Jt,[Xt,r(e("select",{name:"instrument_uid","onUpdate:modelValue":o[2]||(o[2]=t=>S.instrumentUid=t),class:"form-input mt-1 block w-full py-1"},[(s(!0),n(_,null,g(u(p).instruments,t=>(s(),n("option",{key:t.uid,value:t.uid},d(t.name),9,Zt))),128))],512),[[A,S.instrumentUid]])]),e("label",es,[ts,r(e("select",{name:"method_uid","onUpdate:modelValue":o[3]||(o[3]=t=>S.methodUid=t),class:"form-input mt-1 block w-full py-1"},[(s(!0),n(_,null,g(u(p).methods,t=>(s(),n("option",{key:t.uid,value:t.uid},d(t.name),9,ss))),128))],512),[[A,S.methodUid]])]),e("div",os,[X(re,{onClick:o[4]||(o[4]=$(t=>Q(),["prevent"])),color:"sky-800",class:"p-1"},{default:se(()=>[F("Apply")]),_:1})])])],512),[[C,!N.value]]),r(e("p",null,"updating ...",512),[[C,N.value]]),e("div",null,[e("button",{onClick:o[5]||(o[5]=$(t=>V(),["prevent"])),class:"px-1 py-1 mr-2 border-sky-800 border text-sky-800rounded-smtransition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"}," Refresh ")])])),[[we]]),ns,E(" Sampe Table View "),e("div",as,[e("div",ls,[e("table",rs,[e("thead",null,[e("tr",null,[e("th",is,[r(e("input",{type:"checkbox",class:"",onChange:o[6]||(o[6]=t=>ne()),"onUpdate:modelValue":o[7]||(o[7]=t=>ae(k)?k.value=t:k=t)},null,544),[[L,u(k)]])]),ds,cs,us,ps,hs,ms,ys,_s,bs,E(' <th class="px-1 py-1 border-b-2 border-gray-300"></th> ')])]),e("tbody",gs,[(s(!0),n(_,null,g(u(y)?.analysisResults,t=>r((s(),n("tr",{key:t.uid,class:le([a(t)])},[e("td",null,[r(e("input",{type:"checkbox",class:"","onUpdate:modelValue":h=>t.checked=h,onChange:o[8]||(o[8]=h=>oe()),disabled:G(t)},null,40,fs),[[L,t.checked]])]),e("td",ks,[t?.sample?.priority>0?(s(),n("span",{key:0,class:le(["font-small",{"text-orange-600":u(y)?.priority>1}])},xs,2)):E("v-if",!0)]),e("td",ws,[e("div",$s,[t?.sample?.analysisRequest?.patient?.uid?(s(),Z(M,{key:0,to:{name:"sample-detail",params:{patientUid:t?.sample?.analysisRequest?.patient?.uid,sampleUid:t?.sample?.uid}}},{default:se(()=>[F(d(t?.sample?.sampleId),1)]),_:2},1032,["to"])):(s(),n("div",Cs,d(t?.sample?.sampleId),1))]),u(v)?(s(),n("span",Us,[e("span",null,d(t?.sample?.qcLevel?.level),1),e("div",null,d(t?.sample?.analysisRequest?.patient?.firstName)+" "+d(t?.sample?.analysisRequest?.patient?.lastName),1),e("div",null,d(t?.sample?.analysisRequest?.client?.name),1)])):E("v-if",!0)]),e("td",Ss,[e("div",null,d(t?.analysis?.name),1)]),e("td",As,[e("div",null,d(t?.instrument?.name||"None"),1)]),e("td",Ts,[e("div",null,d(t?.method?.name||"None"),1)]),e("td",Rs,[!i(t)||(t?.analysis?.interims?.length??0)===0?(s(),n("div",Es," --- ")):(s(),n("label",Ws,[r(e("select",{class:"form-input mt-1 block w-full","onUpdate:modelValue":h=>t.result=h,onChange:h=>I(t)},[Ds,(s(!0),n(_,null,g(t?.analysis?.interims,(h,Ce)=>(s(),n("option",{key:h.key,value:h.value},d(h.value),9,Bs))),128))],40,Vs),[[A,t.result]])]))]),e("td",Ns,[i(t)?t?.analysis?.resultOptions?.length===0?(s(),n("label",Ms,[r(e("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":h=>t.result=h,onKeyup:h=>I(t)},null,40,js),[[Ne,t.result]])])):(s(),n("label",Ps,[r(e("select",{class:"form-input mt-1 block w-full","onUpdate:modelValue":h=>t.result=h,onChange:h=>I(t)},[Os,(s(!0),n(_,null,g(t?.analysis?.resultOptions,(h,Ce)=>(s(),n("option",{key:h.optionKey,value:h.value},d(h.value),9,Hs))),128))],40,Ks),[[A,t.result]])])):(s(),n("div",Is,d(t?.result),1))]),e("td",qs,[e("div",null,d(t?.analysis?.unit?.name||"---"),1)]),e("td",Fs,[e("button",Ls,d(t?.status||"unknown"),1)])],2)),[[$e]])),128))])])])]),e("section",Ys,[r(e("button",{onClick:o[9]||(o[9]=$(t=>ge(),["prevent"])),class:"px-2 py-1 mr-2 border-sky-800 border text-sky-800rounded-smtransition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"}," Un Assign ",512),[[C,j(K.CREATE,P.WORKSHEET)&&u(H)]]),r(e("button",{onClick:o[10]||(o[10]=$(t=>fe(),["prevent"])),class:"px-2 py-1 mr-2 border-sky-800 border text-sky-800rounded-smtransition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"}," Submit ",512),[[C,j(K.UPDATE,P.WORKSHEET)&&u(T)]]),r(e("button",{onClick:o[11]||(o[11]=$(t=>ve(),["prevent"])),class:"px-2 py-1 mr-2 border-sky-800 border text-sky-800rounded-smtransition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"}," Retract ",512),[[C,j(K.UPDATE,P.WORKSHEET)&&u(W)]]),r(e("button",{onClick:o[12]||(o[12]=$(t=>ke(),["prevent"])),class:"px-2 py-1 mr-2 border-sky-800 border text-sky-800rounded-smtransition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"}," Approve ",512),[[C,j(K.UPDATE,P.WORKSHEET)&&u(f)]]),r(e("button",{onClick:o[13]||(o[13]=$(t=>xe(),["prevent"])),class:"px-2 py-1 mr-2 border-sky-800 border text-sky-800rounded-smtransition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"}," Retest ",512),[[C,j(K.UPDATE,P.WORKSHEET)&&u(B)]])])])}}}),zs=ce(Qs,[["__file","/home/aurthur/Development/Python/felicity/felicity-lims/webapp/views/worksheet/_id/WorkSheetResults.vue"]]),Gs={class:""},Js={class:"col-span-12"},Xs={class:"bg-white shadow-md mt-2"},Zs={class:"-mb-px flex justify-start"},eo=["onClick"],to=ie({__name:"WorkSheetDetail",setup(Y){let m=de(),p=b("detail");const x=["detail","assign-samples","logs"],U=O(()=>m.getWorkSheet);return(T,W)=>(s(),n("div",Gs,[e("section",Js,[E(" Sample and Case Data "),e("nav",Xs,[e("div",Zs,[(s(),n(_,null,g(x,f=>e("a",{key:f,class:le(["no-underline text-gray-500 uppercase tracking-wide font-bold text-xs py-1 px-4 tab hover:bg-sky-600 hover:text-gray-200",{"tab-active":u(p)===f}]),onClick:B=>ae(p)?p.value=f:p=f,href:"#"},d(f),11,eo)),64))])]),e("div",null,[u(p)==="detail"?(s(),Z(zs,{key:0})):E("v-if",!0),u(p)==="assign-samples"?(s(),Z(jt,{key:1})):E("v-if",!0),u(p)==="logs"?(s(),Z(je,{key:2,targetType:"worksheet",targetId:u(U)?.uid},null,8,["targetId"])):E("v-if",!0)])])]))}}),ro=ce(to,[["__file","/home/aurthur/Development/Python/felicity/felicity-lims/webapp/views/worksheet/_id/WorkSheetDetail.vue"]]);export{ro as default};
|