blob: cf578dbfe3ffce77c2c336655f534d828f23f432 [file] [log] [blame]
<!-- /********************************************************************************
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* 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
********************************************************************************/ -->
<app-card-layout>
<div header>
<span>{{ 'External.Title' | translate }}</span>
</div>
<div class="contacts-grid-wrapper" body>
<form [ngrxFormState]="externalPersonSandBox.externPersonDetailsFormState$ | async">
<div>
<!-- firstName -->
<div class="form-group row">
<label for="firstName" class="col-sm-2 col-form-label">{{ 'External.FirstName' | translate }}</label>
<div class="col-sm-4">
<input
type="text"
maxlength="255"
class="form-control"
id="firstName"
[ngrxFormControlState]="((externalPersonSandBox.externPersonDetailsFormState$ | async)?.controls)['firstName']"
autocomplete="off"
/>
</div>
</div>
<!-- lastName -->
<div class="form-group row">
<label for="lastName" class="col-sm-2 col-form-label">{{ 'External.LastName' | translate }}</label>
<div class="col-sm-4">
<input
required
type="text"
maxlength="255"
class="form-control"
id="lastName"
[ngrxFormControlState]="((externalPersonSandBox.externPersonDetailsFormState$ | async)?.controls)['lastName']"
autocomplete="off"
/>
</div>
</div>
<!-- title -->
<div class="form-group row">
<label for="title" class="col-sm-2 col-form-label">{{ 'External.PersonTitle' | translate }}</label>
<div class="col-sm-4">
<input
type="text"
maxlength="255"
class="form-control"
id="title"
[ngrxFormControlState]="((externalPersonSandBox.externPersonDetailsFormState$ | async)?.controls)['title']"
autocomplete="off"
/>
</div>
</div>
<!-- salutation -->
<div class="form-group row">
<label for="salutationType" class="col-sm-2 col-form-label">{{ 'External.Salutation' | translate }}</label>
<div class="col-sm-4">
<select
type="text"
class="form-control"
[ngrxFormControlState]="((externalPersonSandBox.externPersonDetailsFormState$ | async)?.controls)['salutationId']">
<option [value]="">{{ 'SelectOption' | translate }}</option> -->
<option *ngFor="let salutation of salutationSandBox.salutations$ | async" [value]="salutation.id">{{salutation.type}}</option>
</select>
</div>
</div>
<!-- personType -->
<div class="form-group row">
<label for="personType" class="col-sm-2 col-form-label">{{ 'External.PersonType' | translate }}</label>
<!-- <div class="col-sm-4">
<select
type="text"
class="form-control"
[ngrxFormControlState]="((externalPersonSandBox.externPersonDetailsFormState$ | async)?.controls)['personTypeId']">
<option [value]="">{{ 'SelectOption' | translate }}</option>
<option *ngFor="let personType of externalPersonSandBox.personTypes$ | async" [value]="personType.id">{{personType.type}}</option>
</select>
</div> -->
<div class="col-sm-4">
<input
type="text"
class="form-control"
id="personType"
[ngrxFormControlState]="((externalPersonSandBox.externPersonDetailsFormState$ | async)?.controls)['personType']"
autocomplete="off"
/>
</div>
</div>
<!-- contactNote -->
<div class="form-group row">
<label for="contactNote" class="col-sm-2 col-form-label">{{ 'External.Note' | translate }}</label>
<div class="col-sm-4">
<input
type="text"
maxlength="255"
class="form-control"
id="contactNote"
[ngrxFormControlState]="((externalPersonSandBox.externPersonDetailsFormState$ | async)?.controls)['contactNote']"
autocomplete="off"
/>
</div>
</div>
<!-- buttons -->
<button type="button" class="btn btn-success" (click)="externalPersonSandBox.persistExternalPerson()">{{ 'SaveBtn' | translate }}</button>
<button type="button" class="btn btn-primary cancel-button" routerLink="/overview">
{{ 'CancelBtn' | translate }}
</button>
</div>
</form>
<app-expandable>
<span header>{{ 'Contacts.AddressList' | translate }}</span>
<div class="expandable-body-container" body>
<div class="tableDetailView" *ngIf="externalPersonSandBox.isAddressDetailViewVisible">
<app-address-details [putOrPostAddress]="putOrPostAddress"></app-address-details>
</div>
<div class="tableView">
<app-address-list (externalPersonDetailsId)="loadAddressDetail($event)" (createNewExternalPerson)="loadAddressDetail($event)"></app-address-list>
</div>
</div>
</app-expandable>
<app-expandable>
<span header>{{ 'Contacts.CommunicationsDataList' | translate }}</span>
<div class="expandable-body-container" body>
<div class="tableDetailView" *ngIf="externalPersonSandBox.isCommunicationsDataDetailViewVisible">
<app-external-person-communications-data-details [createOrEditCommunicationsData]="createOrEditCommunicationsData"></app-external-person-communications-data-details>
</div>
<div class="tableView">
<app-external-person-communications-data-list (externalPersonDetailsId)="loadCommunicationsDataDetail($event)" (createNewExternalPerson)="loadCommunicationsDataDetail($event)"></app-external-person-communications-data-list>
</div>
</div>
</app-expandable>
</div>
</app-card-layout>