47 lines
2.8 KiB
PHP
47 lines
2.8 KiB
PHP
<?php
|
|
|
|
class WarehouseProjectController extends TTCrud {
|
|
protected string $headerTitle = 'Projekte';
|
|
protected string $createText = 'Neues Projekt erstellen';
|
|
protected string $singleText = 'Projekt';
|
|
|
|
//@formatter:off
|
|
protected array $columns = [
|
|
['key' => 'title', 'text' => 'Titel', 'required' => true],
|
|
['key' => 'description', 'text' => 'Projektbeschreibung', 'modal' => ['type' => 'textarea']],
|
|
|
|
['key' => 'startDate', 'text' => 'Startdatum', 'required' => true, 'modal' => ['type' => 'datepicker']],
|
|
['key' => 'endDate', 'text' => 'Enddatum', 'required' => true, 'modal' => ['type' => 'datepicker']],
|
|
['key' => 'positions', 'text' => 'Positionen', 'required' => true, 'modal' => ['type' => 'positions-manager', 'config' => [
|
|
'header' => 'Positionen',
|
|
'fields' => [
|
|
'articleId' => ['apiUrl' => '/WarehouseArticle/autoComplete','type' => 'autocomplete','customFieldReference' => 'WarehouseArticle','label' => 'Artikel'],
|
|
'amount' => ['type' => 'input', 'label' => 'Menge', 'inputType' => 'number'],
|
|
'purpose' => ['type' => 'input', 'label' => 'Zweck'],
|
|
],
|
|
'validateFormOptions' => [
|
|
['key' => 'articleId', 'message' => 'Bitte füllen Sie den Artikel aus'],
|
|
['key' => 'amount', 'message' => 'Bitte füllen Sie die Menge aus'],
|
|
['key' => 'purpose', 'message' => 'Bitte füllen Sie den Zweck aus'],
|
|
],
|
|
]], 'table' => false],
|
|
['key' => 'linkedOrderIds', 'text' => 'Verlinkte Bestellung', 'modal' => false],
|
|
//
|
|
['key' => 'assignedPersons', 'text' => 'Zugewiesene Personen', 'modal' => ['type' => 'positions-manager', 'config' => [
|
|
'header' => 'Zugewiesene Personen',
|
|
'fields' => [
|
|
'userId' => ['apiUrl' => '/WarehouseShippingNote/userAutoComplete','type' => 'autocomplete','label' => 'Person','customFieldReference' => 'User']
|
|
],
|
|
'validateFormOptions' => [
|
|
['key' => 'userId', 'message' => 'Bitte füllen Sie die Person aus'],
|
|
],
|
|
]], 'table' => false],
|
|
|
|
['key' => 'storageLocation', 'text' => 'Lagerort', 'modal' => ['type' => 'input']],
|
|
['key' => 'note', 'text' => 'Notiz', 'modal' => ['type' => 'textarea']],
|
|
['key' => 'createBy', 'text' => 'Erstellt von', 'required' => true, 'modal' => ['visible' => false, 'type' => 'select'], 'table' => ['filter' => 'select']],
|
|
['key' => 'create', 'text' => 'Erstellt', 'required' => true, 'modal' => false],
|
|
['key' => 'actions', 'text' => 'Aktionen', 'required' => false, 'modal' => false, 'table' => ['filter' => false, 'sortable' => false, 'class' => 'text-center']],
|
|
];
|
|
//@formatter:on
|
|
} |