jornada-ui 0.4.18 → 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/list-supplies/index.js +132 -111
- package/lib/commonjs/components/list-supplies/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/notification-details-card/index.js +6 -6
- 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/trip-details-card/index.js +218 -182
- package/lib/commonjs/components/trip-details-card/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/commonjs/index.js +32 -32
- 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/list-supplies/index.js +134 -113
- package/lib/module/components/list-supplies/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/notification-details-card/index.js +6 -6
- 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/trip-details-card/index.js +221 -184
- package/lib/module/components/trip-details-card/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/module/index.js +4 -4
- package/lib/module/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/list-supplies/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/trip-details-card/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/commonjs/src/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/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/list-supplies/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/trip-details-card/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/lib/typescript/module/src/index.d.ts +4 -4
- package/lib/typescript/module/src/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/list-supplies/index.tsx +178 -153
- 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/notification-details-card/index.tsx +180 -180
- 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/trip-details-card/index.tsx +65 -32
- 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
- package/src/index.tsx +4 -4
|
@@ -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
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
1
4
|
import React, { useState, forwardRef, useImperativeHandle, useRef } from "react";
|
|
2
5
|
import { View, Text, TouchableOpacity, FlatList, FlatList as FlatListType } from "react-native";
|
|
3
6
|
|
|
@@ -10,23 +13,31 @@ import { Icons } from "../../common/icons-svg";
|
|
|
10
13
|
// helpers
|
|
11
14
|
import { getIconKeyByValue } from "./helpers/get-icon-by-status";
|
|
12
15
|
|
|
13
|
-
// typings
|
|
14
|
-
import type { IStepIndicator } from "./interface";
|
|
15
|
-
|
|
16
16
|
// utils
|
|
17
17
|
import { formHoursMinute } from "../../utils/format-date";
|
|
18
18
|
|
|
19
|
+
// typings
|
|
20
|
+
import type { IStepIndicator } from "./interface";
|
|
21
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
22
|
+
|
|
19
23
|
// styles
|
|
20
24
|
import { styles } from "./styles";
|
|
21
25
|
import { theme } from "../../styles/theme/theme";
|
|
22
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
23
26
|
|
|
24
27
|
/**
|
|
25
28
|
* Componente StepIndicator para a interação da ui.
|
|
26
29
|
*/
|
|
27
30
|
const StepIndicator = forwardRef<any, IStepIndicator>(
|
|
28
31
|
(
|
|
29
|
-
{
|
|
32
|
+
{
|
|
33
|
+
testID = "step-indicator",
|
|
34
|
+
data = [],
|
|
35
|
+
type,
|
|
36
|
+
textColorDescription,
|
|
37
|
+
titleColor,
|
|
38
|
+
titleNumberColor,
|
|
39
|
+
onChangeActivity,
|
|
40
|
+
},
|
|
30
41
|
ref
|
|
31
42
|
) => {
|
|
32
43
|
const StepDefault = () => {
|
|
@@ -83,7 +94,7 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
|
|
|
83
94
|
|
|
84
95
|
return (
|
|
85
96
|
<TouchableOpacity
|
|
86
|
-
testID=
|
|
97
|
+
testID={`${testID}-item-${index}`}
|
|
87
98
|
activeOpacity={0.7}
|
|
88
99
|
style={styles({}).containerIndicator}
|
|
89
100
|
disabled={!canEdit}
|
|
@@ -112,13 +123,19 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
|
|
|
112
123
|
<Text style={styles({ titleColor }).title}>{history?.descricao}</Text>
|
|
113
124
|
|
|
114
125
|
{history?.data_inicio && (
|
|
115
|
-
<Text
|
|
126
|
+
<Text
|
|
127
|
+
testID={`${testID}-data-${index}`}
|
|
128
|
+
style={styles({ textColorDescription }).titleDescription}
|
|
129
|
+
>
|
|
116
130
|
{`Inicio: ${history.data_inicio} ás ${history.data_fim}`}
|
|
117
131
|
</Text>
|
|
118
132
|
)}
|
|
119
133
|
|
|
120
134
|
{history.duracao_segundos && (
|
|
121
|
-
<Text
|
|
135
|
+
<Text
|
|
136
|
+
testID={`${testID}-duration-${index}`}
|
|
137
|
+
style={styles({ textColorDescription }).titleDescription}
|
|
138
|
+
>
|
|
122
139
|
Duração: {formHoursMinute(history?.duracao_segundos as string)}
|
|
123
140
|
</Text>
|
|
124
141
|
)}
|
|
@@ -155,6 +172,7 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
|
|
|
155
172
|
|
|
156
173
|
{isModalVisible && (
|
|
157
174
|
<ModalChangeActivity
|
|
175
|
+
testID={`${testID}-modal-change-activity`}
|
|
158
176
|
visible={isModalVisible}
|
|
159
177
|
modalConfirm={handleConfirmModal}
|
|
160
178
|
descricao=""
|
|
@@ -1,75 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import React, { forwardRef, useMemo } from "react";
|
|
6
|
-
import { View } from "react-native";
|
|
7
|
-
|
|
8
|
-
// components
|
|
9
|
-
import Typography from "../typography";
|
|
10
|
-
|
|
11
|
-
// typings
|
|
12
|
-
import type { ToastMessageCustoProps } from "./interface";
|
|
13
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
14
|
-
|
|
15
|
-
import { styles } from "./styles";
|
|
16
|
-
import { theme } from "../../styles/theme/theme";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Componente ToastMessage para a exibição de mensagens de conexão.
|
|
20
|
-
*/
|
|
21
|
-
const ToastMessage = forwardRef<any, ToastMessageCustoProps>(
|
|
22
|
-
({ text1, text2, options }, ref): React.ReactElement => {
|
|
23
|
-
const borderColor = useMemo(() => {
|
|
24
|
-
const map = {
|
|
25
|
-
success: theme.colors?.green[400] ?? "#69C779",
|
|
26
|
-
alert: theme.colors?.blue[800] ?? "#87CEFA",
|
|
27
|
-
error: theme.colors?.red[500] ?? "#ef4444",
|
|
28
|
-
} as const;
|
|
29
|
-
return map[options];
|
|
30
|
-
}, [options, theme]);
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<View ref={ref} style={styles.wrapperToash}>
|
|
34
|
-
<View style={styles.wrapperBorder}>
|
|
35
|
-
<View
|
|
36
|
-
testID="border-custom"
|
|
37
|
-
style={[styles.borderCustom, { backgroundColor: borderColor }]}
|
|
38
|
-
/>
|
|
39
|
-
</View>
|
|
40
|
-
|
|
41
|
-
<View style={styles.wrapperText}>
|
|
42
|
-
{!!text1 && (
|
|
43
|
-
<Typography
|
|
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
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef, useMemo } from "react";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
|
|
8
|
+
// components
|
|
9
|
+
import Typography from "../typography";
|
|
10
|
+
|
|
11
|
+
// typings
|
|
12
|
+
import type { ToastMessageCustoProps } from "./interface";
|
|
13
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
14
|
+
|
|
15
|
+
import { styles } from "./styles";
|
|
16
|
+
import { theme } from "../../styles/theme/theme";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Componente ToastMessage para a exibição de mensagens de conexão.
|
|
20
|
+
*/
|
|
21
|
+
const ToastMessage = forwardRef<any, ToastMessageCustoProps>(
|
|
22
|
+
({ testID, text1, text2, options }, ref): React.ReactElement => {
|
|
23
|
+
const borderColor = useMemo(() => {
|
|
24
|
+
const map = {
|
|
25
|
+
success: theme.colors?.green[400] ?? "#69C779",
|
|
26
|
+
alert: theme.colors?.blue[800] ?? "#87CEFA",
|
|
27
|
+
error: theme.colors?.red[500] ?? "#ef4444",
|
|
28
|
+
} as const;
|
|
29
|
+
return map[options];
|
|
30
|
+
}, [options, theme]);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View testID={testID} ref={ref} style={styles.wrapperToash}>
|
|
34
|
+
<View style={styles.wrapperBorder}>
|
|
35
|
+
<View
|
|
36
|
+
testID="border-custom"
|
|
37
|
+
style={[styles.borderCustom, { backgroundColor: borderColor }]}
|
|
38
|
+
/>
|
|
39
|
+
</View>
|
|
40
|
+
|
|
41
|
+
<View style={styles.wrapperText}>
|
|
42
|
+
{!!text1 && (
|
|
43
|
+
<Typography
|
|
44
|
+
testID={`${testID}-text1`}
|
|
45
|
+
text={String(text1)}
|
|
46
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
47
|
+
color={"blue500"}
|
|
48
|
+
size={theme.fontSizes.xs}
|
|
49
|
+
lineHeight={theme.lineHeight["2xl"]}
|
|
50
|
+
letterSpacing={"regular"}
|
|
51
|
+
/>
|
|
52
|
+
)}
|
|
53
|
+
|
|
54
|
+
{!!text2 && (
|
|
55
|
+
<Typography
|
|
56
|
+
testID={`${testID}-text2`}
|
|
57
|
+
text={String(text2)}
|
|
58
|
+
fontFamily="inter_regular_400"
|
|
59
|
+
color={"black25"}
|
|
60
|
+
size={theme.fontSizes.xs}
|
|
61
|
+
lineHeight={theme.lineHeight["2xl"]}
|
|
62
|
+
letterSpacing={"regular"}
|
|
63
|
+
marginBottom={4}
|
|
64
|
+
/>
|
|
65
|
+
)}
|
|
66
|
+
</View>
|
|
67
|
+
</View>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
ToastMessage.displayName = "ToastMessage";
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* EXPORT
|
|
76
|
+
*/
|
|
77
|
+
export default asBaseComponent(ToastMessage);
|