added new permission mass-archive instead if limiting mass archiving to admin users
This commit is contained in:
parent
6a2dd860fa
commit
7eaab16e30
|
|
@ -59,7 +59,7 @@ const exportDisabled = computed(
|
|||
|
||||
const canManageSettings = computed(() => {
|
||||
const permissions = usePage().props?.auth?.user?.permissions || [];
|
||||
return permissions.includes('manage-settings');
|
||||
return permissions.includes("mass-archive");
|
||||
});
|
||||
|
||||
function toggleAllColumns(checked) {
|
||||
|
|
@ -342,7 +342,10 @@ function submitArchive() {
|
|||
>
|
||||
Izvozi v Excel
|
||||
</button>
|
||||
<div v-if="canManageSettings && selectedRows.length" class="flex items-center gap-2">
|
||||
<div
|
||||
v-if="canManageSettings && selectedRows.length"
|
||||
class="flex items-center gap-2"
|
||||
>
|
||||
<span class="text-sm text-gray-600"
|
||||
>{{ selectedRows.length }} izbran{{
|
||||
selectedRows.length === 1 ? "a" : "ih"
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@
|
|||
Route::get('client-cases/{client_case:uuid}', [ClientCaseContoller::class, 'show'])->name('clientCase.show');
|
||||
Route::post('client-cases/{client_case:uuid}/contracts/{uuid}/segment', [ClientCaseContoller::class, 'updateContractSegment'])->name('clientCase.contract.updateSegment');
|
||||
Route::post('client-cases/{client_case:uuid}/contracts/{uuid}/archive', [ClientCaseContoller::class, 'archiveContract'])->name('clientCase.contract.archive');
|
||||
Route::post('contracts/archive-batch', [ClientCaseContoller::class, 'archiveBatch'])->name('contracts.archive-batch')->middleware('permission:manage-settings');
|
||||
Route::post('contracts/archive-batch', [ClientCaseContoller::class, 'archiveBatch'])->name('contracts.archive-batch')->middleware('permission:mass-archive');
|
||||
Route::post('client-cases', [ClientCaseContoller::class, 'store'])->name('clientCase.store');
|
||||
Route::post('client-cases/{client_case:uuid}/emergency-person', [ClientCaseContoller::class, 'emergencyCreatePerson'])->name('clientCase.emergencyPerson');
|
||||
// client-case / contract
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user