WEB-639: Refactor redundant boolean comparisons (#3063)
improve improve improve improve
This commit is contained in:
@@ -252,7 +252,7 @@ export class BreadcrumbComponent implements AfterViewInit, OnDestroy {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showBreadcrumbs === true) {
|
||||
if (this.configurationWizardService.showBreadcrumbs) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateBreadcrumb, this.breadcrumb.nativeElement, 'bottom', true);
|
||||
});
|
||||
|
||||
@@ -226,12 +226,12 @@ export class SidenavComponent implements OnInit, AfterViewInit {
|
||||
* To show popovers
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showSideNav === true) {
|
||||
if (this.configurationWizardService.showSideNav) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateLogo, this.logo.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
if (this.configurationWizardService.showSideNavChartofAccounts === true) {
|
||||
if (this.configurationWizardService.showSideNavChartofAccounts) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateChartOfAccounts, this.chartOfAccounts.nativeElement, 'top', true);
|
||||
});
|
||||
|
||||
@@ -234,20 +234,17 @@ export class ToolbarComponent implements OnInit, AfterViewInit, AfterContentChec
|
||||
* To show popovers
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showToolbar === true) {
|
||||
if (this.configurationWizardService.showToolbar) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateInstitution, this.institution.nativeElement);
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
this.configurationWizardService.showSideNav === true ||
|
||||
this.configurationWizardService.showSideNavChartofAccounts === true
|
||||
) {
|
||||
if (this.configurationWizardService.showSideNav || this.configurationWizardService.showSideNavChartofAccounts) {
|
||||
this.toggleSidenavCollapse();
|
||||
}
|
||||
|
||||
if (this.configurationWizardService.showToolbarAdmin === true) {
|
||||
if (this.configurationWizardService.showToolbarAdmin) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateAppMenu, this.appMenu.nativeElement);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user