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

@@ -155,38 +155,15 @@
@enderror
</div>
</div>
<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
@if($permohonan->status=='revisi')
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
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>