jornada-ui 0.4.14 → 0.4.16
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/common/icons-svg/constants/index.js +2 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/download/index.js +53 -0
- package/lib/commonjs/common/icons-svg/download/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/index.js +7 -0
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/index.js +10 -10
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +50 -17
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/components/inputs/input-date-time/index.js +11 -9
- package/lib/commonjs/components/inputs/input-date-time/index.js.map +1 -1
- package/lib/commonjs/components/inputs/input-date-time/styles.js +6 -3
- package/lib/commonjs/components/inputs/input-date-time/styles.js.map +1 -1
- package/lib/commonjs/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.js +71 -65
- package/lib/commonjs/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
- package/lib/commonjs/components/notification-card/index.js +142 -0
- package/lib/commonjs/components/notification-card/index.js.map +1 -0
- package/lib/commonjs/components/notification-card/interface.js +6 -0
- package/lib/commonjs/components/notification-card/interface.js.map +1 -0
- package/lib/commonjs/components/notification-details-card/index.js +181 -0
- package/lib/commonjs/components/notification-details-card/index.js.map +1 -0
- package/lib/commonjs/components/notification-details-card/interface.js +6 -0
- package/lib/commonjs/components/notification-details-card/interface.js.map +1 -0
- package/lib/commonjs/components/user-journey-work-card/index.js +44 -4
- package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
- package/lib/commonjs/index.js +19 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/button/button.stories.js +0 -2
- package/lib/commonjs/stories/button/button.stories.js.map +1 -1
- package/lib/commonjs/stories/capture-photo/capture-photo.stories.js +0 -1
- package/lib/commonjs/stories/capture-photo/capture-photo.stories.js.map +1 -1
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js +62 -9
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
- package/lib/commonjs/stories/notification-card/notification-card.stories.js +100 -0
- package/lib/commonjs/stories/notification-card/notification-card.stories.js.map +1 -0
- package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js +112 -0
- package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
- package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
- package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +2 -1
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/module/common/icons-svg/constants/index.js +2 -1
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/download/index.js +47 -0
- package/lib/module/common/icons-svg/download/index.js.map +1 -0
- package/lib/module/common/icons-svg/index.js +7 -0
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +10 -10
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +50 -17
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/components/inputs/input-date-time/index.js +11 -9
- package/lib/module/components/inputs/input-date-time/index.js.map +1 -1
- package/lib/module/components/inputs/input-date-time/styles.js +6 -3
- package/lib/module/components/inputs/input-date-time/styles.js.map +1 -1
- package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.js +69 -63
- package/lib/module/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
- package/lib/module/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
- package/lib/module/components/notification-card/index.js +135 -0
- package/lib/module/components/notification-card/index.js.map +1 -0
- package/lib/module/components/notification-card/interface.js +4 -0
- package/lib/module/components/notification-card/interface.js.map +1 -0
- package/lib/module/components/notification-details-card/index.js +183 -0
- package/lib/module/components/notification-details-card/index.js.map +1 -0
- package/lib/module/components/notification-details-card/interface.js +4 -0
- package/lib/module/components/notification-details-card/interface.js.map +1 -0
- package/lib/module/components/user-journey-work-card/index.js +44 -4
- package/lib/module/components/user-journey-work-card/index.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/button/button.stories.js +0 -1
- package/lib/module/stories/button/button.stories.js.map +1 -1
- package/lib/module/stories/capture-photo/capture-photo.stories.js +0 -1
- package/lib/module/stories/capture-photo/capture-photo.stories.js.map +1 -1
- package/lib/module/stories/card-work-session/card-work-session.stories.js +62 -9
- package/lib/module/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
- package/lib/module/stories/notification-card/notification-card.stories.js +95 -0
- package/lib/module/stories/notification-card/notification-card.stories.js.map +1 -0
- package/lib/module/stories/notification-details-card/notification-details-card.stories.js +107 -0
- package/lib/module/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
- package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
- package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +2 -1
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-report/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-card/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification-card/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/travel-history/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +3 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts +14 -0
- package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
- package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/user-journey-work-card/user-journey-work-card.stories.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/common/icons-svg/constants/index.d.ts +1 -0
- package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/download/index.d.ts +11 -0
- package/lib/typescript/module/src/common/icons-svg/download/index.d.ts.map +1 -0
- package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-report/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts +1 -1
- package/lib/typescript/module/src/components/card-work-session/index.d.ts +2 -1
- package/lib/typescript/module/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts +2 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
- package/lib/typescript/module/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-card/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification-card/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-card/interface.d.ts +17 -0
- package/lib/typescript/module/src/components/notification-card/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-details-card/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification-details-card/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-details-card/interface.d.ts +15 -0
- package/lib/typescript/module/src/components/notification-details-card/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts +1 -1
- package/lib/typescript/module/src/components/travel-history/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts +2 -0
- package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +3 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts +14 -0
- package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
- package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/user-journey-work-card/user-journey-work-card.stories.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/common/icons-svg/constants/index.ts +1 -0
- package/src/common/icons-svg/download/index.tsx +52 -0
- package/src/common/icons-svg/index.tsx +4 -0
- package/src/components/activities-progress/index.tsx +172 -172
- package/src/components/card-report/interface.d.ts +1 -1
- package/src/components/card-work-session/index.tsx +190 -172
- package/src/components/card-work-session/interface.d.ts +151 -150
- package/src/components/inputs/input-date-time/index.tsx +13 -12
- package/src/components/inputs/input-date-time/styles.ts +64 -63
- package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.tsx +78 -67
- package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.ts +10 -10
- package/src/components/monthly-summary-table/interface.d.ts +1 -1
- package/src/components/notification-card/index.tsx +123 -0
- package/src/components/notification-card/interface.ts +18 -0
- package/src/components/notification-details-card/index.tsx +180 -0
- package/src/components/notification-details-card/interface.ts +16 -0
- package/src/components/travel-history/interface.d.ts +1 -1
- package/src/components/user-journey-work-card/index.tsx +28 -1
- package/src/components/user-journey-work-card/interface.d.ts +149 -145
- package/src/index.tsx +3 -1
- package/src/stories/button/button.stories.tsx +1 -1
- package/src/stories/capture-photo/capture-photo.stories.tsx +1 -1
- package/src/stories/card-work-session/card-work-session.stories.tsx +106 -53
- package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +60 -60
- package/src/stories/notification-card/notification-card.stories.tsx +93 -0
- package/src/stories/notification-details-card/notification-details-card.stories.tsx +109 -0
- package/src/stories/user-journey-work-card/user-journey-work-card.stories.tsx +71 -63
- package/src/styles/theme/theme.ts +1 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/index.js.map +0 -1
- package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
- package/lib/module/components/modals/modal-journey-rectification/index.js.map +0 -1
- package/lib/module/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
- package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
- package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
- /package/lib/commonjs/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
- /package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
|
@@ -12,6 +12,7 @@ import Typography from "../../typography/index.js";
|
|
|
12
12
|
import Button from "../../button/index.js";
|
|
13
13
|
import SelectOption from "../../selects/select-option/index.js";
|
|
14
14
|
import InputDateTime from "../../inputs/input-date-time/index.js";
|
|
15
|
+
import MaintenanceDescriptionInput from "../../maintenance-description-input/index.js";
|
|
15
16
|
|
|
16
17
|
// commons / svg
|
|
17
18
|
import { Icons } from "../../../common/icons-svg/index.js";
|
|
@@ -25,46 +26,53 @@ import { theme } from "../../../styles/theme/theme.js";
|
|
|
25
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
27
|
const options = [{
|
|
27
28
|
label: "Disp com veículo parado",
|
|
28
|
-
value: "
|
|
29
|
+
value: "8"
|
|
29
30
|
}, {
|
|
30
31
|
label: "Operação com veículo",
|
|
31
|
-
value: "
|
|
32
|
+
value: "1"
|
|
32
33
|
}, {
|
|
33
34
|
label: "Em carga",
|
|
34
|
-
value: "
|
|
35
|
+
value: "2"
|
|
35
36
|
}, {
|
|
36
37
|
label: "Em descarga",
|
|
37
|
-
value: "
|
|
38
|
+
value: "3"
|
|
38
39
|
}];
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Componente modal para edição de atividade para interação do usuário.
|
|
43
|
+
*/
|
|
39
44
|
const ModalJourneyRectification = ({
|
|
40
45
|
visible,
|
|
41
46
|
onClose,
|
|
42
47
|
modalConfirm,
|
|
43
|
-
textTitle
|
|
48
|
+
textTitle,
|
|
49
|
+
isLoading
|
|
44
50
|
}) => {
|
|
45
|
-
const [isLoading] = React.useState(false);
|
|
46
|
-
|
|
47
|
-
// *** DEFAULTS: já começa com um motivo, data e hora atuais
|
|
48
51
|
const defaultReason = options[0]?.value ?? null;
|
|
49
|
-
const [selectedReason, setSelectedReason] = useState(defaultReason);
|
|
50
|
-
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
51
|
-
const [selectedTime, setSelectedTime] = useState(new Date());
|
|
52
|
+
const [selectedReason, setSelectedReason] = useState(defaultReason);
|
|
53
|
+
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
54
|
+
const [selectedTime, setSelectedTime] = useState(new Date());
|
|
55
|
+
|
|
56
|
+
// motivo digitado pelo usuário
|
|
57
|
+
const [editReason, setEditReason] = useState("");
|
|
58
|
+
const [errorReason, setErrorReason] = useState("");
|
|
52
59
|
|
|
53
|
-
// helpers
|
|
60
|
+
// helpers
|
|
54
61
|
const fmtDate = d => `${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
|
|
55
62
|
const fmtTime = d => `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const out = new Date(date);
|
|
61
|
-
if (time) {
|
|
62
|
-
out.setHours(time.getHours());
|
|
63
|
-
out.setMinutes(time.getMinutes());
|
|
64
|
-
out.setSeconds(0);
|
|
65
|
-
out.setMilliseconds(0);
|
|
63
|
+
const handleConfirm = () => {
|
|
64
|
+
if (!editReason.trim()) {
|
|
65
|
+
setErrorReason("Informe o motivo da edição!");
|
|
66
|
+
return;
|
|
66
67
|
}
|
|
67
|
-
|
|
68
|
+
const payload = {
|
|
69
|
+
jr_tipo_atividade_id: selectedReason,
|
|
70
|
+
description: options.find(o => o.value === selectedReason)?.label ?? null,
|
|
71
|
+
date_start: selectedDate ? fmtDate(selectedDate) : null,
|
|
72
|
+
hours_start: selectedTime ? fmtTime(selectedTime) : null,
|
|
73
|
+
edit_reason: editReason.trim()
|
|
74
|
+
};
|
|
75
|
+
modalConfirm(payload);
|
|
68
76
|
};
|
|
69
77
|
return /*#__PURE__*/_jsx(Modal, {
|
|
70
78
|
animationType: "fade",
|
|
@@ -104,10 +112,11 @@ const ModalJourneyRectification = ({
|
|
|
104
112
|
background: theme.colors.neutral[300],
|
|
105
113
|
size: 22
|
|
106
114
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
107
|
-
text:
|
|
115
|
+
text: textTitle ?? "Editar atividade",
|
|
108
116
|
color: theme.colors.neutral[25],
|
|
109
117
|
marginLeft: theme.margins["2xs"],
|
|
110
|
-
fontFamily: theme.fonts.
|
|
118
|
+
fontFamily: theme.fonts.inter_bold,
|
|
119
|
+
fontWeight: "700",
|
|
111
120
|
size: theme.fontSizes.lg
|
|
112
121
|
})]
|
|
113
122
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
@@ -119,42 +128,46 @@ const ModalJourneyRectification = ({
|
|
|
119
128
|
borderRadius: theme.borderWidths.thick_medium
|
|
120
129
|
},
|
|
121
130
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
122
|
-
text: "Confirme as
|
|
123
|
-
color: theme.colors.black[
|
|
131
|
+
text: "Confirme as altera\xE7\xF5es antes de salvar.",
|
|
132
|
+
color: theme.colors.black[100],
|
|
124
133
|
fontFamily: theme.fonts.inter_regular_400,
|
|
125
|
-
|
|
134
|
+
fontWeight: "400",
|
|
135
|
+
lineHeight: theme.lineHeight["2xl"],
|
|
136
|
+
size: theme.fontSizes.sm,
|
|
126
137
|
marginBottom: 16
|
|
127
138
|
}), /*#__PURE__*/_jsx(SelectOption, {
|
|
128
139
|
titleLabel: "Selecione atividade",
|
|
129
140
|
sizeTitleLabel: 18,
|
|
130
|
-
dataOption: options
|
|
131
|
-
|
|
132
|
-
,
|
|
133
|
-
handleSelectDown: value => setSelectedReason(value) // ***
|
|
134
|
-
,
|
|
141
|
+
dataOption: options,
|
|
142
|
+
handleSelectDown: value => setSelectedReason(value),
|
|
135
143
|
backgroundColor: theme.colors.neutral[300]
|
|
136
144
|
}), /*#__PURE__*/_jsx(InputDateTime, {
|
|
137
145
|
mode: "date",
|
|
138
|
-
titleLabel: "Data"
|
|
139
|
-
|
|
140
|
-
,
|
|
141
|
-
value: selectedDate // *** controlado
|
|
142
|
-
,
|
|
143
|
-
onChange: d => setSelectedDate(d) // ***
|
|
144
|
-
,
|
|
146
|
+
titleLabel: "Data",
|
|
147
|
+
value: selectedDate,
|
|
148
|
+
onChange: d => setSelectedDate(d),
|
|
145
149
|
backgroundColor: "#f5f5f5",
|
|
146
150
|
colortitleLabel: "#333"
|
|
147
151
|
}), /*#__PURE__*/_jsx(InputDateTime, {
|
|
148
152
|
mode: "time",
|
|
149
|
-
titleLabel: "Hor\xE1rio"
|
|
150
|
-
|
|
151
|
-
,
|
|
152
|
-
value: selectedTime // *** controlado
|
|
153
|
-
,
|
|
154
|
-
onChange: d => setSelectedTime(d) // ***
|
|
155
|
-
,
|
|
153
|
+
titleLabel: "Hor\xE1rio",
|
|
154
|
+
value: selectedTime,
|
|
155
|
+
onChange: d => setSelectedTime(d),
|
|
156
156
|
backgroundColor: "#f5f5f5",
|
|
157
157
|
colortitleLabel: "#333"
|
|
158
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
159
|
+
width: "100%",
|
|
160
|
+
children: /*#__PURE__*/_jsx(MaintenanceDescriptionInput, {
|
|
161
|
+
label: "Motivo da edi\xE7\xE3o",
|
|
162
|
+
placeholderTextColor: theme.colors.gray[700],
|
|
163
|
+
placeholder: "Informe o motivo da edi\xE7\xE3o",
|
|
164
|
+
value: editReason,
|
|
165
|
+
onChangeText: text => {
|
|
166
|
+
setEditReason(text);
|
|
167
|
+
if (text.trim()) setErrorReason("");
|
|
168
|
+
},
|
|
169
|
+
error: errorReason
|
|
170
|
+
})
|
|
158
171
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
159
172
|
marginStyle: {
|
|
160
173
|
marginTop: 4
|
|
@@ -172,8 +185,8 @@ const ModalJourneyRectification = ({
|
|
|
172
185
|
disabled: isLoading,
|
|
173
186
|
backgroundColor: theme.colors.neutral[300],
|
|
174
187
|
buttonTextStyle: {
|
|
175
|
-
color: theme.colors.blue[
|
|
176
|
-
fontFamily:
|
|
188
|
+
color: theme.colors.blue[500],
|
|
189
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
177
190
|
fontSize: theme.fontSizes.xs,
|
|
178
191
|
fontWeight: "500"
|
|
179
192
|
},
|
|
@@ -189,19 +202,8 @@ const ModalJourneyRectification = ({
|
|
|
189
202
|
borderRadius: theme.borderWidths.thick_medium
|
|
190
203
|
}
|
|
191
204
|
}), /*#__PURE__*/_jsx(Button, {
|
|
192
|
-
title: "
|
|
193
|
-
onPress:
|
|
194
|
-
const merged = mergeDateTime(selectedDate, selectedTime);
|
|
195
|
-
const payload = {
|
|
196
|
-
reasonValue: selectedReason,
|
|
197
|
-
reasonLabel: options.find(o => o.value === selectedReason)?.label ?? null,
|
|
198
|
-
date: selectedDate ? fmtDate(selectedDate) : null,
|
|
199
|
-
time: selectedTime ? fmtTime(selectedTime) : null,
|
|
200
|
-
dateTimeISO: merged ? merged.toISOString() : null
|
|
201
|
-
};
|
|
202
|
-
modalConfirm(payload);
|
|
203
|
-
onClose();
|
|
204
|
-
},
|
|
205
|
+
title: "ALTERAR",
|
|
206
|
+
onPress: handleConfirm,
|
|
205
207
|
width: "48%",
|
|
206
208
|
height: 40,
|
|
207
209
|
isLoading: isLoading,
|
|
@@ -209,7 +211,7 @@ const ModalJourneyRectification = ({
|
|
|
209
211
|
backgroundColor: theme.colors.blue[500],
|
|
210
212
|
buttonTextStyle: {
|
|
211
213
|
color: theme.colors.neutral[25],
|
|
212
|
-
fontFamily:
|
|
214
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
213
215
|
fontSize: theme.fontSizes.xs,
|
|
214
216
|
fontWeight: "500"
|
|
215
217
|
},
|
|
@@ -232,5 +234,9 @@ const ModalJourneyRectification = ({
|
|
|
232
234
|
});
|
|
233
235
|
};
|
|
234
236
|
ModalJourneyRectification.displayName = "ModalJourneyRectification";
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* EXPORTS
|
|
240
|
+
*/
|
|
235
241
|
export default asBaseComponent(ModalJourneyRectification);
|
|
236
242
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","Modal","View","Box","Typography","Button","SelectOption","InputDateTime","MaintenanceDescriptionInput","Icons","asBaseComponent","theme","jsx","_jsx","jsxs","_jsxs","options","label","value","ModalJourneyRectification","visible","onClose","modalConfirm","textTitle","isLoading","defaultReason","selectedReason","setSelectedReason","selectedDate","setSelectedDate","Date","selectedTime","setSelectedTime","editReason","setEditReason","errorReason","setErrorReason","fmtDate","d","String","getDate","padStart","getMonth","getFullYear","fmtTime","getHours","getMinutes","handleConfirm","trim","payload","jr_tipo_atividade_id","description","find","o","date_start","hours_start","edit_reason","animationType","transparent","children","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","marginLeft","flexStyle","flexDirection","icon","color","background","neutral","size","text","margins","fontFamily","fonts","inter_bold","fontWeight","fontSizes","lg","padding","xs","black","inter_regular_400","lineHeight","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","mode","onChange","colortitleLabel","placeholderTextColor","gray","placeholder","onChangeText","error","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","inter_medium_500","fontSize","textAlign","borderWidth","thin","borderColor","displayName"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-edite-journey-rectification/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,oBAAW;AAC3B,OAAOC,UAAU,MAAM,2BAAkB;AACzC,OAAOC,MAAM,MAAM,uBAAc;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AE;gBACZwD,WAAW,EAAEjH,KAAK,CAAC2D,YAAY,CAACuD,IAAI;gBACpCC,WAAW,EAAEnH,KAAK,CAACuD,MAAM,CAACsD,IAAI,CAAC,GAAG,CAAC;gBACnCnD,YAAY,EAAE1D,KAAK,CAAC2D,YAAY,CAACC;cACnC;YAAE,CACH,CAAC;UAAA,CACC,CAAC;QAAA,CACH,CAAC;MAAA,CACH;IAAC,CACF;EAAC,CACF,CAAC;AAEZ,CAAC;AAEDpD,yBAAyB,CAAC4G,WAAW,GAAG,2BAA2B;;AAEnE;AACA;AACA;AACA,eAAerH,eAAe,CAACS,yBAAyB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-edite-journey-rectification/interface.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* IMPORTS
|
|
5
|
+
*/
|
|
6
|
+
import React, { forwardRef } from "react";
|
|
7
|
+
import { TouchableOpacity } from "react-native";
|
|
8
|
+
|
|
9
|
+
// commons / icons
|
|
10
|
+
import { Icons } from "../../common/icons-svg/index.js";
|
|
11
|
+
|
|
12
|
+
// components
|
|
13
|
+
import Box from "../box/index.js";
|
|
14
|
+
import Typography from "../typography/index.js";
|
|
15
|
+
import Button from "../button/index.js";
|
|
16
|
+
|
|
17
|
+
// styles / theme
|
|
18
|
+
import { theme } from "../../styles/theme/theme.js";
|
|
19
|
+
|
|
20
|
+
// typings
|
|
21
|
+
import { asBaseComponent } from "../../@types/as-base-component.js";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
/**
|
|
24
|
+
* Componente NotificationCard
|
|
25
|
+
*/
|
|
26
|
+
const NotificationCard = /*#__PURE__*/forwardRef(({
|
|
27
|
+
variant = "read",
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
actionLabel,
|
|
31
|
+
onPress,
|
|
32
|
+
onPressAction,
|
|
33
|
+
testID
|
|
34
|
+
}, ref) => {
|
|
35
|
+
const isWarning = variant === "unread";
|
|
36
|
+
|
|
37
|
+
// cor da borda lateral
|
|
38
|
+
const borderColor = isWarning ? theme.colors.orange[150] : theme.colors.blue[525];
|
|
39
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
activeOpacity: 0.7,
|
|
42
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
testID: testID ?? "notification-card",
|
|
45
|
+
flexStyle: {
|
|
46
|
+
flexDirection: "row"
|
|
47
|
+
},
|
|
48
|
+
borderStyled: {
|
|
49
|
+
borderWidth: 1,
|
|
50
|
+
borderColor: isWarning ? theme.colors.orange[150] : theme.colors.neutral[200],
|
|
51
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
52
|
+
},
|
|
53
|
+
marginStyle: {
|
|
54
|
+
marginBottom: 12
|
|
55
|
+
},
|
|
56
|
+
backgroundColor: isWarning ? theme.colors.neutral[500] : theme.colors.neutral[25],
|
|
57
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
58
|
+
width: 8,
|
|
59
|
+
backgroundColor: borderColor,
|
|
60
|
+
borderStyled: {
|
|
61
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
62
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium
|
|
63
|
+
}
|
|
64
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
65
|
+
flexStyle: {
|
|
66
|
+
flex: 1
|
|
67
|
+
},
|
|
68
|
+
paddingStyle: {
|
|
69
|
+
padding: theme.paddings.sm
|
|
70
|
+
},
|
|
71
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
72
|
+
flexStyle: {
|
|
73
|
+
flexDirection: "row",
|
|
74
|
+
alignItems: "center"
|
|
75
|
+
},
|
|
76
|
+
marginStyle: {
|
|
77
|
+
marginBottom: 6
|
|
78
|
+
},
|
|
79
|
+
children: [/*#__PURE__*/_jsx(Icons, {
|
|
80
|
+
icon: "BELL",
|
|
81
|
+
color: borderColor,
|
|
82
|
+
size: 20
|
|
83
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
84
|
+
text: title,
|
|
85
|
+
fontFamily: theme.fonts.inter_bold,
|
|
86
|
+
fontWeight: "700",
|
|
87
|
+
size: theme.fontSizes.md,
|
|
88
|
+
color: theme.colors.black[100],
|
|
89
|
+
marginLeft: 8
|
|
90
|
+
})]
|
|
91
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
92
|
+
text: description,
|
|
93
|
+
numberOfLines: isWarning ? 2 : 4,
|
|
94
|
+
ellipsizeMode: "tail",
|
|
95
|
+
size: theme.fontSizes.sm,
|
|
96
|
+
lineHeight: theme.lineHeight.md,
|
|
97
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
98
|
+
color: theme.colors.gray[700],
|
|
99
|
+
marginBottom: isWarning && actionLabel ? 12 : 0
|
|
100
|
+
}), actionLabel && onPressAction && /*#__PURE__*/_jsx(Button, {
|
|
101
|
+
isLoading: false,
|
|
102
|
+
title: actionLabel,
|
|
103
|
+
onPress: onPressAction,
|
|
104
|
+
backgroundColor: theme.colors.neutral[25],
|
|
105
|
+
borderStyled: {
|
|
106
|
+
borderWidth: 1,
|
|
107
|
+
borderColor: theme.colors.red[500],
|
|
108
|
+
borderRadius: 12
|
|
109
|
+
},
|
|
110
|
+
buttonTextStyle: {
|
|
111
|
+
color: theme.colors.red[500],
|
|
112
|
+
fontSize: theme.fontSizes.sm,
|
|
113
|
+
fontFamily: theme.fonts.inter_medium_500
|
|
114
|
+
},
|
|
115
|
+
flexStyle: {
|
|
116
|
+
flexDirection: "row",
|
|
117
|
+
alignItems: "center",
|
|
118
|
+
justifyContent: "center"
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
alignSelf: "flex-start",
|
|
122
|
+
paddingHorizontal: 12
|
|
123
|
+
}
|
|
124
|
+
})]
|
|
125
|
+
})]
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
NotificationCard.displayName = "NotificationCard";
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* EXPORTS
|
|
133
|
+
*/
|
|
134
|
+
export default asBaseComponent(NotificationCard);
|
|
135
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","TouchableOpacity","Icons","Box","Typography","Button","theme","asBaseComponent","jsx","_jsx","jsxs","_jsxs","NotificationCard","variant","title","description","actionLabel","onPress","onPressAction","testID","ref","isWarning","borderColor","colors","orange","blue","activeOpacity","children","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","sm","alignItems","icon","color","size","text","fontFamily","fonts","inter_bold","fontWeight","fontSizes","md","black","marginLeft","numberOfLines","ellipsizeMode","lineHeight","inter_regular_400","gray","isLoading","red","buttonTextStyle","fontSize","inter_medium_500","justifyContent","style","alignSelf","paddingHorizontal","displayName"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-card/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,gBAAgB,QAAc,cAAc;;AAErD;AACA,SAASC,KAAK,QAAQ,iCAAwB;;AAE9C;AACA,OAAOC,GAAG,MAAM,iBAAQ;AACxB,OAAOC,UAAU,MAAM,wBAAe;AACtC,OAAOC,MAAM,MAAM,oBAAW;;AAE9B;AACA,SAASC,KAAK,QAAQ,6BAA0B;;AAEhD;AACA,SAASC,eAAe,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IA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CAAE;UAC9B3B,YAAY,EAAEhB,SAAS,IAAIL,WAAW,GAAG,EAAE,GAAG;QAAE,CACjD,CAAC,EAGDA,WAAW,IAAIE,aAAa,iBAC3BT,IAAA,CAACJ,MAAM;UACL4D,SAAS,EAAE,KAAM;UACjBnD,KAAK,EAAEE,WAAY;UACnBC,OAAO,EAAEC,aAAc;UACvBoB,eAAe,EAAEhC,KAAK,CAACiB,MAAM,CAACS,OAAO,CAAC,EAAE,CAAE;UAC1CF,YAAY,EAAE;YACZC,WAAW,EAAE,CAAC;YACdT,WAAW,EAAEhB,KAAK,CAACiB,MAAM,CAAC2C,GAAG,CAAC,GAAG,CAAC;YAClCjC,YAAY,EAAE;UAChB,CAAE;UACFkC,eAAe,EAAE;YACflB,KAAK,EAAE3C,KAAK,CAACiB,MAAM,CAAC2C,GAAG,CAAC,GAAG,CAAC;YAC5BE,QAAQ,EAAE9D,KAAK,CAACkD,SAAS,CAACV,EAAE;YAC5BM,UAAU,EAAE9C,KAAK,CAAC+C,KAAK,CAACgB;UAC1B,CAAE;UACFzC,SAAS,EAAE;YACTC,aAAa,EAAE,KAAK;YACpBkB,UAAU,EAAE,QAAQ;YACpBuB,cAAc,EAAE;UAClB,CAAE;UACFC,KAAK,EAAE;YAAEC,SAAS,EAAE,YAAY;YAAEC,iBAAiB,EAAE;UAAG;QAAE,CAC3D,CACF;MAAA,CACE,CAAC;IAAA,CACH;EAAC,CACU,CAAC;AAEvB,CACF,CAAC;AAED7D,gBAAgB,CAAC8D,WAAW,GAAG,kBAAkB;;AAEjD;AACA;AACA;AACA,eAAenE,eAAe,CAACK,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-card/interface.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* IMPORTS
|
|
5
|
+
*/
|
|
6
|
+
import React, { forwardRef, useState } from "react";
|
|
7
|
+
import { Modal, TouchableOpacity, Image, View } from "react-native";
|
|
8
|
+
|
|
9
|
+
// commons / icons
|
|
10
|
+
import { Icons } from "../../common/icons-svg/index.js";
|
|
11
|
+
|
|
12
|
+
// components
|
|
13
|
+
import Box from "../box/index.js";
|
|
14
|
+
import Typography from "../typography/index.js";
|
|
15
|
+
|
|
16
|
+
// typings
|
|
17
|
+
|
|
18
|
+
import { asBaseComponent } from "../../@types/as-base-component.js";
|
|
19
|
+
|
|
20
|
+
// styles / theme
|
|
21
|
+
import { theme } from "../../styles/theme/theme.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Componente NotificationDetailCard
|
|
25
|
+
*/
|
|
26
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
const NotificationDetailCard = /*#__PURE__*/forwardRef(({
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
fileUrl,
|
|
31
|
+
fileType = "image",
|
|
32
|
+
testID
|
|
33
|
+
}, ref) => {
|
|
34
|
+
const [visible, setVisible] = useState(false);
|
|
35
|
+
function openFile() {
|
|
36
|
+
if (fileType === "image") {
|
|
37
|
+
setVisible(true);
|
|
38
|
+
} else if (fileUrl) {
|
|
39
|
+
import("react-native").then(({
|
|
40
|
+
Linking
|
|
41
|
+
}) => {
|
|
42
|
+
Linking.openURL(fileUrl).catch(err => console.warn("Erro ao abrir arquivo:", err));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const borderColor = theme.colors.blue[500];
|
|
47
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
testID: testID ?? "notification-detail-card",
|
|
50
|
+
flexStyle: {
|
|
51
|
+
flexDirection: "row"
|
|
52
|
+
},
|
|
53
|
+
borderStyled: {
|
|
54
|
+
borderWidth: 1,
|
|
55
|
+
borderColor: theme.colors.neutral[200],
|
|
56
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
57
|
+
},
|
|
58
|
+
marginStyle: {
|
|
59
|
+
marginBottom: 16
|
|
60
|
+
},
|
|
61
|
+
backgroundColor: theme.colors.neutral[25],
|
|
62
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
63
|
+
width: 8,
|
|
64
|
+
backgroundColor: borderColor,
|
|
65
|
+
borderStyled: {
|
|
66
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
67
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium
|
|
68
|
+
}
|
|
69
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
70
|
+
flexStyle: {
|
|
71
|
+
flex: 1
|
|
72
|
+
},
|
|
73
|
+
paddingStyle: {
|
|
74
|
+
padding: theme.paddings.md
|
|
75
|
+
},
|
|
76
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
77
|
+
text: title,
|
|
78
|
+
fontFamily: theme.fonts.inter_bold,
|
|
79
|
+
fontWeight: "700",
|
|
80
|
+
size: theme.fontSizes.md,
|
|
81
|
+
color: theme.colors.black[100],
|
|
82
|
+
marginBottom: 8
|
|
83
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
84
|
+
text: description,
|
|
85
|
+
size: theme.fontSizes.sm,
|
|
86
|
+
lineHeight: theme.lineHeight.md,
|
|
87
|
+
color: theme.colors.gray[700],
|
|
88
|
+
marginBottom: fileUrl ? 12 : 0
|
|
89
|
+
}), fileUrl && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
90
|
+
testID: "button",
|
|
91
|
+
onPress: openFile,
|
|
92
|
+
activeOpacity: 0.8,
|
|
93
|
+
style: {
|
|
94
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
95
|
+
overflow: "hidden",
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
borderColor: theme.colors.gray[300]
|
|
98
|
+
},
|
|
99
|
+
children: fileType === "image" ? /*#__PURE__*/_jsx(Box, {
|
|
100
|
+
borderStyled: {
|
|
101
|
+
borderWidth: 2,
|
|
102
|
+
borderColor: theme.colors.blue[525],
|
|
103
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
104
|
+
},
|
|
105
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
106
|
+
source: {
|
|
107
|
+
uri: fileUrl
|
|
108
|
+
},
|
|
109
|
+
style: {
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: 180,
|
|
112
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
113
|
+
borderWidth: 2,
|
|
114
|
+
borderColor: theme.colors.blue[525]
|
|
115
|
+
},
|
|
116
|
+
resizeMode: "cover"
|
|
117
|
+
})
|
|
118
|
+
}) : /*#__PURE__*/_jsxs(Box, {
|
|
119
|
+
flexStyle: {
|
|
120
|
+
flexDirection: "row",
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
justifyContent: "space-between"
|
|
123
|
+
},
|
|
124
|
+
paddingStyle: {
|
|
125
|
+
padding: theme.paddings.sm
|
|
126
|
+
},
|
|
127
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
128
|
+
text: `Abrir arquivo (${fileType.toUpperCase()})`,
|
|
129
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
130
|
+
color: theme.colors.blue[500],
|
|
131
|
+
size: theme.fontSizes.md
|
|
132
|
+
}), /*#__PURE__*/_jsx(Icons, {
|
|
133
|
+
icon: "FILES",
|
|
134
|
+
size: 20,
|
|
135
|
+
color: theme.colors.blue[500]
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
}), fileType === "image" && /*#__PURE__*/_jsx(Modal, {
|
|
140
|
+
visible: visible,
|
|
141
|
+
transparent: true,
|
|
142
|
+
animationType: "fade",
|
|
143
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
144
|
+
style: {
|
|
145
|
+
flex: 1,
|
|
146
|
+
backgroundColor: "rgba(0,0,0,0.9)",
|
|
147
|
+
justifyContent: "center",
|
|
148
|
+
alignItems: "center"
|
|
149
|
+
},
|
|
150
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
151
|
+
onPress: () => setVisible(false),
|
|
152
|
+
style: {
|
|
153
|
+
position: "absolute",
|
|
154
|
+
top: 40,
|
|
155
|
+
right: 20
|
|
156
|
+
},
|
|
157
|
+
children: /*#__PURE__*/_jsx(Icons, {
|
|
158
|
+
icon: "CLOSED",
|
|
159
|
+
size: 28,
|
|
160
|
+
color: theme.colors.neutral[25]
|
|
161
|
+
})
|
|
162
|
+
}), /*#__PURE__*/_jsx(Image, {
|
|
163
|
+
source: {
|
|
164
|
+
uri: fileUrl
|
|
165
|
+
},
|
|
166
|
+
style: {
|
|
167
|
+
width: "90%",
|
|
168
|
+
height: "70%",
|
|
169
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
170
|
+
},
|
|
171
|
+
resizeMode: "contain"
|
|
172
|
+
})]
|
|
173
|
+
})
|
|
174
|
+
})]
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
NotificationDetailCard.displayName = "NotificationDetailCard";
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* EXPORTS
|
|
181
|
+
*/
|
|
182
|
+
export default asBaseComponent(NotificationDetailCard);
|
|
183
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useState","Modal","TouchableOpacity","Image","View","Icons","Box","Typography","asBaseComponent","theme","jsx","_jsx","jsxs","_jsxs","NotificationDetailCard","title","description","fileUrl","fileType","testID","ref","visible","setVisible","openFile","then","Linking","openURL","catch","err","console","warn","borderColor","colors","blue","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","children","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","md","text","fontFamily","fonts","inter_bold","fontWeight","size","fontSizes","color","black","sm","lineHeight","gray","onPress","activeOpacity","style","overflow","source","uri","height","resizeMode","alignItems","justifyContent","toUpperCase","inter_medium_500","icon","transparent","animationType","position","top","right","displayName"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-details-card/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,KAAK,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAEnE;AACA,SAASC,KAAK,QAAQ,iCAAwB;;AAE9C;AACA,OAAOC,GAAG,MAAM,iBAAQ;AACxB,OAAOC,UAAU,MAAM,wBAAe;;AAEtC;;AAEA,SAASC,eAAe,QAAQ,mCAAgC;;AAEhE;AACA,SAASC,KAAK,QAAQ,6BAA0B;;AAEhD;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGA,MAAMC,sBAA8D,gBAAGf,UAAU,CAG/E,CAAC;EAAEgB,KAAK;EAAEC,WAAW;EAAEC,OAAO;EAAEC,QAAQ,GAAG,OAAO;EAAEC;AAAO,CAAC,EAAEC,GAAG,KAAK;EACtE,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGtB,QAAQ,CAAC,KAAK,CAAC;EAE7C,SAASuB,QAAQA,CAAA,EAAG;IAClB,IAAIL,QAAQ,KAAK,OAAO,EAAE;MACxBI,UAAU,CAAC,IAAI,CAAC;IAClB,CAAC,MAAM,IAAIL,OAAO,EAAE;MAClB,MAAM,CAAC,cAAc,CAAC,CAACO,IAAI,CAAC,CAAC;QAAEC;MAAQ,CAAC,KAAK;QAC3CA,OAAO,CAACC,OAAO,CAACT,OAAO,CAAC,CAACU,KAAK,CAAEC,GAAG,IAAKC,OAAO,CAACC,IAAI,CAAC,wBAAwB,EAAEF,GAAG,CAAC,CAAC;MACtF,CAAC,CAAC;IACJ;EACF;EAEA,MAAMG,WAAW,GAAGtB,KAA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CAACN,KAAK;YAACyE,IAAI,EAAC,QAAQ;YAACnB,IAAI,EAAE,EAAG;YAACE,KAAK,EAAEpD,KAAK,CAACuB,MAAM,CAACM,OAAO,CAAC,EAAE;UAAE,CAAE;QAAC,CAClD,CAAC,eAEnB3B,IAAA,CAACR,KAAK;UACJmE,MAAM,EAAE;YAAEC,GAAG,EAAEtD;UAAQ,CAAE;UACzBmD,KAAK,EAAE;YACLtB,KAAK,EAAE,KAAK;YACZ0B,MAAM,EAAE,KAAK;YACbjC,YAAY,EAAE9B,KAAK,CAAC+B,YAAY,CAACC;UACnC,CAAE;UACFgC,UAAU,EAAC;QAAS,CACrB,CAAC;MAAA,CACE;IAAC,CACF,CACR;EAAA,CACE,CAAC;AAEV,CAAC,CAAC;AAEF3D,sBAAsB,CAACsE,WAAW,GAAG,wBAAwB;;AAE7D;AACA;AACA;AACA,eAAe5E,eAAe,CAACM,sBAAsB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-details-card/interface.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -28,9 +28,11 @@ const UserJourneyWorkCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
28
28
|
initialTime = "00:40",
|
|
29
29
|
duration = "00:00",
|
|
30
30
|
avatar = "",
|
|
31
|
+
counterBadge = 0,
|
|
31
32
|
backgroundColor,
|
|
32
33
|
width,
|
|
33
|
-
handleNavigation
|
|
34
|
+
handleNavigation,
|
|
35
|
+
handleNavigationNotification
|
|
34
36
|
} = props;
|
|
35
37
|
return /*#__PURE__*/_jsxs(Box, {
|
|
36
38
|
ref: ref,
|
|
@@ -135,9 +137,47 @@ const UserJourneyWorkCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
135
137
|
lineHeight: theme.lineHeight["2xl"]
|
|
136
138
|
})]
|
|
137
139
|
})]
|
|
138
|
-
}), /*#__PURE__*/
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
141
|
+
activeOpacity: 0.7,
|
|
142
|
+
onPress: handleNavigationNotification,
|
|
143
|
+
children: [counterBadge > 0 && /*#__PURE__*/_jsx(Box, {
|
|
144
|
+
backgroundColor: theme.colors.red[500],
|
|
145
|
+
flexStyle: {
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
justifyContent: "center"
|
|
148
|
+
},
|
|
149
|
+
borderStyled: {
|
|
150
|
+
borderRadius: theme.borderWidths.hairline
|
|
151
|
+
},
|
|
152
|
+
style: [counterBadge < 10 ? {
|
|
153
|
+
right: -5,
|
|
154
|
+
top: -2,
|
|
155
|
+
height: 16,
|
|
156
|
+
width: 16
|
|
157
|
+
} : {
|
|
158
|
+
right: -8,
|
|
159
|
+
top: -5,
|
|
160
|
+
padding: 2
|
|
161
|
+
}, {
|
|
162
|
+
position: "absolute",
|
|
163
|
+
zIndex: 10
|
|
164
|
+
}],
|
|
165
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
166
|
+
text: `${counterBadge}`,
|
|
167
|
+
align: "center",
|
|
168
|
+
size: theme.fontSizes["2xs"],
|
|
169
|
+
color: theme.colors.neutral[25],
|
|
170
|
+
fontFamily: theme.fonts.inter_bold_700,
|
|
171
|
+
lineHeight: theme.fontSizes.sm,
|
|
172
|
+
letterSpacing: "regular"
|
|
173
|
+
})
|
|
174
|
+
}), /*#__PURE__*/_jsx(Icons, {
|
|
175
|
+
icon: "BELL",
|
|
176
|
+
size: 28,
|
|
177
|
+
style: {
|
|
178
|
+
position: "relative"
|
|
179
|
+
}
|
|
180
|
+
})]
|
|
141
181
|
})]
|
|
142
182
|
}), /*#__PURE__*/_jsx(Box, {
|
|
143
183
|
flexStyle: {
|