feat(custom-field): tambahkan kolom label dan urutan prioritas
- Menambahkan kolom 'label' pada tabel custom_fields. - Menambahkan kolom 'urutan_prioritas' pada tabel custom_fields. - Memperbarui model CustomField untuk menyertakan kolom baru. - Memperbarui form input untuk label dan urutan prioritas di tampilan create dan index. - Menambahkan validasi untuk label dan urutan prioritas di CustomFieldRequest.
This commit is contained in:
@@ -39,6 +39,17 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Label
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('label') border-danger bg-danger-light @enderror" type="text" name="label" value="{{ $customField->label ?? '' }}">
|
||||
@error('label')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Type
|
||||
@@ -55,6 +66,17 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Urutan Prioritas
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('urutan_prioritas') border-danger bg-danger-light @enderror" type="number" name="urutan_prioritas" value="{{ $customField->urutan_prioritas ?? $urutan_prioritas }}">
|
||||
@error('urutan_prioritas')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Save
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
<span class="sort"> <span class="sort-label"> Type </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[250px]" data-datatable-column="urutan_prioritas">
|
||||
<span class="sort"> <span class="sort-label"> Urutan Prioritas </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -113,12 +117,15 @@
|
||||
return checkbox.outerHTML.trim();
|
||||
},
|
||||
},
|
||||
name: {
|
||||
label: {
|
||||
title: 'Custom Field',
|
||||
},
|
||||
type: {
|
||||
title: 'Type',
|
||||
},
|
||||
urutan_prioritas: {
|
||||
title: 'Urutan Prioritas',
|
||||
},
|
||||
actions: {
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
|
||||
Reference in New Issue
Block a user