fix: rende robusta la vista aggiornamenti supporto
This commit is contained in:
parent
03bf1752ba
commit
04e6c71f78
|
|
@ -1,4 +1,6 @@
|
|||
<div class="fi-page">
|
||||
@php($supportUpdateAuthUser = auth()->user())
|
||||
@php($supportCanRunUpdate = $supportUpdateAuthUser && method_exists($supportUpdateAuthUser, 'hasAnyRole') && $supportUpdateAuthUser->hasAnyRole(['super-admin', 'admin', 'amministratore']))
|
||||
<div class="mx-auto max-w-7xl space-y-3 text-xs">
|
||||
<x-filament.components.page-breadcrumbs
|
||||
:breadcrumbs="[
|
||||
|
|
@ -78,7 +80,7 @@ class="inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium {{ $t
|
|||
<x-filament::button size="sm" color="warning" wire:click="setActiveTab('errori')">
|
||||
Vai a Aggiornamenti + Bug
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" wire:click="runUpdate" :disabled="!$this->canRunUpdate()">
|
||||
<x-filament::button size="sm" wire:click="runUpdate" :disabled="!$supportCanRunUpdate">
|
||||
Lancia aggiornamento
|
||||
</x-filament::button>
|
||||
</div>
|
||||
|
|
@ -107,7 +109,7 @@ class="inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium {{ $t
|
|||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<div class="rounded bg-slate-100 px-2 py-1 font-mono text-[10px] text-slate-600">{{ $this->developmentSnapshotPath ?? '-' }}</div>
|
||||
<x-filament::button size="sm" color="gray" wire:click="generateDevelopmentSnapshot" :disabled="!$this->canRunUpdate()">
|
||||
<x-filament::button size="sm" color="gray" wire:click="generateDevelopmentSnapshot" :disabled="!$supportCanRunUpdate">
|
||||
Rigenera snapshot sviluppo
|
||||
</x-filament::button>
|
||||
</div>
|
||||
|
|
@ -424,7 +426,7 @@ class="inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium {{ $t
|
|||
</div>
|
||||
|
||||
<div class="mt-3 flex flex-wrap gap-2">
|
||||
<x-filament::button size="sm" wire:click="runGitSync" :disabled="!$this->canRunUpdate()">
|
||||
<x-filament::button size="sm" wire:click="runGitSync" :disabled="!$supportCanRunUpdate">
|
||||
Aggiorna staging da Gitea
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" color="info" wire:click="refreshGitSyncProgress" :disabled="!$this->gitSyncInProgress">
|
||||
|
|
@ -536,10 +538,10 @@ class="inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium {{ $t
|
|||
</div>
|
||||
|
||||
<div class="mt-3 flex flex-wrap gap-2">
|
||||
<x-filament::button size="sm" wire:click="runUpdate" :disabled="!$this->canRunUpdate()">
|
||||
<x-filament::button size="sm" wire:click="runUpdate" :disabled="!$supportCanRunUpdate">
|
||||
Lancia aggiornamento
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" color="warning" wire:click="runUpdateFallback" :disabled="!$this->canRunUpdate()">
|
||||
<x-filament::button size="sm" color="warning" wire:click="runUpdateFallback" :disabled="!$supportCanRunUpdate">
|
||||
Lancia aggiornamento (riserva)
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" color="info" wire:click="runUpdateConnectivityCheck">
|
||||
|
|
@ -548,10 +550,10 @@ class="inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium {{ $t
|
|||
<x-filament::button size="sm" color="gray" wire:click="reloadDashboardData">
|
||||
Aggiorna dati pagina
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" color="gray" wire:click="runMaintenanceOptimizeClear" :disabled="!$this->canRunUpdate()">
|
||||
<x-filament::button size="sm" color="gray" wire:click="runMaintenanceOptimizeClear" :disabled="!$supportCanRunUpdate">
|
||||
Pulisci cache remoto
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" color="gray" wire:click="runMaintenanceViewRebuild" :disabled="!$this->canRunUpdate()">
|
||||
<x-filament::button size="sm" color="gray" wire:click="runMaintenanceViewRebuild" :disabled="!$supportCanRunUpdate">
|
||||
Ricompila view remoto
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" color="gray" wire:click="refreshUpdateProgress" :disabled="!$this->updateInProgress">
|
||||
|
|
@ -581,7 +583,7 @@ class="inline-flex items-center rounded-md px-3 py-1.5 text-xs font-medium {{ $t
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@if(! $this->canRunUpdate())
|
||||
@if(! $supportCanRunUpdate)
|
||||
<div class="mt-2 text-[11px] text-amber-700">Permesso update non disponibile per il tuo ruolo.</div>
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user