plan7 selector - добавлена админка для сохранения api данных
This commit is contained in:
parent
71e9b17389
commit
20758a24aa
@ -12,6 +12,7 @@ class Plan7SelectorLivewire extends Component
|
|||||||
public $mode = 'new';
|
public $mode = 'new';
|
||||||
#[Reactive]
|
#[Reactive]
|
||||||
public $complexId;
|
public $complexId;
|
||||||
|
public $complexName;
|
||||||
public $containerId = 'plan7__selector';
|
public $containerId = 'plan7__selector';
|
||||||
public $filter = [];
|
public $filter = [];
|
||||||
|
|
||||||
@ -32,7 +33,9 @@ public function mount()
|
|||||||
public function load() {
|
public function load() {
|
||||||
$this->room = false;
|
$this->room = false;
|
||||||
$this->filter = [];
|
$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->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->apiAll = 'https://plan7.ru/catalog/exp/json/?token=' . $plan7ApiData->token . '&zk=' . $plan7ApiData->zk;
|
||||||
$this->getSummary();
|
$this->getSummary();
|
||||||
@ -76,7 +79,7 @@ public function setHouse($id)
|
|||||||
|
|
||||||
public function setRoom($id)
|
public function setRoom($id)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->room = $this->allObjects['data'][$id];
|
$this->room = $this->allObjects['data'][$id];
|
||||||
}
|
}
|
||||||
public function unsetRoom() {
|
public function unsetRoom() {
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<div class="modal-dialog modal-dialog-scrollable modal-xl modal-fullscreen-lg-down">
|
<div class="modal-dialog modal-dialog-scrollable modal-xl modal-fullscreen-lg-down">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h1 class="modal-title fs-5" id="exampleModalLabel">Выбор помещения</h1>
|
<h1 class="modal-title fs-5 text-dark" id="exampleModalLabel">Выбор помещения в {{ $complexName }}</h1>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user