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}`"
|
:url="`Claims/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
module="Claim"
|
module="Claim"
|
||||||
:title="data.title"
|
title="client.name"
|
||||||
:subtitle="data.subtitle"
|
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
data-key="Claim"
|
data-key="Claim"
|
||||||
>
|
>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
|
|
||||||
|
@ -17,8 +16,7 @@ const props = defineProps({
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const entityId = computed(() => props.id || route.params.id);
|
const entityId = computed(() => props.id || route.params.id);
|
||||||
const { store } = useArrayData('Parking');
|
|
||||||
const parking = computed(() => store.data);
|
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||||
|
@ -29,15 +27,13 @@ const filter = {
|
||||||
module="Parking"
|
module="Parking"
|
||||||
data-key="Parking"
|
data-key="Parking"
|
||||||
:url="`Parkings/${entityId}`"
|
:url="`Parkings/${entityId}`"
|
||||||
:title="parking?.code"
|
title="code"
|
||||||
:subtitle="parking?.id"
|
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="(data) => (parking = data)"
|
|
||||||
>
|
>
|
||||||
<template #body>
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('globals.code')" :value="parking.code" />
|
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||||
<VnLv :label="t('parking.pickingOrder')" :value="parking.pickingOrder" />
|
<VnLv :label="t('parking.pickingOrder')" :value="entity.pickingOrder" />
|
||||||
<VnLv :label="t('parking.sector')" :value="parking.sector?.description" />
|
<VnLv :label="t('parking.sector')" :value="entity.sector?.description" />
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -15,9 +14,7 @@ const $props = defineProps({
|
||||||
const router = useRoute();
|
const router = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const entityId = computed(() => $props.id || router.params.id);
|
const entityId = computed(() => $props.id || router.params.id);
|
||||||
const { store } = useArrayData('Parking');
|
|
||||||
|
|
||||||
const parking = ref(store.data);
|
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||||
|
@ -26,14 +23,9 @@ const filter = {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<CardSummary
|
<CardSummary :url="`Parkings/${entityId}`" data-key="Parking" :filter="filter">
|
||||||
:url="`Parkings/${entityId}`"
|
<template #header="{ entity }">{{ entity.code }}</template>
|
||||||
:filter="filter"
|
<template #body="{ entity }">
|
||||||
@on-fetch="(data) => (parking = data)"
|
|
||||||
data-key="Parking"
|
|
||||||
>
|
|
||||||
<template #header>{{ parking.code }}</template>
|
|
||||||
<template #body>
|
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<a
|
<a
|
||||||
|
@ -44,17 +36,17 @@ const filter = {
|
||||||
<QIcon name="open_in_new" />
|
<QIcon name="open_in_new" />
|
||||||
</a>
|
</a>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv :label="t('globals.code')" :value="parking.code" />
|
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('parking.pickingOrder')"
|
:label="t('parking.pickingOrder')"
|
||||||
:value="parking.pickingOrder"
|
:value="entity.pickingOrder"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('parking.sector')"
|
:label="t('parking.sector')"
|
||||||
:value="parking.sector?.description"
|
:value="entity.sector?.description"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('parking.row')" :value="parking.row" />
|
<VnLv :label="t('parking.row')" :value="entity.row" />
|
||||||
<VnLv :label="t('parking.column')" :value="parking.column" />
|
<VnLv :label="t('parking.column')" :value="entity.column" />
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
|
|
Loading…
Reference in New Issue