Upgrading to Angular 20:
Replaced checked in package-lock.json by regenerated one. Ran ng update @angular/core@20 @angular/cli@20 Ran npm install @angular-builders/jest@^20.0.0 @fortawesome/angular-fontawesome@^3.0.0 @swimlane/ngx-graph@^11 Ran npm install ngx-mat-select-search@^8.0.2. Ran ng update @angular/material@20. Updated all eslint and typescript to the latest versions. Removed @angular-devkit/schematics. Updated fontawesome. Updated rxjs and tslib. Moved required node version from 16 to 20. Updated jest-preset-angular. Set preserveWhitespaces to false. Corrected two type declarations in two typescript files to make ng serve run without errors. Removed unused angular-devkit/schematics from view-user.component.ts . Updated list of supported browsers. Upgraded prettier. Ran prettier . --write the first time. Ran prettier . --write the second time. Ran ng generate @angular/core:inject with defaults, excepted a handful of files. Fixed remaining eslint problems. Added dist directory to ignores in eslint.config.js. Let prettier fix formatting, almost everything is just line breaks. Made htmlhint ignore @if and @for Angular constructs. Updated node version in Github workflow to 22.12.0 (build.yml). Updated .env.ts. Updated Angular datetime format strings from YYYY-MM-DD to yyyy-MM-dd. Merged changes from dev into angular20 branch.
This commit is contained in:
+64
-58
@@ -7,64 +7,70 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<mat-accordion *ngIf="clientAddressData.length > 0">
|
||||
<mat-expansion-panel *ngFor="let address of clientAddressData; index as i" class="address">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }}
|
||||
</mat-panel-title>
|
||||
|
||||
<mat-panel-description>
|
||||
{{ address.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<div class="address-actions layout-row align-end align-items-center">
|
||||
<button mat-button color="primary" (click)="editAddress(address, i)">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
</button>
|
||||
<button mat-button color="warn" (click)="deleteAddress(address, i)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
<mat-slide-toggle [checked]="address.isActive" (change)="toggleAddress(address)"></mat-slide-toggle>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<span *ngIf="isFieldEnabled('street')"
|
||||
>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine1')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine2')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine3')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('townVillage')"
|
||||
>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('city')">{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
|
||||
<span *ngIf="isFieldEnabled('stateProvinceId')"
|
||||
>{{ 'labels.inputs.State / Province' | translate }} :
|
||||
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('countryId')"
|
||||
>{{ 'labels.inputs.Country' | translate }} : {{ getSelectedValue('countryIdOptions', address.countryId)?.name
|
||||
}}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('postalCode')"
|
||||
>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('isActive')"
|
||||
>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br
|
||||
/></span>
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
@if (clientAddressData.length > 0) {
|
||||
<mat-accordion>
|
||||
@for (address of clientAddressData; track address; let i = $index) {
|
||||
<mat-expansion-panel class="address">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ address.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-divider></mat-divider>
|
||||
<div class="address-actions layout-row align-end align-items-center">
|
||||
<button mat-button color="primary" (click)="editAddress(address, i)">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
</button>
|
||||
<button mat-button color="warn" (click)="deleteAddress(address, i)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
<mat-slide-toggle [checked]="address.isActive" (change)="toggleAddress(address)"></mat-slide-toggle>
|
||||
</div>
|
||||
<p>
|
||||
@if (isFieldEnabled('street')) {
|
||||
<span>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine1')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine2')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine3')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('townVillage')) {
|
||||
<span>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('city')) {
|
||||
<span>{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('stateProvinceId')) {
|
||||
<span
|
||||
>{{ 'labels.inputs.State / Province' | translate }} :
|
||||
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
|
||||
/></span>
|
||||
}
|
||||
@if (isFieldEnabled('countryId')) {
|
||||
<span
|
||||
>{{ 'labels.inputs.Country' | translate }} :
|
||||
{{ getSelectedValue('countryIdOptions', address.countryId)?.name }}<br
|
||||
/></span>
|
||||
}
|
||||
@if (isFieldEnabled('postalCode')) {
|
||||
<span>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('isActive')) {
|
||||
<span>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br /></span>
|
||||
}
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
}
|
||||
</mat-accordion>
|
||||
}
|
||||
|
||||
<div class="layout-row align-center gap-2percent margin-t responsive-column">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, inject } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
/** Custom Models */
|
||||
@@ -46,6 +46,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientAddressStepComponent {
|
||||
private dialog = inject(MatDialog);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Client Address Field Config */
|
||||
@Input() clientAddressFieldConfig: any;
|
||||
/** Client Template */
|
||||
@@ -58,10 +61,7 @@ export class ClientAddressStepComponent {
|
||||
* @param {MatDialog} dialog Mat Dialog
|
||||
* @param {TranslateService} translateService Translate Service.
|
||||
*/
|
||||
constructor(
|
||||
private dialog: MatDialog,
|
||||
private translateService: TranslateService
|
||||
) {
|
||||
constructor() {
|
||||
this.clientAddressData = [];
|
||||
}
|
||||
|
||||
|
||||
+44
-53
@@ -1,58 +1,49 @@
|
||||
<form [formGroup]="datatableForm">
|
||||
<div class="layout-row-wrap gap-2px responsive-column">
|
||||
<div *ngFor="let datatableInput of datatableInputs" class="flex-48">
|
||||
<mat-form-field class="flex-100" *ngIf="!isBoolean(datatableInput.columnDisplayType)">
|
||||
<mat-label>{{ getInputName(datatableInput) }}</mat-label>
|
||||
|
||||
<mat-select
|
||||
*ngIf="isDropdown(datatableInput.columnDisplayType)"
|
||||
formControlName="{{ datatableInput.controlName }}"
|
||||
>
|
||||
<mat-option *ngFor="let code of datatableInput.columnValues" [value]="code.id">
|
||||
{{ code.value }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<input
|
||||
matInput
|
||||
type="number"
|
||||
*ngIf="isNumeric(datatableInput.columnDisplayType)"
|
||||
formControlName="{{ datatableInput.controlName }}"
|
||||
/>
|
||||
|
||||
<input
|
||||
matInput
|
||||
*ngIf="isString(datatableInput.columnDisplayType)"
|
||||
formControlName="{{ datatableInput.controlName }}"
|
||||
/>
|
||||
|
||||
<textarea
|
||||
matInput
|
||||
*ngIf="isText(datatableInput.columnDisplayType)"
|
||||
formControlName="{{ datatableInput.controlName }}"
|
||||
></textarea>
|
||||
|
||||
<span *ngIf="isDate(datatableInput.columnDisplayType)" (click)="datePicker.open()">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="datePicker"
|
||||
formControlName="{{ datatableInput.controlName }}"
|
||||
class="date-picker"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #datePicker></mat-datepicker>
|
||||
</span>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox
|
||||
*ngIf="isBoolean(datatableInput.columnDisplayType)"
|
||||
formControlName="{{ datatableInput.controlName }}"
|
||||
labelPosition="before"
|
||||
class="margin-v"
|
||||
>
|
||||
{{ getInputName(datatableInput) }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
@for (datatableInput of datatableInputs; track datatableInput) {
|
||||
<div class="flex-48">
|
||||
@if (!isBoolean(datatableInput.columnDisplayType)) {
|
||||
<mat-form-field class="flex-100">
|
||||
<mat-label>{{ getInputName(datatableInput) }}</mat-label>
|
||||
@if (isDropdown(datatableInput.columnDisplayType)) {
|
||||
<mat-select formControlName="{{ datatableInput.controlName }}">
|
||||
@for (code of datatableInput.columnValues; track code) {
|
||||
<mat-option [value]="code.id">
|
||||
{{ code.value }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
}
|
||||
@if (isNumeric(datatableInput.columnDisplayType)) {
|
||||
<input matInput type="number" formControlName="{{ datatableInput.controlName }}" />
|
||||
}
|
||||
@if (isString(datatableInput.columnDisplayType)) {
|
||||
<input matInput formControlName="{{ datatableInput.controlName }}" />
|
||||
}
|
||||
@if (isText(datatableInput.columnDisplayType)) {
|
||||
<textarea matInput formControlName="{{ datatableInput.controlName }}"></textarea>
|
||||
}
|
||||
@if (isDate(datatableInput.columnDisplayType)) {
|
||||
<span (click)="datePicker.open()">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="datePicker"
|
||||
formControlName="{{ datatableInput.controlName }}"
|
||||
class="date-picker"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #datePicker></mat-datepicker>
|
||||
</span>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
@if (isBoolean(datatableInput.columnDisplayType)) {
|
||||
<mat-checkbox formControlName="{{ datatableInput.controlName }}" labelPosition="before" class="margin-v">
|
||||
{{ getInputName(datatableInput) }}
|
||||
</mat-checkbox>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="layout-row align-center gap-2percent margin-t responsive-column">
|
||||
|
||||
+5
-7
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
@@ -26,6 +26,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientDatatableStepComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private settingsService = inject(SettingsService);
|
||||
private datatableService = inject(Datatables);
|
||||
|
||||
/** Input Fields Data */
|
||||
@Input() datatableData: any;
|
||||
/** Create Input Form */
|
||||
@@ -33,12 +37,6 @@ export class ClientDatatableStepComponent implements OnInit {
|
||||
|
||||
datatableInputs: any = [];
|
||||
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private settingsService: SettingsService,
|
||||
private datatableService: Datatables
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.datatableInputs = this.datatableService.filterSystemColumns(this.datatableData.columnHeaderData);
|
||||
const inputItems: any = {};
|
||||
|
||||
+44
-28
@@ -5,10 +5,12 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
|
||||
<input formControlName="firstName" required matInput />
|
||||
<mat-error *ngIf="familyMemberForm.controls.firstName.hasError('required')">
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (familyMemberForm.controls.firstName.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
@@ -19,10 +21,12 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
|
||||
<input formControlName="lastName" required matInput />
|
||||
<mat-error *ngIf="familyMemberForm.controls.lastName.hasError('required')">
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (familyMemberForm.controls.lastName.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
@@ -42,44 +46,56 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Relationship' | translate }}</mat-label>
|
||||
<mat-select formControlName="relationshipId" required>
|
||||
<mat-option *ngFor="let relation of data.options.relationshipIdOptions" [value]="relation.id">
|
||||
{{ relation.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (relation of data.options.relationshipIdOptions; track relation) {
|
||||
<mat-option [value]="relation.id">
|
||||
{{ relation.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="familyMemberForm.controls.relationshipId.hasError('required')">
|
||||
{{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (familyMemberForm.controls.relationshipId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Gender' | translate }}</mat-label>
|
||||
<mat-select formControlName="genderId" required>
|
||||
<mat-option *ngFor="let gender of data.options.genderIdOptions" [value]="gender.id">
|
||||
{{ gender.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (gender of data.options.genderIdOptions; track gender) {
|
||||
<mat-option [value]="gender.id">
|
||||
{{ gender.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="familyMemberForm.controls.genderId.hasError('required')">
|
||||
{{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (familyMemberForm.controls.genderId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Profession' | translate }}</mat-label>
|
||||
<mat-select formControlName="professionId">
|
||||
<mat-option *ngFor="let profession of data.options.professionIdOptions" [value]="profession.id">
|
||||
{{ profession.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (profession of data.options.professionIdOptions; track profession) {
|
||||
<mat-option [value]="profession.id">
|
||||
{{ profession.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Marital Status' | translate }}</mat-label>
|
||||
<mat-select formControlName="maritalStatusId">
|
||||
<mat-option *ngFor="let maritalStatus of data.options.maritalStatusIdOptions" [value]="maritalStatus.id">
|
||||
{{ maritalStatus.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (maritalStatus of data.options.maritalStatusIdOptions; track maritalStatus) {
|
||||
<mat-option [value]="maritalStatus.id">
|
||||
{{ maritalStatus.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
+7
-16
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -31,27 +31,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientFamilyMemberDialogComponent implements OnInit {
|
||||
dialogRef = inject<MatDialogRef<ClientFamilyMemberDialogComponent>>(MatDialogRef);
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private dateUtils = inject(Dates);
|
||||
data = inject(MAT_DIALOG_DATA);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Maximum Due Date allowed. */
|
||||
maxDate = new Date();
|
||||
|
||||
/** Add/Edit family member form. */
|
||||
familyMemberForm: UntypedFormGroup;
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Client Family Member Dialog Reference
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
* @param {Dates} dateUtils Date Utils
|
||||
* @param {any} data Dialog Data
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<ClientFamilyMemberDialogComponent>,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private dateUtils: Dates,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||
private settingsService: SettingsService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.createFamilyMemberForm();
|
||||
|
||||
+40
-42
@@ -8,48 +8,46 @@
|
||||
</div>
|
||||
|
||||
<mat-accordion>
|
||||
<mat-expansion-panel *ngFor="let member of clientFamilyMembers; index as i" class="family-member">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ member.firstName }} {{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }}
|
||||
</mat-panel-title>
|
||||
|
||||
<mat-panel-description>
|
||||
{{ member.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<div class="family-member-actions layout-row align-end">
|
||||
<button mat-button color="primary">
|
||||
<fa-icon icon="edit" (click)="editFamilyMember(member, i)"></fa-icon>
|
||||
</button>
|
||||
<button mat-button color="warn" (click)="deleteFamilyMember(member.firstName, i)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
{{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }}<br />
|
||||
{{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }}<br />
|
||||
{{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }}<br />
|
||||
{{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }}<br />
|
||||
{{ 'labels.inputs.Relationship' | translate }} :
|
||||
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Age' | translate }} : {{ member.age }}<br />
|
||||
{{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }}<br />
|
||||
{{ 'labels.inputs.Marital Status' | translate }} :
|
||||
{{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Gender' | translate }} :
|
||||
{{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }}<br />
|
||||
{{ 'labels.inputs.Profession' | translate }} :
|
||||
{{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }}<br />
|
||||
{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br />
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
@for (member of clientFamilyMembers; track member; let i = $index) {
|
||||
<mat-expansion-panel class="family-member">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ member.firstName }} {{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ member.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-divider></mat-divider>
|
||||
<div class="family-member-actions layout-row align-end">
|
||||
<button mat-button color="primary">
|
||||
<fa-icon icon="edit" (click)="editFamilyMember(member, i)"></fa-icon>
|
||||
</button>
|
||||
<button mat-button color="warn" (click)="deleteFamilyMember(member.firstName, i)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
<p>
|
||||
{{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }}<br />
|
||||
{{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }}<br />
|
||||
{{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }}<br />
|
||||
{{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }}<br />
|
||||
{{ 'labels.inputs.Relationship' | translate }} :
|
||||
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Age' | translate }} : {{ member.age }}<br />
|
||||
{{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }}<br />
|
||||
{{ 'labels.inputs.Marital Status' | translate }} :
|
||||
{{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Gender' | translate }} :
|
||||
{{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }}<br />
|
||||
{{ 'labels.inputs.Profession' | translate }} :
|
||||
{{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }}<br />
|
||||
{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br />
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
}
|
||||
</mat-accordion>
|
||||
|
||||
<div class="layout-row align-center gap-2percent margin-t responsive-column">
|
||||
|
||||
+4
-10
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, inject } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
/** Custom Components */
|
||||
@@ -43,20 +43,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientFamilyMembersStepComponent {
|
||||
dialog = inject(MatDialog);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Cient Template */
|
||||
@Input() clientTemplate: any;
|
||||
/** Client Family Members */
|
||||
clientFamilyMembers: any[] = [];
|
||||
|
||||
/**
|
||||
* @param {MatDialog} dialog Mat Dialog
|
||||
* @param {TranslateService} translateService Translate Service.
|
||||
*/
|
||||
constructor(
|
||||
public dialog: MatDialog,
|
||||
private translateService: TranslateService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Adds a family member.
|
||||
*/
|
||||
|
||||
+212
-174
@@ -3,22 +3,28 @@
|
||||
<mat-form-field class="flex-fill flex-23">
|
||||
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
|
||||
<mat-select required formControlName="officeId">
|
||||
<mat-option *ngFor="let office of officeOptions" [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
@for (office of officeOptions; track office) {
|
||||
<mat-option [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="createClientForm.controls.officeId.hasError('required')">
|
||||
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (createClientForm.controls.officeId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-fill flex-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">
|
||||
{{ legalForm.value | translateKey: 'inputs' }}
|
||||
</mat-option>
|
||||
@for (legalForm of legalFormOptions; track legalForm) {
|
||||
<mat-option [value]="legalForm.id">
|
||||
{{ legalForm.value | translateKey: 'inputs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -27,64 +33,86 @@
|
||||
<input matInput formControlName="externalId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.contains('fullname')" class="flex-48">
|
||||
<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>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="createClientForm.controls.fullname.hasError('pattern')">
|
||||
{{ 'labels.inputs.Client name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div
|
||||
class="name-fields-row"
|
||||
*ngIf="
|
||||
createClientForm.contains('firstname') ||
|
||||
createClientForm.contains('middlename') ||
|
||||
createClientForm.contains('lastname')
|
||||
"
|
||||
>
|
||||
<mat-form-field *ngIf="createClientForm.contains('firstname')" class="name-field first-name">
|
||||
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="firstname" />
|
||||
<mat-error *ngIf="createClientForm.controls.firstname.hasError('required')">
|
||||
{{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="createClientForm.controls.firstname.hasError('pattern')">
|
||||
{{ 'labels.inputs.Client first name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
@if (createClientForm.contains('fullname')) {
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>
|
||||
{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Name', 'Entity Name']) | translate }}
|
||||
</mat-label>
|
||||
<input matInput required formControlName="fullname" />
|
||||
@if (createClientForm.controls.fullname.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
@if (createClientForm.controls.fullname.hasError('pattern')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Client name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.contains('middlename')" class="name-field middle-name">
|
||||
<mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label>
|
||||
<input matInput formControlName="middlename" />
|
||||
<mat-error *ngIf="createClientForm.controls.middlename.hasError('pattern')">
|
||||
{{ 'labels.inputs.Client middle name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.contains('lastname')" class="name-field last-name">
|
||||
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="lastname" />
|
||||
<mat-error *ngIf="createClientForm.controls.lastname.hasError('required')">
|
||||
{{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="createClientForm.controls.lastname.hasError('pattern')">
|
||||
{{ 'labels.inputs.Client last name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@if (
|
||||
createClientForm.contains('firstname') ||
|
||||
createClientForm.contains('middlename') ||
|
||||
createClientForm.contains('lastname')
|
||||
) {
|
||||
<div class="name-fields-row">
|
||||
@if (createClientForm.contains('firstname')) {
|
||||
<mat-form-field class="name-field first-name">
|
||||
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="firstname" />
|
||||
@if (createClientForm.controls.firstname.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
@if (createClientForm.controls.firstname.hasError('pattern')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Client first name' | translate }}
|
||||
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
@if (createClientForm.contains('middlename')) {
|
||||
<mat-form-field class="name-field middle-name">
|
||||
<mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label>
|
||||
<input matInput formControlName="middlename" />
|
||||
@if (createClientForm.controls.middlename.hasError('pattern')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Client middle name' | translate }}
|
||||
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
@if (createClientForm.contains('lastname')) {
|
||||
<mat-form-field class="name-field last-name">
|
||||
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="lastname" />
|
||||
@if (createClientForm.controls.lastname.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
@if (createClientForm.controls.lastname.hasError('pattern')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Client last name' | translate }}
|
||||
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
|
||||
{{ 'labels.commons.begin with a special character or number' | translate }}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
@@ -100,79 +128,80 @@
|
||||
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<div
|
||||
class="flex-100 layout-row-wrap responsive-column gap-4percent"
|
||||
formGroupName="clientNonPersonDetails"
|
||||
*ngIf="createClientForm.get('clientNonPersonDetails')"
|
||||
>
|
||||
@if (createClientForm.get('clientNonPersonDetails')) {
|
||||
<div class="flex-100 layout-row-wrap responsive-column gap-4percent" formGroupName="clientNonPersonDetails">
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Constitution' | translate }}</mat-label>
|
||||
<mat-select formControlName="constitutionId" required>
|
||||
@for (constitution of constitutionOptions; track constitution) {
|
||||
<mat-option [value]="constitution.id">
|
||||
{{ constitution.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Main Business Line' | translate }}</mat-label>
|
||||
<mat-select formControlName="mainBusinessLineId">
|
||||
@for (business of businessLineOptions; track business) {
|
||||
<mat-option [value]="business.id">
|
||||
{{ business.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-48" (click)="incorpValidityTillDateDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="incorpValidityTillDateDatePicker"
|
||||
formControlName="incorpValidityTillDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Incorporation Number' | translate }}</mat-label>
|
||||
<input matInput formControlName="incorpNumber" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-98">
|
||||
<mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label>
|
||||
<textarea matInput formControlName="remarks" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (createClientForm.value.legalFormId === 1) {
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Constitution' | translate }}</mat-label>
|
||||
<mat-select formControlName="constitutionId" required>
|
||||
<mat-option *ngFor="let constitution of constitutionOptions" [value]="constitution.id">
|
||||
{{ constitution.name }}
|
||||
</mat-option>
|
||||
<mat-label>{{ 'labels.inputs.Gender' | translate }}</mat-label>
|
||||
<mat-select formControlName="genderId">
|
||||
@for (gender of genderOptions; track gender) {
|
||||
<mat-option [value]="gender.id">
|
||||
{{ gender.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Main Business Line' | translate }}</mat-label>
|
||||
<mat-select formControlName="mainBusinessLineId">
|
||||
<mat-option *ngFor="let business of businessLineOptions" [value]="business.id">
|
||||
{{ business.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48" (click)="incorpValidityTillDateDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="incorpValidityTillDateDatePicker"
|
||||
formControlName="incorpValidityTillDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Incorporation Number' | translate }}</mat-label>
|
||||
<input matInput formControlName="incorpNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-98">
|
||||
<mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label>
|
||||
<textarea matInput formControlName="remarks" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.value.legalFormId === 1" class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Gender' | translate }}</mat-label>
|
||||
<mat-select formControlName="genderId">
|
||||
<mat-option *ngFor="let gender of genderOptions" [value]="gender.id">
|
||||
{{ gender.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field class="flex-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>
|
||||
@for (staff of staffOptions; track staff) {
|
||||
<mat-option [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox
|
||||
*ngIf="createClientForm.value.legalFormId === 1"
|
||||
class="flex-48 margin-v"
|
||||
labelPosition="before"
|
||||
formControlName="isStaff"
|
||||
>
|
||||
{{ 'labels.inputs.Is staff' | translate }}?
|
||||
</mat-checkbox>
|
||||
@if (createClientForm.value.legalFormId === 1) {
|
||||
<mat-checkbox class="flex-48 margin-v" labelPosition="before" formControlName="isStaff">
|
||||
{{ 'labels.inputs.Is staff' | translate }}?
|
||||
</mat-checkbox>
|
||||
}
|
||||
|
||||
<mat-divider class="flex-98"></mat-divider>
|
||||
|
||||
@@ -184,29 +213,32 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Email Address' | translate }}</mat-label>
|
||||
<input matInput formControlName="emailAddress" />
|
||||
<mat-error *ngIf="createClientForm.controls.emailAddress.errors?.email">
|
||||
{{ 'error.Email not valid' | translate }}
|
||||
</mat-error>
|
||||
@if (createClientForm.controls.emailAddress.errors?.email) {
|
||||
<mat-error>
|
||||
{{ 'error.Email not valid' | translate }}
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Client Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="clientTypeId">
|
||||
<mat-option *ngFor="let clientType of clientTypeOptions" [value]="clientType.id">
|
||||
{{ clientType.name }}
|
||||
</mat-option>
|
||||
@for (clientType of clientTypeOptions; track clientType) {
|
||||
<mat-option [value]="clientType.id">
|
||||
{{ clientType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Client Classification' | translate }}</mat-label>
|
||||
<mat-select formControlName="clientClassificationId">
|
||||
<mat-option
|
||||
*ngFor="let clientClassification of clientClassificationTypeOptions"
|
||||
[value]="clientClassification.id"
|
||||
>
|
||||
{{ clientClassification.name }}
|
||||
</mat-option>
|
||||
@for (clientClassification of clientClassificationTypeOptions; track clientClassification) {
|
||||
<mat-option [value]="clientClassification.id">
|
||||
{{ clientClassification.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -230,44 +262,50 @@
|
||||
{{ 'labels.inputs.Active' | translate }}?
|
||||
</mat-checkbox>
|
||||
|
||||
<mat-form-field
|
||||
*ngIf="createClientForm.contains('activationDate')"
|
||||
class="flex-48"
|
||||
(click)="activatedOnDatePicker.open()"
|
||||
>
|
||||
<mat-label>{{ 'labels.inputs.Activation Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="createClientForm.value.submittedOnDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="activatedOnDatePicker"
|
||||
required
|
||||
formControlName="activationDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="activatedOnDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #activatedOnDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="createClientForm.controls.activationDate.hasError('required')">
|
||||
{{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (createClientForm.contains('activationDate')) {
|
||||
<mat-form-field class="flex-48" (click)="activatedOnDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Activation Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="createClientForm.value.submittedOnDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="activatedOnDatePicker"
|
||||
required
|
||||
formControlName="activationDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="activatedOnDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #activatedOnDatePicker></mat-datepicker>
|
||||
@if (createClientForm.controls.activationDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-checkbox labelPosition="before" formControlName="addSavings" class="margin-v flex-48">
|
||||
{{ 'labels.inputs.Open Savings Account' | translate }}?
|
||||
</mat-checkbox>
|
||||
|
||||
<mat-form-field *ngIf="createClientForm.contains('savingsProductId')" class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Savings Product' | translate }}</mat-label>
|
||||
<mat-select required formControlName="savingsProductId">
|
||||
<mat-option *ngFor="let product of savingProductOptions" [value]="product.id">
|
||||
{{ product.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="createClientForm.controls.savingsProductId.hasError('required')">
|
||||
{{ 'labels.inputs.Savings Product' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (createClientForm.contains('savingsProductId')) {
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Savings Product' | translate }}</mat-label>
|
||||
<mat-select required formControlName="savingsProductId">
|
||||
@for (product of savingProductOptions; track product) {
|
||||
<mat-option [value]="product.id">
|
||||
{{ product.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
@if (createClientForm.controls.savingsProductId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Savings Product' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="layout-row align-center gap-2percent margin-t responsive-column">
|
||||
|
||||
+13
-10
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormGroup,
|
||||
@@ -37,6 +37,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientGeneralStepComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
private clientService = inject(ClientsService);
|
||||
|
||||
@Output() legalFormChangeEvent = new EventEmitter<{ legalForm: number }>();
|
||||
|
||||
/** Minimum date allowed. */
|
||||
@@ -74,12 +79,7 @@ export class ClientGeneralStepComponent implements OnInit {
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
* @param {ClientsService} clientService Client service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService,
|
||||
private clientService: ClientsService
|
||||
) {
|
||||
constructor() {
|
||||
this.setClientForm();
|
||||
}
|
||||
|
||||
@@ -152,14 +152,16 @@ export class ClientGeneralStepComponent implements OnInit {
|
||||
'firstname',
|
||||
new UntypedFormControl('', [
|
||||
Validators.required,
|
||||
Validators.pattern('(^[A-z]).*')])
|
||||
Validators.pattern('(^[A-z]).*')
|
||||
])
|
||||
);
|
||||
this.createClientForm.addControl('middlename', new UntypedFormControl('', Validators.pattern('(^[A-z]).*')));
|
||||
this.createClientForm.addControl(
|
||||
'lastname',
|
||||
new UntypedFormControl('', [
|
||||
Validators.required,
|
||||
Validators.pattern('(^[A-z]).*')])
|
||||
Validators.pattern('(^[A-z]).*')
|
||||
])
|
||||
);
|
||||
} else {
|
||||
this.createClientForm.removeControl('firstname');
|
||||
@@ -169,7 +171,8 @@ export class ClientGeneralStepComponent implements OnInit {
|
||||
'fullname',
|
||||
new UntypedFormControl('', [
|
||||
Validators.required,
|
||||
Validators.pattern('(^[A-z]).*')])
|
||||
Validators.pattern('(^[A-z]).*')
|
||||
])
|
||||
);
|
||||
this.createClientForm.addControl(
|
||||
'clientNonPersonDetails',
|
||||
|
||||
+211
-177
@@ -5,11 +5,15 @@
|
||||
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.name' | translate }}</span>
|
||||
<span class="flex-60" *ngIf="client.legalFormId === 2">{{ client.fullname }}</span>
|
||||
<span class="flex-60" *ngIf="client.legalFormId === 1"
|
||||
>{{ client.firstname }}
|
||||
{{ client.middlename ? client.middlename + ' ' + client.lastname : client.lastname }}</span
|
||||
>
|
||||
@if (client.legalFormId === 2) {
|
||||
<span class="flex-60">{{ client.fullname }}</span>
|
||||
}
|
||||
@if (client.legalFormId === 1) {
|
||||
<span class="flex-60"
|
||||
>{{ client.firstname }}
|
||||
{{ client.middlename ? client.middlename + ' ' + client.lastname : client.lastname }}</span
|
||||
>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="flex-fill">
|
||||
@@ -22,209 +26,239 @@
|
||||
<span class="flex-60">{{ client.legalFormId | find: clientTemplate.clientLegalFormOptions : 'id' : 'value' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex-fill" *ngIf="client.staffId">
|
||||
<span class="flex-40">{{ 'labels.inputs.Staff' | translate }}</span>
|
||||
<span class="flex-60">{{ client.staffId | find: clientTemplate.staffOptions : 'id' : 'displayName' }}</span>
|
||||
</div>
|
||||
@if (client.staffId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Staff' | translate }}</span>
|
||||
<span class="flex-60">{{ client.staffId | find: clientTemplate.staffOptions : 'id' : 'displayName' }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.dateOfBirth">
|
||||
<span class="flex-40">{{ client.legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }}</span>
|
||||
<span class="flex-60">{{ client.dateOfBirth | dateFormat }}</span>
|
||||
</div>
|
||||
@if (client.dateOfBirth) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ client.legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }}</span>
|
||||
<span class="flex-60">{{ client.dateOfBirth | dateFormat }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.externalId">
|
||||
<span class="flex-40">{{ 'labels.inputs.External Id' | translate }}</span>
|
||||
<span class="flex-60">
|
||||
<mifosx-external-identifier externalId="{{ client.externalId }}"></mifosx-external-identifier>
|
||||
</span>
|
||||
</div>
|
||||
@if (client.externalId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.External Id' | translate }}</span>
|
||||
<span class="flex-60">
|
||||
<mifosx-external-identifier externalId="{{ client.externalId }}"></mifosx-external-identifier>
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.mobileNo">
|
||||
<span class="flex-40">{{ 'labels.inputs.Mobile No' | translate }}</span>
|
||||
<span class="flex-60">{{ client.mobileNo }}</span>
|
||||
</div>
|
||||
@if (client.mobileNo) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Mobile No' | translate }}</span>
|
||||
<span class="flex-60">{{ client.mobileNo }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.emailAddress">
|
||||
<span class="flex-40">{{ 'labels.inputs.Email Address' | translate }}</span>
|
||||
<span class="flex-60">{{ client.emailAddress }}</span>
|
||||
</div>
|
||||
@if (client.emailAddress) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Email Address' | translate }}</span>
|
||||
<span class="flex-60">{{ client.emailAddress }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.clientTypeId">
|
||||
<span class="flex-40">{{ 'labels.inputs.Client Type' | translate }}</span>
|
||||
<span class="flex-60">{{ client.clientTypeId | find: clientTemplate.clientTypeOptions : 'id' : 'name' }}</span>
|
||||
</div>
|
||||
@if (client.clientTypeId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Client Type' | translate }}</span>
|
||||
<span class="flex-60">{{ client.clientTypeId | find: clientTemplate.clientTypeOptions : 'id' : 'name' }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.clientClassificationId">
|
||||
<span class="flex-40">{{ 'labels.inputs.Client Classification' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.clientClassificationId | find: clientTemplate.clientClassificationOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
@if (client.clientClassificationId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Client Classification' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.clientClassificationId | find: clientTemplate.clientClassificationOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.savingsProductId">
|
||||
<span class="flex-40">{{ 'labels.inputs.Savings Product' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.savingsProductId | find: clientTemplate.savingProductOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
@if (client.savingsProductId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Savings Product' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.savingsProductId | find: clientTemplate.savingProductOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="client.submittedOnDate">
|
||||
<span class="flex-40">{{ 'labels.inputs.Submitted On Date' | translate }}</span>
|
||||
<span class="flex-60">{{ client.submittedOnDate | dateFormat }}</span>
|
||||
</div>
|
||||
@if (client.submittedOnDate) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Submitted On Date' | translate }}</span>
|
||||
<span class="flex-60">{{ client.submittedOnDate | dateFormat }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Active' | translate }}?</span>
|
||||
<span class="flex-60">{{ client.active | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex-fill" *ngIf="client.activationDate">
|
||||
<span class="flex-40">{{ 'labels.inputs.Activation Date' | translate }}</span>
|
||||
<span class="flex-60">{{ client.activationDate | dateFormat }}</span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="client.legalFormId === 1">
|
||||
<div class="flex-fill" *ngIf="client.genderId">
|
||||
<span class="flex-40">{{ 'labels.inputs.Gender' | translate }}</span>
|
||||
<span class="flex-60">{{ client.genderId | find: clientTemplate.genderOptions : 'id' : 'name' }}</span>
|
||||
@if (client.activationDate) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Activation Date' | translate }}</span>
|
||||
<span class="flex-60">{{ client.activationDate | dateFormat }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (client.legalFormId === 1) {
|
||||
@if (client.genderId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Gender' | translate }}</span>
|
||||
<span class="flex-60">{{ client.genderId | find: clientTemplate.genderOptions : 'id' : 'name' }}</span>
|
||||
</div>
|
||||
}
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Is staff' | translate }}?</span>
|
||||
<span class="flex-60">{{ client.isStaff | yesNo }}</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="client.legalFormId === 2">
|
||||
<div class="flex-fill" *ngIf="client.clientNonPersonDetails.incorpValidityTillDate">
|
||||
<span class="flex-40">{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</span>
|
||||
<span class="flex-60">{{ client.clientNonPersonDetails.incorpValidityTillDate | dateFormat }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (client.legalFormId === 2) {
|
||||
@if (client.clientNonPersonDetails.incorpValidityTillDate) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</span>
|
||||
<span class="flex-60">{{ client.clientNonPersonDetails.incorpValidityTillDate | dateFormat }}</span>
|
||||
</div>
|
||||
}
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Incorportation Number' | translate }}</span>
|
||||
<span class="flex-60">{{ client.clientNonPersonDetails.incorpNumber || 'Not Provided' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex-fill" *ngIf="client.clientNonPersonDetails.mainBusinessLineId">
|
||||
<span class="flex-40">{{ 'labels.inputs.Main Business Line' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.clientNonPersonDetails.mainBusinessLineId
|
||||
| find: clientTemplate.clientNonPersonMainBusinessLineOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex-fill" *ngIf="client.clientNonPersonDetails.constitutionId">
|
||||
<span class="flex-40">{{ 'labels.inputs.Constitution' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.clientNonPersonDetails.constitutionId
|
||||
| find: clientTemplate.clientNonPersonConstitutionOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
@if (client.clientNonPersonDetails.mainBusinessLineId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Main Business Line' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.clientNonPersonDetails.mainBusinessLineId
|
||||
| find: clientTemplate.clientNonPersonMainBusinessLineOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
}
|
||||
@if (client.clientNonPersonDetails.constitutionId) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Constitution' | translate }}</span>
|
||||
<span class="flex-60">{{
|
||||
client.clientNonPersonDetails.constitutionId
|
||||
| find: clientTemplate.clientNonPersonConstitutionOptions : 'id' : 'name'
|
||||
}}</span>
|
||||
</div>
|
||||
}
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Remarks' | translate }}</span>
|
||||
<span class="flex-60">{{ client.clientNonPersonDetails.remarks || 'N/A' }}</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<div *ngIf="client.familyMembers.length" class="layout-row-wrap responsive-column flex-fill m-b-20">
|
||||
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Family Members' | translate }}</h3>
|
||||
@if (client.familyMembers.length) {
|
||||
<div class="layout-row-wrap responsive-column flex-fill m-b-20">
|
||||
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Family Members' | translate }}</h3>
|
||||
<mat-divider class="flex-fill"></mat-divider>
|
||||
<mat-accordion class="flex-fill m-t-5">
|
||||
@for (member of client.familyMembers; track member) {
|
||||
<mat-expansion-panel class="family-member">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ member.firstName }}
|
||||
{{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ member.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-divider></mat-divider>
|
||||
<p>
|
||||
{{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }}<br />
|
||||
{{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }}<br />
|
||||
{{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }}<br />
|
||||
{{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }}<br />
|
||||
{{ 'labels.inputs.Relationship' | translate }} :
|
||||
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Age' | translate }} : {{ member.age }}<br />
|
||||
{{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }}<br />
|
||||
{{ 'labels.inputs.Marital Status' | translate }} :
|
||||
{{
|
||||
member.maritalStatusId
|
||||
| find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Gender' | translate }} :
|
||||
{{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }}<br />
|
||||
{{ 'labels.inputs.Profession' | translate }} :
|
||||
{{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br />
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
}
|
||||
</mat-accordion>
|
||||
</div>
|
||||
}
|
||||
|
||||
<mat-divider class="flex-fill"></mat-divider>
|
||||
<mat-accordion class="flex-fill m-t-5">
|
||||
<mat-expansion-panel *ngFor="let member of client.familyMembers" class="family-member">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ member.firstName }} {{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }}
|
||||
</mat-panel-title>
|
||||
|
||||
<mat-panel-description>
|
||||
{{ member.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<p>
|
||||
{{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }}<br />
|
||||
{{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }}<br />
|
||||
{{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }}<br />
|
||||
{{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }}<br />
|
||||
{{ 'labels.inputs.Relationship' | translate }} :
|
||||
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Age' | translate }} : {{ member.age }}<br />
|
||||
{{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }}<br />
|
||||
{{ 'labels.inputs.Marital Status' | translate }} :
|
||||
{{ member.maritalStatusId | find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name'
|
||||
}}<br />
|
||||
{{ 'labels.inputs.Gender' | translate }} :
|
||||
{{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }}<br />
|
||||
{{ 'labels.inputs.Profession' | translate }} :
|
||||
{{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name' }}<br />
|
||||
{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br />
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex-fill layout-row-wrap responsive-column"
|
||||
*ngIf="clientTemplate.isAddressEnabled && client.address && client.address.length"
|
||||
>
|
||||
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Address' | translate }}</h3>
|
||||
|
||||
<mat-divider class="flex-fill"></mat-divider>
|
||||
<mat-accordion class="flex-fill m-t-5">
|
||||
<mat-expansion-panel *ngFor="let address of client.address" class="address">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }}
|
||||
</mat-panel-title>
|
||||
|
||||
<mat-panel-description>
|
||||
{{ address.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<p>
|
||||
<span *ngIf="isFieldEnabled('street')"
|
||||
>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine1')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine2')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine3')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('townVillage')"
|
||||
>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('city')">{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
|
||||
<span *ngIf="isFieldEnabled('stateProvinceId')"
|
||||
>{{ 'labels.inputs.State / Province' | translate }} :
|
||||
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('countryId')"
|
||||
>{{ 'labels.inputs.Country' | translate }} :
|
||||
{{ getSelectedValue('countryIdOptions', address.countryId)?.name }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('postalCode')"
|
||||
>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('isActive')"
|
||||
>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br
|
||||
/></span>
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
@if (clientTemplate.isAddressEnabled && client.address && client.address.length) {
|
||||
<div class="flex-fill layout-row-wrap responsive-column">
|
||||
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Address' | translate }}</h3>
|
||||
<mat-divider class="flex-fill"></mat-divider>
|
||||
<mat-accordion class="flex-fill m-t-5">
|
||||
@for (address of client.address; track address) {
|
||||
<mat-expansion-panel class="address">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ address.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-divider></mat-divider>
|
||||
<p>
|
||||
@if (isFieldEnabled('street')) {
|
||||
<span>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine1')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine2')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine3')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('townVillage')) {
|
||||
<span>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('city')) {
|
||||
<span>{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('stateProvinceId')) {
|
||||
<span
|
||||
>{{ 'labels.inputs.State / Province' | translate }} :
|
||||
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
|
||||
/></span>
|
||||
}
|
||||
@if (isFieldEnabled('countryId')) {
|
||||
<span
|
||||
>{{ 'labels.inputs.Country' | translate }} :
|
||||
{{ getSelectedValue('countryIdOptions', address.countryId)?.name }}<br
|
||||
/></span>
|
||||
}
|
||||
@if (isFieldEnabled('postalCode')) {
|
||||
<span>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('isActive')) {
|
||||
<span>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br /></span>
|
||||
}
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
}
|
||||
</mat-accordion>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="layout-row responsive-column align-center gap-2px margin-t">
|
||||
|
||||
@@ -277,7 +277,6 @@ const routes: Routes = [
|
||||
]
|
||||
}
|
||||
])
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -8,57 +8,62 @@
|
||||
</div>
|
||||
|
||||
<mat-accordion>
|
||||
<mat-expansion-panel *ngFor="let address of clientAddressData; index as i" class="address">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ address.addressType }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ address.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div class="address-actions layout-row align-end align-items-center">
|
||||
<button mat-button color="primary" (click)="editAddress(address, i)">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
</button>
|
||||
<mat-slide-toggle [checked]="address.isActive" (change)="toggleAddress(address)"></mat-slide-toggle>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<span *ngIf="isFieldEnabled('street')"
|
||||
>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine1')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine2')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('addressLine3')"
|
||||
>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('townVillage')"
|
||||
>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('city')">{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
|
||||
<span *ngIf="isFieldEnabled('stateProvinceId')"
|
||||
>{{ 'labels.inputs.State / Province' | translate }} :
|
||||
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('countryId')"
|
||||
>{{ 'labels.inputs.Country' | translate }} : {{ getSelectedValue('countryIdOptions', address.countryId)?.name
|
||||
}}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('postalCode')"
|
||||
>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br
|
||||
/></span>
|
||||
<span *ngIf="isFieldEnabled('isActive')"
|
||||
>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br
|
||||
/></span>
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
@for (address of clientAddressData; track address; let i = $index) {
|
||||
<mat-expansion-panel class="address">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ address.addressType }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ address.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
<div class="address-actions layout-row align-end align-items-center">
|
||||
<button mat-button color="primary" (click)="editAddress(address, i)">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
</button>
|
||||
<mat-slide-toggle [checked]="address.isActive" (change)="toggleAddress(address)"></mat-slide-toggle>
|
||||
</div>
|
||||
<p>
|
||||
@if (isFieldEnabled('street')) {
|
||||
<span>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine1')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine2')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('addressLine3')) {
|
||||
<span>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('townVillage')) {
|
||||
<span>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('city')) {
|
||||
<span>{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('stateProvinceId')) {
|
||||
<span
|
||||
>{{ 'labels.inputs.State / Province' | translate }} :
|
||||
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
|
||||
/></span>
|
||||
}
|
||||
@if (isFieldEnabled('countryId')) {
|
||||
<span
|
||||
>{{ 'labels.inputs.Country' | translate }} :
|
||||
{{ getSelectedValue('countryIdOptions', address.countryId)?.name }}<br
|
||||
/></span>
|
||||
}
|
||||
@if (isFieldEnabled('postalCode')) {
|
||||
<span>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br /></span>
|
||||
}
|
||||
@if (isFieldEnabled('isActive')) {
|
||||
<span>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br /></span>
|
||||
}
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
}
|
||||
</mat-accordion>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
||||
@@ -44,6 +44,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AddressTabComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientService = inject(ClientsService);
|
||||
private dialog = inject(MatDialog);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Client Address Data */
|
||||
clientAddressData: any;
|
||||
/** Client Address Field Config */
|
||||
@@ -59,12 +64,7 @@ export class AddressTabComponent {
|
||||
* @param {MatDialog} dialog Mat Dialog
|
||||
* @param {TranslateService} translateService Translate Service.
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private clientService: ClientsService,
|
||||
private dialog: MatDialog,
|
||||
private translateService: TranslateService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe(
|
||||
(data: { clientAddressData: any; clientAddressFieldConfig: any; clientAddressTemplateData: any }) => {
|
||||
this.clientAddressData = data.clientAddressData;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../../../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientChargeOverviewResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Charge data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, inject } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import {
|
||||
@@ -47,6 +47,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ChargesOverviewComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
/** Columns to be displayed in charge overview table. */
|
||||
displayedColumns: string[] = [
|
||||
'name',
|
||||
@@ -69,10 +72,7 @@ export class ChargesOverviewComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {MatDialog} dialog Dialog reference.
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
public dialog: MatDialog
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientChargesData: any }) => {
|
||||
this.chargeOverviewData = data.clientChargesData;
|
||||
});
|
||||
|
||||
+12
-8
@@ -5,10 +5,12 @@
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Amount' | translate }} </mat-label>
|
||||
<input matInput required autofocus formControlName="amount" />
|
||||
<mat-error *ngIf="transactionForm.controls.amount.hasError('required')">
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (transactionForm.controls.amount.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="transactionDatePicker.open()">
|
||||
@@ -22,10 +24,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="transactionForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (transactionForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientPayChargesComponent implements OnInit {
|
||||
private clientsService = inject(ClientsService);
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Transaction Form. */
|
||||
transactionForm: any;
|
||||
/** Transaction Data. */
|
||||
@@ -36,14 +43,7 @@ export class ClientPayChargesComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private clientsService: ClientsService,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { transactionData: any }) => {
|
||||
this.transactionData = data.transactionData;
|
||||
});
|
||||
|
||||
@@ -74,51 +74,48 @@
|
||||
<b> {{ 'labels.heading.Transactions' | translate }} </b>
|
||||
</h1>
|
||||
|
||||
<table mat-table [dataSource]="chargeData.clientTransactionDatas" *ngIf="chargeData.clientTransactionDatas">
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.ID' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">{{ element.id }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="officeName">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Office Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.officeName }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="type">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.type.value }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="transactionDate">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Transaction Date' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.date | dateFormat }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.amount | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
<button mat-raised-button color="primary" (click)="undoTransaction(element.id)" class="del-btn">
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="viewChargeTableColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: viewChargeTableColumns"></tr>
|
||||
</table>
|
||||
@if (chargeData.clientTransactionDatas) {
|
||||
<table mat-table [dataSource]="chargeData.clientTransactionDatas">
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.ID' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">{{ element.id }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="officeName">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Office Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.officeName }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="type">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.type.value }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="transactionDate">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Transaction Date' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.date | dateFormat }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
{{ element.amount | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element" [ngClass]="{ strikeoff: element.reversed }">
|
||||
<button mat-raised-button color="primary" (click)="undoTransaction(element.id)" class="del-btn">
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="viewChargeTableColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: viewChargeTableColumns"></tr>
|
||||
</table>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { ClientsService } from 'app/clients/clients.service';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { MatCard, MatCardTitle, MatCardContent, MatCardActions } from '@angular/material/card';
|
||||
import { NgClass, NgIf } from '@angular/common';
|
||||
import { NgClass } from '@angular/common';
|
||||
import { MatDivider } from '@angular/material/divider';
|
||||
import {
|
||||
MatTable,
|
||||
@@ -52,6 +52,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ViewChargeComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private clientService = inject(ClientsService);
|
||||
|
||||
/** Charge Data. */
|
||||
chargeData: any;
|
||||
/** Mat Table Column defs. */
|
||||
@@ -69,11 +73,7 @@ export class ViewChargeComponent {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private clientService: ClientsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientChargeData: any }) => {
|
||||
this.chargeData = data.clientChargeData;
|
||||
});
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AcceptClientTransferComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Accept Client Transfer form. */
|
||||
acceptClientTransferForm: UntypedFormGroup;
|
||||
/** Client Id */
|
||||
@@ -38,14 +45,7 @@ export class AcceptClientTransferComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.transferDate = data.clientActionData;
|
||||
});
|
||||
|
||||
+6
-4
@@ -14,10 +14,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="activationDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #activationDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="activateClientForm.controls.activationDate.hasError('required')">
|
||||
{{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (activateClientForm.controls.activationDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ActivateClientComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -38,14 +45,7 @@ export class ActivateClientComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.clientId = this.route.parent.snapshot.params['clientId'];
|
||||
}
|
||||
|
||||
|
||||
+93
-79
@@ -6,88 +6,102 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Charge' | translate }}</mat-label>
|
||||
<mat-select required formControlName="chargeId">
|
||||
<mat-option *ngFor="let clientCharge of clientChargeOptions" [value]="clientCharge.id">
|
||||
{{ clientCharge.name + ' (' + clientCharge.currency.name + ')' }}
|
||||
</mat-option>
|
||||
@for (clientCharge of clientChargeOptions; track clientCharge) {
|
||||
<mat-option [value]="clientCharge.id">
|
||||
{{ clientCharge.name + ' (' + clientCharge.currency.name + ')' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="clientChargeForm.controls.chargeId.hasError('required')">
|
||||
{{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (clientChargeForm.controls.chargeId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<div *ngIf="chargeDetails" class="layout-column">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
|
||||
<input type="number" required matInput formControlName="amount" />
|
||||
<mat-error *ngIf="clientChargeForm.controls.amount.hasError('required')">
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Charge Calculation' | translate }}</mat-label>
|
||||
<mat-select formControlName="chargeCalculationType">
|
||||
<mat-option
|
||||
*ngFor="let chargeCalculation of chargeDetails.chargeCalculationTypeOptions"
|
||||
[value]="chargeCalculation.id"
|
||||
>
|
||||
{{ chargeCalculation.value }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Charge time type' | translate }}</mat-label>
|
||||
<mat-select formControlName="chargeTimeType">
|
||||
<mat-option *ngFor="let chargeTime of chargeDetails.chargeTimeTypeOptions" [value]="chargeTime.id">
|
||||
{{ chargeTime.value }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="clientChargeForm.contains('dueDate')" (click)="dueDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Due for collection on' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dueDatePicker"
|
||||
required
|
||||
formControlName="dueDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dueDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="clientChargeForm.controls.dueDate.hasError('required')">
|
||||
{{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="clientChargeForm.contains('feeOnMonthDay')" (click)="feeOnMonthDayPicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Due On' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="feeOnMonthDayPicker"
|
||||
required
|
||||
formControlName="feeOnMonthDay"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="feeOnMonthDayPicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #feeOnMonthDayPicker></mat-datepicker>
|
||||
<mat-error *ngIf="clientChargeForm.controls.feeOnMonthDay.hasError('required')">
|
||||
{{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="clientChargeForm.contains('feeInterval')">
|
||||
<mat-label>{{ 'labels.inputs.Repeats Every' | translate }}</mat-label>
|
||||
<input matInput formControlName="feeInterval" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@if (chargeDetails) {
|
||||
<div class="layout-column">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
|
||||
<input type="number" required matInput formControlName="amount" />
|
||||
@if (clientChargeForm.controls.amount.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Charge Calculation' | translate }}</mat-label>
|
||||
<mat-select formControlName="chargeCalculationType">
|
||||
@for (chargeCalculation of chargeDetails.chargeCalculationTypeOptions; track chargeCalculation) {
|
||||
<mat-option [value]="chargeCalculation.id">
|
||||
{{ chargeCalculation.value }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Charge time type' | translate }}</mat-label>
|
||||
<mat-select formControlName="chargeTimeType">
|
||||
@for (chargeTime of chargeDetails.chargeTimeTypeOptions; track chargeTime) {
|
||||
<mat-option [value]="chargeTime.id">
|
||||
{{ chargeTime.value }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@if (clientChargeForm.contains('dueDate')) {
|
||||
<mat-form-field (click)="dueDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Due for collection on' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dueDatePicker"
|
||||
required
|
||||
formControlName="dueDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dueDatePicker></mat-datepicker>
|
||||
@if (clientChargeForm.controls.dueDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Due for collection on' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
@if (clientChargeForm.contains('feeOnMonthDay')) {
|
||||
<mat-form-field (click)="feeOnMonthDayPicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Due On' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="feeOnMonthDayPicker"
|
||||
required
|
||||
formControlName="feeOnMonthDay"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="feeOnMonthDayPicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #feeOnMonthDayPicker></mat-datepicker>
|
||||
@if (clientChargeForm.controls.feeOnMonthDay.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
@if (clientChargeForm.contains('feeInterval')) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Repeats Every' | translate }}</mat-label>
|
||||
<input matInput formControlName="feeInterval" />
|
||||
</mat-form-field>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row layout-xs-column layout-align-center gap-5px">
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormGroup,
|
||||
UntypedFormBuilder,
|
||||
@@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AddClientChargeComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum Due Date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum Due Date allowed. */
|
||||
@@ -49,14 +56,7 @@ export class AddClientChargeComponent implements OnInit {
|
||||
* @param {ClientsService} clientsService Clients Service
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.clientChargeOptions = data.clientActionData.chargeOptions;
|
||||
});
|
||||
|
||||
+52
-51
@@ -6,61 +6,62 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Collateral' | translate }}</mat-label>
|
||||
<mat-select required formControlName="collateralId">
|
||||
<mat-option *ngFor="let clientCollateral of clientCollateralOptions" [value]="clientCollateral.id">
|
||||
{{ clientCollateral.name }}
|
||||
</mat-option>
|
||||
@for (clientCollateral of clientCollateralOptions; track clientCollateral) {
|
||||
<mat-option [value]="clientCollateral.id">
|
||||
{{ clientCollateral.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="clientCollateralForm.controls.collateralId.hasError('required')">
|
||||
{{ 'labels.inputs.Collateral' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div *ngIf="collateralDetails" class="layout-column">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="name" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Type/Quality' | translate }}</mat-label>
|
||||
<input matInput required formControlName="quality" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Unit Type' | translate }}</mat-label>
|
||||
<input matInput required formControlName="unitType" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Base Price' | translate }}</mat-label>
|
||||
<input matInput required formControlName="basePrice" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Percentage To Base' | translate }}</mat-label>
|
||||
<input matInput required formControlName="pctToBase" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Quantity' | translate }}</mat-label>
|
||||
<input matInput required formControlName="quantity" />
|
||||
<mat-error *ngIf="clientCollateralForm.controls.quantity.hasError('required')">
|
||||
{{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
@if (clientCollateralForm.controls.collateralId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Collateral' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Total' | translate }}</mat-label>
|
||||
<input matInput required formControlName="totalValue" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Total Collateral Value' | translate }}</mat-label>
|
||||
<input matInput required formControlName="totalCollateralValue" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@if (collateralDetails) {
|
||||
<div class="layout-column">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="name" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Type/Quality' | translate }}</mat-label>
|
||||
<input matInput required formControlName="quality" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Unit Type' | translate }}</mat-label>
|
||||
<input matInput required formControlName="unitType" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Base Price' | translate }}</mat-label>
|
||||
<input matInput required formControlName="basePrice" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Percentage To Base' | translate }}</mat-label>
|
||||
<input matInput required formControlName="pctToBase" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Quantity' | translate }}</mat-label>
|
||||
<input matInput required formControlName="quantity" />
|
||||
@if (clientCollateralForm.controls.quantity.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Total' | translate }}</mat-label>
|
||||
<input matInput required formControlName="totalValue" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Total Collateral Value' | translate }}</mat-label>
|
||||
<input matInput required formControlName="totalCollateralValue" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -20,6 +20,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AddClientCollateralComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private productsService = inject(ProductsService);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Client Collateral Form */
|
||||
clientCollateralForm: UntypedFormGroup;
|
||||
/** Client Collateral Options */
|
||||
@@ -36,14 +43,7 @@ export class AddClientCollateralComponent implements OnInit {
|
||||
* @param {Router} router Router.
|
||||
* @param {ProductsService} productsService Products Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private productsService: ProductsService,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.clientCollateralOptions = data.clientActionData;
|
||||
});
|
||||
|
||||
@@ -1,17 +1,51 @@
|
||||
<mifosx-client-assign-staff *ngIf="actions['Assign Staff']"></mifosx-client-assign-staff>
|
||||
<mifosx-close-client *ngIf="actions['Close']"></mifosx-close-client>
|
||||
<mifosx-view-survey *ngIf="actions['Survey']"></mifosx-view-survey>
|
||||
<mifosx-reject-client *ngIf="actions['Reject']"></mifosx-reject-client>
|
||||
<mifosx-activate-client *ngIf="actions['Activate']"></mifosx-activate-client>
|
||||
<mifosx-withdraw-client *ngIf="actions['Withdraw']"></mifosx-withdraw-client>
|
||||
<mifosx-update-client-savings-account *ngIf="actions['Update Default Savings']"></mifosx-update-client-savings-account>
|
||||
<mifosx-transfer-client *ngIf="actions['Transfer Client']"></mifosx-transfer-client>
|
||||
<mifosx-undo-client-transfer *ngIf="actions['Undo Transfer']"></mifosx-undo-client-transfer>
|
||||
<mifosx-reject-client-transfer *ngIf="actions['Reject Transfer']"></mifosx-reject-client-transfer>
|
||||
<mifosx-accept-client-transfer *ngIf="actions['Accept Transfer']"></mifosx-accept-client-transfer>
|
||||
<mifosx-reactivate-client *ngIf="actions['Reactivate']"></mifosx-reactivate-client>
|
||||
<mifosx-undo-client-rejection *ngIf="actions['Undo Rejection']"></mifosx-undo-client-rejection>
|
||||
<mifosx-add-client-charge *ngIf="actions['Add Charge']"></mifosx-add-client-charge>
|
||||
<mifosx-take-survey *ngIf="actions['Take Survey']"></mifosx-take-survey>
|
||||
<mifosx-client-screen-reports *ngIf="actions['Client Screen Reports']"></mifosx-client-screen-reports>
|
||||
<mifosx-add-client-collateral *ngIf="actions['Create Collateral']"></mifosx-add-client-collateral>
|
||||
@if (actions['Assign Staff']) {
|
||||
<mifosx-client-assign-staff></mifosx-client-assign-staff>
|
||||
}
|
||||
@if (actions['Close']) {
|
||||
<mifosx-close-client></mifosx-close-client>
|
||||
}
|
||||
@if (actions['Survey']) {
|
||||
<mifosx-view-survey></mifosx-view-survey>
|
||||
}
|
||||
@if (actions['Reject']) {
|
||||
<mifosx-reject-client></mifosx-reject-client>
|
||||
}
|
||||
@if (actions['Activate']) {
|
||||
<mifosx-activate-client></mifosx-activate-client>
|
||||
}
|
||||
@if (actions['Withdraw']) {
|
||||
<mifosx-withdraw-client></mifosx-withdraw-client>
|
||||
}
|
||||
@if (actions['Update Default Savings']) {
|
||||
<mifosx-update-client-savings-account></mifosx-update-client-savings-account>
|
||||
}
|
||||
@if (actions['Transfer Client']) {
|
||||
<mifosx-transfer-client></mifosx-transfer-client>
|
||||
}
|
||||
@if (actions['Undo Transfer']) {
|
||||
<mifosx-undo-client-transfer></mifosx-undo-client-transfer>
|
||||
}
|
||||
@if (actions['Reject Transfer']) {
|
||||
<mifosx-reject-client-transfer></mifosx-reject-client-transfer>
|
||||
}
|
||||
@if (actions['Accept Transfer']) {
|
||||
<mifosx-accept-client-transfer></mifosx-accept-client-transfer>
|
||||
}
|
||||
@if (actions['Reactivate']) {
|
||||
<mifosx-reactivate-client></mifosx-reactivate-client>
|
||||
}
|
||||
@if (actions['Undo Rejection']) {
|
||||
<mifosx-undo-client-rejection></mifosx-undo-client-rejection>
|
||||
}
|
||||
@if (actions['Add Charge']) {
|
||||
<mifosx-add-client-charge></mifosx-add-client-charge>
|
||||
}
|
||||
@if (actions['Take Survey']) {
|
||||
<mifosx-take-survey></mifosx-take-survey>
|
||||
}
|
||||
@if (actions['Client Screen Reports']) {
|
||||
<mifosx-client-screen-reports></mifosx-client-screen-reports>
|
||||
}
|
||||
@if (actions['Create Collateral']) {
|
||||
<mifosx-add-client-collateral></mifosx-add-client-collateral>
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ClientAssignStaffComponent } from './client-assign-staff/client-assign-staff.component';
|
||||
import { CloseClientComponent } from './close-client/close-client.component';
|
||||
@@ -49,6 +49,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientActionsComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Flag object to store possible actions and render appropriate UI to the user */
|
||||
actions: {
|
||||
'Assign Staff': boolean;
|
||||
@@ -92,10 +95,7 @@ export class ClientActionsComponent {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||
const name = this.route.snapshot.params['name'] as keyof typeof this.actions;
|
||||
this.actions[name] = true;
|
||||
|
||||
+11
-7
@@ -6,14 +6,18 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Staff' | translate }}</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let staff of staffData" [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
@for (staff of staffData; track staff) {
|
||||
<mat-option [value]="staff.id">
|
||||
{{ staff.displayName }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="clientAssignStaffForm.controls.staffId.hasError('required')">
|
||||
{{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (clientAssignStaffForm.controls.staffId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Staff' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientAssignStaffComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Client Assign Staff form. */
|
||||
clientAssignStaffForm: UntypedFormGroup;
|
||||
/** Staff Data */
|
||||
@@ -33,12 +38,7 @@ export class ClientAssignStaffComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.clientData = data.clientActionData;
|
||||
});
|
||||
|
||||
+11
-7
@@ -6,14 +6,18 @@
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.Client Screen Reports' | translate }}</mat-label>
|
||||
<mat-select formControlName="templateId">
|
||||
<mat-option *ngFor="let template of templatesData" [value]="template.id">
|
||||
{{ template.name }}
|
||||
</mat-option>
|
||||
@for (template of templatesData; track template) {
|
||||
<mat-option [value]="template.id">
|
||||
{{ template.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="clientScreenReportForm.controls.templateId.hasError('required')">
|
||||
{{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (clientScreenReportForm.controls.templateId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext } from '@angular/core';
|
||||
import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -22,6 +22,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientScreenReportsComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private sanitizer = inject(DomSanitizer);
|
||||
private renderer = inject(Renderer2);
|
||||
|
||||
/** Client Screen Reportform. */
|
||||
clientScreenReportForm: UntypedFormGroup;
|
||||
/** Templates Data */
|
||||
@@ -42,13 +48,7 @@ export class ClientScreenReportsComponent implements OnInit {
|
||||
* @param {DomSanitizer} sanitizer DOM Sanitizer
|
||||
* @param {Renderer2} renderer Renderer 2
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private route: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer,
|
||||
private renderer: Renderer2
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.templatesData = data.clientActionData;
|
||||
});
|
||||
|
||||
+17
-11
@@ -15,23 +15,29 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="closureDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #closureDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="closeClientForm.controls.closureDate.hasError('required')">
|
||||
{{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (closeClientForm.controls.closureDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Closure Reason' | translate }}</mat-label>
|
||||
<mat-select formControlName="closureReasonId">
|
||||
<mat-option *ngFor="let reason of closureData" [value]="reason.id">
|
||||
{{ reason.name }}
|
||||
</mat-option>
|
||||
@for (reason of closureData; track reason) {
|
||||
<mat-option [value]="reason.id">
|
||||
{{ reason.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="closeClientForm.controls.closureReasonId.hasError('required')">
|
||||
{{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (closeClientForm.controls.closureReasonId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Closure Reason' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class CloseClientComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -40,14 +47,7 @@ export class CloseClientComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.closureData = data.clientActionData.narrations;
|
||||
});
|
||||
|
||||
+6
-4
@@ -14,10 +14,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="reactivationDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #reactivationDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="reactivateClientForm.controls.reactivationDate.hasError('required')">
|
||||
{{ 'labels.inputs.Reactivation Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (reactivateClientForm.controls.reactivationDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Reactivation Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ReactivateClientComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -38,14 +45,7 @@ export class ReactivateClientComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.clientId = this.route.parent.snapshot.params['clientId'];
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class RejectClientTransferComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Reject Client Transfer form. */
|
||||
rejectClientTransferForm: UntypedFormGroup;
|
||||
/** Client Id */
|
||||
@@ -36,14 +43,7 @@ export class RejectClientTransferComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.transferDate = data.clientActionData;
|
||||
});
|
||||
|
||||
+17
-11
@@ -15,23 +15,29 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="rejectionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #rejectionDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="rejectClientForm.controls.rejectionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Rejection Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (rejectClientForm.controls.rejectionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Rejection Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Rejection Reason' | translate }}</mat-label>
|
||||
<mat-select formControlName="rejectionReasonId">
|
||||
<mat-option *ngFor="let reason of rejectionData" [value]="reason.id">
|
||||
{{ reason.name }}
|
||||
</mat-option>
|
||||
@for (reason of rejectionData; track reason) {
|
||||
<mat-option [value]="reason.id">
|
||||
{{ reason.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="rejectClientForm.controls.rejectionReasonId.hasError('required')">
|
||||
{{ 'labels.inputs.Rejection Reason' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (rejectClientForm.controls.rejectionReasonId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Rejection Reason' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class RejectClientComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -40,14 +47,7 @@ export class RejectClientComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.rejectionData = data.clientActionData.narrations;
|
||||
});
|
||||
|
||||
+22
-23
@@ -3,42 +3,41 @@
|
||||
<div class="survey-select layout-row">
|
||||
<mat-label class="name-label">{{ 'labels.inputs.Survey Name' | translate }}</mat-label>
|
||||
<mat-select (selectionChange)="onSurveyChange($event)">
|
||||
<mat-option *ngFor="let surveyData of allSurveyData" [value]="surveyData">
|
||||
{{ surveyData.name }}
|
||||
</mat-option>
|
||||
@for (surveyData of allSurveyData; track surveyData) {
|
||||
<mat-option [value]="surveyData">
|
||||
{{ surveyData.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div>
|
||||
<ng-container *ngFor="let component of componentGroups">
|
||||
<h2 *ngIf="component[0].componentKey">component[0].componentKey</h2>
|
||||
|
||||
@for (component of componentGroups; track component) {
|
||||
@if (component[0].componentKey) {
|
||||
<h2>component[0].componentKey</h2>
|
||||
}
|
||||
<div class="layout-column display-questions">
|
||||
<ng-container *ngFor="let question of component">
|
||||
@for (question of component; track question) {
|
||||
<div class="layout-row question">
|
||||
<mat-label class="flex-40 question-text">{{ question.text }}</mat-label>
|
||||
|
||||
<mat-radio-group class="flex-60 radio-group-spacing" [(ngModel)]="question.answer">
|
||||
<mat-radio-button
|
||||
class="layout-column radio-button"
|
||||
*ngFor="let options of question.responseDatas"
|
||||
[value]="options"
|
||||
>
|
||||
<span class="wrap-mat-radio-label">
|
||||
{{ options.text }}
|
||||
</span>
|
||||
</mat-radio-button>
|
||||
@for (options of question.responseDatas; track options) {
|
||||
<mat-radio-button class="layout-column radio-button" [value]="options">
|
||||
<span class="wrap-mat-radio-label">
|
||||
{{ options.text }}
|
||||
</span>
|
||||
</mat-radio-button>
|
||||
}
|
||||
</mat-radio-group>
|
||||
</div>
|
||||
|
||||
<div *ngIf="question.answer">
|
||||
{{ 'labels.text.Your answer is' | translate }}: {{ question.answer.text }}
|
||||
</div>
|
||||
</ng-container>
|
||||
@if (question.answer) {
|
||||
<div>{{ 'labels.text.Your answer is' | translate }}: {{ question.answer.text }}</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</ng-container>
|
||||
}
|
||||
</div>
|
||||
|
||||
<button mat-raised-button class="button-cancel" color="danger" [routerLink]="['../../general']">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -24,6 +24,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class TakeSurveyComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientsService = inject(ClientsService);
|
||||
private router = inject(Router);
|
||||
private authenticationService = inject(AuthenticationService);
|
||||
|
||||
/** List of all Survey Data */
|
||||
allSurveyData: any;
|
||||
/** User Id */
|
||||
@@ -52,12 +57,7 @@ export class TakeSurveyComponent {
|
||||
* @param {Router} router Router
|
||||
* @param {AuthenticationService} authenticationService AuthenticationService
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private clientsService: ClientsService,
|
||||
private router: Router,
|
||||
private authenticationService: AuthenticationService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.allSurveyData = data.clientActionData;
|
||||
this.clientId = this.route.parent.snapshot.params['clientId'];
|
||||
|
||||
+17
-11
@@ -6,14 +6,18 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
|
||||
<mat-select required formControlName="destinationOfficeId">
|
||||
<mat-option *ngFor="let office of officeData" [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
@for (office of officeData; track office) {
|
||||
<mat-option [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="transferClientForm.controls.destinationOfficeId.hasError('required')">
|
||||
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (transferClientForm.controls.destinationOfficeId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="transferDatePicker.open()">
|
||||
@@ -28,10 +32,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transferDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="transferClientForm.controls.transferDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transfer Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (transferClientForm.controls.transferDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transfer Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class TransferClientComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -42,14 +49,7 @@ export class TransferClientComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.officeData = data.clientActionData;
|
||||
});
|
||||
|
||||
+6
-4
@@ -14,10 +14,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="reopenedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #reopenedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="undoClientRejectionForm.controls.reopenedDate.hasError('required')">
|
||||
{{ 'labels.inputs.Reopened On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (undoClientRejectionForm.controls.reopenedDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Reopened On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UndoClientRejectionComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -37,14 +44,7 @@ export class UndoClientRejectionComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.clientId = this.route.parent.snapshot.params['clientId'];
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UndoClientTransferComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Undo Client Transfer form. */
|
||||
undoClientTransferForm: UntypedFormGroup;
|
||||
/** Client Id */
|
||||
@@ -36,14 +43,7 @@ export class UndoClientTransferComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.transferDate = data.clientActionData;
|
||||
});
|
||||
|
||||
+11
-7
@@ -6,14 +6,18 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Default Savings Account' | translate }}</mat-label>
|
||||
<mat-select formControlName="savingsAccountId">
|
||||
<mat-option *ngFor="let account of savingsAccounts" [value]="account.id">
|
||||
{{ account.accountNo }}
|
||||
</mat-option>
|
||||
@for (account of savingsAccounts; track account) {
|
||||
<mat-option [value]="account.id">
|
||||
{{ account.accountNo }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="clientSavingsAccountForm.controls.savingsAccountId.hasError('required')">
|
||||
{{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (clientSavingsAccountForm.controls.savingsAccountId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -19,6 +19,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UpdateClientSavingsAccountComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Client Update Savings Account form. */
|
||||
clientSavingsAccountForm: UntypedFormGroup;
|
||||
/** Savings Accounts Data */
|
||||
@@ -33,12 +38,7 @@ export class UpdateClientSavingsAccountComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.clientData = data.clientActionData;
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, inject } from '@angular/core';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort, MatSortHeader } from '@angular/material/sort';
|
||||
@@ -49,6 +49,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ViewSurveyComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
/** Survey Data */
|
||||
surveyData: any;
|
||||
/** Data source for view surveys table. */
|
||||
@@ -70,7 +72,7 @@ export class ViewSurveyComponent implements OnInit {
|
||||
* Retrieves the survey data from `resolve`.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.surveyData = data.clientActionData;
|
||||
});
|
||||
|
||||
+17
-11
@@ -15,23 +15,29 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="withdrawalDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #withdrawalDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="withdrawClientForm.controls.withdrawalDate.hasError('required')">
|
||||
{{ 'labels.inputs.Withdrawal Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (withdrawClientForm.controls.withdrawalDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Withdrawal Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Withdrawal Reason' | translate }}</mat-label>
|
||||
<mat-select formControlName="withdrawalReasonId">
|
||||
<mat-option *ngFor="let reason of withdrawalData" [value]="reason.id">
|
||||
{{ reason.name }}
|
||||
</mat-option>
|
||||
@for (reason of withdrawalData; track reason) {
|
||||
<mat-option [value]="reason.id">
|
||||
{{ reason.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="withdrawClientForm.controls.withdrawalReasonId.hasError('required')">
|
||||
{{ 'labels.inputs.Withdrawal Reason' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (withdrawClientForm.controls.withdrawalReasonId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Withdrawal Reason' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class WithdrawClientComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -40,14 +47,7 @@ export class WithdrawClientComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private clientsService: ClientsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientActionData: any }) => {
|
||||
this.withdrawalData = data.clientActionData.narrations;
|
||||
});
|
||||
|
||||
@@ -90,18 +90,24 @@
|
||||
></mifosx-external-identifier>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="clientViewData.activationDate">
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Activation Date' | translate }}</b>
|
||||
</td>
|
||||
<td>{{ clientViewData.activationDate | dateFormat }}</td>
|
||||
</tr>
|
||||
@if (clientViewData.activationDate) {
|
||||
<tr>
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Activation Date' | translate }}</b>
|
||||
</td>
|
||||
<td>{{ clientViewData.activationDate | dateFormat }}</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Staff' | translate }}</b>
|
||||
</td>
|
||||
<td *ngIf="clientViewData.staffName">{{ clientViewData.staffName }}</td>
|
||||
<td *ngIf="!clientViewData.staffName">{{ 'labels.inputs.Unassigned' | translate }}</td>
|
||||
@if (clientViewData.staffName) {
|
||||
<td>{{ clientViewData.staffName }}</td>
|
||||
}
|
||||
@if (!clientViewData.staffName) {
|
||||
<td>{{ 'labels.inputs.Unassigned' | translate }}</td>
|
||||
}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -109,22 +115,28 @@
|
||||
<div class="flex-50">
|
||||
<table class="account-overview">
|
||||
<tbody>
|
||||
<tr *ngIf="clientViewData.groups.length > 0">
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Member Of' | translate }}</b>
|
||||
</td>
|
||||
<td>
|
||||
<span *ngFor="let group of clientViewData.groups">
|
||||
<span class="m-r-3">{{ group.name }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="clientViewData.clientType">
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Client Type' | translate }}</b>
|
||||
</td>
|
||||
<td>{{ clientViewData.clientType.name }}</td>
|
||||
</tr>
|
||||
@if (clientViewData.groups.length > 0) {
|
||||
<tr>
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Member Of' | translate }}</b>
|
||||
</td>
|
||||
<td>
|
||||
@for (group of clientViewData.groups; track group) {
|
||||
<span>
|
||||
<span class="m-r-3">{{ group.name }}</span>
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (clientViewData.clientType) {
|
||||
<tr>
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Client Type' | translate }}</b>
|
||||
</td>
|
||||
<td>{{ clientViewData.clientType.name }}</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<b>{{ 'labels.inputs.Mobile Number' | translate }}</b>
|
||||
@@ -162,12 +174,14 @@
|
||||
<span>{{ 'labels.buttons.Edit' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button *ngIf="isActive()" mat-menu-item [matMenuTriggerFor]="accountApplications">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="money-bill-alt" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span>{{ 'labels.buttons.Applications' | translate }}</span>
|
||||
</button>
|
||||
@if (isActive()) {
|
||||
<button mat-menu-item [matMenuTriggerFor]="accountApplications">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="money-bill-alt" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span>{{ 'labels.buttons.Applications' | translate }}</span>
|
||||
</button>
|
||||
}
|
||||
|
||||
<button mat-menu-item [matMenuTriggerFor]="Actions">
|
||||
<mat-icon matListIcon>
|
||||
@@ -176,21 +190,25 @@
|
||||
<span>{{ 'labels.buttons.Actions' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="doAction('Assign Staff')" *ngIf="!clientViewData.staffId">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="user-tie" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span>{{ 'labels.buttons.Assign Staff' | translate }}</span>
|
||||
</button>
|
||||
|
||||
<span *ngIf="clientViewData.staffId">
|
||||
<button mat-menu-item *mifosxHasPermission="'UNASSIGNSTAFF_CLIENT'" (click)="doAction('Unassign Staff')">
|
||||
@if (!clientViewData.staffId) {
|
||||
<button mat-menu-item (click)="doAction('Assign Staff')">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="user-tie" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span>{{ 'labels.buttons.Unassign Staff' | translate }}</span>
|
||||
<span>{{ 'labels.buttons.Assign Staff' | translate }}</span>
|
||||
</button>
|
||||
</span>
|
||||
}
|
||||
|
||||
@if (clientViewData.staffId) {
|
||||
<span>
|
||||
<button mat-menu-item *mifosxHasPermission="'UNASSIGNSTAFF_CLIENT'" (click)="doAction('Unassign Staff')">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="user-tie" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span>{{ 'labels.buttons.Unassign Staff' | translate }}</span>
|
||||
</button>
|
||||
</span>
|
||||
}
|
||||
|
||||
<button mat-menu-item [matMenuTriggerFor]="More">{{ 'labels.buttons.More' | translate }}</button>
|
||||
</mat-menu>
|
||||
@@ -230,49 +248,67 @@
|
||||
<button mat-menu-item (click)="doAction('Transfer Client')">
|
||||
{{ 'labels.buttons.Transfer Client' | translate }}
|
||||
</button>
|
||||
<span *ngIf="clientViewData.status.value === 'Pending'"
|
||||
><button mat-menu-item (click)="doAction('Activate')">
|
||||
{{ 'labels.buttons.Activate' | translate }}
|
||||
</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Pending'"
|
||||
><button mat-menu-item (click)="doAction('Withdraw')">
|
||||
{{ 'labels.buttons.Withdraw' | translate }}
|
||||
</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Pending'"
|
||||
><button mat-menu-item (click)="doAction('Reject')">{{ 'labels.buttons.Reject' | translate }}</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Pending'"
|
||||
><button mat-menu-item *mifosxHasPermission="'DELETE_CLIENT'" (click)="doAction('Delete')">
|
||||
{{ 'labels.buttons.Delete' | translate }}
|
||||
</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Closed'"
|
||||
><button mat-menu-item (click)="doAction('Reactivate')">
|
||||
{{ 'labels.buttons.Reactivate' | translate }}
|
||||
</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Rejected'"
|
||||
><button mat-menu-item (click)="doAction('Undo Rejection')">
|
||||
{{ 'labels.buttons.Undo Rejection' | translate }}
|
||||
</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Transfer in progress'"
|
||||
><button mat-menu-item (click)="doAction('Undo Transfer')">
|
||||
{{ 'labels.buttons.Undo Transfer' | translate }}
|
||||
</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Transfer in progress'"
|
||||
><button mat-menu-item (click)="doAction('Accept Transfer')">
|
||||
{{ 'labels.buttons.Accept Transfer' | translate }}
|
||||
</button></span
|
||||
>
|
||||
<span *ngIf="clientViewData.status.value === 'Transfer in progress'"
|
||||
><button mat-menu-item (click)="doAction('Reject Transfer')">
|
||||
{{ 'labels.buttons.Reject transfer' | translate }}
|
||||
</button></span
|
||||
>
|
||||
@if (clientViewData.status.value === 'Pending') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Activate')">
|
||||
{{ 'labels.buttons.Activate' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Pending') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Withdraw')">
|
||||
{{ 'labels.buttons.Withdraw' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Pending') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Reject')">{{ 'labels.buttons.Reject' | translate }}</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Pending') {
|
||||
<span
|
||||
><button mat-menu-item *mifosxHasPermission="'DELETE_CLIENT'" (click)="doAction('Delete')">
|
||||
{{ 'labels.buttons.Delete' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Closed') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Reactivate')">
|
||||
{{ 'labels.buttons.Reactivate' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Rejected') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Undo Rejection')">
|
||||
{{ 'labels.buttons.Undo Rejection' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Transfer in progress') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Undo Transfer')">
|
||||
{{ 'labels.buttons.Undo Transfer' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Transfer in progress') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Accept Transfer')">
|
||||
{{ 'labels.buttons.Accept Transfer' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
@if (clientViewData.status.value === 'Transfer in progress') {
|
||||
<span
|
||||
><button mat-menu-item (click)="doAction('Reject Transfer')">
|
||||
{{ 'labels.buttons.Reject transfer' | translate }}
|
||||
</button></span
|
||||
>
|
||||
}
|
||||
</mat-menu>
|
||||
|
||||
<mat-menu #More="matMenu">
|
||||
@@ -308,15 +344,17 @@
|
||||
>
|
||||
{{ 'labels.buttons.Create Standing Instructions' | translate }}
|
||||
</button>
|
||||
<span *ngIf="clientViewData.status.value !== 'Transfer on hold'">
|
||||
<button
|
||||
mat-menu-item
|
||||
(click)="doAction('View Standing Instructions')"
|
||||
*mifosxHasPermission="'READ_STANDINGINSTRUCTION'"
|
||||
>
|
||||
{{ 'labels.buttons.View Standing Instructions' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
@if (clientViewData.status.value !== 'Transfer on hold') {
|
||||
<span>
|
||||
<button
|
||||
mat-menu-item
|
||||
(click)="doAction('View Standing Instructions')"
|
||||
*mifosxHasPermission="'READ_STANDINGINSTRUCTION'"
|
||||
>
|
||||
{{ 'labels.buttons.View Standing Instructions' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
}
|
||||
</mat-menu>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
@@ -380,7 +418,7 @@
|
||||
>
|
||||
{{ 'labels.inputs.Notes' | translate }}
|
||||
</a>
|
||||
<ng-container *ngFor="let clientDatatable of clientDatatables">
|
||||
@for (clientDatatable of clientDatatables; track clientDatatable) {
|
||||
<a
|
||||
mat-tab-link
|
||||
[routerLink]="['./datatables', clientDatatable.registeredTableName]"
|
||||
@@ -391,7 +429,7 @@
|
||||
>
|
||||
{{ clientDatatable.registeredTableName }}
|
||||
</a>
|
||||
</ng-container>
|
||||
}
|
||||
</nav>
|
||||
<mat-tab-nav-panel #tabPanel>
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from '@angular/material/card';
|
||||
import { MatButton, MatIconButton } from '@angular/material/button';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { NgClass, NgIf, NgFor } from '@angular/common';
|
||||
import { NgClass } from '@angular/common';
|
||||
import { EntityNameComponent } from '../../shared/entity-name/entity-name.component';
|
||||
import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
@@ -70,18 +70,18 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientsViewComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private clientsService = inject(ClientsService);
|
||||
private _sanitizer = inject(DomSanitizer);
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
clientViewData: any;
|
||||
clientDatatables: any;
|
||||
clientImage: any;
|
||||
clientTemplateData: any;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private clientsService: ClientsService,
|
||||
private _sanitizer: DomSanitizer,
|
||||
public dialog: MatDialog
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientViewData: any; clientTemplateData: any; clientDatatables: any }) => {
|
||||
this.clientViewData = data.clientViewData;
|
||||
this.clientDatatables = data.clientDatatables;
|
||||
|
||||
+10
-6
@@ -10,12 +10,16 @@
|
||||
<p #fallback [ngStyle]="{ display: 'none' }" align="center"></p>
|
||||
|
||||
<div class="flex-20" align="center">
|
||||
<button #captureButton *ngIf="!isCaptured" mat-stroked-button color="primary" (click)="capture()">
|
||||
{{ 'labels.buttons.Capture' | translate }}
|
||||
</button>
|
||||
<button *ngIf="isCaptured" mat-stroked-button color="primary" (click)="recapture()">
|
||||
<fa-icon icon="undo" size="sm" class="m-r-10"></fa-icon>{{ 'labels.buttons.Recapture' | translate }}
|
||||
</button>
|
||||
@if (!isCaptured) {
|
||||
<button #captureButton mat-stroked-button color="primary" (click)="capture()">
|
||||
{{ 'labels.buttons.Capture' | translate }}
|
||||
</button>
|
||||
}
|
||||
@if (isCaptured) {
|
||||
<button mat-stroked-button color="primary" (click)="recapture()">
|
||||
<fa-icon icon="undo" size="sm" class="m-r-10"></fa-icon>{{ 'labels.buttons.Recapture' | translate }}
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-dialog-actions align="end">
|
||||
|
||||
+5
-11
@@ -1,7 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, ViewChild, ElementRef, AfterViewInit, Renderer2, OnDestroy } from '@angular/core';
|
||||
import { Component, ViewChild, ElementRef, AfterViewInit, Renderer2, OnDestroy, inject } from '@angular/core';
|
||||
import { MatDialogRef, MatDialogTitle, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
|
||||
import { NgStyle, NgIf } from '@angular/common';
|
||||
import { NgStyle } from '@angular/common';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
@@ -22,6 +22,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class CaptureImageDialogComponent implements AfterViewInit, OnDestroy {
|
||||
dialogRef = inject<MatDialogRef<CaptureImageDialogComponent>>(MatDialogRef);
|
||||
private renderer = inject(Renderer2);
|
||||
|
||||
/** Video element reference */
|
||||
@ViewChild('video', { static: true }) video: ElementRef;
|
||||
/** Canvas element reference */
|
||||
@@ -36,15 +39,6 @@ export class CaptureImageDialogComponent implements AfterViewInit, OnDestroy {
|
||||
/** Client image file */
|
||||
clientImageDataURL: string;
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Mat Dialog Reference
|
||||
* @param {Renderer2} renderer Template Renderer
|
||||
*/
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<CaptureImageDialogComponent>,
|
||||
private renderer: Renderer2
|
||||
) {}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.startCamera();
|
||||
}
|
||||
|
||||
+20
-12
@@ -1,19 +1,27 @@
|
||||
<h1 mat-dialog-title>{{ 'labels.heading.Delete Client Signature' | translate }}</h1>
|
||||
|
||||
<div *ngIf="signatureId" mat-dialog-content>
|
||||
<p>{{ 'labels.text.Delete clients signature' | translate }} ?</p>
|
||||
</div>
|
||||
@if (signatureId) {
|
||||
<div mat-dialog-content>
|
||||
<p>{{ 'labels.text.Delete clients signature' | translate }} ?</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div *ngIf="!signatureId" mat-dialog-content>
|
||||
<p>{{ 'labels.text.Client Signature is not provided.' | translate }}</p>
|
||||
</div>
|
||||
@if (!signatureId) {
|
||||
<div mat-dialog-content>
|
||||
<p>{{ 'labels.text.Client Signature is not provided.' | translate }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-dialog-close>{{ 'labels.buttons.Cancel' | translate }}</button>
|
||||
<button mat-raised-button *ngIf="signatureId" color="warn" [mat-dialog-close]="{ delete: true, id: signatureId }">
|
||||
{{ 'labels.buttons.Confirm' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button *ngIf="!signatureId" color="primary" [mat-dialog-close]="{ upload: true }">
|
||||
{{ 'labels.buttons.Upload' | translate }}
|
||||
</button>
|
||||
@if (signatureId) {
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="{ delete: true, id: signatureId }">
|
||||
{{ 'labels.buttons.Confirm' | translate }}
|
||||
</button>
|
||||
}
|
||||
@if (!signatureId) {
|
||||
<button mat-raised-button color="primary" [mat-dialog-close]="{ upload: true }">
|
||||
{{ 'labels.buttons.Upload' | translate }}
|
||||
</button>
|
||||
}
|
||||
</mat-dialog-actions>
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -28,6 +28,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class DeleteSignatureDialogComponent {
|
||||
dialogRef = inject<MatDialogRef<DeleteSignatureDialogComponent>>(MatDialogRef);
|
||||
data = inject(MAT_DIALOG_DATA);
|
||||
|
||||
/** Id of client signature in documents */
|
||||
signatureId: any;
|
||||
|
||||
@@ -35,10 +38,7 @@ export class DeleteSignatureDialogComponent {
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
* @param {any} data Documents data
|
||||
*/
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<DeleteSignatureDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any[]
|
||||
) {
|
||||
constructor() {
|
||||
const signature = this.data.find((document: any) => document.name === 'clientSignature') || {};
|
||||
this.signatureId = signature.id;
|
||||
}
|
||||
|
||||
+5
-7
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -22,13 +22,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class EditNotesDialogComponent implements OnInit {
|
||||
noteForm: UntypedFormGroup;
|
||||
dialogRef = inject<MatDialogRef<EditNotesDialogComponent>>(MatDialogRef);
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
data = inject(MAT_DIALOG_DATA);
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<EditNotesDialogComponent>,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any
|
||||
) {}
|
||||
noteForm: UntypedFormGroup;
|
||||
|
||||
ngOnInit() {
|
||||
this.createNoteForm();
|
||||
|
||||
+2
-5
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -28,8 +28,5 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UnassignStaffDialogComponent {
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
*/
|
||||
constructor(public dialogRef: MatDialogRef<UnassignStaffDialogComponent>) {}
|
||||
dialogRef = inject<MatDialogRef<UnassignStaffDialogComponent>>(MatDialogRef);
|
||||
}
|
||||
|
||||
+48
-39
@@ -1,69 +1,79 @@
|
||||
<h1 mat-dialog-title>
|
||||
<ng-container *ngIf="documentIdentifier; else defaultTitle">
|
||||
@if (documentIdentifier) {
|
||||
{{ 'labels.heading.Add Client Identifier' | translate }}
|
||||
</ng-container>
|
||||
<ng-template #defaultTitle>
|
||||
} @else {
|
||||
{{ 'labels.heading.Upload' | translate }} {{ entityType }} {{ 'labels.heading.Documents' | translate }}
|
||||
</ng-template>
|
||||
}
|
||||
</h1>
|
||||
<div class="m-l-10 m-r-10">
|
||||
<form [formGroup]="uploadDocumentForm" class="layout-column">
|
||||
<!-- Identity-specific fields -->
|
||||
<ng-container *ngIf="documentIdentifier">
|
||||
@if (documentIdentifier) {
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.Document Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="documentTypeId" required>
|
||||
<mat-option *ngFor="let docType of allowedDocumentTypes" [value]="docType.id">
|
||||
{{ docType.name }}
|
||||
</mat-option>
|
||||
@for (docType of allowedDocumentTypes; track docType) {
|
||||
<mat-option [value]="docType.id">
|
||||
{{ docType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="uploadDocumentForm.controls.documentTypeId?.hasError('required')">
|
||||
{{ 'labels.inputs.Document Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (uploadDocumentForm.controls.documentTypeId?.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Document Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.Status' | translate }}</mat-label>
|
||||
<mat-select formControlName="status" required>
|
||||
<mat-option *ngFor="let status of statusOptions" [value]="status.value">
|
||||
{{ status.label }}
|
||||
</mat-option>
|
||||
@for (status of statusOptions; track status) {
|
||||
<mat-option [value]="status.value">
|
||||
{{ status.label }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="uploadDocumentForm.controls.status?.hasError('required')">
|
||||
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (uploadDocumentForm.controls.status?.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.Document Key' | translate }}</mat-label>
|
||||
<input formControlName="documentKey" required matInput />
|
||||
<mat-error *ngIf="uploadDocumentForm.controls.documentKey?.hasError('required')">
|
||||
{{ 'labels.inputs.Document Key' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (uploadDocumentForm.controls.documentKey?.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Document Key' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
|
||||
<input formControlName="description" matInput />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.File Name' | translate }}</mat-label>
|
||||
<input formControlName="fileName" required matInput />
|
||||
<mat-error *ngIf="uploadDocumentForm.controls.fileName.hasError('required')">
|
||||
{{ 'labels.inputs.File Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (uploadDocumentForm.controls.fileName.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.File Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-fill" *ngIf="!documentIdentifier">
|
||||
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
|
||||
<input formControlName="description" matInput />
|
||||
</mat-form-field>
|
||||
@if (!documentIdentifier) {
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
|
||||
<input formControlName="description" matInput />
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mifosx-file-upload flex="60%" (change)="onFileSelect($event)"></mifosx-file-upload>
|
||||
|
||||
@@ -75,12 +85,11 @@
|
||||
[disabled]="!uploadDocumentForm.valid"
|
||||
[mat-dialog-close]="uploadDocumentForm.value"
|
||||
>
|
||||
<ng-container *ngIf="documentIdentifier; else uploadLabel">
|
||||
@if (documentIdentifier) {
|
||||
{{ 'labels.buttons.Add' | translate }}
|
||||
</ng-container>
|
||||
<ng-template #uploadLabel>
|
||||
} @else {
|
||||
{{ 'labels.buttons.Upload' | translate }}
|
||||
</ng-template>
|
||||
}
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
|
||||
+8
-6
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -23,6 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UploadDocumentDialogComponent implements OnInit {
|
||||
dialogRef = inject<MatDialogRef<UploadDocumentDialogComponent>>(MatDialogRef);
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
data = inject(MAT_DIALOG_DATA);
|
||||
|
||||
/** Upload Document form. */
|
||||
uploadDocumentForm: UntypedFormGroup;
|
||||
/** Upload Document Data */
|
||||
@@ -41,11 +45,9 @@ export class UploadDocumentDialogComponent implements OnInit {
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
* @param {any} data Dialog Data
|
||||
*/
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<UploadDocumentDialogComponent>,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any
|
||||
) {
|
||||
constructor() {
|
||||
const data = this.data;
|
||||
|
||||
this.documentIdentifier = data.documentIdentifier;
|
||||
this.entityType = data.entityType;
|
||||
this.allowedDocumentTypes = data.allowedDocumentTypes || [];
|
||||
|
||||
+3
-6
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { MatDialogRef, MatDialogTitle, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
|
||||
import { FileUploadComponent } from '../../../../shared/file-upload/file-upload.component';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
@@ -20,14 +20,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UploadImageDialogComponent {
|
||||
dialogRef = inject<MatDialogRef<UploadImageDialogComponent>>(MatDialogRef);
|
||||
|
||||
/** Client Image */
|
||||
image: File;
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
*/
|
||||
constructor(public dialogRef: MatDialogRef<UploadImageDialogComponent>) {}
|
||||
|
||||
/**
|
||||
* Sets file form control value.
|
||||
* @param {any} $event file change event.
|
||||
|
||||
+3
-6
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { MatDialogRef, MatDialogTitle, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
|
||||
import { FileUploadComponent } from '../../../../shared/file-upload/file-upload.component';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
@@ -20,14 +20,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UploadSignatureDialogComponent {
|
||||
dialogRef = inject<MatDialogRef<UploadSignatureDialogComponent>>(MatDialogRef);
|
||||
|
||||
/** Client Signature */
|
||||
signature: File;
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
*/
|
||||
constructor(public dialogRef: MatDialogRef<UploadSignatureDialogComponent>) {}
|
||||
|
||||
/**
|
||||
* Sets file form control value.
|
||||
* @param {any} $event file change event.
|
||||
|
||||
+20
-12
@@ -1,19 +1,27 @@
|
||||
<h1 mat-dialog-title>{{ 'labels.heading.View Client Signature' | translate }}</h1>
|
||||
|
||||
<div *ngIf="signatureId" mat-dialog-content>
|
||||
<img [src]="signatureImage" alt="Signature" />
|
||||
</div>
|
||||
@if (signatureId) {
|
||||
<div mat-dialog-content>
|
||||
<img [src]="signatureImage" alt="Signature" />
|
||||
</div>
|
||||
}
|
||||
|
||||
<div *ngIf="!signatureId" mat-dialog-content>
|
||||
<p>{{ 'labels.text.Client Signature is not provided.' | translate }}</p>
|
||||
</div>
|
||||
@if (!signatureId) {
|
||||
<div mat-dialog-content>
|
||||
<p>{{ 'labels.text.Client Signature is not provided.' | translate }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-dialog-close>{{ 'labels.buttons.Close' | translate }}</button>
|
||||
<button mat-raised-button *ngIf="signatureId" color="warn" [mat-dialog-close]="{ delete: true }">
|
||||
{{ 'labels.buttons.Delete' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button *ngIf="!signatureId" color="primary" [mat-dialog-close]="{ upload: true }">
|
||||
{{ 'labels.buttons.Upload' | translate }}
|
||||
</button>
|
||||
@if (signatureId) {
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="{ delete: true }">
|
||||
{{ 'labels.buttons.Delete' | translate }}
|
||||
</button>
|
||||
}
|
||||
@if (!signatureId) {
|
||||
<button mat-raised-button color="primary" [mat-dialog-close]="{ upload: true }">
|
||||
{{ 'labels.buttons.Upload' | translate }}
|
||||
</button>
|
||||
}
|
||||
</mat-dialog-actions>
|
||||
|
||||
+10
-7
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -35,6 +35,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ViewSignatureDialogComponent implements OnInit {
|
||||
dialogRef = inject<MatDialogRef<ViewSignatureDialogComponent>>(MatDialogRef);
|
||||
private clientsService = inject(ClientsService);
|
||||
private sanitizer = inject(DomSanitizer);
|
||||
data = inject<{
|
||||
documents: any[];
|
||||
id: string;
|
||||
}>(MAT_DIALOG_DATA);
|
||||
|
||||
/** Id of client signature in documents */
|
||||
signatureId: any;
|
||||
/** Signature Image */
|
||||
@@ -46,12 +54,7 @@ export class ViewSignatureDialogComponent implements OnInit {
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
* @param {any} data Documents data
|
||||
*/
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<ViewSignatureDialogComponent>,
|
||||
private clientsService: ClientsService,
|
||||
private sanitizer: DomSanitizer,
|
||||
@Inject(MAT_DIALOG_DATA) public data: { documents: any[]; id: string }
|
||||
) {
|
||||
constructor() {
|
||||
const signature = this.data.documents.find((document: any) => document.name === 'clientSignature') || {};
|
||||
this.signatureId = signature.id;
|
||||
this.clientId = this.data.id;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { EntityDatatableTabComponent } from '../../../shared/tabs/entity-datatable-tab/entity-datatable-tab.component';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
@@ -13,11 +13,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class DatatableTabComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
entityId: string;
|
||||
entityDatatable: any;
|
||||
multiRowDatatableFlag: boolean;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor() {
|
||||
this.entityId = this.route.parent.parent.snapshot.paramMap.get('clientId');
|
||||
|
||||
this.route.data.subscribe((data: { clientDatatable: any }) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@@ -17,15 +17,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class DocumentsTabComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientsService = inject(ClientsService);
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
entityDocuments: any;
|
||||
entityId: string;
|
||||
entityType = 'clients';
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private clientsService: ClientsService,
|
||||
public dialog: MatDialog
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientDocuments: any }) => {
|
||||
this.entityDocuments = data.clientDocuments;
|
||||
});
|
||||
|
||||
+44
-31
@@ -11,10 +11,12 @@
|
||||
placeholder="First Name"
|
||||
title="First Name"
|
||||
/>
|
||||
<mat-error *ngIf="addFamilyMemberForm.controls.firstName.hasError('required')">
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (addFamilyMemberForm.controls.firstName.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
@@ -38,10 +40,12 @@
|
||||
placeholder="Last Name"
|
||||
title="Last Name"
|
||||
/>
|
||||
<mat-error *ngIf="addFamilyMemberForm.controls.lastName.hasError('required')">
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (addFamilyMemberForm.controls.lastName.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
@@ -76,47 +80,56 @@
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Relationship' | translate }}</mat-label>
|
||||
<mat-select formControlName="relationshipId" required>
|
||||
<mat-option *ngFor="let relation of addFamilyMemberTemplate.relationshipIdOptions" [value]="relation.id">
|
||||
{{ relation.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (relation of addFamilyMemberTemplate.relationshipIdOptions; track relation) {
|
||||
<mat-option [value]="relation.id">
|
||||
{{ relation.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="addFamilyMemberForm.controls.relationshipId.hasError('required')">
|
||||
{{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (addFamilyMemberForm.controls.relationshipId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Gender' | translate }}</mat-label>
|
||||
<mat-select formControlName="genderId" required>
|
||||
<mat-option *ngFor="let gender of addFamilyMemberTemplate.genderIdOptions" [value]="gender.id">
|
||||
{{ gender.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (gender of addFamilyMemberTemplate.genderIdOptions; track gender) {
|
||||
<mat-option [value]="gender.id">
|
||||
{{ gender.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="addFamilyMemberForm.controls.genderId.hasError('required')">
|
||||
{{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (addFamilyMemberForm.controls.genderId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Profession' | translate }}</mat-label>
|
||||
<mat-select formControlName="professionId">
|
||||
<mat-option *ngFor="let profession of addFamilyMemberTemplate.professionIdOptions" [value]="profession.id">
|
||||
{{ profession.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (profession of addFamilyMemberTemplate.professionIdOptions; track profession) {
|
||||
<mat-option [value]="profession.id">
|
||||
{{ profession.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Marital Status' | translate }}</mat-label>
|
||||
<mat-select formControlName="maritalStatusId">
|
||||
<mat-option
|
||||
*ngFor="let maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions"
|
||||
[value]="maritalStatus.id"
|
||||
>
|
||||
{{ maritalStatus.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions; track maritalStatus) {
|
||||
<mat-option [value]="maritalStatus.id">
|
||||
{{ maritalStatus.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AddFamilyMemberComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private dateUtils = inject(Dates);
|
||||
private router = inject(Router);
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Maximum Due Date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Minimum age allowed is 0. */
|
||||
@@ -42,14 +49,7 @@ export class AddFamilyMemberComponent implements OnInit {
|
||||
* @param {ClientsService} clientsService Clients Service
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private dateUtils: Dates,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientTemplate: any }) => {
|
||||
this.addFamilyMemberTemplate = data.clientTemplate.familyMemberOptions;
|
||||
});
|
||||
|
||||
+44
-31
@@ -4,10 +4,12 @@
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
|
||||
<input formControlName="firstName" required matInput />
|
||||
<mat-error *ngIf="editFamilyMemberForm.controls.firstName.hasError('required')">
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (editFamilyMemberForm.controls.firstName.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
@@ -18,10 +20,12 @@
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
|
||||
<input formControlName="lastName" required matInput />
|
||||
<mat-error *ngIf="editFamilyMemberForm.controls.lastName.hasError('required')">
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (editFamilyMemberForm.controls.lastName.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
@@ -41,47 +45,56 @@
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Relationship' | translate }}</mat-label>
|
||||
<mat-select formControlName="relationshipId" required>
|
||||
<mat-option *ngFor="let relation of addFamilyMemberTemplate.relationshipIdOptions" [value]="relation.id">
|
||||
{{ relation.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (relation of addFamilyMemberTemplate.relationshipIdOptions; track relation) {
|
||||
<mat-option [value]="relation.id">
|
||||
{{ relation.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="editFamilyMemberForm.controls.relationshipId.hasError('required')">
|
||||
{{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (editFamilyMemberForm.controls.relationshipId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Relationship' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Gender' | translate }}</mat-label>
|
||||
<mat-select formControlName="genderId" required>
|
||||
<mat-option *ngFor="let gender of addFamilyMemberTemplate.genderIdOptions" [value]="gender.id">
|
||||
{{ gender.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (gender of addFamilyMemberTemplate.genderIdOptions; track gender) {
|
||||
<mat-option [value]="gender.id">
|
||||
{{ gender.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="editFamilyMemberForm.controls.genderId.hasError('required')">
|
||||
{{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (editFamilyMemberForm.controls.genderId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Gender' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Profession' | translate }}</mat-label>
|
||||
<mat-select formControlName="professionId">
|
||||
<mat-option *ngFor="let profession of addFamilyMemberTemplate.professionIdOptions" [value]="profession.id">
|
||||
{{ profession.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (profession of addFamilyMemberTemplate.professionIdOptions; track profession) {
|
||||
<mat-option [value]="profession.id">
|
||||
{{ profession.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-50-minus-25px">
|
||||
<mat-label>{{ 'labels.inputs.Marital Status' | translate }}</mat-label>
|
||||
<mat-select formControlName="maritalStatusId">
|
||||
<mat-option
|
||||
*ngFor="let maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions"
|
||||
[value]="maritalStatus.id"
|
||||
>
|
||||
{{ maritalStatus.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (maritalStatus of addFamilyMemberTemplate.maritalStatusIdOptions; track maritalStatus) {
|
||||
<mat-option [value]="maritalStatus.id">
|
||||
{{ maritalStatus.name | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class EditFamilyMemberComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private dateUtils = inject(Dates);
|
||||
private router = inject(Router);
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Maximum Due Date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Add family member form. */
|
||||
@@ -40,14 +47,7 @@ export class EditFamilyMemberComponent implements OnInit {
|
||||
* @param {ClientsService} clientsService Clients Service
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private dateUtils: Dates,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientTemplate: any; editFamilyMember: any }) => {
|
||||
this.addFamilyMemberTemplate = data.clientTemplate.familyMemberOptions;
|
||||
this.familyMemberDetails = data.editFamilyMember;
|
||||
|
||||
@@ -9,57 +9,66 @@
|
||||
</div>
|
||||
|
||||
<mat-accordion>
|
||||
<mat-expansion-panel *ngFor="let member of clientFamilyMembers; index as i" class="family-member">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ displayName(member) }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ member.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div class="family-member-actions layout-row align-end">
|
||||
<button mat-button color="primary">
|
||||
<fa-icon icon="edit" [routerLink]="[member.id, 'edit']"></fa-icon>
|
||||
</button>
|
||||
<button mat-button color="warn" (click)="deleteFamilyMember(member.clientId, member.id, member.firstName, i)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<span *ngIf="member.firstName"
|
||||
>{{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }}<br
|
||||
/></span>
|
||||
<span *ngIf="member.middleName"
|
||||
>{{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }}<br
|
||||
/></span>
|
||||
<span *ngIf="member.lastName">{{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }}<br /></span>
|
||||
<span *ngIf="member.qualification"
|
||||
>{{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }}<br
|
||||
/></span>
|
||||
<span *ngIf="member.mobileNumber"
|
||||
>{{ 'labels.inputs.Mobile Number' | translate }} : {{ member.mobileNumber }}<br
|
||||
/></span>
|
||||
<span *ngIf="member.age">{{ 'labels.inputs.Age' | translate }} : {{ member.age }}<br /></span>
|
||||
<span *ngIf="member.isDependent"
|
||||
>{{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent | yesNo }}<br
|
||||
/></span>
|
||||
<span *ngIf="member.maritalStatus"
|
||||
>{{ 'labels.inputs.Marital Status' | translate }} : {{ member.maritalStatus }}<br
|
||||
/></span>
|
||||
<span *ngIf="member.gender">{{ 'labels.inputs.Gender' | translate }} : {{ member.gender }}<br /></span>
|
||||
<span *ngIf="member.profession"
|
||||
>{{ 'labels.inputs.Profession' | translate }} : {{ member.profession }}<br
|
||||
/></span>
|
||||
<span *ngIf="member.dateOfBirth"
|
||||
>{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br
|
||||
/></span>
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
@for (member of clientFamilyMembers; track member; let i = $index) {
|
||||
<mat-expansion-panel class="family-member">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
{{ displayName(member) }}
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
{{ member.relationship }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
<div class="family-member-actions layout-row align-end">
|
||||
<button mat-button color="primary">
|
||||
<fa-icon icon="edit" [routerLink]="[member.id, 'edit']"></fa-icon>
|
||||
</button>
|
||||
<button
|
||||
mat-button
|
||||
color="warn"
|
||||
(click)="deleteFamilyMember(member.clientId, member.id, member.firstName, i)"
|
||||
>
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
<p>
|
||||
@if (member.firstName) {
|
||||
<span>{{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }}<br /></span>
|
||||
}
|
||||
@if (member.middleName) {
|
||||
<span>{{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }}<br /></span>
|
||||
}
|
||||
@if (member.lastName) {
|
||||
<span>{{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }}<br /></span>
|
||||
}
|
||||
@if (member.qualification) {
|
||||
<span>{{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }}<br /></span>
|
||||
}
|
||||
@if (member.mobileNumber) {
|
||||
<span>{{ 'labels.inputs.Mobile Number' | translate }} : {{ member.mobileNumber }}<br /></span>
|
||||
}
|
||||
@if (member.age) {
|
||||
<span>{{ 'labels.inputs.Age' | translate }} : {{ member.age }}<br /></span>
|
||||
}
|
||||
@if (member.isDependent) {
|
||||
<span>{{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent | yesNo }}<br /></span>
|
||||
}
|
||||
@if (member.maritalStatus) {
|
||||
<span>{{ 'labels.inputs.Marital Status' | translate }} : {{ member.maritalStatus }}<br /></span>
|
||||
}
|
||||
@if (member.gender) {
|
||||
<span>{{ 'labels.inputs.Gender' | translate }} : {{ member.gender }}<br /></span>
|
||||
}
|
||||
@if (member.profession) {
|
||||
<span>{{ 'labels.inputs.Profession' | translate }} : {{ member.profession }}<br /></span>
|
||||
}
|
||||
@if (member.dateOfBirth) {
|
||||
<span>{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br /></span>
|
||||
}
|
||||
</p>
|
||||
</mat-expansion-panel>
|
||||
}
|
||||
</mat-accordion>
|
||||
</router-outlet>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute, RouterOutlet, RouterLink } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@@ -43,6 +43,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class FamilyMembersTabComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientsService = inject(ClientsService);
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
/** Client Family Members */
|
||||
clientFamilyMembers: any;
|
||||
|
||||
@@ -51,11 +55,7 @@ export class FamilyMembersTabComponent {
|
||||
* @param {ClientsService} clientsService Clients Service
|
||||
* @param {MatDialog }dialog Mat Dialog
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private clientsService: ClientsService,
|
||||
public dialog: MatDialog
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { clientFamilyMembers: any }) => {
|
||||
this.clientFamilyMembers = data.clientFamilyMembers;
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
/** Custom Services. */
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
MatRowDef,
|
||||
MatRow
|
||||
} from '@angular/material/table';
|
||||
import { NgClass, NgIf } from '@angular/common';
|
||||
import { NgClass } from '@angular/common';
|
||||
import { AccountNumberComponent } from '../../../shared/account-number/account-number.component';
|
||||
import { LongTextComponent } from '../../../shared/long-text/long-text.component';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
@@ -56,6 +56,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class GeneralTabComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientService = inject(ClientsService);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Open Loan Accounts Columns */
|
||||
openLoansColumns: string[] = [
|
||||
'Account No',
|
||||
@@ -159,11 +163,7 @@ export class GeneralTabComponent {
|
||||
* @param {ClientsService} clientService Clients Service
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private clientService: ClientsService,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe(
|
||||
(data: { clientAccountsData: any; clientChargesData: any; clientSummary: any; clientCollateralData: any }) => {
|
||||
this.clientAccountData = data.clientAccountsData;
|
||||
|
||||
@@ -37,45 +37,51 @@
|
||||
<ng-container matColumnDef="documents">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Identity Documents' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let identity">
|
||||
<div class="document-grid" *ngIf="identity.documents?.length; else noDocs">
|
||||
<div class="document-card" *ngFor="let document of identity.documents; trackBy: trackByDocumentId">
|
||||
<div
|
||||
class="thumb"
|
||||
[class.clickable]="isPreviewable(document)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
[attr.aria-label]="('labels.buttons.Preview' | translate) + ': ' + document.name"
|
||||
(keydown.enter)="isPreviewable(document) && openDocumentPreview(identity, document)"
|
||||
(keydown.space)="isPreviewable(document) && openDocumentPreview(identity, document)"
|
||||
(click)="isPreviewable(document) && openDocumentPreview(identity, document)"
|
||||
>
|
||||
<ng-container *ngIf="previewThumbnails[document.id]; else placeholder">
|
||||
<img
|
||||
[src]="previewThumbnails[document.id]"
|
||||
[alt]="document.name"
|
||||
[title]="document.name"
|
||||
loading="lazy"
|
||||
/>
|
||||
</ng-container>
|
||||
<ng-template #placeholder>
|
||||
<div class="placeholder">
|
||||
<fa-icon icon="file"></fa-icon>
|
||||
<span>{{ document.fileName || document.name }}</span>
|
||||
@if (identity.documents?.length) {
|
||||
<div class="document-grid">
|
||||
@for (document of identity.documents; track trackByDocumentId($index, document)) {
|
||||
<div class="document-card">
|
||||
<div
|
||||
class="thumb"
|
||||
[class.clickable]="isPreviewable(document)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
[attr.aria-label]="('labels.buttons.Preview' | translate) + ': ' + document.name"
|
||||
(keydown.enter)="isPreviewable(document) && openDocumentPreview(identity, document)"
|
||||
(keydown.space)="isPreviewable(document) && openDocumentPreview(identity, document)"
|
||||
(click)="isPreviewable(document) && openDocumentPreview(identity, document)"
|
||||
>
|
||||
@if (previewThumbnails[document.id]) {
|
||||
<img
|
||||
[src]="previewThumbnails[document.id]"
|
||||
[alt]="document.name"
|
||||
[title]="document.name"
|
||||
loading="lazy"
|
||||
/>
|
||||
} @else {
|
||||
<div class="placeholder">
|
||||
<fa-icon icon="file"></fa-icon>
|
||||
<span>{{ document.fileName || document.name }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (isPreviewable(document)) {
|
||||
<div class="preview-overlay">
|
||||
<fa-icon icon="eye"></fa-icon>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="title">{{ document.name }}</div>
|
||||
@if (document.fileName) {
|
||||
<div class="meta">{{ document.fileName }}</div>
|
||||
}
|
||||
</div>
|
||||
</ng-template>
|
||||
<div class="preview-overlay" *ngIf="isPreviewable(document)">
|
||||
<fa-icon icon="eye"></fa-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="title">{{ document.name }}</div>
|
||||
<div class="meta" *ngIf="document.fileName">{{ document.fileName }}</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noDocs>
|
||||
} @else {
|
||||
<span class="muted">{{ 'labels.text.NoDocuments' | translate }}</span>
|
||||
</ng-template>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -56,6 +56,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class IdentitiesTabComponent implements OnDestroy {
|
||||
private route = inject(ActivatedRoute);
|
||||
private dialog = inject(MatDialog);
|
||||
private clientService = inject(ClientsService);
|
||||
private translateService = inject(TranslateService);
|
||||
private documentPreviewService = inject(DocumentPreviewService);
|
||||
|
||||
private destroyRef = inject(DestroyRef);
|
||||
|
||||
/** Client Identities */
|
||||
@@ -96,13 +102,7 @@ export class IdentitiesTabComponent implements OnDestroy {
|
||||
* @param {TranslateService} translateService Translate Service
|
||||
* @param {DocumentPreviewService} documentPreviewService Preview helper
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private dialog: MatDialog,
|
||||
private clientService: ClientsService,
|
||||
private translateService: TranslateService,
|
||||
private documentPreviewService: DocumentPreviewService
|
||||
) {
|
||||
constructor() {
|
||||
this.clientId = this.route.parent.snapshot.paramMap.get('clientId');
|
||||
this.route.data
|
||||
.pipe(takeUntilDestroyed(this.destroyRef))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Components */
|
||||
@@ -23,6 +23,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class NotesTabComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private clientsService = inject(ClientsService);
|
||||
private authenticationService = inject(AuthenticationService);
|
||||
|
||||
/** Client ID */
|
||||
entityId: string;
|
||||
/** Username */
|
||||
@@ -35,11 +39,7 @@ export class NotesTabComponent implements OnInit {
|
||||
* @param {ClientsService} clientsService Clients Service
|
||||
* @param {AuthenticationService} authenticationService Authentication Service
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private clientsService: ClientsService,
|
||||
private authenticationService: AuthenticationService
|
||||
) {
|
||||
constructor() {
|
||||
this.entityId = this.route.parent.snapshot.params['clientId'];
|
||||
this.addNote = this.addNote.bind(this);
|
||||
}
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="filter-box" *ngIf="existsClientsToFilter">
|
||||
<mat-checkbox #showClosedAccounts labelPosition="after" class="m-r-10"
|
||||
>{{ 'labels.inputs.Show Closed Accounts' | translate }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
@if (existsClientsToFilter) {
|
||||
<div class="filter-box">
|
||||
<mat-checkbox #showClosedAccounts labelPosition="after" class="m-r-10"
|
||||
>{{ 'labels.inputs.Show Closed Accounts' | translate }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
}
|
||||
<div class="action-button gap-25px">
|
||||
<button
|
||||
mat-raised-button
|
||||
@@ -31,9 +33,11 @@
|
||||
</div>
|
||||
|
||||
<div [hidden]="!existsClientsToFilter" class="client-list">
|
||||
<div *ngIf="isLoading">
|
||||
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
||||
</div>
|
||||
@if (isLoading) {
|
||||
<div>
|
||||
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
||||
</div>
|
||||
}
|
||||
<table mat-table [dataSource]="dataSource" matSort (matSortChange)="sortChanged($event)" class="bordered-table">
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="displayName">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, inject } from '@angular/core';
|
||||
import { MatCheckbox } from '@angular/material/checkbox';
|
||||
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
||||
import { MatSort, Sort, MatSortHeader } from '@angular/material/sort';
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
/** Custom Services */
|
||||
import { environment } from '../../environments/environment';
|
||||
import { ClientsService } from './clients.service';
|
||||
import { NgIf, NgClass } from '@angular/common';
|
||||
import { NgClass } from '@angular/common';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { MatProgressBar } from '@angular/material/progress-bar';
|
||||
import { AccountNumberComponent } from '../shared/account-number/account-number.component';
|
||||
@@ -57,6 +57,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClientsComponent implements OnInit {
|
||||
private clientService = inject(ClientsService);
|
||||
|
||||
@ViewChild('showClosedAccounts') showClosedAccounts: MatCheckbox;
|
||||
|
||||
displayedColumns = [
|
||||
@@ -84,8 +86,6 @@ export class ClientsComponent implements OnInit {
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
|
||||
constructor(private clientService: ClientsService) {}
|
||||
|
||||
ngOnInit() {
|
||||
if (environment.preloadClients) {
|
||||
this.getClients();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { map, catchError } from 'rxjs/operators';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ClientsService {
|
||||
/**
|
||||
* @param {HttpClient} http Http Client to send requests.
|
||||
*/
|
||||
constructor(private http: HttpClient) {}
|
||||
private http = inject(HttpClient);
|
||||
|
||||
getFilteredClients(
|
||||
orderBy: string,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientAccountsResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Account data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -14,14 +14,8 @@ import { ProductsService } from 'app/products/products.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientActionsResolver {
|
||||
/**
|
||||
* @param {ClientsService} clientsService Clients service.
|
||||
* @param {ProductsService} productsService Products Service
|
||||
*/
|
||||
constructor(
|
||||
private clientsService: ClientsService,
|
||||
private productsService: ProductsService
|
||||
) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
private productsService = inject(ProductsService);
|
||||
|
||||
/**
|
||||
* Returns the clients actions data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -12,10 +12,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientAddressFieldConfigurationResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Address Field Configuration.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -12,10 +12,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientAddressTemplateResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Address Field Configuration.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientAddressResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Address data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientDataAndTemplateResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Clients data and template.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientChargeViewResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Charge data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientChargesResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Charge data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientCollateralResolver {
|
||||
/**
|
||||
* @param {ClientsService} clientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Collateral data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientDatatableResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client datatables.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -12,10 +12,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientDatatablesResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client datatables.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientDocumentsResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client's Documents data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientFamilyMemberResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Clients data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientFamilyMembersResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Clients data.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,8 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientIdentifierTemplateResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Identities data.
|
||||
* @returns {Observable<any>}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -14,10 +14,8 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientIdentitiesResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Identities data.
|
||||
* @returns {Observable<any>}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientNotesResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client's Notes.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -13,10 +13,7 @@ import { ClientsService } from '../clients.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientSummaryResolver {
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) {}
|
||||
private clientsService = inject(ClientsService);
|
||||
|
||||
/**
|
||||
* Returns the Client Summary data.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user