contractOf($this->customer()); // Geklemmt an der tatsächlich noch buchbaren Menge, nicht an der // absoluten Grenze: ein Vertrag, der schon einen Block hält, darf im // Dialog nicht mehr versprechen, als purchase() nachher wirklich in // den Warenkorb legt. $max = $catalogue->bookableQuantity($subscription, AddonCatalogue::STORAGE); $this->packs = max(1, min($max, $packs)); $this->packGb = $catalogue->packGb(); } public function proceed(): void { $this->dispatch('storage-packs-confirmed', packs: $this->packs); $this->closeModal(); } public function render() { return view('livewire.confirm-book-storage'); } }