fln-espranza 1.1.17 → 1.1.19

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 (94) hide show
  1. package/.expo/README.md +15 -15
  2. package/.expo/settings.json +8 -8
  3. package/assets/images/bg-profile.jpg +0 -0
  4. package/assets/images/bg-stat.png +0 -0
  5. package/assets/images/empty.png +0 -0
  6. package/assets/images/icon-placeholder-schedule.png +0 -0
  7. package/components/Avatar.tsx +3 -2
  8. package/components/Drawer.tsx +150 -97
  9. package/components/EBadge.tsx +50 -19
  10. package/components/EButton.tsx +10 -15
  11. package/components/EButtonIcon.tsx +3 -3
  12. package/components/EDateAndTimeCard.tsx +18 -17
  13. package/components/EDateInput.tsx +15 -14
  14. package/components/EEmptyPlaceholder.tsx +21 -0
  15. package/components/EInfoBox.tsx +3 -3
  16. package/components/EInput.tsx +7 -6
  17. package/components/ELabel.tsx +1 -1
  18. package/components/EListClusterMeeting.tsx +47 -0
  19. package/components/EListPerson.tsx +60 -0
  20. package/components/EListSchool.tsx +35 -0
  21. package/components/ENotFoundPlaceholder.tsx +43 -0
  22. package/components/EOption.tsx +98 -0
  23. package/components/EPageDescription.tsx +1 -2
  24. package/components/EPillButton.tsx +24 -17
  25. package/components/EProfile.tsx +40 -26
  26. package/components/EProfileScreenLayout.tsx +111 -0
  27. package/components/EProgressBar.tsx +47 -0
  28. package/components/EQuestionSerialNumberLabel.tsx +17 -0
  29. package/components/EQuestionText.tsx +14 -0
  30. package/components/EStat.tsx +44 -0
  31. package/components/EStatReport.tsx +49 -0
  32. package/components/EText.tsx +2 -1
  33. package/components/ETextArea.tsx +53 -0
  34. package/components/ETimeInput.tsx +3 -4
  35. package/components/ETimeLineCard.tsx +29 -29
  36. package/components/MenuItems.tsx +1 -1
  37. package/components/ModalLayout.tsx +13 -12
  38. package/components/PageHeader.tsx +66 -73
  39. package/components/PageHeaderSecondary.tsx +4 -2
  40. package/components/ProfileHeader.tsx +85 -0
  41. package/components/SecondaryBaseLayout.tsx +29 -32
  42. package/components/icons/EIconAdd.jsx +19 -0
  43. package/components/icons/EIconAddCircle.jsx +21 -0
  44. package/components/icons/EIconApplicationStatus.jsx +20 -0
  45. package/components/icons/EIconArrowDown.jsx +20 -0
  46. package/components/icons/EIconArrowLeft.jsx +21 -0
  47. package/components/icons/EIconArrowRight.jsx +21 -0
  48. package/components/icons/EIconArrowUp.jsx +20 -0
  49. package/components/icons/EIconBadge.jsx +20 -0
  50. package/components/icons/EIconBell.jsx +19 -0
  51. package/components/icons/EIconCalendar.jsx +21 -0
  52. package/components/icons/EIconCalendarCheck.jsx +24 -0
  53. package/components/icons/EIconCamera.jsx +20 -0
  54. package/components/icons/EIconCameraRotate.jsx +23 -0
  55. package/components/icons/EIconCheck.jsx +19 -0
  56. package/components/icons/EIconCheckCircle.jsx +20 -0
  57. package/components/icons/EIconCheckFill.jsx +19 -0
  58. package/components/icons/EIconChevronDown.jsx +19 -0
  59. package/components/icons/EIconChevronLeft.jsx +19 -0
  60. package/components/icons/EIconChevronRight.jsx +19 -0
  61. package/components/icons/EIconChevronUp.jsx +19 -0
  62. package/components/icons/EIconClock.jsx +19 -0
  63. package/components/icons/EIconClose.jsx +19 -0
  64. package/components/icons/EIconDashboard.jsx +20 -0
  65. package/components/icons/EIconDocumentCheck.jsx +14 -0
  66. package/components/icons/EIconEdit.jsx +19 -0
  67. package/components/icons/EIconFemale.jsx +20 -0
  68. package/components/icons/EIconFile.jsx +21 -0
  69. package/components/icons/EIconInfo.jsx +20 -0
  70. package/components/icons/EIconLogout.jsx +19 -0
  71. package/components/icons/EIconMale.jsx +21 -0
  72. package/components/icons/EIconMenu.jsx +19 -0
  73. package/components/icons/EIconMinus.jsx +19 -0
  74. package/components/icons/EIconPin.jsx +19 -0
  75. package/components/icons/EIconProfile.jsx +19 -0
  76. package/components/icons/EIconSchool.jsx +24 -0
  77. package/components/icons/EIconSearch.jsx +19 -0
  78. package/components/icons/EIconSettings.jsx +20 -0
  79. package/components/icons/EIconShare.jsx +21 -0
  80. package/components/icons/EIconStudent.jsx +24 -0
  81. package/components/icons/EIconSubject.jsx +21 -0
  82. package/components/icons/EIconTeach.jsx +21 -0
  83. package/components/icons/EIconTrash.jsx +19 -0
  84. package/components/icons/EIconUserCard.jsx +19 -0
  85. package/components/icons/EIconUserCheck.jsx +20 -0
  86. package/components/icons/EIconUsers.jsx +19 -0
  87. package/components/index.tsx +5 -1
  88. package/index.ts +185 -72
  89. package/lib/tailwind.js +7 -7
  90. package/lib/useChangeLanguage.ts +60 -0
  91. package/package.json +26 -26
  92. package/tailwind.config.js +32 -32
  93. package/utils/Color.ts +14 -14
  94. package/components/ProgressBar.tsx +0 -33
