working ticket

This commit is contained in:
Mark Gregory
2026-06-16 13:11:27 +01:00
parent 6c5e2af806
commit 785529a0da
5 changed files with 16 additions and 17 deletions
+1 -2
View File
@@ -75,10 +75,9 @@ final class TicketCreate extends Component
/**
* Store a new helpdesk ticket.
*/
public function save(TicketService $tickets): mixed
public function save(TicketService $tickets)
{
$this->validate();
$this->validate([
'attachments.*' => 'file|max:'.config('helpdesk.max_upload_kb').'|mimes:'.implode(',', config('helpdesk.allowed_mimes')),
'tag_ids.*' => 'integer|exists:helpdesk_tags,id',
@@ -1,4 +1,5 @@
<div class="hd-helpdesk-surface space-y-6">
<style>
.hd-helpdesk-surface .hd-btn,
.hd-btn {
@@ -135,8 +136,6 @@
transition: background-color 9999s ease-in-out 0s;
}
</style>
<div class="hd-helpdesk-surface space-y-6">
<style>
.helpdesk-required-star {
color: #ef4444 !important;
@@ -107,24 +107,19 @@
});
}
function bootHelpdeskSelects() {
loadStyle('https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css');
const bootSelect2 = function () {
if (window.jQuery && window.jQuery.fn && window.jQuery.fn.select2) {
function bootHelpdeskSelects()
{
const initialise = () => {
if (window.jQuery?.fn?.select2) {
initialiseHelpdeskSelects();
return;
}
loadScript('https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js', initialiseHelpdeskSelects);
};
if (window.jQuery) {
bootSelect2();
return;
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initialise);
} else {
initialise();
}
loadScript('https://code.jquery.com/jquery-3.7.1.min.js', bootSelect2);
}
document.addEventListener('DOMContentLoaded', bootHelpdeskSelects);
+1
View File
@@ -21,6 +21,7 @@
"jquery": "^4.0.0",
"laravel-vite-plugin": "^3.1",
"sass-embedded": "^1.100.0",
"select2": "^4.1.0",
"sortablejs": "^1.15.7",
"tailwindcss": "^4.0.7",
"vite": "^8.0.0"
+5
View File
@@ -5,8 +5,13 @@ import Chart from 'chart.js/auto';
import $ from 'jquery';
window.$ = $;
window.jQuery = $;
import 'select2';
import 'select2/dist/css/select2.min.css';
const chartColours = [
'rgb(8, 145, 178)',
'rgb(37, 99, 235)',