react-native-salespanda 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Salespanda.podspec +4 -0
- package/android/build.gradle +2 -0
- package/lib/module/SalespandaApp.js +22 -8
- package/lib/module/SalespandaApp.js.map +1 -1
- package/lib/module/assets/images/bottomtabs/analytics.png +0 -0
- package/lib/module/assets/images/bottomtabs/analyticsactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/crm.png +0 -0
- package/lib/module/assets/images/bottomtabs/crmactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/diary.png +0 -0
- package/lib/module/assets/images/bottomtabs/diaryactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/home.png +0 -0
- package/lib/module/assets/images/bottomtabs/homeactive.png +0 -0
- package/lib/module/assets/images/bottomtabs/notification.png +0 -0
- package/lib/module/assets/images/bottomtabs/notificationactive.png +0 -0
- package/lib/module/assets/images/index.js +35 -0
- package/lib/module/assets/images/index.js.map +1 -0
- package/lib/module/config/FlavorConfig.js +43 -0
- package/lib/module/config/FlavorConfig.js.map +1 -0
- package/lib/module/constants/Colors.js +17 -0
- package/lib/module/constants/Colors.js.map +1 -0
- package/lib/module/constants/GetPlatorm.js +23 -0
- package/lib/module/constants/GetPlatorm.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/AppNavigator.js +3 -1
- package/lib/module/navigation/AppNavigator.js.map +1 -1
- package/lib/module/navigation/BottomTabNavigator.js +71 -53
- package/lib/module/navigation/BottomTabNavigator.js.map +1 -1
- package/lib/module/navigation/DrawerNavigator.js +210 -129
- package/lib/module/navigation/DrawerNavigator.js.map +1 -1
- package/lib/module/screens/CRMScreen.js +41 -0
- package/lib/module/screens/CRMScreen.js.map +1 -0
- package/lib/module/screens/HomeScreen.js +82 -88
- package/lib/module/screens/HomeScreen.js.map +1 -1
- package/lib/module/screens/NotificationsScreen.js +11 -97
- package/lib/module/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/screens/ProfileScreen.js +13 -119
- package/lib/module/screens/ProfileScreen.js.map +1 -1
- package/lib/module/screens/ReportsScreen.js +11 -187
- package/lib/module/screens/ReportsScreen.js.map +1 -1
- package/lib/typescript/src/SalespandaApp.d.ts +1 -1
- package/lib/typescript/src/SalespandaApp.d.ts.map +1 -1
- package/lib/typescript/src/assets/images/index.d.ts +17 -0
- package/lib/typescript/src/assets/images/index.d.ts.map +1 -0
- package/lib/typescript/src/config/FlavorConfig.d.ts +20 -0
- package/lib/typescript/src/config/FlavorConfig.d.ts.map +1 -0
- package/lib/typescript/src/constants/Colors.d.ts +15 -0
- package/lib/typescript/src/constants/Colors.d.ts.map +1 -0
- package/lib/typescript/src/constants/GetPlatorm.d.ts +11 -0
- package/lib/typescript/src/constants/GetPlatorm.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +1 -1
- package/lib/typescript/src/screens/CRMScreen.d.ts +2 -0
- package/lib/typescript/src/screens/CRMScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/HomeScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts +1 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts.map +1 -1
- package/package.json +3 -1
- package/react-native.config.js +9 -0
- package/src/SalespandaApp.tsx +28 -8
- package/src/assets/images/bottomtabs/analytics.png +0 -0
- package/src/assets/images/bottomtabs/analyticsactive.png +0 -0
- package/src/assets/images/bottomtabs/crm.png +0 -0
- package/src/assets/images/bottomtabs/crmactive.png +0 -0
- package/src/assets/images/bottomtabs/diary.png +0 -0
- package/src/assets/images/bottomtabs/diaryactive.png +0 -0
- package/src/assets/images/bottomtabs/home.png +0 -0
- package/src/assets/images/bottomtabs/homeactive.png +0 -0
- package/src/assets/images/bottomtabs/notification.png +0 -0
- package/src/assets/images/bottomtabs/notificationactive.png +0 -0
- package/src/assets/images/index.js +11 -0
- package/src/assets/images/index.ts +40 -0
- package/src/config/FlavorConfig.ts +53 -0
- package/src/constants/Colors.ts +16 -0
- package/src/constants/GetPlatorm.ts +29 -0
- package/src/index.tsx +1 -1
- package/src/navigation/AppNavigator.tsx +5 -1
- package/src/navigation/BottomTabNavigator.tsx +79 -24
- package/src/navigation/DrawerNavigator.tsx +176 -127
- package/src/screens/CRMScreen.tsx +34 -0
- package/src/screens/HomeScreen.tsx +94 -81
- package/src/screens/NotificationsScreen.tsx +9 -110
- package/src/screens/ProfileScreen.tsx +10 -97
- package/src/screens/ReportsScreen.tsx +9 -166
- package/lib/module/screens/PremiumScreen.js +0 -222
- package/lib/module/screens/PremiumScreen.js.map +0 -1
- package/lib/typescript/src/screens/PremiumScreen.d.ts +0 -2
- package/lib/typescript/src/screens/PremiumScreen.d.ts.map +0 -1
- package/src/screens/PremiumScreen.tsx +0 -250
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const Colors = {
|
|
2
|
+
// Minimal palette as requested
|
|
3
|
+
primary: '#46bdd3',
|
|
4
|
+
white: '#ffffff',
|
|
5
|
+
black: '#322F2F',
|
|
6
|
+
background: '#ffffff',
|
|
7
|
+
border: '#e0e0e0',
|
|
8
|
+
divider: '#e0e0e0',
|
|
9
|
+
white50: 'rgba(255, 255, 255, 0.5)',
|
|
10
|
+
black50: 'rgba(0, 0, 0, 0.2)',
|
|
11
|
+
black30: 'rgba(0, 0, 0, 0.3)',
|
|
12
|
+
black20: 'rgba(0, 0, 0, 0.2)',
|
|
13
|
+
black10: 'rgba(0, 0, 0, 0.1)',
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
export type ColorKey = keyof typeof Colors;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns different values based on the platform
|
|
5
|
+
* @param value - Single value to use for both platforms, or object with platform specific values
|
|
6
|
+
* @param androidValue - Optional value for Android (if not provided, uses the same value for both platforms)
|
|
7
|
+
* @returns Platform specific value
|
|
8
|
+
*/
|
|
9
|
+
export const GetPlatform = <T>(
|
|
10
|
+
value: T | { ios: T; android: T },
|
|
11
|
+
androidValue?: T
|
|
12
|
+
): T => {
|
|
13
|
+
if (
|
|
14
|
+
value &&
|
|
15
|
+
typeof value === 'object' &&
|
|
16
|
+
'ios' in value &&
|
|
17
|
+
'android' in value
|
|
18
|
+
) {
|
|
19
|
+
return Platform.select({
|
|
20
|
+
ios: value.ios,
|
|
21
|
+
android: value.android,
|
|
22
|
+
}) as T;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return Platform.select({
|
|
26
|
+
ios: value as T,
|
|
27
|
+
android: androidValue ?? (value as T),
|
|
28
|
+
}) as T;
|
|
29
|
+
};
|
package/src/index.tsx
CHANGED
|
@@ -42,4 +42,4 @@ export { default as HomeScreen } from './screens/HomeScreen';
|
|
|
42
42
|
export { default as ProfileScreen } from './screens/ProfileScreen';
|
|
43
43
|
export { default as NotificationsScreen } from './screens/NotificationsScreen';
|
|
44
44
|
export { default as ReportsScreen } from './screens/ReportsScreen';
|
|
45
|
-
export { default as PremiumScreen } from './screens/
|
|
45
|
+
export { default as PremiumScreen } from './screens/CRMScreen';
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { NavigationContainer } from '@react-navigation/native';
|
|
2
2
|
import BottomTabNavigator from './BottomTabNavigator';
|
|
3
3
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
|
+
import { Colors } from '../constants/Colors';
|
|
4
5
|
|
|
5
6
|
export default function AppNavigator() {
|
|
6
7
|
return (
|
|
7
8
|
<NavigationContainer>
|
|
8
|
-
<SafeAreaView
|
|
9
|
+
<SafeAreaView
|
|
10
|
+
style={{ flex: 1, backgroundColor: Colors.background }}
|
|
11
|
+
edges={['bottom', 'top']}
|
|
12
|
+
>
|
|
9
13
|
<BottomTabNavigator />
|
|
10
14
|
</SafeAreaView>
|
|
11
15
|
</NavigationContainer>
|
|
@@ -1,65 +1,120 @@
|
|
|
1
1
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
2
|
-
import {
|
|
2
|
+
import { Image, View } from 'react-native';
|
|
3
3
|
import HomeScreen from '../screens/HomeScreen';
|
|
4
|
-
import PremiumScreen from '../screens/PremiumScreen';
|
|
5
4
|
import NotificationsScreen from '../screens/NotificationsScreen';
|
|
6
5
|
import ReportsScreen from '../screens/ReportsScreen';
|
|
6
|
+
import ProfileScreen from '../screens/ProfileScreen';
|
|
7
7
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
8
|
+
import { Colors } from '../constants/Colors';
|
|
9
|
+
import {
|
|
10
|
+
analyticsIcon,
|
|
11
|
+
analyticsIconActive,
|
|
12
|
+
crmIcon,
|
|
13
|
+
crmIconActive,
|
|
14
|
+
diaryIcon,
|
|
15
|
+
diaryIconActive,
|
|
16
|
+
homeIcon,
|
|
17
|
+
homeIconActive,
|
|
18
|
+
notificationIcon,
|
|
19
|
+
notificationIconActive,
|
|
20
|
+
} from '../assets/images';
|
|
21
|
+
import CRMScreen from '../screens/CRMScreen';
|
|
8
22
|
|
|
9
23
|
const Tab = createBottomTabNavigator();
|
|
10
24
|
|
|
11
25
|
export default function BottomTabNavigator() {
|
|
26
|
+
const renderImageIcon =
|
|
27
|
+
(inactive: any, active: any) =>
|
|
28
|
+
({ focused, size }: { focused: boolean; size: number }) => {
|
|
29
|
+
if (focused) {
|
|
30
|
+
return (
|
|
31
|
+
<View
|
|
32
|
+
style={{
|
|
33
|
+
width: 48,
|
|
34
|
+
height: 48,
|
|
35
|
+
borderRadius: 24,
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
borderWidth: 4,
|
|
39
|
+
borderColor: Colors.white,
|
|
40
|
+
transform: [{ translateY: -6 }],
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<Image
|
|
44
|
+
source={active}
|
|
45
|
+
resizeMode="contain"
|
|
46
|
+
style={{ width: 42, height: 42, tintColor: Colors.primary }}
|
|
47
|
+
/>
|
|
48
|
+
</View>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return (
|
|
52
|
+
<Image
|
|
53
|
+
source={inactive}
|
|
54
|
+
resizeMode="contain"
|
|
55
|
+
style={{ width: size, height: size, tintColor: Colors.black30 }}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
12
60
|
return (
|
|
13
|
-
<SafeAreaView
|
|
61
|
+
<SafeAreaView
|
|
62
|
+
style={{ flex: 1, backgroundColor: Colors.background }}
|
|
63
|
+
edges={['bottom']}
|
|
64
|
+
>
|
|
14
65
|
<Tab.Navigator
|
|
15
66
|
screenOptions={{
|
|
16
|
-
headerShown: false,
|
|
17
|
-
|
|
18
|
-
|
|
67
|
+
headerShown: false,
|
|
68
|
+
sceneStyle: { backgroundColor: Colors.background },
|
|
69
|
+
tabBarShowLabel: false,
|
|
19
70
|
tabBarStyle: {
|
|
20
71
|
borderTopWidth: 1,
|
|
21
|
-
borderTopColor:
|
|
22
|
-
|
|
72
|
+
borderTopColor: Colors.border,
|
|
73
|
+
backgroundColor: Colors.white,
|
|
74
|
+
paddingBottom: 10,
|
|
23
75
|
paddingTop: 8,
|
|
24
|
-
height:
|
|
76
|
+
height: 64,
|
|
25
77
|
},
|
|
78
|
+
tabBarItemStyle: { overflow: 'visible' },
|
|
26
79
|
}}
|
|
27
80
|
>
|
|
28
81
|
<Tab.Screen
|
|
29
82
|
name="Home"
|
|
30
83
|
component={HomeScreen}
|
|
31
84
|
options={{
|
|
32
|
-
tabBarIcon: (
|
|
33
|
-
<Text style={{ fontSize: size, color }}>🏠</Text>
|
|
34
|
-
),
|
|
85
|
+
tabBarIcon: renderImageIcon(homeIcon, homeIconActive),
|
|
35
86
|
headerShown: false,
|
|
36
87
|
}}
|
|
37
88
|
/>
|
|
38
89
|
<Tab.Screen
|
|
39
|
-
name="
|
|
40
|
-
component={
|
|
90
|
+
name="CRM"
|
|
91
|
+
component={CRMScreen}
|
|
41
92
|
options={{
|
|
42
|
-
tabBarIcon: (
|
|
43
|
-
|
|
44
|
-
|
|
93
|
+
tabBarIcon: renderImageIcon(crmIcon, crmIconActive),
|
|
94
|
+
}}
|
|
95
|
+
/>
|
|
96
|
+
<Tab.Screen
|
|
97
|
+
name="Reports"
|
|
98
|
+
component={ReportsScreen}
|
|
99
|
+
options={{
|
|
100
|
+
tabBarIcon: renderImageIcon(diaryIcon, diaryIconActive),
|
|
45
101
|
}}
|
|
46
102
|
/>
|
|
47
103
|
<Tab.Screen
|
|
48
104
|
name="Notifications"
|
|
49
105
|
component={NotificationsScreen}
|
|
50
106
|
options={{
|
|
51
|
-
tabBarIcon: (
|
|
52
|
-
|
|
107
|
+
tabBarIcon: renderImageIcon(
|
|
108
|
+
notificationIcon,
|
|
109
|
+
notificationIconActive
|
|
53
110
|
),
|
|
54
111
|
}}
|
|
55
112
|
/>
|
|
56
113
|
<Tab.Screen
|
|
57
|
-
name="
|
|
58
|
-
component={
|
|
114
|
+
name="Profile"
|
|
115
|
+
component={ProfileScreen}
|
|
59
116
|
options={{
|
|
60
|
-
tabBarIcon: (
|
|
61
|
-
<Text style={{ fontSize: size, color }}>📊</Text>
|
|
62
|
-
),
|
|
117
|
+
tabBarIcon: renderImageIcon(analyticsIcon, analyticsIconActive),
|
|
63
118
|
}}
|
|
64
119
|
/>
|
|
65
120
|
</Tab.Navigator>
|
|
@@ -9,20 +9,20 @@ import {
|
|
|
9
9
|
ScrollView,
|
|
10
10
|
} from 'react-native';
|
|
11
11
|
import BottomTabNavigator from './BottomTabNavigator';
|
|
12
|
+
import { Colors } from '../constants/Colors';
|
|
12
13
|
import ProfileScreen from '../screens/ProfileScreen';
|
|
14
|
+
import { GetPlatform } from '../constants/GetPlatorm';
|
|
13
15
|
|
|
14
16
|
const Drawer = createDrawerNavigator();
|
|
15
17
|
|
|
16
18
|
interface DrawerItemProps {
|
|
17
19
|
label: string;
|
|
18
|
-
icon: string;
|
|
19
20
|
onPress: () => void;
|
|
20
21
|
active?: boolean;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
const DrawerItem: React.FC<DrawerItemProps> = ({
|
|
24
25
|
label,
|
|
25
|
-
icon,
|
|
26
26
|
onPress,
|
|
27
27
|
active = false,
|
|
28
28
|
}) => {
|
|
@@ -31,7 +31,6 @@ const DrawerItem: React.FC<DrawerItemProps> = ({
|
|
|
31
31
|
style={[styles.drawerItem, active && styles.activeDrawerItem]}
|
|
32
32
|
onPress={onPress}
|
|
33
33
|
>
|
|
34
|
-
<Text style={styles.drawerIcon}>{icon}</Text>
|
|
35
34
|
<Text style={[styles.drawerLabel, active && styles.activeDrawerLabel]}>
|
|
36
35
|
{label}
|
|
37
36
|
</Text>
|
|
@@ -40,99 +39,118 @@ const DrawerItem: React.FC<DrawerItemProps> = ({
|
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
function CustomDrawerContent(props: any) {
|
|
43
|
-
const { navigation
|
|
44
|
-
const currentRoute = state.routes[state.index].name;
|
|
42
|
+
const { navigation } = props;
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<Text style={styles.drawerName}>John Doe</Text>
|
|
54
|
-
<Text style={styles.drawerEmail}>john.doe@example.com</Text>
|
|
55
|
-
</View>
|
|
56
|
-
|
|
57
|
-
<ScrollView style={styles.drawerContent}>
|
|
58
|
-
<DrawerItem
|
|
59
|
-
label="Home"
|
|
60
|
-
icon="🏠"
|
|
61
|
-
active={currentRoute === 'HomeTabs'}
|
|
62
|
-
onPress={() => navigation.navigate('HomeTabs')}
|
|
63
|
-
/>
|
|
64
|
-
<DrawerItem
|
|
65
|
-
label="Profile"
|
|
66
|
-
icon="👤"
|
|
67
|
-
active={currentRoute === 'Profile'}
|
|
68
|
-
onPress={() => navigation.navigate('Profile')}
|
|
69
|
-
/>
|
|
70
|
-
<DrawerItem
|
|
71
|
-
label="Social Setup"
|
|
72
|
-
icon="📢"
|
|
73
|
-
onPress={() => {
|
|
74
|
-
/* Add navigation */
|
|
75
|
-
}}
|
|
76
|
-
/>
|
|
77
|
-
<DrawerItem
|
|
78
|
-
label="Microsite Setup"
|
|
79
|
-
icon="⚙️"
|
|
80
|
-
onPress={() => {
|
|
81
|
-
/* Add navigation */
|
|
82
|
-
}}
|
|
83
|
-
/>
|
|
84
|
-
<DrawerItem
|
|
85
|
-
label="Proposal"
|
|
86
|
-
icon="📋"
|
|
87
|
-
onPress={() => {
|
|
88
|
-
/* Add navigation */
|
|
89
|
-
}}
|
|
90
|
-
/>
|
|
91
|
-
<DrawerItem
|
|
92
|
-
label="Email Campaign"
|
|
93
|
-
icon="📧"
|
|
94
|
-
onPress={() => {
|
|
95
|
-
/* Add navigation */
|
|
96
|
-
}}
|
|
97
|
-
/>
|
|
98
|
-
<DrawerItem
|
|
99
|
-
label="View Microsite"
|
|
100
|
-
icon="🎵"
|
|
101
|
-
onPress={() => {
|
|
102
|
-
/* Add navigation */
|
|
103
|
-
}}
|
|
104
|
-
/>
|
|
105
|
-
<DrawerItem
|
|
106
|
-
label="Import Contact"
|
|
107
|
-
icon="📄"
|
|
108
|
-
onPress={() => {
|
|
109
|
-
/* Add navigation */
|
|
110
|
-
}}
|
|
111
|
-
/>
|
|
44
|
+
const [expanded, setExpanded] = React.useState<Record<string, boolean>>({
|
|
45
|
+
'Campaign': false,
|
|
46
|
+
'Sales WAR Room': false,
|
|
47
|
+
'Pipeline': false,
|
|
48
|
+
});
|
|
49
|
+
const toggle = (key: string) =>
|
|
50
|
+
setExpanded((prev) => ({ ...prev, [key]: !prev[key] }));
|
|
112
51
|
|
|
113
|
-
|
|
52
|
+
const groups: Array<{
|
|
53
|
+
label: string;
|
|
54
|
+
children?: Array<{ label: string; onPress: () => void }>;
|
|
55
|
+
onPress?: () => void;
|
|
56
|
+
}> = [
|
|
57
|
+
{ label: 'Content Library', onPress: () => {} },
|
|
58
|
+
{
|
|
59
|
+
label: 'Campaign',
|
|
60
|
+
children: [
|
|
61
|
+
{ label: 'Run Campaign', onPress: () => {} },
|
|
62
|
+
{ label: 'List', onPress: () => {} },
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{ label: 'My Activity', onPress: () => {} },
|
|
66
|
+
{ label: 'DigiCard', onPress: () => {} },
|
|
67
|
+
{ label: 'My Profile', onPress: () => navigation.navigate('Profile') },
|
|
68
|
+
{
|
|
69
|
+
label: 'Sales WAR Room',
|
|
70
|
+
children: [
|
|
71
|
+
{ label: 'Forms & Brochures', onPress: () => {} },
|
|
72
|
+
{ label: 'CXO Announcements', onPress: () => {} },
|
|
73
|
+
{ label: 'Training/Sales Content', onPress: () => {} },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{ label: 'Tasks', onPress: () => {} },
|
|
77
|
+
{ label: 'Import Phone Contacts', onPress: () => {} },
|
|
78
|
+
{
|
|
79
|
+
label: 'Pipeline',
|
|
80
|
+
children: [
|
|
81
|
+
{ label: 'Leads', onPress: () => {} },
|
|
82
|
+
{ label: 'Contacts', onPress: () => {} },
|
|
83
|
+
{ label: 'Email Activity', onPress: () => {} },
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{ label: 'Notification', onPress: () => {} },
|
|
87
|
+
{ label: 'Settings', onPress: () => {} },
|
|
88
|
+
{ label: 'Help & Support', onPress: () => {} },
|
|
89
|
+
];
|
|
114
90
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
91
|
+
return (
|
|
92
|
+
<View style={styles.drawerContainer}>
|
|
93
|
+
<ScrollView
|
|
94
|
+
style={styles.drawerContent}
|
|
95
|
+
showsVerticalScrollIndicator={false}
|
|
96
|
+
>
|
|
97
|
+
<View style={styles.drawerHeader}>
|
|
98
|
+
<View style={styles.headerRow}>
|
|
99
|
+
<Image
|
|
100
|
+
source={{ uri: 'https://via.placeholder.com/80x80' }}
|
|
101
|
+
style={styles.drawerAvatar}
|
|
102
|
+
/>
|
|
103
|
+
<View style={styles.headerTextCol}>
|
|
104
|
+
<Text style={styles.drawerName}>Eduuu Parrtner</Text>
|
|
105
|
+
<TouchableOpacity style={styles.badgeButton}>
|
|
106
|
+
<Text style={styles.badgeText}>Go to Microsite</Text>
|
|
107
|
+
</TouchableOpacity>
|
|
108
|
+
</View>
|
|
109
|
+
</View>
|
|
110
|
+
</View>
|
|
111
|
+
{groups.map((group, index) => {
|
|
112
|
+
const hasChildren =
|
|
113
|
+
Array.isArray(group.children) && group.children.length > 0;
|
|
114
|
+
if (!hasChildren) {
|
|
115
|
+
return (
|
|
116
|
+
<View key={group.label}>
|
|
117
|
+
{index > 0 ? <View style={styles.drawerDivider} /> : null}
|
|
118
|
+
<DrawerItem
|
|
119
|
+
label={group.label}
|
|
120
|
+
onPress={group.onPress ?? (() => {})}
|
|
121
|
+
/>
|
|
122
|
+
</View>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
const isOpen = !!expanded[group.label];
|
|
126
|
+
return (
|
|
127
|
+
<View key={group.label}>
|
|
128
|
+
{index > 0 ? <View style={styles.drawerDivider} /> : null}
|
|
129
|
+
<TouchableOpacity
|
|
130
|
+
style={styles.drawerItem}
|
|
131
|
+
onPress={() => toggle(group.label)}
|
|
132
|
+
activeOpacity={0.7}
|
|
133
|
+
>
|
|
134
|
+
<Text style={[styles.drawerLabel, { flex: 1 }]}>
|
|
135
|
+
{group.label}
|
|
136
|
+
</Text>
|
|
137
|
+
<Text style={styles.chevron}>{isOpen ? '▾' : '▸'}</Text>
|
|
138
|
+
</TouchableOpacity>
|
|
139
|
+
{isOpen &&
|
|
140
|
+
group.children!.map((child, cIdx) => (
|
|
141
|
+
<View key={child.label}>
|
|
142
|
+
{cIdx > 0 ? <View style={styles.drawerDivider} /> : null}
|
|
143
|
+
<TouchableOpacity
|
|
144
|
+
style={styles.childItem}
|
|
145
|
+
onPress={child.onPress}
|
|
146
|
+
>
|
|
147
|
+
<Text style={styles.childLabel}>{child.label}</Text>
|
|
148
|
+
</TouchableOpacity>
|
|
149
|
+
</View>
|
|
150
|
+
))}
|
|
151
|
+
</View>
|
|
152
|
+
);
|
|
153
|
+
})}
|
|
136
154
|
</ScrollView>
|
|
137
155
|
</View>
|
|
138
156
|
);
|
|
@@ -144,17 +162,20 @@ export default function DrawerNavigator() {
|
|
|
144
162
|
drawerContent={(props) => <CustomDrawerContent {...props} />}
|
|
145
163
|
screenOptions={{
|
|
146
164
|
headerShown: true,
|
|
147
|
-
drawerType: 'slide',
|
|
148
|
-
swipeEdgeWidth: 100,
|
|
165
|
+
drawerType: 'slide',
|
|
166
|
+
swipeEdgeWidth: 100,
|
|
149
167
|
drawerStyle: {
|
|
150
168
|
width: 280,
|
|
169
|
+
backgroundColor: Colors.primary,
|
|
151
170
|
},
|
|
152
171
|
headerStyle: {
|
|
153
|
-
backgroundColor:
|
|
172
|
+
backgroundColor: Colors.white,
|
|
154
173
|
},
|
|
155
|
-
headerTintColor:
|
|
174
|
+
headerTintColor: Colors.primary,
|
|
175
|
+
headerTitleAlign: 'left',
|
|
156
176
|
headerTitleStyle: {
|
|
157
177
|
fontWeight: '600',
|
|
178
|
+
color: Colors.black,
|
|
158
179
|
},
|
|
159
180
|
}}
|
|
160
181
|
>
|
|
@@ -162,7 +183,7 @@ export default function DrawerNavigator() {
|
|
|
162
183
|
name="HomeTabs"
|
|
163
184
|
component={BottomTabNavigator}
|
|
164
185
|
options={{
|
|
165
|
-
title: '
|
|
186
|
+
title: 'Home Page',
|
|
166
187
|
}}
|
|
167
188
|
/>
|
|
168
189
|
<Drawer.Screen
|
|
@@ -179,32 +200,51 @@ export default function DrawerNavigator() {
|
|
|
179
200
|
const styles = StyleSheet.create({
|
|
180
201
|
drawerContainer: {
|
|
181
202
|
flex: 1,
|
|
182
|
-
backgroundColor:
|
|
203
|
+
backgroundColor: Colors.primary,
|
|
183
204
|
},
|
|
184
205
|
drawerHeader: {
|
|
185
|
-
backgroundColor:
|
|
186
|
-
|
|
187
|
-
paddingTop:
|
|
206
|
+
backgroundColor: Colors.primary,
|
|
207
|
+
paddingHorizontal: 20,
|
|
208
|
+
paddingTop: 36,
|
|
209
|
+
paddingBottom: 16,
|
|
210
|
+
alignItems: 'flex-start',
|
|
211
|
+
},
|
|
212
|
+
headerRow: {
|
|
213
|
+
width: '100%',
|
|
214
|
+
flexDirection: 'row',
|
|
188
215
|
alignItems: 'center',
|
|
216
|
+
marginTop: GetPlatform(20, 0),
|
|
189
217
|
},
|
|
190
218
|
drawerAvatar: {
|
|
191
|
-
width:
|
|
192
|
-
height:
|
|
219
|
+
width: 60,
|
|
220
|
+
height: 60,
|
|
193
221
|
borderRadius: 40,
|
|
194
|
-
|
|
195
|
-
borderWidth:
|
|
196
|
-
borderColor:
|
|
222
|
+
marginRight: 14,
|
|
223
|
+
borderWidth: 2,
|
|
224
|
+
borderColor: Colors.black30,
|
|
225
|
+
},
|
|
226
|
+
headerTextCol: {
|
|
227
|
+
flex: 1,
|
|
228
|
+
justifyContent: 'center',
|
|
197
229
|
},
|
|
198
230
|
drawerName: {
|
|
199
|
-
fontSize:
|
|
231
|
+
fontSize: 20,
|
|
200
232
|
fontWeight: '600',
|
|
201
|
-
color:
|
|
202
|
-
marginBottom:
|
|
233
|
+
color: Colors.white,
|
|
234
|
+
marginBottom: 10,
|
|
203
235
|
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
236
|
+
badgeButton: {
|
|
237
|
+
borderWidth: 1,
|
|
238
|
+
borderColor: Colors.white,
|
|
239
|
+
paddingHorizontal: 12,
|
|
240
|
+
paddingVertical: 6,
|
|
241
|
+
borderRadius: 16,
|
|
242
|
+
alignSelf: 'flex-start',
|
|
243
|
+
},
|
|
244
|
+
badgeText: {
|
|
245
|
+
color: Colors.white,
|
|
246
|
+
fontSize: 12,
|
|
247
|
+
fontWeight: '500',
|
|
208
248
|
},
|
|
209
249
|
drawerContent: {
|
|
210
250
|
flex: 1,
|
|
@@ -213,30 +253,39 @@ const styles = StyleSheet.create({
|
|
|
213
253
|
drawerItem: {
|
|
214
254
|
flexDirection: 'row',
|
|
215
255
|
alignItems: 'center',
|
|
216
|
-
padding:
|
|
256
|
+
padding: 10,
|
|
217
257
|
paddingHorizontal: 20,
|
|
218
258
|
},
|
|
219
259
|
activeDrawerItem: {
|
|
220
|
-
backgroundColor: '
|
|
221
|
-
borderLeftWidth:
|
|
222
|
-
borderLeftColor: '#4a148c',
|
|
223
|
-
},
|
|
224
|
-
drawerIcon: {
|
|
225
|
-
fontSize: 20,
|
|
226
|
-
marginRight: 16,
|
|
227
|
-
width: 24,
|
|
260
|
+
backgroundColor: 'rgba(255,255,255,0.08)',
|
|
261
|
+
borderLeftWidth: 0,
|
|
228
262
|
},
|
|
229
263
|
drawerLabel: {
|
|
230
264
|
fontSize: 16,
|
|
231
|
-
color:
|
|
265
|
+
color: Colors.white,
|
|
266
|
+
fontWeight: '700',
|
|
232
267
|
},
|
|
233
268
|
activeDrawerLabel: {
|
|
234
269
|
fontWeight: '600',
|
|
235
|
-
color:
|
|
270
|
+
color: Colors.white,
|
|
271
|
+
},
|
|
272
|
+
chevron: {
|
|
273
|
+
color: 'rgba(255,255,255,0.9)',
|
|
274
|
+
fontSize: 24,
|
|
236
275
|
},
|
|
237
276
|
drawerDivider: {
|
|
238
277
|
height: 1,
|
|
239
|
-
backgroundColor:
|
|
240
|
-
marginVertical:
|
|
278
|
+
backgroundColor: Colors.black10,
|
|
279
|
+
marginVertical: 4,
|
|
280
|
+
marginLeft: 20,
|
|
281
|
+
},
|
|
282
|
+
childItem: {
|
|
283
|
+
paddingVertical: 6,
|
|
284
|
+
paddingLeft: 60,
|
|
285
|
+
},
|
|
286
|
+
childLabel: {
|
|
287
|
+
fontSize: 15,
|
|
288
|
+
color: Colors.white,
|
|
289
|
+
fontWeight: '500',
|
|
241
290
|
},
|
|
242
291
|
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { View, Text, StyleSheet, ScrollView } from 'react-native';
|
|
2
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
3
|
+
import { Colors } from '../constants/Colors';
|
|
4
|
+
|
|
5
|
+
export default function CRMScreen() {
|
|
6
|
+
return (
|
|
7
|
+
<SafeAreaView style={styles.container} edges={['bottom']}>
|
|
8
|
+
<View style={styles.header}>
|
|
9
|
+
<Text style={styles.headerTitle}>CRM</Text>
|
|
10
|
+
</View>
|
|
11
|
+
<ScrollView style={styles.scrollView}></ScrollView>
|
|
12
|
+
</SafeAreaView>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const styles = StyleSheet.create({
|
|
17
|
+
container: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
backgroundColor: Colors.background,
|
|
20
|
+
},
|
|
21
|
+
header: {
|
|
22
|
+
backgroundColor: Colors.white,
|
|
23
|
+
padding: 16,
|
|
24
|
+
},
|
|
25
|
+
headerTitle: {
|
|
26
|
+
fontSize: 20,
|
|
27
|
+
fontWeight: '600',
|
|
28
|
+
color: Colors.black,
|
|
29
|
+
textAlign: 'center',
|
|
30
|
+
},
|
|
31
|
+
scrollView: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
},
|
|
34
|
+
});
|