Harden workstation UX and seed placeholder scans after Playwright QA.
Fix mobile queue navigation, draft/loading states, and Intake overflow; seed MinIO demo PDFs so document viewing does not 500; add e2e smoke coverage.
This commit is contained in:
@@ -4,27 +4,68 @@
|
||||
data-testid="workstation-action-bar"
|
||||
data-tour="workstation-action-bar"
|
||||
>
|
||||
<div
|
||||
class="flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between"
|
||||
>
|
||||
<div class="flex flex-wrap items-center gap-2 min-w-0">
|
||||
<div class="flex flex-wrap items-center gap-2 sm:justify-between">
|
||||
<details
|
||||
v-if="hasSecondaryActions"
|
||||
class="relative sm:hidden"
|
||||
data-testid="workstation-action-bar-menu"
|
||||
>
|
||||
<summary
|
||||
class="btn-secondary list-none cursor-pointer text-sm [&::-webkit-details-marker]:hidden"
|
||||
>
|
||||
More actions
|
||||
</summary>
|
||||
<div
|
||||
class="absolute bottom-full left-0 z-20 mb-2 flex min-w-[11rem] flex-col gap-2 rounded-input border border-line bg-surface p-2 shadow-dialog"
|
||||
>
|
||||
<slot name="left" />
|
||||
<slot name="center" />
|
||||
<slot name="right" />
|
||||
</div>
|
||||
</details>
|
||||
<div v-else class="flex flex-wrap items-center gap-2 min-w-0 sm:hidden">
|
||||
<slot name="left" />
|
||||
</div>
|
||||
<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 gap-2 sm:justify-end">
|
||||
|
||||
<div class="hidden sm:flex flex-wrap items-center gap-2 min-w-0">
|
||||
<slot name="left" />
|
||||
<slot name="center" />
|
||||
</div>
|
||||
|
||||
<div class="ml-auto flex flex-wrap items-center gap-2 sm:justify-end">
|
||||
<slot name="primary" />
|
||||
<slot name="right" />
|
||||
<div class="hidden sm:contents">
|
||||
<slot name="right" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Comment, computed, useSlots } from 'vue'
|
||||
|
||||
/**
|
||||
* Sticky bottom action bar for Entry / Verification / Approval workstations.
|
||||
* Wire into forms in Phase 16. Slots: left (Reject), center (Save Draft),
|
||||
* primary (Submit…), right (Next). Prefer btn-primary / btn-danger / btn-secondary.
|
||||
* On narrow viewports, secondary actions (left/center/right) collapse into a menu;
|
||||
* primary submit stays visible.
|
||||
*/
|
||||
const slots = useSlots()
|
||||
|
||||
function slotHasContent(name: 'left' | 'center' | 'right'): boolean {
|
||||
const nodes = slots[name]?.() ?? []
|
||||
return nodes.some(
|
||||
(node) =>
|
||||
node.type !== Comment &&
|
||||
!(typeof node.type === 'symbol' && String(node.type).includes('v-cmt')),
|
||||
)
|
||||
}
|
||||
|
||||
const hasSecondaryActions = computed(
|
||||
() =>
|
||||
slotHasContent('left') ||
|
||||
slotHasContent('center') ||
|
||||
slotHasContent('right'),
|
||||
)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user