WIP: #8120: Compact summaryPopup #1200
|
@ -10,6 +10,10 @@ defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
width: {
|
||||||
|
|||||||
|
type: String,
|
||||||
|
default: 'md-width',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
defineEmits([...useDialogPluginComponent.emits]);
|
defineEmits([...useDialogPluginComponent.emits]);
|
||||||
|
@ -17,7 +21,19 @@ defineEmits([...useDialogPluginComponent.emits]);
|
||||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
jon marked this conversation as resolved
Outdated
alexm
commented
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>
|
<QDialog ref="dialogRef" @hide="onDialogHide">
|
||||||
<component :is="summary" :id="id" />
|
<component :is="summary" :id="id" :class="width" />
|
||||||
</QDialog>
|
</QDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.md-width {
|
||||||
|
max-width: $width-md;
|
||||||
|
}
|
||||||
|
.lg-width {
|
||||||
|
max-width: $width-lg;
|
||||||
|
}
|
||||||
|
.xlg-width {
|
||||||
|
max-width: $width-xl;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -37,6 +37,10 @@ const $props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: 'md-width',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const state = useState();
|
const state = useState();
|
||||||
|
@ -128,9 +132,8 @@ const toModule = computed(() =>
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn></slot
|
</QBtn></slot
|
||||||
>
|
>
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
@click.stop="viewSummary(entity.id, $props.summary)"
|
@click.stop="viewSummary(entity.id, $props.summary, $props.width)"
|
||||||
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) {
|
function viewSummary(id, summary, width) {
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: VnSummaryDialog,
|
component: VnSummaryDialog,
|
||||||
componentProps: { id, summary },
|
componentProps: { id, summary, width },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,11 @@ $dark-shadow-color: black;
|
||||||
$layout-shadow-dark: 0 0 10px 2px #00000033, 0 0px 10px #0000003d;
|
$layout-shadow-dark: 0 0 10px 2px #00000033, 0 0px 10px #0000003d;
|
||||||
$spacing-md: 16px;
|
$spacing-md: 16px;
|
||||||
$color-font-secondary: #777;
|
$color-font-secondary: #777;
|
||||||
|
$width-xs: 400px;
|
||||||
|
$width-sm: 544px;
|
||||||
|
$width-md: 800px;
|
||||||
|
$width-lg: 1280px;
|
||||||
|
$width-xl: 1600px;
|
||||||
.bg-success {
|
.bg-success {
|
||||||
background-color: $positive;
|
background-color: $positive;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ const debtWarning = computed(() => {
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
data-key="customer"
|
data-key="customer"
|
||||||
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<CustomerDescriptorMenu :customer="entity" />
|
<CustomerDescriptorMenu :customer="entity" />
|
||||||
|
|
|
@ -61,6 +61,7 @@ const getEntryRedirectionFilter = (entry) => {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="supplier.nickname"
|
title="supplier.nickname"
|
||||||
data-key="Entry"
|
data-key="Entry"
|
||||||
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<EntryDescriptorMenu :id="entity.id" />
|
<EntryDescriptorMenu :id="entity.id" />
|
||||||
|
|
|
@ -161,13 +161,17 @@ const createInvoiceInCorrection = async () => {
|
||||||
:url="`InvoiceIns/${entityId}`"
|
:url="`InvoiceIns/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="supplierRef"
|
title="supplierRef"
|
||||||
|
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,6 +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"
|
||||||
|
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,6 +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"
|
||||||
|
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,6 +115,7 @@ 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"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
|
|
Loading…
Reference in New Issue
igual li havera dit size i les clases foren 'xl', 'sm', etx