react-native-salespanda 0.4.2 → 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/lib/module/SalespandaApp.js +11 -37
- package/lib/module/SalespandaApp.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/constants/Colors.js +3 -2
- package/lib/module/constants/Colors.js.map +1 -1
- package/lib/module/index.js +6 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/AppNavigator.js +5 -4
- package/lib/module/navigation/AppNavigator.js.map +1 -1
- package/lib/module/navigation/BottomTabNavigator.js +42 -23
- package/lib/module/navigation/BottomTabNavigator.js.map +1 -1
- package/lib/module/navigation/DrawerNavigator.js +36 -34
- 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 +2 -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/constants/Colors.d.ts +2 -1
- package/lib/typescript/src/constants/Colors.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -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 +12 -36
- 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/constants/Colors.ts +2 -1
- package/src/index.tsx +6 -4
- package/src/navigation/AppNavigator.tsx +6 -4
- package/src/navigation/BottomTabNavigator.tsx +51 -22
- package/src/navigation/DrawerNavigator.tsx +38 -33
- 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 +7 -4
- 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
package/src/index.tsx
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* import { HomeScreen, ProfileScreen } from 'react-native-salespanda';
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
// Import gesture handler at the very top
|
|
15
|
+
|
|
14
16
|
// ============================================
|
|
15
17
|
// MAIN APP EXPORT (Default)
|
|
16
18
|
// ============================================
|
|
@@ -44,8 +46,8 @@ export { default as BottomTabNavigator } from './navigation/BottomTabNavigator';
|
|
|
44
46
|
// ============================================
|
|
45
47
|
// SCREEN COMPONENTS (Library Mode)
|
|
46
48
|
// ============================================
|
|
47
|
-
export { default as HomeScreen } from './screens/HomeScreen';
|
|
48
|
-
export { default as ProfileScreen } from './screens/
|
|
49
|
-
export { default as NotificationsScreen } from './screens/NotificationsScreen';
|
|
49
|
+
export { default as HomeScreen } from './screens/Tabs/HomeScreen';
|
|
50
|
+
export { default as ProfileScreen } from './screens/Tabs/ActivityAnalytics';
|
|
51
|
+
export { default as NotificationsScreen } from './screens/Tabs/NotificationsScreen';
|
|
50
52
|
export { default as ReportsScreen } from './screens/ReportsScreen';
|
|
51
|
-
export { default as PremiumScreen } from './screens/CRMScreen';
|
|
53
|
+
export { default as PremiumScreen } from './screens/Tabs/CRMScreen';
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { NavigationContainer } from '@react-navigation/native';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import StackNavigator from './StackNavigator';
|
|
4
4
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
5
5
|
import { Colors } from '../constants/Colors';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const AppNavigator: React.FC = () => {
|
|
8
8
|
return (
|
|
9
9
|
<NavigationContainer>
|
|
10
10
|
<SafeAreaView style={styles.container} edges={['bottom', 'top']}>
|
|
11
|
-
<
|
|
11
|
+
<StackNavigator />
|
|
12
12
|
</SafeAreaView>
|
|
13
13
|
</NavigationContainer>
|
|
14
14
|
);
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default AppNavigator;
|
|
16
18
|
|
|
17
19
|
const styles = StyleSheet.create({
|
|
18
20
|
container: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
2
|
-
import {
|
|
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,9 +17,20 @@ 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
|
+
};
|
|
32
|
+
|
|
33
|
+
const Tab = createBottomTabNavigator<BottomTabParamList>();
|
|
24
34
|
|
|
25
35
|
interface TabIconProps {
|
|
26
36
|
focused: boolean;
|
|
@@ -32,7 +42,7 @@ interface ImageIconProps {
|
|
|
32
42
|
active: any;
|
|
33
43
|
}
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
const ImageIcon = ({ inactive, active }: ImageIconProps) => {
|
|
36
46
|
return ({ focused, size }: TabIconProps) => {
|
|
37
47
|
if (focused) {
|
|
38
48
|
return (
|
|
@@ -53,9 +63,11 @@ function ImageIcon({ inactive, active }: ImageIconProps) {
|
|
|
53
63
|
/>
|
|
54
64
|
);
|
|
55
65
|
};
|
|
56
|
-
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const BottomTabNavigator: React.FC = () => {
|
|
69
|
+
const navigation = useNavigation();
|
|
57
70
|
|
|
58
|
-
export default function BottomTabNavigator() {
|
|
59
71
|
return (
|
|
60
72
|
<SafeAreaView style={styles.container} edges={['bottom']}>
|
|
61
73
|
<Tab.Navigator
|
|
@@ -66,6 +78,22 @@ export default function BottomTabNavigator() {
|
|
|
66
78
|
tabBarStyle: styles.tabBar,
|
|
67
79
|
tabBarItemStyle: { overflow: 'visible' },
|
|
68
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
|
+
}}
|
|
69
97
|
>
|
|
70
98
|
<Tab.Screen
|
|
71
99
|
name="Home"
|
|
@@ -75,7 +103,6 @@ export default function BottomTabNavigator() {
|
|
|
75
103
|
inactive: homeIcon,
|
|
76
104
|
active: homeIconActive,
|
|
77
105
|
}),
|
|
78
|
-
headerShown: false,
|
|
79
106
|
}}
|
|
80
107
|
/>
|
|
81
108
|
<Tab.Screen
|
|
@@ -106,8 +133,8 @@ export default function BottomTabNavigator() {
|
|
|
106
133
|
}}
|
|
107
134
|
/>
|
|
108
135
|
<Tab.Screen
|
|
109
|
-
name="
|
|
110
|
-
component={
|
|
136
|
+
name="Activity Analytics"
|
|
137
|
+
component={ActivityAnalytics}
|
|
111
138
|
options={{
|
|
112
139
|
tabBarIcon: ImageIcon({
|
|
113
140
|
inactive: analyticsIcon,
|
|
@@ -118,7 +145,9 @@ export default function BottomTabNavigator() {
|
|
|
118
145
|
</Tab.Navigator>
|
|
119
146
|
</SafeAreaView>
|
|
120
147
|
);
|
|
121
|
-
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default BottomTabNavigator;
|
|
122
151
|
|
|
123
152
|
const styles = StyleSheet.create({
|
|
124
153
|
container: {
|
|
@@ -129,23 +158,23 @@ const styles = StyleSheet.create({
|
|
|
129
158
|
borderTopWidth: 1,
|
|
130
159
|
borderTopColor: Colors.border,
|
|
131
160
|
backgroundColor: Colors.white,
|
|
132
|
-
paddingBottom: 10,
|
|
133
|
-
paddingTop: 8,
|
|
134
|
-
height: 64,
|
|
161
|
+
paddingBottom: verticalScale(10),
|
|
162
|
+
paddingTop: verticalScale(8),
|
|
163
|
+
height: verticalScale(64),
|
|
135
164
|
},
|
|
136
165
|
activeIconContainer: {
|
|
137
|
-
width: 48,
|
|
138
|
-
height: 48,
|
|
139
|
-
borderRadius: 24,
|
|
166
|
+
width: scale(48),
|
|
167
|
+
height: scale(48),
|
|
168
|
+
borderRadius: moderateScale(24),
|
|
140
169
|
alignItems: 'center',
|
|
141
170
|
justifyContent: 'center',
|
|
142
171
|
borderWidth: 4,
|
|
143
172
|
borderColor: Colors.white,
|
|
144
|
-
transform: [{ translateY: -6 }],
|
|
173
|
+
transform: [{ translateY: verticalScale(-6) }],
|
|
145
174
|
},
|
|
146
175
|
activeIcon: {
|
|
147
|
-
width: 42,
|
|
148
|
-
height: 42,
|
|
176
|
+
width: scale(42),
|
|
177
|
+
height: scale(42),
|
|
149
178
|
tintColor: Colors.primary,
|
|
150
179
|
},
|
|
151
180
|
inactiveIcon: {
|
|
@@ -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();
|
|
@@ -43,7 +44,9 @@ interface CustomDrawerContentProps {
|
|
|
43
44
|
state?: any;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
const CustomDrawerContent: React.FC<CustomDrawerContentProps> = ({
|
|
48
|
+
navigation,
|
|
49
|
+
}) => {
|
|
47
50
|
const [expanded, setExpanded] = React.useState<Record<string, boolean>>({
|
|
48
51
|
'Campaign': false,
|
|
49
52
|
'Sales WAR Room': false,
|
|
@@ -157,22 +160,22 @@ function CustomDrawerContent({ navigation }: CustomDrawerContentProps) {
|
|
|
157
160
|
</ScrollView>
|
|
158
161
|
</View>
|
|
159
162
|
);
|
|
160
|
-
}
|
|
163
|
+
};
|
|
161
164
|
|
|
162
|
-
|
|
165
|
+
const renderDrawerContent = (props: any) => {
|
|
163
166
|
return <CustomDrawerContent navigation={props.navigation} />;
|
|
164
|
-
}
|
|
167
|
+
};
|
|
165
168
|
|
|
166
|
-
|
|
169
|
+
const DrawerNavigator: React.FC = () => {
|
|
167
170
|
return (
|
|
168
171
|
<Drawer.Navigator
|
|
169
172
|
drawerContent={renderDrawerContent}
|
|
170
173
|
screenOptions={{
|
|
171
|
-
headerShown:
|
|
174
|
+
headerShown: false,
|
|
172
175
|
drawerType: 'slide',
|
|
173
176
|
swipeEdgeWidth: 100,
|
|
174
177
|
drawerStyle: {
|
|
175
|
-
width: 280,
|
|
178
|
+
width: scale(280),
|
|
176
179
|
backgroundColor: Colors.primary,
|
|
177
180
|
},
|
|
178
181
|
headerStyle: {
|
|
@@ -202,7 +205,9 @@ export default function DrawerNavigator() {
|
|
|
202
205
|
/>
|
|
203
206
|
</Drawer.Navigator>
|
|
204
207
|
);
|
|
205
|
-
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export default DrawerNavigator;
|
|
206
211
|
|
|
207
212
|
const styles = StyleSheet.create({
|
|
208
213
|
drawerContainer: {
|
|
@@ -211,22 +216,22 @@ const styles = StyleSheet.create({
|
|
|
211
216
|
},
|
|
212
217
|
drawerHeader: {
|
|
213
218
|
backgroundColor: Colors.primary,
|
|
214
|
-
paddingHorizontal: 20,
|
|
215
|
-
paddingTop: 36,
|
|
216
|
-
paddingBottom: 16,
|
|
219
|
+
paddingHorizontal: scale(20),
|
|
220
|
+
paddingTop: verticalScale(36),
|
|
221
|
+
paddingBottom: verticalScale(16),
|
|
217
222
|
alignItems: 'flex-start',
|
|
218
223
|
},
|
|
219
224
|
headerRow: {
|
|
220
225
|
width: '100%',
|
|
221
226
|
flexDirection: 'row',
|
|
222
227
|
alignItems: 'center',
|
|
223
|
-
marginTop: GetPlatform(20, 0),
|
|
228
|
+
marginTop: GetPlatform(verticalScale(20), 0),
|
|
224
229
|
},
|
|
225
230
|
drawerAvatar: {
|
|
226
|
-
width: 60,
|
|
227
|
-
height: 60,
|
|
228
|
-
borderRadius: 40,
|
|
229
|
-
marginRight: 14,
|
|
231
|
+
width: scale(60),
|
|
232
|
+
height: scale(60),
|
|
233
|
+
borderRadius: moderateScale(40),
|
|
234
|
+
marginRight: scale(14),
|
|
230
235
|
borderWidth: 2,
|
|
231
236
|
borderColor: Colors.black30,
|
|
232
237
|
},
|
|
@@ -235,40 +240,40 @@ const styles = StyleSheet.create({
|
|
|
235
240
|
justifyContent: 'center',
|
|
236
241
|
},
|
|
237
242
|
drawerName: {
|
|
238
|
-
fontSize: 20,
|
|
243
|
+
fontSize: moderateScale(20),
|
|
239
244
|
fontWeight: '600',
|
|
240
245
|
color: Colors.white,
|
|
241
|
-
marginBottom: 10,
|
|
246
|
+
marginBottom: verticalScale(10),
|
|
242
247
|
},
|
|
243
248
|
badgeButton: {
|
|
244
249
|
borderWidth: 1,
|
|
245
250
|
borderColor: Colors.white,
|
|
246
|
-
paddingHorizontal: 12,
|
|
247
|
-
paddingVertical: 6,
|
|
248
|
-
borderRadius: 16,
|
|
251
|
+
paddingHorizontal: scale(12),
|
|
252
|
+
paddingVertical: verticalScale(6),
|
|
253
|
+
borderRadius: moderateScale(16),
|
|
249
254
|
alignSelf: 'flex-start',
|
|
250
255
|
},
|
|
251
256
|
badgeText: {
|
|
252
257
|
color: Colors.white,
|
|
253
|
-
fontSize: 12,
|
|
258
|
+
fontSize: moderateScale(12),
|
|
254
259
|
fontWeight: '500',
|
|
255
260
|
},
|
|
256
261
|
drawerContent: {
|
|
257
262
|
flex: 1,
|
|
258
|
-
paddingTop: 8,
|
|
263
|
+
paddingTop: verticalScale(8),
|
|
259
264
|
},
|
|
260
265
|
drawerItem: {
|
|
261
266
|
flexDirection: 'row',
|
|
262
267
|
alignItems: 'center',
|
|
263
|
-
padding: 10,
|
|
264
|
-
paddingHorizontal: 20,
|
|
268
|
+
padding: scale(10),
|
|
269
|
+
paddingHorizontal: scale(20),
|
|
265
270
|
},
|
|
266
271
|
activeDrawerItem: {
|
|
267
272
|
backgroundColor: 'rgba(255,255,255,0.08)',
|
|
268
273
|
borderLeftWidth: 0,
|
|
269
274
|
},
|
|
270
275
|
drawerLabel: {
|
|
271
|
-
fontSize: 16,
|
|
276
|
+
fontSize: moderateScale(16),
|
|
272
277
|
color: Colors.white,
|
|
273
278
|
fontWeight: '700',
|
|
274
279
|
},
|
|
@@ -278,20 +283,20 @@ const styles = StyleSheet.create({
|
|
|
278
283
|
},
|
|
279
284
|
chevron: {
|
|
280
285
|
color: 'rgba(255,255,255,0.9)',
|
|
281
|
-
fontSize: 24,
|
|
286
|
+
fontSize: moderateScale(24),
|
|
282
287
|
},
|
|
283
288
|
drawerDivider: {
|
|
284
289
|
height: 1,
|
|
285
290
|
backgroundColor: Colors.black10,
|
|
286
|
-
marginVertical: 4,
|
|
287
|
-
marginLeft: 20,
|
|
291
|
+
marginVertical: verticalScale(4),
|
|
292
|
+
marginLeft: scale(20),
|
|
288
293
|
},
|
|
289
294
|
childItem: {
|
|
290
|
-
paddingVertical: 6,
|
|
291
|
-
paddingLeft: 60,
|
|
295
|
+
paddingVertical: verticalScale(6),
|
|
296
|
+
paddingLeft: scale(60),
|
|
292
297
|
},
|
|
293
298
|
childLabel: {
|
|
294
|
-
fontSize: 15,
|
|
299
|
+
fontSize: moderateScale(15),
|
|
295
300
|
color: Colors.white,
|
|
296
301
|
fontWeight: '500',
|
|
297
302
|
},
|
|
@@ -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
|
+
});
|