Datepickers using max date with business date

This commit is contained in:
Jose Alberto Hernandez
2022-07-28 17:06:39 +02:00
committed by Arnold Gálovics
parent 753791a078
commit a4b266080b
132 changed files with 268 additions and 42 deletions
@@ -48,6 +48,7 @@ export class ActivateSavingsAccountComponent implements OnInit {
* Creates the activate savings form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createActivateSavingsAccountForm();
}
@@ -56,6 +56,7 @@ export class AddChargeSavingsAccountComponent implements OnInit {
* Creates the Savings Charge form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createSavingsChargeForm();
this.buildDependencies();
}
@@ -55,6 +55,7 @@ export class ApplyAnnualFeesSavingsAccountComponent implements OnInit {
* Creates the apply annual fees form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createApplyAnnualFeesForm();
this.applyCharge();
}
@@ -48,6 +48,7 @@ export class ApproveSavingsAccountComponent implements OnInit {
* Creates the approve savings form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createApproveSavingsAccountForm();
}
@@ -58,6 +58,7 @@ export class CloseSavingsAccountComponent implements OnInit {
* Creates the close savings form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createCloseSavingsAccountForm();
this.buildDependencies();
}
@@ -48,6 +48,7 @@ export class PostInterestAsOnSavingsAccountComponent implements OnInit {
* Creates the post interest savings form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createPostInterestSavingsAccountForm();
}
@@ -48,6 +48,7 @@ export class RejectSavingsAccountComponent implements OnInit {
* Creates the reject savings form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createRejectSavingsAccountForm();
}
@@ -55,6 +55,7 @@ export class SavingsAccountAssignStaffComponent implements OnInit {
* Creates the savings account assign staff form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.fieldOfficerData = this.savingsAccountData.fieldOfficerOptions;
this.createSavingsAssignStaffForm();
}
@@ -68,6 +68,7 @@ export class SavingsAccountTransactionsComponent implements OnInit {
* Creates the Saving account transaction form when component loads.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createSavingAccountTransactionForm();
}
@@ -48,6 +48,7 @@ export class SavingsAccountUnassignStaffComponent implements OnInit {
* Creates the savings account unassign staff form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createSavingsUnassignStaffForm();
}
@@ -48,6 +48,7 @@ export class WithdrawByClientSavingsAccountComponent implements OnInit {
* Creates the withdraw savings form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createWithdrawSavingsAccountForm();
}
@@ -4,6 +4,7 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
/** Custom Services */
import { SavingsService } from 'app/savings/savings.service';
import { SettingsService } from 'app/settings/settings.service';
/**
* Savings Account Details Step
@@ -38,13 +39,16 @@ export class SavingsAccountDetailsStepComponent implements OnInit {
* Sets share account details form.
* @param {FormBuilder} formBuilder Form Builder.
* @param {SavingsService} savingsService Savings Service.
* @param {SettingsService} settingsService Setting service
*/
constructor(private formBuilder: FormBuilder,
private savingsService: SavingsService) {
private savingsService: SavingsService,
private settingsService: SettingsService) {
this.createSavingsAccountDetailsForm();
}
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.buildDependencies();
if (this.savingsAccountTemplate) {
this.productData = this.savingsAccountTemplate.productOptions;
@@ -1,6 +1,7 @@
/** Angular Imports */
import { Component, OnChanges, OnInit, Input } from '@angular/core';
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
import { SettingsService } from 'app/settings/settings.service';
/**
* Savings Account Terms Step
@@ -36,8 +37,10 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
/**
* @param {FormBuilder} formBuilder Form Builder
* @param {SettingsService} settingsService Setting service
*/
constructor(private formBuilder: FormBuilder) {
constructor(private formBuilder: FormBuilder,
private settingsService: SettingsService) {
this.createSavingsAccountTermsForm();
this.buildDependencies();
}
@@ -55,6 +58,7 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
}
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
if (this.savingsAccountTemplate) {
this.savingsAccountTermsForm.patchValue({
'nominalAnnualInterestRate': this.savingsAccountTemplate.nominalAnnualInterestRate,
@@ -54,6 +54,7 @@ export class ExportTransactionsComponent implements OnInit {
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createTransactionsReportForm();
}
@@ -65,6 +65,7 @@ export class EditTransactionComponent implements OnInit {
* Creates the Saving account transaction form when component loads.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createEditTransactionForm();
this.editTransactionForm.patchValue({
'transactionDate': this.transactionTemplateData.date && new Date(this.transactionTemplateData.date),