Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: removed old my-expenses page (deprecation) #2814

Merged
merged 5 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/core/mock-data/expense-filters.data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExpenseFilters } from 'src/app/fyle/my-expenses/expense-filters.model';
import { ExpenseFilters } from 'src/app/fyle/my-expenses-v2/my-expenses-filters.model';
import { DateFilters } from 'src/app/shared/components/fy-filters/date-filters.enum';
import { ExpenseType } from '../enums/expense-type.enum';
import { FilterState } from '../enums/filter-state.enum';
Expand Down
10 changes: 0 additions & 10 deletions src/app/core/mock-data/modal-controller.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { CreateNewReportComponent as createReportV2 } from 'src/app/shared/compo
import { CreateNewReportComponent } from 'src/app/shared/components/create-new-report/create-new-report.component';
import { Mode } from '@ionic/core';
import { fyModalProperties } from './model-properties.data';
import { AddTxnToReportDialogComponent } from 'src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component';
import { AddTxnToReportDialogComponent as v2 } from 'src/app/fyle/my-expenses-v2/add-txn-to-report-dialog/add-txn-to-report-dialog.component';
import { PopupAlertComponent } from 'src/app/shared/components/popup-alert/popup-alert.component';
import { FilterOptions } from 'src/app/shared/components/fy-filters/filter-options.interface';
Expand Down Expand Up @@ -75,15 +74,6 @@ export const newReportModalParams2 = {
...fyModalProperties,
};

export const addExpenseToReportModalParams = {
component: AddTxnToReportDialogComponent,
componentProps: {
txId: '12345',
},
mode: <Mode>'ios',
...fyModalProperties,
};

export const addExpenseToReportModalParams2 = {
component: v2,
componentProps: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PaymentModeSummary } from 'src/app/core/models/payment-mode-summary.mod
import { AccountType } from 'src/app/core/models/platform/v1/account.model';
import { Expense } from 'src/app/core/models/platform/v1/expense.model';
import { GetExpenseQueryParam } from 'src/app/core/models/platform/v1/get-expenses-query.model';
import { ExpenseFilters } from 'src/app/fyle/my-expenses/expense-filters.model';
import { ExpenseFilters } from 'src/app/fyle/my-expenses-v2/my-expenses-filters.model';
import { DateFilters } from 'src/app/shared/components/fy-filters/date-filters.enum';
import { DateService } from '../../../date.service';

Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/tracking.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
EnrollingNonRTFCardProperties,
} from '../models/tracking-properties.model';
import { ExpenseView } from '../models/expense-view.enum';
import { ExpenseFilters } from 'src/app/fyle/my-expenses/expense-filters.model';
import { ExpenseFilters } from 'src/app/fyle/my-expenses-v2/my-expenses-filters.model';
import { ReportFilters } from 'src/app/fyle/my-expenses-v2/my-expenses-filters.model';
import { TaskFilters } from '../models/task-filters.model';
import { OrgCategory } from '../models/v1/org-category.model';
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/transaction.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { UserEventService } from './user-event.service';
import { UndoMerge } from '../models/undo-merge.model';
import { cloneDeep } from 'lodash';
import { DateFilters } from 'src/app/shared/components/fy-filters/date-filters.enum';
import { ExpenseFilters } from 'src/app/fyle/my-expenses/expense-filters.model';
import { ExpenseFilters } from 'src/app/fyle/my-expenses-v2/my-expenses-filters.model';
import { PAGINATION_SIZE } from 'src/app/constants';
import { PaymentModesService } from './payment-modes.service';
import { OrgSettingsService } from './org-settings.service';
Expand Down
9 changes: 0 additions & 9 deletions src/app/fyle/fyle-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ const routes: Routes = [
path: 'my_expenses_v2',
loadChildren: () => import('./my-expenses-v2/my-expenses-v2.module').then((m) => m.MyExpensesV2PageModule),
},
{
path: 'my_expenses',
loadChildren: () => import('./my-expenses/my-expenses.module').then((m) => m.MyExpensesPageModule),
canActivate: [MyExpensesGuardGuard],
},
{
path: 'my_advances',
loadChildren: () => import('./my-advances/my-advances.module').then((m) => m.MyAdvancesPageModule),
Expand Down Expand Up @@ -142,10 +137,6 @@ const routes: Routes = [
loadChildren: () =>
import('./manage-corporate-cards/manage-corporate-cards.module').then((m) => m.ManageCorporateCardsPageModule),
},
{
path: 'my-expenses',
loadChildren: () => import('./my-expenses/my-expenses.module').then((m) => m.MyExpensesPageModule),
},
];

export const fyleRoutes = routes;
Expand Down
10 changes: 10 additions & 0 deletions src/app/fyle/my-expenses-v2/my-expenses-filters.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ export type ReportFilters = Partial<{
cardNumbers: string[];
splitExpense: string;
}>;

export interface ExpenseFilters extends Omit<Filters, 'state'> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one interface per file
Can you check if there is a eslint rule for this? We should enforce this

state: string | string[];
cardNumbers: string[];
splitExpense: string;
tx_receipt_required: string;
tx_policy_flag: string;
tx_policy_amount: string;
or: string;
}
1 change: 0 additions & 1 deletion src/app/fyle/my-expenses-v2/my-expenses-v2.page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import {
expectedCurrentParamsWoFilterState,
} from 'src/app/core/mock-data/get-expenses-query-params-with-filters.data';
import {
addExpenseToReportModalParams,
addExpenseToReportModalParams2,
modalControllerParams,
modalControllerParams2,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading