blob: 43ff2d475222d71f3209485834ec263a125fa2fa [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<td-steps mode="'vertical'">
<td-step #detailsStep label="{{'Center details' | translate}}" [state]="detailForm.valid ? 'complete' : detailForm.pristine ? 'none' : 'required'">
<form [formGroup]="detailForm" layout="column">
<fims-id-input [form]="detailForm" placeholder="External id" controlName="identifier" [readonly]="editMode"></fims-id-input>
<fims-text-input [form]="detailForm" controlName="firstName" placeholder="{{'Name' | translate}}"></fims-text-input>
</form>
<ng-template td-step-actions>
<fims-form-continue-action (onContinue)="officeStep.open()"></fims-form-continue-action>
</ng-template>
</td-step>
<td-step #officeStep label="{{'Assign office to center' | translate}}"
[state]="officeForm.get('assignedOffice').value ? 'complete' : 'none'">
<fims-select-list #officeList flex
[data]="offices"
id="identifier"
listIcon="store"
[preSelection]="officeForm.get('assignedOffice').value ? [officeForm.get('assignedOffice').value] : []"
(onSearch)="searchOffice($event)"
(onSelectionChange)="assignOffice($event)"
title="{{'Assigned Office' | translate}}"
noResultsMessage="{{'No office was found.' | translate}}"
noSelectionMessage="{{'No office assigned to employee, yet.' | translate}}">
</fims-select-list>
<br/>
<mat-form-field>
<mat-select placeholder="Select Staff">
<mat-option *ngFor="let staff of staffs" [value]="staff.value">
{{staff.viewValue}}
</mat-option>
</mat-select>
</mat-form-field>
<ng-template td-step-actions>
<fims-form-continue-action (onContinue)="contactStep.open()"></fims-form-continue-action>
</ng-template>
</td-step>
<td-step #officeStep label="{{'Assign group to center' | translate}}"
[state]="officeForm.get('assignedOffice').value ? 'complete' : 'none'">
<fims-select-list #officeList flex
title="{{'Assigned Group' | translate}}"
noResultsMessage="{{'No group was found.' | translate}}"
noSelectionMessage="{{'No group assigned to center, yet.' | translate}}">
</fims-select-list>
<ng-template td-step-actions>
<fims-form-continue-action (onContinue)="contactStep.open()"></fims-form-continue-action>
</ng-template>
</td-step>
<td-step label="{{'Final step' | translate}}" [state]="'complete'">
<ng-template td-step-summary>
<fims-form-final-action
[resourceName]="'CENTER'"
[editMode]="editMode"
[disabled]="formsInvalid()"
(onCancel)="cancel()"
(onSave)="save()">
</fims-form-final-action>
</ng-template>
</td-step>
</td-steps>