Update Module User
- Add Nik and branch,
This commit is contained in:
@@ -52,6 +52,43 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
NIK
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="w-full input @error('nik') border-danger @enderror" type="number" name="nik" value="{{ $user->nik ?? '' }}">
|
||||
@error('nik')
|
||||
<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">
|
||||
Branch
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select class="input tomselect w-full @error('branch_id') border-danger @enderror" name="branch_id" id="branch_id">
|
||||
<option value="">Pilih Branch</option>
|
||||
@if(isset($branches))
|
||||
@foreach($branches as $row)
|
||||
@if(isset($user))
|
||||
<option value="{{ $row->id }}" {{ isset($user->branch_id) && $user->branch_id == $row->id?'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->id }}">
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('branch_id')
|
||||
<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">
|
||||
Password
|
||||
|
||||
@@ -64,6 +64,14 @@
|
||||
<span class="sort"> <span class="sort-label"> Email </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[185px]" data-datatable-column="nik">
|
||||
<span class="sort"> <span class="sort-label"> NIK </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[185px]" data-datatable-column="branch">
|
||||
<span class="sort"> <span class="sort-label"> Branch </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -145,6 +153,15 @@
|
||||
email: {
|
||||
title: 'Email',
|
||||
},
|
||||
nik: {
|
||||
title: 'NIK',
|
||||
},
|
||||
branch: {
|
||||
title: 'Branch',
|
||||
render: (item, data) => {
|
||||
return data.branch.name;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
|
||||
Reference in New Issue
Block a user