blob: 15b9e1e8239f41ff30b5db687c4989394d40fdd2 [file] [log] [blame]
<!--
/********************************************************************************
* Copyright © 2018 Mettenmeier GmbH.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
-->
<div class="container-fluid">
<form class="mt-3" [formGroup]="form" novalidate>
<div class="row mt-3 mb-3" *ngIf="!isModal">
<div class="col-md-12">
<button *ngIf="authService.userHasRoles(['BP_Sachbearbeiter','BP_Admin'])" class="btn btn-success"
(click)="saveRegion()" id="regionSave">Speichern</button>
<button class="btn btn-danger float-right" (click)="close()" id="regionCancel">Abbrechen</button>
</div>
</div>
<ngb-accordion #acc="ngbAccordion" activeIds="userdata,locationData,functionData">
<!-- DATEN -->
<ngb-panel title="Regionen" id="userdata">
<ng-template ngbPanelContent>
<div class="row">
<div [ngClass]="{'col-md-6': !isModal, 'col-md-12': isModal}">
<div class="form-group row">
<label for="regionName" class="col-sm-3 col-form-label">Name</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="regionName" placeholder="Name" formControlName="regionName"
required>
<ok-error [control]="form.controls['regionName']"></ok-error>
</div>
</div>
</div>
</div>
</ng-template>
</ngb-panel>
<ngb-panel title="Lokationen" id="locationData" *ngIf="!isModal">
<ng-template ngbPanelContent>
<div class="row">
<div class="col-md-12">
<ok-picklist-reactive [sourceList]="sourceLocation" [targetList]="targetLocation" headlineSource="Lokationen"
headlineTarget="ausgewählte Lokationen" [sourceListColumnDefs]="columnDefsLocation"
[targetListColumnDefs]="columnDefsLocation" (moveToTargetClicked)="moveToTargetLocation($event)"
(moveToSourceClicked)="moveToSourceLocation($event)" id="regionPicklistLocation"></ok-picklist-reactive>
</div>
</div>
</ng-template>
</ngb-panel>
</ngb-accordion>
<div class="row mt-3 mb-3">
<div class="col-md-12">
<button *ngIf="authService.userHasRoles(['BP_Sachbearbeiter','BP_Admin'])" class="btn btn-success"
(click)="saveRegion()" id="regionSave">Speichern</button>
<button class="btn btn-danger float-right" (click)="close()" id="regionCancel">Abbrechen</button>
</div>
</div>
</form>
</div>