jornada-ui 0.4.21 → 0.4.22
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/modals/modal-to-confimations/index.js +1 -4
- package/lib/commonjs/components/modals/modal-to-confimations/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +2 -1
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/weekly-table/components/row-table/index.js +6 -4
- package/lib/commonjs/components/weekly-table/components/row-table/index.js.map +1 -1
- package/lib/commonjs/components/weekly-table/index.js +68 -36
- package/lib/commonjs/components/weekly-table/index.js.map +1 -1
- package/lib/module/components/modals/modal-to-confimations/index.js +1 -4
- package/lib/module/components/modals/modal-to-confimations/index.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +2 -1
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/weekly-table/components/row-table/index.js +6 -4
- package/lib/module/components/weekly-table/components/row-table/index.js.map +1 -1
- package/lib/module/components/weekly-table/index.js +57 -25
- package/lib/module/components/weekly-table/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-table/components/row-table/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-table/components/row-table/interface.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/weekly-table/components/row-table/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-table/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-table/interface.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/weekly-table/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-to-confimations/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-table/components/row-table/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-table/components/row-table/interface.d.ts +2 -0
- package/lib/typescript/module/src/components/weekly-table/components/row-table/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-table/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-table/interface.d.ts +5 -0
- package/lib/typescript/module/src/components/weekly-table/interface.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/modals/modal-to-confimations/index.tsx +1 -4
- package/src/components/step-indicator/index.tsx +2 -1
- package/src/components/step-indicator/interface.d.ts +3 -0
- package/src/components/weekly-table/components/row-table/index.tsx +46 -44
- package/src/components/weekly-table/components/row-table/interface.ts +16 -14
- package/src/components/weekly-table/index.tsx +60 -17
- package/src/components/weekly-table/interface.ts +40 -33
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* IMPORTS
|
|
5
5
|
*/
|
|
6
6
|
import React, { forwardRef } from "react";
|
|
7
|
-
import { Dimensions, ScrollView } from "react-native";
|
|
7
|
+
import { ActivityIndicator, Dimensions, ScrollView, View } from "react-native";
|
|
8
8
|
|
|
9
9
|
// components
|
|
10
10
|
import Box from "../box/index.js";
|
|
11
|
+
import Typography from "../typography/index.js";
|
|
11
12
|
import { RowTable } from "./components/row-table/index.js";
|
|
12
13
|
|
|
13
14
|
// helpers
|
|
@@ -21,6 +22,8 @@ import { asBaseComponent } from "../../@types/as-base-component.js";
|
|
|
21
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
23
|
const WeeklyTable = /*#__PURE__*/forwardRef((props, ref) => {
|
|
23
24
|
const {
|
|
25
|
+
testID = "weekly-table",
|
|
26
|
+
isLoading = false,
|
|
24
27
|
semana
|
|
25
28
|
} = props;
|
|
26
29
|
const totalHoras = handleCalcularTotalHoras(semana);
|
|
@@ -39,6 +42,7 @@ const WeeklyTable = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
39
42
|
falhas: screenWidth * 0.18
|
|
40
43
|
};
|
|
41
44
|
return /*#__PURE__*/_jsx(ScrollView, {
|
|
45
|
+
testID: testID,
|
|
42
46
|
horizontal: true,
|
|
43
47
|
ref: ref,
|
|
44
48
|
contentContainerStyle: {
|
|
@@ -57,62 +61,90 @@ const WeeklyTable = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
57
61
|
borderColor: theme.colors.blue[400]
|
|
58
62
|
},
|
|
59
63
|
children: [/*#__PURE__*/_jsx(RowTable, {
|
|
64
|
+
testID: `${testID}-title-dia`,
|
|
60
65
|
texto: "DIA",
|
|
61
66
|
bold: true,
|
|
62
67
|
color: theme.colors.neutral[25],
|
|
63
68
|
customWidth: colWidths.dia
|
|
64
69
|
}), /*#__PURE__*/_jsx(RowTable, {
|
|
70
|
+
testID: `${testID}-title-data`,
|
|
65
71
|
texto: "DATA",
|
|
66
72
|
bold: true,
|
|
67
73
|
color: theme.colors.neutral[25],
|
|
68
74
|
customWidth: colWidths.data
|
|
69
75
|
}), /*#__PURE__*/_jsx(RowTable, {
|
|
76
|
+
testID: `${testID}-title-jorna`,
|
|
70
77
|
texto: "JORNA",
|
|
71
78
|
bold: true,
|
|
72
79
|
color: theme.colors.neutral[25],
|
|
73
80
|
customWidth: colWidths.jorna
|
|
74
81
|
}), /*#__PURE__*/_jsx(RowTable, {
|
|
82
|
+
testID: `${testID}-title-kms`,
|
|
75
83
|
texto: "KMs",
|
|
76
84
|
bold: true,
|
|
77
85
|
color: theme.colors.neutral[25],
|
|
78
86
|
customWidth: colWidths.kms
|
|
79
87
|
}), /*#__PURE__*/_jsx(RowTable, {
|
|
88
|
+
testID: `${testID}-title-picos`,
|
|
80
89
|
texto: "PICOS",
|
|
81
90
|
bold: true,
|
|
82
91
|
color: theme.colors.neutral[25],
|
|
83
92
|
customWidth: colWidths.picos
|
|
84
93
|
}), /*#__PURE__*/_jsx(RowTable, {
|
|
94
|
+
testID: `${testID}-title-falhas`,
|
|
85
95
|
texto: "FALHAS",
|
|
86
96
|
bold: true,
|
|
87
97
|
color: theme.colors.neutral[25],
|
|
88
98
|
customWidth: colWidths.falhas
|
|
89
99
|
})]
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
100
|
+
}), isLoading ? /*#__PURE__*/_jsxs(View, {
|
|
101
|
+
testID: `${testID}-loading`,
|
|
102
|
+
style: {
|
|
103
|
+
width: "100%",
|
|
104
|
+
height: 250,
|
|
105
|
+
backgroundColor: "rgba(255,255,255,0.6)",
|
|
106
|
+
justifyContent: "center",
|
|
107
|
+
alignItems: "center"
|
|
94
108
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
texto: dia.saida ?? "-",
|
|
104
|
-
customWidth: colWidths.jorna
|
|
105
|
-
}), /*#__PURE__*/_jsx(RowTable, {
|
|
106
|
-
texto: (dia.kms ?? 0).toString(),
|
|
107
|
-
customWidth: colWidths.kms
|
|
108
|
-
}), /*#__PURE__*/_jsx(RowTable, {
|
|
109
|
-
texto: (dia.picos ?? 0).toString(),
|
|
110
|
-
customWidth: colWidths.picos
|
|
111
|
-
}), /*#__PURE__*/_jsx(RowTable, {
|
|
112
|
-
texto: (dia.falhas ?? 0).toString(),
|
|
113
|
-
customWidth: colWidths.falhas
|
|
109
|
+
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
110
|
+
size: 24,
|
|
111
|
+
color: theme.colors.blue[400]
|
|
112
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
113
|
+
text: "Carregando dados...",
|
|
114
|
+
color: theme.colors.black[100],
|
|
115
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
116
|
+
size: theme.fontSizes.xs
|
|
114
117
|
})]
|
|
115
|
-
}
|
|
118
|
+
}) : /*#__PURE__*/_jsx(Box, {
|
|
119
|
+
testID: `${testID}-content`,
|
|
120
|
+
children: semana.map((dia, index) => /*#__PURE__*/_jsxs(Box, {
|
|
121
|
+
flexStyle: {
|
|
122
|
+
flexDirection: "row",
|
|
123
|
+
justifyContent: "center"
|
|
124
|
+
},
|
|
125
|
+
backgroundColor: index % 2 === 0 ? theme.colors.neutral[50] : theme.colors.neutral[300],
|
|
126
|
+
children: [/*#__PURE__*/_jsx(RowTable, {
|
|
127
|
+
texto: dia.dia ?? "-",
|
|
128
|
+
customWidth: colWidths.dia
|
|
129
|
+
}), /*#__PURE__*/_jsx(RowTable, {
|
|
130
|
+
texto: dia.entrada ?? "-",
|
|
131
|
+
customWidth: colWidths.data
|
|
132
|
+
}), /*#__PURE__*/_jsx(RowTable, {
|
|
133
|
+
texto: dia.saida ?? "-",
|
|
134
|
+
customWidth: colWidths.jorna
|
|
135
|
+
}), /*#__PURE__*/_jsx(RowTable, {
|
|
136
|
+
texto: (dia.kms ?? 0).toString(),
|
|
137
|
+
customWidth: colWidths.kms
|
|
138
|
+
}), /*#__PURE__*/_jsx(RowTable, {
|
|
139
|
+
texto: (dia.picos ?? 0).toString(),
|
|
140
|
+
customWidth: colWidths.picos
|
|
141
|
+
}), /*#__PURE__*/_jsx(RowTable, {
|
|
142
|
+
texto: (dia.falhas ?? 0).toString(),
|
|
143
|
+
customWidth: colWidths.falhas
|
|
144
|
+
})]
|
|
145
|
+
}, index))
|
|
146
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
147
|
+
testID: `${testID}-content-total`,
|
|
116
148
|
flexStyle: {
|
|
117
149
|
flexDirection: "row"
|
|
118
150
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","Dimensions","ScrollView","Box","RowTable","handleCalcularTotalHoras","theme","asBaseComponent","jsx","_jsx","jsxs","_jsxs","WeeklyTable","props","ref","semana","totalHoras","totalKms","reduce","acc","d","kms","totalPicos","picos","totalFalhas","falhas","width","screenWidth","get","colWidths","dia","data","jorna","horizontal","contentContainerStyle","children","flexStyle","flexDirection","backgroundColor","colors","blue","borderStyled","borderTopLeftRadius","borderWidths","thin_bold","borderTopRightRadius","borderColor","texto","bold","color","neutral","customWidth","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","ActivityIndicator","Dimensions","ScrollView","View","Box","Typography","RowTable","handleCalcularTotalHoras","theme","asBaseComponent","jsx","_jsx","jsxs","_jsxs","WeeklyTable","props","ref","testID","isLoading","semana","totalHoras","totalKms","reduce","acc","d","kms","totalPicos","picos","totalFalhas","falhas","width","screenWidth","get","colWidths","dia","data","jorna","horizontal","contentContainerStyle","children","flexStyle","flexDirection","backgroundColor","colors","blue","borderStyled","borderTopLeftRadius","borderWidths","thin_bold","borderTopRightRadius","borderColor","texto","bold","color","neutral","customWidth","style","height","justifyContent","alignItems","size","text","black","fontFamily","fonts","inter_regular_400","fontSizes","xs","map","index","entrada","saida","toString","green","borderBottomLeftRadius","borderBottomRightRadius","toLocaleString","memo"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/weekly-table/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,iBAAiB,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;;AAE9E;AACA,OAAOC,GAAG,MAAM,iBAAQ;AACxB,OAAOC,UAAU,MAAM,wBAAe;AACtC,SAASC,QAAQ,QAAQ,iCAAwB;;AAEjD;AACA,SAASC,wBAAwB,QAAQ,mCAAgC;;AAEzE;;AAGA;AACA,SAASC,KAAK,QAAQ,6BAA0B;AAChD,SAASC,eAAe,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjE,MAAMC,WAAW,gBAAGf,UAAU,CAAyB,CAACgB,KAAK,EAAEC,GAAG,KAAyB;EACzF,MAAM;IAAEC,MAAM,GAAG,cAAc;IAAEC,SAAS,GAAG,KAAK;IAAEC;EAAO,CAAC,GAAGJ,KAAK;EAEpE,MAAMK,UAAU,GAAGb,wBAAwB,CAACY,MAAM,CAA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MAAM,CAAC8B,KAAK,CAAC,GAAG,CAAE;UAC/BrB,IAAI;QAAA,CACL,CAAC;MAAA,CACC,CAAC;IAAA,CACH;EAAC,CACI,CAAC;AAEjB,CAAC,CAAC;AAEF,eAAe3C,eAAe,cAACX,KAAK,CAAC+E,IAAI,CAAC/D,WAAW,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-to-confimations/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-to-confimations/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;;AAmK/D,wBAAqD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAgBjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAgBjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkQlD;;GAEG;;AACH,wBAA8C"}
|
package/lib/typescript/commonjs/src/components/weekly-table/components/row-table/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyBrC,CAAC;AAEF;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/components/weekly-table/components/row-table/interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;;AAqKrD,wBAAwD"}
|
|
@@ -19,6 +19,11 @@ interface CampoProps {
|
|
|
19
19
|
color?: string;
|
|
20
20
|
}
|
|
21
21
|
interface WeekCalendarProps {
|
|
22
|
+
/**Identificador para o components */
|
|
23
|
+
testID?: string;
|
|
24
|
+
/**Identificador para o components em carrega*/
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
/**dados que vão ser renderizados */
|
|
22
27
|
semana: DayInfo[];
|
|
23
28
|
}
|
|
24
29
|
interface WeekCalendarComponent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/interface.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,UAAU,OAAO;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,UAAU,QAAS,SAAQ,OAAO;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,iBAAiB;IACzB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AACD,UAAU,qBAAqB;IAC7B,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC;CACzC;AAED;;GAEG;AACH,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/interface.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,UAAU,OAAO;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,UAAU,QAAS,SAAQ,OAAO;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,iBAAiB;IACzB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,oCAAoC;IACpC,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AACD,UAAU,qBAAqB;IAC7B,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC;CACzC;AAED;;GAEG;AACH,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-to-confimations/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-to-confimations/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;;AAmK/D,wBAAqD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAgBjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAgBjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkQlD;;GAEG;;AACH,wBAA8C"}
|
package/lib/typescript/module/src/components/weekly-table/components/row-table/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyBrC,CAAC;AAEF;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/lib/typescript/module/src/components/weekly-table/components/row-table/interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/weekly-table/components/row-table/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;;AAqKrD,wBAAwD"}
|
|
@@ -19,6 +19,11 @@ interface CampoProps {
|
|
|
19
19
|
color?: string;
|
|
20
20
|
}
|
|
21
21
|
interface WeekCalendarProps {
|
|
22
|
+
/**Identificador para o components */
|
|
23
|
+
testID?: string;
|
|
24
|
+
/**Identificador para o components em carrega*/
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
/**dados que vão ser renderizados */
|
|
22
27
|
semana: DayInfo[];
|
|
23
28
|
}
|
|
24
29
|
interface WeekCalendarComponent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/interface.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,UAAU,OAAO;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,UAAU,QAAS,SAAQ,OAAO;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,iBAAiB;IACzB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AACD,UAAU,qBAAqB;IAC7B,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC;CACzC;AAED;;GAEG;AACH,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-table/interface.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,UAAU,OAAO;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,UAAU,QAAS,SAAQ,OAAO;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,iBAAiB;IACzB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,oCAAoC;IACpC,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AACD,UAAU,qBAAqB;IAC7B,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC;CACzC;AAED;;GAEG;AACH,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -141,10 +141,7 @@ const ModalToConfirmations: React.FC<IModalToConfirmationsProps> = ({
|
|
|
141
141
|
{text2 && (
|
|
142
142
|
<Button
|
|
143
143
|
title={titleButtonConfirm ?? "CONFIRMAR"}
|
|
144
|
-
onPress={
|
|
145
|
-
onPressConfirm();
|
|
146
|
-
onClose();
|
|
147
|
-
}}
|
|
144
|
+
onPress={onPressConfirm}
|
|
148
145
|
width={"48%"}
|
|
149
146
|
height={40}
|
|
150
147
|
isLoading={false}
|
|
@@ -31,6 +31,7 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
|
|
|
31
31
|
(
|
|
32
32
|
{
|
|
33
33
|
testID = "step-indicator",
|
|
34
|
+
isInternetReachable = true,
|
|
34
35
|
data = [],
|
|
35
36
|
type,
|
|
36
37
|
textColorDescription,
|
|
@@ -90,7 +91,7 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
|
|
|
90
91
|
const isFirst = index === 0;
|
|
91
92
|
const isEditableType = history.tipo === "descanso";
|
|
92
93
|
const isSynced = history?.sincronizado === true;
|
|
93
|
-
const canEdit = isFirst && isEditableType && isSynced;
|
|
94
|
+
const canEdit = isInternetReachable && isFirst && isEditableType && isSynced;
|
|
94
95
|
|
|
95
96
|
return (
|
|
96
97
|
<TouchableOpacity
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
|
|
6
|
-
// components
|
|
7
|
-
import Box from "../../../box";
|
|
8
|
-
import Typography from "../../../typography";
|
|
9
|
-
|
|
10
|
-
// typings
|
|
11
|
-
import type { RowTableProps } from "./interface";
|
|
12
|
-
|
|
13
|
-
// styles
|
|
14
|
-
import { theme } from "../../../../styles/theme/theme";
|
|
15
|
-
|
|
16
|
-
const RowTable: React.FC<RowTableProps> = ({
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import Box from "../../../box";
|
|
8
|
+
import Typography from "../../../typography";
|
|
9
|
+
|
|
10
|
+
// typings
|
|
11
|
+
import type { RowTableProps } from "./interface";
|
|
12
|
+
|
|
13
|
+
// styles
|
|
14
|
+
import { theme } from "../../../../styles/theme/theme";
|
|
15
|
+
|
|
16
|
+
const RowTable: React.FC<RowTableProps> = ({
|
|
17
|
+
testID = "row-table",
|
|
18
|
+
texto,
|
|
19
|
+
color = theme.colors.black[180],
|
|
20
|
+
bold = false,
|
|
21
|
+
customWidth = 55,
|
|
22
|
+
}) => {
|
|
23
|
+
return (
|
|
24
|
+
<Box
|
|
25
|
+
testID={testID}
|
|
26
|
+
width={customWidth}
|
|
27
|
+
paddingStyle={{ padding: 4 }}
|
|
28
|
+
flexStyle={{
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
<Typography
|
|
34
|
+
text={texto}
|
|
35
|
+
color={color}
|
|
36
|
+
size={10}
|
|
37
|
+
fontFamily={bold ? theme.fonts.inter_bold_700 : theme.fonts.inter_regular_400}
|
|
38
|
+
/>
|
|
39
|
+
</Box>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* EXPORTS
|
|
45
|
+
*/
|
|
46
|
+
export { RowTable };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
type RowTableProps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
type RowTableProps = {
|
|
5
|
+
/**Identificador para o components */
|
|
6
|
+
testID?: string;
|
|
7
|
+
texto: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
bold?: boolean;
|
|
10
|
+
customWidth?: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* EXPORTS
|
|
15
|
+
*/
|
|
16
|
+
export type { RowTableProps };
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* IMPORTS
|
|
3
3
|
*/
|
|
4
4
|
import React, { forwardRef } from "react";
|
|
5
|
-
import { Dimensions, ScrollView } from "react-native";
|
|
5
|
+
import { ActivityIndicator, Dimensions, ScrollView, View } from "react-native";
|
|
6
6
|
|
|
7
7
|
// components
|
|
8
8
|
import Box from "../box";
|
|
9
|
+
import Typography from "../typography";
|
|
9
10
|
import { RowTable } from "./components/row-table";
|
|
10
11
|
|
|
11
12
|
// helpers
|
|
@@ -19,7 +20,7 @@ import { theme } from "../../styles/theme/theme";
|
|
|
19
20
|
import { asBaseComponent } from "../../@types/as-base-component";
|
|
20
21
|
|
|
21
22
|
const WeeklyTable = forwardRef<any, WeekCalendarProps>((props, ref): React.ReactElement => {
|
|
22
|
-
const { semana } = props;
|
|
23
|
+
const { testID = "weekly-table", isLoading = false, semana } = props;
|
|
23
24
|
|
|
24
25
|
const totalHoras = handleCalcularTotalHoras(semana);
|
|
25
26
|
|
|
@@ -38,7 +39,7 @@ const WeeklyTable = forwardRef<any, WeekCalendarProps>((props, ref): React.React
|
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
return (
|
|
41
|
-
<ScrollView horizontal ref={ref} contentContainerStyle={{ width: "100%" }}>
|
|
42
|
+
<ScrollView testID={testID} horizontal ref={ref} contentContainerStyle={{ width: "100%" }}>
|
|
42
43
|
<Box width={"100%"}>
|
|
43
44
|
{/* Cabeçalho */}
|
|
44
45
|
<Box
|
|
@@ -50,27 +51,43 @@ const WeeklyTable = forwardRef<any, WeekCalendarProps>((props, ref): React.React
|
|
|
50
51
|
borderColor: theme.colors.blue[400],
|
|
51
52
|
}}
|
|
52
53
|
>
|
|
53
|
-
<RowTable texto="DIA" bold color={theme.colors.neutral[25]} customWidth={colWidths.dia} />
|
|
54
54
|
<RowTable
|
|
55
|
+
testID={`${testID}-title-dia`}
|
|
56
|
+
texto="DIA"
|
|
57
|
+
bold
|
|
58
|
+
color={theme.colors.neutral[25]}
|
|
59
|
+
customWidth={colWidths.dia}
|
|
60
|
+
/>
|
|
61
|
+
<RowTable
|
|
62
|
+
testID={`${testID}-title-data`}
|
|
55
63
|
texto="DATA"
|
|
56
64
|
bold
|
|
57
65
|
color={theme.colors.neutral[25]}
|
|
58
66
|
customWidth={colWidths.data}
|
|
59
67
|
/>
|
|
60
68
|
<RowTable
|
|
69
|
+
testID={`${testID}-title-jorna`}
|
|
61
70
|
texto="JORNA"
|
|
62
71
|
bold
|
|
63
72
|
color={theme.colors.neutral[25]}
|
|
64
73
|
customWidth={colWidths.jorna}
|
|
65
74
|
/>
|
|
66
|
-
<RowTable texto="KMs" bold color={theme.colors.neutral[25]} customWidth={colWidths.kms} />
|
|
67
75
|
<RowTable
|
|
76
|
+
testID={`${testID}-title-kms`}
|
|
77
|
+
texto="KMs"
|
|
78
|
+
bold
|
|
79
|
+
color={theme.colors.neutral[25]}
|
|
80
|
+
customWidth={colWidths.kms}
|
|
81
|
+
/>
|
|
82
|
+
<RowTable
|
|
83
|
+
testID={`${testID}-title-picos`}
|
|
68
84
|
texto="PICOS"
|
|
69
85
|
bold
|
|
70
86
|
color={theme.colors.neutral[25]}
|
|
71
87
|
customWidth={colWidths.picos}
|
|
72
88
|
/>
|
|
73
89
|
<RowTable
|
|
90
|
+
testID={`${testID}-title-falhas`}
|
|
74
91
|
texto="FALHAS"
|
|
75
92
|
bold
|
|
76
93
|
color={theme.colors.neutral[25]}
|
|
@@ -79,23 +96,49 @@ const WeeklyTable = forwardRef<any, WeekCalendarProps>((props, ref): React.React
|
|
|
79
96
|
</Box>
|
|
80
97
|
|
|
81
98
|
{/* Linhas com os dados */}
|
|
82
|
-
{
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
99
|
+
{isLoading ? (
|
|
100
|
+
<View
|
|
101
|
+
testID={`${testID}-loading`}
|
|
102
|
+
style={{
|
|
103
|
+
width: "100%",
|
|
104
|
+
height: 250,
|
|
105
|
+
backgroundColor: "rgba(255,255,255,0.6)",
|
|
106
|
+
justifyContent: "center",
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
}}
|
|
87
109
|
>
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
110
|
+
<ActivityIndicator size={24} color={theme.colors.blue[400]} />
|
|
111
|
+
<Typography
|
|
112
|
+
text="Carregando dados..."
|
|
113
|
+
color={theme.colors.black[100]}
|
|
114
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
115
|
+
size={theme.fontSizes.xs}
|
|
116
|
+
/>
|
|
117
|
+
</View>
|
|
118
|
+
) : (
|
|
119
|
+
<Box testID={`${testID}-content`}>
|
|
120
|
+
{semana.map((dia, index) => (
|
|
121
|
+
<Box
|
|
122
|
+
key={index}
|
|
123
|
+
flexStyle={{ flexDirection: "row", justifyContent: "center" }}
|
|
124
|
+
backgroundColor={
|
|
125
|
+
index % 2 === 0 ? theme.colors.neutral[50] : theme.colors.neutral[300]
|
|
126
|
+
}
|
|
127
|
+
>
|
|
128
|
+
<RowTable texto={dia.dia ?? "-"} customWidth={colWidths.dia} />
|
|
129
|
+
<RowTable texto={dia.entrada ?? "-"} customWidth={colWidths.data} />
|
|
130
|
+
<RowTable texto={dia.saida ?? "-"} customWidth={colWidths.jorna} />
|
|
131
|
+
<RowTable texto={(dia.kms ?? 0).toString()} customWidth={colWidths.kms} />
|
|
132
|
+
<RowTable texto={(dia.picos ?? 0).toString()} customWidth={colWidths.picos} />
|
|
133
|
+
<RowTable texto={(dia.falhas ?? 0).toString()} customWidth={colWidths.falhas} />
|
|
134
|
+
</Box>
|
|
135
|
+
))}
|
|
94
136
|
</Box>
|
|
95
|
-
)
|
|
137
|
+
)}
|
|
96
138
|
|
|
97
139
|
{/* Linha de totais */}
|
|
98
140
|
<Box
|
|
141
|
+
testID={`${testID}-content-total`}
|
|
99
142
|
flexStyle={{ flexDirection: "row" }}
|
|
100
143
|
backgroundColor={theme.colors.green[100]}
|
|
101
144
|
borderStyled={{
|