fix(fe): conditionally render filters slot container in MasterDetailCrudPage and BatchOperationsPageV2
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<script setup lang="ts">import { computed } from 'vue'; import PageLayout from '../../layouts/PageLayout.vue'; import StandardScreenBoundary from './StandardScreenBoundary.vue'; import type { StandardScreenProps } from '../../contracts/screenContract'; const props=defineProps<StandardScreenProps>(); const contentBlocked = computed(() => ['LOADING','ERROR','UNAUTHORIZED','FORBIDDEN','CONFLICT','EXPIRED','READONLY','PROCESSING'].includes(props.state ?? 'READY')); defineEmits<{retry:[]}>()</script>
|
||||
<template><PageLayout :title="props.title" :subtitle="props.subtitle" :status="props.state" :as-of="props.evidence?.asOf" :version="props.evidence?.version"><template #actions><slot name="actions"/></template><template #summary><slot name="runSummary"/></template><template #filters><slot name="filters"/></template><StandardScreenBoundary :state="props.state" :warning="props.warning" @retry="$emit('retry')"><section v-if="!contentBlocked" class="ks-stack ks-batch-page-section"><div v-if="$slots.timeline" class="ks-card ks-section"><slot name="timeline"/></div><div v-if="$slots.records" class="ks-card ks-section"><slot name="records"/></div><div v-if="$slots.reprocess" class="ks-card ks-section"><slot name="reprocess"/></div><slot /></section></StandardScreenBoundary><template v-if="$slots.runbook" #aside><slot name="runbook"/></template><template v-if="$slots.footer" #footer><slot name="footer"/></template></PageLayout></template>
|
||||
<template><PageLayout :title="props.title" :subtitle="props.subtitle" :status="props.state" :as-of="props.evidence?.asOf" :version="props.evidence?.version"><template v-if="$slots.actions" #actions><slot name="actions"/></template><template v-if="$slots.runSummary" #summary><slot name="runSummary"/></template><template v-if="$slots.filters" #filters><slot name="filters"/></template><StandardScreenBoundary :state="props.state" :warning="props.warning" @retry="$emit('retry')"><section v-if="!contentBlocked" class="ks-stack ks-batch-page-section"><div v-if="$slots.timeline" class="ks-card ks-section"><slot name="timeline"/></div><div v-if="$slots.records" class="ks-card ks-section"><slot name="records"/></div><div v-if="$slots.reprocess" class="ks-card ks-section"><slot name="reprocess"/></div><slot /></section></StandardScreenBoundary><template v-if="$slots.runbook" #aside><slot name="runbook"/></template><template v-if="$slots.footer" #footer><slot name="footer"/></template></PageLayout></template>
|
||||
<style scoped>.ks-section{padding:var(--ks-space-4)}.ks-batch-page-section{display:flex;flex-direction:column;flex:1;min-height:0;height:100%}</style>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<script setup lang="ts">import { computed } from 'vue'; import PageLayout from '../../layouts/PageLayout.vue'; import StandardScreenBoundary from './StandardScreenBoundary.vue'; import type { StandardScreenProps } from '../../contracts/screenContract'; const props=defineProps<StandardScreenProps>(); const hideDetail = computed(() => props.state === 'UNAUTHORIZED' || props.state === 'FORBIDDEN'); defineEmits<{retry:[]}>()</script>
|
||||
<template><PageLayout :title="props.title" :subtitle="props.subtitle" :status="props.state" :as-of="props.evidence?.asOf" :version="props.evidence?.version" aside-width="28rem"><template #actions><slot name="actions"/></template><template #filters><slot name="filters"/></template><StandardScreenBoundary :state="props.state" :warning="props.warning" @retry="$emit('retry')"><slot name="master"/></StandardScreenBoundary><template #aside><slot v-if="!hideDetail" name="detail"/></template><template v-if="$slots.footer" #footer><slot name="footer"/></template></PageLayout></template>
|
||||
<template><PageLayout :title="props.title" :subtitle="props.subtitle" :status="props.state" :as-of="props.evidence?.asOf" :version="props.evidence?.version" aside-width="28rem"><template v-if="$slots.actions" #actions><slot name="actions"/></template><template v-if="$slots.filters" #filters><slot name="filters"/></template><StandardScreenBoundary :state="props.state" :warning="props.warning" @retry="$emit('retry')"><slot name="master"/></StandardScreenBoundary><template #aside><slot v-if="!hideDetail" name="detail"/></template><template v-if="$slots.footer" #footer><slot name="footer"/></template></PageLayout></template>
|
||||
|
||||
Reference in New Issue
Block a user