Datepickers using max date with business date
This commit is contained in:
committed by
Arnold Gálovics
parent
753791a078
commit
a4b266080b
+5
-1
@@ -1,6 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/** Custom Services */
|
||||
import { LoansService } from '../../loans.service';
|
||||
@@ -43,13 +44,16 @@ export class LoansAccountDetailsStepComponent implements OnInit {
|
||||
* Sets loans account details form.
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
* @param {LoansService} loansService Loans Service.
|
||||
* @param {SettingsService} settingsService SettingsService
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private loansService: LoansService) {
|
||||
private loansService: LoansService,
|
||||
private settingsService: SettingsService) {
|
||||
this.createLoansAccountDetailsForm();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.buildDependencies();
|
||||
if (this.loansAccountTemplate) {
|
||||
this.productData = this.loansAccountTemplate.productOptions;
|
||||
|
||||
+5
-6
@@ -1,7 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, OnChanges } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl, FormArray } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* Create Loans Account Terms Step
|
||||
@@ -46,12 +46,10 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
|
||||
/**
|
||||
* Create Loans Account Terms Form
|
||||
* @param formBuilder FormBuilder
|
||||
* @param route Route
|
||||
* @param router Router
|
||||
* @param {SettingsService} settingsService SettingsService
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
private settingsService: SettingsService) {
|
||||
this.createloansAccountTermsForm();
|
||||
}
|
||||
/**
|
||||
@@ -87,6 +85,7 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
if (this.loansAccountTemplate) {
|
||||
if (this.loansAccountTemplate.loanProductId) {
|
||||
this.loansAccountTermsForm.patchValue({
|
||||
|
||||
Reference in New Issue
Block a user