diff --git a/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts b/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts index 0cde542b58..7fe924739e 100644 --- a/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts +++ b/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts @@ -1587,6 +1587,12 @@ export class AddEditMileagePage implements OnInit { this.mileageConfig$ = orgSettings$.pipe(map((orgSettings) => orgSettings.mileage)); this.isAdvancesEnabled$ = this.checkAdvanceEnabled(orgSettings$); + this.isProjectCategoryRestrictionsEnabled$ = orgSettings$.pipe( + map( + (orgSettings) => + orgSettings.advanced_projects?.allowed && orgSettings.advanced_projects.enable_category_restriction + ) + ); this.checkNewReportsFlow(orgSettings$); @@ -1661,13 +1667,6 @@ export class AddEditMileagePage implements OnInit { this.isProjectsEnabled$ = orgSettings$.pipe(map((orgSettings) => !!orgSettings.projects?.enabled)); - this.isProjectCategoryRestrictionsEnabled$ = orgSettings$.pipe( - map( - (orgSettings) => - orgSettings.advanced_projects?.allowed && orgSettings.advanced_projects.enable_category_restriction - ) - ); - this.customInputs$ = this.getCustomInputs(); this.isCostCentersEnabled$ = orgSettings$.pipe(map((orgSettings) => orgSettings.cost_centers.enabled)); diff --git a/src/app/fyle/add-edit-per-diem/add-edit-per-diem.page.ts b/src/app/fyle/add-edit-per-diem/add-edit-per-diem.page.ts index 4011a1e399..0ae8df0c0b 100644 --- a/src/app/fyle/add-edit-per-diem/add-edit-per-diem.page.ts +++ b/src/app/fyle/add-edit-per-diem/add-edit-per-diem.page.ts @@ -1005,6 +1005,13 @@ export class AddEditPerDiemPage implements OnInit { ) ); + this.isProjectCategoryRestrictionsEnabled$ = orgSettings$.pipe( + map( + (orgSettings) => + orgSettings.advanced_projects.allowed && orgSettings.advanced_projects.enable_category_restriction + ) + ); + this.individualPerDiemRatesEnabled$ = orgSettings$.pipe( map((orgSettings) => orgSettings.per_diem.enable_individual_per_diem_rates) ); @@ -1126,13 +1133,6 @@ export class AddEditPerDiemPage implements OnInit { map((orgSettings) => orgSettings.projects && orgSettings.projects.enabled) ); - this.isProjectCategoryRestrictionsEnabled$ = orgSettings$.pipe( - map( - (orgSettings) => - orgSettings.advanced_projects.allowed && orgSettings.advanced_projects.enable_category_restriction - ) - ); - this.customInputs$ = this.getCustomInputs(); this.isCostCentersEnabled$ = orgSettings$.pipe(map((orgSettings) => orgSettings.cost_centers.enabled));