|
|
@@ -226,17 +226,21 @@ const form = ref({
|
|
|
description: ticket?.description ?? null,
|
|
|
});
|
|
|
|
|
|
-const buildPayload = () => ({
|
|
|
- title: form.value.title,
|
|
|
- severity: form.value.severity,
|
|
|
- scope: form.value.scope,
|
|
|
- sector: form.value.sector || null,
|
|
|
- description: form.value.description || null,
|
|
|
- target_unit_id:
|
|
|
- form.value.scope === "specific"
|
|
|
- ? (selectedUnit.value?.value ?? null)
|
|
|
- : null,
|
|
|
-});
|
|
|
+const buildPayload = () => {
|
|
|
+ const payload = {
|
|
|
+ title: form.value.title,
|
|
|
+ severity: form.value.severity,
|
|
|
+ scope: form.value.scope,
|
|
|
+ sector: form.value.sector || null,
|
|
|
+ description: form.value.description || null,
|
|
|
+ };
|
|
|
+
|
|
|
+ if (form.value.scope === "specific") {
|
|
|
+ payload.target_unit_id = selectedUnit.value?.value ?? null;
|
|
|
+ }
|
|
|
+
|
|
|
+ return payload;
|
|
|
+};
|
|
|
|
|
|
const onAddComment = () => {
|
|
|
$q.dialog({
|