jornada-ui 0.4.19 → 0.4.20
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/box/index.js +5 -5
- package/lib/commonjs/components/box/index.js.map +1 -1
- package/lib/commonjs/components/button/index.js +5 -5
- package/lib/commonjs/components/button/index.js.map +1 -1
- package/lib/commonjs/components/capture-photo/index.js +1 -1
- package/lib/commonjs/components/capture-photo/index.js.map +1 -1
- package/lib/commonjs/components/card-hours/index.js +5 -5
- package/lib/commonjs/components/card-hours/index.js.map +1 -1
- package/lib/commonjs/components/card-maintenance/index.js +3 -0
- package/lib/commonjs/components/card-maintenance/index.js.map +1 -1
- package/lib/commonjs/components/maintenance-description-input/index.js +5 -1
- package/lib/commonjs/components/maintenance-description-input/index.js.map +1 -1
- package/lib/commonjs/components/modal-maintenance/index.js +2 -0
- package/lib/commonjs/components/modal-maintenance/index.js.map +1 -1
- package/lib/commonjs/components/modal-type-activities/index.js +10 -4
- package/lib/commonjs/components/modal-type-activities/index.js.map +1 -1
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +2 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -1
- package/lib/commonjs/components/report-bobinas/index.js +12 -6
- package/lib/commonjs/components/report-bobinas/index.js.map +1 -1
- package/lib/commonjs/components/resume-raking/index.js +5 -0
- package/lib/commonjs/components/resume-raking/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +12 -4
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/toast-message/index.js +10 -6
- package/lib/commonjs/components/toast-message/index.js.map +1 -1
- package/lib/commonjs/components/toggle-fuel/index.js +1 -0
- package/lib/commonjs/components/toggle-fuel/index.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +2 -0
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/components/user-journey-work-card/index.js +14 -0
- package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +9 -1
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/components/weekly-hours-balance/index.js +2 -0
- package/lib/commonjs/components/weekly-hours-balance/index.js.map +1 -1
- package/lib/module/components/box/index.js +5 -5
- package/lib/module/components/box/index.js.map +1 -1
- package/lib/module/components/button/index.js +5 -5
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/capture-photo/index.js +1 -1
- package/lib/module/components/capture-photo/index.js.map +1 -1
- package/lib/module/components/card-hours/index.js +5 -5
- package/lib/module/components/card-hours/index.js.map +1 -1
- package/lib/module/components/card-maintenance/index.js +3 -0
- package/lib/module/components/card-maintenance/index.js.map +1 -1
- package/lib/module/components/maintenance-description-input/index.js +5 -1
- package/lib/module/components/maintenance-description-input/index.js.map +1 -1
- package/lib/module/components/modal-maintenance/index.js +2 -0
- package/lib/module/components/modal-maintenance/index.js.map +1 -1
- package/lib/module/components/modal-type-activities/index.js +10 -4
- package/lib/module/components/modal-type-activities/index.js.map +1 -1
- package/lib/module/components/modals/modal-change-activitie-history/index.js +2 -0
- package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -1
- package/lib/module/components/report-bobinas/index.js +12 -6
- package/lib/module/components/report-bobinas/index.js.map +1 -1
- package/lib/module/components/resume-raking/index.js +5 -0
- package/lib/module/components/resume-raking/index.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +12 -4
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/toast-message/index.js +10 -6
- package/lib/module/components/toast-message/index.js.map +1 -1
- package/lib/module/components/toggle-fuel/index.js +1 -0
- package/lib/module/components/toggle-fuel/index.js.map +1 -1
- package/lib/module/components/typography/index.js +2 -0
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/components/user-journey-work-card/index.js +14 -0
- package/lib/module/components/user-journey-work-card/index.js.map +1 -1
- package/lib/module/components/user-profile/index.js +9 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/components/weekly-hours-balance/index.js +2 -0
- package/lib/module/components/weekly-hours-balance/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/box/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-hours/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-maintenance/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 +2 -0
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/report-bobinas/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toggle-fuel/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/typography/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-profile/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-hours-balance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/box/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-hours/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-maintenance/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 +2 -0
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/report-bobinas/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/resume-raking/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/resume-raking/interface.d.ts +13 -0
- package/lib/typescript/module/src/components/resume-raking/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -0
- package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/interface.d.ts +1 -0
- package/lib/typescript/module/src/components/toast-message/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toggle-fuel/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/typography/index.d.ts +1 -0
- package/lib/typescript/module/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-profile/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-hours-balance/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/box/index.tsx +53 -53
- package/src/components/button/index.tsx +76 -76
- package/src/components/capture-photo/index.tsx +1 -1
- package/src/components/card-hours/index.tsx +121 -121
- package/src/components/card-maintenance/index.tsx +8 -2
- package/src/components/card-maintenance/interface.d.ts +4 -0
- package/src/components/maintenance-description-input/index.tsx +11 -4
- package/src/components/modal-maintenance/index.tsx +2 -1
- package/src/components/modal-maintenance/interface.d.ts +1 -0
- package/src/components/modal-type-activities/index.tsx +23 -5
- package/src/components/modal-type-activities/interface.ts +3 -0
- package/src/components/modals/modal-change-activitie-history/index.tsx +2 -1
- package/src/components/modals/modal-change-activitie-history/interface.ts +4 -0
- package/src/components/report-bobinas/index.tsx +185 -175
- package/src/components/resume-raking/index.tsx +5 -1
- package/src/components/resume-raking/interface.ts +16 -0
- package/src/components/step-indicator/index.tsx +26 -8
- package/src/components/step-indicator/interface.d.ts +3 -0
- package/src/components/toast-message/index.tsx +77 -75
- package/src/components/toast-message/interface.ts +18 -17
- package/src/components/toggle-fuel/index.tsx +1 -0
- package/src/components/typography/index.tsx +2 -0
- package/src/components/typography/interface.d.ts +104 -102
- package/src/components/user-journey-work-card/index.tsx +23 -2
- package/src/components/user-profile/index.tsx +10 -1
- package/src/components/weekly-hours-balance/index.tsx +2 -1
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
import React, { forwardRef, useState } from "react";
|
|
5
5
|
import { View, Text, TextInput } from "react-native";
|
|
6
6
|
|
|
7
|
+
import Box from "../box";
|
|
8
|
+
|
|
7
9
|
// typings
|
|
8
10
|
import type { MaintenanceDescriptionInputProps } from "./interface";
|
|
9
11
|
import { asBaseComponent } from "../../@types/as-base-component";
|
|
10
12
|
|
|
11
13
|
// styles
|
|
12
14
|
import { stylesInput } from "./styles";
|
|
13
|
-
import Box from "../box";
|
|
14
15
|
|
|
15
16
|
const MAX_LENGTH = 150;
|
|
16
17
|
|
|
17
18
|
const MaintenanceDescriptionInput = forwardRef<any, MaintenanceDescriptionInputProps>(
|
|
18
|
-
({ label, onChangeText, error = null, ...props }, ref): React.ReactElement => {
|
|
19
|
+
({ testID, label, onChangeText, error = null, ...props }, ref): React.ReactElement => {
|
|
19
20
|
const [text, setText] = useState("");
|
|
20
21
|
|
|
21
22
|
const handleChangeText = (value: string) => {
|
|
@@ -26,10 +27,13 @@ const MaintenanceDescriptionInput = forwardRef<any, MaintenanceDescriptionInputP
|
|
|
26
27
|
|
|
27
28
|
return (
|
|
28
29
|
<View>
|
|
29
|
-
<Text style={stylesInput.label}>
|
|
30
|
+
<Text testID={`${testID}-label`} style={stylesInput.label}>
|
|
31
|
+
{label}
|
|
32
|
+
</Text>
|
|
30
33
|
|
|
31
34
|
<View style={stylesInput.inputWrapper}>
|
|
32
35
|
<TextInput
|
|
36
|
+
testID={testID}
|
|
33
37
|
ref={ref}
|
|
34
38
|
multiline
|
|
35
39
|
style={stylesInput.input}
|
|
@@ -46,7 +50,10 @@ const MaintenanceDescriptionInput = forwardRef<any, MaintenanceDescriptionInputP
|
|
|
46
50
|
marginStyle={{ marginBottom: 16 }}
|
|
47
51
|
>
|
|
48
52
|
{error && <Text style={stylesInput.errorText}>{error}</Text>}
|
|
49
|
-
<Text
|
|
53
|
+
<Text
|
|
54
|
+
testID={`${testID}-counter`}
|
|
55
|
+
style={stylesInput.charCount}
|
|
56
|
+
>{`${text.length}/${MAX_LENGTH}`}</Text>
|
|
50
57
|
</Box>
|
|
51
58
|
</View>
|
|
52
59
|
);
|
|
@@ -19,6 +19,7 @@ import { theme } from "../../styles/theme/theme";
|
|
|
19
19
|
import { getStatusColorHex } from "../../utils/get-status-color";
|
|
20
20
|
|
|
21
21
|
const ModalMaintenance: React.FC<IModalMaintenanceProps> = ({
|
|
22
|
+
testID = "modal-maintenance",
|
|
22
23
|
visible,
|
|
23
24
|
onClose,
|
|
24
25
|
dataRegistro,
|
|
@@ -27,7 +28,7 @@ const ModalMaintenance: React.FC<IModalMaintenanceProps> = ({
|
|
|
27
28
|
imagemUrl,
|
|
28
29
|
}) => {
|
|
29
30
|
return (
|
|
30
|
-
<Modal animationType="fade" transparent visible={visible}>
|
|
31
|
+
<Modal testID={testID} animationType="fade" transparent visible={visible}>
|
|
31
32
|
<View
|
|
32
33
|
style={{
|
|
33
34
|
flex: 1,
|
|
@@ -29,13 +29,23 @@ const NUM_COLS = 3;
|
|
|
29
29
|
const GUTTER = 8; // espaço horizontal entre botões
|
|
30
30
|
const ROW_SPACE = 12; // espaço vertical entre linhas
|
|
31
31
|
|
|
32
|
-
const
|
|
32
|
+
const ModalTypeActivities = forwardRef<any, IModalTypeActivities>(
|
|
33
33
|
(
|
|
34
|
-
{
|
|
34
|
+
{
|
|
35
|
+
testID = "modal-activity",
|
|
36
|
+
visible,
|
|
37
|
+
onClose,
|
|
38
|
+
driverType,
|
|
39
|
+
handleSelectActivity,
|
|
40
|
+
activityType,
|
|
41
|
+
isLoading,
|
|
42
|
+
style,
|
|
43
|
+
},
|
|
35
44
|
ref
|
|
36
45
|
): React.ReactElement => {
|
|
37
46
|
return (
|
|
38
47
|
<Modal
|
|
48
|
+
testID={testID}
|
|
39
49
|
ref={ref}
|
|
40
50
|
animationType="fade"
|
|
41
51
|
transparent={true}
|
|
@@ -69,6 +79,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
|
|
|
69
79
|
}}
|
|
70
80
|
>
|
|
71
81
|
<Typography
|
|
82
|
+
testID={`${testID}-title`}
|
|
72
83
|
text="Atividades"
|
|
73
84
|
size={theme.fontSizes.md}
|
|
74
85
|
color={theme.colors.blue[500]}
|
|
@@ -76,7 +87,11 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
|
|
|
76
87
|
lineHeight={theme.fontSizes.xl}
|
|
77
88
|
/>
|
|
78
89
|
|
|
79
|
-
<TouchableOpacity
|
|
90
|
+
<TouchableOpacity
|
|
91
|
+
testID={`${testID}-close-button`}
|
|
92
|
+
activeOpacity={0.7}
|
|
93
|
+
onPress={onClose}
|
|
94
|
+
>
|
|
80
95
|
<Icons icon="CLOSED" color={theme.colors.blue[500]} />
|
|
81
96
|
</TouchableOpacity>
|
|
82
97
|
</Box>
|
|
@@ -100,6 +115,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
|
|
|
100
115
|
|
|
101
116
|
return (
|
|
102
117
|
<TouchableOpacity
|
|
118
|
+
testID={`${testID}-${index}`}
|
|
103
119
|
style={{
|
|
104
120
|
alignItems: "center",
|
|
105
121
|
justifyContent: "flex-start",
|
|
@@ -114,6 +130,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
|
|
|
114
130
|
{getIconByProperty(item.referencia as PropertyType)}
|
|
115
131
|
|
|
116
132
|
<Typography
|
|
133
|
+
testID={`${testID}-description-${index}`}
|
|
117
134
|
text={item.descricao}
|
|
118
135
|
size={theme.fontSizes.xs}
|
|
119
136
|
color={theme.colors.blue[500]}
|
|
@@ -132,6 +149,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
|
|
|
132
149
|
</Box>
|
|
133
150
|
|
|
134
151
|
<Button
|
|
152
|
+
testID={`${testID}-cancel-button`}
|
|
135
153
|
title={"CANCELAR ATIVIDADE"}
|
|
136
154
|
width="100%"
|
|
137
155
|
height={40}
|
|
@@ -165,9 +183,9 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
|
|
|
165
183
|
}
|
|
166
184
|
);
|
|
167
185
|
|
|
168
|
-
|
|
186
|
+
ModalTypeActivities.displayName = "ModalTypeActivities";
|
|
169
187
|
|
|
170
188
|
/**
|
|
171
189
|
* EXPORT
|
|
172
190
|
*/
|
|
173
|
-
export default asBaseComponent(
|
|
191
|
+
export default asBaseComponent(ModalTypeActivities);
|
|
@@ -27,6 +27,7 @@ import { theme } from "../../../styles/theme/theme";
|
|
|
27
27
|
* Componente Modal para alteração de atividade.
|
|
28
28
|
*/
|
|
29
29
|
export const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({
|
|
30
|
+
testID = "modal-change-activity",
|
|
30
31
|
visible,
|
|
31
32
|
onClose,
|
|
32
33
|
modalConfirm,
|
|
@@ -59,7 +60,7 @@ export const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({
|
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
return (
|
|
62
|
-
<Modal animationType="fade" transparent visible={visible}>
|
|
63
|
+
<Modal testID={testID} animationType="fade" transparent visible={visible}>
|
|
63
64
|
<View
|
|
64
65
|
style={{
|
|
65
66
|
flex: 1,
|
|
@@ -1,175 +1,185 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { forwardRef } from "react";
|
|
5
|
-
|
|
6
|
-
// components
|
|
7
|
-
import Box from "../../components/box";
|
|
8
|
-
import Typography from "../../components/typography";
|
|
9
|
-
|
|
10
|
-
// commons / icons
|
|
11
|
-
import { Icons } from "../../common/icons-svg";
|
|
12
|
-
|
|
13
|
-
// typings
|
|
14
|
-
import type { IReportCoils } from "./interface";
|
|
15
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
16
|
-
|
|
17
|
-
// styles
|
|
18
|
-
import { theme } from "../../styles/theme/theme";
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Componente ReportCoils para a interação da ui.
|
|
22
|
-
*/
|
|
23
|
-
const ReportCoils = forwardRef<any, IReportCoils>((props, ref): React.ReactElement => {
|
|
24
|
-
const {
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import Box from "../../components/box";
|
|
8
|
+
import Typography from "../../components/typography";
|
|
9
|
+
|
|
10
|
+
// commons / icons
|
|
11
|
+
import { Icons } from "../../common/icons-svg";
|
|
12
|
+
|
|
13
|
+
// typings
|
|
14
|
+
import type { IReportCoils } from "./interface";
|
|
15
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
16
|
+
|
|
17
|
+
// styles
|
|
18
|
+
import { theme } from "../../styles/theme/theme";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Componente ReportCoils para a interação da ui.
|
|
22
|
+
*/
|
|
23
|
+
const ReportCoils = forwardRef<any, IReportCoils>((props, ref): React.ReactElement => {
|
|
24
|
+
const {
|
|
25
|
+
testID = "report-coils",
|
|
26
|
+
codeDisplayed = 4567,
|
|
27
|
+
generatedDate = "15/07/2025",
|
|
28
|
+
generatedTime = "10:30",
|
|
29
|
+
status = "OK",
|
|
30
|
+
backgroundColor,
|
|
31
|
+
idWithdrawal = 1,
|
|
32
|
+
} = props;
|
|
33
|
+
return (
|
|
34
|
+
<Box
|
|
35
|
+
testID={testID}
|
|
36
|
+
ref={ref}
|
|
37
|
+
width={"100%"}
|
|
38
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
39
|
+
borderStyled={{
|
|
40
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
41
|
+
}}
|
|
42
|
+
marginStyle={{
|
|
43
|
+
marginBottom: theme.margins["2xs"],
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<Box
|
|
47
|
+
width={"100%"}
|
|
48
|
+
height={22}
|
|
49
|
+
backgroundColor={backgroundColor ?? theme.colors.green[400]}
|
|
50
|
+
borderStyled={{
|
|
51
|
+
borderTopLeftRadius: theme.borderWidths.thin_bold,
|
|
52
|
+
borderTopRightRadius: theme.borderWidths.thin_bold,
|
|
53
|
+
borderColor: theme.colors.blue[400],
|
|
54
|
+
}}
|
|
55
|
+
flexStyle={{
|
|
56
|
+
justifyContent: "center",
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<Typography
|
|
60
|
+
testID={`${testID}-retirada`}
|
|
61
|
+
text={`Retirada ${idWithdrawal}`}
|
|
62
|
+
color={theme.colors.neutral[25]}
|
|
63
|
+
size={theme.fontSizes.sm}
|
|
64
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
65
|
+
fontWeight={"500"}
|
|
66
|
+
lineHeight={theme.fontSizes.lg}
|
|
67
|
+
marginLeft={theme.margins["2xs"]}
|
|
68
|
+
/>
|
|
69
|
+
</Box>
|
|
70
|
+
<Box
|
|
71
|
+
width={"100%"}
|
|
72
|
+
flexStyle={{
|
|
73
|
+
flexDirection: "row",
|
|
74
|
+
justifyContent: "space-between",
|
|
75
|
+
}}
|
|
76
|
+
paddingStyle={{
|
|
77
|
+
padding: 4,
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<Box>
|
|
81
|
+
<Box
|
|
82
|
+
flexStyle={{
|
|
83
|
+
flexDirection: "row",
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
}}
|
|
86
|
+
marginStyle={{
|
|
87
|
+
marginLeft: 4,
|
|
88
|
+
}}
|
|
89
|
+
height={45}
|
|
90
|
+
>
|
|
91
|
+
<Icons
|
|
92
|
+
testID={`${testID}-icon`}
|
|
93
|
+
icon={"FILES"}
|
|
94
|
+
size={32}
|
|
95
|
+
color={theme.colors.blue[100]}
|
|
96
|
+
/>
|
|
97
|
+
<Box>
|
|
98
|
+
<Box flexStyle={{ flexDirection: "row" }}>
|
|
99
|
+
<Typography
|
|
100
|
+
testID={`${testID}-efetuada`}
|
|
101
|
+
text={`Efetuada em: `}
|
|
102
|
+
size={12}
|
|
103
|
+
color={theme.colors.gray[900]}
|
|
104
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
105
|
+
/>
|
|
106
|
+
<Typography
|
|
107
|
+
text={`${generatedDate} ${generatedTime}`}
|
|
108
|
+
size={12}
|
|
109
|
+
color={theme.colors.gray[700]}
|
|
110
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
111
|
+
/>
|
|
112
|
+
</Box>
|
|
113
|
+
<Box marginStyle={{ marginTop: -8 }} flexStyle={{ flexDirection: "row" }}>
|
|
114
|
+
<Typography
|
|
115
|
+
testID={`${testID}-status`}
|
|
116
|
+
text={`Status: `}
|
|
117
|
+
size={12}
|
|
118
|
+
color={theme.colors.gray[900]}
|
|
119
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
120
|
+
/>
|
|
121
|
+
|
|
122
|
+
<Typography
|
|
123
|
+
text={`${status}`}
|
|
124
|
+
size={12}
|
|
125
|
+
color={theme.colors.gray[700]}
|
|
126
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
127
|
+
marginLeft={2}
|
|
128
|
+
/>
|
|
129
|
+
</Box>
|
|
130
|
+
</Box>
|
|
131
|
+
</Box>
|
|
132
|
+
</Box>
|
|
133
|
+
</Box>
|
|
134
|
+
|
|
135
|
+
{/* Segunda separação */}
|
|
136
|
+
<Box
|
|
137
|
+
width={"100%"}
|
|
138
|
+
height={46}
|
|
139
|
+
flexStyle={{
|
|
140
|
+
flexDirection: "row",
|
|
141
|
+
justifyContent: "space-between",
|
|
142
|
+
alignItems: "center",
|
|
143
|
+
}}
|
|
144
|
+
paddingStyle={{
|
|
145
|
+
paddingLeft: theme.paddings["2xs"],
|
|
146
|
+
paddingRight: theme.paddings["2xs"],
|
|
147
|
+
}}
|
|
148
|
+
borderStyled={{
|
|
149
|
+
borderTopWidth: 2,
|
|
150
|
+
borderTopColor: theme.colors.neutral[200],
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
<Box>
|
|
154
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
155
|
+
<Box marginStyle={{ marginRight: 2 }}>
|
|
156
|
+
<Typography
|
|
157
|
+
text={`Codigo apresentado:`}
|
|
158
|
+
size={10}
|
|
159
|
+
color={theme.colors.gray[700]}
|
|
160
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
161
|
+
/>
|
|
162
|
+
|
|
163
|
+
<Typography
|
|
164
|
+
text={`${codeDisplayed}`}
|
|
165
|
+
size={12}
|
|
166
|
+
color={theme.colors.blue[100]}
|
|
167
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
168
|
+
marginTop={-8}
|
|
169
|
+
/>
|
|
170
|
+
</Box>
|
|
171
|
+
</Box>
|
|
172
|
+
</Box>
|
|
173
|
+
|
|
174
|
+
<Icons icon={"CHECK_CIRCLE"} size={32} background={backgroundColor} />
|
|
175
|
+
</Box>
|
|
176
|
+
</Box>
|
|
177
|
+
);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
ReportCoils.displayName = "ReportCoils";
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* EXPORTS
|
|
184
|
+
*/
|
|
185
|
+
export default asBaseComponent(ReportCoils);
|
|
@@ -18,9 +18,10 @@ import type { IRankingCard } from "./interface";
|
|
|
18
18
|
* Componente ResumeRaking para a interação da ui.
|
|
19
19
|
*/
|
|
20
20
|
const ResumeRaking = forwardRef<any, IRankingCard>(
|
|
21
|
-
({ title, value, description }, ref): React.ReactElement => {
|
|
21
|
+
({ testID, title, value, description }, ref): React.ReactElement => {
|
|
22
22
|
return (
|
|
23
23
|
<Box
|
|
24
|
+
testID={testID}
|
|
24
25
|
ref={ref}
|
|
25
26
|
width={"100%"}
|
|
26
27
|
backgroundColor={theme.colors.neutral[25]}
|
|
@@ -38,6 +39,7 @@ const ResumeRaking = forwardRef<any, IRankingCard>(
|
|
|
38
39
|
>
|
|
39
40
|
{/* título */}
|
|
40
41
|
<Typography
|
|
42
|
+
testID={`${testID}-title`}
|
|
41
43
|
text={title}
|
|
42
44
|
color={theme.colors.black[100]}
|
|
43
45
|
size={theme.fontSizes.sm}
|
|
@@ -48,6 +50,7 @@ const ResumeRaking = forwardRef<any, IRankingCard>(
|
|
|
48
50
|
|
|
49
51
|
{/* valor principal */}
|
|
50
52
|
<Typography
|
|
53
|
+
testID={`${testID}-value`}
|
|
51
54
|
text={value}
|
|
52
55
|
color={theme.colors.black[180]}
|
|
53
56
|
size={theme.fontSizes["2xl"]}
|
|
@@ -59,6 +62,7 @@ const ResumeRaking = forwardRef<any, IRankingCard>(
|
|
|
59
62
|
<Box flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-end" }}>
|
|
60
63
|
{/* descrição */}
|
|
61
64
|
<Typography
|
|
65
|
+
testID={`${testID}-description`}
|
|
62
66
|
text={description}
|
|
63
67
|
color={theme.colors.red[500]}
|
|
64
68
|
size={theme.fontSizes.sm}
|
|
@@ -3,8 +3,24 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
interface IRankingCard {
|
|
6
|
+
/**
|
|
7
|
+
* TestID para testes automático e identificação
|
|
8
|
+
*/
|
|
9
|
+
testID?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Titulo para o card
|
|
13
|
+
*/
|
|
6
14
|
title: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Valor para o card
|
|
18
|
+
*/
|
|
7
19
|
value: string; // Ex: "53:35 H"
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Descrição para o card
|
|
23
|
+
*/
|
|
8
24
|
description: string; // Ex: "3.200 KM + 60:17 HORAS"
|
|
9
25
|
}
|
|
10
26
|
|