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,121 +1,121 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/ import React, { forwardRef } from "react";
|
|
4
|
-
|
|
5
|
-
// components
|
|
6
|
-
import Box from "../box";
|
|
7
|
-
import Typography from "../typography";
|
|
8
|
-
|
|
9
|
-
// typing
|
|
10
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
11
|
-
import { type ICardHoursProps } from "./interface";
|
|
12
|
-
|
|
13
|
-
// styles
|
|
14
|
-
import { theme } from "../../styles/theme/theme";
|
|
15
|
-
|
|
16
|
-
const CardHours = forwardRef<any, ICardHoursProps>((props, ref): React.ReactElement => {
|
|
17
|
-
const {
|
|
18
|
-
testID,
|
|
19
|
-
width,
|
|
20
|
-
height,
|
|
21
|
-
hoursWorked,
|
|
22
|
-
flexStyle,
|
|
23
|
-
marginStyle,
|
|
24
|
-
paddingStyle,
|
|
25
|
-
text,
|
|
26
|
-
color,
|
|
27
|
-
fontStyle,
|
|
28
|
-
borderStyled,
|
|
29
|
-
backgroundColor,
|
|
30
|
-
sizeHours,
|
|
31
|
-
sizeDescription,
|
|
32
|
-
handleFormatDataInDayMonthYearNotHours,
|
|
33
|
-
style,
|
|
34
|
-
} = props;
|
|
35
|
-
|
|
36
|
-
const styleProps = {
|
|
37
|
-
testID,
|
|
38
|
-
width,
|
|
39
|
-
height,
|
|
40
|
-
marginStyle,
|
|
41
|
-
paddingStyle,
|
|
42
|
-
flexStyle,
|
|
43
|
-
text,
|
|
44
|
-
borderStyled,
|
|
45
|
-
color,
|
|
46
|
-
fontStyle,
|
|
47
|
-
backgroundColor,
|
|
48
|
-
sizeHours,
|
|
49
|
-
sizeDescription,
|
|
50
|
-
style,
|
|
51
|
-
} as ICardHoursProps;
|
|
52
|
-
return (
|
|
53
|
-
<Box
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
width={width ?? "100%"}
|
|
57
|
-
height={height}
|
|
58
|
-
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
59
|
-
borderStyled={{
|
|
60
|
-
borderWidth: borderStyled?.borderWidth ?? theme.borderWidths.thin,
|
|
61
|
-
borderColor: borderStyled?.borderColor ?? theme.colors.gray[400],
|
|
62
|
-
borderRadius: borderStyled?.borderRadius ?? theme.borderWidths.thick_medium,
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
<Typography
|
|
66
|
-
text={text ?? "Informe texto:"}
|
|
67
|
-
size={Number(styleProps.fontStyle?.fontSize)}
|
|
68
|
-
fontFamily={styleProps.fontStyle?.fontFamily}
|
|
69
|
-
color={color?.colorText ?? theme.colors.gray[700]}
|
|
70
|
-
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes.xl}
|
|
71
|
-
letterSpacing={"regular"}
|
|
72
|
-
paddingTop={theme.paddings["2xs"]}
|
|
73
|
-
paddingLeft={theme.paddings["2xs"]}
|
|
74
|
-
/>
|
|
75
|
-
|
|
76
|
-
<Box
|
|
77
|
-
flexStyle={{
|
|
78
|
-
flexDirection: "row",
|
|
79
|
-
alignItems: "flex-end",
|
|
80
|
-
justifyContent: "space-between",
|
|
81
|
-
}}
|
|
82
|
-
paddingStyle={{
|
|
83
|
-
paddingLeft: theme.paddings["2xs"],
|
|
84
|
-
paddingRight: theme.paddings["2xs"],
|
|
85
|
-
}}
|
|
86
|
-
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
87
|
-
width={"100%"}
|
|
88
|
-
borderStyled={{
|
|
89
|
-
borderBottomLeftRadius:
|
|
90
|
-
borderStyled?.borderBottomLeftRadius ?? theme.borderWidths.thick_medium,
|
|
91
|
-
borderBottomRightRadius:
|
|
92
|
-
borderStyled?.borderBottomRightRadius ?? theme.borderWidths.thick_medium,
|
|
93
|
-
}}
|
|
94
|
-
>
|
|
95
|
-
<Typography
|
|
96
|
-
text={`${hoursWorked ?? "00:00 H"}`}
|
|
97
|
-
size={sizeHours ?? theme.fontSizes["3xl"]}
|
|
98
|
-
fontFamily={theme.fonts.inter_bold ?? "inter_bold"}
|
|
99
|
-
fontWeight="700"
|
|
100
|
-
color={color?.colorTextBold ?? theme.colors.orange[150]}
|
|
101
|
-
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["5xl"]}
|
|
102
|
-
letterSpacing={"regular"}
|
|
103
|
-
/>
|
|
104
|
-
|
|
105
|
-
<Typography
|
|
106
|
-
text={`Última atualização: ${handleFormatDataInDayMonthYearNotHours(new Date())}`}
|
|
107
|
-
size={sizeDescription ?? theme.fontSizes.xs}
|
|
108
|
-
fontFamily={"inter_light_300"}
|
|
109
|
-
color={color?.colorTextData ?? theme.colors.gray[700]}
|
|
110
|
-
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["xl"]}
|
|
111
|
-
letterSpacing={"regular"}
|
|
112
|
-
/>
|
|
113
|
-
</Box>
|
|
114
|
-
</Box>
|
|
115
|
-
);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Componente CardHours para a interação da ui.
|
|
120
|
-
*/
|
|
121
|
-
export default asBaseComponent(CardHours);
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/ import React, { forwardRef } from "react";
|
|
4
|
+
|
|
5
|
+
// components
|
|
6
|
+
import Box from "../box";
|
|
7
|
+
import Typography from "../typography";
|
|
8
|
+
|
|
9
|
+
// typing
|
|
10
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
11
|
+
import { type ICardHoursProps } from "./interface";
|
|
12
|
+
|
|
13
|
+
// styles
|
|
14
|
+
import { theme } from "../../styles/theme/theme";
|
|
15
|
+
|
|
16
|
+
const CardHours = forwardRef<any, ICardHoursProps>((props, ref): React.ReactElement => {
|
|
17
|
+
const {
|
|
18
|
+
testID,
|
|
19
|
+
width,
|
|
20
|
+
height,
|
|
21
|
+
hoursWorked,
|
|
22
|
+
flexStyle,
|
|
23
|
+
marginStyle,
|
|
24
|
+
paddingStyle,
|
|
25
|
+
text,
|
|
26
|
+
color,
|
|
27
|
+
fontStyle,
|
|
28
|
+
borderStyled,
|
|
29
|
+
backgroundColor,
|
|
30
|
+
sizeHours,
|
|
31
|
+
sizeDescription,
|
|
32
|
+
handleFormatDataInDayMonthYearNotHours,
|
|
33
|
+
style,
|
|
34
|
+
} = props;
|
|
35
|
+
|
|
36
|
+
const styleProps = {
|
|
37
|
+
testID,
|
|
38
|
+
width,
|
|
39
|
+
height,
|
|
40
|
+
marginStyle,
|
|
41
|
+
paddingStyle,
|
|
42
|
+
flexStyle,
|
|
43
|
+
text,
|
|
44
|
+
borderStyled,
|
|
45
|
+
color,
|
|
46
|
+
fontStyle,
|
|
47
|
+
backgroundColor,
|
|
48
|
+
sizeHours,
|
|
49
|
+
sizeDescription,
|
|
50
|
+
style,
|
|
51
|
+
} as ICardHoursProps;
|
|
52
|
+
return (
|
|
53
|
+
<Box
|
|
54
|
+
testID={testID}
|
|
55
|
+
ref={ref}
|
|
56
|
+
width={width ?? "100%"}
|
|
57
|
+
height={height}
|
|
58
|
+
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
59
|
+
borderStyled={{
|
|
60
|
+
borderWidth: borderStyled?.borderWidth ?? theme.borderWidths.thin,
|
|
61
|
+
borderColor: borderStyled?.borderColor ?? theme.colors.gray[400],
|
|
62
|
+
borderRadius: borderStyled?.borderRadius ?? theme.borderWidths.thick_medium,
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
<Typography
|
|
66
|
+
text={text ?? "Informe texto:"}
|
|
67
|
+
size={Number(styleProps.fontStyle?.fontSize)}
|
|
68
|
+
fontFamily={styleProps.fontStyle?.fontFamily}
|
|
69
|
+
color={color?.colorText ?? theme.colors.gray[700]}
|
|
70
|
+
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes.xl}
|
|
71
|
+
letterSpacing={"regular"}
|
|
72
|
+
paddingTop={theme.paddings["2xs"]}
|
|
73
|
+
paddingLeft={theme.paddings["2xs"]}
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<Box
|
|
77
|
+
flexStyle={{
|
|
78
|
+
flexDirection: "row",
|
|
79
|
+
alignItems: "flex-end",
|
|
80
|
+
justifyContent: "space-between",
|
|
81
|
+
}}
|
|
82
|
+
paddingStyle={{
|
|
83
|
+
paddingLeft: theme.paddings["2xs"],
|
|
84
|
+
paddingRight: theme.paddings["2xs"],
|
|
85
|
+
}}
|
|
86
|
+
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
87
|
+
width={"100%"}
|
|
88
|
+
borderStyled={{
|
|
89
|
+
borderBottomLeftRadius:
|
|
90
|
+
borderStyled?.borderBottomLeftRadius ?? theme.borderWidths.thick_medium,
|
|
91
|
+
borderBottomRightRadius:
|
|
92
|
+
borderStyled?.borderBottomRightRadius ?? theme.borderWidths.thick_medium,
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
<Typography
|
|
96
|
+
text={`${hoursWorked ?? "00:00 H"}`}
|
|
97
|
+
size={sizeHours ?? theme.fontSizes["3xl"]}
|
|
98
|
+
fontFamily={theme.fonts.inter_bold ?? "inter_bold"}
|
|
99
|
+
fontWeight="700"
|
|
100
|
+
color={color?.colorTextBold ?? theme.colors.orange[150]}
|
|
101
|
+
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["5xl"]}
|
|
102
|
+
letterSpacing={"regular"}
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<Typography
|
|
106
|
+
text={`Última atualização: ${handleFormatDataInDayMonthYearNotHours(new Date())}`}
|
|
107
|
+
size={sizeDescription ?? theme.fontSizes.xs}
|
|
108
|
+
fontFamily={"inter_light_300"}
|
|
109
|
+
color={color?.colorTextData ?? theme.colors.gray[700]}
|
|
110
|
+
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["xl"]}
|
|
111
|
+
letterSpacing={"regular"}
|
|
112
|
+
/>
|
|
113
|
+
</Box>
|
|
114
|
+
</Box>
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Componente CardHours para a interação da ui.
|
|
120
|
+
*/
|
|
121
|
+
export default asBaseComponent(CardHours);
|
|
@@ -24,12 +24,17 @@ import { getStatusColorHex } from "../../utils/get-status-color";
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
const CardMaintenance = forwardRef<any, ICardMaintenance>((props, ref): React.ReactElement => {
|
|
27
|
-
const { numero, dataRegistro, cavalo, imagemUrl, descricao, status, titutlo } = props;
|
|
27
|
+
const { testID, numero, dataRegistro, cavalo, imagemUrl, descricao, status, titutlo } = props;
|
|
28
28
|
const [showModal, setShowModal] = useState(false);
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<>
|
|
32
|
-
<TouchableOpacity
|
|
32
|
+
<TouchableOpacity
|
|
33
|
+
testID={testID}
|
|
34
|
+
ref={ref}
|
|
35
|
+
onPress={() => setShowModal(true)}
|
|
36
|
+
activeOpacity={0.9}
|
|
37
|
+
>
|
|
33
38
|
<Box
|
|
34
39
|
width={"100%"}
|
|
35
40
|
flexStyle={{ flexDirection: "row" }}
|
|
@@ -128,6 +133,7 @@ const CardMaintenance = forwardRef<any, ICardMaintenance>((props, ref): React.Re
|
|
|
128
133
|
</TouchableOpacity>
|
|
129
134
|
|
|
130
135
|
<ModalMaintenance
|
|
136
|
+
testID={`${testID}-modal`}
|
|
131
137
|
visible={showModal}
|
|
132
138
|
onClose={() => setShowModal(false)}
|
|
133
139
|
imagemUrl={imagemUrl}
|
|
@@ -1,153 +1,178 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { useEffect } from "react";
|
|
5
|
-
import { Image, View,
|
|
6
|
-
|
|
7
|
-
// components
|
|
8
|
-
import Box from "../../components/box";
|
|
9
|
-
import Typography from "../../components/typography";
|
|
10
|
-
|
|
11
|
-
// style
|
|
12
|
-
import { theme } from "../../styles/theme/theme";
|
|
13
|
-
|
|
14
|
-
// typings
|
|
15
|
-
import type { IListSupplies } from "./interface";
|
|
16
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
17
|
-
|
|
18
|
-
const ListSupplies: React.FC<IListSupplies> = ({
|
|
19
|
-
dataRegistro,
|
|
20
|
-
namePosto,
|
|
21
|
-
litragem,
|
|
22
|
-
valor,
|
|
23
|
-
imagemUrl,
|
|
24
|
-
corBarra,
|
|
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
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { useEffect, useRef } from "react";
|
|
5
|
+
import { Animated, Image, View, Easing } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../../components/box";
|
|
9
|
+
import Typography from "../../components/typography";
|
|
10
|
+
|
|
11
|
+
// style
|
|
12
|
+
import { theme } from "../../styles/theme/theme";
|
|
13
|
+
|
|
14
|
+
// typings
|
|
15
|
+
import type { IListSupplies } from "./interface";
|
|
16
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
17
|
+
|
|
18
|
+
const ListSupplies: React.FC<IListSupplies> = ({
|
|
19
|
+
dataRegistro,
|
|
20
|
+
namePosto,
|
|
21
|
+
litragem,
|
|
22
|
+
valor,
|
|
23
|
+
imagemUrl,
|
|
24
|
+
corBarra,
|
|
25
|
+
}) => {
|
|
26
|
+
// 🔹 Valor de animação para fade + slide
|
|
27
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
28
|
+
const slideAnim = useRef(new Animated.Value(20)).current;
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
// 🔹 Animação ao montar o componente
|
|
32
|
+
Animated.timing(fadeAnim, {
|
|
33
|
+
toValue: 1,
|
|
34
|
+
duration: 400,
|
|
35
|
+
easing: Easing.out(Easing.ease),
|
|
36
|
+
useNativeDriver: true,
|
|
37
|
+
}).start();
|
|
38
|
+
|
|
39
|
+
Animated.timing(slideAnim, {
|
|
40
|
+
toValue: 0,
|
|
41
|
+
duration: 400,
|
|
42
|
+
easing: Easing.out(Easing.ease),
|
|
43
|
+
useNativeDriver: true,
|
|
44
|
+
}).start();
|
|
45
|
+
}, [fadeAnim, slideAnim]);
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<Animated.View
|
|
49
|
+
style={{
|
|
50
|
+
opacity: fadeAnim,
|
|
51
|
+
transform: [{ translateY: slideAnim }],
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<Box
|
|
55
|
+
width={"100%"}
|
|
56
|
+
flexStyle={{ flexDirection: "row" }}
|
|
57
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
58
|
+
borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
|
|
59
|
+
>
|
|
60
|
+
{/* faixa lateral */}
|
|
61
|
+
<View
|
|
62
|
+
style={{
|
|
63
|
+
width: 15,
|
|
64
|
+
backgroundColor: corBarra ?? theme.colors.blue[375],
|
|
65
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
66
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
67
|
+
}}
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings["2xs"] }}>
|
|
71
|
+
{/* Nome do posto */}
|
|
72
|
+
<Box
|
|
73
|
+
marginStyle={{ marginBottom: theme.margins.fn }}
|
|
74
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
75
|
+
>
|
|
76
|
+
<Typography
|
|
77
|
+
text={`${namePosto || "Não informado"}`}
|
|
78
|
+
color={theme.colors.black[25]}
|
|
79
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
80
|
+
size={theme.fontSizes.sm}
|
|
81
|
+
/>
|
|
82
|
+
</Box>
|
|
83
|
+
|
|
84
|
+
{/* Litragem */}
|
|
85
|
+
<Box
|
|
86
|
+
marginStyle={{ marginBottom: theme.margins.fn }}
|
|
87
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
88
|
+
>
|
|
89
|
+
<Typography
|
|
90
|
+
text="Litragem: "
|
|
91
|
+
color={theme.colors.black[25]}
|
|
92
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
93
|
+
size={theme.fontSizes.sm}
|
|
94
|
+
/>
|
|
95
|
+
<Box flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}>
|
|
96
|
+
<Typography
|
|
97
|
+
text={`${litragem || "Não informado"}`}
|
|
98
|
+
color={theme.colors.black[25]}
|
|
99
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
100
|
+
size={theme.fontSizes.sm}
|
|
101
|
+
/>
|
|
102
|
+
<Typography
|
|
103
|
+
text={` LT`}
|
|
104
|
+
color={theme.colors.red[400]}
|
|
105
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
106
|
+
size={theme.fontSizes.sm}
|
|
107
|
+
/>
|
|
108
|
+
</Box>
|
|
109
|
+
</Box>
|
|
110
|
+
|
|
111
|
+
{/* Valor */}
|
|
112
|
+
<Box
|
|
113
|
+
marginStyle={{ marginBottom: theme.margins.fn }}
|
|
114
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
115
|
+
>
|
|
116
|
+
<Typography
|
|
117
|
+
text="Valor: "
|
|
118
|
+
color={theme.colors.black[25]}
|
|
119
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
120
|
+
size={theme.fontSizes.sm}
|
|
121
|
+
/>
|
|
122
|
+
<Typography
|
|
123
|
+
text={`R$ ${valor || "Não informado"}`}
|
|
124
|
+
color={theme.colors.gray[700]}
|
|
125
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
126
|
+
size={theme.fontSizes.sm}
|
|
127
|
+
/>
|
|
128
|
+
</Box>
|
|
129
|
+
|
|
130
|
+
{/* Data */}
|
|
131
|
+
<Box
|
|
132
|
+
marginStyle={{ marginBottom: theme.margins.fn }}
|
|
133
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
134
|
+
>
|
|
135
|
+
<Typography
|
|
136
|
+
text={"Data: "}
|
|
137
|
+
color={theme.colors.black[25]}
|
|
138
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
139
|
+
size={theme.fontSizes.sm}
|
|
140
|
+
/>
|
|
141
|
+
<Typography
|
|
142
|
+
text={`${dataRegistro || "Não informado"}`}
|
|
143
|
+
color={theme.colors.gray[700]}
|
|
144
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
145
|
+
size={theme.fontSizes.sm}
|
|
146
|
+
/>
|
|
147
|
+
</Box>
|
|
148
|
+
|
|
149
|
+
{/* Imagem */}
|
|
150
|
+
<Box
|
|
151
|
+
borderStyled={{
|
|
152
|
+
borderWidth: 1,
|
|
153
|
+
borderColor: theme.colors.black[25],
|
|
154
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
155
|
+
}}
|
|
156
|
+
flexStyle={{
|
|
157
|
+
justifyContent: "center",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
<Image
|
|
162
|
+
source={{ uri: imagemUrl ?? "https://placehold.co/300x300" }}
|
|
163
|
+
style={{
|
|
164
|
+
width: "100%",
|
|
165
|
+
height: 139,
|
|
166
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
167
|
+
}}
|
|
168
|
+
resizeMode="cover"
|
|
169
|
+
/>
|
|
170
|
+
</Box>
|
|
171
|
+
</Box>
|
|
172
|
+
</Box>
|
|
173
|
+
</Animated.View>
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
ListSupplies.displayName = "ListSupplies";
|
|
178
|
+
export default asBaseComponent(ListSupplies);
|
|
@@ -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
|
);
|