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.
- package/README.md +50 -102
- package/lib/module/assets/images/index.js +22 -1
- package/package.json +3 -4
- package/react-native.config.js +4 -3
- package/lib/module/NativeSalespanda.js.map +0 -1
- package/lib/module/SalespandaApp.js.map +0 -1
- package/lib/module/assets/images/index.js.map +0 -1
- package/lib/module/components/BottomSheet.js.map +0 -1
- package/lib/module/components/ContactViaModal.js.map +0 -1
- package/lib/module/components/Loader.js.map +0 -1
- package/lib/module/components/ScreenHeader.js.map +0 -1
- package/lib/module/components/SearchBar.js.map +0 -1
- package/lib/module/components/TabsHeader.js.map +0 -1
- package/lib/module/components/index.js.map +0 -1
- package/lib/module/config/FlavorConfig.js.map +0 -1
- package/lib/module/config/SalespandaConfig.js.map +0 -1
- package/lib/module/constants/Colors.js.map +0 -1
- package/lib/module/constants/GetPlatorm.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/navigation/AppNavigator.js.map +0 -1
- package/lib/module/navigation/BottomTabNavigator.js.map +0 -1
- package/lib/module/navigation/DrawerNavigator.js.map +0 -1
- package/lib/module/navigation/StackNavigator.js.map +0 -1
- package/lib/module/screens/CRM/AddContactModal.js.map +0 -1
- package/lib/module/screens/CRM/CategoryTabs.js.map +0 -1
- package/lib/module/screens/CRM/ContactItem.js.map +0 -1
- package/lib/module/screens/CRM/FilterDropdown.js.map +0 -1
- package/lib/module/screens/CRM/FunnelChart.js.map +0 -1
- package/lib/module/screens/CRM/InfoCard.js.map +0 -1
- package/lib/module/screens/CRM/LeadCard.js.map +0 -1
- package/lib/module/screens/CRM/LogCallScreen.js.map +0 -1
- package/lib/module/screens/CRM/TopTabs.js.map +0 -1
- package/lib/module/screens/CRM/index.js.map +0 -1
- package/lib/module/screens/ReportsScreen.js.map +0 -1
- package/lib/module/screens/Tabs/ActivityAnalytics.js.map +0 -1
- package/lib/module/screens/Tabs/CRMScreen.js.map +0 -1
- package/lib/module/screens/Tabs/DigitalDiary.js.map +0 -1
- package/lib/module/screens/Tabs/HomeScreen.js.map +0 -1
- package/lib/module/screens/Tabs/NotificationsScreen.js.map +0 -1
- package/lib/module/screens/contentliberary/contentliberary.js.map +0 -1
- package/lib/module/services/api.js.map +0 -1
- package/lib/module/services/authService.js.map +0 -1
- package/lib/module/store/index.js.map +0 -1
- package/lib/typescript/src/NativeSalespanda.d.ts.map +0 -1
- package/lib/typescript/src/SalespandaApp.d.ts.map +0 -1
- package/lib/typescript/src/assets/images/index.d.ts.map +0 -1
- package/lib/typescript/src/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/src/components/ContactViaModal.d.ts.map +0 -1
- package/lib/typescript/src/components/Loader.d.ts.map +0 -1
- package/lib/typescript/src/components/ScreenHeader.d.ts.map +0 -1
- package/lib/typescript/src/components/SearchBar.d.ts.map +0 -1
- package/lib/typescript/src/components/TabsHeader.d.ts.map +0 -1
- package/lib/typescript/src/components/index.d.ts.map +0 -1
- package/lib/typescript/src/config/FlavorConfig.d.ts.map +0 -1
- package/lib/typescript/src/config/SalespandaConfig.d.ts.map +0 -1
- package/lib/typescript/src/constants/Colors.d.ts.map +0 -1
- package/lib/typescript/src/constants/GetPlatorm.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts.map +0 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +0 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +0 -1
- package/lib/typescript/src/navigation/StackNavigator.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts.map +0 -1
- package/lib/typescript/src/services/api.d.ts.map +0 -1
- package/lib/typescript/src/services/authService.d.ts.map +0 -1
- package/lib/typescript/src/store/index.d.ts.map +0 -1
- package/src/NativeSalespanda.ts +0 -7
- package/src/SalespandaApp.tsx +0 -141
- 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 +0 -11
- package/src/assets/images/index.ts +0 -40
- package/src/components/BottomSheet.tsx +0 -146
- package/src/components/ContactViaModal.tsx +0 -80
- package/src/components/Loader.tsx +0 -48
- package/src/components/ScreenHeader.tsx +0 -57
- package/src/components/SearchBar.tsx +0 -59
- package/src/components/TabsHeader.tsx +0 -72
- package/src/components/index.ts +0 -5
- package/src/config/FlavorConfig.ts +0 -55
- package/src/config/SalespandaConfig.ts +0 -142
- package/src/constants/Colors.ts +0 -17
- package/src/constants/GetPlatorm.ts +0 -29
- package/src/index.tsx +0 -31
- package/src/navigation/AppNavigator.tsx +0 -24
- package/src/navigation/BottomTabNavigator.tsx +0 -181
- package/src/navigation/DrawerNavigator.tsx +0 -306
- package/src/navigation/StackNavigator.tsx +0 -32
- package/src/screens/CRM/AddContactModal.tsx +0 -57
- package/src/screens/CRM/CategoryTabs.tsx +0 -109
- package/src/screens/CRM/ContactItem.tsx +0 -168
- package/src/screens/CRM/FilterDropdown.tsx +0 -34
- package/src/screens/CRM/FunnelChart.tsx +0 -103
- package/src/screens/CRM/InfoCard.tsx +0 -51
- package/src/screens/CRM/LeadCard.tsx +0 -69
- package/src/screens/CRM/LogCallScreen.tsx +0 -318
- package/src/screens/CRM/TopTabs.tsx +0 -95
- package/src/screens/CRM/index.ts +0 -10
- package/src/screens/ReportsScreen.tsx +0 -37
- package/src/screens/Tabs/ActivityAnalytics.tsx +0 -25
- package/src/screens/Tabs/CRMScreen.tsx +0 -381
- package/src/screens/Tabs/DigitalDiary.tsx +0 -35
- package/src/screens/Tabs/HomeScreen.tsx +0 -379
- package/src/screens/Tabs/NotificationsScreen.tsx +0 -25
- package/src/screens/contentliberary/contentliberary.tsx +0 -268
- package/src/services/api.ts +0 -173
- package/src/services/authService.ts +0 -75
- package/src/store/index.ts +0 -16
|
@@ -1,109 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,168 +0,0 @@
|
|
|
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 ContactItemProps {
|
|
6
|
-
name: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
email?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
avatarColor: string;
|
|
11
|
-
avatarInitial: string;
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
onPress?: () => void;
|
|
14
|
-
onSelectToggle?: () => void;
|
|
15
|
-
onReminderPress?: () => void;
|
|
16
|
-
onCallPress?: () => void;
|
|
17
|
-
onMenuPress?: () => void;
|
|
18
|
-
showCheckbox?: boolean;
|
|
19
|
-
showActionButtons?: boolean;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const ContactItem: React.FC<ContactItemProps> = ({
|
|
23
|
-
name,
|
|
24
|
-
phone,
|
|
25
|
-
email,
|
|
26
|
-
description,
|
|
27
|
-
avatarColor,
|
|
28
|
-
avatarInitial,
|
|
29
|
-
selected = false,
|
|
30
|
-
onPress,
|
|
31
|
-
onSelectToggle,
|
|
32
|
-
onReminderPress,
|
|
33
|
-
onCallPress,
|
|
34
|
-
onMenuPress,
|
|
35
|
-
showCheckbox = false,
|
|
36
|
-
showActionButtons = false,
|
|
37
|
-
}) => {
|
|
38
|
-
return (
|
|
39
|
-
<TouchableOpacity
|
|
40
|
-
style={styles.contactItem}
|
|
41
|
-
onPress={onPress}
|
|
42
|
-
activeOpacity={0.7}
|
|
43
|
-
>
|
|
44
|
-
<View style={[styles.avatar, { backgroundColor: avatarColor }]}>
|
|
45
|
-
<Text style={styles.avatarText}>{avatarInitial}</Text>
|
|
46
|
-
</View>
|
|
47
|
-
<View style={styles.contactInfo}>
|
|
48
|
-
<Text style={styles.contactName}>{name}</Text>
|
|
49
|
-
{phone && <Text style={styles.contactPhone}>{phone}</Text>}
|
|
50
|
-
{email && <Text style={styles.contactEmail}>{email}</Text>}
|
|
51
|
-
{description && (
|
|
52
|
-
<Text
|
|
53
|
-
style={styles.contactDescription}
|
|
54
|
-
numberOfLines={1}
|
|
55
|
-
ellipsizeMode="tail"
|
|
56
|
-
>
|
|
57
|
-
{description}
|
|
58
|
-
</Text>
|
|
59
|
-
)}
|
|
60
|
-
</View>
|
|
61
|
-
{showActionButtons && (
|
|
62
|
-
<View style={styles.actionButtons}>
|
|
63
|
-
<TouchableOpacity
|
|
64
|
-
style={styles.actionButton}
|
|
65
|
-
onPress={onReminderPress}
|
|
66
|
-
>
|
|
67
|
-
<Text style={styles.actionIcon}>⏰</Text>
|
|
68
|
-
</TouchableOpacity>
|
|
69
|
-
<TouchableOpacity style={styles.actionButton} onPress={onCallPress}>
|
|
70
|
-
<Text style={styles.actionIcon}>📞</Text>
|
|
71
|
-
</TouchableOpacity>
|
|
72
|
-
<TouchableOpacity style={styles.actionButton} onPress={onMenuPress}>
|
|
73
|
-
<Text style={styles.actionIcon}>⋮</Text>
|
|
74
|
-
</TouchableOpacity>
|
|
75
|
-
</View>
|
|
76
|
-
)}
|
|
77
|
-
{showCheckbox && (
|
|
78
|
-
<TouchableOpacity style={styles.checkbox} onPress={onSelectToggle}>
|
|
79
|
-
<View
|
|
80
|
-
style={[styles.checkboxInner, selected && styles.checkboxSelected]}
|
|
81
|
-
>
|
|
82
|
-
{selected && <Text style={styles.checkmark}>✓</Text>}
|
|
83
|
-
</View>
|
|
84
|
-
</TouchableOpacity>
|
|
85
|
-
)}
|
|
86
|
-
</TouchableOpacity>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const styles = StyleSheet.create({
|
|
91
|
-
contactItem: {
|
|
92
|
-
flexDirection: 'row',
|
|
93
|
-
alignItems: 'center',
|
|
94
|
-
backgroundColor: Colors.white,
|
|
95
|
-
padding: scale(16),
|
|
96
|
-
borderBottomWidth: 1,
|
|
97
|
-
borderBottomColor: '#E0E0E0',
|
|
98
|
-
},
|
|
99
|
-
avatar: {
|
|
100
|
-
width: scale(46),
|
|
101
|
-
height: scale(46),
|
|
102
|
-
borderRadius: moderateScale(23),
|
|
103
|
-
justifyContent: 'center',
|
|
104
|
-
alignItems: 'center',
|
|
105
|
-
marginRight: scale(12),
|
|
106
|
-
},
|
|
107
|
-
avatarText: {
|
|
108
|
-
fontSize: moderateScale(24),
|
|
109
|
-
fontWeight: '700',
|
|
110
|
-
color: Colors.white,
|
|
111
|
-
},
|
|
112
|
-
contactInfo: {
|
|
113
|
-
flex: 1,
|
|
114
|
-
},
|
|
115
|
-
contactName: {
|
|
116
|
-
fontSize: moderateScale(16),
|
|
117
|
-
fontWeight: '700',
|
|
118
|
-
color: Colors.black,
|
|
119
|
-
marginBottom: verticalScale(4),
|
|
120
|
-
},
|
|
121
|
-
contactPhone: {
|
|
122
|
-
fontSize: moderateScale(12),
|
|
123
|
-
color: Colors.black,
|
|
124
|
-
marginBottom: verticalScale(2),
|
|
125
|
-
},
|
|
126
|
-
contactEmail: {
|
|
127
|
-
fontSize: moderateScale(12),
|
|
128
|
-
color: '#666',
|
|
129
|
-
marginBottom: verticalScale(4),
|
|
130
|
-
},
|
|
131
|
-
contactDescription: {
|
|
132
|
-
fontSize: moderateScale(12),
|
|
133
|
-
color: Colors.black,
|
|
134
|
-
lineHeight: verticalScale(18),
|
|
135
|
-
},
|
|
136
|
-
actionButtons: {
|
|
137
|
-
flexDirection: 'row',
|
|
138
|
-
alignItems: 'center',
|
|
139
|
-
},
|
|
140
|
-
actionButton: {
|
|
141
|
-
padding: scale(8),
|
|
142
|
-
marginLeft: scale(8),
|
|
143
|
-
},
|
|
144
|
-
actionIcon: {
|
|
145
|
-
fontSize: moderateScale(20),
|
|
146
|
-
color: Colors.black,
|
|
147
|
-
},
|
|
148
|
-
checkbox: {
|
|
149
|
-
padding: scale(8),
|
|
150
|
-
},
|
|
151
|
-
checkboxInner: {
|
|
152
|
-
width: scale(28),
|
|
153
|
-
height: scale(28),
|
|
154
|
-
borderWidth: 2,
|
|
155
|
-
borderColor: '#FF9800',
|
|
156
|
-
borderRadius: moderateScale(4),
|
|
157
|
-
justifyContent: 'center',
|
|
158
|
-
alignItems: 'center',
|
|
159
|
-
},
|
|
160
|
-
checkboxSelected: {
|
|
161
|
-
backgroundColor: '#FF9800',
|
|
162
|
-
},
|
|
163
|
-
checkmark: {
|
|
164
|
-
color: Colors.white,
|
|
165
|
-
fontSize: moderateScale(16),
|
|
166
|
-
fontWeight: '700',
|
|
167
|
-
},
|
|
168
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
2
|
-
import { scale, moderateScale } from 'react-native-size-matters';
|
|
3
|
-
|
|
4
|
-
interface FilterDropdownProps {
|
|
5
|
-
onPress?: () => void;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const FilterDropdown: React.FC<FilterDropdownProps> = ({ onPress }) => {
|
|
9
|
-
return (
|
|
10
|
-
<TouchableOpacity style={styles.filterButton} onPress={onPress}>
|
|
11
|
-
<Text style={styles.filterText}>Filter By</Text>
|
|
12
|
-
<Text style={styles.filterArrow}>▼</Text>
|
|
13
|
-
</TouchableOpacity>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const styles = StyleSheet.create({
|
|
18
|
-
filterButton: {
|
|
19
|
-
flexDirection: 'row',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
justifyContent: 'flex-end',
|
|
22
|
-
paddingHorizontal: scale(16),
|
|
23
|
-
},
|
|
24
|
-
filterText: {
|
|
25
|
-
fontSize: moderateScale(16),
|
|
26
|
-
fontWeight: '600',
|
|
27
|
-
color: '#FF9800',
|
|
28
|
-
marginRight: scale(4),
|
|
29
|
-
},
|
|
30
|
-
filterArrow: {
|
|
31
|
-
fontSize: moderateScale(12),
|
|
32
|
-
color: '#FF9800',
|
|
33
|
-
},
|
|
34
|
-
});
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
View,
|
|
3
|
-
Text,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
TouchableOpacity,
|
|
6
|
-
Dimensions,
|
|
7
|
-
} from 'react-native';
|
|
8
|
-
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
9
|
-
import { Colors } from '../../constants/Colors';
|
|
10
|
-
|
|
11
|
-
const { width } = Dimensions.get('window');
|
|
12
|
-
|
|
13
|
-
interface FunnelData {
|
|
14
|
-
followUp: number;
|
|
15
|
-
new: number;
|
|
16
|
-
engaged: number;
|
|
17
|
-
deal: number;
|
|
18
|
-
quoteSent: number;
|
|
19
|
-
won: number;
|
|
20
|
-
dropped: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface FunnelChartProps {
|
|
24
|
-
data: FunnelData;
|
|
25
|
-
totalLeads: number;
|
|
26
|
-
onListPress?: () => void;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const FunnelChart: React.FC<FunnelChartProps> = ({
|
|
30
|
-
data,
|
|
31
|
-
totalLeads,
|
|
32
|
-
onListPress,
|
|
33
|
-
}) => {
|
|
34
|
-
const stages = [
|
|
35
|
-
{ label: 'Follow Up', value: data.followUp, width: 1.0 },
|
|
36
|
-
{ label: 'New', value: data.new, width: 0.85 },
|
|
37
|
-
{ label: 'Engaged', value: data.engaged, width: 0.7 },
|
|
38
|
-
{ label: 'Deal', value: data.deal, width: 0.55 },
|
|
39
|
-
{ label: 'Quote sent', value: data.quoteSent, width: 0.4 },
|
|
40
|
-
{ label: 'Won', value: data.won, width: 0.25 },
|
|
41
|
-
{ label: 'Dropped', value: data.dropped, width: 0.15 },
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<View style={styles.funnelContainer}>
|
|
46
|
-
<View style={styles.funnelHeader}>
|
|
47
|
-
<Text style={styles.totalLeadsText}>Total Leads: {totalLeads}</Text>
|
|
48
|
-
<TouchableOpacity onPress={onListPress}>
|
|
49
|
-
<Text style={styles.listIcon}>☰</Text>
|
|
50
|
-
</TouchableOpacity>
|
|
51
|
-
</View>
|
|
52
|
-
{stages.map((stage, index) => (
|
|
53
|
-
<View
|
|
54
|
-
key={index}
|
|
55
|
-
style={[
|
|
56
|
-
styles.funnelStage,
|
|
57
|
-
{ width: width * 0.8 * stage.width, alignSelf: 'center' },
|
|
58
|
-
]}
|
|
59
|
-
>
|
|
60
|
-
<Text style={styles.funnelStageText}>
|
|
61
|
-
{stage.label}: {stage.value}
|
|
62
|
-
</Text>
|
|
63
|
-
</View>
|
|
64
|
-
))}
|
|
65
|
-
</View>
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const styles = StyleSheet.create({
|
|
70
|
-
funnelContainer: {
|
|
71
|
-
backgroundColor: Colors.white,
|
|
72
|
-
margin: scale(16),
|
|
73
|
-
padding: scale(16),
|
|
74
|
-
borderRadius: moderateScale(12),
|
|
75
|
-
},
|
|
76
|
-
funnelHeader: {
|
|
77
|
-
flexDirection: 'row',
|
|
78
|
-
justifyContent: 'space-between',
|
|
79
|
-
alignItems: 'center',
|
|
80
|
-
marginBottom: verticalScale(20),
|
|
81
|
-
},
|
|
82
|
-
totalLeadsText: {
|
|
83
|
-
fontSize: moderateScale(16),
|
|
84
|
-
fontWeight: '700',
|
|
85
|
-
color: Colors.black,
|
|
86
|
-
},
|
|
87
|
-
listIcon: {
|
|
88
|
-
fontSize: moderateScale(20),
|
|
89
|
-
color: Colors.black,
|
|
90
|
-
},
|
|
91
|
-
funnelStage: {
|
|
92
|
-
backgroundColor: '#A5C9CA',
|
|
93
|
-
paddingVertical: verticalScale(20),
|
|
94
|
-
marginBottom: verticalScale(4),
|
|
95
|
-
borderRadius: moderateScale(4),
|
|
96
|
-
alignItems: 'center',
|
|
97
|
-
},
|
|
98
|
-
funnelStageText: {
|
|
99
|
-
fontSize: moderateScale(16),
|
|
100
|
-
fontWeight: '600',
|
|
101
|
-
color: Colors.black,
|
|
102
|
-
},
|
|
103
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { View, Text, StyleSheet } from 'react-native';
|
|
2
|
-
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
3
|
-
import { Colors } from '../../constants/Colors';
|
|
4
|
-
|
|
5
|
-
interface InfoCardProps {
|
|
6
|
-
title?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const InfoCard: React.FC<InfoCardProps> = ({
|
|
11
|
-
title = 'Engaged',
|
|
12
|
-
description = 'A Lead that is paying attention to your marketing methods and offers is called Engaged. For example,...',
|
|
13
|
-
}) => {
|
|
14
|
-
return (
|
|
15
|
-
<View style={styles.infoCard}>
|
|
16
|
-
<Text style={styles.infoTitle}>{title}</Text>
|
|
17
|
-
<Text style={styles.infoDescription}>
|
|
18
|
-
{description} <Text style={styles.readMore}>Read More</Text>
|
|
19
|
-
</Text>
|
|
20
|
-
</View>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const styles = StyleSheet.create({
|
|
25
|
-
infoCard: {
|
|
26
|
-
backgroundColor: Colors.white,
|
|
27
|
-
margin: scale(16),
|
|
28
|
-
padding: scale(16),
|
|
29
|
-
borderRadius: moderateScale(12),
|
|
30
|
-
shadowColor: Colors.black,
|
|
31
|
-
shadowOffset: { width: 0, height: verticalScale(2) },
|
|
32
|
-
shadowOpacity: 0.1,
|
|
33
|
-
shadowRadius: moderateScale(4),
|
|
34
|
-
elevation: 3,
|
|
35
|
-
},
|
|
36
|
-
infoTitle: {
|
|
37
|
-
fontSize: moderateScale(18),
|
|
38
|
-
fontWeight: '700',
|
|
39
|
-
color: Colors.black,
|
|
40
|
-
marginBottom: verticalScale(8),
|
|
41
|
-
},
|
|
42
|
-
infoDescription: {
|
|
43
|
-
fontSize: moderateScale(14),
|
|
44
|
-
color: Colors.black,
|
|
45
|
-
lineHeight: verticalScale(20),
|
|
46
|
-
},
|
|
47
|
-
readMore: {
|
|
48
|
-
color: '#FF9800',
|
|
49
|
-
fontWeight: '600',
|
|
50
|
-
},
|
|
51
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { View, Text, StyleSheet } from 'react-native';
|
|
2
|
-
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
3
|
-
import { Colors } from '../../constants/Colors';
|
|
4
|
-
|
|
5
|
-
interface LeadCardProps {
|
|
6
|
-
name: string;
|
|
7
|
-
email: string;
|
|
8
|
-
description: string;
|
|
9
|
-
timestamp: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const LeadCard: React.FC<LeadCardProps> = ({
|
|
13
|
-
name,
|
|
14
|
-
email,
|
|
15
|
-
description,
|
|
16
|
-
timestamp,
|
|
17
|
-
}) => {
|
|
18
|
-
return (
|
|
19
|
-
<View style={styles.leadCard}>
|
|
20
|
-
<Text style={styles.leadName}>{name}</Text>
|
|
21
|
-
<Text style={styles.leadEmail}>{email}</Text>
|
|
22
|
-
<View style={styles.leadDivider} />
|
|
23
|
-
<Text style={styles.leadDescription}>{description}</Text>
|
|
24
|
-
<Text style={styles.leadTimestamp}>{timestamp}</Text>
|
|
25
|
-
</View>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const styles = StyleSheet.create({
|
|
30
|
-
leadCard: {
|
|
31
|
-
backgroundColor: Colors.white,
|
|
32
|
-
margin: scale(16),
|
|
33
|
-
marginTop: 0,
|
|
34
|
-
marginBottom: verticalScale(16),
|
|
35
|
-
padding: scale(16),
|
|
36
|
-
borderRadius: moderateScale(12),
|
|
37
|
-
shadowColor: Colors.black,
|
|
38
|
-
shadowOffset: { width: 0, height: verticalScale(2) },
|
|
39
|
-
shadowOpacity: 0.1,
|
|
40
|
-
shadowRadius: moderateScale(4),
|
|
41
|
-
elevation: 3,
|
|
42
|
-
},
|
|
43
|
-
leadName: {
|
|
44
|
-
fontSize: moderateScale(18),
|
|
45
|
-
fontWeight: '700',
|
|
46
|
-
color: Colors.black,
|
|
47
|
-
marginBottom: verticalScale(6),
|
|
48
|
-
},
|
|
49
|
-
leadEmail: {
|
|
50
|
-
fontSize: moderateScale(14),
|
|
51
|
-
color: '#666',
|
|
52
|
-
marginBottom: verticalScale(12),
|
|
53
|
-
},
|
|
54
|
-
leadDivider: {
|
|
55
|
-
height: 1,
|
|
56
|
-
backgroundColor: '#E0E0E0',
|
|
57
|
-
marginVertical: verticalScale(12),
|
|
58
|
-
},
|
|
59
|
-
leadDescription: {
|
|
60
|
-
fontSize: moderateScale(14),
|
|
61
|
-
color: Colors.black,
|
|
62
|
-
lineHeight: verticalScale(20),
|
|
63
|
-
marginBottom: verticalScale(12),
|
|
64
|
-
},
|
|
65
|
-
leadTimestamp: {
|
|
66
|
-
fontSize: moderateScale(13),
|
|
67
|
-
color: '#666',
|
|
68
|
-
},
|
|
69
|
-
});
|