Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,8 @@
}
}
}
},
"cli": {
"analytics": false
}
}
31 changes: 17 additions & 14 deletions env.sample
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
PH_OPS_BACKEND_SERVER_URL=https://paymenthub.qa.oneacrefund.org/opsapp/api/v1
export PH_OPS_BATCH_SIGNATURE=12345677899
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signature is dynamic so cannot be set in the env variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! removed

export PH_OPS_BULK_CONNECTOR_URL=https://paymenthub.qa.oneacrefund.org
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! I've created a PR for that openMF/ph-ee-env-template#404


PH_VOU_BACKEND_SERVER_URL=https://paymenthub.qa.oneacrefund.org/opsapp/api/v1
export PH_VOU_CALLBACK_URL=https://webhook.site/

PH_ACT_BACKEND_SERVER_URL=https://paymenthub.qa.oneacrefund.org/opsapp/api/v1

PH_PLATFORM_TENANT_ID=phdefault
export PH_PLATFORM_TENANT_ID=phdefault

PH_PLATFORM_TENANT_IDS=phdefault
export PH_PLATFORM_TENANT_IDS=phdefault

PH_REGISTERING_INSTITUTION_ID=SocialInstitution
export PH_REGISTERING_INSTITUTION_ID=SocialInstitution

PH_AUTH_ENABLED=true
export PH_AUTH_ENABLED=false

PH_OAUTH_ENABLED=false
export PH_OAUTH_ENABLED=false

PH_OAUTH_TYPE=keycloak
export PH_OAUTH_TYPE=keycloak

PH_OAUTH_SERVER_URL=https://ops-bk.sandbox.fynarfin.io
export PH_OAUTH_SERVER_URL=https://paymenthub.qa.oneacrefund.org/opsapp/api/v1

PH_OAUTH_REALM=paymenthub
export PH_OAUTH_REALM=paymenthub

PH_OAUTH_CLIENT_ID=opsapp
export PH_OAUTH_CLIENT_ID=opsapp

PH_OAUTH_CLIENT_SECRET=Y2xpZW50Og==
export PH_OAUTH_CLIENT_SECRET=Y2xpZW50Og=

PH_OAUTH_BASIC_AUTH=true
export PH_OAUTH_BASIC_AUTH=true

PH_OAUTH_BASIC_AUTH_TOKEN=Y2xpZW50Og==
export PH_OAUTH_BASIC_AUTH_TOKEN=Y2xpZW50Og==

PH_DEFAULT_LANGUAGE=en-US
export PH_DEFAULT_LANGUAGE=en

PH_SUPPORTED_LANGUAGES=en-US,fr-FR
export PH_SUPPORTED_LANGUAGES=en,fr,es
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"ng": "ng",
"build": "npm run env -s && ng build --configuration production --output-hashing=none",
"build:prod": "node --max-old-space-size=16384 ./node_modules/@angular/cli/bin/ng build --configuration production --output-hashing=none --base-href=\"/ph-ee-operations-web/\"",
"start": "npm run env -s && ng serve --aot --proxy-config proxy.conf.js",
"start": "npm run env -s && ng serve --aot",
"serve:sw": "npm run build -s && npx http-server ./dist -p 4200",
"lint": "ng lint && stylelint \"src/**/*.scss\" --syntax scss && htmlhint \"src\" --config .htmlhintrc",
"test": "npm run env -s && ng test",
Expand Down Expand Up @@ -48,15 +48,18 @@
"@swimlane/ngx-charts": "20.0.1",
"angular-archwizard": "5.0.0",
"core-js": "2.5.0",
"js-sha3": "^0.9.3",
"jwt-decode": "^2.2.0",
"keycloak-angular": "^14.1.0",
"keycloak-js": "^22.0.3",
"lodash": "4.17.21",
"moment": "^2.29.4",
"ngx-csv-parser": "^1.3.1",
"ngx-file-drop": "^16.0.0",
"node-forge": "^1.3.1",
"rxjs": "7.8.0",
"sass": "^1.47.0",
"tslib": "^2.0.0",
"xlsx": "^0.18.5",
"xng-breadcrumb": "10.0.0",
"zone.js": "~0.13.1"
},
Expand All @@ -73,12 +76,12 @@
"@types/jwt-decode": "^2.2.1",
"@types/lodash": "4.14.132",
"@types/node": "^12.11.1",
"@types/node-forge": "^1.3.11",
"@types/uuid": "^9.0.7",
"codelyzer": "6.0.0",
"daisyui": "^3.6.5",
"hads": "1.7.3",
"htmlhint": "0.11.0",
"https-proxy-agent": "5.0.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.16",
Expand Down
41 changes: 0 additions & 41 deletions proxy.conf.js

