fix(custom_fields): tambahkan opsi tipe custom field baru
- Menambahkan opsi 'date' dan 'number' pada validasi tipe custom field. - Memperbarui tampilan dropdown untuk mencakup opsi baru.
This commit is contained in:
@@ -15,7 +15,7 @@ class CustomFieldRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'name' => 'required|max:255',
|
||||
'type' => 'required|in:text,select,radio,checkbox',
|
||||
'type' => 'required|in:text,select,radio,checkbox,date,number',
|
||||
'label' => 'nullable|max:255',
|
||||
'urutan_prioritas' => [
|
||||
'nullable',
|
||||
|
||||
@@ -55,12 +55,13 @@
|
||||
Type
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select class="input @error('type') border-danger bg-danger-light @enderror" name="type">
|
||||
<select class="input @error('type') border-danger bg-danger-light @enderror" name="type">
|
||||
<option value="text" {{ (isset($customField->type) && $customField->type == 'text') ? 'selected' : '' }}>Text</option>
|
||||
<option value="radio" {{ (isset($customField->type) && $customField->type == 'radio') ? 'selected' : '' }}>Radio</option>
|
||||
<option value="select" {{ (isset($customField->type) && $customField->type == 'select') ? 'selected' : '' }}>Select</option>
|
||||
<option value="checkbox" {{ (isset($customField->type) && $customField->type == 'checkbox') ? 'selected' : '' }}>Checkbox</option>
|
||||
<option value="date" {{ (isset($customField->type) && $customField->type == 'date') ? 'selected' : '' }}>Date</option>
|
||||
<option value="number" {{ (isset($customField->type) && $customField->type == 'number') ? 'selected' : '' }}>Number</option>
|
||||
</select>
|
||||
@error('type')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
|
||||
Reference in New Issue
Block a user