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

Date advanced filter rhp, empty #94

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
5 changes: 5 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ const ROUTES = {
getRoute: (query: string) => `search/${query}/filters` as const,
},

SEARCH_ADVANCED_FILTERS_DATE: {
route: '/search/filters/date',
getRoute: () => `search/filters/date` as const,
},

SEARCH_REPORT: {
route: '/search/:query/view/:reportID',
getRoute: (query: string, reportID: string) => `search/${query}/view/${reportID}` as const,
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const SCREENS = {
TRAVEL: 'Travel',
SEARCH_REPORT: 'SearchReport',
SEARCH_ADVANCED_FILTERS: 'SearchAdvancedFilters',
SEARCH_ADVANCES_FILTER_DATE: 'SearchAdvancedFilterDate',
Kicu marked this conversation as resolved.
Show resolved Hide resolved
SETTINGS_CATEGORIES: 'SettingsCategories',
RESTRICTED_ACTION: 'RestrictedAction',
},
Expand Down
7 changes: 7 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3479,6 +3479,13 @@ export default {
noOptionsAvailable: 'No options available for the selected group of expenses.',
},
filtersHeader: 'Filters',
filters: {
date: {
header: 'Date',
Kicu marked this conversation as resolved.
Show resolved Hide resolved
before: 'Before',
after: 'After',
},
},
},
genericErrorPage: {
title: 'Uh-oh, something went wrong!',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3530,6 +3530,13 @@ export default {
noOptionsAvailable: 'No hay opciones disponibles para el grupo de gastos seleccionado.',
},
filtersHeader: 'Filtros',
filters: {
date: {
header: 'Fecha',
before: 'Antes',
after: 'Después',
},
},
},
genericErrorPage: {
title: '¡Oh-oh, algo salió mal!',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import type {
TravelNavigatorParamList,
WalletStatementNavigatorParamList,
} from '@navigation/types';
import SearchAdvancedFiltersPage from '@pages/Search/SearchAdvancedFiltersPage';
import type {ThemeStyles} from '@styles/index';
import type {Screen} from '@src/SCREENS';
import SCREENS from '@src/SCREENS';
Expand Down Expand Up @@ -494,6 +493,7 @@ const SearchReportModalStackNavigator = createModalStackNavigator<SearchReportPa

const SearchAdvancedFiltersModalStackNavigator = createModalStackNavigator<SearchAdvancedFiltersParamList>({
[SCREENS.SEARCH.ADVANCED_FILTERS_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchAdvancedFiltersPage').default,
[SCREENS.RIGHT_MODAL.SEARCH_ADVANCES_FILTER_DATE]: () => require<ReactComponentModule>('../../../../pages/Search/SearchAdvancedFilterDate').default,
});

const RestrictedActionModalStackNavigator = createModalStackNavigator<SearchReportParamList>({
Expand Down
1 change: 1 addition & 0 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ const config: LinkingOptions<RootStackParamList>['config'] = {
[SCREENS.RIGHT_MODAL.SEARCH_ADVANCED_FILTERS]: {
screens: {
[SCREENS.SEARCH.ADVANCED_FILTERS_RHP]: ROUTES.SEARCH_ADVANCED_FILTERS.route,
[SCREENS.RIGHT_MODAL.SEARCH_ADVANCES_FILTER_DATE]: ROUTES.SEARCH_ADVANCED_FILTERS_DATE.route,
},
},
[SCREENS.RIGHT_MODAL.RESTRICTED_ACTION]: {
Expand Down
32 changes: 32 additions & 0 deletions src/pages/Search/SearchAdvancedFilterDate.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import {View} from 'react-native';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import Text from '@src/components/Text';

function SearchAdvancedFilterDate() {
Kicu marked this conversation as resolved.
Show resolved Hide resolved
const styles = useThemeStyles();
const {translate} = useLocalize();

return (
<ScreenWrapper
testID={SearchAdvancedFilterDate.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
>
<FullPageNotFoundView shouldShow={false}>
<HeaderWithBackButton title={translate('search.filters.date.header')} />
<View style={[styles.flex1]}>
<Text>Here will be search advanced filter: Date</Text>
</View>
</FullPageNotFoundView>
</ScreenWrapper>
);
}

SearchAdvancedFilterDate.displayName = 'SearchAdvancedFilterDate';

export default SearchAdvancedFilterDate;
Loading