0
0
Fork 0

refs #6763 popup fix click

This commit is contained in:
Carlos Satorres 2024-02-06 09:50:18 +01:00
parent c6a9ec5415
commit 7175c50bd6
3 changed files with 58 additions and 1 deletions

View File

@ -4,7 +4,8 @@ import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { useState } from 'src/composables/useState';
import { useQuasar } from 'quasar';
import DepartmentSummaryDialog from 'src/pages/Department/Card/DepartmentSummaryDialog.vue';
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
import CreateDepartmentChild from '../CreateDepartmentChild.vue';
import axios from 'axios';
@ -116,13 +117,19 @@ onMounted(async () => {
<template #default-header="{ node }">
<div
class="row justify-between full-width q-pr-md cursor-pointer"
>
<a
:href="node.id && `#/department/department/${node.id}/summary`"
color: inherit
@click.stop.exact="`#/department/department/${node.id}/summary`"
@click.ctrl.stop="`#/department/department/${node.id}/summary`"
>
{{ node.name }}
</a>
<DepartmentSummaryDialog :id="node.id" />
<div class="row justify-between" style="max-width: max-content">
<QIcon
v-if="node.id"

View File

@ -0,0 +1,21 @@
<script setup>
import DepartmentDescriptor from './DepartmentDescriptor.vue';
import DepartmentSummaryDialog from './DepartmentSummaryDialog.vue';
const $props = defineProps({
id: {
type: Number,
required: true,
},
});
</script>
<template>
<QPopupProxy>
<DepartmentDescriptor
v-if="$props.id"
:id="$props.id"
:summary="DepartmentSummaryDialog"
/>
</QPopupProxy>
</template>

View File

@ -0,0 +1,29 @@
<script setup>
import { useDialogPluginComponent } from 'quasar';
import DepartmentSummary from './DepartmentSummary.vue';
const $props = defineProps({
id: {
type: Number,
required: true,
},
});
defineEmits([...useDialogPluginComponent.emits]);
const { dialogRef, onDialogHide } = useDialogPluginComponent();
</script>
<template>
<QDialog ref="dialogRef" @hide="onDialogHide">
<DepartmentSummary v-if="$props.id" :id="$props.id" />
</QDialog>
</template>
<style lang="scss">
.q-dialog .summary .header {
position: sticky;
z-index: $z-max;
top: 0;
}
</style>