refactor: refs #7652 Update ClaimDescriptor and ParkingDescriptor
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
150c446d70
commit
269fe18a9a
|
@ -56,8 +56,7 @@ onMounted(async () => {
|
|||
:url="`Claims/${entityId}`"
|
||||
:filter="filter"
|
||||
module="Claim"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
title="client.name"
|
||||
@on-fetch="setData"
|
||||
data-key="Claim"
|
||||
>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
|
||||
|
@ -17,8 +16,7 @@ const props = defineProps({
|
|||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => props.id || route.params.id);
|
||||
const { store } = useArrayData('Parking');
|
||||
const parking = computed(() => store.data);
|
||||
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
|
@ -29,15 +27,13 @@ const filter = {
|
|||
module="Parking"
|
||||
data-key="Parking"
|
||||
:url="`Parkings/${entityId}`"
|
||||
:title="parking?.code"
|
||||
:subtitle="parking?.id"
|
||||
title="code"
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (parking = data)"
|
||||
>
|
||||
<template #body>
|
||||
<VnLv :label="t('globals.code')" :value="parking.code" />
|
||||
<VnLv :label="t('parking.pickingOrder')" :value="parking.pickingOrder" />
|
||||
<VnLv :label="t('parking.sector')" :value="parking.sector?.description" />
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||
<VnLv :label="t('parking.pickingOrder')" :value="entity.pickingOrder" />
|
||||
<VnLv :label="t('parking.sector')" :value="entity.sector?.description" />
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
</template>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -15,9 +14,7 @@ const $props = defineProps({
|
|||
const router = useRoute();
|
||||
const { t } = useI18n();
|
||||
const entityId = computed(() => $props.id || router.params.id);
|
||||
const { store } = useArrayData('Parking');
|
||||
|
||||
const parking = ref(store.data);
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
|
@ -26,14 +23,9 @@ const filter = {
|
|||
|
||||
<template>
|
||||
<div class="q-pa-md">
|
||||
<CardSummary
|
||||
:url="`Parkings/${entityId}`"
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (parking = data)"
|
||||
data-key="Parking"
|
||||
>
|
||||
<template #header>{{ parking.code }}</template>
|
||||
<template #body>
|
||||
<CardSummary :url="`Parkings/${entityId}`" data-key="Parking" :filter="filter">
|
||||
<template #header="{ entity }">{{ entity.code }}</template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<a
|
||||
|
@ -44,17 +36,17 @@ const filter = {
|
|||
<QIcon name="open_in_new" />
|
||||
</a>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.code')" :value="parking.code" />
|
||||
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||
<VnLv
|
||||
:label="t('parking.pickingOrder')"
|
||||
:value="parking.pickingOrder"
|
||||
:value="entity.pickingOrder"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('parking.sector')"
|
||||
:value="parking.sector?.description"
|
||||
:value="entity.sector?.description"
|
||||
/>
|
||||
<VnLv :label="t('parking.row')" :value="parking.row" />
|
||||
<VnLv :label="t('parking.column')" :value="parking.column" />
|
||||
<VnLv :label="t('parking.row')" :value="entity.row" />
|
||||
<VnLv :label="t('parking.column')" :value="entity.column" />
|
||||
</QCard>
|
||||
</template>
|
||||
</CardSummary>
|
||||
|
|
Loading…
Reference in New Issue