feat: refs #8120 added new style to summary popups
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2025-01-13 10:20:28 +01:00
parent 6cc400a975
commit 2aff1d3d06
2 changed files with 36 additions and 3 deletions

View File

@ -1,7 +1,8 @@
<script setup> <script setup>
import { useDialogPluginComponent } from 'quasar'; import { useDialogPluginComponent } from 'quasar';
import { computed } from 'vue';
defineProps({ const $props = defineProps({
id: { id: {
type: Number, type: Number,
required: true, required: true,
@ -15,9 +16,36 @@ defineProps({
defineEmits([...useDialogPluginComponent.emits]); defineEmits([...useDialogPluginComponent.emits]);
const { dialogRef, onDialogHide } = useDialogPluginComponent(); 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> </script>
<template> <template>
<QDialog ref="dialogRef" @hide="onDialogHide" full-width> <QDialog ref="dialogRef" @hide="onDialogHide">
<component :is="summary" :id="id" /> <component :is="$props.summary" :id="$props.id" :class="moduleClass" />
</QDialog> </QDialog>
</template> </template>
<style lang="scss" scoped>
.defaultSummary {
max-width: $width-md;
}
.largeSummary {
max-width: $width-lg;
}
.xlargeSummary {
max-width: $width-xl;
}
</style>

View File

@ -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;
} }