mirror of
https://github.com/faiztyanirh/clqms-shadcn-v1.git
synced 2026-04-22 09:35:34 +07:00
continue patient admission
This commit is contained in:
parent
ea1369f69b
commit
1502fbd140
@ -43,7 +43,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="w-full h-110">
|
||||
<div class="w-180 h-110">
|
||||
<div class="flex gap-4 h-full">
|
||||
<div class="flex flex-col w-1/3 h-full">
|
||||
<div class="flex-1 overflow-y-auto min-h-0 space-y-2 px-2">
|
||||
@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div class="flex justify-end gap-2 mt-4">
|
||||
<Button variant="outline" size="sm" class="cursor-pointer" onclick={props.search.handleReset}>Reset</Button>
|
||||
<Button size="sm" class="cursor-pointer" onclick={props.search.handleSearch} disabled={props.search.isLoading}>
|
||||
<Button size="sm" class="cursor-pointer" onclick={() => props.search.handleSearch()} disabled={props.search.isLoading}>
|
||||
{#if props.search.isLoading}
|
||||
<Spinner />
|
||||
{:else}
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
transition-all duration-300 flex flex-col items-center p-2 h-full overflow-y-auto
|
||||
`}
|
||||
>
|
||||
|
||||
<div class={`flex w-full ${props.masterDetail.isFormMode ? "flex-col justify-center h-full items-center" : "flex-col justify-start h-full"}`} >
|
||||
{#if props.masterDetail.isFormMode}
|
||||
<span class="flex flex-col items-center justify-center gap-4 tracking-widest font-semibold select-none">
|
||||
@ -68,19 +69,40 @@
|
||||
{/if}
|
||||
|
||||
{#if !props.masterDetail.isFormMode}
|
||||
<div role="button" tabindex="0" class="flex flex-1 flex-col" onclick={(e) => e.stopPropagation()} onkeydown={(e) => {
|
||||
<div role="button" tabindex="0" class="flex flex-1 flex-col gap-2" onclick={(e) => e.stopPropagation()} onkeydown={(e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}}>
|
||||
<TopbarWrapper {actions}/>
|
||||
{#if selectedPatient}
|
||||
<div class="flex justify-between w-full rounded-md border p-2">
|
||||
<div class="flex flex-col">
|
||||
<span class="font-bold tracking-wide underline">
|
||||
{selectedPatient?.PatientID}
|
||||
</span>
|
||||
<span class="font-semibold">
|
||||
{selectedPatient?.FullName}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex flex-col justify-end items-end">
|
||||
<span class="font-bold tracking-wide">
|
||||
{selectedPatient?.Birthdate}
|
||||
</span>
|
||||
<span class="font-semibold">
|
||||
{selectedPatient?.SexLabel}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="flex-1 w-full h-full">
|
||||
{#if searchData?.data?.length > 0}
|
||||
<ReusableDataTable data={searchData.data} columns={visitColumns} handleRowClick={props.masterDetail.select} {activeRowId} rowIdKey="InternalPVID"/>
|
||||
<ReusableDataTable data={searchData.data} columns={visitColumns} handleRowClick={props.masterDetail.select} {activeRowId} rowIdKey="InternalPVID"
|
||||
offset="7"/>
|
||||
{:else}
|
||||
<div class="flex h-full">
|
||||
<ReusableEmpty desc="Try searching from search parameters"/>
|
||||
<ReusableEmpty title="No Visit" desc={selectedPatient ? "No visit available" : "Try searching from search parameters"}/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@ -62,7 +62,8 @@
|
||||
</script>
|
||||
<div class="h-full flex flex-col relative w-full">
|
||||
{#if props.searchable ?? true}
|
||||
<div class="flex items-center absolute top-[-2rem]">
|
||||
<!-- <div class="flex items-center absolute top-[-2rem]"> -->
|
||||
<div class="flex items-center absolute" style="top: -{props.offset ?? 2}rem">
|
||||
<Input
|
||||
placeholder="Filter all columns..."
|
||||
value={globalFilter}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user