This file was deleted.

7 changes: 0 additions & 7 deletions proxy.conf.json

This file was deleted.

13 changes: 6 additions & 7 deletions src/app/account-mapper/account-mapper-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { Route } from "app/core/route/route.service";
import { extract } from "app/core/i18n/i18n.service";
import { AccountMapperComponent } from "./account-mapper/account-mapper.component";
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { Route } from 'app/core/route/route.service';
import { AccountMapperComponent } from './account-mapper/account-mapper.component';


const routes: Routes = [
Route.withShell([
{
path: "account-mapper",
path: 'account-mapper',
component: AccountMapperComponent,
data: { title: extract("Account Mapper"), breadcrumb: "Account Mapper" },
data: { title: 'Account Mapper', breadcrumb: 'Account Mapper' },
children: [
]
}
Expand Down
42 changes: 21 additions & 21 deletions src/app/account-mapper/account-mapper/account-mapper.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>
<h3 class="m-r-10">Filters</h3>
<h3 class="m-r-10">{{"labels.inputs.Filters" | translate}}</h3>
<fa-icon icon="filter" size="xl"></fa-icon>
</mat-panel-title>

</mat-expansion-panel-header>
<div class="container" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">

<mat-form-field fxFlex="20%">
<mat-label>Financial Institution</mat-label>
<mat-label>{{"labels.inputs.Financial Institution" | translate}}</mat-label>
<input matInput [formControl]="financialInstitution">
</mat-form-field>

<mat-form-field fxFlex="20%">
<mat-label>Functional ID</mat-label>
<mat-label>{{"labels.inputs.Functional ID" | translate}}</mat-label>
<input matInput [formControl]="functionalId">
</mat-form-field>

<mat-form-field fxFlex="20%">
<mat-label>Financial Address</mat-label>
<mat-label>{{"labels.inputs.Financial Address" | translate}}</mat-label>
<input matInput [formControl]="financialAddress">
</mat-form-field>

<div fxFlex="20%" class="push-end m-t-15">
<button mat-raised-button color="primary" (click)="searchAccounts()">
<fa-icon icon="search" class="m-r-10"></fa-icon> Search
<fa-icon icon="search" class="m-r-10"></fa-icon> {{"labels.buttons.Search" | translate}}
</button>
</div>

Expand All @@ -43,41 +43,41 @@ <h3 class="m-r-10">Filters</h3>
<table mat-table [dataSource]="dataSource" matSort *ngIf="!isLoading">

<ng-container matColumnDef="governmentEntity">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Government Entity </th>
<td mat-cell *matCellDef="let item" > {{
item.registeringInstitutionId }}
</td>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Government Entity" | translate}} </th>
<td mat-cell *matCellDef="let item"> {{item.registeringInstitutionId }} </td>
</ng-container>

<ng-container matColumnDef="financialInstitution">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Financial Institution </th>
<td mat-cell *matCellDef="let item" >
{{ item.bankingInstitutionCode }}
</td>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Financial Institution" | translate}} </th>
<td mat-cell *matCellDef="let item" >{{ item.bankingInstitutionCode }} </td>
</ng-container>

<ng-container matColumnDef="functionalId">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Functional ID </th>
<td mat-cell *matCellDef="let item">
{{ item.payeeIdentity }}
</td>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Functional ID" | translate}} </th>
<td mat-cell *matCellDef="let item"> {{ item.payeeIdentity }} </td>
</ng-container>

<ng-container matColumnDef="financialAddress">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Financial Address </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Financial Address" | translate}} </th>
<td mat-cell *matCellDef="let item">
<mifosx-identifier identifier="{{item.financialAddress}}"></mifosx-identifier>
</td>
</ng-container>


<ng-container matColumnDef="paymentModality">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Payment Modality" | translate}} </th>
<td mat-cell *matCellDef="let item"> {{paymentModalityDescription(item.paymentModality)}} </td>
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"
class="select-row"></tr>

</table>

<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="[50, 100, 200]" [length]="totalRows" (page)="pageChanged($event)"
showFirstLastButtons></mat-paginator>
<mat-paginator #paginator [pageSize]="pageSize" [pageIndex]="currentPage" (page)="pageChanged($event)"
[pageSizeOptions]="[50, 100, 200]" [length]="totalRows" showFirstLastButtons>
</mat-paginator>

</mat-card>

Expand Down
33 changes: 24 additions & 9 deletions src/app/account-mapper/account-mapper/account-mapper.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { AccountMapperService } from '../services/account-mapper.service';
import { UntypedFormControl } from '@angular/forms';
import { TransactionsDataSource } from 'app/payment-hub/transactions/dataSource/transactions.datasource';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
Expand All @@ -13,7 +12,7 @@ import { Dates } from 'app/core/utils/dates';
templateUrl: './account-mapper.component.html',
styleUrls: ['./account-mapper.component.scss']
})
export class AccountMapperComponent {
export class AccountMapperComponent implements OnInit {

@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
Expand All @@ -28,14 +27,13 @@ export class AccountMapperComponent {
financialAddress = new UntypedFormControl();

/** Columns to be displayed in transactions table. */
displayedColumns: string[] = ['governmentEntity', 'financialInstitution', 'functionalId', 'financialAddress'];
displayedColumns: string[] = ['governmentEntity', 'financialInstitution', 'functionalId', 'financialAddress', 'paymentModality'];
/** Data source for transactions table. */
dataSource = new MatTableDataSource();

totalRows: number = 0;
currentPage: number = 0;

pageSize = 50;
totalRows = 0;
currentPage = 0;
pageSize = 10;
isLoading = false;

accountsData: AccountData;
Expand All @@ -52,6 +50,8 @@ export class AccountMapperComponent {
this.accountMapperService.getAccounts(this.currentPage, this.pageSize, 'requestFile', 'asc')
.subscribe((accounts: AccountData) => {
this.dataSource = new MatTableDataSource(accounts.content);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
this.totalRows = accounts.totalElements;
this.isLoading = false;
}, (error: any) => {
Expand All @@ -67,11 +67,26 @@ export class AccountMapperComponent {
}

pageChanged(event: PageEvent) {
this.pageSize = event.pageSize;
this.currentPage = event.pageIndex;
this.pageSize = event.pageSize;
this.getAccounts();
}

paymentModalityDescription(value: string): string {
if (value === '0' || value === '00') {
return '(00) Bank Account';
} else if (value === '1' || value === '01') {
return '(01) Mobile Money';
} else if (value === '2' || value === '02') {
return '(02) Voucher';
} else if (value === '3' || value === '03') {
return '(03) Digital Wallet';
} else if (value === '4' || value === '04') {
return '(04) Proxy';
}
return value;
}

searchAccounts(): void {

}
Expand Down
2 changes: 1 addition & 1 deletion src/app/account-mapper/models/account-mapper.model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Pageable, Sort } from "app/shared/models/data.model";
import { Pageable, Sort } from 'app/shared/models/data.model';

export interface AccountData {
content: Account[];
Expand Down
2 changes: 1 addition & 1 deletion src/app/account-mapper/services/account-mapper.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class AccountMapperService {
* @returns {Observable<any>} Users data
*/
getAccounts(page: number, size: number, orderBy: string, sortOrder: string): Observable<any> {
let httpParams = new HttpParams()
const httpParams = new HttpParams()
.set('page', page)
.set('size', size)
.set('sortOrder', sortOrder)
Expand Down
10 changes: 6 additions & 4 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { PaymentHubModule } from './payment-hub/paymenthub.module';
/** Main Routing Module */
import { AppRoutingModule } from './app-routing.module';

import { DatePipe } from '@angular/common';
import { DatePipe, LocationStrategy } from '@angular/common';
import { VouchersModule } from './vouchers/vouchers.module';
import { AccountMapperModule } from './account-mapper/account-mapper.module';
import { KeycloakAngularModule } from 'keycloak-angular';
Expand All @@ -48,8 +48,10 @@ import { KeycloakAngularModule } from 'keycloak-angular';
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: httpTranslateLoader,
deps: [HttpClient]
useFactory: (http: HttpClient, locationStrategy: LocationStrategy) => {
return new TranslateHttpLoader(http, `${ window.location.protocol }//${ window.location.host }${locationStrategy.getBaseHref()}assets/translations/`, '.json');
},
deps: [HttpClient, LocationStrategy]
}
}),
KeycloakAngularModule,
Expand All @@ -75,4 +77,4 @@ export class AppModule { }

export function httpTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, `/assets/translations/`, '.json');
}
}
Loading