Update BUMDes
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
@php
|
||||
$notificationTypes = [
|
||||
'success' => 'success', 'error' => 'danger', 'warning' => 'warning',
|
||||
'info' => 'info',
|
||||
];
|
||||
$hasNotifications = $errors->any() || collect(array_keys($notificationTypes))->contains(fn ($key) => session()->has($key));
|
||||
@endphp
|
||||
|
||||
@if($hasNotifications)
|
||||
<div id="bumdes-notifications" data-has-errors="{{ ($errors->any() || session()->has('error')) ? '1' : '0' }}">
|
||||
@foreach($notificationTypes as $key => $type)
|
||||
@if(session()->has($key))
|
||||
<div class="alert alert-{{ $type }} alert-dismissible" role="alert">
|
||||
{{ session($key) }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Tutup"></button>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@if($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<ul class="mb-0">
|
||||
@foreach($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Tutup"></button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@once
|
||||
@push('scripts')
|
||||
<script src="{{ asset('assets/js/bumdes.js') }}?v={{ filemtime(public_path('assets/js/bumdes.js')) }}"></script>
|
||||
@endpush
|
||||
@endonce
|
||||
@@ -0,0 +1,6 @@
|
||||
@props(['redirectFragment' => null])
|
||||
|
||||
<div class="mt-4 text-end">
|
||||
<a href="{{ route('bumdes.index') }}" class="btn btn-secondary me-2 wave-effect wave-light">Kembali</a>
|
||||
<button type="submit" @if($redirectFragment) name="redirect_fragment" value="{{ $redirectFragment }}" @endif class="btn btn-success data-submit wave-effect wave-light"><i class="ti tabler-check me-2"></i> Simpan</button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user