package/.expo/README.md CHANGED
@@ -1,15 +1,15 @@
1
- > Why do I have a folder named ".expo" in my project?
2
-
3
- The ".expo" folder is created when an Expo project is started using "expo start" command.
4
-
5
- > What do the files contain?
6
-
7
- - "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
8
- - "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
9
- - "settings.json": contains the server configuration that is used to serve the application manifest.
10
-
11
- > Should I commit the ".expo" folder?
12
-
13
- No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
14
-
15
- Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
1
+ > Why do I have a folder named ".expo" in my project?
2
+
3
+ The ".expo" folder is created when an Expo project is started using "expo start" command.
4
+
5
+ > What do the files contain?
6
+
7
+ - "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
8
+ - "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
9
+ - "settings.json": contains the server configuration that is used to serve the application manifest.
10
+
11
+ > Should I commit the ".expo" folder?
12
+
13
+ No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
14
+
15
+ Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
@@ -1,8 +1,8 @@
1
- {
2
- "hostType": "lan",
3
- "lanType": "ip",
4
- "dev": true,
5
- "minify": false,
6
- "urlRandomness": null,
7
- "https": false
8
- }
1
+ {
2
+ "hostType": "lan",
3
+ "lanType": "ip",
4
+ "dev": true,
5
+ "minify": false,
6
+ "urlRandomness": null,
7
+ "https": false
8
+ }
Binary file
Binary file
Binary file
@@ -22,7 +22,8 @@ export default function Avatar({ size, source, nameFirstLetter, textColor }: Ava
22
22
  "#2D3A5D",
23
23
  ]
24
24
 
25
- let color = colors[Math.floor(Math.random() * colors.length)]
25
+ // let color = colors[Math.floor(Math.random() * colors.length)]
26
+ const [color, setColor] = React.useState(colors[Math.floor(Math.random() * colors.length)]);
26
27
  return (
27
28
  <View
28
29
  style={tw.style(
@@ -36,7 +37,7 @@ export default function Avatar({ size, source, nameFirstLetter, textColor }: Ava
36
37
  )}
37
38
  >
38
39
  {source ? <Image style={tw`w-full h-full `} source={source} /> :
39
- <EText style={tw`text-2xl font-extrabold text-white`}>{nameFirstLetter}</EText>}
40
+ <EText style={tw`text-xl font-bold text-white uppercase`}>{nameFirstLetter}</EText>}
40
41
  </View>
41
42
  );
