componentes-sinco 1.0.25 → 1.0.27
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/dist/index.cjs +358 -175
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +355 -174
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -87,6 +87,7 @@ __export(src_exports, {
|
|
|
87
87
|
FooterAction: () => FooterAction,
|
|
88
88
|
MultiSelect: () => MultiSelect,
|
|
89
89
|
PageHeader: () => PageHeader,
|
|
90
|
+
SCActivityCalendar: () => SCActivityCalendar,
|
|
90
91
|
SCAutocomplete: () => SCAutocomplete,
|
|
91
92
|
SCCalendarSwipeable: () => SCCalendarSwipeable,
|
|
92
93
|
SCCard: () => SCCard,
|
|
@@ -95,6 +96,7 @@ __export(src_exports, {
|
|
|
95
96
|
SCDateRange: () => SCDateRange,
|
|
96
97
|
SCDialog: () => SCDialog,
|
|
97
98
|
SCDrawer: () => SCDrawer,
|
|
99
|
+
SCListContent: () => SCListContent,
|
|
98
100
|
SCMenu: () => SCMenu,
|
|
99
101
|
SCModal: () => SCModal,
|
|
100
102
|
SCSelect: () => SCSelect,
|
|
@@ -791,7 +793,7 @@ var Attachment = ({
|
|
|
791
793
|
setToast({
|
|
792
794
|
title: "Error al eliminar archivo",
|
|
793
795
|
type: "error",
|
|
794
|
-
time:
|
|
796
|
+
time: 2
|
|
795
797
|
});
|
|
796
798
|
} finally {
|
|
797
799
|
setFileToDelete(null);
|
|
@@ -833,13 +835,13 @@ function getIconValidation(name) {
|
|
|
833
835
|
}
|
|
834
836
|
|
|
835
837
|
// src/Components/Textfield/Helpers/validateKeyDown.tsx
|
|
836
|
-
function validateKeyDown(event2,
|
|
838
|
+
function validateKeyDown(event2, format3) {
|
|
837
839
|
const key = event2.key;
|
|
838
840
|
const target = event2.target;
|
|
839
|
-
if (
|
|
841
|
+
if (format3 === "int" && !/^[0-9]$/.test(key)) {
|
|
840
842
|
event2.preventDefault();
|
|
841
843
|
}
|
|
842
|
-
if (
|
|
844
|
+
if (format3 === "decimal" && (target.value === "" && key === "." || key === "-" || key === "+")) {
|
|
843
845
|
event2.preventDefault();
|
|
844
846
|
}
|
|
845
847
|
if (target.type === "text") {
|
|
@@ -878,7 +880,7 @@ var SCTextField = ({
|
|
|
878
880
|
maxLength,
|
|
879
881
|
//Apariencia
|
|
880
882
|
variant = "outlined",
|
|
881
|
-
format:
|
|
883
|
+
format: format3,
|
|
882
884
|
disabled,
|
|
883
885
|
required,
|
|
884
886
|
size,
|
|
@@ -932,7 +934,7 @@ var SCTextField = ({
|
|
|
932
934
|
event2.preventDefault();
|
|
933
935
|
};
|
|
934
936
|
const handleKeyDown = (event2) => {
|
|
935
|
-
validateKeyDown(event2,
|
|
937
|
+
validateKeyDown(event2, format3);
|
|
936
938
|
if (onKeyDown) onKeyDown(event2);
|
|
937
939
|
};
|
|
938
940
|
const handleInputChange = (event2) => {
|
|
@@ -1029,11 +1031,11 @@ var SCTextField = ({
|
|
|
1029
1031
|
onChange: handleInputChange,
|
|
1030
1032
|
onBlur: handleBlur,
|
|
1031
1033
|
inputProps: { maxLength: maxLength ? maxLength : 50 },
|
|
1032
|
-
type: !showPassword &&
|
|
1033
|
-
className:
|
|
1034
|
+
type: !showPassword && format3 === "password" ? "password" : (format3 || "text").toUpperCase() === "INT" || (format3 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
|
|
1035
|
+
className: format3 === "password" && !showPassword ? "" : "",
|
|
1034
1036
|
placeholder,
|
|
1035
1037
|
startAdornment: iconInputStart ? /* @__PURE__ */ import_react6.default.createElement(import_material4.InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ import_react6.default.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
|
|
1036
|
-
endAdornment: /* @__PURE__ */ import_react6.default.createElement(import_material4.InputAdornment, { position: "end" },
|
|
1038
|
+
endAdornment: /* @__PURE__ */ import_react6.default.createElement(import_material4.InputAdornment, { position: "end" }, format3 === "password" ? /* @__PURE__ */ import_react6.default.createElement(
|
|
1037
1039
|
import_material4.IconButton,
|
|
1038
1040
|
{
|
|
1039
1041
|
"aria-label": "toggle password visibility",
|
|
@@ -1083,11 +1085,11 @@ var SCTextField = ({
|
|
|
1083
1085
|
fontSize: "small"
|
|
1084
1086
|
}
|
|
1085
1087
|
))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ import_react6.default.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
|
|
1086
|
-
label: label ? label + (
|
|
1087
|
-
autoComplete:
|
|
1088
|
+
label: label ? label + (format3 === "password" && !showPassword ? "" : "") : "",
|
|
1089
|
+
autoComplete: format3 === "password" ? "new-password" : "off"
|
|
1088
1090
|
}
|
|
1089
1091
|
)
|
|
1090
|
-
), (iconInputEnd !== void 0 ||
|
|
1092
|
+
), (iconInputEnd !== void 0 || format3 === "password") && infoElement ? /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement(
|
|
1091
1093
|
import_icons_material6.InfoOutlined,
|
|
1092
1094
|
{
|
|
1093
1095
|
"data-testid": "test-infoElement",
|
|
@@ -2483,11 +2485,7 @@ var SCCalendarSwipeable = ({
|
|
|
2483
2485
|
setOpenCalendar(newOpen);
|
|
2484
2486
|
};
|
|
2485
2487
|
const locale = __spreadValues({}, import_locale.es);
|
|
2486
|
-
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement(import_LocalizationProvider2.LocalizationProvider, { dateAdapter: import_AdapterDateFns.AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { container: true, gap: 0.5, sx: {
|
|
2487
|
-
justifyContent: "space-between",
|
|
2488
|
-
padding: "12px 0px",
|
|
2489
|
-
background: "transparent"
|
|
2490
|
-
} }, diasSemana.map((dia) => /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Typography, { sx: { fontSize: "12px !important", color: "#10184099" } }, (0, import_date_fns.format)(dia, "EEEE", { locale: import_locale.es }).charAt(0).toUpperCase())), /* @__PURE__ */ import_react18.default.createElement(
|
|
2488
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement(import_LocalizationProvider2.LocalizationProvider, { dateAdapter: import_AdapterDateFns.AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Typography, { sx: { fontSize: "12px !important", color: "#10184099" } }, (0, import_date_fns.format)(dia, "EEEE", { locale: import_locale.es }).charAt(0).toUpperCase())), /* @__PURE__ */ import_react18.default.createElement(
|
|
2491
2489
|
import_material13.Box,
|
|
2492
2490
|
{
|
|
2493
2491
|
onClick: () => setFecha(dia),
|
|
@@ -3068,13 +3066,55 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
3068
3066
|
)));
|
|
3069
3067
|
};
|
|
3070
3068
|
|
|
3071
|
-
// src/Components/
|
|
3072
|
-
var
|
|
3069
|
+
// src/Components/SCListContent.tsx
|
|
3070
|
+
var import_react26 = __toESM(require("react"), 1);
|
|
3073
3071
|
var import_material16 = require("@mui/material");
|
|
3074
3072
|
var import_Grid26 = __toESM(require("@mui/material/Grid2"), 1);
|
|
3073
|
+
var Muicon6 = __toESM(require("@mui/icons-material"), 1);
|
|
3074
|
+
var SCListContent = ({ options }) => {
|
|
3075
|
+
const [selectedIndex, setSelectedIndex] = import_react26.default.useState("1");
|
|
3076
|
+
const [value, setValue] = import_react26.default.useState("1");
|
|
3077
|
+
options.map(function(option, index, array) {
|
|
3078
|
+
if (option == null ? void 0 : option.iconLeft) {
|
|
3079
|
+
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
3080
|
+
option.iconLeft = Muicon6[option == null ? void 0 : option.iconLeft];
|
|
3081
|
+
} else {
|
|
3082
|
+
option;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
if (option == null ? void 0 : option.iconRight) {
|
|
3086
|
+
if ((option == null ? void 0 : option.iconRight.type) == void 0) {
|
|
3087
|
+
option.iconRight = Muicon6[option == null ? void 0 : option.iconRight];
|
|
3088
|
+
} else {
|
|
3089
|
+
option;
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
});
|
|
3093
|
+
return /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement(import_material16.List, { sx: { width: "100%", maxWidth: 360, bgcolor: "background.paper", padding: "0px !important" } }, options.map((option, index) => /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, { key: index }, /* @__PURE__ */ import_react26.default.createElement(
|
|
3094
|
+
import_material16.ListItemButton,
|
|
3095
|
+
{
|
|
3096
|
+
disabled: option.disable,
|
|
3097
|
+
onClick: option.fn
|
|
3098
|
+
},
|
|
3099
|
+
option.iconLeft ? /* @__PURE__ */ import_react26.default.createElement(import_material16.ListItemIcon, { sx: { minWidth: "30px !important" } }, /* @__PURE__ */ import_react26.default.createElement(import_material16.SvgIcon, { fontSize: "small", color: option.iconLeftColor || "action", component: option.iconLeft })) : "",
|
|
3100
|
+
/* @__PURE__ */ import_react26.default.createElement(
|
|
3101
|
+
import_material16.ListItemText,
|
|
3102
|
+
{
|
|
3103
|
+
primary: option.title,
|
|
3104
|
+
secondary: /* @__PURE__ */ import_react26.default.createElement(import_Grid26.default, { gap: 0.5 }, /* @__PURE__ */ import_react26.default.createElement(import_Grid26.default, { container: true, gap: 0.5 }, option.subtitle), /* @__PURE__ */ import_react26.default.createElement(import_Grid26.default, { container: true, gap: 0.5 }, option.description))
|
|
3105
|
+
}
|
|
3106
|
+
),
|
|
3107
|
+
option.iconRight ? /* @__PURE__ */ import_react26.default.createElement(import_material16.ListItemIcon, { sx: { minWidth: "0px !important" } }, /* @__PURE__ */ import_react26.default.createElement(import_material16.SvgIcon, { fontSize: "small", color: option.iconRightColor || "action", component: option.iconRight })) : ""
|
|
3108
|
+
), option.divider == true ? /* @__PURE__ */ import_react26.default.createElement(import_material16.Divider, null) : ""))));
|
|
3109
|
+
};
|
|
3110
|
+
|
|
3111
|
+
// src/Components/SCMenu.tsx
|
|
3112
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
3113
|
+
var import_material17 = require("@mui/material");
|
|
3114
|
+
var import_Grid27 = __toESM(require("@mui/material/Grid2"), 1);
|
|
3075
3115
|
|
|
3076
3116
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
3077
|
-
var
|
|
3117
|
+
var import_react27 = require("react");
|
|
3078
3118
|
function getWindowDimensions() {
|
|
3079
3119
|
const { innerWidth: width, innerHeight: height } = window;
|
|
3080
3120
|
return {
|
|
@@ -3083,8 +3123,8 @@ function getWindowDimensions() {
|
|
|
3083
3123
|
};
|
|
3084
3124
|
}
|
|
3085
3125
|
function useWindowDimensions() {
|
|
3086
|
-
const [windowDimensions, setWindowDimensions] = (0,
|
|
3087
|
-
(0,
|
|
3126
|
+
const [windowDimensions, setWindowDimensions] = (0, import_react27.useState)(getWindowDimensions());
|
|
3127
|
+
(0, import_react27.useEffect)(() => {
|
|
3088
3128
|
function handleResize() {
|
|
3089
3129
|
setWindowDimensions(getWindowDimensions());
|
|
3090
3130
|
}
|
|
@@ -3095,19 +3135,19 @@ function useWindowDimensions() {
|
|
|
3095
3135
|
}
|
|
3096
3136
|
|
|
3097
3137
|
// src/Components/SCMenu.tsx
|
|
3098
|
-
var
|
|
3138
|
+
var Muicon7 = __toESM(require("@mui/icons-material"), 1);
|
|
3099
3139
|
var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }) => {
|
|
3100
3140
|
const { height, width } = useWindowDimensions();
|
|
3101
3141
|
const menuSize = widthMenu ? parseInt(widthMenu) : 284;
|
|
3102
3142
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
3103
3143
|
const widthContainer = menuSize + pageSize;
|
|
3104
3144
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
3105
|
-
const [selectedIndex, setSelectedIndex] =
|
|
3106
|
-
const [value, setValue] =
|
|
3107
|
-
|
|
3145
|
+
const [selectedIndex, setSelectedIndex] = import_react28.default.useState("1");
|
|
3146
|
+
const [value, setValue] = import_react28.default.useState("1");
|
|
3147
|
+
import_react28.default.useEffect(() => {
|
|
3108
3148
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
3109
3149
|
}, [height]);
|
|
3110
|
-
|
|
3150
|
+
import_react28.default.useEffect(() => {
|
|
3111
3151
|
if (defaultOption) {
|
|
3112
3152
|
handleClickMenusItem(event, void 0);
|
|
3113
3153
|
}
|
|
@@ -3115,14 +3155,14 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
3115
3155
|
options.map(function(option, index, array) {
|
|
3116
3156
|
if (option == null ? void 0 : option.iconLeft) {
|
|
3117
3157
|
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
3118
|
-
option.iconLeft =
|
|
3158
|
+
option.iconLeft = Muicon7[option == null ? void 0 : option.iconLeft];
|
|
3119
3159
|
} else {
|
|
3120
3160
|
option;
|
|
3121
3161
|
}
|
|
3122
3162
|
}
|
|
3123
3163
|
if (option == null ? void 0 : option.iconRight) {
|
|
3124
3164
|
if ((option == null ? void 0 : option.iconRight.type) == void 0) {
|
|
3125
|
-
option.iconRight =
|
|
3165
|
+
option.iconRight = Muicon7[option == null ? void 0 : option.iconRight];
|
|
3126
3166
|
} else {
|
|
3127
3167
|
option;
|
|
3128
3168
|
}
|
|
@@ -3137,34 +3177,34 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
3137
3177
|
setValue(String(index + 1));
|
|
3138
3178
|
}
|
|
3139
3179
|
};
|
|
3140
|
-
return /* @__PURE__ */
|
|
3141
|
-
|
|
3180
|
+
return /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement(import_Grid27.default, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ import_react28.default.createElement(import_material17.Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ import_react28.default.createElement(import_material17.MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement(
|
|
3181
|
+
import_material17.MenuItem,
|
|
3142
3182
|
{
|
|
3143
3183
|
disabled: disable == true ? true : false,
|
|
3144
3184
|
key: index,
|
|
3145
3185
|
selected: String(index + 1) === selectedIndex,
|
|
3146
3186
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
3147
3187
|
},
|
|
3148
|
-
option.iconLeft ? /* @__PURE__ */
|
|
3149
|
-
/* @__PURE__ */
|
|
3150
|
-
), option.divider == true ? /* @__PURE__ */
|
|
3188
|
+
option.iconLeft ? /* @__PURE__ */ import_react28.default.createElement(import_material17.ListItemIcon, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react28.default.createElement(import_material17.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
3189
|
+
/* @__PURE__ */ import_react28.default.createElement(import_Grid27.default, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ import_react28.default.createElement(import_material17.Typography, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ import_react28.default.createElement(import_material17.ListItemIcon, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react28.default.createElement(import_material17.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
3190
|
+
), option.divider == true ? /* @__PURE__ */ import_react28.default.createElement(import_material17.Divider, null) : "")))), /* @__PURE__ */ import_react28.default.createElement(import_Grid27.default, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ import_react28.default.createElement(import_material17.Box, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ import_react28.default.createElement(import_material17.Typography, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
3151
3191
|
};
|
|
3152
3192
|
|
|
3153
3193
|
// src/Components/SCTabs.tsx
|
|
3154
|
-
var
|
|
3155
|
-
var
|
|
3194
|
+
var import_react29 = __toESM(require("react"), 1);
|
|
3195
|
+
var import_material18 = require("@mui/material");
|
|
3156
3196
|
var import_TabPanel = __toESM(require("@mui/lab/TabPanel"), 1);
|
|
3157
3197
|
var import_TabContext = __toESM(require("@mui/lab/TabContext"), 1);
|
|
3158
|
-
var
|
|
3198
|
+
var Muicon8 = __toESM(require("@mui/icons-material"), 1);
|
|
3159
3199
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
3160
|
-
const [toast, setToast] =
|
|
3200
|
+
const [toast, setToast] = import_react29.default.useState(null);
|
|
3161
3201
|
let i = 0;
|
|
3162
3202
|
let j = 0;
|
|
3163
3203
|
let k = 0;
|
|
3164
3204
|
let l = 0;
|
|
3165
3205
|
let validateTypeIcon = true;
|
|
3166
|
-
const [value, setValue] =
|
|
3167
|
-
(0,
|
|
3206
|
+
const [value, setValue] = import_react29.default.useState("1");
|
|
3207
|
+
(0, import_react29.useEffect)(() => {
|
|
3168
3208
|
if (defaultOption) {
|
|
3169
3209
|
handleChange(event, void 0);
|
|
3170
3210
|
}
|
|
@@ -3173,9 +3213,9 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
3173
3213
|
const optionsLength = options.length;
|
|
3174
3214
|
if (option == null ? void 0 : option.iconOrBadge) {
|
|
3175
3215
|
if (typeIcon == "icon") {
|
|
3176
|
-
if ((option == null ? void 0 : option.iconOrBadge) in
|
|
3216
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon8 == true) {
|
|
3177
3217
|
validateTypeIcon = true;
|
|
3178
|
-
option.iconOrBadge =
|
|
3218
|
+
option.iconOrBadge = Muicon8[option == null ? void 0 : option.iconOrBadge];
|
|
3179
3219
|
} else {
|
|
3180
3220
|
validateTypeIcon = false;
|
|
3181
3221
|
setTimeout(() => {
|
|
@@ -3189,7 +3229,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
3189
3229
|
return;
|
|
3190
3230
|
}
|
|
3191
3231
|
} else if (typeIcon == "badge") {
|
|
3192
|
-
if ((option == null ? void 0 : option.iconOrBadge) in
|
|
3232
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon8 == false) {
|
|
3193
3233
|
validateTypeIcon = true;
|
|
3194
3234
|
option;
|
|
3195
3235
|
} else {
|
|
@@ -3214,8 +3254,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
3214
3254
|
setValue(newValue);
|
|
3215
3255
|
}
|
|
3216
3256
|
};
|
|
3217
|
-
return /* @__PURE__ */
|
|
3218
|
-
|
|
3257
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react29.default.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ import_react29.default.createElement(import_material18.Box, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ import_react29.default.createElement(import_TabContext.default, { value }, /* @__PURE__ */ import_react29.default.createElement(
|
|
3258
|
+
import_material18.Tabs,
|
|
3219
3259
|
{
|
|
3220
3260
|
"data-testid": "tab-container",
|
|
3221
3261
|
value,
|
|
@@ -3228,8 +3268,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
3228
3268
|
orientation: orientation || "horizontal",
|
|
3229
3269
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
3230
3270
|
},
|
|
3231
|
-
options.map((option) => /* @__PURE__ */
|
|
3232
|
-
|
|
3271
|
+
options.map((option) => /* @__PURE__ */ import_react29.default.createElement(
|
|
3272
|
+
import_material18.Tab,
|
|
3233
3273
|
{
|
|
3234
3274
|
"data-testid": "tab-item",
|
|
3235
3275
|
value: String(i = i + 1),
|
|
@@ -3237,8 +3277,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
3237
3277
|
label: option.name || "",
|
|
3238
3278
|
disabled: option.disabled || false,
|
|
3239
3279
|
iconPosition: iconPosition || "end",
|
|
3240
|
-
icon: typeIcon == "badge" ? /* @__PURE__ */
|
|
3241
|
-
|
|
3280
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ import_react29.default.createElement(
|
|
3281
|
+
import_material18.Badge,
|
|
3242
3282
|
{
|
|
3243
3283
|
sx: {
|
|
3244
3284
|
width: "20px",
|
|
@@ -3252,29 +3292,29 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
3252
3292
|
badgeContent: option.iconOrBadge,
|
|
3253
3293
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
3254
3294
|
}
|
|
3255
|
-
) : typeIcon == "icon" ? /* @__PURE__ */
|
|
3295
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ import_react29.default.createElement(import_material18.SvgIcon, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
3256
3296
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
3257
3297
|
}
|
|
3258
3298
|
))
|
|
3259
|
-
), children, options.map((option) => /* @__PURE__ */
|
|
3299
|
+
), children, options.map((option) => /* @__PURE__ */ import_react29.default.createElement(
|
|
3260
3300
|
import_TabPanel.default,
|
|
3261
3301
|
{
|
|
3262
3302
|
key: k = k + 1,
|
|
3263
3303
|
value: String(l = l + 1),
|
|
3264
3304
|
sx: { padding: "16px" }
|
|
3265
3305
|
},
|
|
3266
|
-
option.page ? option.page : /* @__PURE__ */
|
|
3267
|
-
)))) : /* @__PURE__ */
|
|
3306
|
+
option.page ? option.page : /* @__PURE__ */ import_react29.default.createElement(import_material18.Typography, null, "No se ha configurado el componente a visualizar ")
|
|
3307
|
+
)))) : /* @__PURE__ */ import_react29.default.createElement(import_material18.Box, { sx: { height: "200px" } }, toast && /* @__PURE__ */ import_react29.default.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
3268
3308
|
};
|
|
3269
3309
|
|
|
3270
3310
|
// src/Components/Calendario/Calendar.tsx
|
|
3271
|
-
var
|
|
3272
|
-
var
|
|
3311
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
3312
|
+
var import_material24 = require("@mui/material");
|
|
3273
3313
|
|
|
3274
3314
|
// src/Components/Calendario/CalendarToolbar.tsx
|
|
3275
|
-
var
|
|
3315
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
3276
3316
|
var import_icons_material11 = require("@mui/icons-material");
|
|
3277
|
-
var
|
|
3317
|
+
var import_material19 = require("@mui/material");
|
|
3278
3318
|
var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
3279
3319
|
var import_updateLocale = __toESM(require("dayjs/plugin/updateLocale"), 1);
|
|
3280
3320
|
var import_es2 = require("dayjs/locale/es");
|
|
@@ -3291,7 +3331,7 @@ var CalendarToolbar = ({
|
|
|
3291
3331
|
onNavigate,
|
|
3292
3332
|
children
|
|
3293
3333
|
}) => {
|
|
3294
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
3334
|
+
const [anchorEl, setAnchorEl] = (0, import_react30.useState)(null);
|
|
3295
3335
|
const open = Boolean(anchorEl);
|
|
3296
3336
|
const handleMenuOpen = (event2) => {
|
|
3297
3337
|
setAnchorEl(event2.currentTarget);
|
|
@@ -3314,16 +3354,16 @@ var CalendarToolbar = ({
|
|
|
3314
3354
|
}
|
|
3315
3355
|
return labelDate.format(" DD MMMM YYYY");
|
|
3316
3356
|
};
|
|
3317
|
-
return /* @__PURE__ */
|
|
3318
|
-
|
|
3357
|
+
return /* @__PURE__ */ import_react30.default.createElement(import_material19.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 0.5, px: 1, py: 0.5 }, /* @__PURE__ */ import_react30.default.createElement(import_material19.Box, null, /* @__PURE__ */ import_react30.default.createElement(
|
|
3358
|
+
import_material19.Chip,
|
|
3319
3359
|
{
|
|
3320
3360
|
label: "Hoy",
|
|
3321
|
-
icon: /* @__PURE__ */
|
|
3361
|
+
icon: /* @__PURE__ */ import_react30.default.createElement(import_icons_material11.LightModeOutlined, { fontSize: "small" }),
|
|
3322
3362
|
color: "primary",
|
|
3323
3363
|
onClick: () => onNavigate("TODAY")
|
|
3324
3364
|
}
|
|
3325
|
-
)), /* @__PURE__ */
|
|
3326
|
-
|
|
3365
|
+
)), /* @__PURE__ */ import_react30.default.createElement(import_material19.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ import_react30.default.createElement(import_material19.IconButton, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ import_react30.default.createElement(import_icons_material11.ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ import_react30.default.createElement(import_material19.IconButton, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ import_react30.default.createElement(import_icons_material11.ChevronRight, { fontSize: "small" })), /* @__PURE__ */ import_react30.default.createElement(import_material19.Typography, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ import_react30.default.createElement(import_material19.IconButton, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ import_react30.default.createElement(import_icons_material11.KeyboardArrowDown, { fontSize: "small" })), /* @__PURE__ */ import_react30.default.createElement(
|
|
3366
|
+
import_material19.Menu,
|
|
3327
3367
|
{
|
|
3328
3368
|
anchorEl,
|
|
3329
3369
|
open,
|
|
@@ -3331,15 +3371,15 @@ var CalendarToolbar = ({
|
|
|
3331
3371
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3332
3372
|
transformOrigin: { vertical: "top", horizontal: "center" }
|
|
3333
3373
|
},
|
|
3334
|
-
/* @__PURE__ */
|
|
3335
|
-
/* @__PURE__ */
|
|
3336
|
-
/* @__PURE__ */
|
|
3337
|
-
)), children ? /* @__PURE__ */
|
|
3374
|
+
/* @__PURE__ */ import_react30.default.createElement(import_material19.MenuItem, { onClick: () => handleViewChange("month") }, "Mes"),
|
|
3375
|
+
/* @__PURE__ */ import_react30.default.createElement(import_material19.MenuItem, { onClick: () => handleViewChange("week") }, "Semana"),
|
|
3376
|
+
/* @__PURE__ */ import_react30.default.createElement(import_material19.MenuItem, { onClick: () => handleViewChange("day") }, "D\xEDa")
|
|
3377
|
+
)), children ? /* @__PURE__ */ import_react30.default.createElement(import_material19.Box, null, children) : /* @__PURE__ */ import_react30.default.createElement(import_material19.Box, { width: "24px" }), " ");
|
|
3338
3378
|
};
|
|
3339
3379
|
|
|
3340
3380
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
3341
|
-
var
|
|
3342
|
-
var
|
|
3381
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
3382
|
+
var import_material21 = require("@mui/material");
|
|
3343
3383
|
var import_Add = __toESM(require("@mui/icons-material/Add"), 1);
|
|
3344
3384
|
var import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
3345
3385
|
var import_localeData = __toESM(require("dayjs/plugin/localeData"), 1);
|
|
@@ -3371,10 +3411,10 @@ var stateColors = {
|
|
|
3371
3411
|
};
|
|
3372
3412
|
|
|
3373
3413
|
// src/Components/Calendario/Event.tsx
|
|
3374
|
-
var
|
|
3375
|
-
var
|
|
3414
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
3415
|
+
var import_material20 = require("@mui/material");
|
|
3376
3416
|
var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
3377
|
-
const [anchorEl, setAnchorEl] =
|
|
3417
|
+
const [anchorEl, setAnchorEl] = import_react31.default.useState(null);
|
|
3378
3418
|
const handlePopoverOpen = (event3) => {
|
|
3379
3419
|
setAnchorEl(event3.currentTarget);
|
|
3380
3420
|
};
|
|
@@ -3382,8 +3422,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3382
3422
|
setAnchorEl(null);
|
|
3383
3423
|
};
|
|
3384
3424
|
const open = Boolean(anchorEl);
|
|
3385
|
-
return /* @__PURE__ */
|
|
3386
|
-
|
|
3425
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
|
3426
|
+
import_material20.Stack,
|
|
3387
3427
|
{
|
|
3388
3428
|
direction: "row",
|
|
3389
3429
|
padding: 0.5,
|
|
@@ -3403,8 +3443,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3403
3443
|
cursor: onClick ? "pointer" : "default"
|
|
3404
3444
|
}, sx)
|
|
3405
3445
|
},
|
|
3406
|
-
/* @__PURE__ */
|
|
3407
|
-
|
|
3446
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
3447
|
+
import_material20.Divider,
|
|
3408
3448
|
{
|
|
3409
3449
|
orientation: "vertical",
|
|
3410
3450
|
flexItem: true,
|
|
@@ -3415,8 +3455,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3415
3455
|
}
|
|
3416
3456
|
}
|
|
3417
3457
|
),
|
|
3418
|
-
/* @__PURE__ */
|
|
3419
|
-
|
|
3458
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
3459
|
+
import_material20.Box,
|
|
3420
3460
|
{
|
|
3421
3461
|
px: 1,
|
|
3422
3462
|
py: 0.5,
|
|
@@ -3425,8 +3465,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3425
3465
|
display: "flex",
|
|
3426
3466
|
alignItems: "center"
|
|
3427
3467
|
},
|
|
3428
|
-
/* @__PURE__ */
|
|
3429
|
-
|
|
3468
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
3469
|
+
import_material20.Typography,
|
|
3430
3470
|
{
|
|
3431
3471
|
color: "text.primary",
|
|
3432
3472
|
variant: "caption",
|
|
@@ -3441,8 +3481,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3441
3481
|
},
|
|
3442
3482
|
event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
|
|
3443
3483
|
),
|
|
3444
|
-
/* @__PURE__ */
|
|
3445
|
-
|
|
3484
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
3485
|
+
import_material20.Popover,
|
|
3446
3486
|
{
|
|
3447
3487
|
id: "mouse-over-popover",
|
|
3448
3488
|
sx: { pointerEvents: "none" },
|
|
@@ -3466,9 +3506,9 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3466
3506
|
};
|
|
3467
3507
|
|
|
3468
3508
|
// src/assets/LogoCalendario.tsx
|
|
3469
|
-
var
|
|
3509
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
3470
3510
|
var LogoCalendario = () => {
|
|
3471
|
-
return /* @__PURE__ */
|
|
3511
|
+
return /* @__PURE__ */ import_react32.default.createElement("svg", { width: "60", height: "61", viewBox: "0 0 60 61", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react32.default.createElement("g", { "clip-path": "url(#clip0_5353_24891)" }, /* @__PURE__ */ import_react32.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M40.7361 11.1589C39.7792 11.1589 39.0106 11.9722 39.0106 12.9661V15.4375H20.0309V12.9661C20.0309 11.964 19.2545 11.1589 18.3055 11.1589C17.3487 11.1589 16.5801 11.9722 16.5801 12.9661V15.4375H12.8819C12.0652 15.4375 11.4038 16.0918 11.4038 16.8998V20.6551C11.4038 21.463 12.0652 22.1174 12.8819 22.1174H46.8383C47.655 22.1174 48.3165 21.463 48.3165 20.6551V16.8998C48.3165 16.0918 47.655 15.4375 46.8383 15.4375H42.4615V12.9661C42.4615 11.964 41.6851 11.1589 40.7361 11.1589ZM19.4827 19.2049C19.6528 19.1343 19.7361 19.006 19.7724 18.8352C19.6916 18.9714 19.594 19.0957 19.4827 19.2049Z", fill: "#00BCD4" }), /* @__PURE__ */ import_react32.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.2037 25.8653C13.7579 25.8653 13.425 26.2168 13.425 26.6093V47.3669C13.425 47.7595 13.7579 48.1109 14.2037 48.1109H46.0004C46.4782 48.1109 46.8656 47.7236 46.8656 47.2458V26.6093C46.8656 26.2168 46.5327 25.8653 46.087 25.8653H14.2037ZM11.6948 26.6093C11.6948 25.2255 12.8384 24.135 14.2037 24.135H46.087C47.4522 24.135 48.5959 25.2255 48.5959 26.6093V47.2458C48.5959 48.6792 47.4339 49.8412 46.0004 49.8412H14.2037C12.8384 49.8412 11.6948 48.7508 11.6948 47.3669V26.6093Z", fill: "#6392BD" }), /* @__PURE__ */ import_react32.default.createElement("path", { d: "M19.481 30.9138C19.481 30.5164 20.1155 30.1903 20.9058 30.1903C21.6894 30.1903 22.3305 30.5131 22.3305 30.9138V32.8862C22.3305 33.2836 21.6894 33.6097 20.9058 33.6097C20.1222 33.6097 19.481 33.2869 19.481 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ import_react32.default.createElement("path", { d: "M30.0242 30.1903C29.2339 30.1903 28.5995 30.5164 28.5995 30.9138V32.8862C28.5995 33.2869 29.2406 33.6097 30.0242 33.6097C30.8079 33.6097 31.449 33.2836 31.449 32.8862V30.9138C31.449 30.5131 30.8079 30.1903 30.0242 30.1903Z", fill: "#6392BD" }), /* @__PURE__ */ import_react32.default.createElement("path", { d: "M37.7179 30.9138C37.7179 30.5164 38.3524 30.1903 39.1427 30.1903C39.608 30.1903 40.022 30.3038 40.2825 30.4797C40.3515 30.5276 40.4116 30.5788 40.4561 30.6344C40.5274 30.7201 40.5675 30.8147 40.5675 30.9138V32.8862C40.5675 33.2836 39.9263 33.6097 39.1427 33.6097C38.3591 33.6097 37.7179 33.2869 37.7179 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ import_react32.default.createElement("path", { d: "M20.9058 39.8787C20.1155 39.8787 19.481 40.2048 19.481 40.6022V42.5746C19.481 42.687 19.5322 42.7927 19.6213 42.8874C19.7036 42.9731 19.8172 43.0499 19.9552 43.1122C20.2068 43.228 20.5407 43.2981 20.9058 43.2981C21.6894 43.2981 22.3305 42.972 22.3305 42.5746V40.6022C22.3305 40.2015 21.6894 39.8787 20.9058 39.8787Z", fill: "#6392BD" }), /* @__PURE__ */ import_react32.default.createElement("path", { d: "M29.524 39.9477C29.7087 39.9032 29.9158 39.8787 30.1339 39.8787C30.9176 39.8787 31.5587 40.2015 31.5587 40.6022V42.5746C31.5587 42.972 30.9176 43.2981 30.1339 43.2981C29.3503 43.2981 28.7092 42.9753 28.7092 42.5746V40.6022C28.7092 40.315 29.0409 40.0646 29.524 39.9477Z", fill: "#6392BD" }), /* @__PURE__ */ import_react32.default.createElement("path", { d: "M38.5141 39.9482C38.6989 39.9037 38.9059 39.8792 39.1241 39.8792C39.9077 39.8792 40.5488 40.202 40.5488 40.6027V42.5751C40.5488 42.9725 39.9077 43.2986 39.1241 43.2986C38.3405 43.2986 37.6993 42.9758 37.6993 42.5751V40.6027C37.6993 40.3155 38.031 40.0651 38.5141 39.9482Z", fill: "#6392BD" })), /* @__PURE__ */ import_react32.default.createElement("defs", null, /* @__PURE__ */ import_react32.default.createElement("clipPath", { id: "clip0_5353_24891" }, /* @__PURE__ */ import_react32.default.createElement("rect", { width: "60", height: "60", fill: "white", transform: "translate(0 0.5)" }))));
|
|
3472
3512
|
};
|
|
3473
3513
|
|
|
3474
3514
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
@@ -3478,23 +3518,23 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3478
3518
|
const noEvents = events.length === 0;
|
|
3479
3519
|
const days = getMonthDays(currentDate);
|
|
3480
3520
|
const weekDays = Array.from({ length: 7 }, (_, i) => (0, import_dayjs4.default)().day(i));
|
|
3481
|
-
const [openDrawer, setOpenDrawer] =
|
|
3482
|
-
const [selectedDay, setSelectedDay] =
|
|
3483
|
-
const [selectedEvents, setSelectedEvents] =
|
|
3484
|
-
return /* @__PURE__ */
|
|
3521
|
+
const [openDrawer, setOpenDrawer] = import_react33.default.useState(false);
|
|
3522
|
+
const [selectedDay, setSelectedDay] = import_react33.default.useState(null);
|
|
3523
|
+
const [selectedEvents, setSelectedEvents] = import_react33.default.useState([]);
|
|
3524
|
+
return /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { minWidth: "1050px" }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react33.default.createElement(import_material21.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react33.default.createElement(
|
|
3485
3525
|
EmptyState,
|
|
3486
3526
|
{
|
|
3487
3527
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3488
3528
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3489
|
-
icon: /* @__PURE__ */
|
|
3529
|
+
icon: /* @__PURE__ */ import_react33.default.createElement(LogoCalendario, null)
|
|
3490
3530
|
}
|
|
3491
|
-
) : /* @__PURE__ */
|
|
3531
|
+
) : /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5 }, days.map((day) => {
|
|
3492
3532
|
const dayEvents = events.filter(
|
|
3493
3533
|
(e) => day.isBetween(e.start.startOf("day"), e.end.endOf("day"), null, "[]")
|
|
3494
3534
|
);
|
|
3495
3535
|
const isCurrentMonth = day.month() === currentDate.month();
|
|
3496
|
-
return /* @__PURE__ */
|
|
3497
|
-
|
|
3536
|
+
return /* @__PURE__ */ import_react33.default.createElement(
|
|
3537
|
+
import_material21.Paper,
|
|
3498
3538
|
{
|
|
3499
3539
|
key: day.toString(),
|
|
3500
3540
|
onClick: () => onDayClick == null ? void 0 : onDayClick(day),
|
|
@@ -3510,8 +3550,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3510
3550
|
overflow: "hidden"
|
|
3511
3551
|
}
|
|
3512
3552
|
},
|
|
3513
|
-
/* @__PURE__ */
|
|
3514
|
-
|
|
3553
|
+
/* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { p: 1, flexShrink: 0 }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "flex-start" }, /* @__PURE__ */ import_react33.default.createElement(
|
|
3554
|
+
import_material21.Box,
|
|
3515
3555
|
{
|
|
3516
3556
|
sx: {
|
|
3517
3557
|
width: 24,
|
|
@@ -3523,16 +3563,16 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3523
3563
|
justifyContent: "center"
|
|
3524
3564
|
}
|
|
3525
3565
|
},
|
|
3526
|
-
/* @__PURE__ */
|
|
3527
|
-
|
|
3566
|
+
/* @__PURE__ */ import_react33.default.createElement(
|
|
3567
|
+
import_material21.Typography,
|
|
3528
3568
|
{
|
|
3529
3569
|
variant: "body2",
|
|
3530
3570
|
sx: { color: isToday(day) ? "white" : "text.secondary" }
|
|
3531
3571
|
},
|
|
3532
3572
|
day.date()
|
|
3533
3573
|
)
|
|
3534
|
-
), dayEvents.length > 2 && /* @__PURE__ */
|
|
3535
|
-
|
|
3574
|
+
), dayEvents.length > 2 && /* @__PURE__ */ import_react33.default.createElement(import_material21.Tooltip, { title: "M\xE1s eventos" }, /* @__PURE__ */ import_react33.default.createElement(
|
|
3575
|
+
import_material21.IconButton,
|
|
3536
3576
|
{
|
|
3537
3577
|
color: "primary",
|
|
3538
3578
|
size: "small",
|
|
@@ -3543,9 +3583,9 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3543
3583
|
setSelectedEvents(dayEvents);
|
|
3544
3584
|
}
|
|
3545
3585
|
},
|
|
3546
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ import_react33.default.createElement(import_Add.default, { fontSize: "small" })
|
|
3547
3587
|
)))),
|
|
3548
|
-
/* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", flexDirection: "column", gap: 0.5, p: 1, pt: 0, overflow: "hidden" }, dayEvents.slice(0, 2).map((event2) => /* @__PURE__ */ import_react33.default.createElement(
|
|
3549
3589
|
CalendarEventCard,
|
|
3550
3590
|
{
|
|
3551
3591
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3555,8 +3595,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3555
3595
|
onHover: onEventHover
|
|
3556
3596
|
}
|
|
3557
3597
|
))),
|
|
3558
|
-
dayEvents.length > 2 && /* @__PURE__ */
|
|
3559
|
-
|
|
3598
|
+
dayEvents.length > 2 && /* @__PURE__ */ import_react33.default.createElement(
|
|
3599
|
+
import_material21.Stack,
|
|
3560
3600
|
{
|
|
3561
3601
|
justifyItems: "center",
|
|
3562
3602
|
px: 1,
|
|
@@ -3564,7 +3604,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3564
3604
|
onClick: (e) => e.stopPropagation(),
|
|
3565
3605
|
sx: { "& .MuiButtonBase-root": { width: "100%" } }
|
|
3566
3606
|
},
|
|
3567
|
-
/* @__PURE__ */
|
|
3607
|
+
/* @__PURE__ */ import_react33.default.createElement(
|
|
3568
3608
|
SCDrawer,
|
|
3569
3609
|
{
|
|
3570
3610
|
width: "350px",
|
|
@@ -3576,7 +3616,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3576
3616
|
arrayElements: [{
|
|
3577
3617
|
component: (() => {
|
|
3578
3618
|
const [first, ...rest] = dayEvents;
|
|
3579
|
-
return /* @__PURE__ */
|
|
3619
|
+
return /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Typography, { width: "100%", color: "text.secondary" }, " Proximo evento "), first && /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ import_react33.default.createElement(
|
|
3580
3620
|
CalendarEventCard,
|
|
3581
3621
|
{
|
|
3582
3622
|
event: first,
|
|
@@ -3592,8 +3632,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3592
3632
|
}
|
|
3593
3633
|
}
|
|
3594
3634
|
}
|
|
3595
|
-
)), /* @__PURE__ */
|
|
3596
|
-
|
|
3635
|
+
)), /* @__PURE__ */ import_react33.default.createElement(import_material21.Divider, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ import_react33.default.createElement(import_material21.Typography, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ import_react33.default.createElement(
|
|
3636
|
+
import_material21.Box,
|
|
3597
3637
|
{
|
|
3598
3638
|
width: "100%",
|
|
3599
3639
|
height: "100%",
|
|
@@ -3605,7 +3645,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3605
3645
|
flexDirection: "column",
|
|
3606
3646
|
gap: 1.5
|
|
3607
3647
|
},
|
|
3608
|
-
rest.map((event2) => /* @__PURE__ */
|
|
3648
|
+
rest.map((event2) => /* @__PURE__ */ import_react33.default.createElement(
|
|
3609
3649
|
CalendarEventCard,
|
|
3610
3650
|
{
|
|
3611
3651
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3634,8 +3674,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3634
3674
|
};
|
|
3635
3675
|
|
|
3636
3676
|
// src/Components/Calendario/Views/WeekView.tsx
|
|
3637
|
-
var
|
|
3638
|
-
var
|
|
3677
|
+
var import_react34 = __toESM(require("react"), 1);
|
|
3678
|
+
var import_material22 = require("@mui/material");
|
|
3639
3679
|
var import_dayjs5 = __toESM(require("dayjs"), 1);
|
|
3640
3680
|
var import_localeData2 = __toESM(require("dayjs/plugin/localeData"), 1);
|
|
3641
3681
|
import_dayjs5.default.extend(import_localeData2.default);
|
|
@@ -3651,8 +3691,8 @@ var WeekView = ({
|
|
|
3651
3691
|
}) => {
|
|
3652
3692
|
const noEvents = events.length === 0;
|
|
3653
3693
|
const todayString = (0, import_dayjs5.default)().format("YYYY-MM-DD");
|
|
3654
|
-
const
|
|
3655
|
-
const days = Array.from({ length: 7 }, (_, i) =>
|
|
3694
|
+
const startOfWeek3 = currentDate.startOf("week");
|
|
3695
|
+
const days = Array.from({ length: 7 }, (_, i) => startOfWeek3.add(i, "day"));
|
|
3656
3696
|
const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
|
|
3657
3697
|
const getCellBorderType = (cellHour, dayEvents) => {
|
|
3658
3698
|
for (const event2 of dayEvents) {
|
|
@@ -3669,10 +3709,10 @@ var WeekView = ({
|
|
|
3669
3709
|
}
|
|
3670
3710
|
return "none";
|
|
3671
3711
|
};
|
|
3672
|
-
return /* @__PURE__ */
|
|
3712
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", bgcolor: "transparent" }, /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { width: 45, bgcolor: "transparent" }), days.map((day) => {
|
|
3673
3713
|
const isToday2 = day.format("YYYY-MM-DD") === todayString;
|
|
3674
|
-
return /* @__PURE__ */
|
|
3675
|
-
|
|
3714
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
3715
|
+
import_material22.Box,
|
|
3676
3716
|
{
|
|
3677
3717
|
key: day.toString(),
|
|
3678
3718
|
height: 40,
|
|
@@ -3688,20 +3728,20 @@ var WeekView = ({
|
|
|
3688
3728
|
borderBottom: isToday2 ? 2 : 0,
|
|
3689
3729
|
borderColor: isToday2 ? "primary.main" : "transparent"
|
|
3690
3730
|
},
|
|
3691
|
-
/* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */
|
|
3731
|
+
/* @__PURE__ */ import_react34.default.createElement(import_material22.Typography, { variant: "h6", color: "text.primary" }, day.format("D")),
|
|
3732
|
+
/* @__PURE__ */ import_react34.default.createElement(import_material22.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
|
|
3693
3733
|
);
|
|
3694
|
-
})), isLoading ? /* @__PURE__ */
|
|
3734
|
+
})), isLoading ? /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react34.default.createElement(import_material22.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react34.default.createElement(
|
|
3695
3735
|
EmptyState,
|
|
3696
3736
|
{
|
|
3697
3737
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3698
3738
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3699
|
-
icon: /* @__PURE__ */
|
|
3739
|
+
icon: /* @__PURE__ */ import_react34.default.createElement(LogoCalendario, null)
|
|
3700
3740
|
}
|
|
3701
3741
|
) : (
|
|
3702
3742
|
// Grid de horas y eventos
|
|
3703
|
-
/* @__PURE__ */
|
|
3704
|
-
|
|
3743
|
+
/* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", flex: 1 }, /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { width: 45, bgcolor: "transparent" }, hours.map((h) => /* @__PURE__ */ import_react34.default.createElement(
|
|
3744
|
+
import_material22.Box,
|
|
3705
3745
|
{
|
|
3706
3746
|
key: h,
|
|
3707
3747
|
height: 60,
|
|
@@ -3709,7 +3749,7 @@ var WeekView = ({
|
|
|
3709
3749
|
pr: 1,
|
|
3710
3750
|
borderColor: "divider"
|
|
3711
3751
|
},
|
|
3712
|
-
/* @__PURE__ */
|
|
3752
|
+
/* @__PURE__ */ import_react34.default.createElement(import_material22.Typography, { variant: "caption", color: "text.secondary" }, (0, import_dayjs5.default)().hour(h).format("h A"))
|
|
3713
3753
|
))), days.map((day) => {
|
|
3714
3754
|
const dayEvents = events.filter(
|
|
3715
3755
|
(event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
@@ -3718,8 +3758,8 @@ var WeekView = ({
|
|
|
3718
3758
|
const endsInRange = event2.end.hour() >= startHour && event2.end.hour() <= endHour;
|
|
3719
3759
|
return startsInRange || endsInRange;
|
|
3720
3760
|
}).sort((a, b) => a.start.valueOf() - b.start.valueOf());
|
|
3721
|
-
return /* @__PURE__ */
|
|
3722
|
-
|
|
3761
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
3762
|
+
import_material22.Box,
|
|
3723
3763
|
{
|
|
3724
3764
|
key: day.toString(),
|
|
3725
3765
|
flex: 1,
|
|
@@ -3731,8 +3771,8 @@ var WeekView = ({
|
|
|
3731
3771
|
},
|
|
3732
3772
|
hours.map((hourIdx) => {
|
|
3733
3773
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3734
|
-
return /* @__PURE__ */
|
|
3735
|
-
|
|
3774
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
3775
|
+
import_material22.Box,
|
|
3736
3776
|
{
|
|
3737
3777
|
key: hourIdx,
|
|
3738
3778
|
height: 60,
|
|
@@ -3747,7 +3787,7 @@ var WeekView = ({
|
|
|
3747
3787
|
const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(endHour).minute(59);
|
|
3748
3788
|
const startMinutes = (eventStart.hour() - startHour) * 60 + eventStart.minute();
|
|
3749
3789
|
const durationMinutes = eventEnd.diff(eventStart, "minute");
|
|
3750
|
-
return /* @__PURE__ */
|
|
3790
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
3751
3791
|
CalendarEventCard,
|
|
3752
3792
|
{
|
|
3753
3793
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3772,8 +3812,8 @@ var WeekView = ({
|
|
|
3772
3812
|
};
|
|
3773
3813
|
|
|
3774
3814
|
// src/Components/Calendario/Views/DayView.tsx
|
|
3775
|
-
var
|
|
3776
|
-
var
|
|
3815
|
+
var import_react35 = __toESM(require("react"), 1);
|
|
3816
|
+
var import_material23 = require("@mui/material");
|
|
3777
3817
|
var import_dayjs6 = __toESM(require("dayjs"), 1);
|
|
3778
3818
|
var DayView = ({
|
|
3779
3819
|
events,
|
|
@@ -3804,15 +3844,15 @@ var DayView = ({
|
|
|
3804
3844
|
(event2) => currentDate.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
3805
3845
|
);
|
|
3806
3846
|
const noEvents = events.length === 0;
|
|
3807
|
-
return /* @__PURE__ */
|
|
3847
|
+
return /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { width: 47, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ import_react35.default.createElement(import_material23.Typography, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ import_react35.default.createElement(import_material23.Typography, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react35.default.createElement(import_material23.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ import_react35.default.createElement(
|
|
3808
3848
|
EmptyState,
|
|
3809
3849
|
{
|
|
3810
3850
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3811
3851
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3812
|
-
icon: /* @__PURE__ */
|
|
3852
|
+
icon: /* @__PURE__ */ import_react35.default.createElement(LogoCalendario, null)
|
|
3813
3853
|
}
|
|
3814
|
-
) : /* @__PURE__ */
|
|
3815
|
-
|
|
3854
|
+
) : /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { display: "flex", flex: 1 }, /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { width: 47, bgcolor: "background.default" }, hours.map((h) => /* @__PURE__ */ import_react35.default.createElement(
|
|
3855
|
+
import_material23.Box,
|
|
3816
3856
|
{
|
|
3817
3857
|
key: h,
|
|
3818
3858
|
height: 60,
|
|
@@ -3822,11 +3862,11 @@ var DayView = ({
|
|
|
3822
3862
|
borderRight: "1px solid",
|
|
3823
3863
|
borderColor: "divider"
|
|
3824
3864
|
},
|
|
3825
|
-
/* @__PURE__ */
|
|
3826
|
-
))), /* @__PURE__ */
|
|
3865
|
+
/* @__PURE__ */ import_react35.default.createElement(import_material23.Typography, { variant: "caption", color: "text.secondary" }, (0, import_dayjs6.default)().hour(h).format("h A"))
|
|
3866
|
+
))), /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
|
|
3827
3867
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3828
|
-
return /* @__PURE__ */
|
|
3829
|
-
|
|
3868
|
+
return /* @__PURE__ */ import_react35.default.createElement(
|
|
3869
|
+
import_material23.Box,
|
|
3830
3870
|
{
|
|
3831
3871
|
key: hourIdx,
|
|
3832
3872
|
height: 60,
|
|
@@ -3844,7 +3884,7 @@ var DayView = ({
|
|
|
3844
3884
|
const clampedEnd = eventEnd.isAfter(maxEnd) ? maxEnd : eventEnd;
|
|
3845
3885
|
const startMinutes = (clampedStart.hour() - startHour) * 60 + clampedStart.minute();
|
|
3846
3886
|
const durationMinutes = clampedEnd.diff(clampedStart, "minute");
|
|
3847
|
-
return /* @__PURE__ */
|
|
3887
|
+
return /* @__PURE__ */ import_react35.default.createElement(
|
|
3848
3888
|
CalendarEventCard,
|
|
3849
3889
|
{
|
|
3850
3890
|
key: `${event2.id}-${currentDate.toString()}`,
|
|
@@ -3872,6 +3912,7 @@ var Calendar = ({
|
|
|
3872
3912
|
onMoreClick,
|
|
3873
3913
|
onEventClick,
|
|
3874
3914
|
onEventHover,
|
|
3915
|
+
onDateChange,
|
|
3875
3916
|
view: initialView = "month",
|
|
3876
3917
|
onViewChange,
|
|
3877
3918
|
toolbar,
|
|
@@ -3880,8 +3921,11 @@ var Calendar = ({
|
|
|
3880
3921
|
// <- valor por defecto
|
|
3881
3922
|
endHour = 23
|
|
3882
3923
|
}) => {
|
|
3883
|
-
const [view, setView] = (0,
|
|
3884
|
-
const [currentDate, setCurrentDate] = (0,
|
|
3924
|
+
const [view, setView] = (0, import_react36.useState)(initialView);
|
|
3925
|
+
const [currentDate, setCurrentDate] = (0, import_react36.useState)((0, import_dayjs7.default)());
|
|
3926
|
+
(0, import_react36.useEffect)(() => {
|
|
3927
|
+
onDateChange == null ? void 0 : onDateChange(currentDate);
|
|
3928
|
+
}, []);
|
|
3885
3929
|
const handleViewChange = (newView) => {
|
|
3886
3930
|
setView(newView);
|
|
3887
3931
|
onViewChange == null ? void 0 : onViewChange(newView);
|
|
@@ -3899,8 +3943,9 @@ var Calendar = ({
|
|
|
3899
3943
|
if (view === "month") newDate = currentDate.add(1, "month");
|
|
3900
3944
|
} else if (action === "TODAY") newDate = (0, import_dayjs7.default)();
|
|
3901
3945
|
setCurrentDate(newDate);
|
|
3946
|
+
onDateChange == null ? void 0 : onDateChange(newDate);
|
|
3902
3947
|
};
|
|
3903
|
-
return /* @__PURE__ */
|
|
3948
|
+
return /* @__PURE__ */ import_react36.default.createElement(import_material24.Box, null, /* @__PURE__ */ import_react36.default.createElement(
|
|
3904
3949
|
CalendarToolbar,
|
|
3905
3950
|
{
|
|
3906
3951
|
labelDate: currentDate,
|
|
@@ -3909,16 +3954,16 @@ var Calendar = ({
|
|
|
3909
3954
|
onNavigate: handleNavigate
|
|
3910
3955
|
},
|
|
3911
3956
|
toolbar
|
|
3912
|
-
), isLoading ? /* @__PURE__ */
|
|
3913
|
-
|
|
3957
|
+
), isLoading ? /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, /* @__PURE__ */ import_react36.default.createElement(import_material24.Box, null, /* @__PURE__ */ import_react36.default.createElement(
|
|
3958
|
+
import_material24.Box,
|
|
3914
3959
|
{
|
|
3915
3960
|
display: "flex",
|
|
3916
3961
|
justifyContent: "center",
|
|
3917
3962
|
alignItems: "center",
|
|
3918
3963
|
height: "400px"
|
|
3919
3964
|
},
|
|
3920
|
-
/* @__PURE__ */
|
|
3921
|
-
))) : /* @__PURE__ */
|
|
3965
|
+
/* @__PURE__ */ import_react36.default.createElement(import_material24.CircularProgress, { variant: "indeterminate" })
|
|
3966
|
+
))) : /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, view === "month" && /* @__PURE__ */ import_react36.default.createElement(
|
|
3922
3967
|
MonthView,
|
|
3923
3968
|
{
|
|
3924
3969
|
events,
|
|
@@ -3928,7 +3973,7 @@ var Calendar = ({
|
|
|
3928
3973
|
onEventClick,
|
|
3929
3974
|
onEventHover
|
|
3930
3975
|
}
|
|
3931
|
-
), view === "week" && /* @__PURE__ */
|
|
3976
|
+
), view === "week" && /* @__PURE__ */ import_react36.default.createElement(
|
|
3932
3977
|
WeekView,
|
|
3933
3978
|
{
|
|
3934
3979
|
events,
|
|
@@ -3940,7 +3985,7 @@ var Calendar = ({
|
|
|
3940
3985
|
startHour,
|
|
3941
3986
|
endHour
|
|
3942
3987
|
}
|
|
3943
|
-
), view === "day" && /* @__PURE__ */
|
|
3988
|
+
), view === "day" && /* @__PURE__ */ import_react36.default.createElement(
|
|
3944
3989
|
DayView,
|
|
3945
3990
|
{
|
|
3946
3991
|
events,
|
|
@@ -3954,8 +3999,8 @@ var Calendar = ({
|
|
|
3954
3999
|
};
|
|
3955
4000
|
|
|
3956
4001
|
// src/Components/SCTime.tsx
|
|
3957
|
-
var
|
|
3958
|
-
var
|
|
4002
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
4003
|
+
var import_material25 = require("@mui/material");
|
|
3959
4004
|
var import_LocalizationProvider3 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
3960
4005
|
var import_AdapterDayjs2 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
3961
4006
|
var import_dayjs8 = __toESM(require("dayjs"), 1);
|
|
@@ -3978,9 +4023,9 @@ var SCTime = ({
|
|
|
3978
4023
|
);
|
|
3979
4024
|
const isTimeEmpty = required && !state;
|
|
3980
4025
|
const hasError = isTimeEmpty;
|
|
3981
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
3982
|
-
const [isOpenPopover, setIsOpenPopover] = (0,
|
|
3983
|
-
const [popoverPlacement, setPopoverPlacement] = (0,
|
|
4026
|
+
const [anchorEl, setAnchorEl] = (0, import_react37.useState)(null);
|
|
4027
|
+
const [isOpenPopover, setIsOpenPopover] = (0, import_react37.useState)(false);
|
|
4028
|
+
const [popoverPlacement, setPopoverPlacement] = (0, import_react37.useState)("bottom");
|
|
3984
4029
|
const detectPlacement = (element) => {
|
|
3985
4030
|
const rect = element.getBoundingClientRect();
|
|
3986
4031
|
const windowHeight = window.innerHeight;
|
|
@@ -4011,7 +4056,7 @@ var SCTime = ({
|
|
|
4011
4056
|
setIsOpenPopover(false);
|
|
4012
4057
|
setAnchorEl(null);
|
|
4013
4058
|
};
|
|
4014
|
-
return /* @__PURE__ */
|
|
4059
|
+
return /* @__PURE__ */ import_react37.default.createElement(import_LocalizationProvider3.LocalizationProvider, { dateAdapter: import_AdapterDayjs2.AdapterDayjs }, /* @__PURE__ */ import_react37.default.createElement(import_material25.Box, { sx: { position: "relative", width: "120px" } }, /* @__PURE__ */ import_react37.default.createElement(
|
|
4015
4060
|
import_TimeField.TimeField,
|
|
4016
4061
|
{
|
|
4017
4062
|
label,
|
|
@@ -4023,7 +4068,7 @@ var SCTime = ({
|
|
|
4023
4068
|
slotProps: {
|
|
4024
4069
|
textField: {
|
|
4025
4070
|
InputProps: {
|
|
4026
|
-
endAdornment: /* @__PURE__ */
|
|
4071
|
+
endAdornment: /* @__PURE__ */ import_react37.default.createElement(import_material25.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react37.default.createElement(
|
|
4027
4072
|
import_AccessTime.default,
|
|
4028
4073
|
{
|
|
4029
4074
|
color: disabled ? "disabled" : "action",
|
|
@@ -4052,8 +4097,8 @@ var SCTime = ({
|
|
|
4052
4097
|
}
|
|
4053
4098
|
}
|
|
4054
4099
|
}
|
|
4055
|
-
), /* @__PURE__ */
|
|
4056
|
-
|
|
4100
|
+
), /* @__PURE__ */ import_react37.default.createElement(
|
|
4101
|
+
import_material25.Popover,
|
|
4057
4102
|
{
|
|
4058
4103
|
open: isOpenPopover,
|
|
4059
4104
|
anchorEl,
|
|
@@ -4080,7 +4125,7 @@ var SCTime = ({
|
|
|
4080
4125
|
}
|
|
4081
4126
|
}
|
|
4082
4127
|
},
|
|
4083
|
-
/* @__PURE__ */
|
|
4128
|
+
/* @__PURE__ */ import_react37.default.createElement(import_material25.ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ import_react37.default.createElement(import_material25.Box, { sx: { p: 0 } }, /* @__PURE__ */ import_react37.default.createElement(
|
|
4084
4129
|
import_DigitalClock.DigitalClock,
|
|
4085
4130
|
{
|
|
4086
4131
|
value: state,
|
|
@@ -4102,8 +4147,8 @@ var SCTime = ({
|
|
|
4102
4147
|
};
|
|
4103
4148
|
|
|
4104
4149
|
// src/Components/SCCard.tsx
|
|
4105
|
-
var
|
|
4106
|
-
var
|
|
4150
|
+
var import_react38 = __toESM(require("react"), 1);
|
|
4151
|
+
var import_material26 = require("@mui/material");
|
|
4107
4152
|
var import_IconButton = __toESM(require("@mui/material/IconButton"), 1);
|
|
4108
4153
|
var import_Card = __toESM(require("@mui/material/Card"), 1);
|
|
4109
4154
|
var import_CardHeader = __toESM(require("@mui/material/CardHeader"), 1);
|
|
@@ -4112,14 +4157,14 @@ var import_CardContent = __toESM(require("@mui/material/CardContent"), 1);
|
|
|
4112
4157
|
var import_CardActions = __toESM(require("@mui/material/CardActions"), 1);
|
|
4113
4158
|
var import_Collapse = __toESM(require("@mui/material/Collapse"), 1);
|
|
4114
4159
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"), 1);
|
|
4115
|
-
var
|
|
4160
|
+
var Muicon9 = __toESM(require("@mui/icons-material"), 1);
|
|
4116
4161
|
var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
4117
4162
|
let iconTitleValidation = "";
|
|
4118
4163
|
let IconTitle;
|
|
4119
|
-
const [expanded, setExpanded] =
|
|
4164
|
+
const [expanded, setExpanded] = import_react38.default.useState(false);
|
|
4120
4165
|
if (iconTitle) {
|
|
4121
|
-
if (
|
|
4122
|
-
if (iconTitle &&
|
|
4166
|
+
if (Muicon9[iconTitle] == void 0) {
|
|
4167
|
+
if (iconTitle && import_react38.default.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
4123
4168
|
iconTitleValidation = "image";
|
|
4124
4169
|
IconTitle = iconTitle;
|
|
4125
4170
|
} else {
|
|
@@ -4128,17 +4173,17 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
4128
4173
|
}
|
|
4129
4174
|
} else {
|
|
4130
4175
|
iconTitleValidation = "icon";
|
|
4131
|
-
IconTitle =
|
|
4176
|
+
IconTitle = Muicon9[iconTitle];
|
|
4132
4177
|
}
|
|
4133
4178
|
}
|
|
4134
4179
|
const handleExpandClick = () => {
|
|
4135
4180
|
setExpanded(!expanded);
|
|
4136
4181
|
};
|
|
4137
|
-
return /* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ import_react38.default.createElement(import_Card.default, { sx: { maxWidth: 345 } }, title && /* @__PURE__ */ import_react38.default.createElement(
|
|
4138
4183
|
import_CardHeader.default,
|
|
4139
4184
|
{
|
|
4140
|
-
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */
|
|
4141
|
-
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */
|
|
4185
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ import_react38.default.createElement(import_material26.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react38.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react38.default.createElement(import_material26.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
4186
|
+
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react38.default.createElement(import_material26.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react38.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ import_react38.default.createElement(import_ExpandMore.default, { fontSize: "small" })) : actionsTitle,
|
|
4142
4187
|
title,
|
|
4143
4188
|
subheader: subtitle,
|
|
4144
4189
|
sx: {
|
|
@@ -4157,15 +4202,15 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
4157
4202
|
}
|
|
4158
4203
|
}
|
|
4159
4204
|
}
|
|
4160
|
-
), image && /* @__PURE__ */
|
|
4205
|
+
), image && /* @__PURE__ */ import_react38.default.createElement(
|
|
4161
4206
|
import_CardMedia.default,
|
|
4162
4207
|
{
|
|
4163
4208
|
component: "img",
|
|
4164
4209
|
height: "194",
|
|
4165
4210
|
image
|
|
4166
4211
|
}
|
|
4167
|
-
), content && /* @__PURE__ */
|
|
4168
|
-
|
|
4212
|
+
), content && /* @__PURE__ */ import_react38.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ import_react38.default.createElement(import_CardActions.default, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react38.default.createElement(import_material26.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react38.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ import_react38.default.createElement(import_ExpandMore.default, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ import_react38.default.createElement(
|
|
4213
|
+
import_material26.Button,
|
|
4169
4214
|
{
|
|
4170
4215
|
key: index,
|
|
4171
4216
|
size: "small",
|
|
@@ -4175,14 +4220,150 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
4175
4220
|
disabled: action.disabled || false
|
|
4176
4221
|
},
|
|
4177
4222
|
action.text
|
|
4178
|
-
)) : ""), expand && /* @__PURE__ */
|
|
4223
|
+
)) : ""), expand && /* @__PURE__ */ import_react38.default.createElement(import_Collapse.default, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ import_react38.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
4224
|
+
};
|
|
4225
|
+
|
|
4226
|
+
// src/Components/SCActivityCalendar.tsx
|
|
4227
|
+
var import_react39 = __toESM(require("react"), 1);
|
|
4228
|
+
var import_material27 = require("@mui/material");
|
|
4229
|
+
var import_Grid28 = __toESM(require("@mui/material/Grid2"), 1);
|
|
4230
|
+
var import_AdapterDateFns2 = require("@mui/x-date-pickers/AdapterDateFns");
|
|
4231
|
+
var import_LocalizationProvider4 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
4232
|
+
var import_StaticDatePicker2 = require("@mui/x-date-pickers/StaticDatePicker");
|
|
4233
|
+
var import_locale2 = require("date-fns/locale");
|
|
4234
|
+
var import_date_fns2 = require("date-fns");
|
|
4235
|
+
var import_KeyboardDoubleArrowDown2 = __toESM(require("@mui/icons-material/KeyboardDoubleArrowDown"), 1);
|
|
4236
|
+
var import_KeyboardDoubleArrowUp2 = __toESM(require("@mui/icons-material/KeyboardDoubleArrowUp"), 1);
|
|
4237
|
+
var import_ArrowForward = __toESM(require("@mui/icons-material/ArrowForward"), 1);
|
|
4238
|
+
var import_LightModeOutlined = __toESM(require("@mui/icons-material/LightModeOutlined"), 1);
|
|
4239
|
+
var SCActivityCalendar = ({
|
|
4240
|
+
//informativas
|
|
4241
|
+
//apariencia
|
|
4242
|
+
background,
|
|
4243
|
+
//funcionales
|
|
4244
|
+
setState,
|
|
4245
|
+
state,
|
|
4246
|
+
events,
|
|
4247
|
+
fn,
|
|
4248
|
+
configRangeHour
|
|
4249
|
+
}) => {
|
|
4250
|
+
let convertFecha;
|
|
4251
|
+
const [fecha, setFecha] = (0, import_react39.useState)(/* @__PURE__ */ new Date());
|
|
4252
|
+
const [fechaSeleccionada, setFechaSeleccionada] = (0, import_react39.useState)();
|
|
4253
|
+
const [stateVal, setstateVal] = import_react39.default.useState(/* @__PURE__ */ new Date());
|
|
4254
|
+
const [openCalendar, setOpenCalendar] = import_react39.default.useState(false);
|
|
4255
|
+
const hoy = /* @__PURE__ */ new Date();
|
|
4256
|
+
const inicioSemana = (0, import_date_fns2.startOfWeek)(fecha, { weekStartsOn: 0 });
|
|
4257
|
+
const diasSemana = Array.from({ length: 7 }, (_, i) => (0, import_date_fns2.addDays)(inicioSemana, i));
|
|
4258
|
+
import_react39.default.useEffect(() => {
|
|
4259
|
+
if (fecha != null) {
|
|
4260
|
+
handleConvertFecha(fecha);
|
|
4261
|
+
}
|
|
4262
|
+
}, [fecha]);
|
|
4263
|
+
const handleConvertFecha = (fecha2) => {
|
|
4264
|
+
if (fecha2) {
|
|
4265
|
+
let day = (fecha2.getDate() < 10 ? "0" : "") + fecha2.getDate();
|
|
4266
|
+
let month = (fecha2.getMonth() + 1 < 10 ? "0" : "") + (fecha2.getMonth() + 1);
|
|
4267
|
+
let year = fecha2.getFullYear();
|
|
4268
|
+
convertFecha = day + "/" + month + "/" + year;
|
|
4269
|
+
setState(convertFecha);
|
|
4270
|
+
setFecha(fecha2);
|
|
4271
|
+
}
|
|
4272
|
+
};
|
|
4273
|
+
const toggleCalendar = (newOpen) => () => {
|
|
4274
|
+
setOpenCalendar(newOpen);
|
|
4275
|
+
};
|
|
4276
|
+
const locale = __spreadProps(__spreadValues({}, import_locale2.es), {
|
|
4277
|
+
options: {
|
|
4278
|
+
weekStartsOn: 0
|
|
4279
|
+
// 0 para domingo, 1 para lunes, etc.
|
|
4280
|
+
}
|
|
4281
|
+
});
|
|
4282
|
+
return /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, /* @__PURE__ */ import_react39.default.createElement(import_LocalizationProvider4.LocalizationProvider, { dateAdapter: import_AdapterDateFns2.AdapterDateFns, adapterLocale: import_locale2.es }, openCalendar == false ? /* @__PURE__ */ import_react39.default.createElement(import_material27.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react39.default.createElement(import_material27.Box, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ import_react39.default.createElement(import_Grid28.default, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ import_react39.default.createElement(import_Grid28.default, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ import_react39.default.createElement(import_material27.Box, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react39.default.createElement(import_material27.Typography, { sx: { fontSize: "12px !important", color: "#10184099" } }, (0, import_date_fns2.format)(dia, "EEEE", { locale: import_locale2.es }).charAt(0).toUpperCase())), /* @__PURE__ */ import_react39.default.createElement(
|
|
4283
|
+
import_material27.Box,
|
|
4284
|
+
{
|
|
4285
|
+
onClick: () => setFecha(dia),
|
|
4286
|
+
sx: {
|
|
4287
|
+
padding: "10px",
|
|
4288
|
+
textAlign: "center",
|
|
4289
|
+
backgroundColor: (0, import_date_fns2.isSameDay)(dia, fecha) ? "#2063a0" : "transparent",
|
|
4290
|
+
cursor: "pointer",
|
|
4291
|
+
borderRadius: "50%",
|
|
4292
|
+
//border: '1px solid lightgray',
|
|
4293
|
+
position: "relative"
|
|
4294
|
+
//width: '36px',
|
|
4295
|
+
//height: '36px',
|
|
4296
|
+
}
|
|
4297
|
+
},
|
|
4298
|
+
/* @__PURE__ */ import_react39.default.createElement(import_material27.Typography, { sx: { fontSize: "12px !important", color: (0, import_date_fns2.isSameDay)(dia, fecha) ? "white" : "#101840DE" } }, (0, import_date_fns2.format)(dia, "d"))
|
|
4299
|
+
)))), /* @__PURE__ */ import_react39.default.createElement(import_Grid28.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react39.default.createElement(import_material27.IconButton, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ import_react39.default.createElement(import_KeyboardDoubleArrowDown2.default, { color: "action" }))))) : /* @__PURE__ */ import_react39.default.createElement(import_material27.Box, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ import_react39.default.createElement(
|
|
4300
|
+
import_StaticDatePicker2.StaticDatePicker,
|
|
4301
|
+
{
|
|
4302
|
+
orientation: "landscape",
|
|
4303
|
+
openTo: "day",
|
|
4304
|
+
value: fecha,
|
|
4305
|
+
slotProps: { toolbar: { hidden: true }, actionBar: { actions: [] } },
|
|
4306
|
+
sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
|
|
4307
|
+
onChange: (newValue) => setFecha(newValue)
|
|
4308
|
+
}
|
|
4309
|
+
), /* @__PURE__ */ import_react39.default.createElement(import_Grid28.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react39.default.createElement(import_material27.IconButton, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ import_react39.default.createElement(import_KeyboardDoubleArrowUp2.default, { color: "action" }))))), /* @__PURE__ */ import_react39.default.createElement(import_material27.Box, { sx: { width: "100%", height: openCalendar ? "calc(91% - 300px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ import_react39.default.createElement(
|
|
4310
|
+
import_material27.Box,
|
|
4311
|
+
{
|
|
4312
|
+
key: dayIndex
|
|
4313
|
+
},
|
|
4314
|
+
/* @__PURE__ */ import_react39.default.createElement(import_Grid28.default, { container: true }, /* @__PURE__ */ import_react39.default.createElement(import_material27.Typography, { variant: "subtitle1", sx: { color: (0, import_date_fns2.isSameDay)(day, fecha) ? "info.dark" : "text.secondary" } }, day.toLocaleDateString("es-ES", {
|
|
4315
|
+
day: "numeric"
|
|
4316
|
+
}), " de ", day.toLocaleDateString("es-ES", {
|
|
4317
|
+
month: "short"
|
|
4318
|
+
}), ", ", day.toLocaleDateString("es-ES", {
|
|
4319
|
+
weekday: "long"
|
|
4320
|
+
}))),
|
|
4321
|
+
/* @__PURE__ */ import_react39.default.createElement(import_material27.Box, { sx: {
|
|
4322
|
+
display: "flex",
|
|
4323
|
+
flexDirection: "column"
|
|
4324
|
+
} }, (() => {
|
|
4325
|
+
const esDomingo = day.getDay() === 0;
|
|
4326
|
+
const eventosDelDia = events.filter(
|
|
4327
|
+
(event2) => new Date(event2.date).toDateString() === day.toDateString()
|
|
4328
|
+
);
|
|
4329
|
+
if (eventosDelDia.length > 0) {
|
|
4330
|
+
return eventosDelDia.map((event2, idx) => /* @__PURE__ */ import_react39.default.createElement(
|
|
4331
|
+
SCListContent,
|
|
4332
|
+
{
|
|
4333
|
+
key: idx,
|
|
4334
|
+
options: [{
|
|
4335
|
+
title: event2.description,
|
|
4336
|
+
subtitle: /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, configRangeHour && new Date(event2.date.replace("00:00:00", event2.startTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getHours() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getHours() && new Date(event2.date.replace("00:00:00", event2.startTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getMinutes() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, /* @__PURE__ */ import_react39.default.createElement(import_material27.Typography, null, "Todo el dia"), /* @__PURE__ */ import_react39.default.createElement(import_LightModeOutlined.default, { fontSize: "small" })) : /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, /* @__PURE__ */ import_react39.default.createElement(import_material27.Typography, null, new Date(event2.date.replace("00:00:00", event2.startTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })), /* @__PURE__ */ import_react39.default.createElement(import_ArrowForward.default, { fontSize: "small" }), /* @__PURE__ */ import_react39.default.createElement(import_material27.Typography, null, new Date(event2.date.replace("00:00:00", event2.finalTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })))),
|
|
4337
|
+
iconLeftColor: event2.state === "Finalizada" ? "success" : "action",
|
|
4338
|
+
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
4339
|
+
description: /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, event2.state === "Aplazada" || event2.state === "En progreso" || event2.state === "Auto asignada" ? /* @__PURE__ */ import_react39.default.createElement(import_react39.default.Fragment, null, /* @__PURE__ */ import_react39.default.createElement(import_material27.Badge, { variant: "dot", badgeContent: "", sx: { display: "flex", alignItems: "center", "& .MuiBadge-badge": { top: "50%", transform: "translateY(-50%)" }, color: "action" } }), /* @__PURE__ */ import_react39.default.createElement(import_material27.Typography, null, event2.state == "Auto asignada" ? "Adicional" : event2.state)) : null),
|
|
4340
|
+
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
4341
|
+
disable: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
4342
|
+
fn: fn ? () => fn(event2) : void 0
|
|
4343
|
+
}]
|
|
4344
|
+
}
|
|
4345
|
+
));
|
|
4346
|
+
} else {
|
|
4347
|
+
return /* @__PURE__ */ import_react39.default.createElement(
|
|
4348
|
+
SCListContent,
|
|
4349
|
+
{
|
|
4350
|
+
options: [{
|
|
4351
|
+
title: esDomingo == true ? "No disponible" : "No hay actividades asignadas",
|
|
4352
|
+
iconLeft: esDomingo == true ? "BlockOutlined" : "HandymanOutlined",
|
|
4353
|
+
disable: true
|
|
4354
|
+
}]
|
|
4355
|
+
}
|
|
4356
|
+
);
|
|
4357
|
+
}
|
|
4358
|
+
})())
|
|
4359
|
+
))));
|
|
4179
4360
|
};
|
|
4180
4361
|
|
|
4181
4362
|
// src/Theme/index.ts
|
|
4182
4363
|
var import_styles3 = require("@mui/material/styles");
|
|
4183
4364
|
|
|
4184
4365
|
// src/Theme/components.ts
|
|
4185
|
-
var
|
|
4366
|
+
var import_react40 = __toESM(require("react"), 1);
|
|
4186
4367
|
var import_icons_material12 = require("@mui/icons-material");
|
|
4187
4368
|
var components = {
|
|
4188
4369
|
MuiSelect: {
|
|
@@ -4880,10 +5061,10 @@ var components = {
|
|
|
4880
5061
|
MuiAlert: {
|
|
4881
5062
|
defaultProps: {
|
|
4882
5063
|
iconMapping: {
|
|
4883
|
-
success:
|
|
4884
|
-
error:
|
|
4885
|
-
warning:
|
|
4886
|
-
info:
|
|
5064
|
+
success: import_react40.default.createElement(import_icons_material12.CheckCircleRounded),
|
|
5065
|
+
error: import_react40.default.createElement(import_icons_material12.ErrorRounded),
|
|
5066
|
+
warning: import_react40.default.createElement(import_icons_material12.WarningRounded),
|
|
5067
|
+
info: import_react40.default.createElement(import_icons_material12.InfoRounded)
|
|
4887
5068
|
}
|
|
4888
5069
|
},
|
|
4889
5070
|
variants: [
|
|
@@ -5931,6 +6112,7 @@ var ADCSincoTheme = (0, import_styles3.createTheme)(__spreadValues({}, ADCTheme)
|
|
|
5931
6112
|
FooterAction,
|
|
5932
6113
|
MultiSelect,
|
|
5933
6114
|
PageHeader,
|
|
6115
|
+
SCActivityCalendar,
|
|
5934
6116
|
SCAutocomplete,
|
|
5935
6117
|
SCCalendarSwipeable,
|
|
5936
6118
|
SCCard,
|
|
@@ -5939,6 +6121,7 @@ var ADCSincoTheme = (0, import_styles3.createTheme)(__spreadValues({}, ADCTheme)
|
|
|
5939
6121
|
SCDateRange,
|
|
5940
6122
|
SCDialog,
|
|
5941
6123
|
SCDrawer,
|
|
6124
|
+
SCListContent,
|
|
5942
6125
|
SCMenu,
|
|
5943
6126
|
SCModal,
|
|
5944
6127
|
SCSelect,
|