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
parent
66e8a4bbf6
commit
96aceeeaa1
|
|
@ -39,12 +39,21 @@ class CustomerProvisioning extends Component
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
$run = $this->currentRun();
|
$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', [
|
return view('livewire.customer-provisioning', [
|
||||||
'active' => $active,
|
'active' => $show,
|
||||||
|
'polling' => $polling,
|
||||||
'failed' => $run?->status === ProvisioningRun::STATUS_FAILED,
|
'failed' => $run?->status === ProvisioningRun::STATUS_FAILED,
|
||||||
'steps' => $active ? $this->buildRunSteps($run) : [],
|
'steps' => $show ? $this->buildRunSteps($run) : [],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div @if ($active) wire:poll.4s @endif>
|
<div @if ($polling) wire:poll.4s @endif>
|
||||||
@if ($active)
|
@if ($active)
|
||||||
<div class="rounded-xl border border-line bg-surface p-5 shadow-xs animate-rise">
|
<div class="rounded-xl border border-line bg-surface p-5 shadow-xs animate-rise">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue