Fixed Deposit and Recurring Deposit products with datatables (#1647)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-01-18 18:53:56 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 00ceeed3f2
commit e61f4f92e3
51 changed files with 1625 additions and 1237 deletions
@@ -40,13 +40,23 @@
</mat-select>
</mat-form-field>
<mat-form-field (click)="submittedOnDatePicker.open()">
<mat-label>Submitted on</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="submittedOnDatePicker" required formControlName="submittedOnDate">
<mat-datepicker-toggle matSuffix [for]="submittedOnDatePicker"></mat-datepicker-toggle>
<mat-datepicker #submittedOnDatePicker></mat-datepicker>
<mat-error *ngIf="groupForm.controls.submittedOnDate.hasError('required')">
Submission Date is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-checkbox labelPosition="before" formControlName="active">
Active
</mat-checkbox>
<mat-form-field *ngIf="this.groupForm.controls.active.value" (click)="activationDatePicker.open()">
<mat-form-field *ngIf="groupForm.controls.active.value" (click)="activationDatePicker.open()">
<mat-label>Activation Date</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="activationDatePicker" required formControlName="activationDate">
<input matInput [min]="groupForm.value.submittedOnDate" [max]="maxDate" [matDatepicker]="activationDatePicker" required formControlName="activationDate">
<mat-datepicker-toggle matSuffix [for]="activationDatePicker"></mat-datepicker-toggle>
<mat-datepicker #activationDatePicker></mat-datepicker>
<mat-error *ngIf="groupForm.controls.activationDate.hasError('required')">
@@ -59,21 +69,11 @@
<input matInput formControlName="externalId">
</mat-form-field>
<mat-form-field (click)="submittedOnDatePicker.open()">
<mat-label>Submitted on</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="submittedOnDatePicker" required formControlName="submittedOnDate">
<mat-datepicker-toggle matSuffix [for]="submittedOnDatePicker"></mat-datepicker-toggle>
<mat-datepicker #submittedOnDatePicker></mat-datepicker>
<mat-error *ngIf="groupForm.controls.submittedOnDate.hasError('required')">
Submission Date is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Add Clients</mat-label>
<input matInput [formControl]="clientChoice" [matAutocomplete]="clientsAutocomplete">
</mat-form-field>
</div>
<mat-autocomplete autoActiveFirstOption #clientsAutocomplete="matAutocomplete" [displayWith]="displayClient">
@@ -108,10 +108,10 @@
<mat-nav-list *ngIf="clientMembers.length">
<h3 matSubheader>Selected Clients</h3>
<div mat-list-item *ngFor="let client of clientMembers index as i">
<button mat-icon-button (click)="removeClient(i)">
<span matLine>{{client.displayName}}</span>
<button mat-icon-button color="warn" (click)="removeClient(i)">
<fa-icon icon="trash"></fa-icon>
</button>
<span matLine>{{client.displayName}}</span>
</div>
</mat-nav-list>
@@ -1,5 +1,5 @@
.container {
max-width: 37rem;
max-width: 50rem;
}
.mat-table {
@@ -87,7 +87,7 @@ export class CreateGroupComponent implements OnInit, AfterViewInit {
this.groupForm = this.formBuilder.group({
'name': ['', [Validators.required, Validators.pattern('(^[A-z]).*')]],
'officeId': ['', Validators.required],
'submittedOnDate': ['', Validators.required],
'submittedOnDate': [this.settingsService.businessDate, Validators.required],
'staffId': [''],
'externalId': [''],
'active': [false],
@@ -169,7 +169,7 @@ export class CreateGroupComponent implements OnInit, AfterViewInit {
data.clientMembers = [];
this.clientMembers.forEach((client: any) => data.clientMembers.push(client.id));
this.groupService.createGroup(data).subscribe((response: any) => {
this.router.navigate(['../groups']);
this.router.navigate(['../groups', response.resourceId, 'general']);
});
}