react-native-salespanda 0.6.0 → 0.7.2

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.
Files changed (132) hide show
  1. package/README.md +50 -102
  2. package/lib/module/assets/images/index.js +22 -1
  3. package/package.json +3 -4
  4. package/react-native.config.js +4 -3
  5. package/lib/module/NativeSalespanda.js.map +0 -1
  6. package/lib/module/SalespandaApp.js.map +0 -1
  7. package/lib/module/assets/images/index.js.map +0 -1
  8. package/lib/module/components/BottomSheet.js.map +0 -1
  9. package/lib/module/components/ContactViaModal.js.map +0 -1
  10. package/lib/module/components/Loader.js.map +0 -1
  11. package/lib/module/components/ScreenHeader.js.map +0 -1
  12. package/lib/module/components/SearchBar.js.map +0 -1
  13. package/lib/module/components/TabsHeader.js.map +0 -1
  14. package/lib/module/components/index.js.map +0 -1
  15. package/lib/module/config/FlavorConfig.js.map +0 -1
  16. package/lib/module/config/SalespandaConfig.js.map +0 -1
  17. package/lib/module/constants/Colors.js.map +0 -1
  18. package/lib/module/constants/GetPlatorm.js.map +0 -1
  19. package/lib/module/index.js.map +0 -1
  20. package/lib/module/navigation/AppNavigator.js.map +0 -1
  21. package/lib/module/navigation/BottomTabNavigator.js.map +0 -1
  22. package/lib/module/navigation/DrawerNavigator.js.map +0 -1
  23. package/lib/module/navigation/StackNavigator.js.map +0 -1
  24. package/lib/module/screens/CRM/AddContactModal.js.map +0 -1
  25. package/lib/module/screens/CRM/CategoryTabs.js.map +0 -1
  26. package/lib/module/screens/CRM/ContactItem.js.map +0 -1
  27. package/lib/module/screens/CRM/FilterDropdown.js.map +0 -1
  28. package/lib/module/screens/CRM/FunnelChart.js.map +0 -1
  29. package/lib/module/screens/CRM/InfoCard.js.map +0 -1
  30. package/lib/module/screens/CRM/LeadCard.js.map +0 -1
  31. package/lib/module/screens/CRM/LogCallScreen.js.map +0 -1
  32. package/lib/module/screens/CRM/TopTabs.js.map +0 -1
  33. package/lib/module/screens/CRM/index.js.map +0 -1
  34. package/lib/module/screens/ReportsScreen.js.map +0 -1
  35. package/lib/module/screens/Tabs/ActivityAnalytics.js.map +0 -1
  36. package/lib/module/screens/Tabs/CRMScreen.js.map +0 -1
  37. package/lib/module/screens/Tabs/DigitalDiary.js.map +0 -1
  38. package/lib/module/screens/Tabs/HomeScreen.js.map +0 -1
  39. package/lib/module/screens/Tabs/NotificationsScreen.js.map +0 -1
  40. package/lib/module/screens/contentliberary/contentliberary.js.map +0 -1
  41. package/lib/module/services/api.js.map +0 -1
  42. package/lib/module/services/authService.js.map +0 -1
  43. package/lib/module/store/index.js.map +0 -1
  44. package/lib/typescript/src/NativeSalespanda.d.ts.map +0 -1
  45. package/lib/typescript/src/SalespandaApp.d.ts.map +0 -1
  46. package/lib/typescript/src/assets/images/index.d.ts.map +0 -1
  47. package/lib/typescript/src/components/BottomSheet.d.ts.map +0 -1
  48. package/lib/typescript/src/components/ContactViaModal.d.ts.map +0 -1
  49. package/lib/typescript/src/components/Loader.d.ts.map +0 -1
  50. package/lib/typescript/src/components/ScreenHeader.d.ts.map +0 -1
  51. package/lib/typescript/src/components/SearchBar.d.ts.map +0 -1
  52. package/lib/typescript/src/components/TabsHeader.d.ts.map +0 -1
  53. package/lib/typescript/src/components/index.d.ts.map +0 -1
  54. package/lib/typescript/src/config/FlavorConfig.d.ts.map +0 -1
  55. package/lib/typescript/src/config/SalespandaConfig.d.ts.map +0 -1
  56. package/lib/typescript/src/constants/Colors.d.ts.map +0 -1
  57. package/lib/typescript/src/constants/GetPlatorm.d.ts.map +0 -1
  58. package/lib/typescript/src/index.d.ts.map +0 -1
  59. package/lib/typescript/src/navigation/AppNavigator.d.ts.map +0 -1
  60. package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +0 -1
  61. package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +0 -1
  62. package/lib/typescript/src/navigation/StackNavigator.d.ts.map +0 -1
  63. package/lib/typescript/src/screens/CRM/AddContactModal.d.ts.map +0 -1
  64. package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts.map +0 -1
  65. package/lib/typescript/src/screens/CRM/ContactItem.d.ts.map +0 -1
  66. package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts.map +0 -1
  67. package/lib/typescript/src/screens/CRM/FunnelChart.d.ts.map +0 -1
  68. package/lib/typescript/src/screens/CRM/InfoCard.d.ts.map +0 -1
  69. package/lib/typescript/src/screens/CRM/LeadCard.d.ts.map +0 -1
  70. package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts.map +0 -1
  71. package/lib/typescript/src/screens/CRM/TopTabs.d.ts.map +0 -1
  72. package/lib/typescript/src/screens/CRM/index.d.ts.map +0 -1
  73. package/lib/typescript/src/screens/ReportsScreen.d.ts.map +0 -1
  74. package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts.map +0 -1
  75. package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts.map +0 -1
  76. package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts.map +0 -1
  77. package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts.map +0 -1
  78. package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts.map +0 -1
  79. package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts.map +0 -1
  80. package/lib/typescript/src/services/api.d.ts.map +0 -1
  81. package/lib/typescript/src/services/authService.d.ts.map +0 -1
  82. package/lib/typescript/src/store/index.d.ts.map +0 -1
  83. package/src/NativeSalespanda.ts +0 -7
  84. package/src/SalespandaApp.tsx +0 -141
  85. package/src/assets/images/bottomtabs/analytics.png +0 -0
  86. package/src/assets/images/bottomtabs/analyticsactive.png +0 -0
  87. package/src/assets/images/bottomtabs/crm.png +0 -0
  88. package/src/assets/images/bottomtabs/crmactive.png +0 -0
  89. package/src/assets/images/bottomtabs/diary.png +0 -0
  90. package/src/assets/images/bottomtabs/diaryactive.png +0 -0
  91. package/src/assets/images/bottomtabs/home.png +0 -0
  92. package/src/assets/images/bottomtabs/homeactive.png +0 -0
  93. package/src/assets/images/bottomtabs/notification.png +0 -0
  94. package/src/assets/images/bottomtabs/notificationactive.png +0 -0
  95. package/src/assets/images/index.js +0 -11
  96. package/src/assets/images/index.ts +0 -40
  97. package/src/components/BottomSheet.tsx +0 -146
  98. package/src/components/ContactViaModal.tsx +0 -80
  99. package/src/components/Loader.tsx +0 -48
  100. package/src/components/ScreenHeader.tsx +0 -57
  101. package/src/components/SearchBar.tsx +0 -59
  102. package/src/components/TabsHeader.tsx +0 -72
  103. package/src/components/index.ts +0 -5
  104. package/src/config/FlavorConfig.ts +0 -55
  105. package/src/config/SalespandaConfig.ts +0 -142
  106. package/src/constants/Colors.ts +0 -17
  107. package/src/constants/GetPlatorm.ts +0 -29
  108. package/src/index.tsx +0 -31
  109. package/src/navigation/AppNavigator.tsx +0 -24
  110. package/src/navigation/BottomTabNavigator.tsx +0 -181
  111. package/src/navigation/DrawerNavigator.tsx +0 -306
  112. package/src/navigation/StackNavigator.tsx +0 -32
  113. package/src/screens/CRM/AddContactModal.tsx +0 -57
  114. package/src/screens/CRM/CategoryTabs.tsx +0 -109
  115. package/src/screens/CRM/ContactItem.tsx +0 -168
  116. package/src/screens/CRM/FilterDropdown.tsx +0 -34
  117. package/src/screens/CRM/FunnelChart.tsx +0 -103
  118. package/src/screens/CRM/InfoCard.tsx +0 -51
  119. package/src/screens/CRM/LeadCard.tsx +0 -69
  120. package/src/screens/CRM/LogCallScreen.tsx +0 -318
  121. package/src/screens/CRM/TopTabs.tsx +0 -95
  122. package/src/screens/CRM/index.ts +0 -10
  123. package/src/screens/ReportsScreen.tsx +0 -37
  124. package/src/screens/Tabs/ActivityAnalytics.tsx +0 -25
  125. package/src/screens/Tabs/CRMScreen.tsx +0 -381
  126. package/src/screens/Tabs/DigitalDiary.tsx +0 -35
  127. package/src/screens/Tabs/HomeScreen.tsx +0 -379
  128. package/src/screens/Tabs/NotificationsScreen.tsx +0 -25
  129. package/src/screens/contentliberary/contentliberary.tsx +0 -268
  130. package/src/services/api.ts +0 -173
  131. package/src/services/authService.ts +0 -75
  132. package/src/store/index.ts +0 -16
