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,
|
||||
'tag_ids' => $this->tag_ids,
|
||||
], $this->attachments);
|
||||
|
||||
session()->flash('success', 'Ticket ' . $ticket->reference . ' has been created.');
|
||||
return $this->redirectRoute('helpdesk.tickets.index');
|
||||
return redirect()->to(route('helpdesk.tickets.index'));
|
||||
} finally {
|
||||
$this->isSaving = false;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,32 @@
|
||||
x-on:livewire-upload-error="helpdeskAttachmentsUploading = false"
|
||||
x-on:livewire-upload-cancel="helpdeskAttachmentsUploading = false"
|
||||
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"
|
||||
class="helpdesk-ticket-form space-y-6"
|
||||
>
|
||||
@@ -426,4 +445,4 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user