|
@@ -2,7 +2,10 @@
|
|
|
<q-dialog ref="dialogRef" @hide="onDialogHide">
|
|
<q-dialog ref="dialogRef" @hide="onDialogHide">
|
|
|
<div style="width: 100%; max-width: 1100px">
|
|
<div style="width: 100%; max-width: 1100px">
|
|
|
<q-card class="overflow-hidden" style="width: 100%">
|
|
<q-card class="overflow-hidden" style="width: 100%">
|
|
|
- <DefaultDialogHeader title="Novo Ticket" @close="onDialogCancel" />
|
|
|
|
|
|
|
+ <DefaultDialogHeader
|
|
|
|
|
+ :title="ticket ? 'Editar Ticket' : 'Novo Ticket'"
|
|
|
|
|
+ @close="onDialogCancel"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
<q-form ref="formRef" @submit="onOKClick">
|
|
<q-form ref="formRef" @submit="onOKClick">
|
|
|
<q-card-section class="q-pt-sm">
|
|
<q-card-section class="q-pt-sm">
|
|
@@ -96,6 +99,13 @@ import UnitSelect from "src/components/selects/UnitSelect.vue";
|
|
|
|
|
|
|
|
defineEmits([...useDialogPluginComponent.emits]);
|
|
defineEmits([...useDialogPluginComponent.emits]);
|
|
|
|
|
|
|
|
|
|
+const { ticket } = defineProps({
|
|
|
|
|
+ ticket: {
|
|
|
|
|
+ type: Object,
|
|
|
|
|
+ default: null,
|
|
|
|
|
+ },
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
|
|
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
|
|
|
useDialogPluginComponent();
|
|
useDialogPluginComponent();
|
|
|
|
|
|
|
@@ -115,13 +125,13 @@ const priorityOptions = [
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
const form = ref({
|
|
const form = ref({
|
|
|
- title: null,
|
|
|
|
|
- date: null,
|
|
|
|
|
- priority: null,
|
|
|
|
|
- responsible: null,
|
|
|
|
|
- unit: null,
|
|
|
|
|
- sector: null,
|
|
|
|
|
- description: null,
|
|
|
|
|
|
|
+ title: ticket?.title ?? null,
|
|
|
|
|
+ date: ticket?.date ?? null,
|
|
|
|
|
+ priority: ticket?.priority ?? null,
|
|
|
|
|
+ responsible: ticket?.responsible ?? null,
|
|
|
|
|
+ unit: ticket?.unit ?? null,
|
|
|
|
|
+ sector: ticket?.sector ?? null,
|
|
|
|
|
+ description: ticket?.description ?? null,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const onOKClick = async () => {
|
|
const onOKClick = async () => {
|