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 ActivateSharesAccountComponent implements OnInit {
* Creates the activate shares form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createActivateSharesAccountForm();
}
@@ -56,6 +56,7 @@ export class ApplySharesComponent implements OnInit {
* in clients view upon using a common resolver.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createApplySharesAccountForm();
this.applySharesForm.get('unitPrice').patchValue(this.sharesAccountData.currentMarketPrice || '');
}
@@ -48,6 +48,7 @@ export class ApproveSharesAccountComponent implements OnInit {
* Creates the approve shares form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createApproveSharesAccountForm();
}
@@ -48,6 +48,7 @@ export class CloseSharesAccountComponent implements OnInit {
* Creates the close shares form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createCloseSharesAccountForm();
}
@@ -56,6 +56,7 @@ export class RedeemSharesComponent implements OnInit {
* in clients view upon using a common resolver.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createRedeemSharesAccountForm();
this.redeemSharesForm.get('unitPrice').patchValue(this.sharesAccountData.currentMarketPrice || '');
}
@@ -48,6 +48,7 @@ export class RejectSharesAccountComponent implements OnInit {
* Creates the reject shares form.
*/
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.createRejectSharesAccountForm();
}
@@ -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 { SharesService } from 'app/shares/shares.service';
@@ -34,13 +35,16 @@ export class SharesAccountDetailsStepComponent implements OnInit {
* Sets share account details form.
* @param {FormBuilder} formBuilder Form Builder.
* @param {SharesService} sharesService Shares Service.
* @param {SettingsService} settingsService Settings Service
*/
constructor(private formBuilder: FormBuilder,
private sharesService: SharesService) {
private sharesService: SharesService,
private settingsService: SettingsService) {
this.createSharesAccountDetailsForm();
}
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
this.buildDependencies();
if (this.sharesAccountTemplate) {
this.productData = this.sharesAccountTemplate.productOptions;
@@ -1,6 +1,7 @@
/** Angular Imports */
import { Component, OnChanges, OnInit, Input } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { SettingsService } from 'app/settings/settings.service';
/**
* Shares Account Terms Step
@@ -34,8 +35,10 @@ export class SharesAccountTermsStepComponent implements OnChanges, OnInit {
/**
* @param {FormBuilder} formBuilder Form Builder
* @param {SettingsService} settingsService Settings Service
*/
constructor(private formBuilder: FormBuilder) {
constructor(private formBuilder: FormBuilder,
private settingsService: SettingsService) {
this.createSharesAccountTermsForm();
}
@@ -59,6 +62,7 @@ export class SharesAccountTermsStepComponent implements OnChanges, OnInit {
}
ngOnInit() {
this.maxDate = this.settingsService.businessDate;
if (this.sharesAccountTemplate) {
this.sharesAccountTermsForm.patchValue({
'requestedShares': this.sharesAccountTemplate.summary.totalPendingForApprovalShares,