Upgrade/angular 14 (#1853)
* Fix Loan product Payment Allocation * Upgrade to Angular 14 --------- Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
2dab3b70ca
commit
80936a3ea9
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -20,7 +20,7 @@ import { oneOfTheFieldsIsRequiredValidator } from '../one-of-the-fields-is-requi
|
||||
export class CreateRuleComponent implements OnInit {
|
||||
|
||||
/** Accounting rule form. */
|
||||
accountingRuleForm: FormGroup;
|
||||
accountingRuleForm: UntypedFormGroup;
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
/** GL Account data. */
|
||||
@@ -37,7 +37,7 @@ export class CreateRuleComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -20,7 +20,7 @@ import { oneOfTheFieldsIsRequiredValidator } from '../one-of-the-fields-is-requi
|
||||
export class EditRuleComponent implements OnInit {
|
||||
|
||||
/** Accounting rule form. */
|
||||
accountingRuleForm: FormGroup;
|
||||
accountingRuleForm: UntypedFormGroup;
|
||||
/** Accounting rule. */
|
||||
accountingRule: any;
|
||||
/** Office data. */
|
||||
@@ -39,7 +39,7 @@ export class EditRuleComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/** Angular Imports */
|
||||
import { FormGroup, ValidatorFn, ValidationErrors } from '@angular/forms';
|
||||
import { UntypedFormGroup, ValidatorFn, ValidationErrors } from '@angular/forms';
|
||||
|
||||
/** Validates that one of the fields for debit or credit is filled for a given accounting rule type. */
|
||||
export const oneOfTheFieldsIsRequiredValidator: ValidatorFn = (accountingRuleForm: FormGroup): ValidationErrors | null => {
|
||||
export const oneOfTheFieldsIsRequiredValidator: ValidatorFn = (accountingRuleForm: UntypedFormGroup): ValidationErrors | null => {
|
||||
const accountToDebit = accountingRuleForm.controls.accountToDebit.value;
|
||||
const debitTags = accountingRuleForm.controls.debitTags.value;
|
||||
const accountToCredit = accountingRuleForm.controls.accountToCredit.value;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatTreeNestedDataSource } from '@angular/material/tree';
|
||||
import { NestedTreeControl } from '@angular/cdk/tree';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -30,7 +30,7 @@ import { ConfigurationWizardService } from '../../configuration-wizard/configura
|
||||
export class ChartOfAccountsComponent implements AfterViewInit, OnInit {
|
||||
|
||||
/** Button toggle group form control for type of view. (list/tree) */
|
||||
viewGroup = new FormControl('listView');
|
||||
viewGroup = new UntypedFormControl('listView');
|
||||
/** GL Account data. */
|
||||
glAccountData: any;
|
||||
/** Columns to be displayed in chart of accounts table. */
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@@ -23,7 +23,7 @@ import { ContinueSetupDialogComponent } from '../../../configuration-wizard/cont
|
||||
export class CreateGlAccountComponent implements OnInit, AfterViewInit {
|
||||
|
||||
/** GL account form. */
|
||||
glAccountForm: FormGroup;
|
||||
glAccountForm: UntypedFormGroup;
|
||||
/** Chart of accounts data. */
|
||||
chartOfAccountsData: any;
|
||||
/** Account type data. */
|
||||
@@ -56,7 +56,7 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit {
|
||||
* @param {PopoverService} popoverService PopoverService.
|
||||
* @param {Matdialog} dialog Matdialog.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
|
||||
/** Custom Services */
|
||||
import { AccountingService } from '../../accounting.service';
|
||||
@@ -17,7 +17,7 @@ import { AccountingService } from '../../accounting.service';
|
||||
export class EditGlAccountComponent implements OnInit {
|
||||
|
||||
/** GL account form. */
|
||||
glAccountForm: FormGroup;
|
||||
glAccountForm: UntypedFormGroup;
|
||||
/** GL account and chart of accounts data. */
|
||||
glAccount: any;
|
||||
/** Account type data. */
|
||||
@@ -36,7 +36,7 @@ export class EditGlAccountComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit }
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -28,7 +28,7 @@ export class ClosingEntriesComponent implements OnInit, AfterViewInit {
|
||||
/** Data source for closing entries table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
/** Office name filter form control. */
|
||||
officeName = new FormControl();
|
||||
officeName = new UntypedFormControl();
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
/** Filtered office data for autocomplete. */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -22,7 +22,7 @@ export class CreateClosureComponent implements OnInit {
|
||||
/** Maximum closing date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Accounting closure form. */
|
||||
accountingClosureForm: FormGroup;
|
||||
accountingClosureForm: UntypedFormGroup;
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
|
||||
@@ -34,7 +34,7 @@ export class CreateClosureComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -17,7 +17,7 @@ import { AccountingService } from '../../accounting.service';
|
||||
export class EditClosureComponent implements OnInit {
|
||||
|
||||
/** Accounting closure form. */
|
||||
accountingClosureForm: FormGroup;
|
||||
accountingClosureForm: UntypedFormGroup;
|
||||
/** GL Account closure. */
|
||||
glAccountClosure: any;
|
||||
/** Office data. */
|
||||
@@ -30,7 +30,7 @@ export class EditClosureComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@@ -28,7 +28,7 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
/** Maximum transaction date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Journal entry form. */
|
||||
journalEntryForm: FormGroup;
|
||||
journalEntryForm: UntypedFormGroup;
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
/** Currency data. */
|
||||
@@ -53,7 +53,7 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
* @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service.
|
||||
* @param {PopoverService} popoverService PopoverService.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
@@ -108,7 +108,7 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
* Creates the affected gl entry form.
|
||||
* @returns {FormGroup} Affected gl entry form.
|
||||
*/
|
||||
createAffectedGLEntryForm(): FormGroup {
|
||||
createAffectedGLEntryForm(): UntypedFormGroup {
|
||||
return this.formBuilder.group({
|
||||
'glAccountId': ['', Validators.required],
|
||||
'amount': ['', Validators.required]
|
||||
@@ -119,23 +119,23 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
* Gets the affected gl entry (debits) form array.
|
||||
* @returns {FormArray} Debits form array.
|
||||
*/
|
||||
get debits(): FormArray {
|
||||
return this.journalEntryForm.get('debits') as FormArray;
|
||||
get debits(): UntypedFormArray {
|
||||
return this.journalEntryForm.get('debits') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the affected gl entry (credits) form array.
|
||||
* @returns {FormArray} Credits form array.
|
||||
*/
|
||||
get credits(): FormArray {
|
||||
return this.journalEntryForm.get('credits') as FormArray;
|
||||
get credits(): UntypedFormArray {
|
||||
return this.journalEntryForm.get('credits') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the affected gl entry form to given affected gl entry form array.
|
||||
* @param {FormArray} affectedGLEntryFormArray Given affected gl entry form array (debit/credit).
|
||||
*/
|
||||
addAffectedGLEntry(affectedGLEntryFormArray: FormArray) {
|
||||
addAffectedGLEntry(affectedGLEntryFormArray: UntypedFormArray) {
|
||||
affectedGLEntryFormArray.push(this.createAffectedGLEntryForm());
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
* @param {FormArray} affectedGLEntryFormArray Given affected gl entry form array (debit/credit).
|
||||
* @param {number} index Array index from where affected gl entry form needs to be removed.
|
||||
*/
|
||||
removeAffectedGLEntry(affectedGLEntryFormArray: FormArray, index: number) {
|
||||
removeAffectedGLEntry(affectedGLEntryFormArray: UntypedFormArray, index: number) {
|
||||
affectedGLEntryFormArray.removeAt(index);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -17,7 +17,7 @@ import { AccountingService } from '../../accounting.service';
|
||||
export class CreateFinancialActivityMappingComponent implements OnInit {
|
||||
|
||||
/** Financial activity mapping form. */
|
||||
financialActivityMappingForm: FormGroup;
|
||||
financialActivityMappingForm: UntypedFormGroup;
|
||||
/** GL Account options. */
|
||||
glAccountOptions: any;
|
||||
/** GL Account data. */
|
||||
@@ -32,7 +32,7 @@ export class CreateFinancialActivityMappingComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -17,7 +17,7 @@ import { AccountingService } from '../../accounting.service';
|
||||
export class EditFinancialActivityMappingComponent implements OnInit {
|
||||
|
||||
/** Financial activity mapping form. */
|
||||
financialActivityMappingForm: FormGroup;
|
||||
financialActivityMappingForm: UntypedFormGroup;
|
||||
/** GL Account options. */
|
||||
glAccountOptions: any;
|
||||
/** GL Account data. */
|
||||
@@ -38,7 +38,7 @@ export class EditFinancialActivityMappingComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuider: FormBuilder,
|
||||
constructor(private formBuider: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -22,7 +22,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
/** Maximum transaction date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Frequent postings form. */
|
||||
frequentPostingsForm: FormGroup;
|
||||
frequentPostingsForm: UntypedFormGroup;
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
/** Accounting rule data. */
|
||||
@@ -48,7 +48,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
@@ -122,7 +122,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* Creates the affected gl entry form.
|
||||
* @returns {FormGroup} Affected gl entry form.
|
||||
*/
|
||||
createAffectedGLEntryForm(): FormGroup {
|
||||
createAffectedGLEntryForm(): UntypedFormGroup {
|
||||
return this.formBuilder.group({
|
||||
'glAccountId': ['', Validators.required],
|
||||
'amount': ['', Validators.required]
|
||||
@@ -133,23 +133,23 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* Gets the affected gl entry (debits) form array.
|
||||
* @returns {FormArray} Debits form array.
|
||||
*/
|
||||
get debits(): FormArray {
|
||||
return this.frequentPostingsForm.get('debits') as FormArray;
|
||||
get debits(): UntypedFormArray {
|
||||
return this.frequentPostingsForm.get('debits') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the affected gl entry (credits) form array.
|
||||
* @returns {FormArray} Credits form array.
|
||||
*/
|
||||
get credits(): FormArray {
|
||||
return this.frequentPostingsForm.get('credits') as FormArray;
|
||||
get credits(): UntypedFormArray {
|
||||
return this.frequentPostingsForm.get('credits') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the affected gl entry form to given affected gl entry form array.
|
||||
* @param {FormArray} affectedGLEntryFormArray Given affected gl entry form array (debit/credit).
|
||||
*/
|
||||
addAffectedGLEntry(affectedGLEntryFormArray: FormArray) {
|
||||
addAffectedGLEntry(affectedGLEntryFormArray: UntypedFormArray) {
|
||||
affectedGLEntryFormArray.push(this.createAffectedGLEntryForm());
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* @param {FormArray} affectedGLEntryFormArray Given affected gl entry form array (debit/credit).
|
||||
* @param {number} index Array index from where affected gl entry form needs to be removed.
|
||||
*/
|
||||
removeAffectedGLEntry(affectedGLEntryFormArray: FormArray, index: number) {
|
||||
removeAffectedGLEntry(affectedGLEntryFormArray: UntypedFormArray, index: number) {
|
||||
affectedGLEntryFormArray.removeAt(index);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -28,7 +28,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
|
||||
/** Maximum opening balances date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Opening balances form. */
|
||||
openingBalancesForm: FormGroup;
|
||||
openingBalancesForm: UntypedFormGroup;
|
||||
/** Opening balances data. */
|
||||
openingBalancesData: any;
|
||||
/** Office data. */
|
||||
@@ -55,7 +55,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
|
||||
* @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service.
|
||||
* @param {PopoverService} popoverService PopoverService.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
@@ -97,7 +97,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
|
||||
* @param glAccount GL Account for which form is returned.
|
||||
* @returns {FormGroup} GL Account entry form.
|
||||
*/
|
||||
createGLAccountEntryForm(glAccount: any): FormGroup {
|
||||
createGLAccountEntryForm(glAccount: any): UntypedFormGroup {
|
||||
return this.formBuilder.group({
|
||||
'glAccountId': [glAccount.glAccountId],
|
||||
'debit': [null],
|
||||
@@ -109,8 +109,8 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
|
||||
* Gets the gl account entries form array.
|
||||
* @returns {FormArray} GL Account entries form array.
|
||||
*/
|
||||
get glAccountEntries(): FormArray {
|
||||
return this.openingBalancesForm.get('glAccountEntries') as FormArray;
|
||||
get glAccountEntries(): UntypedFormArray {
|
||||
return this.openingBalancesForm.get('glAccountEntries') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,7 +119,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
|
||||
retrieveOpeningBalances() {
|
||||
this.accountingService.retrieveOpeningBalances(this.openingBalancesForm.value.officeId)
|
||||
.subscribe((openingBalancesData: any) => {
|
||||
const entry = this.openingBalancesForm.get('glAccountEntries') as FormArray;
|
||||
const entry = this.openingBalancesForm.get('glAccountEntries') as UntypedFormArray;
|
||||
|
||||
openingBalancesData.glAccounts = openingBalancesData.assetAccountOpeningBalances
|
||||
.concat(openingBalancesData.liabityAccountOpeningBalances,
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
/** Angular Imports */
|
||||
import { FormGroup, ValidatorFn, ValidationErrors } from '@angular/forms';
|
||||
import { UntypedFormGroup, ValidatorFn, ValidationErrors } from '@angular/forms';
|
||||
|
||||
/** Validates that atleast one of the fields debit or credit is filled (but not both) for a given gl account. */
|
||||
export const onlyOneOfTheFieldsIsRequiredValidator: ValidatorFn = (glAccountEntriesForm: FormGroup): ValidationErrors | null => {
|
||||
export const onlyOneOfTheFieldsIsRequiredValidator: ValidatorFn = (glAccountEntriesForm: UntypedFormGroup): ValidationErrors | null => {
|
||||
const debit = glAccountEntriesForm.controls.debit.value;
|
||||
const credit = glAccountEntriesForm.controls.credit.value;
|
||||
return ((debit || credit) && !(debit && credit)) ? null : { 'error': true };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -22,7 +22,7 @@ export class PeriodicAccrualsComponent implements OnInit {
|
||||
/** Maximum accrue date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Periodic accruals form. */
|
||||
periodicAccrualsForm: FormGroup;
|
||||
periodicAccrualsForm: UntypedFormGroup;
|
||||
|
||||
/**
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
@@ -31,7 +31,7 @@ export class PeriodicAccrualsComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -22,7 +22,7 @@ export class CreateProvisioningEntryComponent implements OnInit {
|
||||
/** Maximum provisioning date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Provisioning entry form. */
|
||||
provisioningEntryForm: FormGroup;
|
||||
provisioningEntryForm: UntypedFormGroup;
|
||||
|
||||
/**
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
@@ -31,7 +31,7 @@ export class CreateProvisioningEntryComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
@@ -29,19 +29,19 @@ export class ViewProvisioningEntryComponent implements OnInit, AfterViewInit {
|
||||
/** Provisioning entry entries. */
|
||||
provisioningEntryEntries: any;
|
||||
/** Office name filter form control. */
|
||||
officeName = new FormControl();
|
||||
officeName = new UntypedFormControl();
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
/** Filtered office data for autocomplete. */
|
||||
filteredOfficeData: any;
|
||||
/** Loan product filter form control. */
|
||||
loanProduct = new FormControl();
|
||||
loanProduct = new UntypedFormControl();
|
||||
/** Loan product data. */
|
||||
loanProductData: any;
|
||||
/** Filtered loan product data for autocomplete. */
|
||||
filteredLoanProductData: any;
|
||||
/** Provisioning category filter form control. */
|
||||
provisioningCategory = new FormControl();
|
||||
provisioningCategory = new UntypedFormControl();
|
||||
/** Provisioning category data. */
|
||||
provisioningCategoryData: any;
|
||||
/** Filtered provisioning category data for autocomplete. */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
|
||||
/**
|
||||
* Revert transaction dialog component.
|
||||
@@ -14,7 +14,7 @@ import { FormControl } from '@angular/forms';
|
||||
export class RevertTransactionComponent implements OnInit {
|
||||
|
||||
/** Comments input form control. */
|
||||
comments = new FormControl('');
|
||||
comments = new UntypedFormControl('');
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
@@ -31,19 +31,19 @@ export class SearchJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
/** Maximum transaction date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Office name filter form control. */
|
||||
officeName = new FormControl();
|
||||
officeName = new UntypedFormControl();
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
/** Filtered office data for autocomplete. */
|
||||
filteredOfficeData: any;
|
||||
/** Gl Account filter form control. */
|
||||
glAccount = new FormControl();
|
||||
glAccount = new UntypedFormControl();
|
||||
/** Gl Account data. */
|
||||
glAccountData: any;
|
||||
/** Filtered gl account data. */
|
||||
filteredGLAccountData: any;
|
||||
/** Entry type filter form control. */
|
||||
entryTypeFilter = new FormControl('');
|
||||
entryTypeFilter = new UntypedFormControl('');
|
||||
/** Entry type filter data. */
|
||||
entryTypeFilterData = [
|
||||
{
|
||||
@@ -60,15 +60,15 @@ export class SearchJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
];
|
||||
/** Transaction date from form control. */
|
||||
transactionDateFrom = new FormControl(new Date(new Date().setMonth(new Date().getMonth() - 1)));
|
||||
transactionDateFrom = new UntypedFormControl(new Date(new Date().setMonth(new Date().getMonth() - 1)));
|
||||
/** Transaction date to form control. */
|
||||
transactionDateTo = new FormControl(new Date());
|
||||
transactionDateTo = new UntypedFormControl(new Date());
|
||||
/** Transaction ID form control. */
|
||||
transactionId = new FormControl();
|
||||
transactionId = new UntypedFormControl();
|
||||
/** Submitted on date from form control. */
|
||||
submittedOnDateFrom = new FormControl();
|
||||
submittedOnDateFrom = new UntypedFormControl();
|
||||
/** Submitted on date to form control. */
|
||||
submittedOnDateTo = new FormControl();
|
||||
submittedOnDateTo = new UntypedFormControl();
|
||||
/** Columns to be displayed in journal entries table. */
|
||||
displayedColumns: string[] = ['id', 'officeName', 'transactionId', 'transactionDate', 'glAccountType', 'createdByUserName', 'submittedOnDate', 'glAccountCode', 'glAccountName', 'currency', 'debit', 'credit'];
|
||||
/** Data source for journal entries table. */
|
||||
|
||||
Reference in New Issue
Block a user