42
43
  }
@@ -1,97 +1,150 @@
1
- import React from "react";
2
- import { ScrollView, View, TouchableOpacity } from "react-native";
3
- import { HomeIcon,CalendarIcon, TemplateIcon, ViewBoardsIcon } from 'react-native-heroicons/solid';
4
- import { StyleSheet } from 'react-native';
5
- import tw from "../lib/tailwind";
6
- import EText from "./EText";
7
- import Spacer from "./Spacer";
8
- import Avatar from "./Avatar";
9
- import { Colors } from "../utils/Color";
10
- import MenuItems from "./MenuItems";
11
-
12
- type menuItems = {
13
- title: string,
14
- icon: any,
15
- screen: string,
16
- }
17
-
18
- interface IProps{
19
- name: string,
20
- profile: string,
21
- menuItems: menuItems[];
22
- navigation: any;
23
- }
24
-
25
- const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
26
- return (
27
- <ScrollView
28
- scrollEnabled={true}
29
- showsVerticalScrollIndicator={false}
30
- style={{
31
- position: 'relative',
32
- backgroundColor: '#ffffff',
33
- }}>
34
- <View style={tw`mx-4 pt-4`}>
35
- <Spacer height={30} />
36
-
37
- <View style={tw`flex w-full mt-5`}>
38
- <View style={tw`flex-row items-center`}>
39
- <Avatar
40
- size="sm"
41
- source={""}
42
- nameFirstLetter={name?.split("")[0]}
43
- />
44
- <View style={tw`ml-3`}>
45
- <EText size={"xl"} style={tw`font-bold -mt-1`}>{name}</EText>
46
- <EText size="sm" style={[tw`font-normal`, {
47
- color: Colors["text-body"]
48
- }]}>
49
- {profile}
50
- </EText>
51
- </View>
52
- </View>
53
- </View>
54
-
55
- <Spacer height={30} />
56
- {
57
- menuItems.map((item, index) => {
58
- return (
59
- <MenuItems
60
- key={index}
61
- title={item.title}
62
- icon={item.icon}
63
- onPress={() => navigation.navigate(item.screen)}
64
- />
65
- )
66
- })
67
- }
68
- <Spacer />
69
- <Spacer />
70
- <MenuItems
71
- title="Profile"
72
- onPress={() => navigation.navigate("ProfileScreen")}
73
- />
74
- <MenuItems
75
- title="Settings"
76
- />
77
- <MenuItems
78
- title="Logout"
79
- />
80
- </View>
81
- </ScrollView>
82
- );
83
- };
84
-
85
- const styles = StyleSheet.create({
86
- container: {
87
- backgroundColor: '#fff',
88
- padding: 10,
89
- },
90
- logoStyle: {
91
- height: 20,
92
- width: '80%',
93
- alignSelf: 'center',
94
- },
95
- });
96
-
97
- export default Drawer;
1
+ import React from "react";
2
+ import { ScrollView, View } from "react-native";
3
+ import tw from "../lib/tailwind";
4
+ import EText from "./EText";
5
+ import Spacer from "./Spacer";
6
+ import Avatar from "./Avatar";
7
+ import { Colors } from "../utils/Color";
8
+ import MenuItems from "./MenuItems";
9
+ import EIconLogout from "./icons/EIconLogout";
10
+
11
+ type menuItems = {
12
+ title: string;
13
+ icon: any;
14
+ screen: string;
15
+ };
16
+
17
+ interface IProps {
18
+ name: string;
19
+ profile: string;
20
+ menuItems: menuItems[];
21
+ secondMenuItems?: menuItems[];
22
+ secondMenuItemsTitle?: string;
23
+ navigation: any;
24
+ logout?: () => void;
25
+ rootRoute?: string;
26
+ }
27
+
28
+ const Drawer = ({
29
+ name,
30
+ profile,
31
+ menuItems,
32
+ navigation,
33
+ secondMenuItemsTitle,
34
+ secondMenuItems,
35
+ logout,
36
+ rootRoute,
37
+ }: IProps) => {
38
+ return (
39
+ <ScrollView
40
+ scrollEnabled={true}
41
+ showsVerticalScrollIndicator={false}
42
+ style={{
43
+ position: "relative",
44
+ backgroundColor: "#ffffff",
45
+ }}
46
+ >
47
+ <View style={tw`mx-4 pt-4`}>
48
+ <Spacer height={30} />
49
+
50
+ <View style={tw`flex w-full mt-5 mr-5`}>
51
+ <View style={tw`flex-row items-center`}>
52
+ <Avatar
53
+ size="sm"
54
+ source={""}
55
+ nameFirstLetter={name?.split("")[0]}
56
+ />
57
+ <View style={tw`ml-3 mr-5`}>
58
+ <EText
59
+ size={"base"}
60
+ style={tw`font-bold -mt-1 lowercase capitalize mr-3`}
61
+ >
62
+ {name}
63
+ </EText>
64
+ <EText
65
+ size="sm"
66
+ style={[
67
+ tw`font-normal`,
68
+ {
69
+ color: Colors["text-body"],
70
+ },
71
+ ]}
72
+ >
73
+ {profile}
74
+ </EText>
75
+ </View>
76
+ </View>
77
+ </View>
78
+
79
+ <Spacer height={15} />
80
+ {menuItems.map((item, index) => {
81
+ return (
82
+ <MenuItems
83
+ key={index}
84
+ title={item.title}
85
+ icon={item.icon}
86
+ onPress={() => {
87
+ navigation.closeDrawer();
88
+
89
+ if (rootRoute) {
90
+ navigation.navigate(rootRoute, {
91
+ screen: item.screen,
92
+ });
93
+ } else {
94
+ navigation.navigate(item.screen);
95
+ }
96
+ }}
97
+ />
98
+ );
99
+ })}
100
+
101
+ {secondMenuItemsTitle ? (
102
+ <View style={tw`mt-8 mb-1`}>
103
+ <EText size="xs" style={tw`text-slate-400 font-semibold`}>
104
+ My Cluster
105
+ </EText>
106
+ </View>
107
+ ) : (
108
+ <></>
109
+ )}
110
+ {secondMenuItems && secondMenuItems?.length > 0 ? (
111
+ secondMenuItems.map((item, index) => {
112
+ return (
113
+ <MenuItems
114
+ key={index}
115
+ title={item.title}
116
+ icon={item.icon}
117
+ onPress={() => {
118
+ navigation.closeDrawer();
119
+
120
+ if (rootRoute) {
121
+ navigation.navigate(rootRoute, {
122
+ screen: item.screen,
123
+ });
124
+ } else {
125
+ navigation.navigate(item.screen);
126
+ }
127
+ }}
128
+ />
129
+ );
130
+ })
131
+ ) : (
132
+ <></>
133
+ )}
134
+
135
+ <MenuItems
136
+ title={"Logout"}
137
+ icon={
138
+ <EIconLogout
139
+ size={24}
140
+ style={tw`text-[${Colors["primary-base"]}]`}
141
+ />
142
+ }
143
+ onPress={() => logout && logout()}
144
+ />
145
+ </View>
146
+ </ScrollView>
147
+ );
148
+ };
149
+
150
+ export default Drawer;
@@ -1,23 +1,54 @@
1
- import React from 'react'
2
- import { View } from 'react-native'
3
- import tw from '../lib/tailwind';
4
- import EText from './EText';
5
- import { CheckCircleIcon } from 'react-native-heroicons/solid';
1
+ import React, { JSX } from "react";
2
+ import tw from "../lib/tailwind";
3
+ import { View } from "react-native";
4
+ import EText from "./EText";
6
5
 
