refactor: refs #8120 change prop and classes' names
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
802df02581
commit
2c607ef8d9
|
@ -10,9 +10,9 @@ defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
moduleClass: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'defaultSummary',
|
default: 'md-width',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -22,18 +22,18 @@ const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QDialog ref="dialogRef" @hide="onDialogHide">
|
<QDialog ref="dialogRef" @hide="onDialogHide">
|
||||||
<component :is="summary" :id="id" :class="moduleClass" />
|
<component :is="summary" :id="id" :class="width" />
|
||||||
</QDialog>
|
</QDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.defaultSummary {
|
.md-width {
|
||||||
max-width: $width-md;
|
max-width: $width-md;
|
||||||
}
|
}
|
||||||
.largeSummary {
|
.lg-width {
|
||||||
max-width: $width-lg;
|
max-width: $width-lg;
|
||||||
}
|
}
|
||||||
.xlargeSummary {
|
.xlg-width {
|
||||||
max-width: $width-xl;
|
max-width: $width-xl;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -37,9 +37,9 @@ const $props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
moduleClass: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'defaultSummary',
|
default: 'md-width',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -133,9 +133,7 @@ const toModule = computed(() =>
|
||||||
</QBtn></slot
|
</QBtn></slot
|
||||||
>
|
>
|
||||||
<QBtn
|
<QBtn
|
||||||
@click.stop="
|
@click.stop="viewSummary(entity.id, $props.summary, $props.width)"
|
||||||
viewSummary(entity.id, $props.summary, $props.moduleClass)
|
|
||||||
"
|
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
|
@ -4,10 +4,10 @@ import { useQuasar } from 'quasar';
|
||||||
export function useSummaryDialog() {
|
export function useSummaryDialog() {
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
|
||||||
function viewSummary(id, summary, moduleClass) {
|
function viewSummary(id, summary, width) {
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: VnSummaryDialog,
|
component: VnSummaryDialog,
|
||||||
componentProps: { id, summary, moduleClass },
|
componentProps: { id, summary, width },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ const debtWarning = computed(() => {
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
data-key="customer"
|
data-key="customer"
|
||||||
:module-class="'largeSummary'"
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<CustomerDescriptorMenu :customer="entity" />
|
<CustomerDescriptorMenu :customer="entity" />
|
||||||
|
|
|
@ -61,7 +61,7 @@ const getEntryRedirectionFilter = (entry) => {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="supplier.nickname"
|
title="supplier.nickname"
|
||||||
data-key="Entry"
|
data-key="Entry"
|
||||||
:module-class="'largeSummary'"
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<EntryDescriptorMenu :id="entity.id" />
|
<EntryDescriptorMenu :id="entity.id" />
|
||||||
|
|
|
@ -161,14 +161,17 @@ const createInvoiceInCorrection = async () => {
|
||||||
:url="`InvoiceIns/${entityId}`"
|
:url="`InvoiceIns/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="supplierRef"
|
title="supplierRef"
|
||||||
:module-class="'xlargeSummary'"
|
width="xlg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<InvoiceInDescriptorMenu :invoice="entity" />
|
<InvoiceInDescriptorMenu :invoice="entity" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('invoicein.list.issued')" :value="toDate(entity.issued)" />
|
<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.amount')" :value="toCurrency(totalAmount)" />
|
||||||
<VnLv :label="t('invoicein.list.supplier')">
|
<VnLv :label="t('invoicein.list.supplier')">
|
||||||
<template #value>
|
<template #value>
|
||||||
|
|
|
@ -62,7 +62,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
data-key="invoiceOutData"
|
data-key="invoiceOutData"
|
||||||
:module-class="'largeSummary'"
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity, menuRef }">
|
<template #menu="{ entity, menuRef }">
|
||||||
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
||||||
|
|
|
@ -76,7 +76,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
data-key="routeData"
|
data-key="routeData"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
:module-class="'largeSummary'"
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('Date')" :value="toDate(entity?.dated)" />
|
<VnLv :label="t('Date')" :value="toDate(entity?.dated)" />
|
||||||
|
|
|
@ -102,6 +102,10 @@ const data = ref(useCardDescription());
|
||||||
function ticketFilter(ticket) {
|
function ticketFilter(ticket) {
|
||||||
return JSON.stringify({ clientFk: ticket.clientFk });
|
return JSON.stringify({ clientFk: ticket.clientFk });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setData = (entity) => {
|
||||||
|
data.value = useCardDescription(entity.ref, entity.id);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -111,8 +115,8 @@ function ticketFilter(ticket) {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:title="data.title"
|
:title="data.title"
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
|
@on-fetch="setData"
|
||||||
data-key="ticketData"
|
data-key="ticketData"
|
||||||
:module-class="'largeSummary'"
|
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<TicketDescriptorMenu :ticket="entity" />
|
<TicketDescriptorMenu :ticket="entity" />
|
||||||
|
|
Loading…
Reference in New Issue