plan7 selector - добавлена админка для сохранения api данных

This commit is contained in:
developer 2026-04-03 12:02:02 +08:00
parent 3feb34293e
commit 53f2914d27

View File

@ -25,6 +25,9 @@ class Plan7SelectorLivewire extends Component
public function mount()
{
$this->containerId = $this->containerId . '__' . $this->complexId;
$this->load();
}
public function load() {
if ($plan7ApiData = Complex::find($this->complexId)->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;
@ -32,10 +35,10 @@ public function mount()
$this->getData();
}
}
public function updated($property, $value)
public function updating($property, $value)
{
if ($property === 'complexId') {
$this->mount();
if ($property == 'complexId') {
$this->load();
}
}