fix(engine-b): stop customer dashboard polling once provisioning failed

Show the failure state but only poll while pending/running/waiting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat/portal-design
nexxo 2026-07-25 13:06:31 +02:00
parent 66e8a4bbf6
commit 96aceeeaa1
2 changed files with 13 additions and 4 deletions

View File

@ -39,12 +39,21 @@ class CustomerProvisioning extends Component
public function render()
{
$run = $this->currentRun();
$active = $run !== null && $run->status !== ProvisioningRun::STATUS_COMPLETED;
// Show the card while provisioning is in flight OR terminally failed; but
// only POLL while it can still change (terminal failed must not poll forever).
$show = $run !== null && $run->status !== ProvisioningRun::STATUS_COMPLETED;
$polling = $run !== null && in_array($run->status, [
ProvisioningRun::STATUS_PENDING,
ProvisioningRun::STATUS_RUNNING,
ProvisioningRun::STATUS_WAITING,
], true);
return view('livewire.customer-provisioning', [
'active' => $active,
'active' => $show,
'polling' => $polling,
'failed' => $run?->status === ProvisioningRun::STATUS_FAILED,
'steps' => $active ? $this->buildRunSteps($run) : [],
'steps' => $show ? $this->buildRunSteps($run) : [],
]);
}
}

View File

@ -1,4 +1,4 @@
<div @if ($active) wire:poll.4s @endif>
<div @if ($polling) wire:poll.4s @endif>
@if ($active)
<div class="rounded-xl border border-line bg-surface p-5 shadow-xs animate-rise">
<div class="flex items-center gap-2">