+5
-3
@@ -5,6 +5,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../recurring-deposits.service';
|
import { RecurringDepositsService } from '../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/** Step Components */
|
/** Step Components */
|
||||||
import { RecurringDepositsAccountDetailsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component';
|
import { RecurringDepositsAccountDetailsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component';
|
||||||
@@ -38,7 +39,8 @@ export class CreateRecurringDepositsAccountComponent implements OnInit {
|
|||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private recurringDepositsService: RecurringDepositsService
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
|
private settingsService: SettingsService,
|
||||||
) {
|
) {
|
||||||
this.route.data.subscribe((data: { recurringDepositsAccountTemplate: any }) => {
|
this.route.data.subscribe((data: { recurringDepositsAccountTemplate: any }) => {
|
||||||
this.recurringDepositsAccountTemplate = data.recurringDepositsAccountTemplate;
|
this.recurringDepositsAccountTemplate = data.recurringDepositsAccountTemplate;
|
||||||
@@ -111,8 +113,8 @@ export class CreateRecurringDepositsAccountComponent implements OnInit {
|
|||||||
* Submits the recurring deposit form to create a new recurring deposit account
|
* Submits the recurring deposit form to create a new recurring deposit account
|
||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const monthDayFormat = 'dd MMMM';
|
const monthDayFormat = 'dd MMMM';
|
||||||
const recurringDepositAccount = {
|
const recurringDepositAccount = {
|
||||||
...this.recurringDepositAccount,
|
...this.recurringDepositAccount,
|
||||||
|
|||||||
+5
-3
@@ -5,6 +5,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../recurring-deposits.service';
|
import { RecurringDepositsService } from '../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/** Step Components */
|
/** Step Components */
|
||||||
import { RecurringDepositsAccountDetailsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component';
|
import { RecurringDepositsAccountDetailsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component';
|
||||||
@@ -38,7 +39,8 @@ export class EditRecurringDepositAccountComponent implements OnInit {
|
|||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private recurringDepositsService: RecurringDepositsService
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
|
private settingsService: SettingsService,
|
||||||
) {
|
) {
|
||||||
this.route.data.subscribe((data: { recurringDepositsAccountAndTemplate: any }) => {
|
this.route.data.subscribe((data: { recurringDepositsAccountAndTemplate: any }) => {
|
||||||
this.recurringDepositsAccountAndTemplate = data.recurringDepositsAccountAndTemplate;
|
this.recurringDepositsAccountAndTemplate = data.recurringDepositsAccountAndTemplate;
|
||||||
@@ -117,8 +119,8 @@ export class EditRecurringDepositAccountComponent implements OnInit {
|
|||||||
* Submits the recurring deposit form to create a new recurring deposit account
|
* Submits the recurring deposit form to create a new recurring deposit account
|
||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const monthDayFormat = 'dd MMMM';
|
const monthDayFormat = 'dd MMMM';
|
||||||
const recurringDepositAccount = {
|
const recurringDepositAccount = {
|
||||||
...this.recurringDepositAccount,
|
...this.recurringDepositAccount,
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate Recurring Deposits Account Component
|
* Activate Recurring Deposits Account Component
|
||||||
@@ -32,12 +33,14 @@ export class ActivateRecurringDepositsAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SavingsService} savingsService Savings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private recurringDepositsService: RecurringDepositsService,
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,8 +66,8 @@ export class ActivateRecurringDepositsAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevActivatedOnDate: Date = this.activateRecurringDepositsAccountForm.value.activatedOnDate;
|
const prevActivatedOnDate: Date = this.activateRecurringDepositsAccountForm.value.activatedOnDate;
|
||||||
this.activateRecurringDepositsAccountForm.patchValue({
|
this.activateRecurringDepositsAccountForm.patchValue({
|
||||||
activatedOnDate: this.datePipe.transform(prevActivatedOnDate, dateFormat),
|
activatedOnDate: this.datePipe.transform(prevActivatedOnDate, dateFormat),
|
||||||
|
|||||||
+5
-3
@@ -6,6 +6,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SavingsService } from 'app/savings/savings.service';
|
import { SavingsService } from 'app/savings/savings.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add Recurring Deposits Charge component.
|
* Add Recurring Deposits Charge component.
|
||||||
@@ -44,7 +45,8 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private savingsService: SavingsService
|
private savingsService: SavingsService,
|
||||||
|
private settingsService: SettingsService
|
||||||
) {
|
) {
|
||||||
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
||||||
this.savingsChargeOptions = data.recurringDepositsAccountActionData.chargeOptions;
|
this.savingsChargeOptions = data.recurringDepositsAccountActionData.chargeOptions;
|
||||||
@@ -112,7 +114,7 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
const savingsCharge = this.recurringDepositsChargeForm.value;
|
const savingsCharge = this.recurringDepositsChargeForm.value;
|
||||||
savingsCharge.locale = 'en';
|
savingsCharge.locale = this.settingsService.language.code;
|
||||||
if (!savingsCharge.feeInterval) {
|
if (!savingsCharge.feeInterval) {
|
||||||
savingsCharge.feeInterval = this.chargeDetails.feeInterval;
|
savingsCharge.feeInterval = this.chargeDetails.feeInterval;
|
||||||
}
|
}
|
||||||
@@ -125,7 +127,7 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit {
|
|||||||
savingsCharge.feeOnMonthDay = this.datePipe.transform(prevDate, monthDayFormat);
|
savingsCharge.feeOnMonthDay = this.datePipe.transform(prevDate, monthDayFormat);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const dateFormat = 'yyyy-MM-dd';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
savingsCharge.dateFormat = dateFormat;
|
savingsCharge.dateFormat = dateFormat;
|
||||||
if (savingsCharge.dueDate) {
|
if (savingsCharge.dueDate) {
|
||||||
const prevDate = this.recurringDepositsChargeForm.value.dueDate;
|
const prevDate = this.recurringDepositsChargeForm.value.dueDate;
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Approve Recurring Deposits Account Component
|
* Approve Recurring Deposits Account Component
|
||||||
@@ -32,12 +33,14 @@ export class ApproveRecurringDepositsAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private recurringDepositsService: RecurringDepositsService,
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +67,8 @@ export class ApproveRecurringDepositsAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevApprovedOnDate: Date = this.approveRecurringDepositsAccountForm.value.approvedOnDate;
|
const prevApprovedOnDate: Date = this.approveRecurringDepositsAccountForm.value.approvedOnDate;
|
||||||
this.approveRecurringDepositsAccountForm.patchValue({
|
this.approveRecurringDepositsAccountForm.patchValue({
|
||||||
approvedOnDate: this.datePipe.transform(prevApprovedOnDate, dateFormat),
|
approvedOnDate: this.datePipe.transform(prevApprovedOnDate, dateFormat),
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close Recurring Deposits Account Component
|
* Close Recurring Deposits Account Component
|
||||||
@@ -42,13 +43,15 @@ export class CloseRecurringDepositsAccountComponent implements OnInit {
|
|||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private recurringDepositsService: RecurringDepositsService
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
|
private settingsService: SettingsService
|
||||||
) {
|
) {
|
||||||
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
||||||
this.maturityAmount = data.recurringDepositsAccountActionData.maturityAmount;
|
this.maturityAmount = data.recurringDepositsAccountActionData.maturityAmount;
|
||||||
@@ -97,8 +100,8 @@ export class CloseRecurringDepositsAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
const closedOnDate = this.closeRecurringDepositForm.value.closedOnDate;
|
const closedOnDate = this.closeRecurringDepositForm.value.closedOnDate;
|
||||||
const dateFormat = 'yyyy-MM-dd';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
this.closeRecurringDepositForm.patchValue({
|
this.closeRecurringDepositForm.patchValue({
|
||||||
closedOnDate: this.datePipe.transform(closedOnDate, dateFormat)
|
closedOnDate: this.datePipe.transform(closedOnDate, dateFormat)
|
||||||
});
|
});
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deposits Recurring Deposits Account Component
|
* Deposits Recurring Deposits Account Component
|
||||||
@@ -40,13 +41,15 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
|||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private recurringDepositsService: RecurringDepositsService
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
|
private settingsService: SettingsService
|
||||||
) {
|
) {
|
||||||
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
||||||
this.transactionAmount = data.recurringDepositsAccountActionData.amount;
|
this.transactionAmount = data.recurringDepositsAccountActionData.amount;
|
||||||
@@ -92,8 +95,8 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
const transactionDate = this.depositRecurringDepositForm.value.transactionDate;
|
const transactionDate = this.depositRecurringDepositForm.value.transactionDate;
|
||||||
const dateFormat = 'yyyy-MM-dd';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
this.depositRecurringDepositForm.patchValue({
|
this.depositRecurringDepositForm.patchValue({
|
||||||
transactionDate: this.datePipe.transform(transactionDate, dateFormat)
|
transactionDate: this.datePipe.transform(transactionDate, dateFormat)
|
||||||
});
|
});
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Premature Close Recurring Deposits Account Component
|
* Premature Close Recurring Deposits Account Component
|
||||||
@@ -33,12 +34,14 @@ export class PrematureCloseRecurringDepositAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private recurringDepositsService: RecurringDepositsService,
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +67,8 @@ export class PrematureCloseRecurringDepositAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevClosedOnDate: Date = this.prematureCloseRecurringDepositsAccountForm.value.closedOnDate;
|
const prevClosedOnDate: Date = this.prematureCloseRecurringDepositsAccountForm.value.closedOnDate;
|
||||||
this.prematureCloseRecurringDepositsAccountForm.patchValue({
|
this.prematureCloseRecurringDepositsAccountForm.patchValue({
|
||||||
closedOnDate: this.datePipe.transform(prevClosedOnDate, dateFormat),
|
closedOnDate: this.datePipe.transform(prevClosedOnDate, dateFormat),
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,12 +34,14 @@ export class RejectRecurringDepositsAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private recurringDepositsService: RecurringDepositsService,
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,8 +68,8 @@ export class RejectRecurringDepositsAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevRejectedOnDate: Date = this.rejectRecurringDepositsAccountForm.value.rejectedOnDate;
|
const prevRejectedOnDate: Date = this.rejectRecurringDepositsAccountForm.value.rejectedOnDate;
|
||||||
this.rejectRecurringDepositsAccountForm.patchValue({
|
this.rejectRecurringDepositsAccountForm.patchValue({
|
||||||
rejectedOnDate: this.datePipe.transform(prevRejectedOnDate, dateFormat),
|
rejectedOnDate: this.datePipe.transform(prevRejectedOnDate, dateFormat),
|
||||||
|
|||||||
+6
-4
@@ -6,7 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
/**
|
/**
|
||||||
* Withdraw By Client Recurring Deposits Account Component
|
* Withdraw By Client Recurring Deposits Account Component
|
||||||
*/
|
*/
|
||||||
@@ -32,12 +32,14 @@ export class WithdrawByClientRecurringDepositsAccountComponent implements OnInit
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private recurringDepositsService: RecurringDepositsService,
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +66,8 @@ export class WithdrawByClientRecurringDepositsAccountComponent implements OnInit
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevWithdrawnOnDate: Date = this.withdrawRecurringDepositsAccountForm.value.withdrawnOnDate;
|
const prevWithdrawnOnDate: Date = this.withdrawRecurringDepositsAccountForm.value.withdrawnOnDate;
|
||||||
this.withdrawRecurringDepositsAccountForm.patchValue({
|
this.withdrawRecurringDepositsAccountForm.patchValue({
|
||||||
withdrawnOnDate: this.datePipe.transform(prevWithdrawnOnDate, dateFormat),
|
withdrawnOnDate: this.datePipe.transform(prevWithdrawnOnDate, dateFormat),
|
||||||
|
|||||||
+4
-2
@@ -12,6 +12,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base';
|
import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base';
|
||||||
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
||||||
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
|
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recurring Deposit Account Charges Step
|
* Recurring Deposit Account Charges Step
|
||||||
@@ -40,7 +41,8 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC
|
|||||||
isChargesPatched = false;
|
isChargesPatched = false;
|
||||||
|
|
||||||
constructor(public dialog: MatDialog,
|
constructor(public dialog: MatDialog,
|
||||||
private datePipe: DatePipe) {
|
private datePipe: DatePipe,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -123,7 +125,7 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC
|
|||||||
editNoteDialogRef.afterClosed().subscribe((response: any) => {
|
editNoteDialogRef.afterClosed().subscribe((response: any) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
let newCharge: any;
|
let newCharge: any;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const date = this.datePipe.transform(response.data.value.date, dateFormat);
|
const date = this.datePipe.transform(response.data.value.date, dateFormat);
|
||||||
switch (charge.chargeTimeType.value) {
|
switch (charge.chargeTimeType.value) {
|
||||||
case 'Specified due date':
|
case 'Specified due date':
|
||||||
|
|||||||
+5
-3
@@ -7,6 +7,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SavingsService } from 'app/savings/savings.service';
|
import { SavingsService } from 'app/savings/savings.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/** Custom Dialogs */
|
/** Custom Dialogs */
|
||||||
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
||||||
@@ -62,7 +63,8 @@ export class ChargesTabComponent implements OnInit {
|
|||||||
private savingsService: SavingsService,
|
private savingsService: SavingsService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public dialog: MatDialog) {
|
public dialog: MatDialog,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => {
|
this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => {
|
||||||
this.recurringDepositsAccountData = data.recurringDepositsAccountData;
|
this.recurringDepositsAccountData = data.recurringDepositsAccountData;
|
||||||
this.chargesData = this.recurringDepositsAccountData.charges;
|
this.chargesData = this.recurringDepositsAccountData.charges;
|
||||||
@@ -103,8 +105,8 @@ export class ChargesTabComponent implements OnInit {
|
|||||||
const payChargeDialogRef = this.dialog.open(FormDialogComponent, { data });
|
const payChargeDialogRef = this.dialog.open(FormDialogComponent, { data });
|
||||||
payChargeDialogRef.afterClosed().subscribe((response: any) => {
|
payChargeDialogRef.afterClosed().subscribe((response: any) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const dataObject = {
|
const dataObject = {
|
||||||
...response.data.value,
|
...response.data.value,
|
||||||
dueDate: this.datePipe.transform(response.data.value.dueDate, dateFormat),
|
dueDate: this.datePipe.transform(response.data.value.dueDate, dateFormat),
|
||||||
|
|||||||
+5
-2
@@ -7,6 +7,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
/** Custom Components */
|
/** Custom Components */
|
||||||
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
||||||
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/** Custom Models */
|
/** Custom Models */
|
||||||
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
||||||
@@ -43,11 +44,13 @@ export class SingleRowComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe.
|
* @param {DatePipe} datePipe Date Pipe.
|
||||||
* @param {SavingsService} savingsService Savingss Service.
|
* @param {SavingsService} savingsService Savingss Service.
|
||||||
* @param {MatDialog} dialog Mat Dialog.
|
* @param {MatDialog} dialog Mat Dialog.
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
private savingsService: SavingsService) {
|
private savingsService: SavingsService,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
this.accountId = this.route.parent.parent.snapshot.paramMap.get('recurringDepositAccountId');
|
this.accountId = this.route.parent.parent.snapshot.paramMap.get('recurringDepositAccountId');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +68,7 @@ export class SingleRowComponent implements OnInit {
|
|||||||
* Creates a new instance of the given single row data table.
|
* Creates a new instance of the given single row data table.
|
||||||
*/
|
*/
|
||||||
add() {
|
add() {
|
||||||
let dataTableEntryObject: any = { locale: 'en' };
|
let dataTableEntryObject: any = { locale: this.settingsService.language.code };
|
||||||
const dateTransformColumns: string[] = [];
|
const dateTransformColumns: string[] = [];
|
||||||
const columns = this.dataObject.columnHeaders.filter((column: any) => {
|
const columns = this.dataObject.columnHeaders.filter((column: any) => {
|
||||||
return ((column.columnName !== 'id') && (column.columnName !== 'savings_account_id'));
|
return ((column.columnName !== 'id') && (column.columnName !== 'savings_account_id'));
|
||||||
|
|||||||
+5
-3
@@ -7,6 +7,7 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
||||||
import { AccountTransfersService } from 'app/account-transfers/account-transfers.service';
|
import { AccountTransfersService } from 'app/account-transfers/account-transfers.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/** Dialog Components */
|
/** Dialog Components */
|
||||||
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||||
@@ -40,7 +41,8 @@ export class StandingInstructionsTabComponent implements OnInit {
|
|||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private recurringDepositsService: RecurringDepositsService,
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
private accountTransfersService: AccountTransfersService) {
|
private accountTransfersService: AccountTransfersService,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => {
|
this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => {
|
||||||
this.recurringDepositsData = data.recurringDepositsAccountData;
|
this.recurringDepositsData = data.recurringDepositsAccountData;
|
||||||
});
|
});
|
||||||
@@ -57,8 +59,8 @@ export class StandingInstructionsTabComponent implements OnInit {
|
|||||||
const clientId = this.recurringDepositsData.clientId;
|
const clientId = this.recurringDepositsData.clientId;
|
||||||
const clientName = this.recurringDepositsData.clientName;
|
const clientName = this.recurringDepositsData.clientName;
|
||||||
const accountId = this.recurringDepositsData.id;
|
const accountId = this.recurringDepositsData.id;
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
this.recurringDepositsService.getStandingInstructions(clientId, clientName, accountId, locale, dateFormat).subscribe((response: any) => {
|
this.recurringDepositsService.getStandingInstructions(clientId, clientName, accountId, locale, dateFormat).subscribe((response: any) => {
|
||||||
this.instructionsData = response.pageItems;
|
this.instructionsData = response.pageItems;
|
||||||
this.dataSource.data = this.instructionsData;
|
this.dataSource.data = this.instructionsData;
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit Transaction component.
|
* Edit Transaction component.
|
||||||
@@ -45,12 +46,14 @@ export class EditTransactionComponent implements OnInit {
|
|||||||
* @param {ActivatedRoute} route Activated Route.
|
* @param {ActivatedRoute} route Activated Route.
|
||||||
* @param {DatePipe} datePipe DatePipe.
|
* @param {DatePipe} datePipe DatePipe.
|
||||||
* @param {Router} router Router for navigation.
|
* @param {Router} router Router for navigation.
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private recurringDepositsService: RecurringDepositsService) {
|
private recurringDepositsService: RecurringDepositsService,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
this.route.data.subscribe((data: { recurringDepositsAccountTransactionTemplate: any }) => {
|
this.route.data.subscribe((data: { recurringDepositsAccountTransactionTemplate: any }) => {
|
||||||
this.transactionTemplateData = data.recurringDepositsAccountTransactionTemplate;
|
this.transactionTemplateData = data.recurringDepositsAccountTransactionTemplate;
|
||||||
this.paymentTypeOptions = this.transactionTemplateData.paymentTypeOptions;
|
this.paymentTypeOptions = this.transactionTemplateData.paymentTypeOptions;
|
||||||
@@ -107,12 +110,12 @@ export class EditTransactionComponent implements OnInit {
|
|||||||
submit() {
|
submit() {
|
||||||
const prevTransactionDate: Date = this.editTransactionForm.value.transactionDate;
|
const prevTransactionDate: Date = this.editTransactionForm.value.transactionDate;
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const dateFormat = 'dd-MM-yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
this.editTransactionForm.patchValue({
|
this.editTransactionForm.patchValue({
|
||||||
transactionDate: this.datePipe.transform(prevTransactionDate, dateFormat)
|
transactionDate: this.datePipe.transform(prevTransactionDate, dateFormat)
|
||||||
});
|
});
|
||||||
const transactionData = this.editTransactionForm.value;
|
const transactionData = this.editTransactionForm.value;
|
||||||
transactionData.locale = 'en';
|
transactionData.locale = this.settingsService.language.code;
|
||||||
transactionData.dateFormat = dateFormat;
|
transactionData.dateFormat = dateFormat;
|
||||||
this.recurringDepositsService.executeRecurringDepositsAccountTransactionsCommand(this.recurringDepositAccountId, 'modify', transactionData, this.transactionTemplateData.id)
|
this.recurringDepositsService.executeRecurringDepositsAccountTransactionsCommand(this.recurringDepositAccountId, 'modify', transactionData, this.transactionTemplateData.id)
|
||||||
.subscribe(res => {
|
.subscribe(res => {
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/** Custom Dialogs */
|
/** Custom Dialogs */
|
||||||
import { RecurringDepositConfirmationDialogComponent } from '../../custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component';
|
import { RecurringDepositConfirmationDialogComponent } from '../../custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component';
|
||||||
@@ -31,12 +32,14 @@ export class ViewTransactionComponent {
|
|||||||
* @param {Router} router Router for navigation.
|
* @param {Router} router Router for navigation.
|
||||||
* @param {MatDialog} dialog Dialog reference.
|
* @param {MatDialog} dialog Dialog reference.
|
||||||
* @param {DatePipe} datePipe DatePipe.
|
* @param {DatePipe} datePipe DatePipe.
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private recurringDepositsService: RecurringDepositsService,
|
constructor(private recurringDepositsService: RecurringDepositsService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public dialog: MatDialog) {
|
public dialog: MatDialog,
|
||||||
|
private settingsService: SettingsService, ) {
|
||||||
this.route.data.subscribe((data: { recurringDepositsAccountTransaction: any }) => {
|
this.route.data.subscribe((data: { recurringDepositsAccountTransaction: any }) => {
|
||||||
this.transactionData = data.recurringDepositsAccountTransaction;
|
this.transactionData = data.recurringDepositsAccountTransaction;
|
||||||
});
|
});
|
||||||
@@ -50,8 +53,8 @@ export class ViewTransactionComponent {
|
|||||||
const undoTransactionAccountDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, { data: { heading: 'Undo Transaction', dialogContext: 'Are you sure you want to undo this transaction ?' } });
|
const undoTransactionAccountDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, { data: { heading: 'Undo Transaction', dialogContext: 'Are you sure you want to undo this transaction ?' } });
|
||||||
undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
|
undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
|
||||||
if (response.confirm) {
|
if (response.confirm) {
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const data = {
|
const data = {
|
||||||
transactionDate: this.datePipe.transform(this.transactionData.date && new Date(this.transactionData.date), dateFormat),
|
transactionDate: this.datePipe.transform(this.transactionData.date && new Date(this.transactionData.date), dateFormat),
|
||||||
transactionAmount: 0,
|
transactionAmount: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user