Fix mobile queue navigation, draft/loading states, and Intake overflow; seed MinIO demo PDFs so document viewing does not 500; add e2e smoke coverage.
72 lines
2.1 KiB
Vue
72 lines
2.1 KiB
Vue
<template>
|
|
<div
|
|
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"
|
|
data-tour="workstation-action-bar"
|
|
>
|
|
<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" />
|
|
<slot name="center" />
|
|
</div>
|
|
|
|
<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" />
|
|
<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.
|
|
* 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>
|