WEB-639: Refactor redundant boolean comparisons (#3063)
improve improve improve improve
This commit is contained in:
@@ -84,17 +84,17 @@ export class AccountingComponent implements AfterViewInit {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showChartofAccounts === true) {
|
||||
if (this.configurationWizardService.showChartofAccounts) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateChartofAccounts, this.chartofAccounts.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
if (this.configurationWizardService.showAccountsLinked === true) {
|
||||
if (this.configurationWizardService.showAccountsLinked) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateAccountsLinked, this.accountsLinked.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
if (this.configurationWizardService.showMigrateOpeningBalances === true) {
|
||||
if (this.configurationWizardService.showMigrateOpeningBalances) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(
|
||||
this.templateMigrateOpeningBalances,
|
||||
@@ -104,12 +104,12 @@ export class AccountingComponent implements AfterViewInit {
|
||||
);
|
||||
});
|
||||
}
|
||||
if (this.configurationWizardService.showClosingEntries === true) {
|
||||
if (this.configurationWizardService.showClosingEntries) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateClosingEntries, this.closingEntries.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
if (this.configurationWizardService.showCreateJournalEntries === true) {
|
||||
if (this.configurationWizardService.showCreateJournalEntries) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateCreateJournalEntries, this.createJournalEntries.nativeElement, 'bottom', true);
|
||||
});
|
||||
|
||||
@@ -181,13 +181,13 @@ export class ChartOfAccountsComponent implements AfterViewInit, OnInit {
|
||||
}
|
||||
};
|
||||
this.tableDataSource.sort = this.sort;
|
||||
if (this.configurationWizardService.showChartofAccountsPage === true) {
|
||||
if (this.configurationWizardService.showChartofAccountsPage) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateButtonTreeView, this.buttonTreeView.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
|
||||
if (this.configurationWizardService.showChartofAccountsList === true) {
|
||||
if (this.configurationWizardService.showChartofAccountsList) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateAccountsTable, this.accountsTable.nativeElement, 'top', true);
|
||||
});
|
||||
|
||||
+2
-2
@@ -173,7 +173,7 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit {
|
||||
return;
|
||||
}
|
||||
this.accountingService.createGlAccount(this.glAccountForm.value).subscribe((response: any) => {
|
||||
if (this.configurationWizardService.showChartofAccounts === true) {
|
||||
if (this.configurationWizardService.showChartofAccounts) {
|
||||
this.configurationWizardService.showChartofAccounts = false;
|
||||
this.openDialog();
|
||||
} else {
|
||||
@@ -208,7 +208,7 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showChartofAccountsForm === true) {
|
||||
if (this.configurationWizardService.showChartofAccountsForm) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateAccountFormRef, this.accountFormRef.nativeElement, 'bottom', true);
|
||||
});
|
||||
|
||||
@@ -184,13 +184,13 @@ export class ClosingEntriesComponent implements OnInit, AfterViewInit {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showClosingEntriesPage === true) {
|
||||
if (this.configurationWizardService.showClosingEntriesPage) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateButtonCreateClosure, this.buttonCreateClosure.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
|
||||
if (this.configurationWizardService.showClosingEntriesList === true) {
|
||||
if (this.configurationWizardService.showClosingEntriesList) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateClosuresTable, this.closuresTable.nativeElement, 'top', true);
|
||||
});
|
||||
|
||||
@@ -251,7 +251,7 @@ export class CreateJournalEntryComponent implements OnInit, AfterViewInit {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showCreateJournalEntries === true) {
|
||||
if (this.configurationWizardService.showCreateJournalEntries) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateCreateJournalFormRef, this.createJournalFormRef.nativeElement, 'top', true);
|
||||
});
|
||||
|
||||
+2
-2
@@ -149,13 +149,13 @@ export class FinancialActivityMappingsComponent implements OnInit, AfterViewInit
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showAccountsLinkedPage === true) {
|
||||
if (this.configurationWizardService.showAccountsLinkedPage) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateButtonDefineMapping, this.buttonDefineMapping.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
|
||||
if (this.configurationWizardService.showAccountsLinkedList === true) {
|
||||
if (this.configurationWizardService.showAccountsLinkedList) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateActivitiesTable, this.activitiesTable.nativeElement, 'top', true);
|
||||
});
|
||||
|
||||
@@ -240,7 +240,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showMigrateOpeningBalances === true) {
|
||||
if (this.configurationWizardService.showMigrateOpeningBalances) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateSearchFormRef, this.searchFormRef.nativeElement, 'bottom', true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user