diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fa7e0acd9..32f4979ab 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -21,13 +21,13 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- - name: Use Node.js 19
+ - name: Use Node.js 20
uses: actions/setup-node@v1
with:
# no support for lts as of now with github actions.
# issue link : https://github.com/actions/setup-node/issues/26
- # lts/gallium node v19.7.0 (npm v9.5.0)
- node-version: '19.7.0'
+ # lts/gallium node v20.5.1 (npm v9.8.0)
+ node-version: '20.5.1'
- name: Angular CLI install
run : npm install -g --silent @angular/cli@14.2.12
diff --git a/Dockerfile b/Dockerfile
index 1de69bca3..f21c594f0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
###############
### STAGE 1: Build app
###############
-ARG BUILDER_IMAGE=node:19-alpine
+ARG BUILDER_IMAGE=node:20-alpine
ARG NGINX_IMAGE=nginx:1.19.3
FROM $BUILDER_IMAGE as builder
diff --git a/docker-compose.yml b/docker-compose.yml
index 8aa8c85c0..ec4b0ef82 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,7 +7,7 @@ services:
dockerfile: Dockerfile
args:
- BUILD_ENVIRONMENT_OPTIONS=--configuration production
- - BUILDER_IMAGE=node:16-alpine
+ - BUILDER_IMAGE=node:20-alpine
- NGINX_IMAGE=nginx:1.19.3
- NPM_REGISTRY_URL=https://registry.npmjs.org/
- PUPPETEER_DOWNLOAD_HOST_ARG=https://storage.googleapis.com
diff --git a/src/app/core/shell/shell.component.ts b/src/app/core/shell/shell.component.ts
index 12e238cda..d35a27608 100644
--- a/src/app/core/shell/shell.component.ts
+++ b/src/app/core/shell/shell.component.ts
@@ -63,7 +63,9 @@ export class ShellComponent implements OnInit, OnDestroy {
* Unsubscribes from progress bar.
*/
ngOnDestroy() {
- this.progressBar$.unsubscribe();
+ if (this.progressBar$) {
+ this.progressBar$.unsubscribe();
+ }
}
}
diff --git a/src/app/organization/investors/investors.component.html b/src/app/organization/investors/investors.component.html
index e21ccda15..3a93bf7e9 100644
--- a/src/app/organization/investors/investors.component.html
+++ b/src/app/organization/investors/investors.component.html
@@ -61,18 +61,19 @@
{{record.status}}
-
Owner ExternalId |
+ Owner ExternalId |
|
- Effective From |
+ Transfer ExternalId |
+
+
+ |
+ Effective From |
{{ record.effectiveFrom | dateFormat }} |
-
-
-
@@ -110,7 +111,7 @@
{{record.effectiveFrom | dateFormat}}
-
+
|
Details :
|
@@ -149,6 +150,14 @@
+
+
+
+
+
+
diff --git a/src/app/organization/investors/investors.component.scss b/src/app/organization/investors/investors.component.scss
index b319a9e03..f54846b90 100644
--- a/src/app/organization/investors/investors.component.scss
+++ b/src/app/organization/investors/investors.component.scss
@@ -2,6 +2,17 @@
color: black;
}
+.field-name {
+ font-weight: 800;
+}
+
+.record-actions {
+ margin-top: 1%;
+ button{
+ margin-right: 1%;
+ }
+}
+
.external-asset-transfer {
margin-top: 10px;
min-height: 160px;
diff --git a/src/app/organization/investors/investors.component.ts b/src/app/organization/investors/investors.component.ts
index e1727c8d7..a596b5b9d 100644
--- a/src/app/organization/investors/investors.component.ts
+++ b/src/app/organization/investors/investors.component.ts
@@ -1,13 +1,16 @@
import { animate, state, style, transition, trigger } from '@angular/animations';
import { Component, OnInit, ViewChild } from '@angular/core';
import { UntypedFormControl } from '@angular/forms';
+import { MatDialog } from '@angular/material/dialog';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
+import { Router } from '@angular/router';
import { Dates } from 'app/core/utils/dates';
import { ExternalAssetOwner } from 'app/loans/services/external-asset-owner';
import { ExternalAssetOwnerService } from 'app/loans/services/external-asset-owner.service';
import { SettingsService } from 'app/settings/settings.service';
+import { CancelDialogComponent } from 'app/shared/cancel-dialog/cancel-dialog.component';
@Component({
selector: 'mifosx-investors',
@@ -73,6 +76,8 @@ export class InvestorsComponent implements OnInit {
/** Columns to be displayed in investors table. */
displayedColumns: string[] = ['status', 'effectiveFrom', 'ownerExternalId', 'loanAccount', 'transferExternalId', 'settlementDate', 'purchasePriceRatio', 'totalAmount', 'actions'];
constructor(private settingsService: SettingsService,
+ private router: Router,
+ private dialog: MatDialog,
private externalAssetOwner: ExternalAssetOwner,
private externalAssetOwnerService: ExternalAssetOwnerService,
private dateUtils: Dates) { }
@@ -155,6 +160,30 @@ export class InvestorsComponent implements OnInit {
this.searchEAO();
}
+ cancelPendingSale(transfer: any): void {
+ const deleteDataTableDialogRef = this.dialog.open(CancelDialogComponent, {
+ data: { cancelContext: `the Asset Transfer with the Owner External Id ${transfer.owner.externalId} ` }
+ });
+ deleteDataTableDialogRef.afterClosed().subscribe((response: any) => {
+ if (response.cancel) {
+ const payload: any = {
+ transferExternalId: transfer.transferExternalId
+ };
+ this.externalAssetOwnerService.executeExternalAssetOwnerTransferCommand(transfer.transferId, payload, 'cancel')
+ .subscribe((result: any) => {
+ this.reload();
+ });
+ }
+ });
+ }
+
+ reload() {
+ const url: string = this.router.url;
+ console.log(url);
+ this.router.navigateByUrl(`/`, {skipLocationChange: true})
+ .then(() => this.router.navigate([url]));
+ }
+
private resetPaginator() {
this.currentPage = 0;
this.paginator.firstPage();