Add 'Keterangan' Column and Display Notes for Revision

Added a 'Keterangan' column to the permohonan index view and updated relevant data bindings. Additionally, modified the form view to display notes if the status is 'revisi', and adjusted the submit button text accordingly.
This commit is contained in:
Daeng Deni Mardaeni
2024-10-31 15:57:01 +07:00
parent e592af3929
commit 26009d796b
3 changed files with 14 additions and 30 deletions

View File

@@ -148,7 +148,7 @@
Catatan
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea" rows="3" type="number" id="address" name="address"></textarea>
<textarea class="textarea" rows="3" type="number" id="keterangan" name="keterangan"></textarea>
</div>
</div>
</div>

View File

@@ -155,38 +155,15 @@
@enderror
</div>
</div>
@if($permohonan->status=='revisi')
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Status Permohonan
</label>
<div class="flex flex-wrap items-baseline w-full">
<select class="input tomselect w-full @error('branch_id') border-danger bg-danger-light @enderror" name="status" id="status">
<option value="">Pilih Status Permohonan</option>
@if(isset($status))
@foreach($status as $row)
@if(isset($permohonan))
<option value="{{ $row->slug }}" {{ isset($permohonan->status) && $permohonan->status == $row->slug ?'selected' : '' }}>
{{ $row->name }}
</option>
@else
<option value="{{ $row->slug }}">
{{ $row->name }}
</option>
@endif
@endforeach
@endif
</select>
@error('status')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
Catatan : <br>
<em class="text-red-500">{{ $permohonan->keterangan }}</em>
</div>
</div>
@endif
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
{{ $permohonan->status=='revisi' ? 'Submit Ulang' : 'Save' }}
</button>
</div>
</form>

View File

@@ -63,6 +63,10 @@
<span class="sort"> <span class="sort-label"> Status </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="keterangan">
<span class="sort"> <span class="sort-label"> Keterangan </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
</tr>
</thead>
@@ -173,6 +177,9 @@
status: {
title: 'Status'
},
keterangan: {
title: 'Keterangan'
},
actions: {
title: 'Actions',
render: (item, data) => {