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.
- package/.expo/README.md +15 -15
- package/.expo/settings.json +8 -8
- package/assets/images/bg-profile.jpg +0 -0
- package/assets/images/bg-stat.png +0 -0
- package/assets/images/empty.png +0 -0
- package/assets/images/icon-placeholder-schedule.png +0 -0
- package/components/Avatar.tsx +3 -2
- package/components/Drawer.tsx +150 -97
- package/components/EBadge.tsx +50 -19
- package/components/EButton.tsx +10 -15
- package/components/EButtonIcon.tsx +3 -3
- package/components/EDateAndTimeCard.tsx +18 -17
- package/components/EDateInput.tsx +15 -14
- package/components/EEmptyPlaceholder.tsx +21 -0
- package/components/EInfoBox.tsx +3 -3
- package/components/EInput.tsx +7 -6
- package/components/ELabel.tsx +1 -1
- package/components/EListClusterMeeting.tsx +47 -0
- package/components/EListPerson.tsx +60 -0
- package/components/EListSchool.tsx +35 -0
- package/components/ENotFoundPlaceholder.tsx +43 -0
- package/components/EOption.tsx +98 -0
- package/components/EPageDescription.tsx +1 -2
- package/components/EPillButton.tsx +24 -17
- package/components/EProfile.tsx +40 -26
- package/components/EProfileScreenLayout.tsx +111 -0
- package/components/EProgressBar.tsx +47 -0
- package/components/EQuestionSerialNumberLabel.tsx +17 -0
- package/components/EQuestionText.tsx +14 -0
- package/components/EStat.tsx +44 -0
- package/components/EStatReport.tsx +49 -0
- package/components/EText.tsx +2 -1
- package/components/ETextArea.tsx +53 -0
- package/components/ETimeInput.tsx +3 -4
- package/components/ETimeLineCard.tsx +29 -29
- package/components/MenuItems.tsx +1 -1
- package/components/ModalLayout.tsx +13 -12
- package/components/PageHeader.tsx +66 -73
- package/components/PageHeaderSecondary.tsx +4 -2
- package/components/ProfileHeader.tsx +85 -0
- package/components/SecondaryBaseLayout.tsx +29 -32
- package/components/icons/EIconAdd.jsx +19 -0
- package/components/icons/EIconAddCircle.jsx +21 -0
- package/components/icons/EIconApplicationStatus.jsx +20 -0
- package/components/icons/EIconArrowDown.jsx +20 -0
- package/components/icons/EIconArrowLeft.jsx +21 -0
- package/components/icons/EIconArrowRight.jsx +21 -0
- package/components/icons/EIconArrowUp.jsx +20 -0
- package/components/icons/EIconBadge.jsx +20 -0
- package/components/icons/EIconBell.jsx +19 -0
- package/components/icons/EIconCalendar.jsx +21 -0
- package/components/icons/EIconCalendarCheck.jsx +24 -0
- package/components/icons/EIconCamera.jsx +20 -0
- package/components/icons/EIconCameraRotate.jsx +23 -0
- package/components/icons/EIconCheck.jsx +19 -0
- package/components/icons/EIconCheckCircle.jsx +20 -0
- package/components/icons/EIconCheckFill.jsx +19 -0
- package/components/icons/EIconChevronDown.jsx +19 -0
- package/components/icons/EIconChevronLeft.jsx +19 -0
- package/components/icons/EIconChevronRight.jsx +19 -0
- package/components/icons/EIconChevronUp.jsx +19 -0
- package/components/icons/EIconClock.jsx +19 -0
- package/components/icons/EIconClose.jsx +19 -0
- package/components/icons/EIconDashboard.jsx +20 -0
- package/components/icons/EIconDocumentCheck.jsx +14 -0
- package/components/icons/EIconEdit.jsx +19 -0
- package/components/icons/EIconFemale.jsx +20 -0
- package/components/icons/EIconFile.jsx +21 -0
- package/components/icons/EIconInfo.jsx +20 -0
- package/components/icons/EIconLogout.jsx +19 -0
- package/components/icons/EIconMale.jsx +21 -0
- package/components/icons/EIconMenu.jsx +19 -0
- package/components/icons/EIconMinus.jsx +19 -0
- package/components/icons/EIconPin.jsx +19 -0
- package/components/icons/EIconProfile.jsx +19 -0
- package/components/icons/EIconSchool.jsx +24 -0
- package/components/icons/EIconSearch.jsx +19 -0
- package/components/icons/EIconSettings.jsx +20 -0
- package/components/icons/EIconShare.jsx +21 -0
- package/components/icons/EIconStudent.jsx +24 -0
- package/components/icons/EIconSubject.jsx +21 -0
- package/components/icons/EIconTeach.jsx +21 -0
- package/components/icons/EIconTrash.jsx +19 -0
- package/components/icons/EIconUserCard.jsx +19 -0
- package/components/icons/EIconUserCheck.jsx +20 -0
- package/components/icons/EIconUsers.jsx +19 -0
- package/components/index.tsx +5 -1
- package/index.ts +185 -72
- package/lib/tailwind.js +7 -7
- package/lib/useChangeLanguage.ts +60 -0
- package/package.json +26 -26
- package/tailwind.config.js +32 -32
- package/utils/Color.ts +14 -14
- 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.
|
package/.expo/settings.json
CHANGED
|
@@ -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
|
|
Binary file
|
package/components/Avatar.tsx
CHANGED
|
@@ -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-
|
|
40
|
+
<EText style={tw`text-xl font-bold text-white uppercase`}>{nameFirstLetter}</EText>}
|
|
40
41
|
</View>
|
|
41
42
|
);
|
|
42
43
|
}
|
package/components/Drawer.tsx
CHANGED
|
@@ -1,97 +1,150 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ScrollView, View
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
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;
|
package/components/EBadge.tsx
CHANGED
|
@@ -1,23 +1,54 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import EText from
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
+
// Badge Text Sizes
|
|
14
|
+
export const BADGE_TEXT_SIZES = {
|
|
15
|
+
sm: "text-sm",
|
|
16
|
+
md: "text-base",
|
|
17
|
+
};
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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;
|
package/components/EButton.tsx
CHANGED
|
@@ -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`
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
-
<
|
|
30
|
+
<XMarkIcon size={24} style={tw`text-${iconColor? iconColor: ""}`} />
|
|
31
31
|
) : (
|
|
32
|
-
<
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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(
|
|
16
|
+
export default function EDateAndTimeCard({ date, month, day, time }: IProps) {
|
|
17
17
|
return (
|
|
18
18
|
<View
|
|
19
|
-
style={[tw`flex-row pb-4
|
|
19
|
+
style={[tw`flex-row pb-4`, { borderBottomColor: Colors.border }]}
|
|
20
20
|
>
|
|
21
21
|
<View
|
|
22
22
|
style={[
|
|
23
|
-
tw`rounded-
|
|
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
|
-
|
|
39
|
-
|
|
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-
|
|
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?:
|
|
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 = (
|
|
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`
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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-
|
|
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
|
+
}
|