jornada-ui 0.4.17 → 0.4.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/lib/commonjs/components/list-supplies/index.js +132 -111
- package/lib/commonjs/components/list-supplies/index.js.map +1 -1
- package/lib/commonjs/components/modal-type-activities/index.js +7 -6
- package/lib/commonjs/components/modal-type-activities/index.js.map +1 -1
- package/lib/commonjs/components/modal-type-activities/mock/index.js +34 -3
- package/lib/commonjs/components/modal-type-activities/mock/index.js.map +1 -1
- package/lib/commonjs/components/notification-details-card/index.js +6 -6
- package/lib/commonjs/components/trip-details-card/index.js +218 -182
- package/lib/commonjs/components/trip-details-card/index.js.map +1 -1
- package/lib/commonjs/index.js +32 -32
- package/lib/module/components/list-supplies/index.js +134 -113
- package/lib/module/components/list-supplies/index.js.map +1 -1
- package/lib/module/components/modal-type-activities/index.js +8 -7
- package/lib/module/components/modal-type-activities/index.js.map +1 -1
- package/lib/module/components/modal-type-activities/mock/index.js +33 -2
- package/lib/module/components/modal-type-activities/mock/index.js.map +1 -1
- package/lib/module/components/notification-details-card/index.js +6 -6
- package/lib/module/components/trip-details-card/index.js +221 -184
- package/lib/module/components/trip-details-card/index.js.map +1 -1
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/list-supplies/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/mock/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/modal-type-activities/mock/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/list-supplies/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts +1 -0
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/mock/index.d.ts +17 -0
- package/lib/typescript/module/src/components/modal-type-activities/mock/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +4 -4
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/list-supplies/index.tsx +178 -153
- package/src/components/modal-type-activities/index.tsx +173 -169
- package/src/components/modal-type-activities/interface.ts +36 -34
- package/src/components/modal-type-activities/mock/index.ts +103 -65
- package/src/components/notification-details-card/index.tsx +180 -180
- package/src/components/trip-details-card/index.tsx +65 -32
- package/src/index.tsx +4 -4
|
@@ -1,180 +1,180 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { forwardRef, useState } from "react";
|
|
5
|
-
import { Modal, TouchableOpacity, Image, View } from "react-native";
|
|
6
|
-
|
|
7
|
-
// commons / icons
|
|
8
|
-
import { Icons } from "../../common/icons-svg";
|
|
9
|
-
|
|
10
|
-
// components
|
|
11
|
-
import Box from "../box";
|
|
12
|
-
import Typography from "../typography";
|
|
13
|
-
|
|
14
|
-
// typings
|
|
15
|
-
import type { INotificationDetailCardProps } from "./interface";
|
|
16
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
17
|
-
|
|
18
|
-
// styles / theme
|
|
19
|
-
import { theme } from "../../styles/theme/theme";
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Componente NotificationDetailCard
|
|
23
|
-
*/
|
|
24
|
-
const NotificationDetailCard: React.FC<INotificationDetailCardProps> = forwardRef<
|
|
25
|
-
View,
|
|
26
|
-
INotificationDetailCardProps
|
|
27
|
-
>(({ title, description, fileUrl, fileType = "image", testID }, ref) => {
|
|
28
|
-
const [visible, setVisible] = useState(false);
|
|
29
|
-
|
|
30
|
-
function openFile() {
|
|
31
|
-
if (fileType === "image") {
|
|
32
|
-
setVisible(true);
|
|
33
|
-
} else if (fileUrl) {
|
|
34
|
-
import("react-native").then(({ Linking }) => {
|
|
35
|
-
Linking.openURL(fileUrl).catch((err) => console.warn("Erro ao abrir arquivo:", err));
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const borderColor = theme.colors.blue[500];
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<Box
|
|
44
|
-
ref={ref}
|
|
45
|
-
testID={testID ?? "notification-detail-card"}
|
|
46
|
-
flexStyle={{ flexDirection: "row" }}
|
|
47
|
-
borderStyled={{
|
|
48
|
-
borderWidth: 1,
|
|
49
|
-
borderColor: theme.colors.neutral[200],
|
|
50
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
51
|
-
}}
|
|
52
|
-
marginStyle={{ marginBottom: 16 }}
|
|
53
|
-
backgroundColor={theme.colors.neutral[25]}
|
|
54
|
-
>
|
|
55
|
-
{/* borda fixa lateral esquerda */}
|
|
56
|
-
<Box
|
|
57
|
-
width={8}
|
|
58
|
-
backgroundColor={borderColor}
|
|
59
|
-
borderStyled={{
|
|
60
|
-
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
61
|
-
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
62
|
-
}}
|
|
63
|
-
/>
|
|
64
|
-
|
|
65
|
-
{/* Conteúdo do card */}
|
|
66
|
-
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings.md }}>
|
|
67
|
-
{/* header */}
|
|
68
|
-
<Typography
|
|
69
|
-
text={title}
|
|
70
|
-
fontFamily={theme.fonts.inter_bold}
|
|
71
|
-
fontWeight="700"
|
|
72
|
-
size={theme.fontSizes.md}
|
|
73
|
-
color={theme.colors.black[100]}
|
|
74
|
-
marginBottom={8}
|
|
75
|
-
/>
|
|
76
|
-
|
|
77
|
-
{/* texto */}
|
|
78
|
-
<Typography
|
|
79
|
-
text={description}
|
|
80
|
-
size={theme.fontSizes.sm}
|
|
81
|
-
lineHeight={theme.lineHeight.md}
|
|
82
|
-
color={theme.colors.gray[700]}
|
|
83
|
-
marginBottom={fileUrl ? 12 : 0}
|
|
84
|
-
/>
|
|
85
|
-
|
|
86
|
-
{/* arquivo (se existir) */}
|
|
87
|
-
{fileUrl && (
|
|
88
|
-
<TouchableOpacity
|
|
89
|
-
testID="button"
|
|
90
|
-
onPress={openFile}
|
|
91
|
-
activeOpacity={0.8}
|
|
92
|
-
style={{
|
|
93
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
94
|
-
overflow: "hidden",
|
|
95
|
-
borderWidth: 1,
|
|
96
|
-
borderColor: theme.colors.gray[300],
|
|
97
|
-
}}
|
|
98
|
-
>
|
|
99
|
-
{fileType === "image" ? (
|
|
100
|
-
<Box
|
|
101
|
-
borderStyled={{
|
|
102
|
-
borderWidth: 2,
|
|
103
|
-
borderColor: theme.colors.blue[525],
|
|
104
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
<Image
|
|
108
|
-
source={{ uri: fileUrl }}
|
|
109
|
-
style={{
|
|
110
|
-
width: "100%",
|
|
111
|
-
height: 180,
|
|
112
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
113
|
-
borderWidth: 2,
|
|
114
|
-
borderColor: theme.colors.blue[525],
|
|
115
|
-
}}
|
|
116
|
-
resizeMode="cover"
|
|
117
|
-
/>
|
|
118
|
-
</Box>
|
|
119
|
-
) : (
|
|
120
|
-
<Box
|
|
121
|
-
flexStyle={{
|
|
122
|
-
flexDirection: "row",
|
|
123
|
-
alignItems: "center",
|
|
124
|
-
justifyContent: "space-between",
|
|
125
|
-
}}
|
|
126
|
-
paddingStyle={{ padding: theme.paddings.sm }}
|
|
127
|
-
>
|
|
128
|
-
<Typography
|
|
129
|
-
text={`Abrir arquivo (${fileType.toUpperCase()})`}
|
|
130
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
131
|
-
color={theme.colors.blue[500]}
|
|
132
|
-
size={theme.fontSizes.md}
|
|
133
|
-
/>
|
|
134
|
-
<Icons icon="FILES" size={20} color={theme.colors.blue[500]} />
|
|
135
|
-
</Box>
|
|
136
|
-
)}
|
|
137
|
-
</TouchableOpacity>
|
|
138
|
-
)}
|
|
139
|
-
</Box>
|
|
140
|
-
|
|
141
|
-
{/* modal para zoom da imagem */}
|
|
142
|
-
{fileType === "image" && (
|
|
143
|
-
<Modal visible={visible} transparent animationType="fade">
|
|
144
|
-
<View
|
|
145
|
-
style={{
|
|
146
|
-
flex: 1,
|
|
147
|
-
backgroundColor: "rgba(0,0,0,0.9)",
|
|
148
|
-
justifyContent: "center",
|
|
149
|
-
alignItems: "center",
|
|
150
|
-
}}
|
|
151
|
-
>
|
|
152
|
-
<TouchableOpacity
|
|
153
|
-
onPress={() => setVisible(false)}
|
|
154
|
-
style={{ position: "absolute", top: 40, right: 20 }}
|
|
155
|
-
>
|
|
156
|
-
<Icons icon="CLOSED" size={28} color={theme.colors.neutral[25]} />
|
|
157
|
-
</TouchableOpacity>
|
|
158
|
-
|
|
159
|
-
<Image
|
|
160
|
-
source={{ uri: fileUrl }}
|
|
161
|
-
style={{
|
|
162
|
-
width: "90%",
|
|
163
|
-
height: "70%",
|
|
164
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
165
|
-
}}
|
|
166
|
-
resizeMode="contain"
|
|
167
|
-
/>
|
|
168
|
-
</View>
|
|
169
|
-
</Modal>
|
|
170
|
-
)}
|
|
171
|
-
</Box>
|
|
172
|
-
);
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
NotificationDetailCard.displayName = "NotificationDetailCard";
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* EXPORTS
|
|
179
|
-
*/
|
|
180
|
-
export default asBaseComponent(NotificationDetailCard);
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef, useState } from "react";
|
|
5
|
+
import { Modal, TouchableOpacity, Image, View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// commons / icons
|
|
8
|
+
import { Icons } from "../../common/icons-svg";
|
|
9
|
+
|
|
10
|
+
// components
|
|
11
|
+
import Box from "../box";
|
|
12
|
+
import Typography from "../typography";
|
|
13
|
+
|
|
14
|
+
// typings
|
|
15
|
+
import type { INotificationDetailCardProps } from "./interface";
|
|
16
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
17
|
+
|
|
18
|
+
// styles / theme
|
|
19
|
+
import { theme } from "../../styles/theme/theme";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Componente NotificationDetailCard
|
|
23
|
+
*/
|
|
24
|
+
const NotificationDetailCard: React.FC<INotificationDetailCardProps> = forwardRef<
|
|
25
|
+
View,
|
|
26
|
+
INotificationDetailCardProps
|
|
27
|
+
>(({ title, description, fileUrl, fileType = "image", testID }, ref) => {
|
|
28
|
+
const [visible, setVisible] = useState(false);
|
|
29
|
+
|
|
30
|
+
function openFile() {
|
|
31
|
+
if (fileType === "image") {
|
|
32
|
+
setVisible(true);
|
|
33
|
+
} else if (fileUrl) {
|
|
34
|
+
import("react-native").then(({ Linking }) => {
|
|
35
|
+
Linking.openURL(fileUrl).catch((err) => console.warn("Erro ao abrir arquivo:", err));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const borderColor = theme.colors.blue[500];
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Box
|
|
44
|
+
ref={ref}
|
|
45
|
+
testID={testID ?? "notification-detail-card"}
|
|
46
|
+
flexStyle={{ flexDirection: "row" }}
|
|
47
|
+
borderStyled={{
|
|
48
|
+
borderWidth: 1,
|
|
49
|
+
borderColor: theme.colors.neutral[200],
|
|
50
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
51
|
+
}}
|
|
52
|
+
marginStyle={{ marginBottom: 16 }}
|
|
53
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
54
|
+
>
|
|
55
|
+
{/* borda fixa lateral esquerda */}
|
|
56
|
+
<Box
|
|
57
|
+
width={8}
|
|
58
|
+
backgroundColor={borderColor}
|
|
59
|
+
borderStyled={{
|
|
60
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
61
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
{/* Conteúdo do card */}
|
|
66
|
+
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings.md }}>
|
|
67
|
+
{/* header */}
|
|
68
|
+
<Typography
|
|
69
|
+
text={title}
|
|
70
|
+
fontFamily={theme.fonts.inter_bold}
|
|
71
|
+
fontWeight="700"
|
|
72
|
+
size={theme.fontSizes.md}
|
|
73
|
+
color={theme.colors.black[100]}
|
|
74
|
+
marginBottom={8}
|
|
75
|
+
/>
|
|
76
|
+
|
|
77
|
+
{/* texto */}
|
|
78
|
+
<Typography
|
|
79
|
+
text={description}
|
|
80
|
+
size={theme.fontSizes.sm}
|
|
81
|
+
lineHeight={theme.lineHeight.md}
|
|
82
|
+
color={theme.colors.gray[700]}
|
|
83
|
+
marginBottom={fileUrl ? 12 : 0}
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
{/* arquivo (se existir) */}
|
|
87
|
+
{fileUrl && (
|
|
88
|
+
<TouchableOpacity
|
|
89
|
+
testID="button"
|
|
90
|
+
onPress={openFile}
|
|
91
|
+
activeOpacity={0.8}
|
|
92
|
+
style={{
|
|
93
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
94
|
+
overflow: "hidden",
|
|
95
|
+
borderWidth: 1,
|
|
96
|
+
borderColor: theme.colors.gray[300],
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
99
|
+
{fileType === "image" ? (
|
|
100
|
+
<Box
|
|
101
|
+
borderStyled={{
|
|
102
|
+
borderWidth: 2,
|
|
103
|
+
borderColor: theme.colors.blue[525],
|
|
104
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
<Image
|
|
108
|
+
source={{ uri: fileUrl }}
|
|
109
|
+
style={{
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: 180,
|
|
112
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
113
|
+
borderWidth: 2,
|
|
114
|
+
borderColor: theme.colors.blue[525],
|
|
115
|
+
}}
|
|
116
|
+
resizeMode="cover"
|
|
117
|
+
/>
|
|
118
|
+
</Box>
|
|
119
|
+
) : (
|
|
120
|
+
<Box
|
|
121
|
+
flexStyle={{
|
|
122
|
+
flexDirection: "row",
|
|
123
|
+
alignItems: "center",
|
|
124
|
+
justifyContent: "space-between",
|
|
125
|
+
}}
|
|
126
|
+
paddingStyle={{ padding: theme.paddings.sm }}
|
|
127
|
+
>
|
|
128
|
+
<Typography
|
|
129
|
+
text={`Abrir arquivo (${fileType.toUpperCase()})`}
|
|
130
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
131
|
+
color={theme.colors.blue[500]}
|
|
132
|
+
size={theme.fontSizes.md}
|
|
133
|
+
/>
|
|
134
|
+
<Icons icon="FILES" size={20} color={theme.colors.blue[500]} />
|
|
135
|
+
</Box>
|
|
136
|
+
)}
|
|
137
|
+
</TouchableOpacity>
|
|
138
|
+
)}
|
|
139
|
+
</Box>
|
|
140
|
+
|
|
141
|
+
{/* modal para zoom da imagem */}
|
|
142
|
+
{fileType === "image" && (
|
|
143
|
+
<Modal visible={visible} transparent animationType="fade">
|
|
144
|
+
<View
|
|
145
|
+
style={{
|
|
146
|
+
flex: 1,
|
|
147
|
+
backgroundColor: "rgba(0,0,0,0.9)",
|
|
148
|
+
justifyContent: "center",
|
|
149
|
+
alignItems: "center",
|
|
150
|
+
}}
|
|
151
|
+
>
|
|
152
|
+
<TouchableOpacity
|
|
153
|
+
onPress={() => setVisible(false)}
|
|
154
|
+
style={{ position: "absolute", top: 40, right: 20 }}
|
|
155
|
+
>
|
|
156
|
+
<Icons icon="CLOSED" size={28} color={theme.colors.neutral[25]} />
|
|
157
|
+
</TouchableOpacity>
|
|
158
|
+
|
|
159
|
+
<Image
|
|
160
|
+
source={{ uri: fileUrl }}
|
|
161
|
+
style={{
|
|
162
|
+
width: "90%",
|
|
163
|
+
height: "70%",
|
|
164
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
165
|
+
}}
|
|
166
|
+
resizeMode="contain"
|
|
167
|
+
/>
|
|
168
|
+
</View>
|
|
169
|
+
</Modal>
|
|
170
|
+
)}
|
|
171
|
+
</Box>
|
|
172
|
+
);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
NotificationDetailCard.displayName = "NotificationDetailCard";
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* EXPORTS
|
|
179
|
+
*/
|
|
180
|
+
export default asBaseComponent(NotificationDetailCard);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IMPORTS
|
|
3
3
|
*/
|
|
4
|
-
import React, { useState } from "react";
|
|
5
|
-
import { View, TouchableOpacity,
|
|
4
|
+
import React, { useRef, useState } from "react";
|
|
5
|
+
import { View, TouchableOpacity, Animated, Easing } from "react-native";
|
|
6
6
|
|
|
7
7
|
// components
|
|
8
8
|
import Box from "../../components/box";
|
|
@@ -16,11 +16,9 @@ import { Icons } from "../../common/icons-svg";
|
|
|
16
16
|
import type { ITripDetailsCard } from "./interface";
|
|
17
17
|
import { asBaseComponent } from "../../@types/as-base-component";
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Components de details de viagem
|
|
21
|
+
*/
|
|
24
22
|
const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
25
23
|
dataRegistro,
|
|
26
24
|
numeroCte,
|
|
@@ -34,17 +32,33 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
34
32
|
kmVazio,
|
|
35
33
|
}) => {
|
|
36
34
|
const [expanded, setExpanded] = useState(true);
|
|
35
|
+
const animation = useRef(new Animated.Value(1)).current;
|
|
37
36
|
|
|
38
37
|
const toggleExpand = () => {
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
Animated.timing(animation, {
|
|
39
|
+
toValue: expanded ? 0 : 1,
|
|
40
|
+
duration: 300,
|
|
41
|
+
easing: Easing.out(Easing.ease),
|
|
42
|
+
useNativeDriver: false, // false pois animaremos altura (layout)
|
|
43
|
+
}).start();
|
|
44
|
+
setExpanded(!expanded);
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
const formatPeso = (v?: number) =>
|
|
44
|
-
v
|
|
48
|
+
v == null ? "Não informado" : `${v.toLocaleString("pt-BR")} kg`;
|
|
45
49
|
|
|
46
50
|
const formatBase = (v?: number) =>
|
|
47
|
-
v
|
|
51
|
+
v == null ? "Não informado" : `R$ ${v.toLocaleString("pt-BR")}`;
|
|
52
|
+
|
|
53
|
+
// altura animada e opacidade
|
|
54
|
+
const heightInterpolate = animation.interpolate({
|
|
55
|
+
inputRange: [0, 1],
|
|
56
|
+
outputRange: [0, 1],
|
|
57
|
+
});
|
|
58
|
+
const opacityInterpolate = animation.interpolate({
|
|
59
|
+
inputRange: [0, 1],
|
|
60
|
+
outputRange: [0, 1],
|
|
61
|
+
});
|
|
48
62
|
|
|
49
63
|
return (
|
|
50
64
|
<Box
|
|
@@ -84,20 +98,39 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
84
98
|
size={theme.fontSizes.md}
|
|
85
99
|
/>
|
|
86
100
|
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
101
|
+
<Animated.View
|
|
102
|
+
style={{
|
|
103
|
+
transform: [
|
|
104
|
+
{
|
|
105
|
+
rotate: animation.interpolate({
|
|
106
|
+
inputRange: [0, 1],
|
|
107
|
+
outputRange: ["180deg", "0deg"],
|
|
108
|
+
}),
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
<Icons icon={"CHEVRON_UP"} color={theme.colors.gray[700]} size={20} />
|
|
114
|
+
</Animated.View>
|
|
92
115
|
</Box>
|
|
93
116
|
</TouchableOpacity>
|
|
94
117
|
|
|
95
|
-
{/*
|
|
96
|
-
|
|
97
|
-
|
|
118
|
+
{/* Conteúdo animado */}
|
|
119
|
+
<Animated.View
|
|
120
|
+
style={{
|
|
121
|
+
overflow: "hidden",
|
|
122
|
+
opacity: opacityInterpolate,
|
|
123
|
+
transform: [
|
|
124
|
+
{
|
|
125
|
+
scaleY: heightInterpolate,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
}}
|
|
129
|
+
>
|
|
130
|
+
<Box marginStyle={{ marginTop: theme.margins["1xs"] }}>
|
|
98
131
|
<Box
|
|
99
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
100
132
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
133
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
101
134
|
>
|
|
102
135
|
<Typography
|
|
103
136
|
text={"Número CTE: "}
|
|
@@ -114,8 +147,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
114
147
|
</Box>
|
|
115
148
|
|
|
116
149
|
<Box
|
|
117
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
118
150
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
151
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
119
152
|
>
|
|
120
153
|
<Typography
|
|
121
154
|
text="Data carregamento: "
|
|
@@ -132,8 +165,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
132
165
|
</Box>
|
|
133
166
|
|
|
134
167
|
<Box
|
|
135
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
136
168
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
169
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
137
170
|
>
|
|
138
171
|
<Typography
|
|
139
172
|
text="Origem: "
|
|
@@ -150,8 +183,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
150
183
|
</Box>
|
|
151
184
|
|
|
152
185
|
<Box
|
|
153
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
154
186
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
187
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
155
188
|
>
|
|
156
189
|
<Typography
|
|
157
190
|
text="Destino: "
|
|
@@ -168,8 +201,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
168
201
|
</Box>
|
|
169
202
|
|
|
170
203
|
<Box
|
|
171
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
172
204
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
205
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
173
206
|
>
|
|
174
207
|
<Typography
|
|
175
208
|
text="Próximo carregamento: "
|
|
@@ -186,8 +219,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
186
219
|
</Box>
|
|
187
220
|
|
|
188
221
|
<Box
|
|
189
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
190
222
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
223
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
191
224
|
>
|
|
192
225
|
<Typography
|
|
193
226
|
text={"Peso: "}
|
|
@@ -196,7 +229,7 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
196
229
|
size={theme.fontSizes.xs}
|
|
197
230
|
/>
|
|
198
231
|
<Typography
|
|
199
|
-
text={`${formatPeso(peso)
|
|
232
|
+
text={`${formatPeso(peso)}`}
|
|
200
233
|
color={theme.colors.gray[700]}
|
|
201
234
|
fontFamily={theme.fonts.inter_regular_400}
|
|
202
235
|
size={theme.fontSizes.xs}
|
|
@@ -204,8 +237,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
204
237
|
</Box>
|
|
205
238
|
|
|
206
239
|
<Box
|
|
207
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
208
240
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
241
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
209
242
|
>
|
|
210
243
|
<Typography
|
|
211
244
|
text={"Km carregado: "}
|
|
@@ -222,8 +255,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
222
255
|
</Box>
|
|
223
256
|
|
|
224
257
|
<Box
|
|
225
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
226
258
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
259
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
227
260
|
>
|
|
228
261
|
<Typography
|
|
229
262
|
text={"Km vazio: "}
|
|
@@ -240,8 +273,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
240
273
|
</Box>
|
|
241
274
|
|
|
242
275
|
<Box
|
|
243
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
244
276
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
277
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
245
278
|
>
|
|
246
279
|
<Typography
|
|
247
280
|
text="Base para cálculo do PRO: "
|
|
@@ -250,14 +283,14 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
250
283
|
size={theme.fontSizes.xs}
|
|
251
284
|
/>
|
|
252
285
|
<Typography
|
|
253
|
-
text={`${formatBase(baseCalculo)
|
|
286
|
+
text={`${formatBase(baseCalculo)}`}
|
|
254
287
|
color={theme.colors.gray[700]}
|
|
255
288
|
fontFamily={theme.fonts.inter_regular_400}
|
|
256
289
|
size={theme.fontSizes.xs}
|
|
257
290
|
/>
|
|
258
291
|
</Box>
|
|
259
|
-
|
|
260
|
-
|
|
292
|
+
</Box>
|
|
293
|
+
</Animated.View>
|
|
261
294
|
</Box>
|
|
262
295
|
</Box>
|
|
263
296
|
);
|
package/src/index.tsx
CHANGED
|
@@ -27,24 +27,24 @@ export { default as WeeklyTable } from "./components/weekly-table";
|
|
|
27
27
|
export { default as CardMaintenance } from "./components/card-maintenance";
|
|
28
28
|
export { default as ModalMaintenance } from "./components/modal-maintenance";
|
|
29
29
|
export { default as LoadingCircle } from "./components/loading-circle";
|
|
30
|
-
export { default as ConfirmWithdrawModal } from "./components/confirm-withdraw-modal";
|
|
31
30
|
export { default as MonthlySummaryTable } from "./components/monthly-summary-table";
|
|
32
31
|
export { default as CardWithDrawCoil } from "./components/card-with-draw-coil";
|
|
33
32
|
export { default as CoilRemovalCode } from "./components/coil-removel-code";
|
|
34
33
|
export { default as SupplyErrorCard } from "./components/supply-error-card";
|
|
35
34
|
export { default as MaintenanceDescriptionInput } from "./components/maintenance-description-input";
|
|
36
35
|
export { default as TripDetailsCard } from "./components/trip-details-card";
|
|
37
|
-
export { default as TruckNotFound } from "./components/truck-not-found";
|
|
38
36
|
export { default as TravelHistory } from "./components/travel-history";
|
|
39
|
-
export { default as
|
|
37
|
+
export { default as TruckNotFound } from "./components/truck-not-found";
|
|
40
38
|
export { default as ToastMessage } from "./components/toast-message";
|
|
41
|
-
export { default as
|
|
39
|
+
export { default as BottomMessageConexion } from "./components/bottom-message-conexion";
|
|
42
40
|
export { default as ResumeRaking } from "./components/resume-raking";
|
|
43
41
|
export { default as ListSupplies } from "./components/list-supplies";
|
|
44
42
|
export { default as ListDevices } from "./components/list-devices";
|
|
43
|
+
export { default as ModalTypeActivities } from "./components/modal-type-activities";
|
|
45
44
|
export { default as ModalActivityReason } from "./components/modals/modal-activity-reason";
|
|
46
45
|
export { default as ModalJourneyRectification } from "./components/modals/modal-edite-journey-rectification";
|
|
47
46
|
export { default as ModalCreteActivitie } from "./components/modals/modal-create-activitie";
|
|
47
|
+
export { default as ConfirmWithdrawModal } from "./components/confirm-withdraw-modal";
|
|
48
48
|
export { default as ModalToConfirmations } from "./components/modals/modal-to-confimations";
|
|
49
49
|
export { default as ActivityTimeline } from "./components/activity-step";
|
|
50
50
|
export { default as NotificationCard } from "./components/notification-card";
|