WIP: #8120: Compact summaryPopup #1200

Draft
jon wants to merge 11 commits from 8120-CompactSummaryPopup into dev
10 changed files with 44 additions and 7 deletions

View File

@ -10,6 +10,10 @@ defineProps({
type: Object,
required: true,
},
width: {
Outdated
Review

igual li havera dit size i les clases foren 'xl', 'sm', etx

igual li havera dit size i les clases foren 'xl', 'sm', etx
type: String,
default: 'md-width',
},
});
defineEmits([...useDialogPluginComponent.emits]);
@ -17,7 +21,19 @@ defineEmits([...useDialogPluginComponent.emits]);
const { dialogRef, onDialogHide } = useDialogPluginComponent();
</script>
<template>
jon marked this conversation as resolved Outdated
Outdated
Review

Poner en cada sección la clase para que se la pase a aqui

Poner en cada sección la clase para que se la pase a aqui
<QDialog ref="dialogRef" @hide="onDialogHide" full-width>
<component :is="summary" :id="id" />
<QDialog ref="dialogRef" @hide="onDialogHide">
<component :is="summary" :id="id" :class="width" />
</QDialog>
</template>
<style lang="scss" scoped>
.md-width {
max-width: $width-md;
}
.lg-width {
max-width: $width-lg;
}
.xlg-width {
max-width: $width-xl;
}
</style>

View File

@ -37,6 +37,10 @@ const $props = defineProps({
type: Object,
default: null,
},
width: {
type: String,
default: 'md-width',
},
});
const state = useState();
@ -128,9 +132,8 @@ const toModule = computed(() =>
</QTooltip>
</QBtn></slot
>
<QBtn
@click.stop="viewSummary(entity.id, $props.summary)"
@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) {
function viewSummary(id, summary, width) {
quasar.dialog({
component: VnSummaryDialog,
componentProps: { id, summary },
componentProps: { id, summary, width },
});
}

View File

@ -33,6 +33,11 @@ $dark-shadow-color: black;
$layout-shadow-dark: 0 0 10px 2px #00000033, 0 0px 10px #0000003d;
$spacing-md: 16px;
$color-font-secondary: #777;
$width-xs: 400px;
$width-sm: 544px;
$width-md: 800px;
$width-lg: 1280px;
$width-xl: 1600px;
.bg-success {
background-color: $positive;
}

View File

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

View File

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

View File

@ -161,13 +161,17 @@ const createInvoiceInCorrection = async () => {
:url="`InvoiceIns/${entityId}`"
:filter="filter"
title="supplierRef"
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,6 +62,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
:subtitle="data.subtitle"
@on-fetch="setData"
data-key="invoiceOutData"
width="lg-width"
>
<template #menu="{ entity, menuRef }">
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />

View File

@ -76,6 +76,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
:subtitle="data.subtitle"
data-key="routeData"
@on-fetch="setData"
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,6 +115,7 @@ function ticketFilter(ticket) {
:filter="filter"
:title="data.title"
:subtitle="data.subtitle"
@on-fetch="setData"
data-key="ticketData"
>
<template #menu="{ entity }">