@@ -9,14 +9,16 @@ import { extract } from '../core/i18n/i18n.service';
|
|||||||
import { ViewStandingInstructionsComponent } from './view-standing-instructions/view-standing-instructions.component';
|
import { ViewStandingInstructionsComponent } from './view-standing-instructions/view-standing-instructions.component';
|
||||||
import { EditStandingInstructionsComponent } from './edit-standing-instructions/edit-standing-instructions.component';
|
import { EditStandingInstructionsComponent } from './edit-standing-instructions/edit-standing-instructions.component';
|
||||||
import { CreateStandingInstructionsComponent } from './create-standing-instructions/create-standing-instructions.component';
|
import { CreateStandingInstructionsComponent } from './create-standing-instructions/create-standing-instructions.component';
|
||||||
|
import { MakeAccountTransersComponent } from './make-account-transers/make-account-transers.component';
|
||||||
|
import { ListStandingInstructionsComponent } from './list-standing-instructions/list-standing-instructions.component';
|
||||||
|
import { ListTransactionsComponent } from './list-transactions/list-transactions.component';
|
||||||
|
|
||||||
/** Custom Resolvers */
|
/** Custom Resolvers */
|
||||||
import { ViewStandingInstructionsResolver } from './common-resolvers/view-standing-instructions.resolver';
|
import { ViewStandingInstructionsResolver } from './common-resolvers/view-standing-instructions.resolver';
|
||||||
import { StandingInstructionsDataAndTemplateResolver } from './common-resolvers/standing-instructions-data-and-template.resolver';
|
import { StandingInstructionsDataAndTemplateResolver } from './common-resolvers/standing-instructions-data-and-template.resolver';
|
||||||
import { StandingInstructionsTemplateResolver } from './common-resolvers/standing-instructions-template.resolver';
|
import { StandingInstructionsTemplateResolver } from './common-resolvers/standing-instructions-template.resolver';
|
||||||
import { MakeAccountTransersComponent } from './make-account-transers/make-account-transers.component';
|
|
||||||
import { MakeAccountTransferTemplateResolver } from './common-resolvers/make-account-transfer-template.resolver';
|
import { MakeAccountTransferTemplateResolver } from './common-resolvers/make-account-transfer-template.resolver';
|
||||||
import { ListStandingInstructionsComponent } from './list-standing-instructions/list-standing-instructions.component';
|
import { ListTransactionsResolver } from './common-resolvers/list-transactions.resolver';
|
||||||
|
|
||||||
/** Loans Route. */
|
/** Loans Route. */
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
@@ -66,7 +68,15 @@ const routes: Routes = [
|
|||||||
resolve: {
|
resolve: {
|
||||||
standingInstructionsDataAndTemplate: StandingInstructionsDataAndTemplateResolver,
|
standingInstructionsDataAndTemplate: StandingInstructionsDataAndTemplateResolver,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: 'list-account-transactions',
|
||||||
|
data: { title: extract('List Account Transactions'), breadcrumb: 'List Account Transactions', routeParamBreadcrumb: 'List Account Transactions' },
|
||||||
|
component: ListTransactionsComponent,
|
||||||
|
resolve: {
|
||||||
|
listTransactionData: ListTransactionsResolver
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -80,7 +90,8 @@ const routes: Routes = [
|
|||||||
ViewStandingInstructionsResolver,
|
ViewStandingInstructionsResolver,
|
||||||
StandingInstructionsDataAndTemplateResolver,
|
StandingInstructionsDataAndTemplateResolver,
|
||||||
StandingInstructionsTemplateResolver,
|
StandingInstructionsTemplateResolver,
|
||||||
MakeAccountTransferTemplateResolver
|
MakeAccountTransferTemplateResolver,
|
||||||
|
ListTransactionsResolver
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { EditStandingInstructionsComponent } from './edit-standing-instructions/
|
|||||||
import { CreateStandingInstructionsComponent } from './create-standing-instructions/create-standing-instructions.component';
|
import { CreateStandingInstructionsComponent } from './create-standing-instructions/create-standing-instructions.component';
|
||||||
import { MakeAccountTransersComponent } from './make-account-transers/make-account-transers.component';
|
import { MakeAccountTransersComponent } from './make-account-transers/make-account-transers.component';
|
||||||
import { ListStandingInstructionsComponent } from './list-standing-instructions/list-standing-instructions.component';
|
import { ListStandingInstructionsComponent } from './list-standing-instructions/list-standing-instructions.component';
|
||||||
|
import { ListTransactionsComponent } from './list-transactions/list-transactions.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account Transfers Module
|
* Account Transfers Module
|
||||||
@@ -27,7 +28,8 @@ import { ListStandingInstructionsComponent } from './list-standing-instructions/
|
|||||||
EditStandingInstructionsComponent,
|
EditStandingInstructionsComponent,
|
||||||
CreateStandingInstructionsComponent,
|
CreateStandingInstructionsComponent,
|
||||||
MakeAccountTransersComponent,
|
MakeAccountTransersComponent,
|
||||||
ListStandingInstructionsComponent
|
ListStandingInstructionsComponent,
|
||||||
|
ListTransactionsComponent
|
||||||
],
|
],
|
||||||
providers: [DatePipe]
|
providers: [DatePipe]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -94,4 +94,13 @@ export class AccountTransfersService {
|
|||||||
return this.http.delete(`/standinginstructions/${id}`, { params: httpParams });
|
return this.http.delete(`/standinginstructions/${id}`, { params: httpParams });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getStandingInstructionsTransactions(standingInstructionsId: any) {
|
||||||
|
const httpParams = new HttpParams().set('associations', 'transactions')
|
||||||
|
.set('dateFormat', 'dd MMMM yyyy')
|
||||||
|
.set('limit', '14')
|
||||||
|
.set('locale', 'en')
|
||||||
|
.set('offset', '0');
|
||||||
|
return this.http.get(`/standinginstructions/${standingInstructionsId}`, { params: httpParams });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/** Angular Imports */
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||||
|
|
||||||
|
/** rxjs Imports */
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
/** Custom Services */
|
||||||
|
import { AccountTransfersService } from '../account-transfers.service';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View Standing Instructions resolver.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class ListTransactionsResolver implements Resolve<Object> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {accountTransfersService} AccountTransfersService Account Transfers service.
|
||||||
|
*/
|
||||||
|
constructor(private accountTransfersService: AccountTransfersService) { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the Standing Instructions Data.
|
||||||
|
* @param {ActivatedRouteSnapshot} route Route Snapshot
|
||||||
|
* @returns {Observable<any>}
|
||||||
|
*/
|
||||||
|
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||||
|
const id = route.parent.paramMap.get('standingInstructionsId');
|
||||||
|
return this.accountTransfersService.getStandingInstructionsTransactions(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-2
@@ -60,7 +60,9 @@ export class EditStandingInstructionsComponent implements OnInit {
|
|||||||
this.createEditStandingInstructionsForm();
|
this.createEditStandingInstructionsForm();
|
||||||
const presentDate = new Date();
|
const presentDate = new Date();
|
||||||
const n = presentDate.getFullYear();
|
const n = presentDate.getFullYear();
|
||||||
this.standingInstructionsData.recurrenceOnMonthDay.push(n);
|
if (this.standingInstructionsData.recurrenceOnMonthDay) {
|
||||||
|
this.standingInstructionsData.recurrenceOnMonthDay.push(n);
|
||||||
|
}
|
||||||
this.editStandingInstructionsForm.patchValue({
|
this.editStandingInstructionsForm.patchValue({
|
||||||
'name': this.standingInstructionsData.name,
|
'name': this.standingInstructionsData.name,
|
||||||
'applicant': this.standingInstructionsData.fromClient.displayName,
|
'applicant': this.standingInstructionsData.fromClient.displayName,
|
||||||
@@ -81,7 +83,7 @@ export class EditStandingInstructionsComponent implements OnInit {
|
|||||||
'recurrenceType': this.standingInstructionsData.recurrenceType.id,
|
'recurrenceType': this.standingInstructionsData.recurrenceType.id,
|
||||||
'recurrenceInterval': this.standingInstructionsData.recurrenceInterval,
|
'recurrenceInterval': this.standingInstructionsData.recurrenceInterval,
|
||||||
'recurrenceFrequency': this.standingInstructionsData.recurrenceFrequency.id,
|
'recurrenceFrequency': this.standingInstructionsData.recurrenceFrequency.id,
|
||||||
'recurrenceOnMonthDay': new Date(this.standingInstructionsData.recurrenceOnMonthDay)
|
'recurrenceOnMonthDay': this.standingInstructionsData.recurrenceOnMonthDay && new Date(this.standingInstructionsData.recurrenceOnMonthDay)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -20,6 +20,8 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<mat-divider [inset]="true"></mat-divider>
|
||||||
|
|
||||||
<mat-form-field fxFlex="30%">
|
<mat-form-field fxFlex="30%">
|
||||||
<mat-label>Type</mat-label>
|
<mat-label>Type</mat-label>
|
||||||
<mat-select [formControl]="transferType">
|
<mat-select [formControl]="transferType">
|
||||||
|
|||||||
+4
@@ -14,3 +14,7 @@ table {
|
|||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mat-divider {
|
||||||
|
border-top-color: #ffffff;
|
||||||
|
}
|
||||||
|
|||||||
+14
-6
@@ -11,7 +11,7 @@ import { AccountTransfersService } from '../account-transfers.service';
|
|||||||
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recurring Deposits Standing Instructions Tab
|
* Lists all the standing intructions of particular ID
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'mifosx-list-standing-instructions',
|
selector: 'mifosx-list-standing-instructions',
|
||||||
@@ -36,6 +36,14 @@ export class ListStandingInstructionsComponent implements OnInit {
|
|||||||
clientName: any;
|
clientName: any;
|
||||||
/** Transfer Type Options Data */
|
/** Transfer Type Options Data */
|
||||||
transferTypeDatas: any;
|
transferTypeDatas: any;
|
||||||
|
/** Account Type */
|
||||||
|
accountType: any;
|
||||||
|
/** Account Type ID */
|
||||||
|
accountTypeId: string;
|
||||||
|
/** Id */
|
||||||
|
id: any;
|
||||||
|
/** Is from Client? */
|
||||||
|
isFromClient: Boolean;
|
||||||
/** Data source for instructions table. */
|
/** Data source for instructions table. */
|
||||||
dataSource = new MatTableDataSource();
|
dataSource = new MatTableDataSource();
|
||||||
/** Columns to be displayed in instructions table. */
|
/** Columns to be displayed in instructions table. */
|
||||||
@@ -45,14 +53,13 @@ export class ListStandingInstructionsComponent implements OnInit {
|
|||||||
@ViewChild('instructionsTable') instructionTableRef: MatTable<Element>;
|
@ViewChild('instructionsTable') instructionTableRef: MatTable<Element>;
|
||||||
/** Paginator for centers table. */
|
/** Paginator for centers table. */
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
accountType: any;
|
|
||||||
accountTypeId: string;
|
|
||||||
id: any;
|
|
||||||
isFromClient: Boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves Recurring Deposits Account Data from `resolve`.
|
* Retrieves Standing Instructions Data from `resolve`.
|
||||||
* @param {ActivatedRoute} route Activated Route.
|
* @param {ActivatedRoute} route Activated Route.
|
||||||
|
* @param {MatDialog} route Mat Dialog
|
||||||
|
* @param {AccountTransfersService} accountTransfersService Account Transfers Service
|
||||||
*/
|
*/
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private accountTransfersService: AccountTransfersService,
|
private accountTransfersService: AccountTransfersService,
|
||||||
@@ -113,6 +120,7 @@ export class ListStandingInstructionsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Deletes selected Standing Instruction */
|
||||||
deleteStandingInstruction(instructionId: any) {
|
deleteStandingInstruction(instructionId: any) {
|
||||||
const deleteStandingInstructionDialogRef = this.dialog.open(DeleteDialogComponent, {
|
const deleteStandingInstructionDialogRef = this.dialog.open(DeleteDialogComponent, {
|
||||||
data: { deleteContext: `standing instruction id: ${instructionId}` }
|
data: { deleteContext: `standing instruction id: ${instructionId}` }
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<div class="container m-b-20">
|
||||||
|
|
||||||
|
<mat-card class="mat-elevation-z8">
|
||||||
|
|
||||||
|
<mat-card-content>
|
||||||
|
|
||||||
|
<div fxLayout="row wrap" class="content">
|
||||||
|
|
||||||
|
<div fxFlex="25%" fxFlex.lt-md="50%" class="header">
|
||||||
|
From Account
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="25%" fxFlex.lt-md="50%">
|
||||||
|
{{ listTransactionData.fromAccount.accountNo }}({{ listTransactionData.fromAccountType.value }})
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="25%" fxFlex.lt-md="50%" class="header">
|
||||||
|
To Account
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="25%" fxFlex.lt-md="50%">
|
||||||
|
{{ listTransactionData.toAccount.accountNo }}({{ listTransactionData.toAccountType.value }})
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="25%" fxFlex.lt-md="50%" class="header">
|
||||||
|
Destination
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex="25%" fxFlex.lt-md="50%">
|
||||||
|
{{ listTransactionData.toClient.displayName }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mat-elevation-z8 container">
|
||||||
|
|
||||||
|
<table mat-table [dataSource]="dataSource">
|
||||||
|
|
||||||
|
<ng-container matColumnDef="transactionDate">
|
||||||
|
<th mat-header-cell *matHeaderCellDef> Transaction Date </th>
|
||||||
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.transferDate | date }} </td>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="amount">
|
||||||
|
<th mat-header-cell *matHeaderCellDef> Amount </th>
|
||||||
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.transferAmount }} </td>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="notes">
|
||||||
|
<th mat-header-cell *matHeaderCellDef> Notes </th>
|
||||||
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.transferDescription }} </td>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="reversed">
|
||||||
|
<th mat-header-cell *matHeaderCellDef> Reversed </th>
|
||||||
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.reversed ? 'Yes' : 'No' }} </td>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
.content {
|
||||||
|
div {
|
||||||
|
line-height: 3rem;
|
||||||
|
|
||||||
|
&.header {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.select-row:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ListTransactionsComponent } from './list-transactions.component';
|
||||||
|
|
||||||
|
describe('ListTransactionsComponent', () => {
|
||||||
|
let component: ListTransactionsComponent;
|
||||||
|
let fixture: ComponentFixture<ListTransactionsComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ListTransactionsComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ListTransactionsComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/** Angular Imports */
|
||||||
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { MatTableDataSource, MatTable, MatPaginator, MatDialog } from '@angular/material';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { FormControl } from '@angular/forms';
|
||||||
|
|
||||||
|
/** Custom Services */
|
||||||
|
import { AccountTransfersService } from '../account-transfers.service';
|
||||||
|
|
||||||
|
/** Dialog Components */
|
||||||
|
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recurring Deposits Standing Instructions Tab
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'mifosx-list-transactions',
|
||||||
|
templateUrl: './list-transactions.component.html',
|
||||||
|
styleUrls: ['./list-transactions.component.scss']
|
||||||
|
})
|
||||||
|
export class ListTransactionsComponent {
|
||||||
|
|
||||||
|
|
||||||
|
/** List Transactions Data */
|
||||||
|
listTransactionData: any;
|
||||||
|
/** Data source for instructions table. */
|
||||||
|
dataSource = new MatTableDataSource();
|
||||||
|
/** Columns to be displayed in instructions table. */
|
||||||
|
displayedColumns: string[] = ['transactionDate', 'amount', 'notes', 'reversed'];
|
||||||
|
|
||||||
|
/** Paginator for centers table. */
|
||||||
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves Recurring Deposits Account Data from `resolve`.
|
||||||
|
* @param {ActivatedRoute} route Activated Route.
|
||||||
|
*/
|
||||||
|
constructor(private route: ActivatedRoute) {
|
||||||
|
this.route.data.subscribe((data: { listTransactionData: any }) => {
|
||||||
|
this.listTransactionData = data.listTransactionData;
|
||||||
|
this.dataSource = new MatTableDataSource(this.listTransactionData.transactions.pageItems);
|
||||||
|
this.dataSource.paginator = this.paginator;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<fa-icon icon="edit"></fa-icon>
|
<fa-icon icon="edit"></fa-icon>
|
||||||
Edit
|
Edit
|
||||||
</button>
|
</button>
|
||||||
<button mat-raised-button color="primary">
|
<button mat-raised-button color="primary" [routerLink]="['../', 'list-account-transactions']">
|
||||||
View Transactions History
|
View Transactions History
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,5 +21,6 @@
|
|||||||
<mifosx-undo-disbursal *ngIf="actions.undo_disbursal"></mifosx-undo-disbursal>
|
<mifosx-undo-disbursal *ngIf="actions.undo_disbursal"></mifosx-undo-disbursal>
|
||||||
<mifosx-loan-screen-reports [dataObject]="actionButtonData" *ngIf="actions.loan_screen_reports"></mifosx-loan-screen-reports>
|
<mifosx-loan-screen-reports [dataObject]="actionButtonData" *ngIf="actions.loan_screen_reports"></mifosx-loan-screen-reports>
|
||||||
<mifosx-approve-loan *ngIf="actions.approve" ></mifosx-approve-loan>
|
<mifosx-approve-loan *ngIf="actions.approve" ></mifosx-approve-loan>
|
||||||
|
<mifosx-add-loan-charge *ngIf="actions.add_loan_charge"></mifosx-add-loan-charge>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user