Client views updated
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
54dc91e0e2
commit
e09fccf14b
+19
-15
@@ -14,7 +14,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="23%">
|
||||
<mat-label>{{"labels.inputs.Legal Form" | translate}}</mat-label>
|
||||
<mat-select required formControlName="legalFormId">
|
||||
<mat-option *ngFor="let legalForm of legalFormOptions" [value]="legalForm.id">
|
||||
@@ -23,17 +23,13 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-form-field fxFlex="23%">
|
||||
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
|
||||
<input matInput formControlName="externalId">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.contains('fullname')" fxFlex="48%">
|
||||
<mat-label>{{ createClientForm.value.legalFormId === 1 ? 'Name' : 'Entity Name' }}</mat-label>
|
||||
<mat-label>{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Name', 'Entity Name']) | translate }}</mat-label>
|
||||
<input matInput required formControlName="fullname">
|
||||
<mat-error *ngIf="createClientForm.controls.fullname.hasError('required')">
|
||||
{{"labels.inputs.Client name" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
|
||||
@@ -73,18 +69,15 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="dateOfBirthDatePicker.open()">
|
||||
<mat-label>{{ createClientForm.value.legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }}</mat-label>
|
||||
<mat-label>{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Date of Birth', 'Incorporation Date']) | translate }}</mat-label>
|
||||
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth">
|
||||
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
|
||||
<input matInput formControlName="externalId">
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
|
||||
*ngIf="createClientForm.contains('clientNonPersonDetails')">
|
||||
|
||||
@@ -134,10 +127,21 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="createClientForm.value.legalFormId === 1" fxFlex="48%" labelPosition="before" formControlName="isStaff" class="margin-v">
|
||||
{{"labels.inputs.Is staff" | translate}}?
|
||||
</mat-checkbox>
|
||||
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.Mobile No" | translate}}</mat-label>
|
||||
<input matInput type="number" formControlName="mobileNo">
|
||||
|
||||
@@ -153,6 +153,10 @@ export class ClientGeneralStepComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getDateLabel(legalFormId: number, values: string[]): string {
|
||||
return legalFormId === 1 ? values[0] : values[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Client General Details
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,13 @@
|
||||
</span>
|
||||
</span>
|
||||
<br />
|
||||
<span *ngIf="clientViewData.mobileNo">
|
||||
<b>{{"labels.inputs.Mobile Number" | translate}}:</b><mifosx-external-identifier externalId="{{clientViewData.mobileNo}}" completed="true"></mifosx-external-identifier><br />
|
||||
</span>
|
||||
<span *ngIf="clientViewData.emailAddress">
|
||||
<b>{{"labels.inputs.Email" | translate}}:</b><mifosx-external-identifier externalId="{{clientViewData.emailAddress}}" completed="true"></mifosx-external-identifier><br />
|
||||
</span>
|
||||
<br />
|
||||
</p>
|
||||
</mat-card-subtitle>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<!-- Account no Column -->
|
||||
<ng-container matColumnDef="accountNumber">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Account No" | translate}}. </th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Account No" | translate}}</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<mifosx-account-number display="left" accountNo="{{row.accountNumber}}"></mifosx-account-number>
|
||||
</td>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="23%">
|
||||
<mat-label>{{"labels.inputs.Office" | translate}}</mat-label>
|
||||
<mat-select required formControlName="officeId">
|
||||
<mat-option *ngFor="let office of officeOptions" [value]="office.id">
|
||||
@@ -20,7 +20,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="23%">
|
||||
<mat-label>{{"labels.inputs.Legal Form" | translate}}</mat-label>
|
||||
<mat-select formControlName="legalFormId">
|
||||
<mat-option *ngFor="let legalForm of legalFormOptions" [value]="legalForm.id">
|
||||
@@ -29,22 +29,18 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="23%">
|
||||
<mat-label>{{"labels.inputs.Account No" | translate}}</mat-label>
|
||||
<input matInput formControlName="accountNo">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-form-field fxFlex="23%">
|
||||
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
|
||||
<input matInput formControlName="externalId">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="editClientForm.contains('fullname')" fxFlex="48%">
|
||||
<mat-label>{{ legalFormId === 1 ? 'Name' : 'Entity Name' }}</mat-label>
|
||||
<mat-label>{{ 'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate }}</mat-label>
|
||||
<input matInput required formControlName="fullname">
|
||||
<mat-error *ngIf="editClientForm.controls.fullname.hasError('required')">
|
||||
{{"labels.inputs.Client name" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
|
||||
@@ -72,6 +68,15 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="dateOfBirthDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.' + getDateLabel(legalFormId, ['Date of Birth', 'Incorporation Date']) | translate }}</mat-label>
|
||||
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth">
|
||||
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="legalFormId === 1" fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.Gender" | translate}}</mat-label>
|
||||
<mat-select formControlName="genderId">
|
||||
@@ -81,11 +86,13 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="dateOfBirthDatePicker.open()">
|
||||
<mat-label>{{ legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }}</mat-label>
|
||||
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth">
|
||||
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
|
||||
@@ -127,11 +134,6 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
|
||||
<input matInput formControlName="externalId">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="legalFormId === 1" fxFlex="48%" labelPosition="before" formControlName="isStaff" class="margin-v">
|
||||
{{"labels.inputs.Is staff" | translate}}?
|
||||
</mat-checkbox>
|
||||
|
||||
@@ -158,6 +158,10 @@ export class EditClientComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getDateLabel(legalFormId: number, values: string[]): string {
|
||||
return legalFormId === 1 ? values[0] : values[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Submits the edit client form.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user