blob: 34385b500d21953c4b796baea2454c199a5810cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
/**
* @var Consultation_AdminController $controller
* @var Trails\Flash $flash
* @var string|null $room
* @var array $responsible
* @var Range $range
* @var int $slot_count_threshold
*/
$convertResponsibilities = function ($input) {
if ($input === false) {
return json_encode(false);
}
foreach ($input as $key => $values) {
$input[$key] = array_map(
fn($item) => ['id' => $item->id, 'label' => $item instanceof Statusgruppen ? $item->getName() : $item->getFullName()],
$values
);
}
return json_encode($input);
}
?>
<div data-vue-app="<?= htmlReady(json_encode(['components' => ['ConsultationCreator']])) ?>"
is="ConsultationCreator"
cancel-url="<?= $controller->indexURL() ?>"
store-url="<?= $controller->storeURL() ?>"
:with-responsible="<?= htmlReady($convertResponsibilities($responsible)) ?>"
range-type="<?= get_class($range) ?>"
default-room="<?= htmlReady($room) ?>"
:slot-count-threshold="<?= htmlReady($slot_count_threshold) ?>"
:as-dialog="<?= json_encode(Request::isXhr()) ?>"
></div>
|