6
+ // Badge Sizes
7
+ export const BADGE_SIZES = {
8
+ sm: "p-0.75 px-2",
9
+ md: "p-0.75 px-3",
10
+ };
11
+ export type BadgeSize = keyof typeof BADGE_SIZES;
7
12
 
8
- interface IProps {
9
- text: string;
10
- color?: string;
11
- completed?: boolean;
12
- }
13
+ // Badge Text Sizes
14
+ export const BADGE_TEXT_SIZES = {
15
+ sm: "text-sm",
16
+ md: "text-base",
17
+ };
13
18
 
14
- export default function EBadge({ text, completed, color }: IProps) {
15
- return (
16
- <View style={[tw`rounded-full flex-row p-1 px-2 ${completed ? 'bg-green-600' : color}`, ]}>
17
- {completed ? <CheckCircleIcon style={tw`text-white -ml-1 mr-1`} size={16} /> : null}
18
- <EText size='xs' style={tw`font-semibold text-white`}>
19
- {text}
20
- </EText>
21
- </View>
22
- )
19
+ interface EBadgeProps {
20
+ color?: string;
21
+ variant?: "solid" | "light";
22
+ size?: BadgeSize;
23
+ iconLeft?: JSX.Element;
24
+ iconRight?: JSX.Element;
25
+ children: string;
23
26
  }
27
+
28
+ const EBadge: React.FC<EBadgeProps> = ({
29
+ color = "blue-600",
30
+ variant = "solid",
31
+ size = "md",
32
+ iconLeft,
33
+ iconRight,
34
+ children,
35
+ }) => {
36
+ const baseStyle = tw`flex-row self-start items-center rounded-full overflow-hidden bg-${color}
37
+ ${variant === "light" && "bg-opacity-10"}
38
+ ${BADGE_SIZES[size]}`;
39
+
40
+ const textStyle = tw`font-semibold capitalize
41
+ ${variant === "light" ? `text-${color}` : "text-white"}
42
+ ${BADGE_TEXT_SIZES[size]}
43
+ `;
44
+
45
+ return (
46
+ <View style={baseStyle}>
47
+ {iconLeft}
48
+ <EText style={textStyle}>{children}</EText>
49
+ {iconRight}
50
+ </View>
51
+ );
52
+ };
53
+
54
+ export default EBadge;
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  View,
3
- Text,
4
3
  TouchableOpacity,
5
4
  TouchableOpacityProps,
6
5
  } from "react-native";
