'title', 'text' => 'Titel', 'required' => true], ['key' => 'assignedTo', 'text' => 'Zugewiesen an', 'required' => true, 'table' => ['filter' => 'select', 'items' => []], 'modal' => ['type' => 'select', 'items' => []]], ['key' => 'actions', 'text' => 'Aktionen', 'required' => false, 'modal' => false, 'table' => ['filter' => false, 'sortable' => false, 'class' => 'text-center']], ]; protected array $additionalActions = [ ['key' => 'openHistory', 'title' => 'Historie', 'class' => 'fas fa-history text-primary'], ]; protected array $infoMessages = [ 'create' => 'Lagerort wurde erstellt', 'update' => 'Lagerort wurde aktualisiert', 'delete' => 'Lagerort wurde gelöscht', 'noChanges' => 'Keine Änderungen', ]; public function prepareCrudConfig() { $users = array_map(function($user) { return ['value' => $user->id, 'text' => $user->name]; }, UserModel::search(['employee' => true])); $this->columns[1]['modal']['items'] = $users; } protected function beforeUpdate($postData): bool { (new WarehouseHistoryController)->create($postData, $this->mod); return true; } protected function getHistoryAction() { $this->prepareCrudConfig(); self::returnJson((new WarehouseHistoryController)->getHistory($this->request->id, $this->mod, $this->columns)); } }