From 20758a24aad1082df88b2b6da581ce9b61854a68 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 3 Apr 2026 13:42:16 +0800 Subject: [PATCH] =?UTF-8?q?plan7=20selector=20-=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BE=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20api=20=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Modules/Plan7/Http/Livewire/Plan7SelectorLivewire.php | 7 +++++-- app/Modules/Plan7/Views/livewire/selector.blade.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Modules/Plan7/Http/Livewire/Plan7SelectorLivewire.php b/app/Modules/Plan7/Http/Livewire/Plan7SelectorLivewire.php index 4bd5d5b..b98a016 100644 --- a/app/Modules/Plan7/Http/Livewire/Plan7SelectorLivewire.php +++ b/app/Modules/Plan7/Http/Livewire/Plan7SelectorLivewire.php @@ -12,6 +12,7 @@ class Plan7SelectorLivewire extends Component public $mode = 'new'; #[Reactive] public $complexId; + public $complexName; public $containerId = 'plan7__selector'; public $filter = []; @@ -32,7 +33,9 @@ public function mount() public function load() { $this->room = false; $this->filter = []; - if ($plan7ApiData = Complex::find($this->complexId)->getPlan7ApiData()) { + $complex = Complex::find($this->complexId); + $this->complexName = $complex->name; + if ($plan7ApiData = $complex->getPlan7ApiData()) { $this->apiSummary = 'https://plan7.ru/catalog/exp/json/summary/?token=' . $plan7ApiData->token . '&zk=' . $plan7ApiData->zk; $this->apiAll = 'https://plan7.ru/catalog/exp/json/?token=' . $plan7ApiData->token . '&zk=' . $plan7ApiData->zk; $this->getSummary(); @@ -76,7 +79,7 @@ public function setHouse($id) public function setRoom($id) { - + $this->room = $this->allObjects['data'][$id]; } public function unsetRoom() { diff --git a/app/Modules/Plan7/Views/livewire/selector.blade.php b/app/Modules/Plan7/Views/livewire/selector.blade.php index 30fc018..788798f 100644 --- a/app/Modules/Plan7/Views/livewire/selector.blade.php +++ b/app/Modules/Plan7/Views/livewire/selector.blade.php @@ -35,7 +35,7 @@