@@ -12,10 +11,9 @@ import { Colors } from "../utils/Color";
12
11
  interface EButtonProps extends TouchableOpacityProps {
13
12
  iconL?: JSX.Element;
14
13
  iconR?: JSX.Element;
15
- secondary?: boolean;
16
14
  inline?: boolean;
17
15
  small?: boolean;
18
- type?: "secondary" | "clear" | "primary";
16
+ type?: "secondary" | "clear" | "primary" | "white";
19
17
  disabled?: boolean;
20
18
  children: any;
21
19
  }
@@ -25,7 +23,6 @@ export default function EButton({
25
23
  children,
26
24
  iconL,
27
25
  iconR,
28
- secondary,
29
26
  inline,
30
27
  small,
31
28
  type,
@@ -41,27 +38,25 @@ export default function EButton({
41
38
  >
42
39
  <View
43
40
  style={[
44
- tw`h-14 flex-row justify-center items-center px-8 rounded-full ${disabled ? "opacity-60" : ""} ${
45
- type === "clear"
46
- ? "bg-transparent"
41
+ tw` mt-2 flex-row justify-center items-center rounded-full border-2 border-black/5 ${small ? 'h-10 px-4' : 'h-14 px-8'} ${disabled ? "opacity-40" : ""} ${type === "clear"
42
+ ? "bg-transparent "
43
+ : type === 'white' ? "bg-white"
47
44
  : type === "secondary"
48
- ? `bg-[${Colors["secondary-base"]}] self-start px-5 h-11`
49
- : `bg-[${Colors["primary-base"]}]`
50
- }`,
45
+ ? `bg-[${Colors["secondary-base"]}] self-start px-6 h-11`
46
+ : `bg-[${Colors["primary-base"]}] shadow shadow-[${Colors["primary-base"]}]`
47
+ }`,
51
48
  ]}
52
49
  >
53
50
  {/* ICON LEFT */}
54
51
  {iconL ? <View style={tw`mr-1 -ml-2`}>{iconL}</View> : null}
55
52
  {/* LABEL */}
56
53
  <EText
57
- size={"base"}
58
54
  style={[
59
- tw`font-semibold ${
60
- type === "clear" ? `text-[${Colors["primary-base"]}]` : "text-white"
61
- }`,
55
+ tw`font-semibold ${small ? `text-sm` : ''} ${type === "clear" || type === "white" ? `text-[${Colors["primary-base"]}]` : "text-white"
56
+ }`,
62
57
  ]}
63
58
  >
64
- {children }
59
+ {children}
65
60
  </EText>
66
61
 
67
62
  {/* ICON RIGHT */}
@@ -1,7 +1,7 @@
1
1
  import { View, TouchableOpacity, TouchableOpacityProps } from "react-native";
2
2
  import React from "react";
3
3
  import tw from "../lib/tailwind";
4
- import { ArrowNarrowLeftIcon, XIcon } from "react-native-heroicons/solid";
4
+ import { ArrowLeftIcon, XMarkIcon } from "react-native-heroicons/solid";
5
5
 
6
6
  interface EButtonIconProps extends TouchableOpacityProps {
7
7
  type?: "close";
@@ -27,9 +27,9 @@ export default function EButtonIcon({
27
27
  }`}
28
28
  >
29
29
  {type === "close" ? (
30
- <XIcon size={20} style={tw`text-${iconColor? iconColor: ""}`} />
30
+ <XMarkIcon size={24} style={tw`text-${iconColor? iconColor: ""}`} />
31
31
  ) : (
32
- <ArrowNarrowLeftIcon size={20} style={tw`text-${iconColor? iconColor : ""}`} />
32
+ <ArrowLeftIcon size={24} style={tw`text-${iconColor? iconColor : ""}`} />
33
33
  )}
34
34
  </View>
35
35
  </TouchableOpacity>
@@ -1,49 +1,50 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
- import { ClockIcon } from "react-native-heroicons/solid";
4
3
  import tw from "../lib/tailwind";
5
4
  import { Colors } from "../utils/Color";
6
5
  import EText from "./EText";
6
+ import EIconClock from "./icons/EIconClock";
7
7
 
8
- interface IProps{
9
- date: string;
10
- month: string;
11
- day: string;
12
- time: string;
8
+ interface IProps {
9
+ date: string;
10
+ month: string;
11
+ day?: string;
12
+ time?: string;
13
13
 
14
14
  }
15
15
 
16
- export default function EDateAndTimeCard( {date, month, day, time}: IProps) {
16
+ export default function EDateAndTimeCard({ date, month, day, time }: IProps) {
17
17
  return (
18
18
  <View
19
- style={[tw`flex-row pb-4 border-b`, { borderBottomColor: Colors.border }]}
19
+ style={[tw`flex-row pb-4`, { borderBottomColor: Colors.border }]}
20
20
  >
21
21
  <View
22
22
  style={[
23
- tw`rounded-xl mb-2 px-3 py-1 items-center justify-center`,
23
+ tw`rounded-lg px-3 py-1 items-center justify-center`,
24
24
  { backgroundColor: Colors["primary-base"] },
25
25
  ]}
26
26
  >
27
27
  <EText size="xl" style={tw`font-bold text-white -mb-1`}>
28
28
  {date}
29
29
  </EText>
30
- <EText size="xs" style={tw`font-bold text-white`}>
30
+ <EText size="xs" style={tw`font-bold text-white uppercase opacity-80`}>
31
31
  {month}
32
32
  </EText>
33
33
  </View>
34
- <View style={tw`ml-3`}>
35
- <EText size="base" style={tw`font-bold text-black opacity-80 -mb-1`}>
34
+ <View style={tw`ml-3 justify-center`}>
35
+ {/* <EText size="base" style={tw`font-bold text-black opacity-80 -mb-1`}>
36
36
  {day}
37
- </EText>
38
- <View style={tw`flex-row justify-center items-center mt-2`}>
39
- <ClockIcon size={14} style={tw`text-slate-400`} />
37
+ </EText> */}
38
+ {
39
+ time ?<View style={tw`flex-row justify-center items-center mt-2`}>
40
+ <EIconClock size={16} style={tw`text-slate-500`} />
40
41
  <EText
41
42
  size="sm"
42
- style={tw`ml-0.5 text-slate-400 font-medium`}
43
+ style={tw`ml-1 text-slate-500`}
43
44
  >
44
45
  {time}
45
46
  </EText>
46
- </View>
47
+ </View> : null}
47
48
  </View>
48
49
  </View>
49
50
  );
@@ -1,27 +1,28 @@
1
1
  import moment from 'moment'
2
2
  import React, { useState } from 'react'
3
3
  import { View, TouchableOpacity } from 'react-native'
4
- import { ClockIcon } from 'react-native-heroicons/solid'
5
- import { onChange } from 'react-native-reanimated'
6
4
  import DateTimePicker from '@react-native-community/datetimepicker';
7
5
  import tw from '../../../lib/tailwind'
8
6
  import { CalendarIcon } from 'react-native-heroicons/outline';
9
7
  import EText from './EText';
10
8
  import ELabel from './ELabel';
9
+ import { Colors } from 'fln-espranza/utils/Color'
10
+ import DateTimePickerModal from "react-native-modal-datetime-picker";
11
11
 
12
12
  interface IProps {
13
13
  label: string;
14
14
  value: string;
15
15
  onChange: (value: string) => void;
16
- style?: string;
16
+ style?: any;
17
+ placeholder?: string;
17
18
  maxDate?: Date;
18
19
  minDate?: Date;
19
20
  }
20
21
 
21
- export default function EDateInput({ label, value, style, maxDate, minDate, onChange }: IProps) {
22
+ export default function EDateInput({ label, value, style, placeholder, maxDate, minDate, onChange }: IProps) {
22
23
  const [show, setShow] = useState(false);
23
24
 
24
- const handleOnChange = (event: any, selectedDate: any) => {
25
+ const handleOnChange = (selectedDate: any) => {
25
26
  const currentDate = selectedDate;
26
27
  setShow(false);
27
28
  onChange(currentDate)
@@ -29,26 +30,26 @@ export default function EDateInput({ label, value, style, maxDate, minDate, onCh
29
30
 
30
31
  return (
31
32
 
32
- <View style={tw`flex-1 ${style ? style : ""}`}>
33
+ <View style={[tw`mb-4 `, style]}>
33
34
  <ELabel label={label} />
34
35
  <TouchableOpacity
35
36
  style={tw`h-12 rounded-lg px-4 flex-row justify-between items-center border border-slate-300 lowercase my-2 bg-white`}
36
37
  onPress={() => setShow(true)}
37
38
  >
38
- <EText size={"sm"} style={tw`font-normal`}>
39
+ <EText size={"sm"} style={tw`font-normal text-slate-400`}>
39
40
  {
40
41
  value ? moment(value).format("DD/MM/YYYY") : "Select Date"
41
42
  }
42
43
  </EText>
43
- {show ? <DateTimePicker
44
- testID="dateTimePicker"
45
- value={value ? new Date(value) : new Date()}
46
- mode={"date"}
47
- onChange={handleOnChange}
44
+ <DateTimePickerModal
45
+ isVisible={show}
46
+ mode="date"
47
+ onConfirm={handleOnChange}
48
+ onCancel={() => setShow(false)}
48
49
  minimumDate={minDate}
49
50
  maximumDate={maxDate}
50
- /> : <></>}
51
- <CalendarIcon size={20} style={tw`text-slate-500`} />
51
+ />
52
+ <CalendarIcon size={20} style={tw`text-[${Colors["primary-base"]}]`} />
52
53
  </TouchableOpacity>
53
54
  </View>
54
55
  )
@@ -0,0 +1,21 @@
1
+
2
+ import React from 'react'
3
+ import { ImageBackground, View } from 'react-native'
4
+ import tw from "../lib/tailwind"
5
+ import EText from "./EText";
6
+
7
+
8
+ interface IProps{
9
+ text: string;
10
+ }
11
+
12
+ export default function EEmptyPlaceholder( { text }: IProps) {
13
+ return (
14
+ <View style={tw`flex justify-center items-center`}>
15
+ <ImageBackground source={require("../assets/images/empty.png")} style={{width: 200, height: 200}} />
16
+ <EText style={tw`text-center text-gray-800 mt-5`}>
17
+ {text}
18
+ </EText>
19
+ </View>
20
+ )
21
+ }