селектор помещений из апи
This commit is contained in:
parent
df6991e2d8
commit
97a48aa657
@ -83,19 +83,19 @@ public function render()
|
||||
if (count($this->filter)) {
|
||||
foreach ($this->allObjects['data'] as $key => $room) {
|
||||
if ($room['access'] != 0) {
|
||||
if (array_key_exists('id', $this->filter) && $this->filter['id'] && $room['id'] != $this->filter['id']) {
|
||||
if (array_key_exists('id', $this->filter) && $this->filter['id'] !== null && $room['id'] != $this->filter['id']) {
|
||||
continue;
|
||||
}
|
||||
if (array_key_exists('bs', $this->filter) && $this->filter['bs'] && $room['bs'] != $this->filter['bs']) {
|
||||
if (array_key_exists('bs', $this->filter) && $this->filter['bs'] !== null && $room['bs'] != $this->filter['bs']) {
|
||||
continue;
|
||||
}
|
||||
if (array_key_exists('type', $this->filter) && $this->filter['type'] !== null && $room['type'] != $this->filter['type']) {
|
||||
continue;
|
||||
}
|
||||
if (array_key_exists('min_area', $this->filter) && $room['area'] < $this->filter['min_area']) {
|
||||
if (array_key_exists('min_area', $this->filter) && $this->filter['min_area'] !== null && $room['area'] < $this->filter['min_area']) {
|
||||
continue;
|
||||
}
|
||||
if (array_key_exists('max_area', $this->filter) && $room['area'] > $this->filter['max_area']) {
|
||||
if (array_key_exists('max_area', $this->filter) && $this->filter['max_area'] !== null && $room['area'] > $this->filter['max_area']) {
|
||||
continue;
|
||||
}
|
||||
$room['mode'] = 'room';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user