jornada-ui 0.4.4 → 0.4.6
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/capture-photo/index.js +4 -4
- package/lib/commonjs/components/card-report/index.js +139 -127
- package/lib/commonjs/components/card-report/index.js.map +1 -1
- package/lib/commonjs/components/card-with-draw-coil/index.js +5 -5
- package/lib/commonjs/components/card-with-draw-coil/index.js.map +1 -1
- package/lib/commonjs/components/coil-removel-code/index.js +5 -5
- package/lib/commonjs/components/coil-removel-code/index.js.map +1 -1
- package/lib/commonjs/components/history-activities-card/index.js +15 -18
- package/lib/commonjs/components/history-activities-card/index.js.map +1 -1
- package/lib/commonjs/components/resume-raking/index.js +79 -0
- package/lib/commonjs/components/resume-raking/index.js.map +1 -0
- package/lib/commonjs/components/resume-raking/interface.js +2 -0
- package/lib/commonjs/components/resume-raking/interface.js.map +1 -0
- package/lib/commonjs/components/resume-raking/styles.js +2 -0
- package/lib/commonjs/components/resume-raking/styles.js.map +1 -0
- package/lib/commonjs/components/travel-history/index.js +248 -237
- package/lib/commonjs/components/travel-history/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +1 -1
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/components/weekly-table/helpers/calcular-total-horas.js +48 -10
- package/lib/commonjs/components/weekly-table/helpers/calcular-total-horas.js.map +1 -1
- package/lib/commonjs/components/weekly-table/index.js +9 -10
- package/lib/commonjs/components/weekly-table/index.js.map +1 -1
- package/lib/commonjs/index.js +11 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +1 -0
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/module/components/capture-photo/index.js +4 -4
- package/lib/module/components/card-report/index.js +139 -127
- package/lib/module/components/card-report/index.js.map +1 -1
- package/lib/module/components/card-with-draw-coil/index.js +5 -5
- package/lib/module/components/card-with-draw-coil/index.js.map +1 -1
- package/lib/module/components/coil-removel-code/index.js +5 -5
- package/lib/module/components/coil-removel-code/index.js.map +1 -1
- package/lib/module/components/history-activities-card/index.js +13 -16
- package/lib/module/components/history-activities-card/index.js.map +1 -1
- package/lib/module/components/resume-raking/index.js +72 -0
- package/lib/module/components/resume-raking/index.js.map +1 -0
- package/lib/module/components/resume-raking/interface.js +2 -0
- package/lib/module/components/resume-raking/interface.js.map +1 -0
- package/lib/module/components/resume-raking/styles.js +2 -0
- package/lib/module/components/resume-raking/styles.js.map +1 -0
- package/lib/module/components/travel-history/index.js +248 -237
- package/lib/module/components/travel-history/index.js.map +1 -1
- package/lib/module/components/user-profile/index.js +1 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/components/weekly-table/helpers/calcular-total-horas.js +46 -9
- package/lib/module/components/weekly-table/helpers/calcular-total-horas.js.map +1 -1
- package/lib/module/components/weekly-table/index.js +10 -11
- package/lib/module/components/weekly-table/index.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/theme/theme.js +1 -0
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-report/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/card-report/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-with-draw-coil/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/history-activities-card/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/history-activities-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/history-activities-card/interface.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/history-activities-card/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts.map +1 -0
- 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 -0
- package/lib/typescript/commonjs/src/components/resume-raking/styles.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/resume-raking/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/travel-history/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/travel-history/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-table/helpers/calcular-total-horas.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/weekly-table/helpers/calcular-total-horas.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-table/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/theme/theme.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-report/index.d.ts +1 -0
- package/lib/typescript/module/src/components/card-report/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-with-draw-coil/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/history-activities-card/index.d.ts +1 -0
- package/lib/typescript/module/src/components/history-activities-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/history-activities-card/interface.d.ts +2 -0
- package/lib/typescript/module/src/components/history-activities-card/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/resume-raking/index.d.ts +8 -0
- package/lib/typescript/module/src/components/resume-raking/index.d.ts.map +1 -0
- 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 -0
- package/lib/typescript/module/src/components/resume-raking/styles.d.ts +1 -0
- package/lib/typescript/module/src/components/resume-raking/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/travel-history/index.d.ts +1 -0
- package/lib/typescript/module/src/components/travel-history/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-table/helpers/calcular-total-horas.d.ts +2 -1
- package/lib/typescript/module/src/components/weekly-table/helpers/calcular-total-horas.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-table/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/capture-photo/index.tsx +133 -133
- package/src/components/card-report/index.tsx +175 -168
- package/src/components/card-report/interface.d.ts +140 -136
- package/src/components/card-with-draw-coil/index.tsx +165 -165
- package/src/components/coil-removel-code/index.tsx +50 -50
- package/src/components/history-activities-card/index.tsx +211 -209
- package/src/components/history-activities-card/interface.ts +147 -145
- package/src/components/resume-raking/index.tsx +75 -0
- package/src/components/resume-raking/interface.ts +14 -0
- package/src/components/resume-raking/styles.ts +0 -0
- package/src/components/travel-history/index.tsx +330 -314
- package/src/components/travel-history/interface.d.ts +153 -149
- package/src/components/user-profile/index.tsx +1 -1
- package/src/components/weekly-table/helpers/calcular-total-horas.ts +89 -50
- package/src/components/weekly-table/index.tsx +138 -142
- package/src/index.tsx +1 -0
- package/src/styles/theme/theme.ts +1 -0
|
@@ -1,314 +1,330 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { forwardRef } from "react";
|
|
5
|
-
|
|
6
|
-
// components
|
|
7
|
-
import Box from "../box";
|
|
8
|
-
import Typography from "../typography";
|
|
9
|
-
|
|
10
|
-
// commons / icons
|
|
11
|
-
import { Icons } from "../../common/icons-svg";
|
|
12
|
-
|
|
13
|
-
// typings
|
|
14
|
-
import type { ITravelHistory } from "./interface";
|
|
15
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
16
|
-
|
|
17
|
-
// styles
|
|
18
|
-
import { theme } from "../../styles/theme/theme";
|
|
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
|
-
|
|
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
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import Box from "../box";
|
|
8
|
+
import Typography from "../typography";
|
|
9
|
+
|
|
10
|
+
// commons / icons
|
|
11
|
+
import { Icons } from "../../common/icons-svg";
|
|
12
|
+
|
|
13
|
+
// typings
|
|
14
|
+
import type { ITravelHistory } from "./interface";
|
|
15
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
16
|
+
|
|
17
|
+
// styles
|
|
18
|
+
import { theme } from "../../styles/theme/theme";
|
|
19
|
+
import { TouchableOpacity } from "react-native";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Componente TravelHistory para a interação da ui.
|
|
23
|
+
*/
|
|
24
|
+
const TravelHistory = forwardRef<any, ITravelHistory>((props, ref): React.ReactElement => {
|
|
25
|
+
const {
|
|
26
|
+
testID,
|
|
27
|
+
backgroundColor,
|
|
28
|
+
idViagem,
|
|
29
|
+
startTrip,
|
|
30
|
+
plate,
|
|
31
|
+
value,
|
|
32
|
+
status,
|
|
33
|
+
supply,
|
|
34
|
+
nextTrip,
|
|
35
|
+
origin,
|
|
36
|
+
destination,
|
|
37
|
+
onPress,
|
|
38
|
+
|
|
39
|
+
// Flags de problema
|
|
40
|
+
supplyIssue = false,
|
|
41
|
+
logisticsIssue = false,
|
|
42
|
+
} = props;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<TouchableOpacity
|
|
46
|
+
ref={ref}
|
|
47
|
+
activeOpacity={0.7}
|
|
48
|
+
onPress={() =>
|
|
49
|
+
onPress({
|
|
50
|
+
backgroundColor,
|
|
51
|
+
idViagem,
|
|
52
|
+
startTrip,
|
|
53
|
+
plate,
|
|
54
|
+
value,
|
|
55
|
+
status,
|
|
56
|
+
supply,
|
|
57
|
+
nextTrip,
|
|
58
|
+
origin,
|
|
59
|
+
destination,
|
|
60
|
+
supplyIssue,
|
|
61
|
+
logisticsIssue,
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
>
|
|
65
|
+
<Box
|
|
66
|
+
testID={testID}
|
|
67
|
+
width={"100%"}
|
|
68
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
69
|
+
borderStyled={{
|
|
70
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
71
|
+
}}
|
|
72
|
+
marginStyle={{
|
|
73
|
+
marginBottom: theme.margins["2xs"],
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
<Box
|
|
77
|
+
testID="travel-history-header"
|
|
78
|
+
width={"100%"}
|
|
79
|
+
height={30}
|
|
80
|
+
backgroundColor={backgroundColor}
|
|
81
|
+
borderStyled={{
|
|
82
|
+
borderTopLeftRadius: theme.borderWidths.thin_bold,
|
|
83
|
+
borderTopRightRadius: theme.borderWidths.thin_bold,
|
|
84
|
+
borderColor: theme.colors.blue[400],
|
|
85
|
+
}}
|
|
86
|
+
flexStyle={{
|
|
87
|
+
flexDirection: "row",
|
|
88
|
+
justifyContent: "space-between",
|
|
89
|
+
alignItems: "center",
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
<Typography
|
|
93
|
+
text={`VIAGEM #${idViagem ?? "000"}`}
|
|
94
|
+
color={theme.colors.neutral[25]}
|
|
95
|
+
size={theme.fontSizes.xs}
|
|
96
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
97
|
+
fontWeight={"500"}
|
|
98
|
+
lineHeight={theme.fontSizes.lg}
|
|
99
|
+
marginLeft={theme.margins["2xs"]}
|
|
100
|
+
/>
|
|
101
|
+
<Typography
|
|
102
|
+
text={`INÍCIO ${startTrip ?? "01/01/2025 00:00"}`}
|
|
103
|
+
color={theme.colors.neutral[25]}
|
|
104
|
+
size={theme.fontSizes.xs}
|
|
105
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
106
|
+
fontWeight={"500"}
|
|
107
|
+
lineHeight={theme.fontSizes.lg}
|
|
108
|
+
marginRight={theme.margins["2xs"]}
|
|
109
|
+
/>
|
|
110
|
+
</Box>
|
|
111
|
+
|
|
112
|
+
<Box
|
|
113
|
+
width={"100%"}
|
|
114
|
+
flexStyle={{
|
|
115
|
+
flexDirection: "row",
|
|
116
|
+
justifyContent: "space-between",
|
|
117
|
+
}}
|
|
118
|
+
paddingStyle={{
|
|
119
|
+
padding: theme.paddings["2xs"],
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
<Box width={"100%"}>
|
|
123
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
124
|
+
<Box width={"100%"}>
|
|
125
|
+
<Box
|
|
126
|
+
flexStyle={{
|
|
127
|
+
flexDirection: "row",
|
|
128
|
+
justifyContent: "space-between",
|
|
129
|
+
}}
|
|
130
|
+
width={"100%"}
|
|
131
|
+
>
|
|
132
|
+
<Box flexStyle={{ flexDirection: "row" }}>
|
|
133
|
+
<Typography
|
|
134
|
+
text={`Placa: `}
|
|
135
|
+
size={theme.fontSizes.sm}
|
|
136
|
+
color={theme.colors.black[10]}
|
|
137
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
138
|
+
/>
|
|
139
|
+
<Typography
|
|
140
|
+
text={`${plate ?? "000-000"}`}
|
|
141
|
+
size={theme.fontSizes.xs}
|
|
142
|
+
color={theme.colors.black[180]}
|
|
143
|
+
fontFamily={theme.fonts.inter_light_300}
|
|
144
|
+
/>
|
|
145
|
+
</Box>
|
|
146
|
+
|
|
147
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
148
|
+
{supplyIssue && (
|
|
149
|
+
<Box testID="icon-supply" marginStyle={{ marginRight: 8 }}>
|
|
150
|
+
<Icons icon={"GAS_PUMP"} color={backgroundColor} size={24} />
|
|
151
|
+
</Box>
|
|
152
|
+
)}
|
|
153
|
+
|
|
154
|
+
{logisticsIssue && (
|
|
155
|
+
<Box testID="icon-logistics" marginStyle={{ marginRight: 8 }}>
|
|
156
|
+
<Icons
|
|
157
|
+
icon={"EXCLAMATION_CIRCLE"}
|
|
158
|
+
background={backgroundColor}
|
|
159
|
+
color={"#ffffff"}
|
|
160
|
+
size={24}
|
|
161
|
+
/>
|
|
162
|
+
</Box>
|
|
163
|
+
)}
|
|
164
|
+
|
|
165
|
+
<Box testID="icon-truck" marginStyle={{ marginRight: 8 }}>
|
|
166
|
+
<Icons icon={"TRUCK_ACTIVITY"} color={backgroundColor} size={24} />
|
|
167
|
+
</Box>
|
|
168
|
+
</Box>
|
|
169
|
+
</Box>
|
|
170
|
+
|
|
171
|
+
{status !== "ABERTA" && (
|
|
172
|
+
<Box
|
|
173
|
+
width={"84%"}
|
|
174
|
+
flexStyle={{
|
|
175
|
+
flexDirection: "row",
|
|
176
|
+
flexWrap: "wrap",
|
|
177
|
+
}}
|
|
178
|
+
>
|
|
179
|
+
<Typography
|
|
180
|
+
style={{ flexShrink: 1 }}
|
|
181
|
+
text={`Valor: `}
|
|
182
|
+
size={theme.fontSizes.sm}
|
|
183
|
+
color={theme.colors.black[10]}
|
|
184
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
185
|
+
/>
|
|
186
|
+
<Typography
|
|
187
|
+
text={`R$ ${value ?? "00,00"}`}
|
|
188
|
+
size={11}
|
|
189
|
+
color={theme.colors.black[180]}
|
|
190
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
191
|
+
/>
|
|
192
|
+
</Box>
|
|
193
|
+
)}
|
|
194
|
+
|
|
195
|
+
<Box
|
|
196
|
+
width={"84%"}
|
|
197
|
+
flexStyle={{
|
|
198
|
+
flexDirection: "row",
|
|
199
|
+
flexWrap: "wrap",
|
|
200
|
+
}}
|
|
201
|
+
>
|
|
202
|
+
<Typography
|
|
203
|
+
style={{ flexShrink: 1 }}
|
|
204
|
+
text={`Status viagem: `}
|
|
205
|
+
size={theme.fontSizes.sm}
|
|
206
|
+
color={theme.colors.black[10]}
|
|
207
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
208
|
+
/>
|
|
209
|
+
<Typography
|
|
210
|
+
text={`${status ?? "ABERTA"}`}
|
|
211
|
+
size={theme.fontSizes.xs}
|
|
212
|
+
color={backgroundColor ?? theme.colors.black[180]}
|
|
213
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
214
|
+
/>
|
|
215
|
+
</Box>
|
|
216
|
+
|
|
217
|
+
<Box
|
|
218
|
+
width={"84%"}
|
|
219
|
+
flexStyle={{
|
|
220
|
+
flexDirection: "row",
|
|
221
|
+
flexWrap: "wrap",
|
|
222
|
+
}}
|
|
223
|
+
>
|
|
224
|
+
<Typography
|
|
225
|
+
style={{ flexShrink: 1 }}
|
|
226
|
+
text={`Abastecimentos: `}
|
|
227
|
+
size={theme.fontSizes.sm}
|
|
228
|
+
color={theme.colors.black[10]}
|
|
229
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
230
|
+
/>
|
|
231
|
+
<Typography
|
|
232
|
+
text={`${supply ?? "0"}`}
|
|
233
|
+
size={theme.fontSizes.xs}
|
|
234
|
+
color={backgroundColor ?? theme.colors.black[180]}
|
|
235
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
236
|
+
/>
|
|
237
|
+
</Box>
|
|
238
|
+
|
|
239
|
+
<Box
|
|
240
|
+
width={"84%"}
|
|
241
|
+
flexStyle={{
|
|
242
|
+
flexDirection: "row",
|
|
243
|
+
flexWrap: "wrap",
|
|
244
|
+
}}
|
|
245
|
+
>
|
|
246
|
+
<Typography
|
|
247
|
+
style={{ flexShrink: 1 }}
|
|
248
|
+
text={`Próxima viagem: `}
|
|
249
|
+
size={theme.fontSizes.sm}
|
|
250
|
+
color={theme.colors.black[10]}
|
|
251
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
252
|
+
/>
|
|
253
|
+
<Typography
|
|
254
|
+
text={`${nextTrip ?? "Não especificado"}`}
|
|
255
|
+
size={theme.fontSizes.xs}
|
|
256
|
+
color={backgroundColor ?? theme.colors.black[180]}
|
|
257
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
258
|
+
/>
|
|
259
|
+
</Box>
|
|
260
|
+
</Box>
|
|
261
|
+
</Box>
|
|
262
|
+
</Box>
|
|
263
|
+
</Box>
|
|
264
|
+
|
|
265
|
+
<Box
|
|
266
|
+
width={"100%"}
|
|
267
|
+
flexStyle={{
|
|
268
|
+
flexDirection: "row",
|
|
269
|
+
justifyContent: "space-between",
|
|
270
|
+
alignItems: "center",
|
|
271
|
+
}}
|
|
272
|
+
paddingStyle={{
|
|
273
|
+
padding: theme.paddings["2xs"],
|
|
274
|
+
}}
|
|
275
|
+
borderStyled={{
|
|
276
|
+
borderTopWidth: theme.borderWidths.thin_medium,
|
|
277
|
+
borderTopColor: theme.colors.neutral[200],
|
|
278
|
+
}}
|
|
279
|
+
>
|
|
280
|
+
<Box marginStyle={{ marginRight: 2 }}>
|
|
281
|
+
<Typography
|
|
282
|
+
text={`Origem:`}
|
|
283
|
+
size={theme.fontSizes.xs}
|
|
284
|
+
color={theme.colors.black[180]}
|
|
285
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
286
|
+
/>
|
|
287
|
+
<Typography
|
|
288
|
+
text={`${origin ?? "NÃO INFORMADO"}`}
|
|
289
|
+
size={theme.fontSizes["2xs"]}
|
|
290
|
+
align={"left"}
|
|
291
|
+
color="black180"
|
|
292
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
293
|
+
lineHeight={22}
|
|
294
|
+
letterSpacing={"regular"}
|
|
295
|
+
/>
|
|
296
|
+
</Box>
|
|
297
|
+
|
|
298
|
+
<Box
|
|
299
|
+
flexStyle={{
|
|
300
|
+
flexDirection: "column",
|
|
301
|
+
alignItems: "flex-end",
|
|
302
|
+
justifyContent: "center",
|
|
303
|
+
}}
|
|
304
|
+
>
|
|
305
|
+
<Typography
|
|
306
|
+
text={`Destino: `}
|
|
307
|
+
size={theme.fontSizes.xs}
|
|
308
|
+
color={theme.colors.black[180]}
|
|
309
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
310
|
+
/>
|
|
311
|
+
<Typography
|
|
312
|
+
text={`${destination ?? "NÃO INFORMADO"}`}
|
|
313
|
+
size={theme.fontSizes["2xs"]}
|
|
314
|
+
color={theme.colors.black[100]}
|
|
315
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
316
|
+
marginLeft={4}
|
|
317
|
+
/>
|
|
318
|
+
</Box>
|
|
319
|
+
</Box>
|
|
320
|
+
</Box>
|
|
321
|
+
</TouchableOpacity>
|
|
322
|
+
);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
TravelHistory.displayName = "TravelHistory";
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* EXPORTS
|
|
329
|
+
*/
|
|
330
|
+
export default asBaseComponent(TravelHistory);
|