react-native-salespanda 0.4.1 → 0.4.3
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/README.md +89 -5
- package/android/build.gradle +186 -0
- package/lib/module/SalespandaApp.js +24 -16
- package/lib/module/SalespandaApp.js.map +1 -1
- package/lib/module/assets/images/index.js +1 -22
- package/lib/module/assets/images/index.js.map +1 -1
- package/lib/module/components/BottomSheet.js +141 -0
- package/lib/module/components/BottomSheet.js.map +1 -0
- package/lib/module/components/ContactViaModal.js +68 -0
- package/lib/module/components/ContactViaModal.js.map +1 -0
- package/lib/module/components/ScreenHeader.js +63 -0
- package/lib/module/components/ScreenHeader.js.map +1 -0
- package/lib/module/components/SearchBar.js +57 -0
- package/lib/module/components/SearchBar.js.map +1 -0
- package/lib/module/components/TabsHeader.js +80 -0
- package/lib/module/components/TabsHeader.js.map +1 -0
- package/lib/module/components/index.js +8 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/config/FlavorConfig.js.map +1 -1
- package/lib/module/constants/Colors.js +3 -2
- package/lib/module/constants/Colors.js.map +1 -1
- package/lib/module/index.js +12 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/AppNavigator.js +13 -8
- package/lib/module/navigation/AppNavigator.js.map +1 -1
- package/lib/module/navigation/BottomTabNavigator.js +96 -49
- package/lib/module/navigation/BottomTabNavigator.js.map +1 -1
- package/lib/module/navigation/DrawerNavigator.js +45 -40
- package/lib/module/navigation/DrawerNavigator.js.map +1 -1
- package/lib/module/navigation/StackNavigator.js +23 -0
- package/lib/module/navigation/StackNavigator.js.map +1 -0
- package/lib/module/screens/CRM/AddContactModal.js +49 -0
- package/lib/module/screens/CRM/AddContactModal.js.map +1 -0
- package/lib/module/screens/CRM/CategoryTabs.js +70 -0
- package/lib/module/screens/CRM/CategoryTabs.js.map +1 -0
- package/lib/module/screens/CRM/ContactItem.js +168 -0
- package/lib/module/screens/CRM/ContactItem.js.map +1 -0
- package/lib/module/screens/CRM/FilterDropdown.js +39 -0
- package/lib/module/screens/CRM/FilterDropdown.js.map +1 -0
- package/lib/module/screens/CRM/FunnelChart.js +105 -0
- package/lib/module/screens/CRM/FunnelChart.js.map +1 -0
- package/lib/module/screens/CRM/InfoCard.js +56 -0
- package/lib/module/screens/CRM/InfoCard.js.map +1 -0
- package/lib/module/screens/CRM/LeadCard.js +76 -0
- package/lib/module/screens/CRM/LeadCard.js.map +1 -0
- package/lib/module/screens/CRM/LogCallScreen.js +271 -0
- package/lib/module/screens/CRM/LogCallScreen.js.map +1 -0
- package/lib/module/screens/CRM/TopTabs.js +63 -0
- package/lib/module/screens/CRM/TopTabs.js.map +1 -0
- package/lib/module/screens/CRM/index.js +13 -0
- package/lib/module/screens/CRM/index.js.map +1 -0
- package/lib/module/screens/ReportsScreen.js +6 -4
- package/lib/module/screens/ReportsScreen.js.map +1 -1
- package/lib/module/screens/Tabs/ActivityAnalytics.js +29 -0
- package/lib/module/screens/Tabs/ActivityAnalytics.js.map +1 -0
- package/lib/module/screens/Tabs/CRMScreen.js +316 -0
- package/lib/module/screens/Tabs/CRMScreen.js.map +1 -0
- package/lib/module/screens/Tabs/DigitalDiary.js +39 -0
- package/lib/module/screens/Tabs/DigitalDiary.js.map +1 -0
- package/lib/module/screens/Tabs/HomeScreen.js +240 -0
- package/lib/module/screens/Tabs/HomeScreen.js.map +1 -0
- package/lib/module/screens/Tabs/NotificationsScreen.js +29 -0
- package/lib/module/screens/Tabs/NotificationsScreen.js.map +1 -0
- package/lib/module/screens/contentliberary/contentliberary.js +283 -0
- package/lib/module/screens/contentliberary/contentliberary.js.map +1 -0
- package/lib/typescript/src/SalespandaApp.d.ts +12 -2
- package/lib/typescript/src/SalespandaApp.d.ts.map +1 -1
- package/lib/typescript/src/components/BottomSheet.d.ts +16 -0
- package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ContactViaModal.d.ts +13 -0
- package/lib/typescript/src/components/ContactViaModal.d.ts.map +1 -0
- package/lib/typescript/src/components/ScreenHeader.d.ts +8 -0
- package/lib/typescript/src/components/ScreenHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/SearchBar.d.ts +8 -0
- package/lib/typescript/src/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/src/components/TabsHeader.d.ts +8 -0
- package/lib/typescript/src/components/TabsHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +5 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/config/FlavorConfig.d.ts.map +1 -1
- package/lib/typescript/src/constants/Colors.d.ts +2 -1
- package/lib/typescript/src/constants/Colors.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts +2 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts +9 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts +3 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/StackNavigator.d.ts +13 -0
- package/lib/typescript/src/navigation/StackNavigator.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts +11 -0
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts +7 -0
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts +19 -0
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts +6 -0
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts +17 -0
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts +7 -0
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts +9 -0
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts +12 -0
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts +12 -0
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/index.d.ts +10 -0
- package/lib/typescript/src/screens/CRM/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/ReportsScreen.d.ts +2 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts +4 -0
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts +2 -0
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts.map +1 -0
- package/package.json +5 -1
- package/src/SalespandaApp.tsx +37 -16
- package/src/components/BottomSheet.tsx +146 -0
- package/src/components/ContactViaModal.tsx +80 -0
- package/src/components/ScreenHeader.tsx +57 -0
- package/src/components/SearchBar.tsx +59 -0
- package/src/components/TabsHeader.tsx +72 -0
- package/src/components/index.ts +5 -0
- package/src/config/FlavorConfig.ts +5 -3
- package/src/constants/Colors.ts +2 -1
- package/src/index.tsx +12 -4
- package/src/navigation/AppNavigator.tsx +15 -8
- package/src/navigation/BottomTabNavigator.tsx +122 -62
- package/src/navigation/DrawerNavigator.tsx +49 -34
- package/src/navigation/StackNavigator.tsx +32 -0
- package/src/screens/CRM/AddContactModal.tsx +57 -0
- package/src/screens/CRM/CategoryTabs.tsx +109 -0
- package/src/screens/CRM/ContactItem.tsx +168 -0
- package/src/screens/CRM/FilterDropdown.tsx +34 -0
- package/src/screens/CRM/FunnelChart.tsx +103 -0
- package/src/screens/CRM/InfoCard.tsx +51 -0
- package/src/screens/CRM/LeadCard.tsx +69 -0
- package/src/screens/CRM/LogCallScreen.tsx +318 -0
- package/src/screens/CRM/TopTabs.tsx +95 -0
- package/src/screens/CRM/index.ts +10 -0
- package/src/screens/ReportsScreen.tsx +8 -5
- package/src/screens/Tabs/ActivityAnalytics.tsx +25 -0
- package/src/screens/Tabs/CRMScreen.tsx +381 -0
- package/src/screens/Tabs/DigitalDiary.tsx +35 -0
- package/src/screens/Tabs/HomeScreen.tsx +223 -0
- package/src/screens/Tabs/NotificationsScreen.tsx +25 -0
- package/src/screens/contentliberary/contentliberary.tsx +268 -0
- package/lib/module/screens/CRMScreen.js +0 -41
- package/lib/module/screens/CRMScreen.js.map +0 -1
- package/lib/module/screens/HomeScreen.js +0 -211
- package/lib/module/screens/HomeScreen.js.map +0 -1
- package/lib/module/screens/NotificationsScreen.js +0 -41
- package/lib/module/screens/NotificationsScreen.js.map +0 -1
- package/lib/module/screens/ProfileScreen.js +0 -41
- package/lib/module/screens/ProfileScreen.js.map +0 -1
- package/lib/typescript/src/screens/CRMScreen.d.ts +0 -2
- package/lib/typescript/src/screens/CRMScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/HomeScreen.d.ts +0 -2
- package/lib/typescript/src/screens/HomeScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/NotificationsScreen.d.ts +0 -2
- package/lib/typescript/src/screens/NotificationsScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/ProfileScreen.d.ts +0 -2
- package/lib/typescript/src/screens/ProfileScreen.d.ts.map +0 -1
- package/src/screens/CRMScreen.tsx +0 -34
- package/src/screens/HomeScreen.tsx +0 -201
- package/src/screens/NotificationsScreen.tsx +0 -34
- package/src/screens/ProfileScreen.tsx +0 -34
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
2
|
-
import { Image,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { View, Image, StyleSheet } from 'react-native';
|
|
3
|
+
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
4
|
+
import HomeScreen from '../screens/Tabs/HomeScreen';
|
|
5
5
|
import ReportsScreen from '../screens/ReportsScreen';
|
|
6
|
-
import ProfileScreen from '../screens/ProfileScreen';
|
|
7
6
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
8
7
|
import { Colors } from '../constants/Colors';
|
|
9
8
|
import {
|
|
@@ -18,106 +17,167 @@ import {
|
|
|
18
17
|
notificationIcon,
|
|
19
18
|
notificationIconActive,
|
|
20
19
|
} from '../assets/images';
|
|
21
|
-
import CRMScreen from '../screens/CRMScreen';
|
|
20
|
+
import CRMScreen from '../screens/Tabs/CRMScreen';
|
|
21
|
+
import NotificationsScreen from '../screens/Tabs/NotificationsScreen';
|
|
22
|
+
import { useNavigation } from '@react-navigation/native';
|
|
23
|
+
import ActivityAnalytics from '../screens/Tabs/ActivityAnalytics';
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
export type BottomTabParamList = {
|
|
26
|
+
'Home': undefined;
|
|
27
|
+
'CRM': undefined;
|
|
28
|
+
'Reports': undefined;
|
|
29
|
+
'Notifications': undefined;
|
|
30
|
+
'Activity Analytics': undefined;
|
|
31
|
+
};
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
}
|
|
33
|
+
const Tab = createBottomTabNavigator<BottomTabParamList>();
|
|
34
|
+
|
|
35
|
+
interface TabIconProps {
|
|
36
|
+
focused: boolean;
|
|
37
|
+
size: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface ImageIconProps {
|
|
41
|
+
inactive: any;
|
|
42
|
+
active: any;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const ImageIcon = ({ inactive, active }: ImageIconProps) => {
|
|
46
|
+
return ({ focused, size }: TabIconProps) => {
|
|
47
|
+
if (focused) {
|
|
51
48
|
return (
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
<View style={styles.activeIconContainer}>
|
|
50
|
+
<Image
|
|
51
|
+
source={active}
|
|
52
|
+
resizeMode="contain"
|
|
53
|
+
style={styles.activeIcon}
|
|
54
|
+
/>
|
|
55
|
+
</View>
|
|
57
56
|
);
|
|
58
|
-
}
|
|
57
|
+
}
|
|
58
|
+
return (
|
|
59
|
+
<Image
|
|
60
|
+
source={inactive}
|
|
61
|
+
resizeMode="contain"
|
|
62
|
+
style={[styles.inactiveIcon, { width: size, height: size }]}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const BottomTabNavigator: React.FC = () => {
|
|
69
|
+
const navigation = useNavigation();
|
|
59
70
|
|
|
60
71
|
return (
|
|
61
|
-
<SafeAreaView
|
|
62
|
-
style={{ flex: 1, backgroundColor: Colors.background }}
|
|
63
|
-
edges={['bottom']}
|
|
64
|
-
>
|
|
72
|
+
<SafeAreaView style={styles.container} edges={['bottom']}>
|
|
65
73
|
<Tab.Navigator
|
|
66
74
|
screenOptions={{
|
|
67
75
|
headerShown: false,
|
|
68
76
|
sceneStyle: { backgroundColor: Colors.background },
|
|
69
77
|
tabBarShowLabel: false,
|
|
70
|
-
tabBarStyle:
|
|
71
|
-
borderTopWidth: 1,
|
|
72
|
-
borderTopColor: Colors.border,
|
|
73
|
-
backgroundColor: Colors.white,
|
|
74
|
-
paddingBottom: 10,
|
|
75
|
-
paddingTop: 8,
|
|
76
|
-
height: 64,
|
|
77
|
-
},
|
|
78
|
+
tabBarStyle: styles.tabBar,
|
|
78
79
|
tabBarItemStyle: { overflow: 'visible' },
|
|
79
80
|
}}
|
|
81
|
+
screenListeners={{
|
|
82
|
+
state: (e) => {
|
|
83
|
+
const state = e.data.state;
|
|
84
|
+
if (state && state.routes && state.index !== undefined) {
|
|
85
|
+
const currentRoute = state.routes[state.index];
|
|
86
|
+
if (currentRoute) {
|
|
87
|
+
const tabName = currentRoute.name;
|
|
88
|
+
|
|
89
|
+
// Update the drawer header title based on current tab
|
|
90
|
+
navigation.setOptions({
|
|
91
|
+
title: tabName,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
}}
|
|
80
97
|
>
|
|
81
98
|
<Tab.Screen
|
|
82
99
|
name="Home"
|
|
83
100
|
component={HomeScreen}
|
|
84
101
|
options={{
|
|
85
|
-
tabBarIcon:
|
|
86
|
-
|
|
102
|
+
tabBarIcon: ImageIcon({
|
|
103
|
+
inactive: homeIcon,
|
|
104
|
+
active: homeIconActive,
|
|
105
|
+
}),
|
|
87
106
|
}}
|
|
88
107
|
/>
|
|
89
108
|
<Tab.Screen
|
|
90
109
|
name="CRM"
|
|
91
110
|
component={CRMScreen}
|
|
92
111
|
options={{
|
|
93
|
-
tabBarIcon:
|
|
112
|
+
tabBarIcon: ImageIcon({ inactive: crmIcon, active: crmIconActive }),
|
|
94
113
|
}}
|
|
95
114
|
/>
|
|
96
115
|
<Tab.Screen
|
|
97
116
|
name="Reports"
|
|
98
117
|
component={ReportsScreen}
|
|
99
118
|
options={{
|
|
100
|
-
tabBarIcon:
|
|
119
|
+
tabBarIcon: ImageIcon({
|
|
120
|
+
inactive: diaryIcon,
|
|
121
|
+
active: diaryIconActive,
|
|
122
|
+
}),
|
|
101
123
|
}}
|
|
102
124
|
/>
|
|
103
125
|
<Tab.Screen
|
|
104
126
|
name="Notifications"
|
|
105
127
|
component={NotificationsScreen}
|
|
106
128
|
options={{
|
|
107
|
-
tabBarIcon:
|
|
108
|
-
notificationIcon,
|
|
109
|
-
notificationIconActive
|
|
110
|
-
),
|
|
129
|
+
tabBarIcon: ImageIcon({
|
|
130
|
+
inactive: notificationIcon,
|
|
131
|
+
active: notificationIconActive,
|
|
132
|
+
}),
|
|
111
133
|
}}
|
|
112
134
|
/>
|
|
113
135
|
<Tab.Screen
|
|
114
|
-
name="
|
|
115
|
-
component={
|
|
136
|
+
name="Activity Analytics"
|
|
137
|
+
component={ActivityAnalytics}
|
|
116
138
|
options={{
|
|
117
|
-
tabBarIcon:
|
|
139
|
+
tabBarIcon: ImageIcon({
|
|
140
|
+
inactive: analyticsIcon,
|
|
141
|
+
active: analyticsIconActive,
|
|
142
|
+
}),
|
|
118
143
|
}}
|
|
119
144
|
/>
|
|
120
145
|
</Tab.Navigator>
|
|
121
146
|
</SafeAreaView>
|
|
122
147
|
);
|
|
123
|
-
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default BottomTabNavigator;
|
|
151
|
+
|
|
152
|
+
const styles = StyleSheet.create({
|
|
153
|
+
container: {
|
|
154
|
+
flex: 1,
|
|
155
|
+
backgroundColor: Colors.background,
|
|
156
|
+
},
|
|
157
|
+
tabBar: {
|
|
158
|
+
borderTopWidth: 1,
|
|
159
|
+
borderTopColor: Colors.border,
|
|
160
|
+
backgroundColor: Colors.white,
|
|
161
|
+
paddingBottom: verticalScale(10),
|
|
162
|
+
paddingTop: verticalScale(8),
|
|
163
|
+
height: verticalScale(64),
|
|
164
|
+
},
|
|
165
|
+
activeIconContainer: {
|
|
166
|
+
width: scale(48),
|
|
167
|
+
height: scale(48),
|
|
168
|
+
borderRadius: moderateScale(24),
|
|
169
|
+
alignItems: 'center',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
borderWidth: 4,
|
|
172
|
+
borderColor: Colors.white,
|
|
173
|
+
transform: [{ translateY: verticalScale(-6) }],
|
|
174
|
+
},
|
|
175
|
+
activeIcon: {
|
|
176
|
+
width: scale(42),
|
|
177
|
+
height: scale(42),
|
|
178
|
+
tintColor: Colors.primary,
|
|
179
|
+
},
|
|
180
|
+
inactiveIcon: {
|
|
181
|
+
tintColor: Colors.black30,
|
|
182
|
+
},
|
|
183
|
+
});
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
Image,
|
|
9
9
|
ScrollView,
|
|
10
10
|
} from 'react-native';
|
|
11
|
+
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
11
12
|
import BottomTabNavigator from './BottomTabNavigator';
|
|
12
13
|
import { Colors } from '../constants/Colors';
|
|
13
|
-
import ProfileScreen from '../screens/
|
|
14
|
+
import ProfileScreen from '../screens/Tabs/ActivityAnalytics';
|
|
14
15
|
import { GetPlatform } from '../constants/GetPlatorm';
|
|
15
16
|
|
|
16
17
|
const Drawer = createDrawerNavigator();
|
|
@@ -38,9 +39,14 @@ const DrawerItem: React.FC<DrawerItemProps> = ({
|
|
|
38
39
|
);
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
interface CustomDrawerContentProps {
|
|
43
|
+
navigation: any;
|
|
44
|
+
state?: any;
|
|
45
|
+
}
|
|
43
46
|
|
|
47
|
+
const CustomDrawerContent: React.FC<CustomDrawerContentProps> = ({
|
|
48
|
+
navigation,
|
|
49
|
+
}) => {
|
|
44
50
|
const [expanded, setExpanded] = React.useState<Record<string, boolean>>({
|
|
45
51
|
'Campaign': false,
|
|
46
52
|
'Sales WAR Room': false,
|
|
@@ -131,7 +137,7 @@ function CustomDrawerContent(props: any) {
|
|
|
131
137
|
onPress={() => toggle(group.label)}
|
|
132
138
|
activeOpacity={0.7}
|
|
133
139
|
>
|
|
134
|
-
<Text style={[styles.drawerLabel,
|
|
140
|
+
<Text style={[styles.drawerLabel, styles.flexOne]}>
|
|
135
141
|
{group.label}
|
|
136
142
|
</Text>
|
|
137
143
|
<Text style={styles.chevron}>{isOpen ? '▾' : '▸'}</Text>
|
|
@@ -154,18 +160,22 @@ function CustomDrawerContent(props: any) {
|
|
|
154
160
|
</ScrollView>
|
|
155
161
|
</View>
|
|
156
162
|
);
|
|
157
|
-
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const renderDrawerContent = (props: any) => {
|
|
166
|
+
return <CustomDrawerContent navigation={props.navigation} />;
|
|
167
|
+
};
|
|
158
168
|
|
|
159
|
-
|
|
169
|
+
const DrawerNavigator: React.FC = () => {
|
|
160
170
|
return (
|
|
161
171
|
<Drawer.Navigator
|
|
162
|
-
drawerContent={
|
|
172
|
+
drawerContent={renderDrawerContent}
|
|
163
173
|
screenOptions={{
|
|
164
|
-
headerShown:
|
|
174
|
+
headerShown: false,
|
|
165
175
|
drawerType: 'slide',
|
|
166
176
|
swipeEdgeWidth: 100,
|
|
167
177
|
drawerStyle: {
|
|
168
|
-
width: 280,
|
|
178
|
+
width: scale(280),
|
|
169
179
|
backgroundColor: Colors.primary,
|
|
170
180
|
},
|
|
171
181
|
headerStyle: {
|
|
@@ -195,7 +205,9 @@ export default function DrawerNavigator() {
|
|
|
195
205
|
/>
|
|
196
206
|
</Drawer.Navigator>
|
|
197
207
|
);
|
|
198
|
-
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export default DrawerNavigator;
|
|
199
211
|
|
|
200
212
|
const styles = StyleSheet.create({
|
|
201
213
|
drawerContainer: {
|
|
@@ -204,22 +216,22 @@ const styles = StyleSheet.create({
|
|
|
204
216
|
},
|
|
205
217
|
drawerHeader: {
|
|
206
218
|
backgroundColor: Colors.primary,
|
|
207
|
-
paddingHorizontal: 20,
|
|
208
|
-
paddingTop: 36,
|
|
209
|
-
paddingBottom: 16,
|
|
219
|
+
paddingHorizontal: scale(20),
|
|
220
|
+
paddingTop: verticalScale(36),
|
|
221
|
+
paddingBottom: verticalScale(16),
|
|
210
222
|
alignItems: 'flex-start',
|
|
211
223
|
},
|
|
212
224
|
headerRow: {
|
|
213
225
|
width: '100%',
|
|
214
226
|
flexDirection: 'row',
|
|
215
227
|
alignItems: 'center',
|
|
216
|
-
marginTop: GetPlatform(20, 0),
|
|
228
|
+
marginTop: GetPlatform(verticalScale(20), 0),
|
|
217
229
|
},
|
|
218
230
|
drawerAvatar: {
|
|
219
|
-
width: 60,
|
|
220
|
-
height: 60,
|
|
221
|
-
borderRadius: 40,
|
|
222
|
-
marginRight: 14,
|
|
231
|
+
width: scale(60),
|
|
232
|
+
height: scale(60),
|
|
233
|
+
borderRadius: moderateScale(40),
|
|
234
|
+
marginRight: scale(14),
|
|
223
235
|
borderWidth: 2,
|
|
224
236
|
borderColor: Colors.black30,
|
|
225
237
|
},
|
|
@@ -228,40 +240,40 @@ const styles = StyleSheet.create({
|
|
|
228
240
|
justifyContent: 'center',
|
|
229
241
|
},
|
|
230
242
|
drawerName: {
|
|
231
|
-
fontSize: 20,
|
|
243
|
+
fontSize: moderateScale(20),
|
|
232
244
|
fontWeight: '600',
|
|
233
245
|
color: Colors.white,
|
|
234
|
-
marginBottom: 10,
|
|
246
|
+
marginBottom: verticalScale(10),
|
|
235
247
|
},
|
|
236
248
|
badgeButton: {
|
|
237
249
|
borderWidth: 1,
|
|
238
250
|
borderColor: Colors.white,
|
|
239
|
-
paddingHorizontal: 12,
|
|
240
|
-
paddingVertical: 6,
|
|
241
|
-
borderRadius: 16,
|
|
251
|
+
paddingHorizontal: scale(12),
|
|
252
|
+
paddingVertical: verticalScale(6),
|
|
253
|
+
borderRadius: moderateScale(16),
|
|
242
254
|
alignSelf: 'flex-start',
|
|
243
255
|
},
|
|
244
256
|
badgeText: {
|
|
245
257
|
color: Colors.white,
|
|
246
|
-
fontSize: 12,
|
|
258
|
+
fontSize: moderateScale(12),
|
|
247
259
|
fontWeight: '500',
|
|
248
260
|
},
|
|
249
261
|
drawerContent: {
|
|
250
262
|
flex: 1,
|
|
251
|
-
paddingTop: 8,
|
|
263
|
+
paddingTop: verticalScale(8),
|
|
252
264
|
},
|
|
253
265
|
drawerItem: {
|
|
254
266
|
flexDirection: 'row',
|
|
255
267
|
alignItems: 'center',
|
|
256
|
-
padding: 10,
|
|
257
|
-
paddingHorizontal: 20,
|
|
268
|
+
padding: scale(10),
|
|
269
|
+
paddingHorizontal: scale(20),
|
|
258
270
|
},
|
|
259
271
|
activeDrawerItem: {
|
|
260
272
|
backgroundColor: 'rgba(255,255,255,0.08)',
|
|
261
273
|
borderLeftWidth: 0,
|
|
262
274
|
},
|
|
263
275
|
drawerLabel: {
|
|
264
|
-
fontSize: 16,
|
|
276
|
+
fontSize: moderateScale(16),
|
|
265
277
|
color: Colors.white,
|
|
266
278
|
fontWeight: '700',
|
|
267
279
|
},
|
|
@@ -271,21 +283,24 @@ const styles = StyleSheet.create({
|
|
|
271
283
|
},
|
|
272
284
|
chevron: {
|
|
273
285
|
color: 'rgba(255,255,255,0.9)',
|
|
274
|
-
fontSize: 24,
|
|
286
|
+
fontSize: moderateScale(24),
|
|
275
287
|
},
|
|
276
288
|
drawerDivider: {
|
|
277
289
|
height: 1,
|
|
278
290
|
backgroundColor: Colors.black10,
|
|
279
|
-
marginVertical: 4,
|
|
280
|
-
marginLeft: 20,
|
|
291
|
+
marginVertical: verticalScale(4),
|
|
292
|
+
marginLeft: scale(20),
|
|
281
293
|
},
|
|
282
294
|
childItem: {
|
|
283
|
-
paddingVertical: 6,
|
|
284
|
-
paddingLeft: 60,
|
|
295
|
+
paddingVertical: verticalScale(6),
|
|
296
|
+
paddingLeft: scale(60),
|
|
285
297
|
},
|
|
286
298
|
childLabel: {
|
|
287
|
-
fontSize: 15,
|
|
299
|
+
fontSize: moderateScale(15),
|
|
288
300
|
color: Colors.white,
|
|
289
301
|
fontWeight: '500',
|
|
290
302
|
},
|
|
303
|
+
flexOne: {
|
|
304
|
+
flex: 1,
|
|
305
|
+
},
|
|
291
306
|
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import DrawerNavigator from './DrawerNavigator';
|
|
2
|
+
import LogCallScreen from '../screens/CRM/LogCallScreen';
|
|
3
|
+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
4
|
+
|
|
5
|
+
export type RootStackParamList = {
|
|
6
|
+
HomeTabs: undefined;
|
|
7
|
+
LogCall: {
|
|
8
|
+
contact: {
|
|
9
|
+
name: string;
|
|
10
|
+
avatarInitial: string;
|
|
11
|
+
avatarColor: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
// Add more screens here as needed
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const Stack = createNativeStackNavigator<RootStackParamList>();
|
|
18
|
+
|
|
19
|
+
const StackNavigator: React.FC = () => {
|
|
20
|
+
return (
|
|
21
|
+
<Stack.Navigator
|
|
22
|
+
screenOptions={{
|
|
23
|
+
headerShown: false,
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<Stack.Screen name="HomeTabs" component={DrawerNavigator} />
|
|
27
|
+
<Stack.Screen name="LogCall" component={LogCallScreen} />
|
|
28
|
+
</Stack.Navigator>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default StackNavigator;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { BottomSheet, BottomSheetOption } from '../../components/BottomSheet';
|
|
2
|
+
|
|
3
|
+
interface AddContactModalProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onAddManually?: () => void;
|
|
7
|
+
onUploadGmail?: () => void;
|
|
8
|
+
onUploadPhonebook?: () => void;
|
|
9
|
+
onUploadCSV?: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const AddContactModal = ({
|
|
13
|
+
visible,
|
|
14
|
+
onClose,
|
|
15
|
+
onAddManually,
|
|
16
|
+
onUploadGmail,
|
|
17
|
+
onUploadPhonebook,
|
|
18
|
+
onUploadCSV,
|
|
19
|
+
}: AddContactModalProps) => {
|
|
20
|
+
return (
|
|
21
|
+
<BottomSheet visible={visible} onClose={onClose} title="Add new contact">
|
|
22
|
+
<BottomSheetOption
|
|
23
|
+
icon="⋮⋮⋮"
|
|
24
|
+
label="Add manually"
|
|
25
|
+
onPress={() => {
|
|
26
|
+
onClose();
|
|
27
|
+
onAddManually?.();
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
30
|
+
<BottomSheetOption
|
|
31
|
+
icon="G"
|
|
32
|
+
label="Upload Gmail contact"
|
|
33
|
+
iconColor="#EA4335"
|
|
34
|
+
onPress={() => {
|
|
35
|
+
onClose();
|
|
36
|
+
onUploadGmail?.();
|
|
37
|
+
}}
|
|
38
|
+
/>
|
|
39
|
+
<BottomSheetOption
|
|
40
|
+
icon="📱"
|
|
41
|
+
label="Upload Phonebook contacts"
|
|
42
|
+
onPress={() => {
|
|
43
|
+
onClose();
|
|
44
|
+
onUploadPhonebook?.();
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
<BottomSheetOption
|
|
48
|
+
icon="↑"
|
|
49
|
+
label="Upload CSV"
|
|
50
|
+
onPress={() => {
|
|
51
|
+
onClose();
|
|
52
|
+
onUploadCSV?.();
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
</BottomSheet>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
2
|
+
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
3
|
+
import { Colors } from '../../constants/Colors';
|
|
4
|
+
|
|
5
|
+
interface CategoryTabsProps {
|
|
6
|
+
selectedCategory: 'all' | 'followUp' | 'new' | 'engaged';
|
|
7
|
+
onSelectCategory: (category: 'all' | 'followUp' | 'new' | 'engaged') => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CategoryTabs: React.FC<CategoryTabsProps> = ({
|
|
11
|
+
selectedCategory,
|
|
12
|
+
onSelectCategory,
|
|
13
|
+
}) => {
|
|
14
|
+
return (
|
|
15
|
+
<View style={styles.categoryTabsContainer}>
|
|
16
|
+
<TouchableOpacity
|
|
17
|
+
style={[
|
|
18
|
+
styles.categoryTab,
|
|
19
|
+
selectedCategory === 'all' && styles.categoryTabActive,
|
|
20
|
+
]}
|
|
21
|
+
onPress={() => onSelectCategory('all')}
|
|
22
|
+
>
|
|
23
|
+
<Text
|
|
24
|
+
style={[
|
|
25
|
+
styles.categoryTabText,
|
|
26
|
+
selectedCategory === 'all' && styles.categoryTabTextActive,
|
|
27
|
+
]}
|
|
28
|
+
>
|
|
29
|
+
All
|
|
30
|
+
</Text>
|
|
31
|
+
</TouchableOpacity>
|
|
32
|
+
<TouchableOpacity
|
|
33
|
+
style={[
|
|
34
|
+
styles.categoryTab,
|
|
35
|
+
selectedCategory === 'followUp' && styles.categoryTabActive,
|
|
36
|
+
]}
|
|
37
|
+
onPress={() => onSelectCategory('followUp')}
|
|
38
|
+
>
|
|
39
|
+
<Text
|
|
40
|
+
style={[
|
|
41
|
+
styles.categoryTabText,
|
|
42
|
+
selectedCategory === 'followUp' && styles.categoryTabTextActive,
|
|
43
|
+
]}
|
|
44
|
+
>
|
|
45
|
+
Follow Up
|
|
46
|
+
</Text>
|
|
47
|
+
</TouchableOpacity>
|
|
48
|
+
<TouchableOpacity
|
|
49
|
+
style={[
|
|
50
|
+
styles.categoryTab,
|
|
51
|
+
selectedCategory === 'new' && styles.categoryTabActive,
|
|
52
|
+
]}
|
|
53
|
+
onPress={() => onSelectCategory('new')}
|
|
54
|
+
>
|
|
55
|
+
<Text
|
|
56
|
+
style={[
|
|
57
|
+
styles.categoryTabText,
|
|
58
|
+
selectedCategory === 'new' && styles.categoryTabTextActive,
|
|
59
|
+
]}
|
|
60
|
+
>
|
|
61
|
+
New
|
|
62
|
+
</Text>
|
|
63
|
+
</TouchableOpacity>
|
|
64
|
+
<TouchableOpacity
|
|
65
|
+
style={[
|
|
66
|
+
styles.categoryTab,
|
|
67
|
+
selectedCategory === 'engaged' && styles.categoryTabActive,
|
|
68
|
+
]}
|
|
69
|
+
onPress={() => onSelectCategory('engaged')}
|
|
70
|
+
>
|
|
71
|
+
<Text
|
|
72
|
+
style={[
|
|
73
|
+
styles.categoryTabText,
|
|
74
|
+
selectedCategory === 'engaged' && styles.categoryTabTextActive,
|
|
75
|
+
]}
|
|
76
|
+
>
|
|
77
|
+
Engaged
|
|
78
|
+
</Text>
|
|
79
|
+
</TouchableOpacity>
|
|
80
|
+
</View>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const styles = StyleSheet.create({
|
|
85
|
+
categoryTabsContainer: {
|
|
86
|
+
flexDirection: 'row',
|
|
87
|
+
backgroundColor: Colors.white,
|
|
88
|
+
paddingHorizontal: scale(16),
|
|
89
|
+
paddingVertical: verticalScale(8),
|
|
90
|
+
},
|
|
91
|
+
categoryTab: {
|
|
92
|
+
flex: 1,
|
|
93
|
+
paddingVertical: verticalScale(12),
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
borderBottomWidth: 3,
|
|
96
|
+
borderBottomColor: 'transparent',
|
|
97
|
+
},
|
|
98
|
+
categoryTabActive: {
|
|
99
|
+
borderBottomColor: '#FF9800',
|
|
100
|
+
},
|
|
101
|
+
categoryTabText: {
|
|
102
|
+
fontSize: moderateScale(14),
|
|
103
|
+
fontWeight: '600',
|
|
104
|
+
color: Colors.black,
|
|
105
|
+
},
|
|
106
|
+
categoryTabTextActive: {
|
|
107
|
+
color: '#FF9800',
|
|
108
|
+
},
|
|
109
|
+
});
|