mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 08:53:00 +08:00
1 line
9.9 KiB
JavaScript
1 line
9.9 KiB
JavaScript
import{d as B,aL as P,L as M,r as w,D as y,C as x,V as v,o as p,c as m,b as s,F as U,p as L,y as R,f as o,i as O,t as g,e as n,v as d,ac as E,E as V,w as S,x as A,ad as r,bx as F,by as j,O as $,k as q}from"./index-2a6c9271.js";const I={class:"w-full mt-8 pl-4"},Q={class:"bg-white shadow-md mt-2"},W={class:"-mb-px flex justify-start"},Y=["onClick"],z={key:0,class:"pt-4"},G={action:"post"},H={class:"grid grid-cols-2 gap-x-4 mb-4"},J={class:"block col-span-1 mb-2"},K=s("span",{class:"text-gray-700"},"Laboratory Name",-1),X=["disabled"],Z={class:"block col-span-1 mb-2"},ss=s("span",{class:"text-gray-700"},"Tag Line",-1),es=["disabled"],ls={class:"block col-span-1 mb-2"},ts=s("span",{class:"text-gray-700"},"Lab Manager",-1),os={class:"w-full"},as=["disabled"],ns=s("option",null,null,-1),is=["value"],ds={class:"block col-span-1 mb-2"},cs=s("span",{class:"text-gray-700"},"Laboratory Email",-1),rs=["disabled"],bs={class:"block col-span-1 mb-2"},us=s("span",{class:"text-gray-700"},"CC Emails",-1),ps=["disabled"],ms={class:"block col-span-1 mb-2"},_s=s("span",{class:"text-gray-700"},"Lab Mobile Phone",-1),hs=["disabled"],ys={class:"block col-span-1 mb-2"},gs=s("span",{class:"text-gray-700"},"Lab Bunsiness Phone",-1),fs=["disabled"],ks={class:"block col-span-1 mb-2"},ws=s("span",{class:"text-gray-700"},"Address",-1),xs=["disabled"],vs={class:"block col-span-1 mb-2"},Us=s("span",{class:"text-gray-700"},"Banking Details",-1),Ls=["disabled"],Vs={class:"block col-span-1 mb-2"},Ss=s("span",{class:"text-gray-700"},"Quality Statemnt",-1),As=["disabled"],Cs=s("hr",null,null,-1),Ns={key:1,class:"pt-4"},Ts={action:"post"},Ds={class:"grid grid-cols-2 gap-x-4 mb-4"},Bs={class:"block col-span-1 mb-2"},Ps=s("span",{class:"text-gray-700"},"Default Landing Page",-1),Ms=["disabled"],Rs={class:"block col-span-1 mb-2"},Os=s("span",{class:"text-gray-700"},"Default Theme",-1),Es=["disabled"],Fs={class:"block col-span-1 mb-2"},js=s("span",{class:"text-gray-700"},"Password Lifetime (days)",-1),$s=["disabled"],qs={class:"block col-span-1 mb-2"},Is=s("span",{class:"text-gray-700"},"Inactivity Auto Logout (minutes)",-1),Qs=["disabled"],Ws={class:"block col-span-1 mb-2"},Ys=s("span",{class:"text-gray-700 ml-3"},"Default Sticker copies",-1),zs=["disabled"],Gs=s("span",{class:"block col-span-1 mb-2"},null,-1),Hs={class:"block col-span-1 mb-2"},Js=["disabled"],Ks=s("span",{class:"text-gray-700 ml-3"},"Allow self verificaion",-1),Xs={class:"block col-span-1 mb-2"},Zs=["disabled"],se=s("span",{class:"text-gray-700 ml-3"},"Allow patient registration",-1),ee={class:"block col-span-1 mb-2"},le=["disabled"],te=s("span",{class:"text-gray-700 ml-3"},"Allow sample registration",-1),oe={class:"block col-span-1 mb-2"},ae=["disabled"],ne=s("span",{class:"text-gray-700 ml-3"},"Allow worksheet creation",-1),ie={class:"block col-span-1 mb-2"},de=["disabled"],ce=s("span",{class:"text-gray-700 ml-3"},"Auto receive samples",-1),re=s("span",{class:"block col-span-1 mb-2"},null,-1),be={class:"block col-span-1 mb-2"},ue=["disabled"],pe=s("span",{class:"text-gray-700 ml-3"},"Allow Billing",-1),me={class:"block col-span-1 mb-2"},_e=["disabled"],he=s("span",{class:"text-gray-700 ml-3"},"Allow Auto Billing",-1),ye={class:"block col-span-1 mb-2"},ge=s("span",{class:"text-gray-700 ml-3"},"Currency",-1),fe=["disabled"],ke={class:"block col-span-1 mb-2"},we=s("span",{class:"text-gray-700 ml-3"},"Payment Terms (Days)",-1),xe=["disabled"],ve=s("hr",null,null,-1),Ue=B({__name:"Laboratory",setup(Le){const f=P(),b=M(),{withClientMutation:k}=$();let u=w("general-info");const C=["general-info","other-settings"];let a=w(!1);b.fetchLaboratory();const _=y(()=>b.getLaboratory),i=x({..._.value});v(()=>_.value?.uid,(c,l)=>Object.assign(i,_.value));const N=()=>{const c={...i};delete c.uid,delete c.__typename,c.labManagerUid=c.labManagerUid,k(F,{uid:i.uid,payload:c},"updateLaboratory").then(l=>b.updateLaboratory(l))};b.fetchLaboratorySetting();const h=y(()=>b.getLaboratorySetting),t=x({...h.value});v(()=>h.value?.uid,(c,l)=>Object.assign(t,h.value));const T=()=>{const c={...t};delete c.uid,delete c.__typename,k(j,{uid:t.uid,payload:c},"updateLaboratorySetting").then(l=>b.updateLaboratorySetting(l))};f.fetchUsers({});const D=y(()=>f.getUsers);return(c,l)=>(p(),m("div",I,[s("nav",Q,[s("div",W,[(p(),m(U,null,L(C,e=>s("a",{key:e,class:R(["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":o(u)===e}]),onClick:Ve=>O(u)?u.value=e:u=e},g(e),11,Y)),64))])]),o(u)==="general-info"?(p(),m("section",z,[s("form",G,[s("div",H,[s("label",J,[K,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[0]||(l[0]=e=>i.labName=e),placeholder:"Name ...",disabled:o(a)},null,8,X),[[d,i.labName]])]),s("label",Z,[ss,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[1]||(l[1]=e=>i.tagLine=e),placeholder:"Tag Line ...",disabled:o(a)},null,8,es),[[d,i.tagLine]])]),s("label",ls,[ts,s("div",os,[n(s("select",{class:"form-select mt-1 w-full","onUpdate:modelValue":l[2]||(l[2]=e=>i.labManagerUid=e),disabled:o(a)},[ns,(p(!0),m(U,null,L(D.value,e=>(p(),m("option",{key:e?.uid,value:e.uid},g(e?.firstName)+" "+g(e?.lastName),9,is))),128))],8,as),[[E,i.labManagerUid]])])]),s("label",ds,[cs,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[3]||(l[3]=e=>i.email=e),placeholder:"Name ...",disabled:o(a)},null,8,rs),[[d,i.email]])]),s("label",bs,[us,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[4]||(l[4]=e=>i.emailCc=e),placeholder:"Name ...",disabled:o(a)},null,8,ps),[[d,i.emailCc]])]),s("label",ms,[_s,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[5]||(l[5]=e=>i.mobilePhone=e),placeholder:"Name ...",disabled:o(a)},null,8,hs),[[d,i.mobilePhone]])]),s("label",ys,[gs,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[6]||(l[6]=e=>i.businessPhone=e),placeholder:"Name ...",disabled:o(a)},null,8,fs),[[d,i.businessPhone]])]),s("label",ks,[ws,n(s("textarea",{cols:"3",class:"form-input mt-1 block w-full","onUpdate:modelValue":l[7]||(l[7]=e=>i.address=e),placeholder:"Address ...",disabled:o(a)},null,8,xs),[[d,i.address]])]),s("label",vs,[Us,n(s("textarea",{cols:"3",class:"form-input mt-1 block w-full","onUpdate:modelValue":l[8]||(l[8]=e=>i.banking=e),placeholder:"Banking ...",disabled:o(a)},null,8,Ls),[[d,i.banking]])]),s("label",Vs,[Ss,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[9]||(l[9]=e=>i.qualityStatement=e),placeholder:"Quality Statemnt ...",disabled:o(a)},null,8,As),[[d,i.qualityStatement]])])]),Cs,n(s("button",{type:"button",onClick:l[10]||(l[10]=S(e=>N(),["prevent"])),class:"w-2/5 border border-sky-800 bg-sky-800 text-white rounded-sm px-4 py-2 transition-colors duration-500 ease select-none hover:bg-sky-800 focus:outline-none focus:shadow-outline"}," Update ",512),[[V,!o(a)]])])])):A("",!0),o(u)==="other-settings"?(p(),m("section",Ns,[s("form",Ts,[s("div",Ds,[s("label",Bs,[Ps,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[11]||(l[11]=e=>t.defaultRoute=e),placeholder:"Name ...",disabled:o(a)},null,8,Ms),[[d,t.defaultRoute]])]),s("label",Rs,[Os,n(s("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":l[12]||(l[12]=e=>t.defaultTheme=e),placeholder:"Name ...",disabled:o(a)},null,8,Es),[[d,t.defaultTheme]])]),s("label",Fs,[js,n(s("input",{type:"number",min:"0",class:"form-input mt-1 block w-full","onUpdate:modelValue":l[13]||(l[13]=e=>t.passwordLifetime=e),placeholder:"Name ...",disabled:o(a)},null,8,$s),[[d,t.passwordLifetime]])]),s("label",qs,[Is,n(s("input",{type:"number",min:"0",class:"form-input mt-1 block w-full","onUpdate:modelValue":l[14]||(l[14]=e=>t.inactivityLogOut=e),placeholder:"Name ...",disabled:o(a)},null,8,Qs),[[d,t.inactivityLogOut]])]),s("label",Ws,[Ys,n(s("input",{type:"number",min:"0",class:"form-input mt-1 block w-full","onUpdate:modelValue":l[15]||(l[15]=e=>t.stickerCopies=e),placeholder:"Name ...",disabled:o(a)},null,8,zs),[[d,t.stickerCopies]])]),Gs,s("label",Hs,[n(s("input",{type:"checkbox",class:"","onUpdate:modelValue":l[16]||(l[16]=e=>t.allowSelfVerification=e),disabled:o(a)},null,8,Js),[[r,t.allowSelfVerification]]),Ks]),s("label",Xs,[n(s("input",{type:"checkbox",class:"","onUpdate:modelValue":l[17]||(l[17]=e=>t.allowPatientRegistration=e),disabled:o(a)},null,8,Zs),[[r,t.allowPatientRegistration]]),se]),s("label",ee,[n(s("input",{type:"checkbox",class:"","onUpdate:modelValue":l[18]||(l[18]=e=>t.allowSampleRegistration=e),disabled:o(a)},null,8,le),[[r,t.allowSampleRegistration]]),te]),s("label",oe,[n(s("input",{type:"checkbox",class:"","onUpdate:modelValue":l[19]||(l[19]=e=>t.allowWorksheetCreation=e),disabled:o(a)},null,8,ae),[[r,t.allowWorksheetCreation]]),ne]),s("label",ie,[n(s("input",{type:"checkbox",class:"","onUpdate:modelValue":l[20]||(l[20]=e=>t.autoReceiveSamples=e),disabled:o(a)},null,8,de),[[r,t.autoReceiveSamples]]),ce]),re,s("label",be,[n(s("input",{type:"checkbox",class:"","onUpdate:modelValue":l[21]||(l[21]=e=>t.allowBilling=e),disabled:o(a)},null,8,ue),[[r,t.allowBilling]]),pe]),s("label",me,[n(s("input",{type:"checkbox",class:"","onUpdate:modelValue":l[22]||(l[22]=e=>t.allowAutoBilling=e),disabled:o(a)},null,8,_e),[[r,t.allowAutoBilling]]),he]),s("label",ye,[ge,n(s("input",{type:"text",class:"form-input mt-1 block w-full","onUpdate:modelValue":l[23]||(l[23]=e=>t.currency=e),disabled:o(a)},null,8,fe),[[d,t.currency]])]),s("label",ke,[we,n(s("input",{type:"number",min:"0",class:"form-input mt-1 block w-full","onUpdate:modelValue":l[24]||(l[24]=e=>t.paymentTermsDays=e),disabled:o(a)},null,8,xe),[[d,t.paymentTermsDays]])])]),ve,n(s("button",{type:"button",onClick:l[25]||(l[25]=S(e=>T(),["prevent"])),class:"mb-4 w-2/5 border border-sky-800 bg-sky-800 text-white rounded-sm px-4 py-2 transition-colors duration-500 ease select-none hover:bg-sky-800 focus:outline-none focus:shadow-outline"}," Update ",512),[[V,!o(a)]])])])):A("",!0)]))}}),Ae=q(Ue,[["__file","/home/aurthur/Documents/Development/felicity-lims/webapp/views/admin/laboratory/Laboratory.vue"]]);export{Ae as default};
|