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
|
||||
$this->validate([
|
||||
'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',
|
||||
'message' => 'required|string',
|
||||
'priority' => 'required|in:low,medium,high',
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<option value="high">{{ __('ticket.high') }}</option>
|
||||
</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>
|
||||
|
||||
@foreach ($services as $product)
|
||||
|
||||
Reference in New Issue
Block a user