Refactor Bird voice call route with streamlined call flow, department options listing, and removed redundant methods. Adjust self-serve lane command invoicing logic for better sequence clarity.

This commit is contained in:
Jeppe Bundgaard
2026-03-26 18:29:21 +01:00
parent b0ed00cb0c
commit 0d825fb45a
3 changed files with 30 additions and 57 deletions
@@ -324,10 +324,6 @@ trait selfserve_lane_command_t
}
// Snapshot program selector state before relay shutdown.
$program_selector_on = $this->isProgramSelectorRelayOnForStop();
// Invoice the customer
$this->invoice();
// If program selector was ON, add vehicle-type product to the self-serve order.
$this->addVehicleTypeProductToInvoiceIfNeeded($program_selector_on);
// Open the exit port
$this->open(selfserve_lane_port::EXIT);
// Turn off configured relays in deterministic order.
@@ -336,6 +332,10 @@ trait selfserve_lane_command_t
$this->logLaneAction(selfserve_lane_log_action::STOP_WASH);
// Finalize any active self-serve wash session before resetting lane state.
$this->completeLatestSessionForStop();
// Invoice the customer
$this->invoice();
// If program selector was ON, add vehicle-type product to the self-serve order.
$this->addVehicleTypeProductToInvoiceIfNeeded($program_selector_on);
// Reset the lane
self::execute(selfserve_lane_command::RESET, new selfserve_lane_command_arguments());
break;
@@ -70,9 +70,9 @@ trait selfserve_lane_port_controller_t
throw new \Exception("Invalid relay ID for port {$port->name}");
}
if ($this->isDemoPortRelayId((string)$relay_id)) {
return true;
}
//if ($this->isDemoPortRelayId((string)$relay_id)) {
// return true;
//}
$device = $this->createShellySwitchDevice();
$device->id = (string)$relay_id;