refactor: refs #8120 change prop and classes' names
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2025-01-17 13:16:04 +01:00
parent 802df02581
commit 2c607ef8d9
9 changed files with 25 additions and 20 deletions

View File

@ -10,9 +10,9 @@ defineProps({
type: Object,
required: true,
},
moduleClass: {
width: {
type: String,
default: 'defaultSummary',
default: 'md-width',
},
});
@ -22,18 +22,18 @@ const { dialogRef, onDialogHide } = useDialogPluginComponent();
</script>
<template>
<QDialog ref="dialogRef" @hide="onDialogHide">
<component :is="summary" :id="id" :class="moduleClass" />
<component :is="summary" :id="id" :class="width" />
</QDialog>
</template>
<style lang="scss" scoped>
.defaultSummary {
.md-width {
max-width: $width-md;
}
.largeSummary {
.lg-width {
max-width: $width-lg;
}
.xlargeSummary {
.xlg-width {
max-width: $width-xl;
}
</style>

View File

@ -37,9 +37,9 @@ const $props = defineProps({
type: Object,
default: null,
},
moduleClass: {
width: {
type: String,
default: 'defaultSummary',
default: 'md-width',
},
});
@ -133,9 +133,7 @@ const toModule = computed(() =>
</QBtn></slot
>
<QBtn
@click.stop="
viewSummary(entity.id, $props.summary, $props.moduleClass)
"
@click.stop="viewSummary(entity.id, $props.summary, $props.width)"
round
flat
dense

View File

@ -4,10 +4,10 @@ import { useQuasar } from 'quasar';
export function useSummaryDialog() {
const quasar = useQuasar();
function viewSummary(id, summary, moduleClass) {
function viewSummary(id, summary, width) {
quasar.dialog({
component: VnSummaryDialog,
componentProps: { id, summary, moduleClass },
componentProps: { id, summary, width },
});
}

View File

@ -53,7 +53,7 @@ const debtWarning = computed(() => {
@on-fetch="setData"
:summary="$props.summary"
data-key="customer"
:module-class="'largeSummary'"
width="lg-width"
>
<template #menu="{ entity }">
<CustomerDescriptorMenu :customer="entity" />

View File

@ -61,7 +61,7 @@ const getEntryRedirectionFilter = (entry) => {
:filter="filter"
title="supplier.nickname"
data-key="Entry"
:module-class="'largeSummary'"
width="lg-width"
>
<template #menu="{ entity }">
<EntryDescriptorMenu :id="entity.id" />

View File

@ -161,14 +161,17 @@ const createInvoiceInCorrection = async () => {
:url="`InvoiceIns/${entityId}`"
:filter="filter"
title="supplierRef"
:module-class="'xlargeSummary'"
width="xlg-width"
>
<template #menu="{ entity }">
<InvoiceInDescriptorMenu :invoice="entity" />
</template>
<template #body="{ entity }">
<VnLv :label="t('invoicein.list.issued')" :value="toDate(entity.issued)" />
<VnLv :label="t('invoicein.summary.bookedDate')" :value="toDate(entity.booked)" />
<VnLv
:label="t('invoicein.summary.bookedDate')"
:value="toDate(entity.booked)"
/>
<VnLv :label="t('invoicein.list.amount')" :value="toCurrency(totalAmount)" />
<VnLv :label="t('invoicein.list.supplier')">
<template #value>

View File

@ -62,7 +62,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
:subtitle="data.subtitle"
@on-fetch="setData"
data-key="invoiceOutData"
:module-class="'largeSummary'"
width="lg-width"
>
<template #menu="{ entity, menuRef }">
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />

View File

@ -76,7 +76,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
:subtitle="data.subtitle"
data-key="routeData"
@on-fetch="setData"
:module-class="'largeSummary'"
width="lg-width"
>
<template #body="{ entity }">
<VnLv :label="t('Date')" :value="toDate(entity?.dated)" />

View File

@ -102,6 +102,10 @@ const data = ref(useCardDescription());
function ticketFilter(ticket) {
return JSON.stringify({ clientFk: ticket.clientFk });
}
const setData = (entity) => {
data.value = useCardDescription(entity.ref, entity.id);
};
</script>
<template>
@ -111,8 +115,8 @@ function ticketFilter(ticket) {
:filter="filter"
:title="data.title"
:subtitle="data.subtitle"
@on-fetch="setData"
data-key="ticketData"
:module-class="'largeSummary'"
>
<template #menu="{ entity }">
<TicketDescriptorMenu :ticket="entity" />