@@ -1,29 +0,0 @@
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 DELETED
@@ -1,31 +0,0 @@
1
- export { default } from './SalespandaApp';
2
- export { default as SalespandaApp } from './SalespandaApp';
3
- export type { SalespandaAppProps } from './SalespandaApp';
4
-
5
- export {
6
- initializeSalespanda,
7
- getSalespandaConfig,
8
- resetSalespandaConfig,
9
- } from './config/SalespandaConfig';
10
- export type { SalespandaConfig } from './config/SalespandaConfig';
11
-
12
- export {
13
- login,
14
- logout,
15
- isAuthenticated,
16
- getCurrentUser,
17
- getCurrentToken,
18
- } from './services/authService';
19
-
20
- export { getFlavorConfig } from './config/FlavorConfig';
21
- export { default as FlavorConfig } from './config/FlavorConfig';
22
-
23
- export { default as AppNavigator } from './navigation/AppNavigator';
24
- export { default as DrawerNavigator } from './navigation/DrawerNavigator';
25
- export { default as BottomTabNavigator } from './navigation/BottomTabNavigator';
26
-
27
- export { default as HomeScreen } from './screens/Tabs/HomeScreen';
28
- export { default as ProfileScreen } from './screens/Tabs/ActivityAnalytics';
29
- export { default as NotificationsScreen } from './screens/Tabs/NotificationsScreen';
30
- export { default as ReportsScreen } from './screens/ReportsScreen';
31
- export { default as PremiumScreen } from './screens/Tabs/CRMScreen';
@@ -1,24 +0,0 @@
1
- import { NavigationContainer } from '@react-navigation/native';
2
- import { StyleSheet } from 'react-native';
3
- import StackNavigator from './StackNavigator';
4
- import { SafeAreaView } from 'react-native-safe-area-context';
5
- import { Colors } from '../constants/Colors';
6
-
7
- const AppNavigator: React.FC = () => {
8
- return (
9
- <NavigationContainer>
10
- <SafeAreaView style={styles.container} edges={['bottom', 'top']}>
11
- <StackNavigator />
12
- </SafeAreaView>
13
- </NavigationContainer>
14
- );
15
- };
16
-
17
- export default AppNavigator;
18
-
19
- const styles = StyleSheet.create({
20
- container: {
21
- flex: 1,
22
- backgroundColor: Colors.background,
23
- },
24
- });
@@ -1,181 +0,0 @@
1
- import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
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
- import ReportsScreen from '../screens/ReportsScreen';
6
- import { SafeAreaView } from 'react-native-safe-area-context';
7
- import { Colors } from '../constants/Colors';
8
- import {
9
- analyticsIcon,
10
- analyticsIconActive,
11
- crmIcon,
12
- crmIconActive,
13
- diaryIcon,
14
- diaryIconActive,
15
- homeIcon,
16
- homeIconActive,
17
- notificationIcon,
18
- notificationIconActive,
19
- } from '../assets/images';
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';
24
-
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>();
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) {
48
- return (
49
- <View style={styles.activeIconContainer}>
50
- <Image
51
- source={active}
52
- resizeMode="contain"
53
- style={styles.activeIcon}
54
- />
55
- </View>
56
- );
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();
70
-
71
- return (
72
- <SafeAreaView style={styles.container} edges={['bottom']}>
73
- <Tab.Navigator
74
- screenOptions={{
75
- headerShown: false,
76
- sceneStyle: { backgroundColor: Colors.background },
77
- tabBarShowLabel: false,
78
- tabBarStyle: styles.tabBar,
79
- tabBarItemStyle: { overflow: 'visible' },
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
- }}
97
- >
98
- <Tab.Screen
99
- name="Home"
100
- component={HomeScreen}
101
- options={{
102
- tabBarIcon: ImageIcon({
103
- inactive: homeIcon,
104
- active: homeIconActive,
105
- }),
106
- }}
107
- />
108
- <Tab.Screen
109
- name="CRM"
110
- component={CRMScreen}
111
- options={{
112
- tabBarIcon: ImageIcon({ inactive: crmIcon, active: crmIconActive }),
113
- }}
114
- />
115
- <Tab.Screen
116
- name="Reports"
117
- component={ReportsScreen}
118
- options={{
119
- tabBarIcon: ImageIcon({
120
- inactive: diaryIcon,
121
- active: diaryIconActive,
122
- }),
123
- }}
124
- />
125
- <Tab.Screen
126
- name="Notifications"
127
- component={NotificationsScreen}
128
- options={{
129
- tabBarIcon: ImageIcon({
130
- inactive: notificationIcon,
131
- active: notificationIconActive,
132
- }),
133
- }}
134
- />
135
- <Tab.Screen
136
- name="Activity Analytics"
137
- component={ActivityAnalytics}
138
- options={{
139
- tabBarIcon: ImageIcon({
140
- inactive: analyticsIcon,
141
- active: analyticsIconActive,
142
- }),
143
- }}
144
- />
145
- </Tab.Navigator>
146
- </SafeAreaView>
147
- );
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
- height: verticalScale(40),
162
- },
163
- activeIconContainer: {
164
- width: scale(48),
165
- height: scale(48),
166
- borderRadius: moderateScale(24),
167
- alignItems: 'center',
168
- justifyContent: 'center',
169
- borderWidth: 4,
170
- borderColor: Colors.white,
171
- transform: [{ translateY: verticalScale(-6) }],
172
- },
173
- activeIcon: {
174
- width: scale(42),
175
- height: scale(42),
176
- tintColor: Colors.primary,
177
- },
178
- inactiveIcon: {
179
- tintColor: Colors.black30,
180
- },
181
- });
@@ -1,306 +0,0 @@
1
- import * as React from 'react';
2
- import { createDrawerNavigator } from '@react-navigation/drawer';
3
- import {
4
- View,
5
- Text,
6
- StyleSheet,
7
- TouchableOpacity,
8
- Image,
9
- ScrollView,
10
- } from 'react-native';
11
- import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
12
- import BottomTabNavigator from './BottomTabNavigator';
13
- import { Colors } from '../constants/Colors';
14
- import ProfileScreen from '../screens/Tabs/ActivityAnalytics';
15
- import { GetPlatform } from '../constants/GetPlatorm';
16
-
17
- const Drawer = createDrawerNavigator();
18
-
19
- interface DrawerItemProps {
20
- label: string;
21
- onPress: () => void;
22
- active?: boolean;
23
- }
24
-
25
- const DrawerItem: React.FC<DrawerItemProps> = ({
26
- label,
27
- onPress,
28
- active = false,
29
- }) => {
30
- return (
31
- <TouchableOpacity
32
- style={[styles.drawerItem, active && styles.activeDrawerItem]}
33
- onPress={onPress}
34
- >
35
- <Text style={[styles.drawerLabel, active && styles.activeDrawerLabel]}>
36
- {label}
37
- </Text>
38
- </TouchableOpacity>
39
- );
40
- };
41
-
42
- interface CustomDrawerContentProps {
43
- navigation: any;
44
- state?: any;
45
- }
46
-
47
- const CustomDrawerContent: React.FC<CustomDrawerContentProps> = ({
48
- navigation,
49
- }) => {
50
- const [expanded, setExpanded] = React.useState<Record<string, boolean>>({
51
- 'Campaign': false,
52
- 'Sales WAR Room': false,
53
- 'Pipeline': false,
54
- });
55
- const toggle = (key: string) =>
56
- setExpanded((prev) => ({ ...prev, [key]: !prev[key] }));
57
-
58
- const groups: Array<{
59
- label: string;
60
- children?: Array<{ label: string; onPress: () => void }>;
61
- onPress?: () => void;
62
- }> = [
63
- { label: 'Content Library', onPress: () => {} },
64
- {
65
- label: 'Campaign',
66
- children: [
67
- { label: 'Run Campaign', onPress: () => {} },
68
- { label: 'List', onPress: () => {} },
69
- ],
70
- },
71
- { label: 'My Activity', onPress: () => {} },
72
- { label: 'DigiCard', onPress: () => {} },
73
- { label: 'My Profile', onPress: () => navigation.navigate('Profile') },
74
- {
75
- label: 'Sales WAR Room',
76
- children: [
77
- { label: 'Forms & Brochures', onPress: () => {} },
78
- { label: 'CXO Announcements', onPress: () => {} },
79
- { label: 'Training/Sales Content', onPress: () => {} },
80
- ],
81
- },
82
- { label: 'Tasks', onPress: () => {} },
83
- { label: 'Import Phone Contacts', onPress: () => {} },
84
- {
85
- label: 'Pipeline',
86
- children: [
87
- { label: 'Leads', onPress: () => {} },
88
- { label: 'Contacts', onPress: () => {} },
89
- { label: 'Email Activity', onPress: () => {} },
90
- ],
91
- },
92
- { label: 'Notification', onPress: () => {} },
93
- { label: 'Settings', onPress: () => {} },
94
- { label: 'Help & Support', onPress: () => {} },
95
- ];
96
-
97
- return (
98
- <View style={styles.drawerContainer}>
99
- <ScrollView
100
- style={styles.drawerContent}
101
- showsVerticalScrollIndicator={false}
102
- >
103
- <View style={styles.drawerHeader}>
104
- <View style={styles.headerRow}>
105
- <Image
106
- source={{ uri: 'https://via.placeholder.com/80x80' }}
107
- style={styles.drawerAvatar}
108
- />
109
- <View style={styles.headerTextCol}>
110
- <Text style={styles.drawerName}>Eduuu Parrtner</Text>
111
- <TouchableOpacity style={styles.badgeButton}>
112
- <Text style={styles.badgeText}>Go to Microsite</Text>
113
- </TouchableOpacity>
114
- </View>
115
- </View>
116
- </View>
117
- {groups.map((group, index) => {
118
- const hasChildren =
119
- Array.isArray(group.children) && group.children.length > 0;
120
- if (!hasChildren) {
121
- return (
122
- <View key={group.label}>
123
- {index > 0 ? <View style={styles.drawerDivider} /> : null}
124
- <DrawerItem
125
- label={group.label}
126
- onPress={group.onPress ?? (() => {})}
127
- />
128
- </View>
129
- );
130
- }
131
- const isOpen = !!expanded[group.label];
132
- return (
133
- <View key={group.label}>
134
- {index > 0 ? <View style={styles.drawerDivider} /> : null}
135
- <TouchableOpacity
136
- style={styles.drawerItem}
137
- onPress={() => toggle(group.label)}
138
- activeOpacity={0.7}
139
- >
140
- <Text style={[styles.drawerLabel, styles.flexOne]}>
141
- {group.label}
142
- </Text>
143
- <Text style={styles.chevron}>{isOpen ? '▾' : '▸'}</Text>
144
- </TouchableOpacity>
145
- {isOpen &&
146
- group.children!.map((child, cIdx) => (
147
- <View key={child.label}>
148
- {cIdx > 0 ? <View style={styles.drawerDivider} /> : null}
149
- <TouchableOpacity
150
- style={styles.childItem}
151
- onPress={child.onPress}
152
- >
153
- <Text style={styles.childLabel}>{child.label}</Text>
154
- </TouchableOpacity>
155
- </View>
156
- ))}
157
- </View>
158
- );
159
- })}
160
- </ScrollView>
161
- </View>
162
- );
163
- };
164
-
165
- const renderDrawerContent = (props: any) => {
166
- return <CustomDrawerContent navigation={props.navigation} />;
167
- };
168
-
169
- const DrawerNavigator: React.FC = () => {
170
- return (
171
- <Drawer.Navigator
172
- drawerContent={renderDrawerContent}
173
- screenOptions={{
174
- headerShown: false,
175
- drawerType: 'slide',
176
- swipeEdgeWidth: 100,
177
- drawerStyle: {
178
- width: scale(280),
179
- backgroundColor: Colors.primary,
180
- },
181
- headerStyle: {
182
- backgroundColor: Colors.white,
183
- },
184
- headerTintColor: Colors.primary,
185
- headerTitleAlign: 'left',
186
- headerTitleStyle: {
187
- fontWeight: '600',
188
- color: Colors.black,
189
- },
190
- }}
191
- >
192
- <Drawer.Screen
193
- name="HomeTabs"
194
- component={BottomTabNavigator}
195
- options={{
196
- title: 'Home Page',
197
- }}
198
- />
199
- <Drawer.Screen
200
- name="Profile"
201
- component={ProfileScreen}
202
- options={{
203
- title: 'Profile',
204
- }}
205
- />
206
- </Drawer.Navigator>
207
- );
208
- };
209
-
210
- export default DrawerNavigator;
211
-
212
- const styles = StyleSheet.create({
213
- drawerContainer: {
214
- flex: 1,
215
- backgroundColor: Colors.primary,
216
- },
217
- drawerHeader: {
218
- backgroundColor: Colors.primary,
219
- paddingHorizontal: scale(20),
220
- paddingTop: verticalScale(36),
221
- paddingBottom: verticalScale(16),
222
- alignItems: 'flex-start',
223
- },
224
- headerRow: {
225
- width: '100%',
226
- flexDirection: 'row',
227
- alignItems: 'center',
228
- marginTop: GetPlatform(verticalScale(20), 0),
229
- },
230
- drawerAvatar: {
231
- width: scale(60),
232
- height: scale(60),
233
- borderRadius: moderateScale(40),
234
- marginRight: scale(14),
235
- borderWidth: 2,
236
- borderColor: Colors.black30,
237
- },
238
- headerTextCol: {
239
- flex: 1,
240
- justifyContent: 'center',
241
- },
242
- drawerName: {
243
- fontSize: moderateScale(20),
244
- fontWeight: '600',
245
- color: Colors.white,
246
- marginBottom: verticalScale(10),
247
- },
248
- badgeButton: {
249
- borderWidth: 1,
250
- borderColor: Colors.white,
251
- paddingHorizontal: scale(12),
252
- paddingVertical: verticalScale(6),
253
- borderRadius: moderateScale(16),
254
- alignSelf: 'flex-start',
255
- },
256
- badgeText: {
257
- color: Colors.white,
258
- fontSize: moderateScale(12),
259
- fontWeight: '500',
260
- },
261
- drawerContent: {
262
- flex: 1,
263
- paddingTop: verticalScale(8),
264
- },
265
- drawerItem: {
266
- flexDirection: 'row',
267
- alignItems: 'center',
268
- padding: scale(10),
269
- paddingHorizontal: scale(20),
270
- },
271
- activeDrawerItem: {
272
- backgroundColor: 'rgba(255,255,255,0.08)',
273
- borderLeftWidth: 0,
274
- },
275
- drawerLabel: {
276
- fontSize: moderateScale(16),
277
- color: Colors.white,
278
- fontWeight: '700',
279
- },
280
- activeDrawerLabel: {
281
- fontWeight: '600',
282
- color: Colors.white,
283
- },
284
- chevron: {
285
- color: 'rgba(255,255,255,0.9)',
286
- fontSize: moderateScale(24),
287
- },
288
- drawerDivider: {
289
- height: 1,
290
- backgroundColor: Colors.black10,
291
- marginVertical: verticalScale(4),
292
- marginLeft: scale(20),
293
- },
294
- childItem: {
295
- paddingVertical: verticalScale(6),
296
- paddingLeft: scale(60),
297
- },
298
- childLabel: {
299
- fontSize: moderateScale(15),
300
- color: Colors.white,
301
- fontWeight: '500',
302
- },
303
- flexOne: {
304
- flex: 1,
305
- },
306
- });
@@ -1,32 +0,0 @@
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;
@@ -1,57 +0,0 @@
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
- };