Require package reinstall after industry change and wipe old queues.
Deploy Ladill Queue / deploy (push) Successful in 1m5s

Changing industry now flags a pending reinstall with an app banner; reinstall clears queues, tickets, and service points before applying the new template.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 20:10:25 +00:00
co-authored by Cursor
parent f1edf8a19e
commit a2d5a8affd
5 changed files with 276 additions and 29 deletions
+32
View File
@@ -22,6 +22,38 @@
</div>
@endif
@auth
@php
$industryBannerOrg = app(\App\Services\Qms\OrganizationResolver::class)->resolveForUser(auth()->user());
$industryNeedsReinstall = $industryBannerOrg
&& \App\Services\Qms\Industry\IndustryPackageInstaller::needsReinstall($industryBannerOrg);
$industryCanManage = $industryNeedsReinstall
&& app(\App\Services\Qms\QmsPermissions::class)->can(
app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user(), $industryBannerOrg),
'settings.manage'
);
$industrySelectedLabel = $industryNeedsReinstall
? (app(\App\Services\Qms\Industry\IndustryPackageRegistry::class)
->get((string) data_get($industryBannerOrg->settings, 'industry'))
?->label() ?? data_get($industryBannerOrg->settings, 'industry'))
: null;
@endphp
@if ($industryCanManage && ! request()->routeIs('qms.settings.*'))
<div class="mb-4 rounded-xl border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-950 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-100">
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
<div>
<p class="font-semibold">Reinstall industry package required</p>
<p class="mt-1">
Industry is set to <span class="font-medium">{{ $industrySelectedLabel }}</span>, but the installed queues still match the previous template.
Reinstall to clear old queues and apply the new package.
</p>
</div>
<a href="{{ route('qms.settings.edit') }}" class="btn-primary shrink-0 text-sm">Open settings</a>
</div>
</div>
@endif
@endauth
@if ($errors->any())
<div class="mb-4 rounded-lg bg-red-50 border border-red-200 p-4">
<p class="text-sm font-medium text-red-800">Please fix the following:</p>