felicity-lims/felicity/templates/static/assets/FelAnalyisRequestListing-7535b7d3.js
2024-11-17 19:39:30 +02:00

1 line
5.2 KiB
JavaScript

import{d as S,aa as I,W as N,s as P,V as U,m as V,z as h,o as r,c as i,b as e,F as x,E as m,e as u,t as s,I as E,D as f,g as _,B as w,C as v,f as p,aG as L,j as B,_ as T,k as q}from"./index-e62f5c21.js";const j={class:"overflow-x-auto mt-4"},z={class:"align-middle inline-block min-w-full shadow overflow-hidden bg-white shadow-dashboard p-2 rounded-bl-sm rounded-br-sm"},G={class:"min-w-full"},M=e("thead",null,[e("tr",null,[e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"}),e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left leading-4 text-gray-800 tracking-wider"}," Sampe ID "),e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Test(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"}," Patient "),e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Client Patient ID "),e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Client "),e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Created "),e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Creator "),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 "),e("th",{class:"px-1 py-1 border-b-2 border-gray-300"})])],-1),O={class:"bg-gray-200"},W={colspan:"10",class:"px-1 py-1 whitespace-no-wrap border-b border-gray-400"},H={class:"flex items-center"},J={class:"text-sm leading-5 text-gray-800"},K={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Q=e("i",{class:"fa fa-star"},null,-1),X=[Q],Y={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Z={class:"flex items-center"},$={class:"font-semibold"},ee={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},te={class:"text-sm leading-5 text-sky-800"},se={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},ae={class:"text-sm leading-5 text-sky-800"},re={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},ie={class:"text-sm leading-5 text-sky-800"},oe={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},ne={class:"text-sm leading-5 text-sky-800"},de={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},le={class:"text-sm leading-5 text-sky-800"},ce={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},pe={class:"text-sm leading-5 text-sky-800"},ye={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},_e={type:"button",class:"bg-cyan-600 text-white p-1 rounded-sm leading-none"},ge={class:"px-1 py-1 whitespace-no-wrap text-right border-b border-gray-500 text-sm leading-5"},be={key:0,class:"py-4 text-center"},he=S({__name:"FelAnalyisRequestListing",props:{target:String,targetUid:String},setup(k){const R=B(()=>T(()=>import("./FelLoadingMessage-b4229f94.js"),["assets/FelLoadingMessage-b4229f94.js","assets/index-e62f5c21.js","assets/index-332ec99e.css"])),g=k,{targetUid:b,target:c}=I(g),o=N(),{analysisRequests:A,fetchingAnalysisRequests:C}=P(o);c?.value==="patient-samples"&&o.fetchAnalysisRequestsForPatient(b?.value),c?.value==="client-samples"&&o.fetchAnalysisRequestsForClient(b?.value),U(()=>g.targetUid,(d,y)=>{o.resetAnalysisRequests(),c?.value==="patient-samples"&&o.fetchAnalysisRequestsForPatient(d),c?.value==="client-samples"&&o.fetchAnalysisRequestsForClient(d)});function D(d,y){let n=[];return d.forEach(l=>n.push(l.name)),y.forEach(l=>n.push(l.name)),n.join(", ")}return(d,y)=>{const n=V("router-link"),l=h("motion-slide-left"),F=h("motion-slide-right");return r(),i("div",j,[e("div",z,[e("table",G,[M,(r(!0),i(x,null,m(p(A),a=>(r(),i("tbody",{class:"bg-white",key:a.uid},[u((r(),i("tr",O,[e("td",W,[e("div",H,[e("div",J,s(a.clientRequestId),1)])])])),[[l]]),(r(!0),i(x,null,m(a.samples,t=>u((r(),i("tr",{key:t.uid},[e("td",K,[t.priority??0<1?(r(),i("span",{key:0,class:E(["font-small",{"text-orange-600":t.priority??!0}])},[...X],2)):f("",!0)]),e("td",Y,[e("div",Z,[e("div",$,[_(n,{to:{name:"sample-detail",params:{patientUid:a.patient?.uid,sampleUid:t?.uid}}},{default:w(()=>[v(s(t.sampleId),1)]),_:2},1032,["to"])])])]),e("td",ee,[e("div",te,s(D(t.profiles??[],t.analyses??[])),1)]),e("td",se,[e("div",ae,s(a.patient?.firstName)+" "+s(a.patient?.lastName),1)]),e("td",re,[e("div",ie,s(a.patient?.clientPatientId),1)]),e("td",oe,[e("div",ne,s(a.client?.name),1)]),e("td",de,[e("div",le,s(p(L)(t?.createdAt)),1)]),e("td",ce,[e("div",pe,s(t?.createdBy?.firstName),1)]),e("td",ye,[e("button",_e,s(t.status),1)]),e("td",ge,[_(n,{to:{name:"sample-detail",params:{patientUid:a.patient?.uid,sampleUid:t?.uid}},class:"px-2 py-1 mr-2 border-sky-800 border text-sky-800 rounded-sm transition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"},{default:w(()=>[v("View")]),_:2},1032,["to"])])])),[[F]])),128))]))),128))]),p(C)?(r(),i("div",be,[_(p(R),{message:"Fetching Analysis Requests ..."})])):f("",!0)])])}}}),me=q(he,[["__file","/home/aurthurm/Documents/Development/felicity/felicity-lims/webapp/components/sample/FelAnalyisRequestListing.vue"]]);export{me as default};