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 @@