Fix responsiveness
This commit is contained in:
@@ -1,15 +1,31 @@
|
||||
<template>
|
||||
<div class="app-header">
|
||||
<div class="app-header-title">
|
||||
<h1 class="text-lg font-semibold text-ink-strong">{{ title }}</h1>
|
||||
<slot name="subtitle" />
|
||||
<div class="app-header-title min-w-0 flex-1">
|
||||
<div class="min-w-0">
|
||||
<h1 class="text-lg sm:text-xl font-semibold text-ink-strong leading-tight">
|
||||
{{ title }}
|
||||
</h1>
|
||||
<p
|
||||
v-if="description"
|
||||
class="mt-0.5 text-sm text-ink-secondary leading-snug max-w-2xl"
|
||||
>
|
||||
{{ description }}
|
||||
</p>
|
||||
<slot name="subtitle" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-header-actions">
|
||||
<div class="app-header-actions self-start">
|
||||
<slot name="actions" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{ title: string }>()
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
title: string
|
||||
description?: string
|
||||
}>(),
|
||||
{ description: undefined },
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -1,33 +1,54 @@
|
||||
<template>
|
||||
<div class="flex h-screen min-h-0 bg-canvas text-ink">
|
||||
<!-- Mobile backdrop -->
|
||||
<div
|
||||
v-if="mobileOpen"
|
||||
class="fixed inset-0 z-40 bg-navy/40 lg:hidden"
|
||||
aria-hidden="true"
|
||||
@click="closeMobile"
|
||||
/>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<aside
|
||||
:class="[
|
||||
'flex flex-col shrink-0 bg-navy text-white transition-[width] duration-200 ease-out',
|
||||
collapsed ? 'w-16' : 'w-60',
|
||||
'flex flex-col shrink-0 bg-navy text-white transition-[width,transform] duration-200 ease-out shadow-xl lg:shadow-none',
|
||||
'fixed inset-y-0 left-0 z-50 lg:static lg:z-auto',
|
||||
mobileOpen ? 'translate-x-0' : '-translate-x-full lg:translate-x-0',
|
||||
sidebarCollapsed ? 'w-16' : 'w-60',
|
||||
]"
|
||||
aria-label="Main navigation"
|
||||
:aria-hidden="navAriaHidden"
|
||||
>
|
||||
<div
|
||||
:class="[
|
||||
'flex items-center h-16 border-b border-white/10 shrink-0',
|
||||
collapsed ? 'justify-center px-2' : 'gap-2.5 px-4',
|
||||
'flex items-center h-14 sm:h-16 border-b border-white/10 shrink-0',
|
||||
sidebarCollapsed ? 'justify-center px-2' : 'gap-2.5 px-4',
|
||||
]"
|
||||
>
|
||||
<svg viewBox="0 0 32 32" class="w-7 h-7 shrink-0" aria-hidden="true">
|
||||
<path fill="#155EEF" d="M16 2 4 6.5v8.2c0 8 5.1 14.6 12 15.3 6.9-.7 12-7.3 12-15.3V6.5z"/>
|
||||
<path fill="white" d="M16 8.5c-3.6 0-6.6 2.8-6.6 6.3 0 3.4 2.7 6.4 6.6 9.6 3.9-3.2 6.6-6.2 6.6-9.6 0-3.5-3-6.3-6.6-6.3m0 3.4c1.7 0 3.1 1.3 3.1 2.9s-1.4 2.9-3.1 2.9-3.1-1.3-3.1-2.9 1.4-2.9 3.1-2.9"/>
|
||||
</svg>
|
||||
<div v-if="!collapsed" class="min-w-0 leading-tight">
|
||||
<div v-if="!sidebarCollapsed" class="min-w-0 leading-tight">
|
||||
<p class="font-bold tracking-tight text-sm truncate">VigilCare</p>
|
||||
<p class="text-[11px] text-white/60 truncate">Records</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="ml-auto lg:hidden rounded-input p-1.5 text-white/70 hover:bg-white/10 hover:text-white"
|
||||
aria-label="Close navigation"
|
||||
@click="closeMobile"
|
||||
>
|
||||
<svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<nav class="flex-1 overflow-y-auto py-3 px-2 space-y-4">
|
||||
<div v-if="workspaceItems.length">
|
||||
<p
|
||||
v-if="!collapsed"
|
||||
v-if="!sidebarCollapsed"
|
||||
class="px-2 mb-1.5 text-[10px] font-semibold uppercase tracking-wider text-white/40"
|
||||
>
|
||||
Workspace
|
||||
@@ -36,13 +57,14 @@
|
||||
<li v-for="item in workspaceItems" :key="item.to">
|
||||
<router-link
|
||||
:to="item.to"
|
||||
:title="collapsed ? item.label : undefined"
|
||||
:title="sidebarCollapsed ? item.label : undefined"
|
||||
:class="navItemClass(item.to)"
|
||||
@click="closeMobile"
|
||||
>
|
||||
<span class="shrink-0 w-5 h-5 flex items-center justify-center" aria-hidden="true">
|
||||
<component :is="item.icon" />
|
||||
</span>
|
||||
<span v-if="!collapsed" class="truncate">{{ item.label }}</span>
|
||||
<span v-if="!sidebarCollapsed" class="truncate">{{ item.label }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -50,7 +72,7 @@
|
||||
|
||||
<div v-if="adminItems.length">
|
||||
<p
|
||||
v-if="!collapsed"
|
||||
v-if="!sidebarCollapsed"
|
||||
class="px-2 mb-1.5 text-[10px] font-semibold uppercase tracking-wider text-white/40"
|
||||
>
|
||||
Administration
|
||||
@@ -59,20 +81,21 @@
|
||||
<li v-for="item in adminItems" :key="item.to">
|
||||
<router-link
|
||||
:to="item.to"
|
||||
:title="collapsed ? item.label : undefined"
|
||||
:title="sidebarCollapsed ? item.label : undefined"
|
||||
:class="navItemClass(item.to)"
|
||||
@click="closeMobile"
|
||||
>
|
||||
<span class="shrink-0 w-5 h-5 flex items-center justify-center" aria-hidden="true">
|
||||
<component :is="item.icon" />
|
||||
</span>
|
||||
<span v-if="!collapsed" class="truncate">{{ item.label }}</span>
|
||||
<span v-if="!sidebarCollapsed" class="truncate">{{ item.label }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="shrink-0 border-t border-white/10 p-2">
|
||||
<div class="shrink-0 border-t border-white/10 p-2 hidden lg:block">
|
||||
<button
|
||||
type="button"
|
||||
class="flex w-full items-center gap-2.5 rounded-input px-2.5 py-2 text-sm text-white/70 hover:bg-white/10 hover:text-white transition-colors"
|
||||
@@ -97,15 +120,33 @@
|
||||
|
||||
<!-- Main column -->
|
||||
<div class="flex flex-col flex-1 min-w-0 min-h-0">
|
||||
<header class="flex items-center justify-end gap-4 h-16 shrink-0 px-4 sm:px-6 bg-surface border-b border-line">
|
||||
<span class="text-sm text-ink-secondary truncate">{{ auth.userFullName }}</span>
|
||||
<header
|
||||
class="flex items-center justify-between gap-3 h-14 sm:h-16 shrink-0 px-3 sm:px-6 bg-surface border-b border-line"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="text-sm text-ink-secondary hover:text-ink-strong transition-colors"
|
||||
@click="auth.logout()"
|
||||
class="lg:hidden inline-flex items-center justify-center rounded-input p-2 text-ink-secondary hover:bg-canvas hover:text-ink-strong"
|
||||
aria-label="Open navigation"
|
||||
:aria-expanded="mobileOpen"
|
||||
@click="mobileOpen = true"
|
||||
>
|
||||
Sign Out
|
||||
<svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 5.25a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10zm0 5.25a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75a.75.75 0 01-.75-.75z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="flex items-center justify-end gap-3 sm:gap-4 min-w-0 ml-auto">
|
||||
<span class="text-sm text-ink-secondary truncate max-w-[9rem] sm:max-w-none">
|
||||
{{ auth.userFullName }}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
class="shrink-0 text-sm text-ink-secondary hover:text-ink-strong transition-colors"
|
||||
@click="auth.logout()"
|
||||
>
|
||||
Sign Out
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="flex-1 min-h-0 overflow-auto">
|
||||
@@ -116,7 +157,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, h, ref, watch } from 'vue'
|
||||
import { computed, h, onUnmounted, ref, watch } from 'vue'
|
||||
import { useMediaQuery } from '@vueuse/core'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useAuthStore } from '../stores/auth'
|
||||
|
||||
@@ -124,13 +166,40 @@ const COLLAPSE_KEY = 'vigilcare_sidebar_collapsed'
|
||||
|
||||
const auth = useAuthStore()
|
||||
const route = useRoute()
|
||||
const isDesktopNav = useMediaQuery('(min-width: 1024px)')
|
||||
|
||||
const collapsed = ref(localStorage.getItem(COLLAPSE_KEY) === '1')
|
||||
const mobileOpen = ref(false)
|
||||
|
||||
/** On mobile the drawer is always expanded; desktop uses the collapse preference. */
|
||||
const sidebarCollapsed = computed(() => collapsed.value && !mobileOpen.value)
|
||||
|
||||
/** Hide off-canvas nav from AT on small screens when closed. */
|
||||
const navAriaHidden = computed(() => !isDesktopNav.value && !mobileOpen.value)
|
||||
|
||||
watch(collapsed, (value) => {
|
||||
localStorage.setItem(COLLAPSE_KEY, value ? '1' : '0')
|
||||
})
|
||||
|
||||
watch(
|
||||
() => route.fullPath,
|
||||
() => {
|
||||
closeMobile()
|
||||
},
|
||||
)
|
||||
|
||||
watch(mobileOpen, (open) => {
|
||||
document.body.style.overflow = open ? 'hidden' : ''
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
document.body.style.overflow = ''
|
||||
})
|
||||
|
||||
function closeMobile() {
|
||||
mobileOpen.value = false
|
||||
}
|
||||
|
||||
function toggleCollapsed() {
|
||||
collapsed.value = !collapsed.value
|
||||
}
|
||||
@@ -223,7 +292,7 @@ function isActive(path: string): boolean {
|
||||
function navItemClass(path: string): string {
|
||||
const base =
|
||||
'flex items-center gap-2.5 rounded-input text-sm transition-colors ' +
|
||||
(collapsed.value ? 'justify-center px-2 py-2.5' : 'px-2.5 py-2')
|
||||
(sidebarCollapsed.value ? 'justify-center px-2 py-2.5' : 'px-2.5 py-2')
|
||||
if (isActive(path)) {
|
||||
return `${base} bg-primary-600 text-white font-medium`
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<span class="evidence-level-mark" aria-hidden="true">2</span>
|
||||
Verified draft
|
||||
</p>
|
||||
<h2 class="text-base font-semibold text-ink-strong">Clinical Approval</h2>
|
||||
<h2 class="text-base font-semibold text-ink-strong">Sign-off review</h2>
|
||||
<p class="mt-1 text-xs text-ink-secondary max-w-md">
|
||||
Clinical sign-off before promotion to live clinical tables. Review the source scan and verified draft.
|
||||
</p>
|
||||
@@ -125,11 +125,13 @@
|
||||
</fieldset>
|
||||
|
||||
<div
|
||||
v-if="batch?.verifiedByUserId"
|
||||
class="rounded-input border border-line bg-canvas px-3 py-2 text-sm text-ink-secondary"
|
||||
v-if="batch?.verifiedByUserId || batch?.verifiedByUserName"
|
||||
class="rounded-input border border-line bg-canvas px-3 py-2 text-sm"
|
||||
>
|
||||
<span class="text-xs uppercase tracking-wide font-semibold">Verified by</span>
|
||||
<p class="font-mono text-ink mt-0.5">{{ batch.verifiedByUserId.substring(0, 8) }}…</p>
|
||||
<span class="text-xs uppercase tracking-wide font-semibold text-ink-secondary">Verified by</span>
|
||||
<p class="text-ink-strong mt-0.5">
|
||||
{{ batch.verifiedByUserName?.trim() || 'Prior verifier' }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Level 4 decision controls (copy weight below draft) -->
|
||||
@@ -230,7 +232,7 @@
|
||||
<template #left>
|
||||
<button
|
||||
type="button"
|
||||
class="btn-danger"
|
||||
class="btn-danger w-full sm:w-auto"
|
||||
:disabled="processing || !!promotionResult"
|
||||
data-testid="reject-batch"
|
||||
@click="showRejectDialog = true"
|
||||
@@ -241,7 +243,7 @@
|
||||
<template #primary>
|
||||
<button
|
||||
type="button"
|
||||
class="btn-primary"
|
||||
class="btn-primary w-full sm:w-auto"
|
||||
:disabled="processing || !!promotionResult"
|
||||
data-testid="approve-promote"
|
||||
@click="showApproveConfirm = true"
|
||||
@@ -252,7 +254,7 @@
|
||||
<template #right>
|
||||
<button
|
||||
type="button"
|
||||
class="btn-secondary"
|
||||
class="btn-secondary w-full sm:w-auto"
|
||||
:disabled="processing"
|
||||
@click="$emit('back')"
|
||||
>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<slot name="emptyAction" />
|
||||
</template>
|
||||
</EmptyState>
|
||||
<table v-else class="w-full min-w-[640px] text-sm">
|
||||
<table v-else class="w-full min-w-[36rem] text-sm">
|
||||
<thead>
|
||||
<tr class="border-b text-left text-ink-secondary">
|
||||
<th class="py-2 px-4">ID</th>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<span class="evidence-level-mark" aria-hidden="true">2</span>
|
||||
Structured draft
|
||||
</p>
|
||||
<h2 class="text-base font-semibold text-ink-strong">Data Entry</h2>
|
||||
<h2 class="text-base font-semibold text-ink-strong">Draft fields</h2>
|
||||
<p
|
||||
class="mt-1 text-xs tabular-nums"
|
||||
:class="{
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<template>
|
||||
<div class="flex flex-col lg:flex-row lg:items-start gap-4 p-4 bg-gray-50 rounded-md">
|
||||
<div class="flex-1 grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-5 gap-4">
|
||||
<div
|
||||
class="flex flex-col xl:flex-row xl:items-start gap-3 p-3 rounded-input border border-line bg-canvas"
|
||||
data-testid="observation-row"
|
||||
>
|
||||
<div class="flex-1 grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-5 gap-3 min-w-0">
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500">Code</label>
|
||||
<label class="workstation-field-label">Code</label>
|
||||
<select
|
||||
:value="observation.observationCode"
|
||||
@change="update('observationCode', ($event.target as HTMLSelectElement).value)"
|
||||
class="form-input text-sm"
|
||||
class="form-input text-sm py-1.5"
|
||||
:disabled="readonly"
|
||||
>
|
||||
<option value="">Select...</option>
|
||||
@@ -23,7 +26,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="flex items-center gap-2 text-xs text-gray-500">
|
||||
<label class="workstation-field-label">
|
||||
Value
|
||||
<OcrConfidenceBadge :label="ocrLabel" :level="ocrLevel" />
|
||||
</label>
|
||||
@@ -32,59 +35,63 @@
|
||||
@change="update('value', parseFloat(($event.target as HTMLInputElement).value))"
|
||||
type="number"
|
||||
step="0.01"
|
||||
:class="['form-input', 'text-sm', valueInputClass]"
|
||||
:class="['form-input', 'text-sm', 'py-1.5', valueInputClass]"
|
||||
:disabled="readonly"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500">Unit</label>
|
||||
<label class="workstation-field-label">Unit</label>
|
||||
<input
|
||||
:value="observation.unit"
|
||||
@change="update('unit', ($event.target as HTMLInputElement).value)"
|
||||
type="text"
|
||||
class="form-input text-sm"
|
||||
class="form-input text-sm py-1.5"
|
||||
:disabled="readonly"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500">Recorded At</label>
|
||||
<label class="workstation-field-label">Recorded At</label>
|
||||
<input
|
||||
:value="observation.recordedAt?.substring(0, 16)"
|
||||
@change="update('recordedAt', ($event.target as HTMLInputElement).value)"
|
||||
type="datetime-local"
|
||||
class="form-input text-sm"
|
||||
class="form-input text-sm py-1.5"
|
||||
:disabled="readonly"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500">Note</label>
|
||||
<label class="workstation-field-label">Note</label>
|
||||
<input
|
||||
:value="observation.note"
|
||||
@change="update('note', ($event.target as HTMLInputElement).value)"
|
||||
type="text"
|
||||
class="form-input text-sm"
|
||||
class="form-input text-sm py-1.5"
|
||||
placeholder="Optional"
|
||||
:disabled="readonly"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Verification checkbox (only in verification mode) -->
|
||||
<div v-if="showVerified" class="flex items-center lg:mt-8">
|
||||
<input
|
||||
type="checkbox"
|
||||
:checked="verified"
|
||||
@change="$emit('verify', observation.id, ($event.target as HTMLInputElement).checked)"
|
||||
class="w-4 h-4 text-clinical-safe rounded"
|
||||
/>
|
||||
<span class="ml-2 text-xs text-gray-500">OK</span>
|
||||
<div
|
||||
v-if="showVerified"
|
||||
class="flex items-center shrink-0 xl:mt-7"
|
||||
>
|
||||
<label class="inline-flex items-center gap-2 cursor-pointer">
|
||||
<input
|
||||
type="checkbox"
|
||||
:checked="verified"
|
||||
@change="$emit('verify', observation.id, ($event.target as HTMLInputElement).checked)"
|
||||
class="w-4 h-4 text-clinical-safe rounded"
|
||||
/>
|
||||
<span class="text-xs text-ink-secondary">OK</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Delete button (entry mode only) -->
|
||||
<button
|
||||
v-if="!readonly && !showVerified"
|
||||
type="button"
|
||||
@click="$emit('delete', observation.id)"
|
||||
class="lg:mt-8 text-clinical-danger hover:text-red-800 text-sm"
|
||||
class="self-start xl:mt-7 text-clinical-danger hover:text-clinical-critical text-sm font-medium"
|
||||
>
|
||||
Remove
|
||||
</button>
|
||||
@@ -115,4 +122,4 @@ const emit = defineEmits<{
|
||||
function update(field: string, value: unknown) {
|
||||
emit('update', field, value)
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
>
|
||||
<!-- Toolbar — light chrome, no decorative overlays on the page -->
|
||||
<div
|
||||
class="flex flex-wrap items-center gap-1 px-3 py-2 bg-surface border-b border-line text-sm text-ink shrink-0"
|
||||
class="flex flex-wrap items-center gap-0.5 sm:gap-1 px-2 sm:px-3 py-2 bg-surface border-b border-line text-sm text-ink shrink-0"
|
||||
data-testid="scan-viewer-toolbar"
|
||||
>
|
||||
<button
|
||||
@@ -79,7 +79,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-else-if="error" class="flex h-full items-center justify-center p-6">
|
||||
<div v-else-if="error" class="flex min-h-[10rem] items-center justify-center p-4 sm:p-6">
|
||||
<InlineError
|
||||
class="max-w-md w-full"
|
||||
title="Could not load document"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<SeparationOfDutiesBanner
|
||||
v-model:blocked="sodBlocked"
|
||||
:entered-by-user-id="batch?.enteredByUserId"
|
||||
:entered-by-user-name="enteredByDisplayName"
|
||||
:current-user-id="auth.userId"
|
||||
:current-user-name="auth.userFullName"
|
||||
/>
|
||||
@@ -117,7 +118,10 @@
|
||||
</fieldset>
|
||||
|
||||
<!-- Encounter review -->
|
||||
<fieldset class="workstation-form-section">
|
||||
<fieldset
|
||||
v-if="showEncounterContext && encounterFields.length > 0"
|
||||
class="workstation-form-section"
|
||||
>
|
||||
<legend class="workstation-form-legend">Encounter Context</legend>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-3">
|
||||
<div v-for="field in encounterFields" :key="field.path">
|
||||
@@ -145,11 +149,20 @@
|
||||
</fieldset>
|
||||
|
||||
<!-- Observations review -->
|
||||
<fieldset class="workstation-form-section">
|
||||
<fieldset
|
||||
v-if="showObservations"
|
||||
class="workstation-form-section"
|
||||
>
|
||||
<legend class="workstation-form-legend">
|
||||
Observations ({{ observations.length }})
|
||||
</legend>
|
||||
<div class="space-y-2">
|
||||
<p
|
||||
v-if="observations.length === 0"
|
||||
class="text-sm text-ink-secondary"
|
||||
>
|
||||
No observations recorded.
|
||||
</p>
|
||||
<div v-else class="space-y-2">
|
||||
<ObservationRow
|
||||
v-for="(obs, index) in observations"
|
||||
:key="obs.id"
|
||||
@@ -325,6 +338,15 @@ function observationValueConfidenceClass(observationCode: string): string {
|
||||
const showAllergies = computed(() => fieldReqs.value?.showAllergies ?? false)
|
||||
const showMedications = computed(() => fieldReqs.value?.showMedications ?? false)
|
||||
const showEncounterSummary = computed(() => fieldReqs.value?.showEncounterSummaryFields ?? false)
|
||||
const showEncounterContext = computed(() => fieldReqs.value?.showEncounterContext ?? false)
|
||||
const showObservations = computed(() => fieldReqs.value?.showObservations ?? false)
|
||||
|
||||
const enteredByDisplayName = computed(() => {
|
||||
const name = props.batch?.enteredByUserName?.trim()
|
||||
if (name) return name
|
||||
const fromQueue = batchStore.batches.find((b) => b.id === props.batchId)
|
||||
return fromQueue?.enteredByUserName?.trim() || null
|
||||
})
|
||||
|
||||
watch(
|
||||
() => batchStore.currentDraft,
|
||||
@@ -385,7 +407,7 @@ watch(
|
||||
}
|
||||
}
|
||||
|
||||
if (draft.encounter) {
|
||||
if (draft.encounter && showEncounterContext.value) {
|
||||
encounterFields.value = [
|
||||
{ path: 'encounter.admissionDate', label: 'Admission Date', value: draft.encounter.admissionDate ?? '' },
|
||||
{ path: 'encounter.department', label: 'Department', value: draft.encounter.department ?? '' },
|
||||
@@ -398,6 +420,12 @@ watch(
|
||||
{ path: 'encounter.dischargeDiagnosis', label: 'Discharge Diagnosis', value: draft.encounter.dischargeDiagnosis ?? '' },
|
||||
)
|
||||
}
|
||||
} else {
|
||||
encounterFields.value = []
|
||||
}
|
||||
|
||||
if (!showObservations.value) {
|
||||
observations.value = []
|
||||
}
|
||||
|
||||
fieldChecks.value = {}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div
|
||||
class="sticky bottom-0 z-10 -mx-4 mt-auto border-t border-line bg-surface/95 px-4 py-3 backdrop-blur-sm sm:-mx-0 sm:rounded-b-card"
|
||||
class="sticky bottom-0 z-10 border-t border-line bg-surface/95 px-3 py-3 backdrop-blur-sm sm:px-4"
|
||||
data-testid="workstation-action-bar"
|
||||
>
|
||||
<div
|
||||
class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"
|
||||
class="flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between"
|
||||
>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<div class="flex flex-wrap items-center gap-2 min-w-0">
|
||||
<slot name="left" />
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center justify-center gap-2">
|
||||
<div class="flex flex-wrap items-center gap-2 min-w-0 sm:justify-center">
|
||||
<slot name="center" />
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center justify-end gap-2">
|
||||
<div class="flex flex-wrap items-center gap-2 sm:justify-end">
|
||||
<slot name="primary" />
|
||||
<slot name="right" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user