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:
@@ -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 { SharesService } from '../shares.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ShareAccountActionsResolver {
|
||||
/**
|
||||
* @param {sharesService} SharesService Shares service.
|
||||
*/
|
||||
constructor(private sharesService: SharesService) {}
|
||||
private sharesService = inject(SharesService);
|
||||
|
||||
/**
|
||||
* Returns the Shares account actions 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 { SharesService } from '../shares.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class SharesAccountAndTemplateResolver {
|
||||
/**
|
||||
* @param {SharesService} SharesService Shares service.
|
||||
*/
|
||||
constructor(private sharesService: SharesService) {}
|
||||
private sharesService = inject(SharesService);
|
||||
|
||||
/**
|
||||
* Returns the Shares Account 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 { SharesService } from '../shares.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class SharesAccountViewResolver {
|
||||
/**
|
||||
* @param {SharesService} SharesService Shares service.
|
||||
*/
|
||||
constructor(private sharesService: SharesService) {}
|
||||
private sharesService = inject(SharesService);
|
||||
|
||||
/**
|
||||
* Returns the Shares 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 */
|
||||
@@ -13,10 +13,7 @@ import { SharesService } from '../shares.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class SharesAccountTemplateResolver {
|
||||
/**
|
||||
* @param {SharesService} SharesService Shares service.
|
||||
*/
|
||||
constructor(private sharesService: SharesService) {}
|
||||
private sharesService = inject(SharesService);
|
||||
|
||||
/**
|
||||
* Returns the Shares Account Template.
|
||||
|
||||
@@ -55,17 +55,18 @@
|
||||
</mifosx-shares-account-charges-step>
|
||||
</mat-step>
|
||||
|
||||
<mat-step *ngIf="sharesAccountFormValid" completed>
|
||||
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
|
||||
|
||||
<mifosx-shares-account-preview-step
|
||||
[sharesAccountProductTemplate]="sharesAccountProductTemplate"
|
||||
[sharesAccountTemplate]="sharesAccountTemplate"
|
||||
[sharesAccountTermsForm]="sharesAccountTermsForm"
|
||||
[sharesAccount]="sharesAccount"
|
||||
(submitEvent)="submit()"
|
||||
>
|
||||
</mifosx-shares-account-preview-step>
|
||||
</mat-step>
|
||||
@if (sharesAccountFormValid) {
|
||||
<mat-step completed>
|
||||
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
|
||||
<mifosx-shares-account-preview-step
|
||||
[sharesAccountProductTemplate]="sharesAccountProductTemplate"
|
||||
[sharesAccountTemplate]="sharesAccountTemplate"
|
||||
[sharesAccountTermsForm]="sharesAccountTermsForm"
|
||||
[sharesAccount]="sharesAccount"
|
||||
(submitEvent)="submit()"
|
||||
>
|
||||
</mifosx-shares-account-preview-step>
|
||||
</mat-step>
|
||||
}
|
||||
</mat-stepper>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { Component, ViewChild, inject } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Components */
|
||||
@@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class CreateSharesAccountComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private sharesService = inject(SharesService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares Account Template */
|
||||
sharesAccountTemplate: any;
|
||||
/** Shares Account Product Template */
|
||||
@@ -59,13 +65,7 @@ export class CreateSharesAccountComponent {
|
||||
* @param {SharesService} sharesService Shares Service
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private sharesService: SharesService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { sharesAccountTemplate: any }) => {
|
||||
this.sharesAccountTemplate = data.sharesAccountTemplate;
|
||||
});
|
||||
|
||||
@@ -57,17 +57,18 @@
|
||||
</mifosx-shares-account-charges-step>
|
||||
</mat-step>
|
||||
|
||||
<mat-step *ngIf="sharesAccountFormValidAndNotPristine" completed>
|
||||
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
|
||||
|
||||
<mifosx-shares-account-preview-step
|
||||
[sharesAccountProductTemplate]="sharesAccountProductTemplate"
|
||||
[sharesAccountTemplate]="sharesAccountAndTemplate"
|
||||
[sharesAccountTermsForm]="sharesAccountTermsForm"
|
||||
[sharesAccount]="sharesAccount"
|
||||
(submitEvent)="submit()"
|
||||
>
|
||||
</mifosx-shares-account-preview-step>
|
||||
</mat-step>
|
||||
@if (sharesAccountFormValidAndNotPristine) {
|
||||
<mat-step completed>
|
||||
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
|
||||
<mifosx-shares-account-preview-step
|
||||
[sharesAccountProductTemplate]="sharesAccountProductTemplate"
|
||||
[sharesAccountTemplate]="sharesAccountAndTemplate"
|
||||
[sharesAccountTermsForm]="sharesAccountTermsForm"
|
||||
[sharesAccount]="sharesAccount"
|
||||
(submitEvent)="submit()"
|
||||
>
|
||||
</mifosx-shares-account-preview-step>
|
||||
</mat-step>
|
||||
}
|
||||
</mat-stepper>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { Component, ViewChild, inject } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Components */
|
||||
@@ -37,6 +37,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class EditSharesAccountComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private sharesService = inject(SharesService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares Account and Template */
|
||||
sharesAccountAndTemplate: any;
|
||||
/** Shares Account Product Template */
|
||||
@@ -59,13 +65,7 @@ export class EditSharesAccountComponent {
|
||||
* @param {SharesService} sharesService Shares Service
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private sharesService: SharesService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { sharesAccountAndTemplate: any }) => {
|
||||
this.sharesAccountAndTemplate = data.sharesAccountAndTemplate;
|
||||
});
|
||||
|
||||
+6
-4
@@ -14,10 +14,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="activatedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #activatedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="activateSharesAccountForm.controls.activatedDate.hasError('required')">
|
||||
{{ 'labels.inputs.Activated On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (activateSharesAccountForm.controls.activatedDate.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 ActivateSharesAccountComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private sharesService = inject(SharesService);
|
||||
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 ActivateSharesAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private sharesService: SharesService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
}
|
||||
|
||||
|
||||
@@ -15,19 +15,23 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="requestedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #requestedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="applySharesForm.controls.requestedDate.hasError('required')">
|
||||
{{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (applySharesForm.controls.requestedDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Total No. of Shares' | translate }}</mat-label>
|
||||
<input matInput required formControlName="requestedShares" />
|
||||
<mat-error *ngIf="applySharesForm.controls.requestedShares.hasError('required')">
|
||||
{{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (applySharesForm.controls.requestedShares.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, 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 ApplySharesComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private sharesService = inject(SharesService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares account data. */
|
||||
sharesAccountData: any;
|
||||
|
||||
@@ -41,14 +48,7 @@ export class ApplySharesComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private sharesService: SharesService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||
this.sharesAccountData = data.shareAccountActionData;
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="approvedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #approvedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="approveSharesAccountForm.controls.approvedDate.hasError('required')">
|
||||
{{ 'labels.inputs.Approved On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (approveSharesAccountForm.controls.approvedDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Approved On 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 ApproveSharesAccountComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private sharesService = inject(SharesService);
|
||||
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 ApproveSharesAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private sharesService: SharesService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
}
|
||||
|
||||
|
||||
+3
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -28,12 +28,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ApproveShareDialogComponent {
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
* @param {any} data Provides a deleteContext.
|
||||
*/
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<ApproveShareDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any
|
||||
) {}
|
||||
dialogRef = inject<MatDialogRef<ApproveShareDialogComponent>>(MatDialogRef);
|
||||
data = inject(MAT_DIALOG_DATA);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, ViewChild, Input } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, Input, inject } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort, MatSortHeader } from '@angular/material/sort';
|
||||
import {
|
||||
@@ -59,6 +59,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ApproveSharesComponent implements OnInit {
|
||||
private sharesService = inject(SharesService);
|
||||
private route = inject(ActivatedRoute);
|
||||
dialog = inject(MatDialog);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares account data. */
|
||||
sharesAccountData: any;
|
||||
|
||||
@@ -90,12 +95,7 @@ export class ApproveSharesComponent implements OnInit {
|
||||
* @param {MatDialog} dialog Dialog reference.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private sharesService: SharesService,
|
||||
private route: ActivatedRoute,
|
||||
public dialog: MatDialog,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||
this.sharesAccountData = data.shareAccountActionData;
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="closedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #closedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="closeSharesAccountForm.controls.closedDate.hasError('required')">
|
||||
{{ 'labels.inputs.Closed On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (closeSharesAccountForm.controls.closedDate.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>
|
||||
|
||||
+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 CloseSharesAccountComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private sharesService = inject(SharesService);
|
||||
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 CloseSharesAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private sharesService: SharesService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
}
|
||||
|
||||
|
||||
@@ -15,19 +15,23 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="requestedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #requestedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="redeemSharesForm.controls.requestedDate.hasError('required')">
|
||||
{{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (redeemSharesForm.controls.requestedDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Request Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Total No. of Shares' | translate }}</mat-label>
|
||||
<input matInput required formControlName="requestedShares" />
|
||||
<mat-error *ngIf="redeemSharesForm.controls.requestedShares.hasError('required')">
|
||||
{{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (redeemSharesForm.controls.requestedShares.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Requested Shares' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, 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 RedeemSharesComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private sharesService = inject(SharesService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares account data. */
|
||||
sharesAccountData: any;
|
||||
|
||||
@@ -41,14 +48,7 @@ export class RedeemSharesComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private sharesService: SharesService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||
this.sharesAccountData = data.shareAccountActionData;
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="rejectedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #rejectedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="rejectSharesAccountForm.controls.rejectedDate.hasError('required')">
|
||||
{{ 'labels.inputs.Rejected On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (rejectSharesAccountForm.controls.rejectedDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Rejected On 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 RejectSharesAccountComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private sharesService = inject(SharesService);
|
||||
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 RejectSharesAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private sharesService: SharesService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
}
|
||||
|
||||
|
||||
+3
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA,
|
||||
@@ -28,12 +28,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class RejectShareDialogComponent {
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
* @param {any} data Provides a deleteContext.
|
||||
*/
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<RejectShareDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any
|
||||
) {}
|
||||
dialogRef = inject<MatDialogRef<RejectShareDialogComponent>>(MatDialogRef);
|
||||
data = inject(MAT_DIALOG_DATA);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, ViewChild, Input } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, Input, inject } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort, MatSortHeader } from '@angular/material/sort';
|
||||
import {
|
||||
@@ -59,6 +59,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class RejectSharesComponent implements OnInit {
|
||||
private sharesService = inject(SharesService);
|
||||
private route = inject(ActivatedRoute);
|
||||
dialog = inject(MatDialog);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares account data. */
|
||||
sharesAccountData: any;
|
||||
|
||||
@@ -90,12 +95,7 @@ export class RejectSharesComponent implements OnInit {
|
||||
* @param {MatDialog} dialog Mat Dialog
|
||||
* @param {SettingsService} settingsService Settings Service.
|
||||
*/
|
||||
constructor(
|
||||
private sharesService: SharesService,
|
||||
private route: ActivatedRoute,
|
||||
public dialog: MatDialog,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||
this.sharesAccountData = data.shareAccountActionData;
|
||||
|
||||
@@ -1,9 +1,27 @@
|
||||
<mifosx-approve-shares-account *ngIf="actions['Approve']"></mifosx-approve-shares-account>
|
||||
<mifosx-reject-shares-account *ngIf="actions['Reject']"></mifosx-reject-shares-account>
|
||||
<mifosx-close-shares-account *ngIf="actions['Close']"></mifosx-close-shares-account>
|
||||
<mifosx-activate-shares-account *ngIf="actions['Activate']"></mifosx-activate-shares-account>
|
||||
<mifosx-undo-approval-shares-account *ngIf="actions['Undo Approval']"></mifosx-undo-approval-shares-account>
|
||||
<mifosx-apply-shares *ngIf="actions['Apply Additional Shares']"></mifosx-apply-shares>
|
||||
<mifosx-redeem-shares *ngIf="actions['Redeem Shares']"></mifosx-redeem-shares>
|
||||
<mifosx-approve-shares *ngIf="actions['Approve Additional Shares']"></mifosx-approve-shares>
|
||||
<mifosx-reject-shares *ngIf="actions['Reject Additional Shares']"></mifosx-reject-shares>
|
||||
@if (actions['Approve']) {
|
||||
<mifosx-approve-shares-account></mifosx-approve-shares-account>
|
||||
}
|
||||
@if (actions['Reject']) {
|
||||
<mifosx-reject-shares-account></mifosx-reject-shares-account>
|
||||
}
|
||||
@if (actions['Close']) {
|
||||
<mifosx-close-shares-account></mifosx-close-shares-account>
|
||||
}
|
||||
@if (actions['Activate']) {
|
||||
<mifosx-activate-shares-account></mifosx-activate-shares-account>
|
||||
}
|
||||
@if (actions['Undo Approval']) {
|
||||
<mifosx-undo-approval-shares-account></mifosx-undo-approval-shares-account>
|
||||
}
|
||||
@if (actions['Apply Additional Shares']) {
|
||||
<mifosx-apply-shares></mifosx-apply-shares>
|
||||
}
|
||||
@if (actions['Redeem Shares']) {
|
||||
<mifosx-redeem-shares></mifosx-redeem-shares>
|
||||
}
|
||||
@if (actions['Approve Additional Shares']) {
|
||||
<mifosx-approve-shares></mifosx-approve-shares>
|
||||
}
|
||||
@if (actions['Reject Additional Shares']) {
|
||||
<mifosx-reject-shares></mifosx-reject-shares>
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -36,6 +36,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class SharesAccountActionsComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
/** Shares Account Data */
|
||||
sharesAccountData: any;
|
||||
/** Flag object to store possible actions and render appropriate UI to the user */
|
||||
@@ -64,7 +66,7 @@ export class SharesAccountActionsComponent {
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor() {
|
||||
const name = this.route.snapshot.params['name'];
|
||||
if (name && name in this.actions) {
|
||||
this.actions[name as keyof typeof this.actions] = true;
|
||||
|
||||
+6
-6
@@ -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 */
|
||||
@@ -20,6 +20,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UndoApprovalSharesAccountComponent {
|
||||
private sharesService = inject(SharesService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Shares Account Id */
|
||||
accountId: any;
|
||||
|
||||
@@ -28,11 +32,7 @@ export class UndoApprovalSharesAccountComponent {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private sharesService: SharesService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||
}
|
||||
|
||||
|
||||
+5
-6
@@ -2,12 +2,11 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Charge' | translate }}</mat-label>
|
||||
<mat-select #charge>
|
||||
<mat-option
|
||||
*ngFor="let charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value"
|
||||
[value]="charge"
|
||||
>
|
||||
{{ charge.name }}
|
||||
</mat-option>
|
||||
@for (charge of chargeData | chargesFilter: chargesDataSource : currencyCode.value; track charge) {
|
||||
<mat-option [value]="charge">
|
||||
{{ charge.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
+4
-10
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, OnChanges, Input } from '@angular/core';
|
||||
import { Component, OnInit, OnChanges, Input, inject } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
|
||||
@@ -56,6 +56,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class SharesAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
private dialog = inject(MatDialog);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Shares Account Product Template */
|
||||
@Input() sharesAccountProductTemplate: any;
|
||||
/** Shares Account Template */
|
||||
@@ -80,14 +83,6 @@ export class SharesAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
'action'
|
||||
];
|
||||
|
||||
/**
|
||||
* @param {MatDialog} dialog Mat Dialog
|
||||
*/
|
||||
constructor(
|
||||
private dialog: MatDialog,
|
||||
private translateService: TranslateService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.currencyCode.valueChanges.subscribe(() => {
|
||||
if (!this.isChargesPatched && this.sharesAccountTemplate.charges) {
|
||||
@@ -129,7 +124,6 @@ export class SharesAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
type: 'number',
|
||||
required: false
|
||||
})
|
||||
|
||||
];
|
||||
const data = {
|
||||
title: this.translateService.instant('labels.heading.Edit Charge'),
|
||||
|
||||
+5
-3
@@ -3,9 +3,11 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Product Name' | translate }}</mat-label>
|
||||
<mat-select formControlName="productId" required>
|
||||
<mat-option *ngFor="let product of productData" [value]="product.id">
|
||||
{{ product.name }}
|
||||
</mat-option>
|
||||
@for (product of productData; track product) {
|
||||
<mat-option [value]="product.id">
|
||||
{{ product.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
|
||||
+6
-6
@@ -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 { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
@@ -24,6 +24,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class SharesAccountDetailsStepComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private sharesService = inject(SharesService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares Account Template */
|
||||
@Input() sharesAccountTemplate: any;
|
||||
|
||||
@@ -45,11 +49,7 @@ export class SharesAccountDetailsStepComponent implements OnInit {
|
||||
* @param {SharesService} sharesService Shares Service.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private sharesService: SharesService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.createSharesAccountDetailsForm();
|
||||
}
|
||||
|
||||
|
||||
+68
-63
@@ -16,12 +16,16 @@
|
||||
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.External Id' | translate }}</span>
|
||||
<span class="flex-60" *ngIf="sharesAccount.externalId">
|
||||
<mifosx-external-identifier externalId="{{ sharesAccount.externalId }}"></mifosx-external-identifier>
|
||||
</span>
|
||||
<span class="flex-60" *ngIf="!sharesAccount.externalId">
|
||||
{{ 'labels.inputs.Unassigned' | translate }}
|
||||
</span>
|
||||
@if (sharesAccount.externalId) {
|
||||
<span class="flex-60">
|
||||
<mifosx-external-identifier externalId="{{ sharesAccount.externalId }}"></mifosx-external-identifier>
|
||||
</span>
|
||||
}
|
||||
@if (!sharesAccount.externalId) {
|
||||
<span class="flex-60">
|
||||
{{ 'labels.inputs.Unassigned' | translate }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Terms' | translate }}</h3>
|
||||
@@ -59,27 +63,31 @@
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex-fill" *ngIf="sharesAccount.minimumActivePeriod">
|
||||
<span class="flex-40">{{ 'labels.inputs.Minimum Active Period' | translate }}</span>
|
||||
<span class="flex-60"
|
||||
>{{ sharesAccount.minimumActivePeriod }} {{
|
||||
sharesAccount.minimumActivePeriodFrequencyType
|
||||
| find: sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value'
|
||||
| translateKey: 'catalogs'
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
@if (sharesAccount.minimumActivePeriod) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Minimum Active Period' | translate }}</span>
|
||||
<span class="flex-60"
|
||||
>{{ sharesAccount.minimumActivePeriod }} {{
|
||||
sharesAccount.minimumActivePeriodFrequencyType
|
||||
| find: sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions : 'id' : 'value'
|
||||
| translateKey: 'catalogs'
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="sharesAccount.lockinPeriodFrequency">
|
||||
<span class="flex-40">{{ 'labels.inputs.Lock-in Period' | translate }}</span>
|
||||
<span class="flex-60"
|
||||
>{{ sharesAccount.lockinPeriodFrequency }} {{
|
||||
sharesAccount.lockinPeriodFrequencyType
|
||||
| find: sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value'
|
||||
| translateKey: 'catalogs'
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
@if (sharesAccount.lockinPeriodFrequency) {
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Lock-in Period' | translate }}</span>
|
||||
<span class="flex-60"
|
||||
>{{ sharesAccount.lockinPeriodFrequency }} {{
|
||||
sharesAccount.lockinPeriodFrequencyType
|
||||
| find: sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value'
|
||||
| translateKey: 'catalogs'
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="flex-fill">
|
||||
<span class="flex-40">{{ 'labels.inputs.Application Date' | translate }}</span>
|
||||
@@ -91,43 +99,40 @@
|
||||
<span class="flex-60">{{ sharesAccount.allowDividendCalculationForInactiveClients | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="sharesAccount.charges.length" class="layout-row-wrap responsive-column flex-fill">
|
||||
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Charges' | translate }}</h3>
|
||||
|
||||
<mat-divider class="flex-fill"></mat-divider>
|
||||
<table class="flex-fill mat-elevation-z1" mat-table [dataSource]="sharesAccount.charges">
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.name + ', ' + charge.currency.displaySymbol }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeCalculationType">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value | translateKey: 'catalogs' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount || charge.amountOrPercentage }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeTimeType">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Collected On' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeTimeType.value | translateKey: 'catalogs' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="chargesDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: chargesDisplayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
@if (sharesAccount.charges.length) {
|
||||
<div class="layout-row-wrap responsive-column flex-fill">
|
||||
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Charges' | translate }}</h3>
|
||||
<mat-divider class="flex-fill"></mat-divider>
|
||||
<table class="flex-fill mat-elevation-z1" mat-table [dataSource]="sharesAccount.charges">
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.name + ', ' + charge.currency.displaySymbol }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chargeCalculationType">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value | translateKey: 'catalogs' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount || charge.amountOrPercentage }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chargeTimeType">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Collected On' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeTimeType.value | translateKey: 'catalogs' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="chargesDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: chargesDisplayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="layout-row responsive-column align-center gap-2px margin-t">
|
||||
|
||||
+19
-18
@@ -18,16 +18,16 @@
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<span class="flex-48" *ngIf="currency">{{
|
||||
calculateCurrenValue() | currency: currency.code : 'symbol-narrow' : '1.2-2'
|
||||
}}</span>
|
||||
@if (currency) {
|
||||
<span class="flex-48">{{ calculateCurrenValue() | currency: currency.code : 'symbol-narrow' : '1.2-2' }}</span>
|
||||
}
|
||||
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Default Savings Account' | translate }}</mat-label>
|
||||
<mat-select formControlName="savingsAccountId" required>
|
||||
<mat-option *ngFor="let account of savingsAccountsData" [value]="account.id">
|
||||
{{ account.accountNo }} - {{ account.savingsProductName }}
|
||||
</mat-option>
|
||||
@for (account of savingsAccountsData; track account) {
|
||||
<mat-option [value]="account.id"> {{ account.accountNo }} - {{ account.savingsProductName }} </mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Default Savings Account' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
@@ -67,12 +67,14 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="minimumActivePeriodFrequencyType">
|
||||
<mat-option
|
||||
*ngFor="let minimumActivePeriodFrequencyType of minimumActivePeriodFrequencyTypeData"
|
||||
[value]="minimumActivePeriodFrequencyType.id"
|
||||
>
|
||||
{{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (
|
||||
minimumActivePeriodFrequencyType of minimumActivePeriodFrequencyTypeData;
|
||||
track minimumActivePeriodFrequencyType
|
||||
) {
|
||||
<mat-option [value]="minimumActivePeriodFrequencyType.id">
|
||||
{{ minimumActivePeriodFrequencyType.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -86,12 +88,11 @@
|
||||
<mat-form-field class="flex-48">
|
||||
<mat-label>{{ 'labels.inputs.Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="lockinPeriodFrequencyType">
|
||||
<mat-option
|
||||
*ngFor="let lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData"
|
||||
[value]="lockinPeriodFrequencyType.id"
|
||||
>
|
||||
{{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) {
|
||||
<mat-option [value]="lockinPeriodFrequencyType.id">
|
||||
{{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnChanges, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnChanges, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
import { NgIf, NgFor, CurrencyPipe } from '@angular/common';
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { MatCheckbox } from '@angular/material/checkbox';
|
||||
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
@@ -26,6 +26,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class SharesAccountTermsStepComponent implements OnChanges, OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Shares Account and Product Template */
|
||||
@Input() sharesAccountProductTemplate: any;
|
||||
/** [Optional] Shares Account Template */
|
||||
@@ -52,10 +55,7 @@ export class SharesAccountTermsStepComponent implements OnChanges, OnInit {
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.createSharesAccountTermsForm();
|
||||
}
|
||||
|
||||
|
||||
@@ -56,50 +56,54 @@
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
<span *ngIf="sharesAccountData.status.value === 'Submitted and pending approval'">
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
matTooltip="{{ 'tooltips.Edit Charge' | translate }}"
|
||||
*mifosxHasPermission="'UPDATE_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); editCharge(charge)"
|
||||
>
|
||||
<i class="fa fa-pencil"></i>
|
||||
</button>
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="warn"
|
||||
matTooltip="{{ 'tooltips.Delete Charge' | translate }}"
|
||||
*mifosxHasPermission="'DELETE_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); deleteCharge(charge.id)"
|
||||
>
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</span>
|
||||
<span *ngIf="sharesAccountData.status.value === 'Active'">
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
matTooltip="{{ 'tooltips.Pay Charge' | translate }}"
|
||||
*mifosxHasPermission="'PAY_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); payCharge(charge.id)"
|
||||
>
|
||||
<i class="fa fa-dollar"></i>
|
||||
</button>
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
matTooltip="{{ 'tooltips.Waive Charge' | translate }}"
|
||||
*mifosxHasPermission="'WAIVE_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); waiveCharge(charge.id)"
|
||||
>
|
||||
<i class="fa fa-flag"></i>
|
||||
</button>
|
||||
</span>
|
||||
@if (sharesAccountData.status.value === 'Submitted and pending approval') {
|
||||
<span>
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
matTooltip="{{ 'tooltips.Edit Charge' | translate }}"
|
||||
*mifosxHasPermission="'UPDATE_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); editCharge(charge)"
|
||||
>
|
||||
<i class="fa fa-pencil"></i>
|
||||
</button>
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="warn"
|
||||
matTooltip="{{ 'tooltips.Delete Charge' | translate }}"
|
||||
*mifosxHasPermission="'DELETE_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); deleteCharge(charge.id)"
|
||||
>
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</span>
|
||||
}
|
||||
@if (sharesAccountData.status.value === 'Active') {
|
||||
<span>
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
matTooltip="{{ 'tooltips.Pay Charge' | translate }}"
|
||||
*mifosxHasPermission="'PAY_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); payCharge(charge.id)"
|
||||
>
|
||||
<i class="fa fa-dollar"></i>
|
||||
</button>
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
matTooltip="{{ 'tooltips.Waive Charge' | translate }}"
|
||||
*mifosxHasPermission="'WAIVE_SHARESACCOUNTCHARGE'"
|
||||
(click)="routeEdit($event); waiveCharge(charge.id)"
|
||||
>
|
||||
<i class="fa fa-flag"></i>
|
||||
</button>
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
MatTableDataSource,
|
||||
MatTable,
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
MatRow
|
||||
} from '@angular/material/table';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { NgIf, CurrencyPipe } from '@angular/common';
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
@@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ChargesTabComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
/** Shares Account Data */
|
||||
sharesAccountData: any;
|
||||
/** Charges Data */
|
||||
@@ -65,7 +67,7 @@ export class ChargesTabComponent implements OnInit {
|
||||
* Retrieves shares account aata from `resolve`.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor() {
|
||||
this.route.parent.data.subscribe((data: { sharesAccountData: any }) => {
|
||||
this.sharesAccountData = data.sharesAccountData;
|
||||
this.chargesData = this.sharesAccountData.charges;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
MatTableDataSource,
|
||||
MatTable,
|
||||
@@ -42,6 +42,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class DividendsTabComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
/** Shares Account Data */
|
||||
shareAccountData: any;
|
||||
/** Dividends Data */
|
||||
@@ -60,7 +62,7 @@ export class DividendsTabComponent implements OnInit {
|
||||
* Retrieves shares account data from `resolve`.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor() {
|
||||
this.route.parent.data.subscribe((data: { sharesAccountData: any }) => {
|
||||
this.shareAccountData = data.sharesAccountData;
|
||||
this.dividendsData = this.shareAccountData.dividends;
|
||||
|
||||
@@ -6,12 +6,16 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ 'labels.inputs.Activated On' | translate }}</td>
|
||||
<td *ngIf="sharesAccountData.timeline.activatedDate">
|
||||
{{ sharesAccountData.timeline.activatedDate | dateFormat }}
|
||||
</td>
|
||||
<td *ngIf="!sharesAccountData.timeline.activatedDate">
|
||||
{{ 'labels.text.Not Activated' | translate }}
|
||||
</td>
|
||||
@if (sharesAccountData.timeline.activatedDate) {
|
||||
<td>
|
||||
{{ sharesAccountData.timeline.activatedDate | dateFormat }}
|
||||
</td>
|
||||
}
|
||||
@if (!sharesAccountData.timeline.activatedDate) {
|
||||
<td>
|
||||
{{ 'labels.text.Not Activated' | translate }}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'labels.inputs.Currency' | translate }}</td>
|
||||
@@ -19,26 +23,36 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'labels.inputs.External Id' | translate }}</td>
|
||||
<td *ngIf="sharesAccountData.externalId">
|
||||
<mifosx-external-identifier externalId="{{ sharesAccountData.externalId }}"></mifosx-external-identifier>
|
||||
</td>
|
||||
<td *ngIf="!sharesAccountData.externalId">
|
||||
{{ 'labels.inputs.Unassigned' | translate }}
|
||||
</td>
|
||||
@if (sharesAccountData.externalId) {
|
||||
<td>
|
||||
<mifosx-external-identifier
|
||||
externalId="{{ sharesAccountData.externalId }}"
|
||||
></mifosx-external-identifier>
|
||||
</td>
|
||||
}
|
||||
@if (!sharesAccountData.externalId) {
|
||||
<td>
|
||||
{{ 'labels.inputs.Unassigned' | translate }}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'labels.inputs.Linked Savings Account(Dividend Posting)' | translate }}</td>
|
||||
<td *ngIf="sharesAccountData.savingsAccountNumber">
|
||||
<mifosx-account-number
|
||||
accountType="2"
|
||||
clientId="{{ sharesAccountData.clientId }}"
|
||||
accountId="{{ sharesAccountData.savingsAccountId }}"
|
||||
accountNo="{{ sharesAccountData.savingsAccountNumber }}"
|
||||
></mifosx-account-number>
|
||||
</td>
|
||||
<td *ngIf="!sharesAccountData.savingsAccountNumber">
|
||||
{{ 'labels.inputs.Unassigned' | translate }}
|
||||
</td>
|
||||
@if (sharesAccountData.savingsAccountNumber) {
|
||||
<td>
|
||||
<mifosx-account-number
|
||||
accountType="2"
|
||||
clientId="{{ sharesAccountData.clientId }}"
|
||||
accountId="{{ sharesAccountData.savingsAccountId }}"
|
||||
accountNo="{{ sharesAccountData.savingsAccountNumber }}"
|
||||
></mifosx-account-number>
|
||||
</td>
|
||||
}
|
||||
@if (!sharesAccountData.savingsAccountNumber) {
|
||||
<td>
|
||||
{{ 'labels.inputs.Unassigned' | translate }}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ExternalIdentifierComponent } from '../../../shared/external-identifier/external-identifier.component';
|
||||
import { AccountNumberComponent } from '../../../shared/account-number/account-number.component';
|
||||
@@ -19,6 +19,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class GeneralTabComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
/** Shares Account Data */
|
||||
sharesAccountData: any;
|
||||
|
||||
@@ -26,7 +28,7 @@ export class GeneralTabComponent {
|
||||
* Fetches shares account data from `resolve`
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { sharesAccountData: any }) => {
|
||||
this.sharesAccountData = data.sharesAccountData;
|
||||
});
|
||||
|
||||
@@ -35,9 +35,11 @@
|
||||
<span class="m-r-10"
|
||||
>{{ 'labels.text.' + entityType | translate }} {{ 'labels.inputs.name' | translate }} :</span
|
||||
>{{ sharesAccountData.clientName || sharesAccountData.groupName }}
|
||||
<span class="m-l-10" *ngIf="sharesAccountData.clientAccountNo">
|
||||
<mifosx-account-number accountNo="{{ sharesAccountData.clientAccountNo }}"></mifosx-account-number>
|
||||
</span>
|
||||
@if (sharesAccountData.clientAccountNo) {
|
||||
<span class="m-l-10">
|
||||
<mifosx-account-number accountNo="{{ sharesAccountData.clientAccountNo }}"></mifosx-account-number>
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
<div>
|
||||
<table class="account-overview">
|
||||
@@ -46,13 +48,15 @@
|
||||
<td>{{ 'labels.inputs.Current Market Price' | translate }} :</td>
|
||||
<td>{{ sharesAccountData.currentMarketPrice | formatNumber }}</td>
|
||||
</tr>
|
||||
<tr *ngIf="sharesAccountData.lockinPeriod">
|
||||
<td>{{ 'labels.inputs.Lockin Period' | translate }} :</td>
|
||||
<td>
|
||||
{{ sharesAccountData.lockinPeriod }}
|
||||
{{ sharesAccountData.lockPeriodTypeEnum.value | translateKey: 'catalogs' }}
|
||||
</td>
|
||||
</tr>
|
||||
@if (sharesAccountData.lockinPeriod) {
|
||||
<tr>
|
||||
<td>{{ 'labels.inputs.Lockin Period' | translate }} :</td>
|
||||
<td>
|
||||
{{ sharesAccountData.lockinPeriod }}
|
||||
{{ sharesAccountData.lockPeriodTypeEnum.value | translateKey: 'catalogs' }}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -60,17 +64,18 @@
|
||||
|
||||
<span class="flex-auto"></span>
|
||||
<div class="flex-40">
|
||||
<button
|
||||
mat-icon-button
|
||||
[matMenuTriggerFor]="accountMenu"
|
||||
aria-label="Share account actions"
|
||||
yPosition="below"
|
||||
*ngIf="buttonConfig.singleButtons.length > 0"
|
||||
>
|
||||
<mat-icon matListIcon class="actions-menu">
|
||||
<fa-icon icon="bars" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
</button>
|
||||
@if (buttonConfig.singleButtons.length > 0) {
|
||||
<button
|
||||
mat-icon-button
|
||||
[matMenuTriggerFor]="accountMenu"
|
||||
aria-label="Share account actions"
|
||||
yPosition="below"
|
||||
>
|
||||
<mat-icon matListIcon class="actions-menu">
|
||||
<fa-icon icon="bars" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-title>
|
||||
@@ -78,25 +83,27 @@
|
||||
</mat-card-title-group>
|
||||
|
||||
<mat-menu #accountMenu="matMenu">
|
||||
<ng-container *ngFor="let item of buttonConfig.singleButtons">
|
||||
@for (item of buttonConfig.singleButtons; track item) {
|
||||
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName" (click)="doAction(item.name)">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="{{ item.icon }}" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span>{{ 'labels.menus.' + item.name | translate }}</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<ng-container *ngIf="buttonConfig.options.length">
|
||||
@if (buttonConfig.options.length) {
|
||||
<button mat-menu-item [matMenuTriggerFor]="More">{{ 'labels.menus.More' | translate }}</button>
|
||||
<mat-menu #More="matMenu">
|
||||
<span *ngFor="let option of buttonConfig.options">
|
||||
<button mat-menu-item *mifosxHasPermission="option.taskPermissionName" (click)="doAction(option.name)">
|
||||
{{ 'labels.menus.' + option.name | translate }}
|
||||
</button>
|
||||
</span>
|
||||
@for (option of buttonConfig.options; track option) {
|
||||
<span>
|
||||
<button mat-menu-item *mifosxHasPermission="option.taskPermissionName" (click)="doAction(option.name)">
|
||||
{{ 'labels.menus.' + option.name | translate }}
|
||||
</button>
|
||||
</span>
|
||||
}
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
}
|
||||
</mat-menu>
|
||||
</mat-card-header>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
MatCardContent
|
||||
} from '@angular/material/card';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { NgClass, NgIf, NgFor } from '@angular/common';
|
||||
import { NgClass } from '@angular/common';
|
||||
import { LongTextComponent } from '../../shared/long-text/long-text.component';
|
||||
import { AccountNumberComponent } from '../../shared/account-number/account-number.component';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
@@ -65,6 +65,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class SharesAccountViewComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private sharesService = inject(SharesService);
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
/** Shares Account Data */
|
||||
sharesAccountData: any;
|
||||
/** Button Configurations */
|
||||
@@ -79,12 +84,7 @@ export class SharesAccountViewComponent implements OnInit {
|
||||
* @param {SharesService} sharesService Shares Service
|
||||
* @param {MatDialog} dialog Mat Dialog
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private sharesService: SharesService,
|
||||
public dialog: MatDialog
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { sharesAccountData: any }) => {
|
||||
this.sharesAccountData = data.sharesAccountData;
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
MatTableDataSource,
|
||||
MatTable,
|
||||
@@ -40,6 +40,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class TransactionsTabComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
/** Shares Account Data */
|
||||
shareAccountData: any;
|
||||
/** Transactions Data */
|
||||
@@ -60,7 +62,7 @@ export class TransactionsTabComponent implements OnInit {
|
||||
* Retrieves shares account data from `resolve`.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor() {
|
||||
this.route.parent.data.subscribe((data: { sharesAccountData: any }) => {
|
||||
this.shareAccountData = data.sharesAccountData;
|
||||
this.transactionsData = this.shareAccountData.purchasedShares;
|
||||
|
||||
@@ -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 */
|
||||
@@ -12,10 +12,7 @@ import { Observable } from 'rxjs';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SharesService {
|
||||
/**
|
||||
* @param {HttpClient} http Http Client
|
||||
*/
|
||||
constructor(private http: HttpClient) {}
|
||||
private http = inject(HttpClient);
|
||||
|
||||
/**
|
||||
* @param {string} accountId Shares Account Id of account to get data for.
|
||||
|
||||
Reference in New Issue
Block a user