-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
87 lines (81 loc) · 2.14 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import React from 'react';
import {Root, StyleProvider} from 'native-base';
import {
createSwitchNavigator,
createStackNavigator,
createAppContainer,
createDrawerNavigator,
} from 'react-navigation';
import getTheme from './native-base-theme/components';
import {LoginScreen, ForgotScreen, RecoverScreen} from './src/Auth';
import {
JobsListScreen,
JobDetailsScreen,
JobHistoryScreen,
PauseJobScreen,
CommentsScreen,
CloseJobScreen,
PdfScreen,
ImageScreen,
SignatureScreen,
SearchPartsScreen,
} from './src/Jobs';
import ProfileScreen from './src/Profile/ProfileScreen';
import AuthLoadingScreen from './src/AuthloadingScreen';
import JobAdminListScreen from './src/modules/admin/JobAdminListScreen';
import SideBar from './src/SideBar/SideBar';
import JobEditScreen from './src/Jobs/edit/JobEditScreen';
import JobCreateScreen from './src/Jobs/edit/JobCreateScreen';
import SearchEmployeeScreen from './src/Jobs/edit/SearchEmployeeScreen';
import SearchLocationScreen from './src/Jobs/edit/SearchLocationScreen';
const JobsStack = createStackNavigator({
Jobs: JobsListScreen,
JobDetails: JobDetailsScreen,
JobEdit: JobEditScreen,
JobCreate: JobCreateScreen,
JobHistory: JobHistoryScreen,
PauseJob: PauseJobScreen,
Comments: CommentsScreen,
CloseJob: CloseJobScreen,
Pdf: PdfScreen,
Image: ImageScreen,
Signature: SignatureScreen,
SearchParts: SearchPartsScreen,
SearchEmployee: SearchEmployeeScreen,
SearchLocation: SearchLocationScreen,
});
const AuthStack = createStackNavigator({
Login: LoginScreen,
Forgot: ForgotScreen,
Recover: RecoverScreen,
});
const AppDrawerMenu = createDrawerNavigator(
{
Jobs: JobsStack,
Profile: ProfileScreen,
Admin: JobAdminListScreen,
},
{
contentComponent: (props) => <SideBar {...props} />,
},
);
const AppNavigator = createAppContainer(
createSwitchNavigator(
{
AuthLoading: AuthLoadingScreen,
App: AppDrawerMenu,
Auth: AuthStack,
},
{
initialRouteName: 'AuthLoading',
},
),
);
const App = () => (
<Root>
<StyleProvider style={getTheme()}>
<AppNavigator />
</StyleProvider>
</Root>
);
export default App;