fix edit products using new workflow mutations
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<!-- View Button -->
|
||||
<a href="{{ route('mutations.show', $row->id) }}"
|
||||
class="btn btn-sm btn-outline-info me-1">
|
||||
class="btn btn-sm btn-info mr-2">
|
||||
Detail
|
||||
</a>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<!-- Receive Button (untuk dealer tujuan) -->
|
||||
@if(auth()->user()->dealer_id == $row->to_dealer_id)
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-primary btn-receive me-1"
|
||||
class="btn btn-sm btn-primary btn-receive mr-2"
|
||||
data-id="{{ $row->id }}"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#receiveModal{{ $row->id }}">
|
||||
@@ -20,7 +20,7 @@
|
||||
<!-- Cancel Button (untuk pengirim) -->
|
||||
@if(auth()->user()->dealer_id == $row->from_dealer_id || auth()->user()->hasRole('admin'))
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-warning btn-cancel me-1"
|
||||
class="btn btn-sm btn-warning btn-cancel mr-2"
|
||||
data-id="{{ $row->id }}">
|
||||
Batal
|
||||
</button>
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- Approve Button (untuk pengirim atau admin) -->
|
||||
@if(auth()->user()->dealer_id == $row->from_dealer_id || auth()->user()->hasRole('admin'))
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-success btn-approve me-1"
|
||||
class="btn btn-sm btn-success btn-approve mr-2"
|
||||
data-id="{{ $row->id }}"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#approveModal{{ $row->id }}">
|
||||
@@ -42,7 +42,7 @@
|
||||
<!-- Reject Button (untuk pengirim atau admin) -->
|
||||
@if(auth()->user()->dealer_id == $row->from_dealer_id || auth()->user()->hasRole('admin'))
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-danger btn-reject me-1"
|
||||
class="btn btn-sm btn-danger btn-reject mr-2"
|
||||
data-id="{{ $row->id }}"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#rejectModal{{ $row->id }}">
|
||||
@@ -55,7 +55,7 @@
|
||||
<!-- Complete/Receive Button -->
|
||||
@can('complete-mutation')
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-primary btn-complete me-1"
|
||||
class="btn btn-sm btn-primary btn-complete mr-2"
|
||||
data-id="{{ $row->id }}"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#completeModal{{ $row->id }}">
|
||||
@@ -66,20 +66,12 @@
|
||||
<!-- Cancel Button -->
|
||||
@can('edit-mutation')
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-warning btn-cancel me-1"
|
||||
class="btn btn-sm btn-warning btn-cancel mr-2"
|
||||
data-id="{{ $row->id }}">
|
||||
Batal
|
||||
</button>
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
@if(in_array($row->status->value, ['pending', 'approved']) && auth()->user()->id === $row->requested_by)
|
||||
<!-- Edit Button (only for creator and if still pending/approved) -->
|
||||
<a href="{{ route('mutations.edit', $row->id) }}"
|
||||
class="btn btn-sm btn-outline-secondary me-1">
|
||||
Edit
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Modal untuk Approve -->
|
||||
@@ -88,7 +80,6 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="approveModalLabel{{ $row->id }}">Setujui Mutasi</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{ route('mutations.approve', $row->id) }}" method="POST" class="approve-form">
|
||||
@csrf
|
||||
@@ -154,7 +145,6 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="rejectModalLabel{{ $row->id }}">Tolak Mutasi</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{ route('mutations.reject', $row->id) }}" method="POST">
|
||||
@csrf
|
||||
@@ -182,7 +172,6 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="receiveModalLabel{{ $row->id }}">Terima Mutasi</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{ route('mutations.receive', $row->id) }}" method="POST">
|
||||
@csrf
|
||||
@@ -251,7 +240,6 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="completeModalLabel{{ $row->id }}">Selesaikan Mutasi</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{ route('mutations.complete', $row->id) }}" method="POST">
|
||||
@csrf
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
Tabel Mutasi
|
||||
</h3>
|
||||
</div>
|
||||
@can('create', $menus['mutations.index'])
|
||||
<div class="kt-portlet__head-toolbar">
|
||||
<div class="kt-portlet__head-wrapper">
|
||||
<div class="kt-portlet__head-actions">
|
||||
@@ -20,6 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="kt-portlet__body">
|
||||
|
||||
Reference in New Issue
Block a user