-
@@ -556,13 +559,14 @@
-
+
+
diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.scss b/src/app/clients/clients-view/general-tab/general-tab.component.scss
index 482461bff..716347d60 100644
--- a/src/app/clients/clients-view/general-tab/general-tab.component.scss
+++ b/src/app/clients/clients-view/general-tab/general-tab.component.scss
@@ -29,11 +29,11 @@
}
-.headingContent{
+.heading-content {
margin-bottom: 1%;
margin-top: 1%;
}
-.headingName {
+.heading-name {
display: block;
}
diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.ts b/src/app/clients/clients-view/general-tab/general-tab.component.ts
index 49fec3c01..c3a042e2b 100644
--- a/src/app/clients/clients-view/general-tab/general-tab.component.ts
+++ b/src/app/clients/clients-view/general-tab/general-tab.component.ts
@@ -1,7 +1,6 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
-import { DatePipe } from '@angular/common';
/** Custom Services. */
import { ClientsService } from 'app/clients/clients.service';
@@ -15,27 +14,54 @@ import { ClientsService } from 'app/clients/clients.service';
styleUrls: ['./general-tab.component.scss']
})
export class GeneralTabComponent {
+
+ /** Open Loan Accounts Columns */
openLoansColumns: string[] = ['Account No', 'Loan Account', 'Original Loan', 'Loan Balance', 'Amount Paid', 'Type', 'Actions'];
+ /** Closed Loan Accounts Columns */
closedLoansColumns: string[] = ['Account No', 'Loan Account', 'Original Loan', 'Loan Balance', 'Amount Paid', 'Type', 'Closed Date'];
+ /** Open Savings Accounts Columns */
openSavingsColumns: string[] = ['Account No', 'Saving Account', 'Last Active', 'Balance', 'Actions'];
+ /** Closed Savings Accounts Columns */
closedSavingsColumns: string[] = ['Account No', 'Saving Account', 'Closed Date'];
+ /** Open Shares Accounts Columns */
openSharesColumns: string[] = ['Account No', 'Share Account', 'Approved Shares', 'Pending For Approval Shares', 'Actions'];
+ /** Closed Shares Accounts Columns */
closedSharesColumns: string[] = ['Account No', 'Share Account', 'Approved Shares', 'Pending For Approval Shares', 'Closed Date'];
+ /** Upcoming Charges Columns */
upcomingChargesColumns: string[] = ['Name', 'Due as of', 'Due', 'Paid', 'Waived', 'Outstanding', 'Actions'];
+
+ /** Client Account Data */
clientAccountData: any;
+ /** Loan Accounts Data */
loanAccounts: any;
+ /** Savings Accounts Data */
savingAccounts: any;
+ /** Shares Accounts Data */
shareAccounts: any;
+ /** Upcoming Charges Data */
upcomingCharges: any;
+ /** Client Summary Data */
clientSummary: any;
+
+ /** Show Closed Loan Accounts */
showClosedLoanAccounts = false;
+ /** Show Closed Saving Accounts */
showClosedSavingAccounts = false;
+ /** Show Closed Share Accounts */
showClosedShareAccounts = false;
+ /** Show Closed Reccuring Deposits Accounts */
showClosedRecurringAccounts = false;
+ /** Show Closed Fixed Deposits Accounts */
showClosedFixedAccounts = false;
+ /** Client Id */
clientid: any;
+ /**
+ * @param {ActivatedRoute} route Activated Route
+ * @param {ClientsService} clientService Clients Service
+ * @param {Router} router Router
+ */
constructor(
private route: ActivatedRoute,
private clientService: ClientsService,
@@ -52,21 +78,37 @@ export class GeneralTabComponent {
});
}
+ /**
+ * Toggles Loan Accounts Overview
+ */
toggleLoanAccountsOverview() {
this.showClosedLoanAccounts = !this.showClosedLoanAccounts;
}
+ /**
+ * Toggles Loan Accounts Overview
+ */
toggleSavingAccountsOverview() {
this.showClosedSavingAccounts = !this.showClosedSavingAccounts;
}
+
+ /**
+ * Toggles Loan Accounts Overview
+ */
toggleShareAccountsOverview() {
this.showClosedShareAccounts = !this.showClosedShareAccounts;
}
+ /**
+ * Toggles Reccuring Accounts Overview
+ */
toggleRecurringAccountsOverview() {
this.showClosedRecurringAccounts = !this.showClosedRecurringAccounts;
}
+ /**
+ * Toggles Fixed Accounts Overview
+ */
toggleFixedAccountsOverview() {
this.showClosedFixedAccounts = !this.showClosedFixedAccounts;
}
@@ -93,7 +135,6 @@ export class GeneralTabComponent {
});
}
-
/**
* Stops the propagation to view pages.
* @param $event Mouse Event
@@ -102,6 +143,9 @@ export class GeneralTabComponent {
$event.stopPropagation();
}
+ /**
+ * @param {any} loanId Loan Id
+ */
routeTransferFund(loanId: any) {
const queryParams: any = { loanId: loanId, accountType: 'fromloans' };
this.router.navigate(['../', 'loans', loanId, 'transfer-funds', 'make-account-transfer'], { relativeTo: this.route, queryParams: queryParams });
diff --git a/src/app/clients/clients-view/identities-tab/identities-tab.component.html b/src/app/clients/clients-view/identities-tab/identities-tab.component.html
index 2d96cfb7a..0e21a9c06 100644
--- a/src/app/clients/clients-view/identities-tab/identities-tab.component.html
+++ b/src/app/clients/clients-view/identities-tab/identities-tab.component.html
@@ -1,62 +1,60 @@
-
-
Identities
-
- Add
-
+
+ Add
+
- Id
-
- {{identity.id}}
+ Id
+ {{identity.id}}
- Description
- {{identity.description}}
+ Description
+ {{identity.description}}
- type
- {{identity.documentType.name}}
-
+ type
+ {{identity.documentType.name}}
- Identity Documents
-
-
- {{document.name}}
-
-
-
+ Identity Documents
+
+
+ {{document.name}}
+
+
+
- Status
-
- {{(identity.status==='clientIdentifierStatusType.active')?'active':'inactive'}}
+ Status
+
+ {{(identity.status==='clientIdentifierStatusType.active')?'active':'inactive'}}
+
- Actions
-
-
-
-
-
-
-
-
+ Actions
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/clients/clients-view/identities-tab/identities-tab.component.ts b/src/app/clients/clients-view/identities-tab/identities-tab.component.ts
index fffdae4ae..4c291f43c 100644
--- a/src/app/clients/clients-view/identities-tab/identities-tab.component.ts
+++ b/src/app/clients/clients-view/identities-tab/identities-tab.component.ts
@@ -1,7 +1,10 @@
-import { Component, OnInit, ViewChild } from '@angular/core';
+/** Angular Imports */
+import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MatTable } from '@angular/material/table';
import { MatDialog } from '@angular/material';
+
+/** Custom Models */
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
@@ -14,22 +17,36 @@ import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.componen
/** Custom Services */
import { ClientsService } from '../../clients.service';
+/**
+ * Identities Tab Component
+ */
@Component({
selector: 'mifosx-identities-tab',
templateUrl: './identities-tab.component.html',
styleUrls: ['./identities-tab.component.scss']
})
-export class IdentitiesTabComponent implements OnInit {
+export class IdentitiesTabComponent {
- @ViewChild('identifiersTable') identifiersTable: MatTable
;
- identitiesColumns: string[] = ['id', 'description', 'type', 'documents', 'status', 'actions'];
+ /** Client Identities */
clientIdentities: any;
+ /** Client Identifier Template */
clientIdentifierTemplate: any;
+ /** Client Id */
clientId: string;
+ /** Identities Columns */
+ identitiesColumns: string[] = ['id', 'description', 'type', 'documents', 'status', 'actions'];
+ /** Identifiers Table */
+ @ViewChild('identifiersTable') identifiersTable: MatTable;
+
+ /**
+ * @param {ActivatedRoute} route Activated Route
+ * @param {MatDialog} dialog Mat Dialog
+ * @param {ClientsService} clientService Clients Service
+ */
constructor(private route: ActivatedRoute,
- public dialog: MatDialog,
- private clientService: ClientsService) {
+ public dialog: MatDialog,
+ private clientService: ClientsService) {
this.clientId = this.route.parent.snapshot.paramMap.get('clientId');
this.route.data.subscribe((data: { clientIdentities: any, clientIdentifierTemplate: any }) => {
this.clientIdentities = data.clientIdentities;
@@ -37,8 +54,11 @@ export class IdentitiesTabComponent implements OnInit {
});
}
- ngOnInit() { }
-
+ /**
+ * Download Client Document
+ * @param {string} parentEntityId Parent Entity Id
+ * @param {string} documentId Document ID
+ */
download(parentEntityId: string, documentId: string) {
this.clientService.downloadClientIdentificationDocument(parentEntityId, documentId).subscribe(res => {
const url = window.URL.createObjectURL(res);
@@ -46,6 +66,9 @@ export class IdentitiesTabComponent implements OnInit {
});
}
+ /**
+ * Add Client Identifier
+ */
addIdentifier() {
const formfields: FormfieldBase[] = [
new SelectBase({
@@ -103,6 +126,12 @@ export class IdentitiesTabComponent implements OnInit {
});
}
+ /**
+ * Delete Client Identifier
+ * @param {string} clientId Client Id
+ * @param {string} identifierId Identifier Id
+ * @param {number} index Index
+ */
deleteIdentifier(clientId: string, identifierId: string, index: number) {
const deleteIdentifierDialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: `identifier id:${identifierId}` }
@@ -117,6 +146,11 @@ export class IdentitiesTabComponent implements OnInit {
});
}
+ /**
+ * Upload Document
+ * @param {number} index Index
+ * @param {string} identifierId Identifier Id
+ */
uploadDocument(index: number, identifierId: string) {
const uploadDocumentDialogRef = this.dialog.open(UploadDocumentDialogComponent, {
data: { documentIdentifier: true }
diff --git a/src/app/clients/clients-view/notes-tab/notes-tab.component.html b/src/app/clients/clients-view/notes-tab/notes-tab.component.html
index ca0fafd4d..e28473787 100644
--- a/src/app/clients/clients-view/notes-tab/notes-tab.component.html
+++ b/src/app/clients/clients-view/notes-tab/notes-tab.component.html
@@ -1,17 +1,26 @@
+
Notes
+
+
+
+
+
{{clientNote.note}}
@@ -20,13 +29,15 @@
Date: {{clientNote.createdOn | date}}
-
+
-
+
+
+
\ No newline at end of file
diff --git a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts b/src/app/clients/clients-view/notes-tab/notes-tab.component.ts
index 7bf1ccff5..b74795feb 100644
--- a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts
+++ b/src/app/clients/clients-view/notes-tab/notes-tab.component.ts
@@ -1,3 +1,4 @@
+/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MatDialog } from '@angular/material';
@@ -10,24 +11,38 @@ import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dial
import { ClientsService } from '../../clients.service';
import { EditNotesDialogComponent } from '../custom-dialogs/edit-notes-dialog/edit-notes-dialog.component';
+/**
+ * Notes Tab Component
+ */
@Component({
selector: 'mifosx-notes-tab',
templateUrl: './notes-tab.component.html',
styleUrls: ['./notes-tab.component.scss']
})
export class NotesTabComponent implements OnInit {
+
+ /** Client ID */
clientId: string;
+ /** Username */
username: string;
+ /** Client Notes */
clientNotes: any;
+ /** Note Form */
noteForm: FormGroup;
+
+ /** Notes Form Reference */
@ViewChild('formRef') formRef: any;
-
+ /**
+ * @param {ActivatedRoute} route Activated Route
+ * @param {FormBuilder} formBuilder Form Builder
+ * @param {ClientsService} clientsService Clients Service
+ * @param {MatDialog} dialog Mat Dialog
+ */
constructor(private route: ActivatedRoute,
- private formBuilder: FormBuilder,
- private clientsService: ClientsService,
- public dialog: MatDialog) {
-
+ private formBuilder: FormBuilder,
+ private clientsService: ClientsService,
+ public dialog: MatDialog) {
this.username = JSON.parse(sessionStorage.getItem('mifosXCredentials')).username;
this.clientId = this.route.parent.snapshot.params['clientId'];
this.route.data.subscribe((data: { clientNotes: any }) => {
@@ -39,24 +54,21 @@ export class NotesTabComponent implements OnInit {
this.createNoteForm();
}
+ /**
+ * Creates the note form
+ */
createNoteForm() {
this.noteForm = this.formBuilder.group({
'note': ['', Validators.required]
});
}
- submit() {
- this.clientsService.createClientNote(this.clientId, this.noteForm.value).subscribe((response: any) => {
- this.clientNotes.push({
- id: response.resourceId,
- createdByUsername: this.username,
- createdOn: new Date(),
- note: this.noteForm.value.note
- });
- this.formRef.resetForm();
- });
- }
-
+ /**
+ * Edits a client note.
+ * @param {string} noteId Note Id
+ * @param {string} noteContent Note Content
+ * @param {number} index Index
+ */
editNote(noteId: string, noteContent: string, index: number) {
const editNoteDialogRef = this.dialog.open(EditNotesDialogComponent, {
data: { noteContent: noteContent }
@@ -70,8 +82,11 @@ export class NotesTabComponent implements OnInit {
});
}
-
-
+ /**
+ * Deletes a client note.
+ * @param {string} noteId Note Id
+ * @param {number} index Index
+ */
deleteNote(noteId: string, index: number) {
const deleteNoteDialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: `Note id:${noteId}` }
@@ -86,4 +101,19 @@ export class NotesTabComponent implements OnInit {
});
}
+ /**
+ * Creates a client note.
+ */
+ submit() {
+ this.clientsService.createClientNote(this.clientId, this.noteForm.value).subscribe((response: any) => {
+ this.clientNotes.push({
+ id: response.resourceId,
+ createdByUsername: this.username,
+ createdOn: new Date(),
+ note: this.noteForm.value.note
+ });
+ this.formRef.resetForm();
+ });
+ }
+
}
diff --git a/src/app/clients/clients.component.html b/src/app/clients/clients.component.html
index 58efe9bbc..5e232a622 100644
--- a/src/app/clients/clients.component.html
+++ b/src/app/clients/clients.component.html
@@ -8,10 +8,10 @@