fixed issue with disk test, now with correct fix for redirection after creation
This commit is contained in:
@@ -115,9 +115,8 @@ final class TicketCreate extends Component
|
|||||||
'due_at' => $this->due_at,
|
'due_at' => $this->due_at,
|
||||||
'tag_ids' => $this->tag_ids,
|
'tag_ids' => $this->tag_ids,
|
||||||
], $this->attachments);
|
], $this->attachments);
|
||||||
|
|
||||||
session()->flash('success', 'Ticket ' . $ticket->reference . ' has been created.');
|
session()->flash('success', 'Ticket ' . $ticket->reference . ' has been created.');
|
||||||
return $this->redirectRoute('helpdesk.tickets.index');
|
return redirect()->to(route('helpdesk.tickets.index'));
|
||||||
} finally {
|
} finally {
|
||||||
$this->isSaving = false;
|
$this->isSaving = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,32 @@
|
|||||||
x-on:livewire-upload-error="helpdeskAttachmentsUploading = false"
|
x-on:livewire-upload-error="helpdeskAttachmentsUploading = false"
|
||||||
x-on:livewire-upload-cancel="helpdeskAttachmentsUploading = false"
|
x-on:livewire-upload-cancel="helpdeskAttachmentsUploading = false"
|
||||||
x-on:submit.capture="
|
x-on:submit.capture="
|
||||||
if (helpdeskAttachmentsUploading) {
|
|
||||||
$event.preventDefault();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$dispatch('helpdesk-editor-sync', { model: 'body' });
|
if (helpdeskAttachmentsUploading) {
|
||||||
"
|
|
||||||
|
$event.preventDefault();
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const editor = document.querySelector('[data-helpdesk-sync-target="body"], [data-helpdesk-editor-model="body"]');
|
||||||
|
|
||||||
|
const target = document.querySelector('textarea[wire\\:model\\.defer="body"], textarea[name="body"], #body');
|
||||||
|
|
||||||
|
if (editor && target) {
|
||||||
|
|
||||||
|
target.value = editor.innerHTML?.trim?.() || editor.value?.trim?.() || '';
|
||||||
|
|
||||||
|
target.dispatchEvent(new Event('input', { bubbles: true }));
|
||||||
|
|
||||||
|
target.dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$dispatch('helpdesk-editor-sync', { model: 'body' });
|
||||||
|
|
||||||
|
"
|
||||||
enctype="multipart/form-data"
|
enctype="multipart/form-data"
|
||||||
class="helpdesk-ticket-form space-y-6"
|
class="helpdesk-ticket-form space-y-6"
|
||||||
>
|
>
|
||||||
@@ -426,4 +445,4 @@
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user