feat: make service selection required for tickets
This commit is contained in:
@@ -45,7 +45,7 @@ class Create extends Component
|
|||||||
// Add rules for the department
|
// Add rules for the department
|
||||||
$this->validate([
|
$this->validate([
|
||||||
'department' => count((array) config('settings.ticket_departments')) > 0 ? 'required|in:' . implode(',', array_values((array) config('settings.ticket_departments'))) : '',
|
'department' => count((array) config('settings.ticket_departments')) > 0 ? 'required|in:' . implode(',', array_values((array) config('settings.ticket_departments'))) : '',
|
||||||
'service' => 'nullable|exists:services,id',
|
'service' => 'required|exists:services,id',
|
||||||
'subject' => 'required|string',
|
'subject' => 'required|string',
|
||||||
'message' => 'required|string',
|
'message' => 'required|string',
|
||||||
'priority' => 'required|in:low,medium,high',
|
'priority' => 'required|in:low,medium,high',
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<option value="high">{{ __('ticket.high') }}</option>
|
<option value="high">{{ __('ticket.high') }}</option>
|
||||||
</x-form.select>
|
</x-form.select>
|
||||||
|
|
||||||
<x-form.select wire:model="service" label="{{ __('ticket.service') }}" name="service">
|
<x-form.select wire:model="service" label="{{ __('ticket.service') }}" name="service" required>
|
||||||
<option value="">{{ __('ticket.select_service') }}</option>
|
<option value="">{{ __('ticket.select_service') }}</option>
|
||||||
|
|
||||||
@foreach ($services as $product)
|
@foreach ($services as $product)
|
||||||
|
|||||||
Reference in New Issue
Block a user