Skip to content

Commit

Permalink
feat: Deprecate older pages for my view report and view team report p…
Browse files Browse the repository at this point in the history
…ages (#2668)

* Deprecate older pages for my view report and view team report pages

* fix tests

* minor

* minor

* adjust branches coverage

* fix coveragte
  • Loading branch information
arjunaj5 authored Jan 14, 2024
1 parent 44417f3 commit 563fddd
Show file tree
Hide file tree
Showing 52 changed files with 383 additions and 6,630 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
if (( $(echo "$lines < 96.83" | bc -l) || \
$(echo "$statements < 96.8" | bc -l) || \
$(echo "$branches < 95.0" | bc -l) || \
$(echo "$branches < 94.93" | bc -l) || \
$(echo "$functions < 95.77" | bc -l) )); then
echo "Code Coverage Percentage is below 95%"
exit 1
Expand Down
2 changes: 0 additions & 2 deletions src/app/core/models/org-settings.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ export interface OrgSettingsResponse {
enable_advances?: boolean;
enable_org_creation?: boolean;
enable_auto_report?: boolean;
mobile_app_view_report_beta_enabled?: boolean;

mileage_details?: MileageDetails;
policy_settings?: PolicySettings;
Expand Down Expand Up @@ -555,6 +554,5 @@ export interface OrgSettings {
mastercard_enrollment_settings?: CommonOrgSettings;
company_expenses_beta_settings?: CommonOrgSettings;
simplified_report_closure_settings?: CommonOrgSettings;
mobile_app_view_report_beta_enabled?: boolean;
mobile_app_my_expenses_beta_enabled?: boolean;
}
6 changes: 1 addition & 5 deletions src/app/core/services/org-settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ export class OrgSettingsService {
}

isBetaPageEnabledForPath(currentPath: string): Observable<boolean> {
const pathSettingsFlagMap = {
my_view_report: 'mobile_app_view_report_beta_enabled',
view_team_report: 'mobile_app_view_report_beta_enabled',
};
const pathSettingsFlagMap = {};
const featureFlag = pathSettingsFlagMap[currentPath] as string;
return this.get().pipe(map((orgSettings: OrgSettings) => orgSettings[featureFlag] as boolean));
}
Expand Down Expand Up @@ -408,7 +405,6 @@ export class OrgSettingsService {
allowed: incoming?.simplified_report_closure_settings?.allowed,
enabled: incoming?.simplified_report_closure_settings?.enabled,
},
mobile_app_view_report_beta_enabled: incoming.mobile_app_view_report_beta_enabled,
mobile_app_my_expenses_beta_enabled: incoming?.mobile_app_my_expenses_beta_enabled,
};

Expand Down
2 changes: 0 additions & 2 deletions src/app/core/test-data/org-settings.service.spec.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const orgSettingsGetData: OrgSettings = {
electric_car_distance_limit: null,
enable_individual_mileage_rates: true,
},
mobile_app_view_report_beta_enabled: true,
advances: {
allowed: true,
enabled: true,
Expand Down Expand Up @@ -445,7 +444,6 @@ export const orgSettingsPostData: OrgSettingsResponse = {
allowed: true,
enabled: true,
},
mobile_app_view_report_beta_enabled: true,
advanced_project_settings: {
allowed: true,
enabled: true,
Expand Down
11 changes: 0 additions & 11 deletions src/app/fyle/fyle-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const routes: Routes = [
{
path: 'my_view_report',
loadChildren: () => import('./my-view-report/my-view-report.module').then((m) => m.MyViewReportPageModule),
canActivate: [BetaPageFeatureFlagGuard],
},
{
path: 'my_view_report_beta',
loadChildren: () => import('./my-view-report/my-view-report-v2.module').then((m) => m.MyViewReportV2PageModule),
},
{
path: 'help',
Expand All @@ -62,12 +57,6 @@ const routes: Routes = [
{
path: 'view_team_report',
loadChildren: () => import('./view-team-report/view-team-report.module').then((m) => m.ViewTeamReportPageModule),
canActivate: [BetaPageFeatureFlagGuard],
},
{
path: 'view_team_report_beta',
loadChildren: () =>
import('./view-team-report/view-team-report-v2.module').then((m) => m.ViewTeamReportPageV2Module),
},
{
path: 'my_view_advance',
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 563fddd

Please sign in to comment.