Skip to content

Commit 2456195

Browse files
Merged PR 40306: Create parking module
Create parking module Related work items: #138230
2 parents 6497d4d + 119c780 commit 2456195

File tree

8 files changed

+51
-2
lines changed

8 files changed

+51
-2
lines changed

src/components/ui/media/svgIcons.ts

+4
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ export const SvgIconsConfig = {
174174
'organic-waste-container': {
175175
path: 'M23.2 4.8C22.9 2.1 19.6 0 15.7 0S8.5 2.2 8.1 4.8H7V30H3.9v2h24v-2h-3.2V4.8h-1.5zM12.3 2.4h6.9v6.9h-6.9V2.4zM22.7 29H9V12.6h13.7V29z',
176176
},
177+
parking: {
178+
path: 'M4.5 2.5C3.39543 2.5 2.5 3.39543 2.5 4.5V19.5C2.5 20.6046 3.39543 21.5 4.5 21.5H19.5C20.6046 21.5 21.5 20.6046 21.5 19.5V4.5C21.5 3.39543 20.6046 2.5 19.5 2.5H4.5ZM8 6V18H10.4278V13.9385H12.9905C15.3447 13.9385 17 12.2954 17 9.96923C17 7.64308 15.3447 6 12.9905 6H8ZM12.7881 11.9631H10.4278V7.97538H12.7881C13.8549 7.97538 14.5538 8.76923 14.5538 9.96923C14.5538 11.1877 13.8549 11.9631 12.7881 11.9631Z',
179+
viewBox: '0 0 24 24',
180+
},
177181
person: {
178182
path: 'M31 32H1v-2.5c0-7.5 4.2-10 10-10h10c5.8 0 10 2.5 10 10V32ZM16 17a7.6 7.6 0 0 0 7.5-7.5 7.5 7.5 0 0 0-15 0A7.6 7.6 0 0 0 16 17Z',
179183
},

src/modules/modules.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {contactModule} from '@/modules/contact'
99
import {homeModule} from '@/modules/home'
1010
import {notificationHistoryModule} from '@/modules/notification-history'
1111
import {onboardingModule} from '@/modules/onboarding'
12+
import {parkingModule} from '@/modules/parking'
1213
import {redirectsModule} from '@/modules/redirects'
1314
import {reportProblemModule} from '@/modules/report-problem'
1415
import {userModule} from '@/modules/user'
@@ -36,9 +37,10 @@ export const clientModules = [
3637
constructionWorkEditorModule,
3738
constructionWorkModule,
3839
contactModule,
39-
wasteContainerModule,
40+
notificationHistoryModule,
41+
parkingModule,
4042
redirectsModule,
4143
reportProblemModule,
44+
wasteContainerModule,
4245
wasteGuideModule,
43-
notificationHistoryModule,
4446
]

src/modules/parking/Stack.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {createStackNavigator} from '@/app/navigation/createStackNavigator'
2+
import {RootStackParams} from '@/app/navigation/types'
3+
import {useScreenOptions} from '@/app/navigation/useScreenOptions'
4+
import {ParkingRouteName} from '@/modules/parking/routes'
5+
import {ParkingScreen} from '@/modules/parking/screens/Parking.screen'
6+
7+
const Stack = createStackNavigator<RootStackParams>()
8+
9+
export const ParkingStack = () => {
10+
const screenOptions = useScreenOptions()
11+
12+
return (
13+
<Stack.Navigator screenOptions={screenOptions}>
14+
<Stack.Screen
15+
component={ParkingScreen}
16+
name={ParkingRouteName.parking}
17+
/>
18+
</Stack.Navigator>
19+
)
20+
}

src/modules/parking/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {ModuleSlug} from '@/modules/slugs'
2+
import {type ModuleClientConfig} from '@/modules/types'
3+
4+
export const parkingModule: ModuleClientConfig = {
5+
name: 'ParkingModule',
6+
slug: ModuleSlug.parking,
7+
}

src/modules/parking/routes.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export enum ParkingRouteName {
2+
parking = 'Parking',
3+
}
4+
5+
export type ParkingStackParams = {
6+
[ParkingRouteName.parking]: undefined
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import {Title} from '@/components/ui/text/Title'
2+
3+
export const ParkingScreen = () => <Title text="Parking" />

src/modules/slugs.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export enum ModuleSlug {
1010
home = 'home',
1111
'notification-history' = 'notification-history',
1212
onboarding = 'onboarding',
13+
parking = 'parking',
1314
redirects = 'redirects',
1415
'report-problem' = 'report-problem',
1516
user = 'user',

src/modules/stacks.ts

+5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ import {
5454
OnboardingRouteName,
5555
OnboardingStackParams,
5656
} from '@/modules/onboarding/routes'
57+
import {ParkingStack} from '@/modules/parking/Stack'
58+
import {ParkingRouteName, ParkingStackParams} from '@/modules/parking/routes'
5759
import {RedirectsStack} from '@/modules/redirects/Stack'
5860
import {
5961
RedirectsRouteName,
@@ -100,6 +102,7 @@ export type ModuleRoutes =
100102
| ContactRouteName
101103
| HomeRouteName
102104
| OnboardingRouteName
105+
| ParkingRouteName
103106
| WasteContainerRouteName
104107
| RedirectsRouteName
105108
| ReportProblemRouteName
@@ -115,6 +118,7 @@ export type ModuleStackParams = AboutStackParams &
115118
ContactStackParams &
116119
HomeStackParams &
117120
OnboardingStackParams &
121+
ParkingStackParams &
118122
WasteContainerStackParams &
119123
RedirectsStackParams &
120124
ReportProblemStackParams &
@@ -133,6 +137,7 @@ const stacks: Record<ModuleSlug, ComponentType<unknown>> = {
133137
[ModuleSlug.home]: HomeStack,
134138
[ModuleSlug['notification-history']]: NotificationHistoryStack,
135139
[ModuleSlug.onboarding]: OnboardingStack,
140+
[ModuleSlug.parking]: ParkingStack,
136141
[ModuleSlug['waste-container']]: WasteContainerStack,
137142
[ModuleSlug['report-problem']]: ReportProblemStack,
138143
[ModuleSlug.user]: UserStack,

0 commit comments

Comments
 (0)