WIP: #8120: Compact summaryPopup #1200

Draft
jon wants to merge 11 commits from 8120-CompactSummaryPopup into dev
4 changed files with 15 additions and 21 deletions
Showing only changes of commit b48cc55f4b - Show all commits

View File

@ -1,6 +1,5 @@
<script setup>
import { useDialogPluginComponent } from 'quasar';
import { computed } from 'vue';
const $props = defineProps({
jon marked this conversation as resolved Outdated
Outdated
Review

LLevar

LLevar
id: {
@ -11,30 +10,19 @@ const $props = defineProps({
type: Object,
required: true,
},
moduleClass: {
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: 'defaultSummary',
},
});
defineEmits([...useDialogPluginComponent.emits]);
const { dialogRef, onDialogHide } = useDialogPluginComponent();
const moduleClass = computed(() => {
const name = $props.summary.__name;
const classMap = {
CustomerSummary: 'largeSummary',
EntrySummary: 'largeSummary',
InvoiceOutSummary: 'largeSummary',
RouteSummary: 'largeSummary',
TicketrSummary: 'largeSummary',
InvoiceInSummary: 'xlargeSummary',
};
return classMap[name] || 'defaultSummary';
});
</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">
<component :is="$props.summary" :id="$props.id" :class="moduleClass" />
<component :is="$props.summary" :id="$props.id" :class="$props.moduleClass" />
</QDialog>
</template>

View File

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

View File

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