plan7 selector - добавлена админка для сохранения api данных
This commit is contained in:
parent
3feb34293e
commit
53f2914d27
@ -25,6 +25,9 @@ class Plan7SelectorLivewire extends Component
|
|||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->containerId = $this->containerId . '__' . $this->complexId;
|
$this->containerId = $this->containerId . '__' . $this->complexId;
|
||||||
|
$this->load();
|
||||||
|
}
|
||||||
|
public function load() {
|
||||||
if ($plan7ApiData = Complex::find($this->complexId)->getPlan7ApiData()) {
|
if ($plan7ApiData = Complex::find($this->complexId)->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;
|
||||||
@ -32,10 +35,10 @@ public function mount()
|
|||||||
$this->getData();
|
$this->getData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function updated($property, $value)
|
public function updating($property, $value)
|
||||||
{
|
{
|
||||||
if ($property === 'complexId') {
|
if ($property == 'complexId') {
|
||||||
$this->mount();
|
$this->load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user