plan7 selector - добавлена админка для сохранения api данных
This commit is contained in:
parent
ab1585d911
commit
23233b63a0
@ -22,6 +22,7 @@ class Plan7SelectorLivewire extends Component
|
||||
private $apiAll;
|
||||
public function mount()
|
||||
{
|
||||
$this->containerId = $this->containerId . '__' . $this->complexId;
|
||||
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;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<div class="">
|
||||
<div id="{{ $containerId }}">
|
||||
<!-- Button trigger modal -->
|
||||
<div class="d-flex flex-wrap justify-content-between align-self-start gap-2">
|
||||
@if($room)
|
||||
@ -30,8 +31,8 @@
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" wire:ignore.self id="plan7_selector_modal" tabindex="-1" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal fade" wire:ignore.self id="plan7_selector_modal" tabindex="-1"
|
||||
aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-xl modal-fullscreen-lg-down">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -44,8 +45,8 @@
|
||||
<div wire:loading.class="opacity-50" class="d-flex flex-wrap gap-3">
|
||||
<div class="col-12 col-md-7">
|
||||
@if(array_key_exists($room['pla'], $allObjects['pla']))
|
||||
<img src="{{ $allObjects['pla'][$room['pla']]['pla'] }}"
|
||||
class="img-fluid rounded-start" alt="...">
|
||||
<img src="{{ $allObjects['pla'][$room['pla']]['pla'] }}" class="img-fluid rounded-start"
|
||||
alt="...">
|
||||
@endif
|
||||
</div>
|
||||
<div class="col px-3">
|
||||
@ -98,7 +99,8 @@ class="fs-3 text-dark">{{ ($room['summ']) ? number_format($room['summ'], 0, '',
|
||||
<option></option>
|
||||
@foreach($summary as $typeSummary)
|
||||
@if(array_key_exists('type', $typeSummary))
|
||||
<option value="{{ $typeSummary['type'] }}">{{ $types[$typeSummary['type']] }}
|
||||
<option value="{{ $typeSummary['type'] }}">
|
||||
{{ $types[$typeSummary['type']] }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@ -193,7 +195,8 @@ class="form-control"
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 d-none d-sm-flex align-items-center overflow-hidden plan7-selector__image">
|
||||
<div
|
||||
class="col-md-4 d-none d-sm-flex align-items-center overflow-hidden plan7-selector__image">
|
||||
<img src="{{ array_key_exists($obj['pla'], $allObjects['pla']) ? $allObjects['pla'][$obj['pla']]['pla'] : '...' }}"
|
||||
style="" class="img-fluid rounded" alt="...">
|
||||
</div>
|
||||
@ -217,4 +220,5 @@ class="btn btn-secondary">Выбрать другое</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user