mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 08:53:00 +08:00
1 line
3.9 KiB
JavaScript
1 line
3.9 KiB
JavaScript
import{d as y,a3 as A,r as f,A as $,U as x,o as l,g as d,h as e,F as m,z as g,t as h,j as r,y as _,D as w,E as v,i as F,v as P,w as M,k,I as O,ak as S,_ as I,H as j}from"./index-cd9e6ac8.js";import{a as B,b as U}from"./patient.mutations-36815db6.js";const R={class:"container w-full my-4"},V=e("hr",null,null,-1),z=e("hr",null,null,-1),L={class:"overflow-x-auto mt-4"},H={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"},q={class:"min-w-full"},G=e("thead",null,[e("tr",null,[e("th",{class:"px-1 py-1 border-b-2 border-gray-300 text-left text-sm leading-4 text-gray-800 tracking-wider"}," Name"),e("th",{class:"px-1 py-1 border-b-2 border-gray-300"})])],-1),J={class:"bg-white"},K={class:"px-1 py-1 whitespace-no-wrap border-b border-gray-500"},Q={class:"flex items-center"},W={class:"text-sm leading-5 text-gray-800"},X={class:"px-1 py-1 whitespace-no-wrap text-right border-b border-gray-500 text-sm leading-5"},Y=["onClick"],Z={action:"post",class:"p-1"},ee={class:"grid grid-cols-2 gap-x-4 mb-4"},te={class:"flex items-center gap-x-4 whitespace-nowrap col-span-2 mb-2"},se=e("span",{class:"text-gray-700"},"Indentication Name",-1),ne=e("hr",null,null,-1),oe=y({__name:"PersonIdentification",setup(C){const s=A(),{withClientMutation:c}=S();let a=f(!1),p=f(""),t=$({});const u=f(!0);s.fetchIdentifications();function D(){c(B,{name:t.name},"createIdentification").then(o=>s.addIdentification(o))}function E(){c(U,{uid:t.uid,name:t.name},"updateIdentification").then(o=>s.updateIdentification(o))}function b(o,n={}){u.value=o,a.value=!0,p.value=(o?"CREATE":"EDIT")+" PERSON IDENTIFICATION",o?Object.assign(t,{}):Object.assign(t,{...n})}function N(){u.value===!0&&D(),u.value===!1&&E(),a.value=!1}const T=x(()=>s.getIdentifications);return(o,n)=>(l(),d(m,null,[e("div",R,[V,e("button",{onClick:n[0]||(n[0]=i=>b(!0)),class:"px-2 py-1 border-sky-800 border text-sky-800rounded-smtransition duration-300 hover:bg-sky-800 hover:text-white focus:outline-none"},"Add Identification"),z,e("div",L,[e("div",H,[e("table",q,[G,e("tbody",J,[(l(!0),d(m,null,g(r(T),i=>(l(),d("tr",{key:i?.uid},[e("td",K,[e("div",Q,[e("div",null,[e("div",W,h(i?.name),1)])])]),e("td",X,[e("button",{onClick:ue=>b(!1,i),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"},"Edit",8,Y)])]))),128))])])])])]),_(" Location Edit Form Modal "),r(a)?(l(),w(O,{key:0,onClose:n[3]||(n[3]=i=>k(a)?a.value=!1:a=!1)},{header:v(()=>[e("h3",null,h(r(p)),1)]),body:v(()=>[e("form",Z,[e("div",ee,[e("label",te,[se,F(e("input",{class:"form-input mt-1 block w-full","onUpdate:modelValue":n[1]||(n[1]=i=>r(t).name=i),placeholder:"Name ..."},null,512),[[P,r(t).name]])])]),ne,e("button",{type:"button",onClick:n[2]||(n[2]=M(i=>N(),["prevent"])),class:"-mb-4 w-full border border-sky-800 bg-sky-800 text-white rounded-sm px-4 py-2 m-2 transition-colors duration-500 ease select-none hover:bg-sky-800 focus:outline-none focus:shadow-outline"}," Save Form ")])]),_:1})):_("v-if",!0)],64))}}),ie=I(oe,[["__file","/home/aurthur/Development/Python/felicity/felicity-lims/webapp/views/admin/patient/PersonIdentification.vue"]]),ae={class:"mt-4"},re={class:"bg-white shadow-md mt-2"},le={class:"-mb-px flex justify-start"},de=["onClick"],ce=y({__name:"index",setup(C){let s=f("person-identification");const c=["person-identification"];return x(()=>"tab-"+s.value),(a,p)=>(l(),d("div",ae,[e("nav",re,[e("div",le,[(l(),d(m,null,g(c,t=>e("a",{key:t,class:j(["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":r(s)===t}]),onClick:u=>k(s)?s.value=t:s=t,href:"#"},h(t),11,de)),64))])]),r(s)==="person-identification"?(l(),w(ie,{key:0})):_("v-if",!0)]))}}),me=I(ce,[["__file","/home/aurthur/Development/Python/felicity/felicity-lims/webapp/views/admin/patient/index.vue"]]);export{me as default};
|