WEB-639: Refactor redundant boolean comparisons (#3063)

improve

improve

improve

improve
This commit is contained in:
Shubham Kumar
2026-01-31 07:07:59 -06:00
committed by GitHub
parent 41a71cd269
commit fbee49b464
55 changed files with 190 additions and 193 deletions
+2 -2
View File
@@ -142,12 +142,12 @@ export class CodesComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showSystemCodesPage === true) {
if (this.configurationWizardService.showSystemCodesPage) {
setTimeout(() => {
this.showPopover(this.templateButtonCreateCode, this.buttonCreateCode.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showSystemCodesList === true) {
if (this.configurationWizardService.showSystemCodesList) {
setTimeout(() => {
this.showPopover(this.templateTableCodes, this.tableCodes.nativeElement, 'top', true);
});
@@ -67,7 +67,7 @@ export class CreateCodeComponent implements OnInit, AfterViewInit {
*/
submit() {
this.systemService.createCode(this.codeForm.value).subscribe((response: any) => {
if (this.configurationWizardService.showSystemCodesForm === true) {
if (this.configurationWizardService.showSystemCodesForm) {
this.configurationWizardService.showSystemCodesForm = false;
this.configurationWizardService.showRolesandPermission = true;
this.router.navigate(['/system']);
@@ -103,7 +103,7 @@ export class CreateCodeComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showSystemCodesForm === true) {
if (this.configurationWizardService.showSystemCodesForm) {
setTimeout(() => {
this.showPopover(this.templateCodeFormRef, this.codeFormRef.nativeElement, 'right', true);
});
@@ -176,13 +176,13 @@ export class GlobalConfigurationsTabComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showConfigurationsPage === true) {
if (this.configurationWizardService.showConfigurationsPage) {
setTimeout(() => {
this.showPopover(this.templateFilter, this.filter.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showConfigurationsList === true) {
if (this.configurationWizardService.showConfigurationsList) {
setTimeout(() => {
this.showPopover(this.templateConfigurationsTable, this.configurationsTable.nativeElement, 'top', true);
});
@@ -258,12 +258,12 @@ export class ConfigureMakerCheckerTasksComponent implements OnInit, AfterViewIni
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showMakerCheckerTablePage === true) {
if (this.configurationWizardService.showMakerCheckerTablePage) {
setTimeout(() => {
this.showPopover(this.templateButtonEdit, this.buttonEdit.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showMakerCheckerTableList === true) {
if (this.configurationWizardService.showMakerCheckerTableList) {
setTimeout(() => {
this.showPopover(this.templateMcTable, this.mcTable.nativeElement, 'top', true);
});
@@ -296,7 +296,7 @@ export class CreateDataTableComponent implements OnInit, AfterViewInit {
delete payload.entitySubType;
}
this.systemService.createDataTable(payload).subscribe((response: any) => {
if (this.configurationWizardService.showDatatablesForm === true) {
if (this.configurationWizardService.showDatatablesForm) {
this.configurationWizardService.showDatatablesForm = false;
this.openDialog();
} else {
@@ -331,7 +331,7 @@ export class CreateDataTableComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showDatatablesForm === true) {
if (this.configurationWizardService.showDatatablesForm) {
setTimeout(() => {
this.showPopover(this.templateDataTableFormRef, this.dataTableFormRef.nativeElement, 'bottom', true);
});
@@ -147,12 +147,12 @@ export class ManageDataTablesComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showDatatablesPage === true) {
if (this.configurationWizardService.showDatatablesPage) {
setTimeout(() => {
this.showPopover(this.templateCreateDatatableRef, this.createDatatableRef.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showDatatablesList === true) {
if (this.configurationWizardService.showDatatablesList) {
setTimeout(() => {
this.showPopover(this.templateDatatablesList, this.datatablesList.nativeElement, 'top', true);
});
@@ -265,12 +265,12 @@ export class ManageSchedulerJobsComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showSchedulerJobsPage === true) {
if (this.configurationWizardService.showSchedulerJobsPage) {
setTimeout(() => {
this.showPopover(this.templateSchedulerStatus, this.schedulerStatus.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showSchedulerJobsList === true) {
if (this.configurationWizardService.showSchedulerJobsList) {
setTimeout(() => {
this.showPopover(this.templateJobsTable, this.jobsTable.nativeElement, 'top', true);
});
@@ -135,7 +135,7 @@ export class ManageReportsComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showManageReports === true) {
if (this.configurationWizardService.showManageReports) {
setTimeout(() => {
this.showPopover(this.templateButtonCreateReport, this.buttonCreateReport.nativeElement, 'bottom', true);
});
@@ -159,12 +159,12 @@ export class RolesAndPermissionsComponent implements OnInit, AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showRolesandPermissionPage === true) {
if (this.configurationWizardService.showRolesandPermissionPage) {
setTimeout(() => {
this.showPopover(this.templateButtonAddRole, this.buttonAddRole.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showRolesandPermissionList === true) {
if (this.configurationWizardService.showRolesandPermissionList) {
setTimeout(() => {
this.showPopover(
this.templateTableRolesandPermissions,
+7 -7
View File
@@ -92,37 +92,37 @@ export class SystemComponent implements AfterViewInit {
* To show popover.
*/
ngAfterViewInit() {
if (this.configurationWizardService.showDatatables === true) {
if (this.configurationWizardService.showDatatables) {
setTimeout(() => {
this.showPopover(this.templateDatatables, this.datatables.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showSystemCodes === true) {
if (this.configurationWizardService.showSystemCodes) {
setTimeout(() => {
this.showPopover(this.templateCodes, this.codes.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showRolesandPermission === true) {
if (this.configurationWizardService.showRolesandPermission) {
setTimeout(() => {
this.showPopover(this.templateRolesandPermission, this.rolesandpermission.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showMakerCheckerTable === true) {
if (this.configurationWizardService.showMakerCheckerTable) {
setTimeout(() => {
this.showPopover(this.templateMakerCheckerTable, this.makerCheckerTable.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showConfigurations === true) {
if (this.configurationWizardService.showConfigurations) {
setTimeout(() => {
this.showPopover(this.templateConfigurations, this.configurations.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showSchedulerJobs === true) {
if (this.configurationWizardService.showSchedulerJobs) {
setTimeout(() => {
this.showPopover(this.templateSchedulerJobs, this.schedulerJobs.nativeElement, 'bottom', true);
});
}
if (this.configurationWizardService.showManageReports === true) {
if (this.configurationWizardService.showManageReports) {
setTimeout(() => {
this.showPopover(this.templateManageReports, this.manageReports.nativeElement, 'bottom', true);
});