From fbee49b464cf0b8c0a963b5bcf631a3b27900bcd Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Sat, 31 Jan 2026 18:37:59 +0530 Subject: [PATCH] WEB-639: Refactor redundant boolean comparisons (#3063) improve improve improve improve --- src/app/accounting/accounting.component.ts | 10 +- .../chart-of-accounts.component.ts | 4 +- .../create-gl-account.component.ts | 4 +- .../closing-entries.component.ts | 4 +- .../create-journal-entry.component.ts | 2 +- .../financial-activity-mappings.component.ts | 4 +- .../migrate-opening-balances.component.ts | 2 +- .../add-client-charge.component.ts | 2 +- .../configuration-wizard.service.ts | 156 +++++++++--------- .../popover/popover.service.ts | 2 +- .../shell/breadcrumb/breadcrumb.component.ts | 2 +- .../core/shell/sidenav/sidenav.component.ts | 4 +- .../core/shell/toolbar/toolbar.component.ts | 9 +- ...charge-fixed-deposits-account.component.ts | 2 +- ...ge-recurring-deposits-account.component.ts | 2 +- .../transactions-tab.component.ts | 8 +- src/app/home/home.component.ts | 4 +- .../loans-account-terms-step.component.ts | 2 +- .../services/penalty-management.service.ts | 4 +- .../currencies/currencies.component.ts | 4 +- .../manage-currencies.component.ts | 4 +- .../create-employee.component.ts | 4 +- .../employees/employees.component.ts | 4 +- .../holidays/holidays.component.ts | 4 +- .../manage-funds/manage-funds.component.ts | 4 +- .../create-office/create-office.component.ts | 4 +- .../organization/offices/offices.component.ts | 4 +- .../organization/organization.component.ts | 12 +- .../password-preferences.component.ts | 2 +- .../working-days/working-days.component.ts | 4 +- src/app/pipes/accounts-filter.pipe.ts | 2 +- src/app/products/charges/charges.component.ts | 4 +- .../fixed-deposit-products.component.ts | 4 +- .../edit-loan-product.component.ts | 2 +- .../loan-products/loan-products.component.ts | 4 +- src/app/products/products.component.ts | 12 +- .../recurring-deposit-products.component.ts | 4 +- .../saving-products.component.ts | 4 +- .../share-products.component.ts | 4 +- .../add-charge-savings-account.component.ts | 2 +- src/app/system/codes/codes.component.ts | 4 +- .../create-code/create-code.component.ts | 4 +- .../global-configurations-tab.component.ts | 4 +- ...configure-maker-checker-tasks.component.ts | 4 +- .../create-data-table.component.ts | 4 +- .../manage-data-tables.component.ts | 4 +- .../manage-scheduler-jobs.component.ts | 4 +- .../manage-reports.component.ts | 2 +- .../roles-and-permissions.component.ts | 4 +- src/app/system/system.component.ts | 14 +- .../loan-approval/loan-approval.component.ts | 2 +- .../loan-disbursal.component.ts | 2 +- .../create-user/create-user.component.ts | 4 +- src/app/users/users.component.ts | 4 +- .../create-user/create-user.component.ts | 4 +- 55 files changed, 190 insertions(+), 193 deletions(-) diff --git a/src/app/accounting/accounting.component.ts b/src/app/accounting/accounting.component.ts index c23432afd..cf9771660 100644 --- a/src/app/accounting/accounting.component.ts +++ b/src/app/accounting/accounting.component.ts @@ -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); }); diff --git a/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts b/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts index 6acec57cf..57bc19a3a 100644 --- a/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts +++ b/src/app/accounting/chart-of-accounts/chart-of-accounts.component.ts @@ -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); }); diff --git a/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts b/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts index a46e5f5e0..90d64e74b 100644 --- a/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts +++ b/src/app/accounting/chart-of-accounts/create-gl-account/create-gl-account.component.ts @@ -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); }); diff --git a/src/app/accounting/closing-entries/closing-entries.component.ts b/src/app/accounting/closing-entries/closing-entries.component.ts index 4dd196503..7edca7311 100644 --- a/src/app/accounting/closing-entries/closing-entries.component.ts +++ b/src/app/accounting/closing-entries/closing-entries.component.ts @@ -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); }); diff --git a/src/app/accounting/create-journal-entry/create-journal-entry.component.ts b/src/app/accounting/create-journal-entry/create-journal-entry.component.ts index 1cc4ea184..d1b4f4650 100644 --- a/src/app/accounting/create-journal-entry/create-journal-entry.component.ts +++ b/src/app/accounting/create-journal-entry/create-journal-entry.component.ts @@ -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); }); diff --git a/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts b/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts index be9e70084..b1ec94656 100644 --- a/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts +++ b/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.ts @@ -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); }); diff --git a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts index d4a26adfd..923463829 100644 --- a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts +++ b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts @@ -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); }); diff --git a/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts b/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts index 6cd16d7ba..a4d061db2 100644 --- a/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts +++ b/src/app/clients/clients-view/client-actions/add-client-charge/add-client-charge.component.ts @@ -146,7 +146,7 @@ export class AddClientChargeComponent implements OnInit { clientCharge.feeInterval = this.chargeDetails.feeInterval; } if (this.chargeDetails.dueDateNotRequired !== true) { - if (this.chargeDetails.chargeTimeTypeAnnualOrMonth === true) { + if (this.chargeDetails.chargeTimeTypeAnnualOrMonth) { const monthDayFormat = 'MMMM-dd'; // TODO: Update once language and date settings are setup clientCharge.monthDayFormat = monthDayFormat; if (clientCharge.feeOnMonthDay) { diff --git a/src/app/configuration-wizard/configuration-wizard.service.ts b/src/app/configuration-wizard/configuration-wizard.service.ts index fe9efdf2d..7ad71b4cf 100644 --- a/src/app/configuration-wizard/configuration-wizard.service.ts +++ b/src/app/configuration-wizard/configuration-wizard.service.ts @@ -21,186 +21,186 @@ export class ConfigurationWizardService { */ /*To show toolbar*/ - showToolbar = false; + showToolbar: boolean = false; /*To show popover on admin section in toolbar*/ - showToolbarAdmin = false; + showToolbarAdmin: boolean = false; /*To show side navbar*/ - showSideNav = false; + showSideNav: boolean = false; /*To show popover on chart of accounts section in sidenav bar*/ - showSideNavChartofAccounts = false; + showSideNavChartofAccounts: boolean = false; /*To show breadcrumbs*/ - showBreadcrumbs = false; + showBreadcrumbs: boolean = false; /*To show home*/ - showHome = false; + showHome: boolean = false; /*To show search activity in home*/ - showHomeSearchActivity = false; + showHomeSearchActivity: boolean = false; /** * Organization Setup */ /*To show popover on manage offices on oganization page*/ - showCreateOffice = false; + showCreateOffice: boolean = false; /*To show popover on button in offices page*/ - showOfficeList = false; + showOfficeList: boolean = false; /*To show popover on offices table*/ - showOfficeTable = false; + showOfficeTable: boolean = false; /*To show popover on create office form*/ - showOfficeForm = false; + showOfficeForm: boolean = false; /*To show popover on add edit currency on organization page*/ - showAddEditCurrency = false; + showAddEditCurrency: boolean = false; /*To show popover on button in currency page*/ - showCurrencyPage = false; + showCurrencyPage: boolean = false; /*To show popover on currency table*/ - showCurrencyList = false; + showCurrencyList: boolean = false; /*To show popover on currency form*/ - showCurrencyForm = false; + showCurrencyForm: boolean = false; /*To show popover on manage holiday on organization page*/ - showCreateHoliday = false; + showCreateHoliday: boolean = false; /*To show popover on button in holiday page*/ - showHolidayPage = false; + showHolidayPage: boolean = false; /*To show popover on filter in holiday table*/ - showHolidayFilter = false; + showHolidayFilter: boolean = false; /*To show popover on manage employees on organization page*/ - showCreateEmployee = false; + showCreateEmployee: boolean = false; /*To show popover on button in employee page*/ - showEmployeeList = false; + showEmployeeList: boolean = false; /*To show popover on employees table*/ - showEmployeeTable = false; + showEmployeeTable: boolean = false; /*To show popover on create employee form*/ - showEmployeeForm = false; + showEmployeeForm: boolean = false; /*To show popover on define working days*/ - showDefineWorkingDays = false; + showDefineWorkingDays: boolean = false; /** * System Setup */ /*To show popover on manage datatables on system page*/ - showDatatables = false; + showDatatables: boolean = false; /*To show popover on button in datatables page*/ - showDatatablesPage = false; + showDatatablesPage: boolean = false; /*To show popover on datatables table*/ - showDatatablesList = false; + showDatatablesList: boolean = false; /*To show popover on create datable form*/ - showDatatablesForm = false; + showDatatablesForm: boolean = false; /*To show popover manage codes on system page*/ - showSystemCodes = false; + showSystemCodes: boolean = false; /*To show popover on button in codes page*/ - showSystemCodesPage = false; + showSystemCodesPage: boolean = false; /*To show popover on codes table*/ - showSystemCodesList = false; + showSystemCodesList: boolean = false; /*To show popover on create codes form*/ - showSystemCodesForm = false; + showSystemCodesForm: boolean = false; /*To show popover on manage roles and permision on system page*/ - showRolesandPermission = false; + showRolesandPermission: boolean = false; /*To show popover on button in rolaes and permission page*/ - showRolesandPermissionPage = false; + showRolesandPermissionPage: boolean = false; /*To show popover on roles and permission list*/ - showRolesandPermissionList = false; + showRolesandPermissionList: boolean = false; /*To show popover on button on user page*/ - showUsers = false; + showUsers: boolean = false; /*To show popover on users table*/ - showUsersList = false; + showUsersList: boolean = false; /*To show popover on create user form*/ - showUsersForm = false; + showUsersForm: boolean = false; /*To show popover on maker checker table in system page*/ - showMakerCheckerTable = false; + showMakerCheckerTable: boolean = false; /*To show popover on button in make checker tasks page*/ - showMakerCheckerTablePage = false; + showMakerCheckerTablePage: boolean = false; /*To show popover on maker checker tasks table*/ - showMakerCheckerTableList = false; + showMakerCheckerTableList: boolean = false; /*To show popover on global configuration in system page*/ - showConfigurations = false; + showConfigurations: boolean = false; /*To show popover on button in configuration page*/ - showConfigurationsPage = false; + showConfigurationsPage: boolean = false; /*To show popover on button in configuration list*/ - showConfigurationsList = false; + showConfigurationsList: boolean = false; /*To show popover on manage scheduler jobs on system page*/ - showSchedulerJobs = false; + showSchedulerJobs: boolean = false; /*To show popover on button in scheduler jobs page*/ - showSchedulerJobsPage = false; + showSchedulerJobsPage: boolean = false; /*To show popover on scheduler jobs table*/ - showSchedulerJobsList = false; + showSchedulerJobsList: boolean = false; /** * Accounting Setup */ /*To show popover on chart of accounts on accounting page*/ - showChartofAccounts = false; + showChartofAccounts: boolean = false; /*To show popover on button in chart of accounts page*/ - showChartofAccountsPage = false; + showChartofAccountsPage: boolean = false; /*To show popover on button in chart of accounts page*/ - showChartofAccountsList = false; + showChartofAccountsList: boolean = false; /*To show popover on create chart of accounts form*/ - showChartofAccountsForm = false; + showChartofAccountsForm: boolean = false; /*To show popover on accounts linked on accounting page*/ - showAccountsLinked = false; + showAccountsLinked: boolean = false; /*To show popover on button in accounting page*/ - showAccountsLinkedPage = false; + showAccountsLinkedPage: boolean = false; /*To show popover on accounts linked table*/ - showAccountsLinkedList = false; + showAccountsLinkedList: boolean = false; /*To show popover on migrate openening balances*/ - showMigrateOpeningBalances = false; + showMigrateOpeningBalances: boolean = false; /*To show popover on closing entries on accounting page*/ - showClosingEntries = false; + showClosingEntries: boolean = false; /*To show popover on button in closing entries page*/ - showClosingEntriesPage = false; + showClosingEntriesPage: boolean = false; /*To show popover on closing entries table*/ - showClosingEntriesList = false; + showClosingEntriesList: boolean = false; /*To show popover on create journal entry*/ - showCreateJournalEntries = false; + showCreateJournalEntries: boolean = false; /** * Products Setup */ /*To show popover on charges on products page*/ - showCharges = false; + showCharges: boolean = false; /*To show popover on button in charges page*/ - showChargesPage = false; + showChargesPage: boolean = false; /*To show popover on charges table*/ - showChargesList = false; + showChargesList: boolean = false; /*To show popover on loan products on products page*/ - showLoanProducts = false; + showLoanProducts: boolean = false; /*To show popover on button in load products page*/ - showLoanProductsPage = false; + showLoanProductsPage: boolean = false; /*To show popover on loan products table*/ - showLoanProductsList = false; + showLoanProductsList: boolean = false; /*To show popover on savings products on products page*/ - showSavingsProducts = false; + showSavingsProducts: boolean = false; /*To show popover on button in savings products page*/ - showSavingsProductsPage = false; + showSavingsProductsPage: boolean = false; /*To show popover on savings products table*/ - showSavingsProductsList = false; + showSavingsProductsList: boolean = false; /*To show popover on shares products on products page*/ - showShareProducts = false; + showShareProducts: boolean = false; /*To show popover on button in share products page*/ - showShareProductsPage = false; + showShareProductsPage: boolean = false; /*To show popover on share products table*/ - showShareProductsList = false; + showShareProductsList: boolean = false; /*To show popover on fixed deposit products on products page*/ - showFixedDepositProducts = false; + showFixedDepositProducts: boolean = false; /*To show popover on button in fixed deposit products page*/ - showFixedDepositProductsPage = false; + showFixedDepositProductsPage: boolean = false; /*To show popover on fixed deposit products table*/ - showFixedDepositProductsList = false; + showFixedDepositProductsList: boolean = false; /*To show popover on recrurring deposit products on products page*/ - showRecurringDepositProducts = false; + showRecurringDepositProducts: boolean = false; /*To show popover on button in recurring deposit products page*/ - showRecurringDepositProductsPage = false; + showRecurringDepositProductsPage: boolean = false; /*To show popover on recurring deposit products table*/ - showRecurringDepositProductsList = false; + showRecurringDepositProductsList: boolean = false; /** * Manage Funds and manage reports Setup */ /*To show popover on manage funds*/ - showManageFunds = false; + showManageFunds: boolean = false; /*To show popover on manage reports*/ - showManageReports = false; + showManageReports: boolean = false; constructor() {} diff --git a/src/app/configuration-wizard/popover/popover.service.ts b/src/app/configuration-wizard/popover/popover.service.ts index f324feb2d..4bf695942 100644 --- a/src/app/configuration-wizard/popover/popover.service.ts +++ b/src/app/configuration-wizard/popover/popover.service.ts @@ -183,7 +183,7 @@ export class PopoverService { } ]; } - if (backdrop === true) { + if (backdrop) { showbackdrop = true; } else { showbackdrop = false; diff --git a/src/app/core/shell/breadcrumb/breadcrumb.component.ts b/src/app/core/shell/breadcrumb/breadcrumb.component.ts index 44e13c6e5..3f6a607e9 100644 --- a/src/app/core/shell/breadcrumb/breadcrumb.component.ts +++ b/src/app/core/shell/breadcrumb/breadcrumb.component.ts @@ -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); }); diff --git a/src/app/core/shell/sidenav/sidenav.component.ts b/src/app/core/shell/sidenav/sidenav.component.ts index eb9e2b752..df1dee42e 100644 --- a/src/app/core/shell/sidenav/sidenav.component.ts +++ b/src/app/core/shell/sidenav/sidenav.component.ts @@ -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); }); diff --git a/src/app/core/shell/toolbar/toolbar.component.ts b/src/app/core/shell/toolbar/toolbar.component.ts index 61d90e935..afe5a0208 100644 --- a/src/app/core/shell/toolbar/toolbar.component.ts +++ b/src/app/core/shell/toolbar/toolbar.component.ts @@ -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); }); diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts index 093a96365..fa8dad31f 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/add-charge-fixed-deposits-account/add-charge-fixed-deposits-account.component.ts @@ -147,7 +147,7 @@ export class AddChargeFixedDepositsAccountComponent implements OnInit { savingsCharge.feeInterval = this.chargeDetails.feeInterval; } if (this.chargeDetails.dueDateNotRequired !== true) { - if (this.chargeDetails.chargeTimeTypeAnnualOrMonth === true) { + if (this.chargeDetails.chargeTimeTypeAnnualOrMonth) { const monthDayFormat = 'MMMM-dd'; // TODO: Update once language and date settings are setup savingsCharge.monthDayFormat = monthDayFormat; if (savingsCharge.feeOnMonthDay) { diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts index 770c2d51c..b8c6928f6 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/add-charge-recurring-deposits-account/add-charge-recurring-deposits-account.component.ts @@ -146,7 +146,7 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit { savingsCharge.feeInterval = this.chargeDetails.feeInterval; } if (this.chargeDetails.dueDateNotRequired !== true) { - if (this.chargeDetails.chargeTimeTypeAnnualOrMonth === true) { + if (this.chargeDetails.chargeTimeTypeAnnualOrMonth) { const monthDayFormat = 'MMMM-dd'; // TODO: Update once language and date settings are setup savingsCharge.monthDayFormat = monthDayFormat; if (savingsCharge.feeOnMonthDay) { diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts index 0c639ba6a..f1b7bcbe4 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/transactions-tab.component.ts @@ -117,10 +117,10 @@ export class TransactionsTabComponent implements OnInit { */ isDebit(transactionType: any) { return ( - transactionType.withdrawal === true || - transactionType.feeDeduction === true || - transactionType.overdraftInterest === true || - transactionType.withholdTax === true + transactionType.withdrawal || + transactionType.feeDeduction || + transactionType.overdraftInterest || + transactionType.withholdTax ); } diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index e10cb8e46..4a094eb8a 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -141,12 +141,12 @@ export class HomeComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showHome === true) { + if (this.configurationWizardService.showHome) { setTimeout(() => { this.showPopover(this.templateButtonDashboard, this.buttonDashboard.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showHomeSearchActivity === true) { + if (this.configurationWizardService.showHomeSearchActivity) { setTimeout(() => { this.showPopover(this.templateSearchActivity, this.searchActivity.nativeElement, 'bottom', true); }); diff --git a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts index 63498bd6e..f4f1bb746 100644 --- a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts @@ -720,6 +720,6 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { * Available when PROGRESSIVE schedule type and multi-disbursement is enabled. */ isFullTermTrancheEditable(): boolean { - return this.isProgressive && this.multiDisburseLoan === true; + return this.isProgressive && !!this.multiDisburseLoan; } } diff --git a/src/app/loans/services/penalty-management.service.ts b/src/app/loans/services/penalty-management.service.ts index 9e12b4e47..2801214fa 100644 --- a/src/app/loans/services/penalty-management.service.ts +++ b/src/app/loans/services/penalty-management.service.ts @@ -87,7 +87,7 @@ export class PenaltyManagementService { } // Check if it's a penalty charge const isPenalty = - charge.penalty === true || + charge.penalty || charge.penalty === 'true' || (charge.chargeTimeType && (charge.chargeTimeType.value?.toLowerCase().includes('overdue') || @@ -99,7 +99,7 @@ export class PenaltyManagementService { } // Check if already waived or paid - if (charge.waived === true || charge.waived === 'true' || charge.paid === true || charge.paid === 'true') { + if (charge.waived || charge.waived === 'true' || charge.paid || charge.paid === 'true') { return false; } diff --git a/src/app/organization/currencies/currencies.component.ts b/src/app/organization/currencies/currencies.component.ts index 7fd70dc58..27811c41a 100644 --- a/src/app/organization/currencies/currencies.component.ts +++ b/src/app/organization/currencies/currencies.component.ts @@ -146,13 +146,13 @@ export class CurrenciesComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showCurrencyPage === true) { + if (this.configurationWizardService.showCurrencyPage) { setTimeout(() => { this.showPopover(this.templateButtonAddEdit, this.buttonAddEdit.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showCurrencyList === true) { + if (this.configurationWizardService.showCurrencyList) { setTimeout(() => { this.showPopover(this.templateTableCurrencies, this.tableCurrencies.nativeElement, 'top', true); }); diff --git a/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts b/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts index d041d2862..a1564f3b9 100644 --- a/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts +++ b/src/app/organization/currencies/manage-currencies/manage-currencies.component.ts @@ -166,7 +166,7 @@ export class ManageCurrenciesComponent implements OnInit, AfterViewInit, OnDestr this.organizationservice.updateCurrencies(selectedCurrencyCodes).subscribe((response: any) => { this.selectedCurrencies.push(newCurrency); this.formRef.resetForm(); - if (this.configurationWizardService.showCurrencyForm === true) { + if (this.configurationWizardService.showCurrencyForm) { this.configurationWizardService.showCurrencyForm = false; this.openDialog(); } @@ -205,7 +205,7 @@ export class ManageCurrenciesComponent implements OnInit, AfterViewInit, OnDestr } ngAfterViewInit() { - if (this.configurationWizardService.showCurrencyForm === true) { + if (this.configurationWizardService.showCurrencyForm) { setTimeout(() => { this.showPopover(this.templateCurrencyFormRef, this.currencyFormRef.nativeElement, 'bottom', true); }); diff --git a/src/app/organization/employees/create-employee/create-employee.component.ts b/src/app/organization/employees/create-employee/create-employee.component.ts index 4194c06f2..92b6b45df 100644 --- a/src/app/organization/employees/create-employee/create-employee.component.ts +++ b/src/app/organization/employees/create-employee/create-employee.component.ts @@ -142,7 +142,7 @@ export class CreateEmployeeComponent implements OnInit, AfterViewInit { locale }; this.organizationService.createEmployee(data).subscribe((response: any) => { - if (this.configurationWizardService.showEmployeeForm === true) { + if (this.configurationWizardService.showEmployeeForm) { this.configurationWizardService.showEmployeeForm = false; this.openDialog(); } else { @@ -171,7 +171,7 @@ export class CreateEmployeeComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showEmployeeForm === true) { + if (this.configurationWizardService.showEmployeeForm) { setTimeout(() => { this.showPopover(this.templateCreateEmployeeForm, this.createEmployeeFormRef.nativeElement, 'right', true); }); diff --git a/src/app/organization/employees/employees.component.ts b/src/app/organization/employees/employees.component.ts index 5375d7fc6..853c6ed7f 100644 --- a/src/app/organization/employees/employees.component.ts +++ b/src/app/organization/employees/employees.component.ts @@ -151,12 +151,12 @@ export class EmployeesComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showEmployeeList === true) { + if (this.configurationWizardService.showEmployeeList) { setTimeout(() => { this.showPopover(this.templateButtonImportEmployees, this.buttonImportEmployees.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showEmployeeTable === true) { + if (this.configurationWizardService.showEmployeeTable) { setTimeout(() => { this.showPopover(this.templateTableEmployees, this.tableEmployees.nativeElement, 'top', true); }); diff --git a/src/app/organization/holidays/holidays.component.ts b/src/app/organization/holidays/holidays.component.ts index 1857359e4..1c67550aa 100644 --- a/src/app/organization/holidays/holidays.component.ts +++ b/src/app/organization/holidays/holidays.component.ts @@ -173,13 +173,13 @@ export class HolidaysComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showHolidayPage === true) { + if (this.configurationWizardService.showHolidayPage) { setTimeout(() => { this.showPopover(this.templateButtonCreateHoliday, this.buttonCreateHoliday.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showHolidayFilter === true) { + if (this.configurationWizardService.showHolidayFilter) { setTimeout(() => { this.showPopover(this.templateFilterRef, this.filterRef.nativeElement, 'bottom', true); }); diff --git a/src/app/organization/manage-funds/manage-funds.component.ts b/src/app/organization/manage-funds/manage-funds.component.ts index 839e276d2..77e2eeb70 100644 --- a/src/app/organization/manage-funds/manage-funds.component.ts +++ b/src/app/organization/manage-funds/manage-funds.component.ts @@ -157,7 +157,7 @@ export class ManageFundsComponent implements OnInit, AfterViewInit { name: newFund.name }); this.formRef.resetForm(); - if (this.configurationWizardService.showManageFunds === true) { + if (this.configurationWizardService.showManageFunds) { this.configurationWizardService.showManageFunds = false; this.openDialog(); } @@ -215,7 +215,7 @@ export class ManageFundsComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showManageFunds === true) { + if (this.configurationWizardService.showManageFunds) { setTimeout(() => { this.showPopover(this.templateFundFormRef, this.fundFormRef.nativeElement, 'bottom', true); }); diff --git a/src/app/organization/offices/create-office/create-office.component.ts b/src/app/organization/offices/create-office/create-office.component.ts index f40b7f5b6..d0ebae00c 100644 --- a/src/app/organization/offices/create-office/create-office.component.ts +++ b/src/app/organization/offices/create-office/create-office.component.ts @@ -121,7 +121,7 @@ export class CreateOfficeComponent implements OnInit, AfterViewInit { locale }; this.organizationService.createOffice(data).subscribe((response) => { - if (this.configurationWizardService.showOfficeForm === true) { + if (this.configurationWizardService.showOfficeForm) { this.configurationWizardService.showOfficeForm = false; this.openDialog(); } else { @@ -176,7 +176,7 @@ export class CreateOfficeComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showOfficeForm === true) { + if (this.configurationWizardService.showOfficeForm) { setTimeout(() => { this.showPopover(this.templateCreateOfficeForm, this.createOfficeFormRef.nativeElement, 'right', true); }); diff --git a/src/app/organization/offices/offices.component.ts b/src/app/organization/offices/offices.component.ts index e3134e4c9..147af7cbb 100644 --- a/src/app/organization/offices/offices.component.ts +++ b/src/app/organization/offices/offices.component.ts @@ -240,12 +240,12 @@ export class OfficesComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showOfficeList === true) { + if (this.configurationWizardService.showOfficeList) { setTimeout(() => { this.showPopover(this.templateButtonTreeView, this.buttonTreeView.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showOfficeTable === true) { + if (this.configurationWizardService.showOfficeTable) { setTimeout(() => { this.showPopover(this.templateTableOffices, this.tableOffices.nativeElement, 'top', true); }); diff --git a/src/app/organization/organization.component.ts b/src/app/organization/organization.component.ts index 2fad33f35..60914dcfc 100644 --- a/src/app/organization/organization.component.ts +++ b/src/app/organization/organization.component.ts @@ -90,32 +90,32 @@ export class OrganizationComponent implements AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showCreateOffice === true) { + if (this.configurationWizardService.showCreateOffice) { setTimeout(() => { this.showPopover(this.templateOffice, this.office.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showAddEditCurrency === true) { + if (this.configurationWizardService.showAddEditCurrency) { setTimeout(() => { this.showPopover(this.templateAddEditCurrency, this.addEditCurrency.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showCreateHoliday === true) { + if (this.configurationWizardService.showCreateHoliday) { setTimeout(() => { this.showPopover(this.templateHolidays, this.holidays.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showCreateEmployee === true) { + if (this.configurationWizardService.showCreateEmployee) { setTimeout(() => { this.showPopover(this.templateEmployee, this.employee.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showDefineWorkingDays === true) { + if (this.configurationWizardService.showDefineWorkingDays) { setTimeout(() => { this.showPopover(this.templateWorkingDays, this.workingDays.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showManageFunds === true) { + if (this.configurationWizardService.showManageFunds) { setTimeout(() => { this.showPopover(this.templateManageFunds, this.manageFunds.nativeElement, 'bottom', true); }); diff --git a/src/app/organization/password-preferences/password-preferences.component.ts b/src/app/organization/password-preferences/password-preferences.component.ts index 3c4614507..03e5eabce 100644 --- a/src/app/organization/password-preferences/password-preferences.component.ts +++ b/src/app/organization/password-preferences/password-preferences.component.ts @@ -75,7 +75,7 @@ export class PasswordPreferencesComponent implements OnInit { */ setPasswordPreferencesForm() { for (const passwordPreference of this.passwordPreferencesData) { - if (passwordPreference.active === true) { + if (passwordPreference.active) { this.passwordPreferencesForm.get('validationPolicyId').setValue(passwordPreference.id); } } diff --git a/src/app/organization/working-days/working-days.component.ts b/src/app/organization/working-days/working-days.component.ts index dab34cb4f..b175dafc1 100644 --- a/src/app/organization/working-days/working-days.component.ts +++ b/src/app/organization/working-days/working-days.component.ts @@ -153,7 +153,7 @@ export class WorkingDaysComponent implements OnInit, AfterViewInit { } workingDays.recurrence = recurrence; this.organizationService.updateWorkingDays(workingDays).subscribe((response) => { - if (this.configurationWizardService.showDefineWorkingDays === true) { + if (this.configurationWizardService.showDefineWorkingDays) { this.configurationWizardService.showDefineWorkingDays = false; this.openNextStepDialog(); } else { @@ -182,7 +182,7 @@ export class WorkingDaysComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showDefineWorkingDays === true) { + if (this.configurationWizardService.showDefineWorkingDays) { setTimeout(() => { this.showPopover(this.templateWorkingDaysFormRef, this.workingDaysFormRef.nativeElement, 'right', true); }); diff --git a/src/app/pipes/accounts-filter.pipe.ts b/src/app/pipes/accounts-filter.pipe.ts index f790e51f1..a9f3a02b1 100644 --- a/src/app/pipes/accounts-filter.pipe.ts +++ b/src/app/pipes/accounts-filter.pipe.ts @@ -89,7 +89,7 @@ export class AccountsFilterPipe implements PipeTransform { if (type === 'guarantor') { if (status === false) { accounts = accounts.filter((account: any) => { - return account.status === true; + return account.status; }); } else { return accounts; diff --git a/src/app/products/charges/charges.component.ts b/src/app/products/charges/charges.component.ts index 4fdaf3c83..45dbd4858 100644 --- a/src/app/products/charges/charges.component.ts +++ b/src/app/products/charges/charges.component.ts @@ -154,13 +154,13 @@ export class ChargesComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showChargesPage === true) { + if (this.configurationWizardService.showChargesPage) { setTimeout(() => { this.showPopover(this.templateButtonCreateCharge, this.buttonCreateCharge.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showChargesList === true) { + if (this.configurationWizardService.showChargesList) { setTimeout(() => { this.showPopover(this.templateChargesTable, this.chargesTable.nativeElement, 'top', true); }); diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts index b98c41569..9d15848b7 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-products.component.ts @@ -130,7 +130,7 @@ export class FixedDepositProductsComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showFixedDepositProductsPage === true) { + if (this.configurationWizardService.showFixedDepositProductsPage) { setTimeout(() => { this.showPopover( this.templateButtonCreateFixedProduct, @@ -141,7 +141,7 @@ export class FixedDepositProductsComponent implements OnInit, AfterViewInit { }); } - if (this.configurationWizardService.showFixedDepositProductsList === true) { + if (this.configurationWizardService.showFixedDepositProductsList) { setTimeout(() => { this.showPopover(this.templateFixedProductsTable, this.fixedProductsTable.nativeElement, 'top', true); }); diff --git a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts index 8b50871cd..59577cc74 100644 --- a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts +++ b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts @@ -339,7 +339,7 @@ export class EditLoanProductComponent implements OnInit { submit() { const loanProduct = this.loanProducts.buildPayload(this.loanProduct, this.itemsByDefault); - if (loanProduct['useDueForRepaymentsConfigurations'] === true) { + if (loanProduct['useDueForRepaymentsConfigurations']) { loanProduct['dueDaysForRepaymentEvent'] = null; loanProduct['overDueDaysForRepaymentEvent'] = null; } diff --git a/src/app/products/loan-products/loan-products.component.ts b/src/app/products/loan-products/loan-products.component.ts index 66ba23919..c3733f68b 100644 --- a/src/app/products/loan-products/loan-products.component.ts +++ b/src/app/products/loan-products/loan-products.component.ts @@ -125,7 +125,7 @@ export class LoanProductsComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showLoanProductsPage === true) { + if (this.configurationWizardService.showLoanProductsPage) { setTimeout(() => { this.showPopover( this.templateButtonCreateLoanProduct, @@ -136,7 +136,7 @@ export class LoanProductsComponent implements OnInit, AfterViewInit { }); } - if (this.configurationWizardService.showLoanProductsList === true) { + if (this.configurationWizardService.showLoanProductsList) { setTimeout(() => { this.showPopover(this.templateLoanProductsTable, this.loanProductsTable.nativeElement, 'top', true); }); diff --git a/src/app/products/products.component.ts b/src/app/products/products.component.ts index 893e810ae..30f43047e 100644 --- a/src/app/products/products.component.ts +++ b/src/app/products/products.component.ts @@ -71,32 +71,32 @@ export class ProductsComponent implements AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showCharges === true) { + if (this.configurationWizardService.showCharges) { setTimeout(() => { this.showPopover(this.templateCharges, this.charges.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showLoanProducts === true) { + if (this.configurationWizardService.showLoanProducts) { setTimeout(() => { this.showPopover(this.templateLoanProducts, this.loanProducts.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showSavingsProducts === true) { + if (this.configurationWizardService.showSavingsProducts) { setTimeout(() => { this.showPopover(this.templateSavingsProducts, this.savingsProducts.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showShareProducts === true) { + if (this.configurationWizardService.showShareProducts) { setTimeout(() => { this.showPopover(this.templateShareProducts, this.shareProducts.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showFixedDepositProducts === true) { + if (this.configurationWizardService.showFixedDepositProducts) { setTimeout(() => { this.showPopover(this.templateFixedDepositProducts, this.fixedDepositProducts.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showRecurringDepositProducts === true) { + if (this.configurationWizardService.showRecurringDepositProducts) { setTimeout(() => { this.showPopover( this.templateRecurringDepositProducts, diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts index 169d2c2b4..e2b18181d 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-products.component.ts @@ -137,7 +137,7 @@ export class RecurringDepositProductsComponent implements OnInit, AfterViewInit * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showRecurringDepositProductsPage === true) { + if (this.configurationWizardService.showRecurringDepositProductsPage) { setTimeout(() => { this.showPopover( this.templateButtonCreateRecurringProduct, @@ -148,7 +148,7 @@ export class RecurringDepositProductsComponent implements OnInit, AfterViewInit }); } - if (this.configurationWizardService.showRecurringDepositProductsList === true) { + if (this.configurationWizardService.showRecurringDepositProductsList) { setTimeout(() => { this.showPopover(this.templateRecurringProductsTable, this.recurringProductsTable.nativeElement, 'top', true); }); diff --git a/src/app/products/saving-products/saving-products.component.ts b/src/app/products/saving-products/saving-products.component.ts index 02892cbf1..2a69b19ce 100644 --- a/src/app/products/saving-products/saving-products.component.ts +++ b/src/app/products/saving-products/saving-products.component.ts @@ -104,13 +104,13 @@ export class SavingProductsComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showSavingsProductsPage === true) { + if (this.configurationWizardService.showSavingsProductsPage) { setTimeout(() => { this.showPopover(this.templateButtonSavingProduct, this.buttonSavingProduct.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showSavingsProductsList === true) { + if (this.configurationWizardService.showSavingsProductsList) { setTimeout(() => { this.showPopover(this.templateSavingProductTable, this.savingProductTable.nativeElement, 'top', true); }); diff --git a/src/app/products/share-products/share-products.component.ts b/src/app/products/share-products/share-products.component.ts index 8055fa1fa..8402b3374 100644 --- a/src/app/products/share-products/share-products.component.ts +++ b/src/app/products/share-products/share-products.component.ts @@ -105,7 +105,7 @@ export class ShareProductsComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showShareProductsPage === true) { + if (this.configurationWizardService.showShareProductsPage) { setTimeout(() => { this.showPopover( this.templateButtonCreateShareProduct, @@ -116,7 +116,7 @@ export class ShareProductsComponent implements OnInit, AfterViewInit { }); } - if (this.configurationWizardService.showShareProductsList === true) { + if (this.configurationWizardService.showShareProductsList) { setTimeout(() => { this.showPopover(this.templateShareProductsTable, this.shareProductsTable.nativeElement, 'top', true); }); diff --git a/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts b/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts index c9976c5ab..3b33b7032 100644 --- a/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts +++ b/src/app/savings/saving-account-actions/add-charge-savings-account/add-charge-savings-account.component.ts @@ -146,7 +146,7 @@ export class AddChargeSavingsAccountComponent implements OnInit { savingsCharge.feeInterval = this.chargeDetails.feeInterval; } if (this.chargeDetails.dueDateNotRequired !== true) { - if (this.chargeDetails.chargeTimeTypeAnnualOrMonth === true) { + if (this.chargeDetails.chargeTimeTypeAnnualOrMonth) { const monthDayFormat = 'MMMM-dd'; // TODO: Update once language and date settings are setup savingsCharge.monthDayFormat = monthDayFormat; if (savingsCharge.feeOnMonthDay) { diff --git a/src/app/system/codes/codes.component.ts b/src/app/system/codes/codes.component.ts index 0b9e5d2d1..acea14230 100644 --- a/src/app/system/codes/codes.component.ts +++ b/src/app/system/codes/codes.component.ts @@ -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); }); diff --git a/src/app/system/codes/create-code/create-code.component.ts b/src/app/system/codes/create-code/create-code.component.ts index d127e6e6d..e933d4f34 100644 --- a/src/app/system/codes/create-code/create-code.component.ts +++ b/src/app/system/codes/create-code/create-code.component.ts @@ -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); }); diff --git a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts index 573f76330..80a29ad45 100644 --- a/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts +++ b/src/app/system/configurations/global-configurations-tab/global-configurations-tab.component.ts @@ -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); }); diff --git a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts index 216000812..51234802b 100644 --- a/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts +++ b/src/app/system/configure-maker-checker-tasks/configure-maker-checker-tasks.component.ts @@ -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); }); diff --git a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts index 7b4118fa6..a516aaebc 100644 --- a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts +++ b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts @@ -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); }); diff --git a/src/app/system/manage-data-tables/manage-data-tables.component.ts b/src/app/system/manage-data-tables/manage-data-tables.component.ts index 0d3812d9c..68984deb9 100644 --- a/src/app/system/manage-data-tables/manage-data-tables.component.ts +++ b/src/app/system/manage-data-tables/manage-data-tables.component.ts @@ -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); }); diff --git a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts index 3fbc86956..b16492faa 100644 --- a/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts +++ b/src/app/system/manage-jobs/scheduler-jobs/manage-scheduler-jobs.component.ts @@ -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); }); diff --git a/src/app/system/manage-reports/manage-reports.component.ts b/src/app/system/manage-reports/manage-reports.component.ts index e4d01b48c..f9ce8facf 100644 --- a/src/app/system/manage-reports/manage-reports.component.ts +++ b/src/app/system/manage-reports/manage-reports.component.ts @@ -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); }); diff --git a/src/app/system/roles-and-permissions/roles-and-permissions.component.ts b/src/app/system/roles-and-permissions/roles-and-permissions.component.ts index 7036d27ac..5aac5676f 100644 --- a/src/app/system/roles-and-permissions/roles-and-permissions.component.ts +++ b/src/app/system/roles-and-permissions/roles-and-permissions.component.ts @@ -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, diff --git a/src/app/system/system.component.ts b/src/app/system/system.component.ts index 033ad1545..ce1a9ac91 100644 --- a/src/app/system/system.component.ts +++ b/src/app/system/system.component.ts @@ -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); }); diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts index e9dd7ba17..f59a09dfc 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component.ts @@ -230,7 +230,7 @@ export class LoanApprovalComponent { this.tasksService.getAllLoansToBeApproved().subscribe((response: any) => { this.loans = response.pageItems; this.loans = this.loans.filter((account: any) => { - return account.status.waitingForDisbursal === true; + return account.status.waitingForDisbursal; }); this.dataSource = new MatTableDataSource(this.loans); this.selection = new SelectionModel(true, []); diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts index abdb77592..f2bfcd804 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component.ts @@ -177,7 +177,7 @@ export class LoanDisbursalComponent { this.tasksService.getAllLoansToBeDisbursed().subscribe((response: any) => { this.loans = response.pageItems; this.loans = this.loans.filter((account: any) => { - return account.status.waitingForDisbursal === true; + return account.status.waitingForDisbursal; }); this.dataSource = new MatTableDataSource(this.loans); this.selection = new SelectionModel(true, []); diff --git a/src/app/users/create-user/create-user.component.ts b/src/app/users/create-user/create-user.component.ts index e2f8da9e1..6a0884830 100644 --- a/src/app/users/create-user/create-user.component.ts +++ b/src/app/users/create-user/create-user.component.ts @@ -187,7 +187,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit { delete user.staffId; } this.usersService.createUser(user).subscribe((response: any) => { - if (this.configurationWizardService.showUsersForm === true) { + if (this.configurationWizardService.showUsersForm) { this.configurationWizardService.showUsersForm = false; this.openDialog(); } else { @@ -222,7 +222,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showUsersForm === true) { + if (this.configurationWizardService.showUsersForm) { setTimeout(() => { this.showPopover(this.templateUserFormRef, this.userFormRef.nativeElement, 'top', true); }); diff --git a/src/app/users/users.component.ts b/src/app/users/users.component.ts index 88beb84a3..5a5aaf8a1 100644 --- a/src/app/users/users.component.ts +++ b/src/app/users/users.component.ts @@ -150,13 +150,13 @@ export class UsersComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showUsers === true) { + if (this.configurationWizardService.showUsers) { setTimeout(() => { this.showPopover(this.templateButtonCreateUser, this.buttonCreateUser.nativeElement, 'bottom', true); }); } - if (this.configurationWizardService.showUsersList === true) { + if (this.configurationWizardService.showUsersList) { setTimeout(() => { this.showPopover(this.templateUsersTable, this.usersTable.nativeElement, 'top', true); }); diff --git a/src/app/zitadel/users/create-user/create-user.component.ts b/src/app/zitadel/users/create-user/create-user.component.ts index 6f4ef9e15..ac3b30088 100644 --- a/src/app/zitadel/users/create-user/create-user.component.ts +++ b/src/app/zitadel/users/create-user/create-user.component.ts @@ -265,7 +265,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit { if (selectedRoleIds?.length > 0) { this.usersService.assignRolesToUser(userId, selectedRoleIds).subscribe( () => { - if (this.configurationWizardService.showUsersForm === true) { + if (this.configurationWizardService.showUsersForm) { this.configurationWizardService.showUsersForm = false; this.openDialog(); } else { @@ -310,7 +310,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit { * To show popover. */ ngAfterViewInit() { - if (this.configurationWizardService.showUsersForm === true) { + if (this.configurationWizardService.showUsersForm) { setTimeout(() => { this.showPopover(this.templateUserFormRef, this.userFormRef.nativeElement, 'top', true); });