@imj_media/tareas 1.1.13 → 1.2.0
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/packages/tareas/src/components/organisms/ButtonMoveTask.d.ts +2 -1
- package/dist/packages/tareas/src/constants/colors.d.ts +6 -0
- package/dist/packages/tareas/src/types/index.d.ts +1 -0
- package/dist/tareas.cjs +36 -1
- package/dist/tareas.css +1 -1
- package/dist/tareas.es.js +1429 -1179
- package/package.json +2 -2
package/dist/tareas.es.js
CHANGED
|
@@ -1,83 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, Fragment as R, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "@imj_media/imj-ui/styles.css";
|
|
3
|
-
import { useQuery as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { Icons as
|
|
6
|
-
import
|
|
3
|
+
import { useQuery as ut, useQueryClient as it, useMutation as wt, useInfiniteQuery as xt, QueryClient as ae, QueryClientProvider as re } from "@tanstack/react-query";
|
|
4
|
+
import { useState as f, useRef as V, useEffect as F, createContext as J, useContext as tt } from "react";
|
|
5
|
+
import { Icons as T, Tooltip as O, TooltipV2 as St } from "@imj_media/tasks-modules";
|
|
6
|
+
import pt from "react-dom";
|
|
7
7
|
import At from "axios";
|
|
8
|
-
import
|
|
9
|
-
import { parseISO as
|
|
10
|
-
import { es as
|
|
11
|
-
import { Button as
|
|
12
|
-
import { useForm as
|
|
8
|
+
import Mt from "qs";
|
|
9
|
+
import { parseISO as se, formatDistanceToNow as ne, format as Dt } from "date-fns";
|
|
10
|
+
import { es as ht } from "date-fns/locale";
|
|
11
|
+
import { Button as ft, Input as le, Label as oe, Accordion as ie, AccordionItem as ce, AccordionTrigger as we, AccordionContent as de, Select as ue, SelectTrigger as pe, SelectValue as me, SelectContent as ge, SelectGroup as xe, SelectItem as he, DropdownMenu as fe, DropdownMenuTrigger as be, DropdownMenuContent as ye } from "@imj_media/imj-ui";
|
|
12
|
+
import { useForm as $t, Controller as ve } from "react-hook-form";
|
|
13
13
|
import { Paginator as Ne } from "primereact/paginator";
|
|
14
14
|
const g = {
|
|
15
15
|
bg: {
|
|
16
|
-
|
|
17
|
-
content: "#FAFAFA",
|
|
18
|
-
card: "#FAFAFA"
|
|
19
|
-
//* To add the variant in Dark mode only add the -dark suffix to each color
|
|
16
|
+
content: "#FAFAFA"
|
|
20
17
|
},
|
|
21
18
|
texts: {
|
|
22
19
|
DEFAULT: "#252525",
|
|
23
|
-
enfasis: "#3658c1",
|
|
24
20
|
subtext: "#4f4f4f",
|
|
25
21
|
placeholder: "#929292"
|
|
26
22
|
},
|
|
27
23
|
primary: {
|
|
28
|
-
|
|
29
|
-
medium: "#dae2ec",
|
|
30
|
-
dark: "#334990",
|
|
31
|
-
regular: "#425CAC",
|
|
32
|
-
pastel: "#5c7ddd"
|
|
24
|
+
regular: "#425CAC"
|
|
33
25
|
},
|
|
34
26
|
success: {
|
|
35
|
-
light: "#368156",
|
|
36
|
-
medium: "#D2E9DC",
|
|
37
27
|
dark: "#368156",
|
|
38
|
-
regular: "#43B071"
|
|
39
|
-
pastel: "#57BA81"
|
|
28
|
+
regular: "#43B071"
|
|
40
29
|
},
|
|
41
30
|
danger: {
|
|
42
|
-
light: "#F1E5E4",
|
|
43
|
-
medium: "#EBDBD9",
|
|
44
31
|
dark: "#8C352C",
|
|
45
|
-
regular: "#C34335"
|
|
46
|
-
pastel: "#C43355"
|
|
32
|
+
regular: "#C34335"
|
|
47
33
|
},
|
|
48
34
|
warning: {
|
|
49
|
-
light: "#F2ECE5",
|
|
50
|
-
medium: "#EBE3D9",
|
|
51
35
|
dark: "#B4782F",
|
|
52
|
-
regular: "#D38A31"
|
|
53
|
-
pastel: "#D38A31"
|
|
54
|
-
},
|
|
55
|
-
alert: {
|
|
56
|
-
light: "#F1F1E4",
|
|
57
|
-
medium: "#EAE9D9",
|
|
58
|
-
dark: "#ADA63A",
|
|
59
|
-
regular: "#D6CC48",
|
|
60
|
-
pastel: "#D6CC48"
|
|
61
|
-
},
|
|
62
|
-
info: {
|
|
63
|
-
light: "#E7F5FF",
|
|
64
|
-
medium: "#D9E6EE",
|
|
65
|
-
dark: "#1C5073",
|
|
66
|
-
regular: "#1B6698",
|
|
67
|
-
pastel: "#1B6698"
|
|
68
|
-
},
|
|
69
|
-
link: {
|
|
70
|
-
light: "#ECF8FE",
|
|
71
|
-
medium: "#D8F1FD",
|
|
72
|
-
dark: "#0A7AAE",
|
|
73
|
-
regular: "#0EA5E9",
|
|
74
|
-
pastel: "#0EA5E9"
|
|
36
|
+
regular: "#D38A31"
|
|
75
37
|
},
|
|
76
38
|
silver: {
|
|
77
|
-
silver_white: " #FAFAFA",
|
|
78
39
|
silver_light: " #F5F5F5",
|
|
79
|
-
silver_dark: " #E9E9E9"
|
|
80
|
-
silver_regular: "#EFEFEF"
|
|
40
|
+
silver_dark: " #E9E9E9"
|
|
81
41
|
},
|
|
82
42
|
progressbar: {
|
|
83
43
|
orange_regular: "#DC8921",
|
|
@@ -85,52 +45,50 @@ const g = {
|
|
|
85
45
|
green_regular: "#039B59"
|
|
86
46
|
},
|
|
87
47
|
gray: {
|
|
88
|
-
gray_light: "#D9D9D9",
|
|
89
48
|
gray_regular: "#D1D1D1",
|
|
90
49
|
gray_dark: "#C4C4C4"
|
|
91
50
|
},
|
|
92
51
|
black: {
|
|
93
52
|
black_light: "#929292",
|
|
94
53
|
black_medium: "#4F4F4F",
|
|
95
|
-
black_dark: "#131313"
|
|
96
|
-
black_regular: "#252525"
|
|
54
|
+
black_dark: "#131313"
|
|
97
55
|
}
|
|
98
|
-
},
|
|
99
|
-
const [a, e] =
|
|
56
|
+
}, bt = () => {
|
|
57
|
+
const [a, e] = f(null);
|
|
100
58
|
return {
|
|
101
59
|
//Properties
|
|
102
60
|
position: a,
|
|
103
61
|
//Methods
|
|
104
|
-
setElementPosition: (
|
|
62
|
+
setElementPosition: (o) => {
|
|
105
63
|
var m;
|
|
106
|
-
let s = (m =
|
|
107
|
-
e(a ? null : { x:
|
|
64
|
+
let s = (m = o.current) == null ? void 0 : m.getBoundingClientRect(), u = (s == null ? void 0 : s.x) + ((s == null ? void 0 : s.width) ?? 0), w = (s == null ? void 0 : s.y) + (s == null ? void 0 : s.height);
|
|
65
|
+
e(a ? null : { x: u ?? 0, y: w ?? 0 });
|
|
108
66
|
},
|
|
109
|
-
getChildrenSize: (
|
|
67
|
+
getChildrenSize: (o) => {
|
|
110
68
|
var s;
|
|
111
|
-
return (s =
|
|
69
|
+
return (s = o.current) == null ? void 0 : s.getBoundingClientRect();
|
|
112
70
|
},
|
|
113
71
|
clearPosition: () => {
|
|
114
72
|
e(null);
|
|
115
73
|
}
|
|
116
74
|
};
|
|
117
|
-
},
|
|
75
|
+
}, _e = ({
|
|
118
76
|
children: a,
|
|
119
77
|
filterChildren: e
|
|
120
78
|
}) => {
|
|
121
|
-
const { position:
|
|
122
|
-
const [
|
|
123
|
-
return
|
|
124
|
-
var m,
|
|
125
|
-
e.current &&
|
|
126
|
-
((
|
|
79
|
+
const { position: n, setElementPosition: r } = bt(), l = V(null), o = ({ children: s }) => {
|
|
80
|
+
const [u, w] = f();
|
|
81
|
+
return F(() => {
|
|
82
|
+
var m, p;
|
|
83
|
+
e.current && w(
|
|
84
|
+
((n == null ? void 0 : n.x) ?? 0) - (((p = (m = e.current) == null ? void 0 : m.getBoundingClientRect()) == null ? void 0 : p.width) ?? 0)
|
|
127
85
|
);
|
|
128
|
-
}, [e == null ? void 0 : e.current,
|
|
86
|
+
}, [e == null ? void 0 : e.current, n == null ? void 0 : n.x]), n && pt.createPortal(
|
|
129
87
|
/* @__PURE__ */ t(
|
|
130
88
|
"div",
|
|
131
89
|
{
|
|
132
|
-
className: `tw-absolute tw-w-fit tw-h-fit ${
|
|
133
|
-
style: { top: `${
|
|
90
|
+
className: `tw-absolute tw-w-fit tw-h-fit ${u ? "tw-block" : "tw-hidden"}`,
|
|
91
|
+
style: { top: `${n == null ? void 0 : n.y}px`, left: `${u}px`, zIndex: 1 },
|
|
134
92
|
"data-portal-host": !0,
|
|
135
93
|
children: s
|
|
136
94
|
}
|
|
@@ -138,15 +96,15 @@ const g = {
|
|
|
138
96
|
document.body
|
|
139
97
|
);
|
|
140
98
|
};
|
|
141
|
-
return /* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
100
|
+
/* @__PURE__ */ i(
|
|
143
101
|
"label",
|
|
144
102
|
{
|
|
145
|
-
ref:
|
|
103
|
+
ref: l,
|
|
146
104
|
htmlFor: "filter-button",
|
|
147
105
|
className: "tw-flex tw-cursor-pointer tw-text-xl tw-items-center tw-gap-m tw-p-s tw-text-texts-enfasis tw-fill-texts-enfasis tw-bg-bg tw-rounded-lg tw-px-l tw-h-[30px] tw-shadow-button-primary hover:tw-shadow-button-primary-hover",
|
|
148
106
|
children: [
|
|
149
|
-
/* @__PURE__ */ t(
|
|
107
|
+
/* @__PURE__ */ t(T, { icon: "filter", size: "xs", strokeWidth: 5, color: g.primary.regular }),
|
|
150
108
|
"Filtrar"
|
|
151
109
|
]
|
|
152
110
|
}
|
|
@@ -157,81 +115,81 @@ const g = {
|
|
|
157
115
|
className: "tw-hidden",
|
|
158
116
|
id: "filter-button",
|
|
159
117
|
onClick: () => {
|
|
160
|
-
r(
|
|
118
|
+
r(l);
|
|
161
119
|
}
|
|
162
120
|
}
|
|
163
121
|
),
|
|
164
|
-
/* @__PURE__ */ t(
|
|
122
|
+
/* @__PURE__ */ t(o, { children: a })
|
|
165
123
|
] });
|
|
166
|
-
},
|
|
124
|
+
}, qt = (a) => {
|
|
167
125
|
let e = {};
|
|
168
|
-
return Object.entries(a).forEach(([
|
|
169
|
-
if (
|
|
170
|
-
let [
|
|
171
|
-
e[
|
|
126
|
+
return Object.entries(a).forEach(([n, r]) => {
|
|
127
|
+
if (n.includes(".")) {
|
|
128
|
+
let [l, o] = n.split(".");
|
|
129
|
+
e[l] = e[l] || {}, e[l][o] = r;
|
|
172
130
|
} else
|
|
173
|
-
e[
|
|
131
|
+
e[n] = r;
|
|
174
132
|
}), e;
|
|
175
|
-
},
|
|
176
|
-
const [e,
|
|
177
|
-
function
|
|
178
|
-
return !isNaN(
|
|
133
|
+
}, zt = J({}), Ce = ({ children: a }) => {
|
|
134
|
+
const [e, n] = f({}), [r, l] = f({}), [o, s] = f([]), [u, w] = f(""), m = ({ name: v, value: d }) => {
|
|
135
|
+
function x(b) {
|
|
136
|
+
return !isNaN(b) && b !== null && b !== "" ? parseFloat(b) : null;
|
|
179
137
|
}
|
|
180
|
-
let
|
|
181
|
-
|
|
182
|
-
let
|
|
183
|
-
(j) => j.label.toLowerCase().replace(/ /g, "_") ===
|
|
138
|
+
let _ = x(d);
|
|
139
|
+
l((b) => {
|
|
140
|
+
let k = { ...b }, C = o == null ? void 0 : o.find(
|
|
141
|
+
(j) => j.label.toLowerCase().replace(/ /g, "_") === v
|
|
184
142
|
);
|
|
185
|
-
return
|
|
143
|
+
return C ? k[C.id] = _ ?? d : k[v] = _ ?? d, k;
|
|
186
144
|
});
|
|
187
145
|
};
|
|
188
|
-
|
|
189
|
-
let
|
|
190
|
-
|
|
191
|
-
let
|
|
192
|
-
return
|
|
146
|
+
F(() => {
|
|
147
|
+
let v = o.map((d) => d.id === "owner.config" ? [d.id, "yo_y_mis_equipos"] : d.id === "dependency" ? [d.id, "ambas"] : [d.id, null]);
|
|
148
|
+
l((d) => {
|
|
149
|
+
let x = { search: d == null ? void 0 : d.search, taskName: d == null ? void 0 : d.taskName };
|
|
150
|
+
return x = { ...x, ...Object.fromEntries(v) }, x;
|
|
193
151
|
});
|
|
194
|
-
}, [
|
|
195
|
-
const
|
|
196
|
-
let
|
|
197
|
-
|
|
152
|
+
}, [o]);
|
|
153
|
+
const p = () => {
|
|
154
|
+
let v = o.map((d) => d.id === "owner.config" ? [d.id, "yo_y_mis_equipos"] : d.id === "dependency" ? [d.id, "ambas"] : [d.id, null]);
|
|
155
|
+
l(Object.fromEntries(v)), n(qt(Object.fromEntries(v)));
|
|
198
156
|
}, y = () => {
|
|
199
|
-
let
|
|
200
|
-
|
|
157
|
+
let v = qt(r);
|
|
158
|
+
n(v);
|
|
201
159
|
};
|
|
202
160
|
return /* @__PURE__ */ t(
|
|
203
|
-
|
|
161
|
+
zt.Provider,
|
|
204
162
|
{
|
|
205
163
|
value: {
|
|
206
164
|
//properties
|
|
207
|
-
fields:
|
|
165
|
+
fields: o,
|
|
208
166
|
filters: e,
|
|
209
|
-
path:
|
|
167
|
+
path: u,
|
|
210
168
|
//methods
|
|
211
169
|
defineFields: s,
|
|
212
170
|
updateFilters: m,
|
|
213
|
-
cleanFilters:
|
|
171
|
+
cleanFilters: p,
|
|
214
172
|
applyFilters: y,
|
|
215
173
|
initialFilters: r,
|
|
216
|
-
selectPath:
|
|
174
|
+
selectPath: w
|
|
217
175
|
},
|
|
218
176
|
children: a
|
|
219
177
|
}
|
|
220
178
|
);
|
|
221
|
-
}, K = () => tt(
|
|
222
|
-
function
|
|
223
|
-
let r,
|
|
224
|
-
return function(...
|
|
225
|
-
const s = Date.now(),
|
|
226
|
-
clearTimeout(r),
|
|
227
|
-
|
|
179
|
+
}, K = () => tt(zt);
|
|
180
|
+
function Te(a, e = 300, n = { leading: !1, trailing: !0 }) {
|
|
181
|
+
let r, l = null;
|
|
182
|
+
return function(...o) {
|
|
183
|
+
const s = Date.now(), u = n.leading && !l;
|
|
184
|
+
clearTimeout(r), u && a(...o), l = s, r = setTimeout(() => {
|
|
185
|
+
n.trailing && (!n.leading || s - l >= e) && (a(...o), l = null);
|
|
228
186
|
}, e);
|
|
229
187
|
};
|
|
230
188
|
}
|
|
231
|
-
const
|
|
189
|
+
const Q = ({
|
|
232
190
|
imageUrl: a = "https://www.uv.unach.mx/assets/img/prueba/directorio/userM.png",
|
|
233
191
|
alt: e = "avatar",
|
|
234
|
-
size:
|
|
192
|
+
size: n = "s"
|
|
235
193
|
}) => {
|
|
236
194
|
const r = {
|
|
237
195
|
xs: "tw-w-[24px] tw-h-[24px] tw-min-w-[24px] tw-min-h-[24px]",
|
|
@@ -240,7 +198,7 @@ const W = ({
|
|
|
240
198
|
l: "tw-w-[36px] tw-h-[36px] tw-min-w-[36px] tw-min-h-[36px]",
|
|
241
199
|
xl: "tw-w-[40px] tw-h-[40px] tw-min-w-[40px] tw-min-h-[40px]",
|
|
242
200
|
xxl: "tw-w-[44px] tw-h-[44px] tw-min-w-[44px] tw-min-h-[44px]"
|
|
243
|
-
}[
|
|
201
|
+
}[n];
|
|
244
202
|
return /* @__PURE__ */ t(
|
|
245
203
|
"img",
|
|
246
204
|
{
|
|
@@ -249,29 +207,29 @@ const W = ({
|
|
|
249
207
|
className: `${r} tw-rounded-full tw-bg-containers tw-border-2 tw-border-white`
|
|
250
208
|
}
|
|
251
209
|
);
|
|
252
|
-
},
|
|
210
|
+
}, Rt = ({
|
|
253
211
|
options: a,
|
|
254
212
|
onselect: e
|
|
255
213
|
}) => {
|
|
256
|
-
const [
|
|
257
|
-
(s) => s.name.toLowerCase().includes((
|
|
214
|
+
const [n, r] = f(null), l = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15), o = [...a].filter(
|
|
215
|
+
(s) => s.name.toLowerCase().includes((n == null ? void 0 : n.toLowerCase()) ?? "")
|
|
258
216
|
);
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
217
|
+
return /* @__PURE__ */ i("div", { className: "tw-h-fit tw-w-full tw-min-w-max", children: [
|
|
218
|
+
/* @__PURE__ */ i("div", { className: "tw-relative tw-flex tw-items-center", children: [
|
|
261
219
|
/* @__PURE__ */ t(
|
|
262
220
|
"input",
|
|
263
221
|
{
|
|
264
|
-
id:
|
|
265
|
-
value:
|
|
222
|
+
id: l,
|
|
223
|
+
value: n ?? "",
|
|
266
224
|
onChange: (s) => r(s.target.value),
|
|
267
225
|
type: "text",
|
|
268
226
|
className: "tw-w-full tw-h-[32px] tw-bg-bg-card tw-border-cards tw-rounded-lg tw-p-2",
|
|
269
227
|
placeholder: "Buscar"
|
|
270
228
|
}
|
|
271
229
|
),
|
|
272
|
-
/* @__PURE__ */ t("div", { className: "tw-absolute tw-right-[8px]", children: /* @__PURE__ */ t(
|
|
230
|
+
/* @__PURE__ */ t("div", { className: "tw-absolute tw-right-[8px]", children: /* @__PURE__ */ t(T, { icon: "search", size: "xs", strokeWidth: 3 }) })
|
|
273
231
|
] }),
|
|
274
|
-
/* @__PURE__ */ t("div", { className: "tw-bg-bg-card tw-border-cards tw-rounded-lg tw-p-2 tw-flex tw-flex-col tw-gap-s tw-overflow-y-auto tw-max-h-[120px] tw-min-w-max", children:
|
|
232
|
+
/* @__PURE__ */ t("div", { className: "tw-bg-bg-card tw-border-cards tw-rounded-lg tw-p-2 tw-flex tw-flex-col tw-gap-s tw-overflow-y-auto tw-max-h-[120px] tw-min-w-max", children: o.map((s) => /* @__PURE__ */ i(
|
|
275
233
|
"button",
|
|
276
234
|
{
|
|
277
235
|
onClick: () => {
|
|
@@ -279,75 +237,75 @@ const W = ({
|
|
|
279
237
|
},
|
|
280
238
|
className: "tw-flex tw-gap-s tw-items-center tw-max-w-[200px] tw-min-w-full hover:tw-bg-primary-light tw-cursor-pointer",
|
|
281
239
|
children: [
|
|
282
|
-
s.image && /* @__PURE__ */ t(
|
|
240
|
+
s.image && /* @__PURE__ */ t(Q, { imageUrl: s.image, alt: s.name }),
|
|
283
241
|
/* @__PURE__ */ t("p", { className: "tw-text-s tw-py-m tw-font-normal tw-text-texts-subtext tw-content-text tw-truncate", children: s.name })
|
|
284
242
|
]
|
|
285
243
|
}
|
|
286
244
|
)) })
|
|
287
245
|
] });
|
|
288
|
-
},
|
|
289
|
-
const [
|
|
290
|
-
return
|
|
291
|
-
r &&
|
|
292
|
-
}, [r]), /* @__PURE__ */
|
|
293
|
-
/* @__PURE__ */
|
|
246
|
+
}, ke = ({ error: a, options: e, onSelect: n, initialValue: r }) => {
|
|
247
|
+
const [l, o] = f(!1), [s, u] = f((r == null ? void 0 : r.name) ?? null);
|
|
248
|
+
return F(() => {
|
|
249
|
+
r && u(r);
|
|
250
|
+
}, [r]), /* @__PURE__ */ i("div", { className: "tw-relative", children: [
|
|
251
|
+
/* @__PURE__ */ i("div", { onBlur: () => o(!1), onClick: () => o(!l), className: `tw-z-[1] tw-cursor-pointer tw-w-full tw-bg-bg-card ${a ? "tw-shadow-danger-regular tw-border-2 tw-border-danger-regular" : "tw-shadow-input"} tw-h-[30px] tw-rounded-md tw-flex tw-justify-between tw-items-center tw-pl-2 ${a ? "tw-text-danger-regular" : s ? "tw-text-texts-subtext" : "tw-text-texts-placeholder"}`, children: [
|
|
294
252
|
/* @__PURE__ */ t("p", { children: (s == null ? void 0 : s.name) ?? "Selecciona una opción" }),
|
|
295
|
-
/* @__PURE__ */ t(
|
|
253
|
+
/* @__PURE__ */ t(T, { icon: "angle_down_outline", color: a ? g.danger.regular : g.texts.placeholder })
|
|
296
254
|
] }),
|
|
297
|
-
|
|
298
|
-
|
|
255
|
+
l && /* @__PURE__ */ t("div", { className: "absolute tw-w-full tw-shadow-md tw-rounded-lg tw-z-[10]", children: /* @__PURE__ */ t(
|
|
256
|
+
Rt,
|
|
299
257
|
{
|
|
300
|
-
onselect: (
|
|
301
|
-
|
|
258
|
+
onselect: (w) => {
|
|
259
|
+
u(w), o(!1), n && n(w);
|
|
302
260
|
},
|
|
303
261
|
options: e
|
|
304
262
|
}
|
|
305
263
|
) })
|
|
306
264
|
] });
|
|
307
|
-
},
|
|
308
|
-
const { fields: a, updateFilters: e, cleanFilters:
|
|
309
|
-
return /* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
265
|
+
}, qe = () => {
|
|
266
|
+
const { fields: a, updateFilters: e, cleanFilters: n, applyFilters: r, initialFilters: l } = K();
|
|
267
|
+
return /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-l tw-min-w-[250px] tw-z-[100]", children: [
|
|
268
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-justify-between tw-items-center", children: [
|
|
311
269
|
/* @__PURE__ */ t("p", { className: "tw-text-texts tw-text-2xl", children: "Filtros" }),
|
|
312
270
|
/* @__PURE__ */ t(
|
|
313
271
|
"button",
|
|
314
272
|
{
|
|
315
273
|
className: "tw-text-lg tw-font-semibold tw-flex tw-cursor-pointer tw-items-center tw-gap-m tw-p-s tw-text-texts-enfasis tw-fill-texts-enfasis tw-bg-bg tw-rounded-lg tw-px-l tw-h-fit tw-shadow-button-primary hover:tw-shadow-button-primary-hover",
|
|
316
|
-
onClick:
|
|
274
|
+
onClick: n,
|
|
317
275
|
children: "Limpiar"
|
|
318
276
|
}
|
|
319
277
|
)
|
|
320
278
|
] }),
|
|
321
|
-
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-m", children: a == null ? void 0 : a.map((
|
|
322
|
-
var
|
|
323
|
-
return /* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */ t("p", { className: "tw-text-xl z-[1]", children:
|
|
325
|
-
(
|
|
326
|
-
|
|
279
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-m", children: a == null ? void 0 : a.map((o, s) => {
|
|
280
|
+
var u;
|
|
281
|
+
return /* @__PURE__ */ i("div", { style: { zIndex: 10 - s }, children: [
|
|
282
|
+
/* @__PURE__ */ t("p", { className: "tw-text-xl z-[1]", children: o.label }),
|
|
283
|
+
(o == null ? void 0 : o.type) === "select" ? /* @__PURE__ */ t("div", { className: "tw-relative tw-z-[10]", children: /* @__PURE__ */ t(
|
|
284
|
+
ke,
|
|
327
285
|
{
|
|
328
286
|
error: !1,
|
|
329
|
-
options:
|
|
330
|
-
onSelect: (
|
|
287
|
+
options: o == null ? void 0 : o.options,
|
|
288
|
+
onSelect: (w) => {
|
|
331
289
|
e({
|
|
332
|
-
name:
|
|
333
|
-
value:
|
|
290
|
+
name: o == null ? void 0 : o.id,
|
|
291
|
+
value: w == null ? void 0 : w.id
|
|
334
292
|
});
|
|
335
293
|
},
|
|
336
|
-
initialValue: (
|
|
294
|
+
initialValue: (u = o == null ? void 0 : o.options) == null ? void 0 : u.find((w) => w.id === (l == null ? void 0 : l[o == null ? void 0 : o.id]))
|
|
337
295
|
}
|
|
338
296
|
) }) : /* @__PURE__ */ t(
|
|
339
297
|
"input",
|
|
340
298
|
{
|
|
341
299
|
className: "tw-w-full tw-h-[30px] tw-shadow-input tw-rounded-lg tw-p-s",
|
|
342
|
-
type:
|
|
343
|
-
value:
|
|
344
|
-
name:
|
|
345
|
-
onChange:
|
|
346
|
-
(
|
|
347
|
-
var m,
|
|
300
|
+
type: o.type,
|
|
301
|
+
value: l == null ? void 0 : l[o == null ? void 0 : o.id],
|
|
302
|
+
name: o.label.toLowerCase().replace(/ /g, "_"),
|
|
303
|
+
onChange: Te(
|
|
304
|
+
(w) => {
|
|
305
|
+
var m, p;
|
|
348
306
|
return e({
|
|
349
|
-
name: (m =
|
|
350
|
-
value: (
|
|
307
|
+
name: (m = w == null ? void 0 : w.target) == null ? void 0 : m.name,
|
|
308
|
+
value: (p = w == null ? void 0 : w.target) == null ? void 0 : p.value
|
|
351
309
|
});
|
|
352
310
|
},
|
|
353
311
|
1e3
|
|
@@ -365,35 +323,35 @@ const W = ({
|
|
|
365
323
|
}
|
|
366
324
|
)
|
|
367
325
|
] });
|
|
368
|
-
},
|
|
369
|
-
const e = (r) => Object.prototype.toString.call(r) === "[object Object]",
|
|
326
|
+
}, Y = (a) => {
|
|
327
|
+
const e = (r) => Object.prototype.toString.call(r) === "[object Object]", n = (r) => r.attributes ? {
|
|
370
328
|
id: r.id,
|
|
371
329
|
...r.attributes
|
|
372
330
|
} : r;
|
|
373
331
|
if (Array.isArray(a))
|
|
374
|
-
return a.map((r) =>
|
|
332
|
+
return a.map((r) => Y(r));
|
|
375
333
|
if (e(a)) {
|
|
376
|
-
Array.isArray(a.data) ? a = [...a.data] : e(a.data) ? a =
|
|
334
|
+
Array.isArray(a.data) ? a = [...a.data] : e(a.data) ? a = n({ ...a.data }) : a.data === null ? a = null : a = n(a);
|
|
377
335
|
for (const r in a)
|
|
378
|
-
a[r] =
|
|
336
|
+
a[r] = Y(a[r]);
|
|
379
337
|
return a;
|
|
380
338
|
}
|
|
381
339
|
return a;
|
|
382
340
|
};
|
|
383
341
|
class Pe {
|
|
384
342
|
static toCampaignTasks(e) {
|
|
385
|
-
var r,
|
|
386
|
-
let
|
|
387
|
-
return e != null && e.responsable &&
|
|
343
|
+
var r, l, o, s, u, w, m, p, y, v, d, x;
|
|
344
|
+
let n = [];
|
|
345
|
+
return e != null && e.responsable && n.push({
|
|
388
346
|
id: e.responsable.id,
|
|
389
347
|
name: e.responsable.nombre,
|
|
390
|
-
image: (
|
|
391
|
-
}), (
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
id:
|
|
395
|
-
name:
|
|
396
|
-
image: (j = (
|
|
348
|
+
image: (u = (s = (o = (l = (r = e.responsable) == null ? void 0 : r.userOBP) == null ? void 0 : l.imagen) == null ? void 0 : o.formats) == null ? void 0 : s.thumbnail) == null ? void 0 : u.url
|
|
349
|
+
}), (w = e == null ? void 0 : e.equipo) != null && w.miembros && e.equipo.miembros.forEach((_) => {
|
|
350
|
+
var b, k, C, j;
|
|
351
|
+
n != null && n.find((M) => M.id === _.idUser.id) || _.idUser && n.push({
|
|
352
|
+
id: _.idUser.id,
|
|
353
|
+
name: _.idUser.nombre,
|
|
354
|
+
image: (j = (C = (k = (b = _ == null ? void 0 : _.userOBP) == null ? void 0 : b.imagen) == null ? void 0 : k.formats) == null ? void 0 : C.thumbnail) == null ? void 0 : j.url
|
|
397
355
|
});
|
|
398
356
|
}), {
|
|
399
357
|
paused: e == null ? void 0 : e.pausada,
|
|
@@ -408,67 +366,67 @@ class Pe {
|
|
|
408
366
|
endDate: new Date((e == null ? void 0 : e.ffin) ?? null),
|
|
409
367
|
startDate: new Date((e == null ? void 0 : e.finicio) ?? null),
|
|
410
368
|
mediumName: (e == null ? void 0 : e.nombre_medio) ?? null,
|
|
411
|
-
users:
|
|
369
|
+
users: n,
|
|
412
370
|
repeatsToDo: (e == null ? void 0 : e.repeticiones) ?? null,
|
|
413
371
|
repeats: (e == null ? void 0 : e.repeticiones_realizadas) ?? null,
|
|
414
|
-
comments: ((
|
|
372
|
+
comments: ((p = e == null ? void 0 : e.comentarios) == null ? void 0 : p.length) ?? null,
|
|
415
373
|
willBePaused: e == null ? void 0 : e.es_pausable,
|
|
416
374
|
statusRequiredTask: ((y = e == null ? void 0 : e.id_t_requerida) == null ? void 0 : y.estatus) ?? null,
|
|
417
|
-
nameRequiredTask: ((
|
|
418
|
-
responsible: ((
|
|
419
|
-
tasks: ((
|
|
420
|
-
id:
|
|
421
|
-
name:
|
|
422
|
-
status:
|
|
375
|
+
nameRequiredTask: ((v = e == null ? void 0 : e.id_t_requerida) == null ? void 0 : v.texto_corto) ?? null,
|
|
376
|
+
responsible: ((d = e == null ? void 0 : e.responsable) == null ? void 0 : d.id) ?? null,
|
|
377
|
+
tasks: ((x = e == null ? void 0 : e.tareas) == null ? void 0 : x.map((_) => ({
|
|
378
|
+
id: _.id,
|
|
379
|
+
name: _.texto_corto,
|
|
380
|
+
status: _.estatus
|
|
423
381
|
}))) ?? null
|
|
424
382
|
};
|
|
425
383
|
}
|
|
426
384
|
}
|
|
427
|
-
const
|
|
385
|
+
const je = async ({ filters: a, tasks_api: e, project: n }) => {
|
|
428
386
|
try {
|
|
429
387
|
const r = await e.get("/api/listado_tareas_flujo", {
|
|
430
388
|
params: {
|
|
431
389
|
...a,
|
|
432
390
|
project: {
|
|
433
|
-
id:
|
|
391
|
+
id: n
|
|
434
392
|
},
|
|
435
393
|
includeAllTasks: !0
|
|
436
394
|
}
|
|
437
395
|
});
|
|
438
|
-
return
|
|
396
|
+
return Y(r.data.tareas).map(Pe.toCampaignTasks);
|
|
439
397
|
} catch (r) {
|
|
440
398
|
console.log(r);
|
|
441
399
|
}
|
|
442
|
-
},
|
|
443
|
-
const
|
|
444
|
-
baseURL:
|
|
400
|
+
}, Lt = J({}), Fe = ({ children: a, user: e, url: n, mode: r }) => {
|
|
401
|
+
const l = r === "prod" ? "https://services.imjmedia.com.mx" : "https://devobp.imjmedia.com.mx", o = At.create({
|
|
402
|
+
baseURL: n,
|
|
445
403
|
headers: {
|
|
446
404
|
Authorization: `Bearer ${e.accessToken}`
|
|
447
405
|
},
|
|
448
|
-
paramsSerializer: (
|
|
449
|
-
}), s = () =>
|
|
406
|
+
paramsSerializer: (w) => Mt.stringify(w, { encodeValuesOnly: !0 })
|
|
407
|
+
}), s = () => l, u = (w) => w === "undefined" ? "" : `${l}${w}`;
|
|
450
408
|
return /* @__PURE__ */ t(
|
|
451
|
-
|
|
409
|
+
Lt.Provider,
|
|
452
410
|
{
|
|
453
411
|
value: {
|
|
454
412
|
//methods
|
|
455
|
-
tasks_api:
|
|
413
|
+
tasks_api: o,
|
|
456
414
|
getOBPUrlApi: s,
|
|
457
|
-
getImageOBP:
|
|
415
|
+
getImageOBP: u
|
|
458
416
|
},
|
|
459
417
|
children: a
|
|
460
418
|
}
|
|
461
419
|
);
|
|
462
|
-
}, B = () => tt(
|
|
420
|
+
}, B = () => tt(Lt), Et = J({}), Se = ({ children: a, user: e, url: n }) => {
|
|
463
421
|
const r = At.create({
|
|
464
|
-
baseURL:
|
|
422
|
+
baseURL: n,
|
|
465
423
|
headers: {
|
|
466
424
|
Authorization: `Bearer ${e.accessToken}`
|
|
467
425
|
},
|
|
468
|
-
paramsSerializer: (
|
|
426
|
+
paramsSerializer: (l) => Mt.stringify(l, { encodeValuesOnly: !0 })
|
|
469
427
|
});
|
|
470
428
|
return /* @__PURE__ */ t(
|
|
471
|
-
|
|
429
|
+
Et.Provider,
|
|
472
430
|
{
|
|
473
431
|
value: {
|
|
474
432
|
//properties
|
|
@@ -479,67 +437,67 @@ const qe = async ({ filters: a, tasks_api: e, project: l }) => {
|
|
|
479
437
|
children: a
|
|
480
438
|
}
|
|
481
439
|
);
|
|
482
|
-
},
|
|
483
|
-
var
|
|
484
|
-
const [
|
|
440
|
+
}, G = () => tt(Et), Bt = J({}), It = ({ children: a, project: e }) => {
|
|
441
|
+
var k;
|
|
442
|
+
const [n, r] = f([]), [l, o] = f(!1), [s, u] = f([]), { tasks_api: w } = B(), { filters: m } = K(), { user: p } = G(), [y, v] = f({
|
|
485
443
|
owner: {
|
|
486
|
-
user:
|
|
487
|
-
config: ((
|
|
444
|
+
user: p.id,
|
|
445
|
+
config: ((k = m == null ? void 0 : m.owner) == null ? void 0 : k.config) ?? "yo_y_mis_equipos"
|
|
488
446
|
},
|
|
489
447
|
project: {
|
|
490
448
|
id: e
|
|
491
449
|
}
|
|
492
|
-
}),
|
|
450
|
+
}), d = ut({
|
|
493
451
|
queryKey: ["tasksProject", m, e],
|
|
494
|
-
queryFn: () =>
|
|
452
|
+
queryFn: () => je({
|
|
495
453
|
filters: {
|
|
496
454
|
...y,
|
|
497
455
|
taskName: m == null ? void 0 : m.taskName
|
|
498
456
|
},
|
|
499
457
|
project: e,
|
|
500
|
-
tasks_api:
|
|
458
|
+
tasks_api: w
|
|
501
459
|
})
|
|
502
460
|
});
|
|
503
|
-
|
|
504
|
-
var
|
|
505
|
-
Object.keys(m).length > 0 &&
|
|
461
|
+
F(() => {
|
|
462
|
+
var C;
|
|
463
|
+
Object.keys(m).length > 0 && v({
|
|
506
464
|
...m,
|
|
507
465
|
owner: {
|
|
508
|
-
user:
|
|
509
|
-
config: ((
|
|
466
|
+
user: p.id,
|
|
467
|
+
config: ((C = m == null ? void 0 : m.owner) == null ? void 0 : C.config) ?? "yo_y_mis_equipos"
|
|
510
468
|
},
|
|
511
469
|
project: {
|
|
512
470
|
id: e
|
|
513
471
|
}
|
|
514
472
|
});
|
|
515
473
|
}, [m]);
|
|
516
|
-
const
|
|
517
|
-
r((j) => [...j,
|
|
518
|
-
},
|
|
519
|
-
|
|
520
|
-
},
|
|
474
|
+
const x = (C) => {
|
|
475
|
+
r((j) => [...j, C]);
|
|
476
|
+
}, _ = (C) => {
|
|
477
|
+
u((j) => j.includes(C) ? j.filter((M) => M !== C) : [...j, C]);
|
|
478
|
+
}, b = e ?? null;
|
|
521
479
|
return /* @__PURE__ */ t(
|
|
522
|
-
|
|
480
|
+
Bt.Provider,
|
|
523
481
|
{
|
|
524
482
|
value: {
|
|
525
483
|
//properties
|
|
526
|
-
tasksProject:
|
|
527
|
-
selectedTasks:
|
|
528
|
-
projectID:
|
|
484
|
+
tasksProject: d,
|
|
485
|
+
selectedTasks: n,
|
|
486
|
+
projectID: b,
|
|
529
487
|
openTasks: s,
|
|
530
488
|
//methods
|
|
531
|
-
selectTask:
|
|
489
|
+
selectTask: x,
|
|
532
490
|
filtersToSend: y,
|
|
533
|
-
openTask:
|
|
534
|
-
isRefetching:
|
|
491
|
+
openTask: _,
|
|
492
|
+
isRefetching: l,
|
|
535
493
|
project: e,
|
|
536
494
|
filters: m,
|
|
537
|
-
setIsRefetching:
|
|
495
|
+
setIsRefetching: o
|
|
538
496
|
},
|
|
539
497
|
children: a
|
|
540
498
|
}
|
|
541
499
|
);
|
|
542
|
-
}, et = () => tt(
|
|
500
|
+
}, et = () => tt(Bt), Ae = [
|
|
543
501
|
{
|
|
544
502
|
label: "Tipo de dependencia",
|
|
545
503
|
type: "select",
|
|
@@ -590,236 +548,236 @@ const qe = async ({ filters: a, tasks_api: e, project: l }) => {
|
|
|
590
548
|
name: "Muy dificil"
|
|
591
549
|
}]
|
|
592
550
|
}
|
|
593
|
-
],
|
|
594
|
-
/* @__PURE__ */
|
|
551
|
+
], Me = () => /* @__PURE__ */ i("div", { className: "tw-bg-gray-200 tw-h-[150px] tw-w-full tw-animate-pulse tw-rounded-md tw-flex tw-flex-col tw-gap-[50px] tw-p-4", children: [
|
|
552
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-h-[30px] tw-gap-3", children: [
|
|
595
553
|
/* @__PURE__ */ t("div", { className: "tw-w-[30px] tw-min-w-[30px] tw-h-full tw-bg-gray-300 tw-rounded-full" }),
|
|
596
554
|
/* @__PURE__ */ t("div", { className: "tw-w-full tw-h-full tw-bg-gray-300" }),
|
|
597
555
|
/* @__PURE__ */ t("div", { className: "tw-w-[30px] tw-min-w-[30px] tw-h-full tw-bg-gray-300 tw-rounded-full" })
|
|
598
556
|
] }),
|
|
599
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-justify-between tw-w-full tw-h-[30px] tw-gap-[50px]", children: [
|
|
600
558
|
/* @__PURE__ */ t("div", { className: "tw-w-full tw-h-[30px] tw-bg-gray-300" }),
|
|
601
559
|
/* @__PURE__ */ t("div", { className: "tw-w-full tw-h-[30px] tw-bg-gray-300" })
|
|
602
560
|
] })
|
|
603
|
-
] }),
|
|
604
|
-
const [e,
|
|
605
|
-
|
|
561
|
+
] }), Ot = J(null), De = ({ children: a }) => {
|
|
562
|
+
const [e, n] = f({ message: "", type: "success" }), r = (l, o) => {
|
|
563
|
+
n({ message: l, type: o }), setTimeout(() => n({ message: "", type: "success" }), 3e3);
|
|
606
564
|
};
|
|
607
565
|
return /* @__PURE__ */ t(
|
|
608
|
-
|
|
566
|
+
Ot.Provider,
|
|
609
567
|
{
|
|
610
568
|
value: {
|
|
611
569
|
toast: e,
|
|
612
|
-
showSuccess: (
|
|
613
|
-
showError: (
|
|
570
|
+
showSuccess: (l) => r(l, "success"),
|
|
571
|
+
showError: (l) => r(l, "error")
|
|
614
572
|
},
|
|
615
573
|
children: a
|
|
616
574
|
}
|
|
617
575
|
);
|
|
618
|
-
}, Kt = () => tt(
|
|
619
|
-
const { tasks_api: a } = B(), { user: e } =
|
|
576
|
+
}, Kt = () => tt(Ot), ct = () => {
|
|
577
|
+
const { tasks_api: a } = B(), { user: e } = G(), { filters: n, path: r } = K(), l = it(), { projectID: o } = et(), { showSuccess: s, showError: u } = Kt(), w = async ({ id: h }) => (await a.put(`/api/tareas/${h}`, {
|
|
620
578
|
data: {
|
|
621
579
|
estatus: 1,
|
|
622
580
|
responsable: e == null ? void 0 : e.id,
|
|
623
581
|
updated_by: e == null ? void 0 : e.id
|
|
624
582
|
}
|
|
625
|
-
})).data, m = async ({ id:
|
|
626
|
-
id_task:
|
|
583
|
+
})).data, m = async ({ id: h }) => (await a.post("/api/terminarTarea", {
|
|
584
|
+
id_task: h,
|
|
627
585
|
ended_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
628
586
|
id_user: e == null ? void 0 : e.id
|
|
629
|
-
})).data,
|
|
587
|
+
})).data, p = async ({ id: h, repeats: N }) => (await a.put(`/api/tareas/${h}`, {
|
|
630
588
|
data: {
|
|
631
|
-
repeticiones_realizadas:
|
|
589
|
+
repeticiones_realizadas: N,
|
|
632
590
|
updated_by: e == null ? void 0 : e.id
|
|
633
591
|
}
|
|
634
|
-
})).data, y = async ({ id:
|
|
592
|
+
})).data, y = async ({ id: h, motiveId: N }) => {
|
|
635
593
|
try {
|
|
636
|
-
const
|
|
637
|
-
taskId:
|
|
594
|
+
const P = await a.post("/api/pausarTarea", {
|
|
595
|
+
taskId: h,
|
|
638
596
|
userId: e == null ? void 0 : e.id,
|
|
639
|
-
motivoId:
|
|
597
|
+
motivoId: N
|
|
640
598
|
});
|
|
641
|
-
return s("Tarea pausada correctamente"),
|
|
599
|
+
return s("Tarea pausada correctamente"), P.data;
|
|
642
600
|
} catch {
|
|
643
|
-
|
|
601
|
+
u("Error al pausar la tarea");
|
|
644
602
|
}
|
|
645
|
-
},
|
|
603
|
+
}, v = async ({ id: h }) => {
|
|
646
604
|
try {
|
|
647
|
-
const
|
|
648
|
-
taskId:
|
|
605
|
+
const N = await a.post("/api/reanudarTarea", {
|
|
606
|
+
taskId: h
|
|
649
607
|
});
|
|
650
|
-
return s("Tarea reanudada correctamente"),
|
|
608
|
+
return s("Tarea reanudada correctamente"), N.data;
|
|
651
609
|
} catch {
|
|
652
|
-
|
|
610
|
+
u("Error al reanudar la tarea");
|
|
653
611
|
}
|
|
654
|
-
},
|
|
655
|
-
id:
|
|
656
|
-
idNewResponsible:
|
|
657
|
-
typeOfSelect:
|
|
612
|
+
}, d = async ({
|
|
613
|
+
id: h,
|
|
614
|
+
idNewResponsible: N,
|
|
615
|
+
typeOfSelect: P
|
|
658
616
|
}) => {
|
|
659
|
-
let
|
|
617
|
+
let c = {
|
|
660
618
|
updated_by: e == null ? void 0 : e.id
|
|
661
619
|
};
|
|
662
|
-
return
|
|
663
|
-
...
|
|
620
|
+
return P === "responsible" && (c = { ...c, responsable: N }), P === "team" && (c = {
|
|
621
|
+
...c,
|
|
664
622
|
responsable: null,
|
|
665
|
-
equipo:
|
|
666
|
-
}), (await a.put(`/api/tareas/${
|
|
667
|
-
data:
|
|
623
|
+
equipo: N
|
|
624
|
+
}), (await a.put(`/api/tareas/${h}`, {
|
|
625
|
+
data: c
|
|
668
626
|
})).data;
|
|
669
|
-
},
|
|
670
|
-
},
|
|
671
|
-
await
|
|
672
|
-
}, { mutateAsync:
|
|
673
|
-
mutationFn:
|
|
627
|
+
}, x = async ({ id: h, data: N, user: P }) => {
|
|
628
|
+
}, _ = async ({ id: h }) => {
|
|
629
|
+
await b({ id: h });
|
|
630
|
+
}, { mutateAsync: b } = wt({
|
|
631
|
+
mutationFn: w,
|
|
674
632
|
onSuccess: () => {
|
|
675
|
-
const
|
|
633
|
+
const h = {
|
|
676
634
|
"kanban-general": "to_do_tasks",
|
|
677
635
|
"kanban-campania": "tasksProject"
|
|
678
636
|
};
|
|
679
637
|
try {
|
|
680
|
-
r === "kanban-general" && (
|
|
681
|
-
queryKey: ["tasksProject",
|
|
638
|
+
r === "kanban-general" && (l.invalidateQueries({ queryKey: [h[r], n] }), l.invalidateQueries({ queryKey: ["working_tasks", n] })), r === "kanban-campania" && (l.invalidateQueries({ queryKey: ["tasksProject"] }), l.invalidateQueries({
|
|
639
|
+
queryKey: ["tasksProject", n, o]
|
|
682
640
|
}));
|
|
683
|
-
} catch (
|
|
684
|
-
console.error("Error updating the element:",
|
|
641
|
+
} catch (N) {
|
|
642
|
+
console.error("Error updating the element:", N);
|
|
685
643
|
}
|
|
686
644
|
},
|
|
687
|
-
onError: (
|
|
688
|
-
console.error("Failed to update the task.",
|
|
645
|
+
onError: (h) => {
|
|
646
|
+
console.error("Failed to update the task.", h);
|
|
689
647
|
},
|
|
690
|
-
onMutate: async ({ id:
|
|
691
|
-
await
|
|
648
|
+
onMutate: async ({ id: h }) => {
|
|
649
|
+
await l.cancelQueries({ queryKey: ["working_tasks"] }), await l.cancelQueries({ queryKey: ["to_do_tasks"] });
|
|
692
650
|
}
|
|
693
|
-
}), { mutateAsync:
|
|
651
|
+
}), { mutateAsync: k } = wt({
|
|
694
652
|
mutationFn: m,
|
|
695
653
|
onSuccess: () => {
|
|
696
|
-
const
|
|
654
|
+
const h = {
|
|
697
655
|
"kanban-general": "to_do_tasks",
|
|
698
656
|
"kanban-campania": "tasksProject"
|
|
699
657
|
};
|
|
700
658
|
try {
|
|
701
|
-
|
|
702
|
-
console.log({ oldData:
|
|
703
|
-
}), r === "kanban-general" && (
|
|
704
|
-
queryKey: ["tasksProject",
|
|
659
|
+
l.setQueryData([h[r], n], (N) => {
|
|
660
|
+
console.log({ oldData: N });
|
|
661
|
+
}), r === "kanban-general" && (l.invalidateQueries({ queryKey: [h[r], n] }), l.invalidateQueries({ queryKey: ["done_tasks", n] }), l.invalidateQueries({ queryKey: ["working_tasks", n] })), r === "kanban-campania" && (l.invalidateQueries({ queryKey: ["tasksProject"] }), l.invalidateQueries({
|
|
662
|
+
queryKey: ["tasksProject", n, o]
|
|
705
663
|
}));
|
|
706
|
-
} catch (
|
|
707
|
-
console.error("Error invalidating queries:",
|
|
664
|
+
} catch (N) {
|
|
665
|
+
console.error("Error invalidating queries:", N);
|
|
708
666
|
}
|
|
709
667
|
},
|
|
710
|
-
onError: (
|
|
711
|
-
console.error("Failed to update the task.",
|
|
668
|
+
onError: (h) => {
|
|
669
|
+
console.error("Failed to update the task.", h);
|
|
712
670
|
},
|
|
713
|
-
onMutate: async ({ id:
|
|
714
|
-
await
|
|
671
|
+
onMutate: async ({ id: h }) => {
|
|
672
|
+
await l.cancelQueries({ queryKey: ["working_tasks"] }), await l.cancelQueries({ queryKey: ["done_tasks"] }), await l.cancelQueries({ queryKey: ["to_do_tasks"] });
|
|
715
673
|
}
|
|
716
|
-
}), { mutateAsync:
|
|
717
|
-
mutationFn:
|
|
674
|
+
}), { mutateAsync: C } = wt({
|
|
675
|
+
mutationFn: p,
|
|
718
676
|
onSuccess: () => {
|
|
719
|
-
const
|
|
677
|
+
const h = {
|
|
720
678
|
"kanban-general": "to_do_tasks",
|
|
721
679
|
"kanban-campania": "tasksProject"
|
|
722
680
|
};
|
|
723
681
|
try {
|
|
724
|
-
r === "kanban-general" && (
|
|
725
|
-
queryKey: ["tasksProject",
|
|
682
|
+
r === "kanban-general" && (l.invalidateQueries({ queryKey: [h[r], n] }), l.invalidateQueries({ queryKey: ["done_tasks", n] }), l.invalidateQueries({ queryKey: ["working_tasks", n] })), r === "kanban-campania" && (l.invalidateQueries({ queryKey: ["tasksProject"] }), l.invalidateQueries({
|
|
683
|
+
queryKey: ["tasksProject", n, o]
|
|
726
684
|
}));
|
|
727
|
-
} catch (
|
|
728
|
-
console.error("Error invalidating queries:",
|
|
685
|
+
} catch (N) {
|
|
686
|
+
console.error("Error invalidating queries:", N);
|
|
729
687
|
}
|
|
730
688
|
},
|
|
731
|
-
onError: (
|
|
732
|
-
console.error("Failed to update the task.",
|
|
689
|
+
onError: (h) => {
|
|
690
|
+
console.error("Failed to update the task.", h);
|
|
733
691
|
},
|
|
734
|
-
onMutate: async ({ id:
|
|
735
|
-
await
|
|
692
|
+
onMutate: async ({ id: h }) => {
|
|
693
|
+
await l.cancelQueries({ queryKey: ["working_tasks"] }), await l.cancelQueries({ queryKey: ["done_tasks"] }), await l.cancelQueries({ queryKey: ["to_do_tasks"] });
|
|
736
694
|
}
|
|
737
|
-
}), { mutateAsync: j } =
|
|
738
|
-
mutationFn:
|
|
695
|
+
}), { mutateAsync: j } = wt({
|
|
696
|
+
mutationFn: d,
|
|
739
697
|
onSuccess: () => {
|
|
740
|
-
const
|
|
698
|
+
const h = {
|
|
741
699
|
"kanban-general": "to_do_tasks",
|
|
742
700
|
"kanban-campania": "tasksProject"
|
|
743
701
|
};
|
|
744
702
|
try {
|
|
745
|
-
r === "kanban-general" && (
|
|
746
|
-
queryKey: ["tasksProject",
|
|
703
|
+
r === "kanban-general" && (l.invalidateQueries({ queryKey: [h[r], n] }), l.invalidateQueries({ queryKey: ["done_tasks", n] }), l.invalidateQueries({ queryKey: ["working_tasks", n] })), r === "kanban-campania" && (l.invalidateQueries({ queryKey: ["tasksProject"] }), l.invalidateQueries({
|
|
704
|
+
queryKey: ["tasksProject", n, o]
|
|
747
705
|
}));
|
|
748
|
-
} catch (
|
|
749
|
-
console.error("Error invalidating queries:",
|
|
706
|
+
} catch (N) {
|
|
707
|
+
console.error("Error invalidating queries:", N);
|
|
750
708
|
}
|
|
751
709
|
},
|
|
752
|
-
onError: (
|
|
753
|
-
console.error("Failed to reassign the task.",
|
|
710
|
+
onError: (h) => {
|
|
711
|
+
console.error("Failed to reassign the task.", h);
|
|
754
712
|
},
|
|
755
|
-
onMutate: async ({ id:
|
|
756
|
-
await
|
|
713
|
+
onMutate: async ({ id: h }) => {
|
|
714
|
+
await l.cancelQueries({ queryKey: ["working_tasks"] }), await l.cancelQueries({ queryKey: ["done_tasks"] }), await l.cancelQueries({ queryKey: ["to_do_tasks"] });
|
|
757
715
|
}
|
|
758
716
|
});
|
|
759
717
|
return {
|
|
760
718
|
//* Methods
|
|
761
|
-
updateTask:
|
|
762
|
-
startWorking:
|
|
763
|
-
completeTask: async ({ id:
|
|
764
|
-
await
|
|
719
|
+
updateTask: x,
|
|
720
|
+
startWorking: _,
|
|
721
|
+
completeTask: async ({ id: h }) => {
|
|
722
|
+
await k({ id: h });
|
|
765
723
|
},
|
|
766
|
-
reasignResponsible: async ({ id:
|
|
767
|
-
await j({ id:
|
|
724
|
+
reasignResponsible: async ({ id: h, idNewResponsible: N, typeOfSelect: P }) => {
|
|
725
|
+
await j({ id: h, idNewResponsible: N, typeOfSelect: P });
|
|
768
726
|
},
|
|
769
|
-
updateUnitys: async ({ repeats:
|
|
770
|
-
await
|
|
727
|
+
updateUnitys: async ({ repeats: h, id: N }) => {
|
|
728
|
+
await C({ repeats: h, id: N });
|
|
771
729
|
},
|
|
772
|
-
pauseTask: async ({ id:
|
|
773
|
-
console.log({ taksId:
|
|
730
|
+
pauseTask: async ({ id: h, motiveId: N }) => {
|
|
731
|
+
console.log({ taksId: h, motivoId: N, user: e == null ? void 0 : e.id });
|
|
774
732
|
},
|
|
775
733
|
postPauseTask: y,
|
|
776
|
-
postReanudeTask:
|
|
734
|
+
postReanudeTask: v
|
|
777
735
|
};
|
|
778
|
-
},
|
|
779
|
-
const [e,
|
|
736
|
+
}, $e = ({ id: a }) => {
|
|
737
|
+
const [e, n] = f(!1), { completeTask: r } = ct();
|
|
780
738
|
return { checked: e, checkTask: () => {
|
|
781
|
-
|
|
739
|
+
n(!e), r({ id: a });
|
|
782
740
|
} };
|
|
783
|
-
}, Ut = ({ id: a, nameRequiredTask: e, statusRequiredTask:
|
|
784
|
-
const { checked:
|
|
741
|
+
}, Ut = ({ id: a, nameRequiredTask: e, statusRequiredTask: n, status: r }) => {
|
|
742
|
+
const { checked: l, checkTask: o } = $e({ id: a });
|
|
785
743
|
let s = Math.random().toString();
|
|
786
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
787
745
|
r === 2 && /* @__PURE__ */ t(
|
|
788
746
|
"div",
|
|
789
747
|
{
|
|
790
748
|
className: "tw-bg-success-regular tw-rounded-full tw-flex tw-items-center tw-justify-center tw-mx-[2px] tw-transition-all",
|
|
791
|
-
children: /* @__PURE__ */ t(
|
|
749
|
+
children: /* @__PURE__ */ t(T, { icon: "circle_checked", color: "white", strokeWidth: 4, size: "xs" })
|
|
792
750
|
}
|
|
793
751
|
),
|
|
794
|
-
e !== "" &&
|
|
752
|
+
e !== "" && n === 2 || !e ? r === 1 ? /* @__PURE__ */ t(
|
|
795
753
|
"label",
|
|
796
754
|
{
|
|
797
755
|
htmlFor: s,
|
|
798
|
-
className:
|
|
756
|
+
className: l ? "tw-bg-success-regular tw-rounded-full tw-w-[20px] tw-h-[20px] tw-flex tw-items-center tw-justify-center tw-mx-[2px] tw-transition-all" : "tw-transition-colors",
|
|
799
757
|
children: /* @__PURE__ */ t(
|
|
800
|
-
|
|
758
|
+
T,
|
|
801
759
|
{
|
|
802
|
-
icon:
|
|
803
|
-
color:
|
|
760
|
+
icon: l ? "check_outline" : "circle_checked",
|
|
761
|
+
color: l ? "white" : g.texts.placeholder,
|
|
804
762
|
strokeWidth: 4,
|
|
805
|
-
size:
|
|
763
|
+
size: l ? "xs" : "s"
|
|
806
764
|
}
|
|
807
765
|
)
|
|
808
766
|
}
|
|
809
|
-
) : /* @__PURE__ */ t(
|
|
810
|
-
|
|
767
|
+
) : /* @__PURE__ */ t(R, { children: " " }) : /* @__PURE__ */ t(
|
|
768
|
+
O,
|
|
811
769
|
{
|
|
812
770
|
dispatch: /* @__PURE__ */ t("label", { className: "tw-cursor-help", children: /* @__PURE__ */ t(
|
|
813
|
-
|
|
771
|
+
T,
|
|
814
772
|
{
|
|
815
773
|
icon: "info_circle",
|
|
816
774
|
color: g.warning.regular,
|
|
817
775
|
strokeWidth: 4
|
|
818
776
|
}
|
|
819
777
|
) }),
|
|
820
|
-
children: /* @__PURE__ */
|
|
778
|
+
children: /* @__PURE__ */ i("div", { className: "tw-p-l tw-max-w-[400px] tw-w-fit tw-bg-warning-light tw-rounded-lg tw-border-l-[5px] tw-border-warning-regular tw-text-warning-dark tw-text-s tw-flex tw-flex-col tw-gap-m", children: [
|
|
821
779
|
/* @__PURE__ */ t("p", { className: "tw-font-bold", children: " Requiere completar su tarea requerida: " }),
|
|
822
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ i("p", { children: [
|
|
823
781
|
" ",
|
|
824
782
|
e,
|
|
825
783
|
" "
|
|
@@ -831,18 +789,18 @@ const qe = async ({ filters: a, tasks_api: e, project: l }) => {
|
|
|
831
789
|
"input",
|
|
832
790
|
{
|
|
833
791
|
id: s,
|
|
834
|
-
checked:
|
|
835
|
-
onChange:
|
|
792
|
+
checked: l,
|
|
793
|
+
onChange: o,
|
|
836
794
|
type: "checkbox",
|
|
837
795
|
className: "tw-hidden"
|
|
838
796
|
}
|
|
839
797
|
)
|
|
840
798
|
] });
|
|
841
|
-
},
|
|
842
|
-
/* @__PURE__ */ t(
|
|
799
|
+
}, Pt = ({ trigger: a, user: e, showUser: n = !0 }) => /* @__PURE__ */ t(O, { dispatch: a, children: n && /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2 tw-bg-bg-card tw-w-fit tw-h-fit tw-p-2 tw-rounded-lg tw-border-containers", children: [
|
|
800
|
+
/* @__PURE__ */ t(Q, { imageUrl: e.image ?? "", alt: e.name }),
|
|
843
801
|
/* @__PURE__ */ t("p", { className: "tw-text-s tw-font-bold tw-text-texts-subtext", children: e.name })
|
|
844
802
|
] }) });
|
|
845
|
-
class
|
|
803
|
+
class ze {
|
|
846
804
|
static toDomain(e) {
|
|
847
805
|
return {
|
|
848
806
|
id: e.id,
|
|
@@ -851,23 +809,23 @@ class Me {
|
|
|
851
809
|
};
|
|
852
810
|
}
|
|
853
811
|
}
|
|
854
|
-
const
|
|
812
|
+
const Re = () => {
|
|
855
813
|
const { tasks_api: a } = B();
|
|
856
|
-
return { teams:
|
|
814
|
+
return { teams: ut({
|
|
857
815
|
queryKey: ["teams", "all"],
|
|
858
816
|
queryFn: async () => {
|
|
859
|
-
const
|
|
860
|
-
return
|
|
817
|
+
const n = await a.get("/api/equipos");
|
|
818
|
+
return Y(n.data).map(ze.toDomain);
|
|
861
819
|
}
|
|
862
820
|
}) };
|
|
863
821
|
};
|
|
864
|
-
class
|
|
822
|
+
class Le {
|
|
865
823
|
static toUsers(e) {
|
|
866
|
-
var
|
|
824
|
+
var n, r, l;
|
|
867
825
|
return {
|
|
868
826
|
id: e.id,
|
|
869
827
|
name: e.nombre,
|
|
870
|
-
image: (
|
|
828
|
+
image: (l = (r = (n = e.imagen) == null ? void 0 : n.formats) == null ? void 0 : r.thumbnail) == null ? void 0 : l.url,
|
|
871
829
|
tasksUser: {
|
|
872
830
|
email: e.tasksUser.email,
|
|
873
831
|
id: e.tasksUser.id,
|
|
@@ -876,132 +834,132 @@ class Re {
|
|
|
876
834
|
};
|
|
877
835
|
}
|
|
878
836
|
}
|
|
879
|
-
const
|
|
837
|
+
const Ee = async ({
|
|
880
838
|
tasks_api: a
|
|
881
839
|
}) => {
|
|
882
840
|
try {
|
|
883
841
|
const e = await a.get("/api/allOBPUsers");
|
|
884
|
-
return
|
|
842
|
+
return Y(e.data).map(Le.toUsers);
|
|
885
843
|
} catch (e) {
|
|
886
844
|
throw console.log("Error al obtener los usuarios comerciales", e), `Error al obtener los usuarios comerciales: ${e}`;
|
|
887
845
|
}
|
|
888
|
-
},
|
|
846
|
+
}, Be = () => {
|
|
889
847
|
const { tasks_api: a } = B();
|
|
890
848
|
return {
|
|
891
|
-
users:
|
|
849
|
+
users: ut({
|
|
892
850
|
queryKey: ["users"],
|
|
893
|
-
queryFn: () =>
|
|
851
|
+
queryFn: () => Ee({ tasks_api: a }),
|
|
894
852
|
staleTime: 1e3 * 60 * 60 * 24
|
|
895
853
|
})
|
|
896
854
|
};
|
|
897
|
-
},
|
|
898
|
-
function
|
|
899
|
-
const e = ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"],
|
|
900
|
-
return e[
|
|
855
|
+
}, yt = (a) => new Intl.DateTimeFormat("es-MX", { month: "long" }).format(a);
|
|
856
|
+
function Ie(a) {
|
|
857
|
+
const e = ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], n = new Date(a).getDay();
|
|
858
|
+
return e[n];
|
|
901
859
|
}
|
|
902
860
|
const jt = (a) => {
|
|
903
|
-
let e = a || /* @__PURE__ */ new Date(),
|
|
904
|
-
return `${
|
|
905
|
-
},
|
|
861
|
+
let e = a || /* @__PURE__ */ new Date(), n = e.getDate(), r = yt(e.getMonth()).slice(0, 3), l = e.getFullYear().toString().slice(-2), o = Ie(e).slice(0, 3);
|
|
862
|
+
return `${o.charAt(0).toUpperCase() + o.slice(1)} ${n} ${r.charAt(0).toUpperCase() + r.slice(1)} ${l}`;
|
|
863
|
+
}, vt = (a, e) => ({
|
|
906
864
|
...a,
|
|
907
865
|
image: a.image ? `${e}${a.image}` : ""
|
|
908
|
-
}),
|
|
866
|
+
}), Wt = ({
|
|
909
867
|
users: a,
|
|
910
868
|
onClick: e,
|
|
911
|
-
responsible:
|
|
869
|
+
responsible: n
|
|
912
870
|
}) => {
|
|
913
871
|
const { getOBPUrlApi: r } = B();
|
|
914
|
-
let
|
|
915
|
-
const { setElementPosition:
|
|
916
|
-
|
|
872
|
+
let l = `button-assign-users-${Math.random().toString(36).substring(2, 15)}`;
|
|
873
|
+
const { setElementPosition: o, position: s, clearPosition: u } = bt(), w = V(null), m = () => n ? null : a.length > 3 && /* @__PURE__ */ t(
|
|
874
|
+
O,
|
|
917
875
|
{
|
|
918
876
|
dispatch: /* @__PURE__ */ t("div", { className: "tw-w-[28px] tw-h-[28px] tw-rounded-full tw-bg-primary-regular tw-flex tw-items-center tw-justify-center tw-border-2 tw-border-white tw-ml-[-8px]", children: /* @__PURE__ */ t("p", { className: "tw-text-s tw-font-bold tw-text-white ", children: `+${a.length - 3}` }) }),
|
|
919
|
-
children: /* @__PURE__ */ t("div", { className: "tw-bg-bg-card tw-w-fit tw-h-fit tw-p-2 tw-rounded-lg tw-border-containers", children: a == null ? void 0 : a.slice(3).map((
|
|
920
|
-
/* @__PURE__ */ t(
|
|
921
|
-
/* @__PURE__ */ t("p", { className: "tw-text-s tw-font-bold tw-text-texts-subtext", children:
|
|
922
|
-
] },
|
|
877
|
+
children: /* @__PURE__ */ t("div", { className: "tw-bg-bg-card tw-w-fit tw-h-fit tw-p-2 tw-rounded-lg tw-border-containers", children: a == null ? void 0 : a.slice(3).map((d, x) => /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2 ", children: [
|
|
878
|
+
/* @__PURE__ */ t(Q, { imageUrl: d.image ?? "", alt: d.name }, x),
|
|
879
|
+
/* @__PURE__ */ t("p", { className: "tw-text-s tw-font-bold tw-text-texts-subtext", children: d.name })
|
|
880
|
+
] }, x)) })
|
|
923
881
|
}
|
|
924
|
-
),
|
|
925
|
-
if (
|
|
926
|
-
let
|
|
927
|
-
(
|
|
882
|
+
), p = () => {
|
|
883
|
+
if (n) {
|
|
884
|
+
let d = a.find(
|
|
885
|
+
(x) => x.id === n
|
|
928
886
|
);
|
|
929
887
|
return /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
930
|
-
|
|
888
|
+
Pt,
|
|
931
889
|
{
|
|
932
890
|
trigger: /* @__PURE__ */ t(
|
|
933
|
-
|
|
891
|
+
Q,
|
|
934
892
|
{
|
|
935
|
-
imageUrl:
|
|
936
|
-
alt:
|
|
893
|
+
imageUrl: d == null ? void 0 : d.image,
|
|
894
|
+
alt: d == null ? void 0 : d.name
|
|
937
895
|
},
|
|
938
|
-
|
|
896
|
+
n
|
|
939
897
|
),
|
|
940
|
-
user:
|
|
898
|
+
user: d,
|
|
941
899
|
showUser: !(s != null && s.x)
|
|
942
900
|
}
|
|
943
901
|
) });
|
|
944
902
|
}
|
|
945
|
-
return (a == null ? void 0 : a.length) > 0 && a.slice(0, 3).map((
|
|
946
|
-
|
|
903
|
+
return (a == null ? void 0 : a.length) > 0 && a.slice(0, 3).map((d, x) => /* @__PURE__ */ t("div", { className: `${x === 0 ? "" : "tw-ml-[-8px]"}`, children: /* @__PURE__ */ t(
|
|
904
|
+
Pt,
|
|
947
905
|
{
|
|
948
|
-
trigger: /* @__PURE__ */ t(
|
|
949
|
-
user:
|
|
906
|
+
trigger: /* @__PURE__ */ t(Q, { imageUrl: d.image, alt: d.name }, x),
|
|
907
|
+
user: d,
|
|
950
908
|
showUser: !(s != null && s.x)
|
|
951
909
|
}
|
|
952
910
|
) }));
|
|
953
|
-
}, y = ({ children:
|
|
911
|
+
}, y = ({ children: d }) => /* @__PURE__ */ t(
|
|
954
912
|
"label",
|
|
955
913
|
{
|
|
956
|
-
ref:
|
|
957
|
-
htmlFor:
|
|
914
|
+
ref: w,
|
|
915
|
+
htmlFor: l,
|
|
958
916
|
className: "tw-cursor-pointer tw-flex tw-items-center",
|
|
959
|
-
children:
|
|
917
|
+
children: d
|
|
960
918
|
}
|
|
961
919
|
);
|
|
962
920
|
if (a.length === 0)
|
|
963
|
-
return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(
|
|
964
|
-
const
|
|
965
|
-
var
|
|
966
|
-
const [
|
|
967
|
-
|
|
968
|
-
var
|
|
969
|
-
|
|
970
|
-
}, [
|
|
921
|
+
return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(T, { icon: "user", size: "xs", strokeWidth: 3 }) });
|
|
922
|
+
const v = () => {
|
|
923
|
+
var M;
|
|
924
|
+
const [d, x] = f(), [_, b] = f("team"), { teams: k } = Re(), { users: C } = Be();
|
|
925
|
+
F(() => {
|
|
926
|
+
var S, D;
|
|
927
|
+
w.current && x(((s == null ? void 0 : s.x) ?? 0) - (((D = (S = w.current) == null ? void 0 : S.getBoundingClientRect()) == null ? void 0 : D.width) ?? 0));
|
|
928
|
+
}, [w == null ? void 0 : w.current, s == null ? void 0 : s.x]);
|
|
971
929
|
const j = () => {
|
|
972
|
-
const
|
|
930
|
+
const S = [
|
|
973
931
|
{ id: "team", label: "Equipo" },
|
|
974
932
|
{ id: "responsible", label: "Responsable" }
|
|
975
933
|
];
|
|
976
|
-
return /* @__PURE__ */ t("div", { className: "tw-w-full tw-flex tw-justify-center tw-gap-l tw-text-texts-placeholder tw-font-bold", children:
|
|
934
|
+
return /* @__PURE__ */ t("div", { className: "tw-w-full tw-flex tw-justify-center tw-gap-l tw-text-texts-placeholder tw-font-bold", children: S.map((D, q) => /* @__PURE__ */ t(
|
|
977
935
|
"button",
|
|
978
936
|
{
|
|
979
|
-
className: `tw-w-full tw-text-sm tw-border-texts-placeholder tw-text-center ${
|
|
980
|
-
onClick: () =>
|
|
937
|
+
className: `tw-w-full tw-text-sm tw-border-texts-placeholder tw-text-center ${_ === D.id ? "tw-text-primary-pastel" : ""} ${q === S.length - 1 ? "tw-border-r-0" : " tw-border-r-2"}`,
|
|
938
|
+
onClick: () => b(D.id),
|
|
981
939
|
children: D.label
|
|
982
940
|
}
|
|
983
941
|
)) });
|
|
984
942
|
};
|
|
985
|
-
return (s == null ? void 0 : s.x) &&
|
|
943
|
+
return (s == null ? void 0 : s.x) && pt.createPortal(
|
|
986
944
|
/* @__PURE__ */ t(
|
|
987
945
|
"div",
|
|
988
946
|
{
|
|
989
947
|
"data-portal-host": !0,
|
|
990
|
-
className: `absolute tw-w-[300px] tw-h-fit ${
|
|
991
|
-
style: { top: `${s == null ? void 0 : s.y}px`, left: `${
|
|
992
|
-
children: /* @__PURE__ */
|
|
948
|
+
className: `absolute tw-w-[300px] tw-h-fit ${d ? "tw-block" : "tw-hidden"}`,
|
|
949
|
+
style: { top: `${s == null ? void 0 : s.y}px`, left: `${d}px`, zIndex: 1 },
|
|
950
|
+
children: /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-m tw-bg-bg-card tw-border-cards tw-rounded-lg tw-p-2 tw-max-h-[200px] tw-overflow-y-hidden", children: [
|
|
993
951
|
/* @__PURE__ */ t(j, {}),
|
|
994
952
|
/* @__PURE__ */ t(
|
|
995
|
-
|
|
953
|
+
Rt,
|
|
996
954
|
{
|
|
997
|
-
options:
|
|
998
|
-
id:
|
|
999
|
-
name:
|
|
955
|
+
options: _ === "team" ? k.data.map((S) => ({
|
|
956
|
+
id: S.id,
|
|
957
|
+
name: S.name,
|
|
1000
958
|
image: ""
|
|
1001
|
-
})) : (
|
|
1002
|
-
onselect: (
|
|
959
|
+
})) : (M = C.data) == null ? void 0 : M.map((S) => vt(S, r())),
|
|
960
|
+
onselect: (S) => {
|
|
1003
961
|
var D;
|
|
1004
|
-
|
|
962
|
+
u(), e && e((D = S.tasksUser) == null ? void 0 : D.id, _);
|
|
1005
963
|
}
|
|
1006
964
|
}
|
|
1007
965
|
)
|
|
@@ -1011,106 +969,106 @@ const jt = (a) => {
|
|
|
1011
969
|
document.body
|
|
1012
970
|
);
|
|
1013
971
|
};
|
|
1014
|
-
return /* @__PURE__ */
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
|
|
972
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
973
|
+
/* @__PURE__ */ i(y, { children: [
|
|
974
|
+
p(),
|
|
1017
975
|
m()
|
|
1018
976
|
] }),
|
|
1019
977
|
/* @__PURE__ */ t(
|
|
1020
978
|
"button",
|
|
1021
979
|
{
|
|
1022
980
|
className: "tw-hidden",
|
|
1023
|
-
id:
|
|
1024
|
-
onClick: () =>
|
|
981
|
+
id: l,
|
|
982
|
+
onClick: () => o(w)
|
|
1025
983
|
}
|
|
1026
984
|
),
|
|
1027
|
-
/* @__PURE__ */ t(
|
|
985
|
+
/* @__PURE__ */ t(v, {})
|
|
1028
986
|
] });
|
|
1029
987
|
};
|
|
1030
|
-
function
|
|
988
|
+
function Oe({ items: a }) {
|
|
1031
989
|
var r;
|
|
1032
|
-
const [e,
|
|
1033
|
-
return /* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-mb-2 tw-border-b tw-border-neutral-100 tw-bg-white tw-mt-4", children: a.map((
|
|
990
|
+
const [e, n] = f(1);
|
|
991
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
992
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-mb-2 tw-border-b tw-border-neutral-100 tw-bg-white tw-mt-4", children: a.map((l, o) => /* @__PURE__ */ t(
|
|
1035
993
|
"div",
|
|
1036
994
|
{
|
|
1037
|
-
className: `tw-border-r tw-border-neutral-100 tw-pr-3 tw-py-1 ${
|
|
995
|
+
className: `tw-border-r tw-border-neutral-100 tw-pr-3 tw-py-1 ${o !== 0 ? "tw-px-3" : ""}`,
|
|
1038
996
|
children: /* @__PURE__ */ t(
|
|
1039
|
-
|
|
997
|
+
ft,
|
|
1040
998
|
{
|
|
1041
999
|
variant: "ghost",
|
|
1042
|
-
onClick: () => l
|
|
1043
|
-
className: `tw-text-xl tw-font-normal rounded-none tw-py-1 tw-h-12 ${e ===
|
|
1044
|
-
children:
|
|
1000
|
+
onClick: () => n(l.id),
|
|
1001
|
+
className: `tw-text-xl tw-font-normal rounded-none tw-py-1 tw-h-12 ${e === l.id ? "tw-text-primary tw-border-b tw-border-primary" : "tw-text-neutral-400 tw-border-b-0"}`,
|
|
1002
|
+
children: l.label
|
|
1045
1003
|
},
|
|
1046
|
-
|
|
1004
|
+
l.id
|
|
1047
1005
|
)
|
|
1048
1006
|
},
|
|
1049
|
-
|
|
1007
|
+
l.id
|
|
1050
1008
|
)) }),
|
|
1051
|
-
/* @__PURE__ */ t("div", { className: "tw-pt-4 tw-flex-1 tw-overflow-y-auto tw-bg-white", children: (r = a.find((
|
|
1009
|
+
/* @__PURE__ */ t("div", { className: "tw-pt-4 tw-flex-1 tw-overflow-y-auto tw-bg-white", children: (r = a.find((l) => l.id === e)) == null ? void 0 : r.component })
|
|
1052
1010
|
] });
|
|
1053
1011
|
}
|
|
1054
1012
|
function Ke({ comment: a }) {
|
|
1055
|
-
var
|
|
1056
|
-
const { getImageOBP: e } = B(),
|
|
1013
|
+
var l, o, s, u, w;
|
|
1014
|
+
const { getImageOBP: e } = B(), n = (u = (s = (o = (l = a == null ? void 0 : a.autor) == null ? void 0 : l.imagen) == null ? void 0 : o.formats) == null ? void 0 : s.thumbnail) == null ? void 0 : u.url;
|
|
1057
1015
|
function r(m) {
|
|
1058
|
-
const
|
|
1059
|
-
return
|
|
1016
|
+
const p = se(m);
|
|
1017
|
+
return ne(p, { locale: ht, addSuffix: !0 });
|
|
1060
1018
|
}
|
|
1061
|
-
return /* @__PURE__ */ t("div", { children: /* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */ t(
|
|
1063
|
-
/* @__PURE__ */
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: (
|
|
1019
|
+
return /* @__PURE__ */ t("div", { children: /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-row tw-gap-3 tw-items-start", children: [
|
|
1020
|
+
/* @__PURE__ */ t(Q, { size: "xxl", imageUrl: n ? e(n) : "", alt: "@shadcn" }),
|
|
1021
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
|
|
1022
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-row tw-gap-2", children: [
|
|
1023
|
+
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: (w = a == null ? void 0 : a.autor) == null ? void 0 : w.nombre }),
|
|
1066
1024
|
/* @__PURE__ */ t("span", { className: "tw-text-base tw-text-neutral-600 tw-font-normal tw-mt-[2px]", children: r(a == null ? void 0 : a.createdAt) })
|
|
1067
1025
|
] }),
|
|
1068
1026
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-neutral-600 tw-font-normal", children: a == null ? void 0 : a.comentario })
|
|
1069
1027
|
] })
|
|
1070
1028
|
] }) });
|
|
1071
1029
|
}
|
|
1072
|
-
function Ue({ currentUser: a, data: e, taskId:
|
|
1073
|
-
var
|
|
1074
|
-
const { tasks_api:
|
|
1075
|
-
return
|
|
1030
|
+
function Ue({ currentUser: a, data: e, taskId: n, onNewComment: r }) {
|
|
1031
|
+
var d, x, _;
|
|
1032
|
+
const { tasks_api: l, getImageOBP: o } = B(), { register: s, handleSubmit: u, reset: w } = $t(), [m, p] = f([]), y = (_ = (x = (d = a == null ? void 0 : a.imagen) == null ? void 0 : d.formats) == null ? void 0 : x.thumbnail) == null ? void 0 : _.url;
|
|
1033
|
+
return F(() => {
|
|
1076
1034
|
if (e != null && e.comentarios) {
|
|
1077
|
-
const
|
|
1078
|
-
(
|
|
1035
|
+
const b = [...e.comentarios].sort(
|
|
1036
|
+
(k, C) => new Date(C.createdAt).getTime() - new Date(k.createdAt).getTime()
|
|
1079
1037
|
);
|
|
1080
|
-
|
|
1038
|
+
p(b);
|
|
1081
1039
|
}
|
|
1082
|
-
}, [e]), /* @__PURE__ */
|
|
1083
|
-
/* @__PURE__ */
|
|
1040
|
+
}, [e]), /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-h-full tw-gap-4", children: [
|
|
1041
|
+
/* @__PURE__ */ i(
|
|
1084
1042
|
"form",
|
|
1085
1043
|
{
|
|
1086
|
-
onSubmit:
|
|
1044
|
+
onSubmit: u(async (b) => {
|
|
1087
1045
|
try {
|
|
1088
|
-
const
|
|
1046
|
+
const k = {
|
|
1089
1047
|
autor: {
|
|
1090
1048
|
id: a == null ? void 0 : a.id,
|
|
1091
1049
|
email: a == null ? void 0 : a.email,
|
|
1092
1050
|
nombre: a == null ? void 0 : a.nombre,
|
|
1093
1051
|
imagen: a == null ? void 0 : a.imagen
|
|
1094
1052
|
},
|
|
1095
|
-
comentario:
|
|
1053
|
+
comentario: b == null ? void 0 : b.comment,
|
|
1096
1054
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1097
1055
|
};
|
|
1098
|
-
await
|
|
1056
|
+
await l.post("/api/comentarios", {
|
|
1099
1057
|
data: {
|
|
1100
1058
|
autor: a == null ? void 0 : a.id,
|
|
1101
|
-
comentario:
|
|
1102
|
-
tarea:
|
|
1059
|
+
comentario: b.comment,
|
|
1060
|
+
tarea: n
|
|
1103
1061
|
}
|
|
1104
|
-
}), r(!0),
|
|
1105
|
-
} catch (
|
|
1106
|
-
console.error("Error al agregar comentario:",
|
|
1062
|
+
}), r(!0), p((C) => [k, ...C]), w();
|
|
1063
|
+
} catch (k) {
|
|
1064
|
+
console.error("Error al agregar comentario:", k);
|
|
1107
1065
|
}
|
|
1108
1066
|
}),
|
|
1109
1067
|
className: "tw-flex tw-flex-row tw-items-center tw-gap-3",
|
|
1110
1068
|
children: [
|
|
1111
|
-
/* @__PURE__ */ t(
|
|
1069
|
+
/* @__PURE__ */ t(Q, { size: "xxl", imageUrl: y ? o(y) : "", alt: "@shadcn" }),
|
|
1112
1070
|
/* @__PURE__ */ t(
|
|
1113
|
-
|
|
1071
|
+
le,
|
|
1114
1072
|
{
|
|
1115
1073
|
...s("comment", { required: !0 }),
|
|
1116
1074
|
autoComplete: "off",
|
|
@@ -1121,10 +1079,10 @@ function Ue({ currentUser: a, data: e, taskId: l, onNewComment: r }) {
|
|
|
1121
1079
|
]
|
|
1122
1080
|
}
|
|
1123
1081
|
),
|
|
1124
|
-
m && m.map((
|
|
1082
|
+
m && m.map((b, k) => /* @__PURE__ */ t(Ke, { comment: b }, k))
|
|
1125
1083
|
] });
|
|
1126
1084
|
}
|
|
1127
|
-
function
|
|
1085
|
+
function We({ data: a }) {
|
|
1128
1086
|
const e = {
|
|
1129
1087
|
0: {
|
|
1130
1088
|
color: "tw-bg-gray-400",
|
|
@@ -1142,29 +1100,29 @@ function Oe({ data: a }) {
|
|
|
1142
1100
|
color: "tw-bg-success-regular",
|
|
1143
1101
|
label: "Finalizada"
|
|
1144
1102
|
}
|
|
1145
|
-
},
|
|
1146
|
-
return /* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */ t(
|
|
1103
|
+
}, n = (r) => r ? Dt(new Date(r), "d MMM", { locale: ht }) : "";
|
|
1104
|
+
return /* @__PURE__ */ i("div", { children: [
|
|
1105
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-row tw-items-center tw-gap-4", children: [
|
|
1106
|
+
/* @__PURE__ */ t(oe, { className: "tw-text-2xl tw-font-medium tw-text-neutral-900", children: "Tareas dependientes" }),
|
|
1149
1107
|
/* @__PURE__ */ t("span", { className: "tw-text-lg tw-font-normal tw-text-neutral-600 tw-bg-[#E1EBF9] tw-w-10 tw-h-10 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-text-primary", children: a == null ? void 0 : a.length })
|
|
1150
1108
|
] }),
|
|
1151
1109
|
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-2 tw-border tw-border-neutral-200 tw-rounded-lg tw-mt-3", children: a == null ? void 0 : a.map((r) => {
|
|
1152
|
-
var
|
|
1153
|
-
return /* @__PURE__ */
|
|
1110
|
+
var l, o, s, u, w;
|
|
1111
|
+
return /* @__PURE__ */ i(
|
|
1154
1112
|
"div",
|
|
1155
1113
|
{
|
|
1156
1114
|
className: "tw-flex tw-flex-row tw-w-full tw-items-center tw-justify-between tw-gap-s tw-border-b tw-border-neutral-200 tw-py-1 tw-px-2",
|
|
1157
1115
|
children: [
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */ t(
|
|
1116
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2", children: [
|
|
1117
|
+
/* @__PURE__ */ t(Q, { imageUrl: (u = (s = (o = (l = r.responsable) == null ? void 0 : l.image) == null ? void 0 : o.formats) == null ? void 0 : s.thumbnail) == null ? void 0 : u.url }),
|
|
1160
1118
|
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-font-normal tw-w-[400px] tw-text-nowrap tw-text-ellipsis tw-overflow-hidden", children: r == null ? void 0 : r.texto_corto })
|
|
1161
1119
|
] }),
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-font-normal", children:
|
|
1120
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-1", children: [
|
|
1121
|
+
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-font-normal", children: n(r == null ? void 0 : r.createdAt) }),
|
|
1164
1122
|
/* @__PURE__ */ t(
|
|
1165
1123
|
"div",
|
|
1166
1124
|
{
|
|
1167
|
-
className: `tw-w-4 tw-h-4 tw-bg-gray-400 tw-block tw-rounded-full ${((
|
|
1125
|
+
className: `tw-w-4 tw-h-4 tw-bg-gray-400 tw-block tw-rounded-full ${((w = e[r == null ? void 0 : r.estatus]) == null ? void 0 : w.color) ?? "tw-bg-gray-400"}`
|
|
1168
1126
|
}
|
|
1169
1127
|
)
|
|
1170
1128
|
] })
|
|
@@ -1175,25 +1133,25 @@ function Oe({ data: a }) {
|
|
|
1175
1133
|
}) })
|
|
1176
1134
|
] });
|
|
1177
1135
|
}
|
|
1178
|
-
function Qe({ isOpen: a, setIsOpen: e, taskId:
|
|
1179
|
-
var
|
|
1180
|
-
const [r,
|
|
1181
|
-
|
|
1182
|
-
if (a &&
|
|
1183
|
-
const
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1136
|
+
function Qe({ isOpen: a, setIsOpen: e, taskId: n }) {
|
|
1137
|
+
var C, j, M, S, D, q, h, N, P, c, A, L;
|
|
1138
|
+
const [r, l] = f(null), [o, s] = f(!1), [u, w] = f(!1), [m, p] = f(null), y = (S = (M = (j = (C = r == null ? void 0 : r.responsable) == null ? void 0 : C.imagen) == null ? void 0 : j.formats) == null ? void 0 : M.thumbnail) == null ? void 0 : S.url, { tasks_api: v, getImageOBP: d } = B(), { user: x } = G();
|
|
1139
|
+
F(() => {
|
|
1140
|
+
if (a && n || o) {
|
|
1141
|
+
const $ = async () => {
|
|
1142
|
+
const z = await v.get(`/api/detalleTarea/${n}`);
|
|
1143
|
+
l(z == null ? void 0 : z.data);
|
|
1186
1144
|
}, I = async () => {
|
|
1187
1145
|
var U, H;
|
|
1188
|
-
const
|
|
1189
|
-
emailList: [(U =
|
|
1146
|
+
const z = await v.get(`/api/users/${x.id}`), E = await v.post("/api/obtenerUsuarioOBP/", {
|
|
1147
|
+
emailList: [(U = z == null ? void 0 : z.data) == null ? void 0 : U.email]
|
|
1190
1148
|
});
|
|
1191
|
-
|
|
1149
|
+
p((H = E == null ? void 0 : E.data) == null ? void 0 : H.data[0]);
|
|
1192
1150
|
};
|
|
1193
|
-
|
|
1151
|
+
$(), I();
|
|
1194
1152
|
}
|
|
1195
|
-
}, [a,
|
|
1196
|
-
const
|
|
1153
|
+
}, [a, n, o]);
|
|
1154
|
+
const _ = {
|
|
1197
1155
|
0: {
|
|
1198
1156
|
label: "Sin prioridad",
|
|
1199
1157
|
color: "tw-text-primary-regular",
|
|
@@ -1214,16 +1172,16 @@ function Qe({ isOpen: a, setIsOpen: e, taskId: l }) {
|
|
|
1214
1172
|
color: "tw-text-danger-regular",
|
|
1215
1173
|
iconColor: "#C34335"
|
|
1216
1174
|
}
|
|
1217
|
-
},
|
|
1218
|
-
locale:
|
|
1219
|
-
}) : "Fecha no disponible",
|
|
1175
|
+
}, b = ($) => $ ? Dt($, "d MMM yyyy, h:mmaaa", {
|
|
1176
|
+
locale: ht
|
|
1177
|
+
}) : "Fecha no disponible", k = [
|
|
1220
1178
|
{
|
|
1221
1179
|
id: 1,
|
|
1222
1180
|
label: "Todo",
|
|
1223
1181
|
component: /* @__PURE__ */ t(
|
|
1224
1182
|
Ue,
|
|
1225
1183
|
{
|
|
1226
|
-
taskId:
|
|
1184
|
+
taskId: n,
|
|
1227
1185
|
currentUser: m,
|
|
1228
1186
|
data: r,
|
|
1229
1187
|
onNewComment: s
|
|
@@ -1233,11 +1191,11 @@ function Qe({ isOpen: a, setIsOpen: e, taskId: l }) {
|
|
|
1233
1191
|
{
|
|
1234
1192
|
id: 2,
|
|
1235
1193
|
label: "Dependencias",
|
|
1236
|
-
component: /* @__PURE__ */ t(
|
|
1194
|
+
component: /* @__PURE__ */ t(We, { data: r == null ? void 0 : r.ids_t_dependientes })
|
|
1237
1195
|
}
|
|
1238
1196
|
];
|
|
1239
|
-
return a &&
|
|
1240
|
-
/* @__PURE__ */
|
|
1197
|
+
return a && pt.createPortal(
|
|
1198
|
+
/* @__PURE__ */ i(R, { children: [
|
|
1241
1199
|
/* @__PURE__ */ t(
|
|
1242
1200
|
"div",
|
|
1243
1201
|
{
|
|
@@ -1249,18 +1207,18 @@ function Qe({ isOpen: a, setIsOpen: e, taskId: l }) {
|
|
|
1249
1207
|
"section",
|
|
1250
1208
|
{
|
|
1251
1209
|
className: `tw-fixed tw-top-0 tw-bottom-0 tw-bg-white tw-bg-opacity-50 tw-flex tw-justify-center tw-items-center tw-w-[55rem] tw-h-screen tw-z-50 tw-overflow-hidden tw-transition-all tw-ease-in-out tw-duration-500 tw-shadow-2xl ${a ? "tw-right-0 tw-pointer-events-auto tw-block" : "tw-right-[-100%] tw-pointer-events-none tw-hidden"}`,
|
|
1252
|
-
children: /* @__PURE__ */
|
|
1253
|
-
/* @__PURE__ */
|
|
1254
|
-
/* @__PURE__ */
|
|
1255
|
-
((D = r == null ? void 0 : r.id_t_requerida) == null ? void 0 : D.id) && /* @__PURE__ */
|
|
1210
|
+
children: /* @__PURE__ */ i("div", { className: "tw-flex tw-w-full tw-h-full tw-flex-col tw-overflow-y-scroll tw-bg-white tw-border-none tw-shadow-xl tw-px-6 tw-py-10", children: [
|
|
1211
|
+
/* @__PURE__ */ i("div", { className: "tw-w-full tw-flex tw-items-center tw-flex-row tw-justify-between tw-pb-4 tw-gap-10 tw-border-none", children: [
|
|
1212
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-row tw-items-start tw-gap-2 tw-relative", children: [
|
|
1213
|
+
((D = r == null ? void 0 : r.id_t_requerida) == null ? void 0 : D.id) && /* @__PURE__ */ i(R, { children: [
|
|
1256
1214
|
/* @__PURE__ */ t(
|
|
1257
1215
|
"div",
|
|
1258
1216
|
{
|
|
1259
1217
|
className: "tw-cursor-help",
|
|
1260
|
-
onMouseOver: () =>
|
|
1261
|
-
onMouseLeave: () =>
|
|
1218
|
+
onMouseOver: () => w(!0),
|
|
1219
|
+
onMouseLeave: () => w(!1),
|
|
1262
1220
|
children: /* @__PURE__ */ t(
|
|
1263
|
-
|
|
1221
|
+
T,
|
|
1264
1222
|
{
|
|
1265
1223
|
icon: "info_circle",
|
|
1266
1224
|
color: g.warning.regular,
|
|
@@ -1269,7 +1227,7 @@ function Qe({ isOpen: a, setIsOpen: e, taskId: l }) {
|
|
|
1269
1227
|
)
|
|
1270
1228
|
}
|
|
1271
1229
|
),
|
|
1272
|
-
|
|
1230
|
+
u && /* @__PURE__ */ i(
|
|
1273
1231
|
"div",
|
|
1274
1232
|
{
|
|
1275
1233
|
style: {
|
|
@@ -1278,30 +1236,33 @@ function Qe({ isOpen: a, setIsOpen: e, taskId: l }) {
|
|
|
1278
1236
|
className: "tw-p-l tw-max-w-[400px] tw-absolute tw-w-fit tw-bg-warning-light tw-rounded-lg tw-border-l-[5px] tw-border-warning-regular tw-text-warning-dark tw-text-xs tw-flex tw-flex-col tw-gap-m",
|
|
1279
1237
|
children: [
|
|
1280
1238
|
/* @__PURE__ */ t("p", { className: "tw-font-bold", children: "Requiere completar su tarea requerida:" }),
|
|
1281
|
-
/* @__PURE__ */ t("p", { className: "tw-text-2xl tw-text-neutral-600 tw-font-normal", children: (
|
|
1239
|
+
/* @__PURE__ */ t("p", { className: "tw-text-2xl tw-text-neutral-600 tw-font-normal", children: (q = r == null ? void 0 : r.id_t_requerida) == null ? void 0 : q.texto_corto })
|
|
1282
1240
|
]
|
|
1283
1241
|
}
|
|
1284
1242
|
)
|
|
1285
1243
|
] }),
|
|
1286
|
-
/* @__PURE__ */ t("h3", { className: "tw-text-3xl tw-font-semibold tw-text-neutral-900", children:
|
|
1244
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-items-center tw-gap-2", children: /* @__PURE__ */ i("h3", { className: "tw-text-3xl tw-font-semibold tw-text-neutral-900", children: [
|
|
1245
|
+
r == null ? void 0 : r.texto_corto,
|
|
1246
|
+
(r == null ? void 0 : r.atraso) || /* @__PURE__ */ t(St, { content: "Tarea atrasada", position: "right", children: /* @__PURE__ */ t("button", { className: "tw-inline-block tw-align-middle tw-ml-2 tw-h-fit", children: /* @__PURE__ */ t(T, { icon: "exclamation_triangle", color: g.warning.dark, style: { width: "20px", height: "20px" } }) }) })
|
|
1247
|
+
] }) })
|
|
1287
1248
|
] }),
|
|
1288
1249
|
/* @__PURE__ */ t(
|
|
1289
|
-
|
|
1250
|
+
ft,
|
|
1290
1251
|
{
|
|
1291
1252
|
variant: "shadow",
|
|
1292
1253
|
size: "sm",
|
|
1293
1254
|
onClick: () => e(!1),
|
|
1294
1255
|
className: "tw-bg-neutral-100 tw-w-12 tw-h-12",
|
|
1295
|
-
children: /* @__PURE__ */ t(
|
|
1256
|
+
children: /* @__PURE__ */ t(T, { icon: "x_outline" })
|
|
1296
1257
|
}
|
|
1297
1258
|
)
|
|
1298
1259
|
] }),
|
|
1299
|
-
/* @__PURE__ */ t("div", { className: "tw-w-full tw-flex tw-flex-row tw-justify-between tw-mt-6", children: /* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ t("div", { className: "tw-w-full tw-flex tw-flex-row tw-justify-between tw-mt-6", children: /* @__PURE__ */ i("span", { className: "tw-text-neutral-600 tw-text-xl", children: [
|
|
1300
1261
|
r == null ? void 0 : r.campania,
|
|
1301
1262
|
" / ",
|
|
1302
1263
|
r == null ? void 0 : r.nombre_medio
|
|
1303
1264
|
] }) }),
|
|
1304
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ i("div", { className: "tw-w-full tw-flex tw-flex-col tw-gap-3 tw-mt-8", children: [
|
|
1305
1266
|
/* @__PURE__ */ t("h6", { className: "tw-text-neutral-900 tw-font-semibold tw-text-2xl", children: "Descripción" }),
|
|
1306
1267
|
/* @__PURE__ */ t("p", { className: "tw-text-neutral-600 tw-font-normal tw-text-sm", children: (r == null ? void 0 : r.texto_largo) ?? "Sin descripción" })
|
|
1307
1268
|
] }),
|
|
@@ -1312,77 +1273,77 @@ function Qe({ isOpen: a, setIsOpen: e, taskId: l }) {
|
|
|
1312
1273
|
collapsible: !0,
|
|
1313
1274
|
defaultValue: "item-1",
|
|
1314
1275
|
className: "tw-w-full tw-flex tw-flex-col tw-border tw-border-neutral-200 tw-rounded-xl tw-mt-6",
|
|
1315
|
-
children: /* @__PURE__ */
|
|
1316
|
-
/* @__PURE__ */ t(
|
|
1317
|
-
/* @__PURE__ */ t(
|
|
1318
|
-
/* @__PURE__ */
|
|
1276
|
+
children: /* @__PURE__ */ i(ce, { value: "item-1", className: "tw-border-none", children: [
|
|
1277
|
+
/* @__PURE__ */ t(we, { className: "tw-text-neutral-900 tw-font-medium tw-text-2xl tw-w-full tw-flex tw-flex-row tw-border-b tw-border-neutral-200 tw-p-4", children: "Detalles" }),
|
|
1278
|
+
/* @__PURE__ */ t(de, { className: "tw-border-none", children: /* @__PURE__ */ i("div", { className: "tw-w-full tw-grid tw-grid-cols-3 tw-gap-4 tw-p-4", children: [
|
|
1279
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1319
1280
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Responsable" }),
|
|
1320
|
-
(
|
|
1281
|
+
(h = r == null ? void 0 : r.responsable) != null && h.nombre ? /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-row tw-gap-2 tw-items-center", children: [
|
|
1321
1282
|
/* @__PURE__ */ t(
|
|
1322
|
-
|
|
1283
|
+
Q,
|
|
1323
1284
|
{
|
|
1324
1285
|
size: "xxl",
|
|
1325
|
-
imageUrl: y ?
|
|
1286
|
+
imageUrl: y ? d(y) : "",
|
|
1326
1287
|
alt: "@shadcn"
|
|
1327
1288
|
}
|
|
1328
1289
|
),
|
|
1329
|
-
/* @__PURE__ */ t("span", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: (
|
|
1290
|
+
/* @__PURE__ */ t("span", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: (N = r == null ? void 0 : r.responsable) == null ? void 0 : N.nombre })
|
|
1330
1291
|
] }) : /* @__PURE__ */ t("span", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: "Sin responsable" })
|
|
1331
1292
|
] }),
|
|
1332
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1333
1294
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Equipo asignado" }),
|
|
1334
|
-
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-gap-2", children: /* @__PURE__ */ t("span", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: ((
|
|
1295
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-gap-2", children: /* @__PURE__ */ t("span", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: ((P = r == null ? void 0 : r.equipo) == null ? void 0 : P.nombre) ?? "Sin equipo" }) })
|
|
1335
1296
|
] }),
|
|
1336
|
-
/* @__PURE__ */
|
|
1297
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1337
1298
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Prioridad" }),
|
|
1338
|
-
/* @__PURE__ */
|
|
1299
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-row tw-items-center tw-gap-2", children: [
|
|
1339
1300
|
/* @__PURE__ */ t(
|
|
1340
|
-
|
|
1301
|
+
T,
|
|
1341
1302
|
{
|
|
1342
1303
|
icon: "flag",
|
|
1343
1304
|
size: "xs",
|
|
1344
1305
|
strokeWidth: 5,
|
|
1345
|
-
color: (
|
|
1306
|
+
color: (c = _[r == null ? void 0 : r.prioridad]) == null ? void 0 : c.iconColor
|
|
1346
1307
|
}
|
|
1347
1308
|
),
|
|
1348
1309
|
/* @__PURE__ */ t(
|
|
1349
1310
|
"span",
|
|
1350
1311
|
{
|
|
1351
|
-
className: `tw-text-lg tw-text-neutral-600 tw-font-normal ${(A =
|
|
1352
|
-
children: ((L =
|
|
1312
|
+
className: `tw-text-lg tw-text-neutral-600 tw-font-normal ${(A = _[r == null ? void 0 : r.prioridad]) == null ? void 0 : A.color}`,
|
|
1313
|
+
children: ((L = _[r == null ? void 0 : r.prioridad]) == null ? void 0 : L.label) ?? "Sin prioridad"
|
|
1353
1314
|
}
|
|
1354
1315
|
)
|
|
1355
1316
|
] })
|
|
1356
1317
|
] }),
|
|
1357
|
-
/* @__PURE__ */
|
|
1318
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1358
1319
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Lista" }),
|
|
1359
1320
|
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-gap-2", children: /* @__PURE__ */ t("span", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: (r == null ? void 0 : r.lista) ?? "Sin lista" }) })
|
|
1360
1321
|
] }),
|
|
1361
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1362
1323
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Fecha estimada de inicio" }),
|
|
1363
|
-
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children:
|
|
1324
|
+
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: b(r == null ? void 0 : r.f_inicio_estimada) })
|
|
1364
1325
|
] }),
|
|
1365
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1366
1327
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Fecha estimada de fin" }),
|
|
1367
|
-
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children:
|
|
1328
|
+
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: b(r == null ? void 0 : r.f_fin_estimada) })
|
|
1368
1329
|
] }),
|
|
1369
|
-
/* @__PURE__ */
|
|
1330
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1370
1331
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Fecha de fin" }),
|
|
1371
|
-
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children:
|
|
1332
|
+
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: b(r == null ? void 0 : r.ffin) })
|
|
1372
1333
|
] }),
|
|
1373
|
-
/* @__PURE__ */
|
|
1334
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1374
1335
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Creado" }),
|
|
1375
|
-
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children:
|
|
1336
|
+
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: b(r == null ? void 0 : r.createdAt) })
|
|
1376
1337
|
] }),
|
|
1377
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1378
1339
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-text-neutral-900 tw-font-medium", children: "Última modificación" }),
|
|
1379
|
-
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children:
|
|
1340
|
+
/* @__PURE__ */ t("p", { className: "tw-text-lg tw-text-neutral-600 tw-font-normal", children: b(r == null ? void 0 : r.updatedAt) })
|
|
1380
1341
|
] })
|
|
1381
1342
|
] }) })
|
|
1382
1343
|
] })
|
|
1383
1344
|
}
|
|
1384
1345
|
),
|
|
1385
|
-
/* @__PURE__ */ t(
|
|
1346
|
+
/* @__PURE__ */ t(Oe, { items: k })
|
|
1386
1347
|
] })
|
|
1387
1348
|
}
|
|
1388
1349
|
)
|
|
@@ -1390,65 +1351,288 @@ function Qe({ isOpen: a, setIsOpen: e, taskId: l }) {
|
|
|
1390
1351
|
document.body
|
|
1391
1352
|
);
|
|
1392
1353
|
}
|
|
1393
|
-
const
|
|
1394
|
-
const
|
|
1395
|
-
return
|
|
1396
|
-
|
|
1354
|
+
const He = ({ children: a, actionsRef: e, newPosition: n, className: r }) => {
|
|
1355
|
+
const [l, o] = f(), [s, u] = f(!1);
|
|
1356
|
+
return F(() => {
|
|
1357
|
+
var w, m;
|
|
1358
|
+
if (e.current && n) {
|
|
1359
|
+
const p = ((n == null ? void 0 : n.x) ?? 0) - (((m = (w = e.current) == null ? void 0 : w.getBoundingClientRect()) == null ? void 0 : m.width) ?? 0);
|
|
1360
|
+
o(p), requestAnimationFrame(() => {
|
|
1361
|
+
u(!0);
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
return () => {
|
|
1365
|
+
u(!1), o(void 0);
|
|
1366
|
+
};
|
|
1367
|
+
}, [e == null ? void 0 : e.current, n == null ? void 0 : n.x]), !n || l === void 0 ? null : pt.createPortal(
|
|
1368
|
+
/* @__PURE__ */ t(
|
|
1369
|
+
"div",
|
|
1370
|
+
{
|
|
1371
|
+
"data-portal-host": !0,
|
|
1372
|
+
className: `
|
|
1373
|
+
tw-absolute tw-w-fit tw-h-fit
|
|
1374
|
+
tw-transition-all tw-duration-200 tw-ease-in-out
|
|
1375
|
+
tw-pointer-events-auto
|
|
1376
|
+
${s ? "tw-opacity-100" : "tw-opacity-0 tw-invisible"}
|
|
1377
|
+
${r}
|
|
1378
|
+
`,
|
|
1379
|
+
style: {
|
|
1380
|
+
top: `${n == null ? void 0 : n.y}px`,
|
|
1381
|
+
left: `${l}px`,
|
|
1382
|
+
zIndex: 1,
|
|
1383
|
+
transform: s ? "translateY(0)" : "translateY(8px)"
|
|
1384
|
+
},
|
|
1385
|
+
children: a
|
|
1386
|
+
}
|
|
1387
|
+
),
|
|
1388
|
+
document.body
|
|
1389
|
+
);
|
|
1390
|
+
}, Qt = ({ status: a, nameRequiredTask: e, statusRequiredTask: n, id: r, statusLateTask: l = null }) => {
|
|
1391
|
+
const { setElementPosition: o, position: s } = bt(), u = V(null), { startWorking: w, completeTask: m } = ct(), p = V(!1), [y, v] = f(!1), [d, x] = f(null), [_, b] = f("first"), k = e !== "" && n === 2, [C, j] = f(null), M = (N) => {
|
|
1392
|
+
b(N);
|
|
1393
|
+
}, S = () => {
|
|
1394
|
+
const N = [
|
|
1395
|
+
{ name: "Mover a lista", icon: "arrow_right", onClick: () => M("second") },
|
|
1396
|
+
{ name: "Quitar atraso", icon: null, onClick: () => M("third") }
|
|
1397
|
+
];
|
|
1398
|
+
return p != null && p.current ? /* @__PURE__ */ t("div", { className: "tw-w-max tw-h-fit tw-bg-bg-card tw-rounded-lg tw-p-l tw-shadow-lg tw-flex tw-items-center tw-gap-2 tw-hover:bg-primary-light tw-transition-all tw-duration-200 tw-ease-in-out tw-translate-x-0", children: /* @__PURE__ */ t("p", { className: "tw-text-sm tw-font-normal tw-text-primary-pastel tw-font-regular", children: "Moviendo..." }) }) : /* @__PURE__ */ i("div", { className: "tw-w-max tw-h-fit tw-flex tw-flex-col tw-bg-bg-card tw-rounded-lg tw-p-l tw-shadow-lg tw-gap-3 tw-transition-all tw-duration-200 tw-ease-in-out tw-translate-x-0", children: [
|
|
1399
|
+
N.map(({ name: P, icon: c, onClick: A }, L) => /* @__PURE__ */ i(
|
|
1400
|
+
"button",
|
|
1401
|
+
{
|
|
1402
|
+
onClick: A,
|
|
1403
|
+
className: `
|
|
1404
|
+
tw-flex tw-items-center tw-justify-between tw-transition-colors tw-duration-200 tw-pl-3 tw-pr-10 tw-rounded-md
|
|
1405
|
+
tw-text-[14px] tw-text-texts-placeholder tw-font-regular tw-text-left tw-border tw-gap-2
|
|
1406
|
+
hover:tw-bg-[#e1ebf9] hover:tw-text-primary-dark
|
|
1407
|
+
${d === P ? "tw-bg-content tw-text-primary-dark tw-border tw-border-primary-regular" : "tw-border-bg-card"}
|
|
1408
|
+
`,
|
|
1409
|
+
children: [
|
|
1410
|
+
P,
|
|
1411
|
+
c && /* @__PURE__ */ t(
|
|
1412
|
+
T,
|
|
1413
|
+
{
|
|
1414
|
+
icon: c,
|
|
1415
|
+
size: "xs",
|
|
1416
|
+
strokeWidth: 4,
|
|
1417
|
+
color: g.primary.regular,
|
|
1418
|
+
className: "tw-justify-end"
|
|
1419
|
+
}
|
|
1420
|
+
)
|
|
1421
|
+
]
|
|
1422
|
+
},
|
|
1423
|
+
L
|
|
1424
|
+
)),
|
|
1425
|
+
/* @__PURE__ */ t(
|
|
1426
|
+
"button",
|
|
1427
|
+
{
|
|
1428
|
+
className: "tw-w-full tw-h-fit tw-bg-texts-enfasis tw-rounded-lg tw-p-1",
|
|
1429
|
+
onClick: () => {
|
|
1430
|
+
p.current = !0, d === "Trabajando" ? w({ id: r }) : m({ id: r });
|
|
1431
|
+
},
|
|
1432
|
+
children: /* @__PURE__ */ t("p", { className: "tw-text-[12px] tw-font-normal tw-text-white", children: "Mover" })
|
|
1433
|
+
}
|
|
1434
|
+
)
|
|
1435
|
+
] });
|
|
1436
|
+
}, D = () => /* @__PURE__ */ i("div", { className: "tw-w-max tw-h-fit tw-flex tw-flex-col tw-bg-bg-card tw-rounded-lg tw-p-l tw-shadow-lg tw-gap-3 tw-transition-all tw-duration-200 tw-ease-in-out tw-translate-x-0", children: [
|
|
1437
|
+
["Trabajando", "Completadas"].map((P, c) => /* @__PURE__ */ t(
|
|
1397
1438
|
"button",
|
|
1398
1439
|
{
|
|
1399
|
-
ref: c,
|
|
1400
1440
|
onClick: () => {
|
|
1401
|
-
|
|
1402
|
-
c
|
|
1403
|
-
);
|
|
1441
|
+
x(P);
|
|
1404
1442
|
},
|
|
1405
|
-
className:
|
|
1406
|
-
|
|
1443
|
+
className: `
|
|
1444
|
+
tw-transition-colors tw-duration-200
|
|
1445
|
+
hover:tw-bg-[#e1ebf9]
|
|
1446
|
+
tw-pl-3 tw-pr-10
|
|
1447
|
+
tw-rounded-md
|
|
1448
|
+
hover:tw-text-primary-dark
|
|
1449
|
+
tw-text-[14px]
|
|
1450
|
+
tw-text-texts-placeholder
|
|
1451
|
+
tw-font-regular
|
|
1452
|
+
tw-text-left
|
|
1453
|
+
tw-border
|
|
1454
|
+
${d === P ? "tw-bg-content tw-text-primary-dark tw-border tw-border-primary-regular" : "tw-border-bg-card"}
|
|
1455
|
+
`,
|
|
1456
|
+
children: P
|
|
1457
|
+
},
|
|
1458
|
+
c
|
|
1459
|
+
)),
|
|
1460
|
+
/* @__PURE__ */ t(
|
|
1461
|
+
"button",
|
|
1462
|
+
{
|
|
1463
|
+
className: "tw-w-full tw-h-fit tw-bg-texts-enfasis tw-rounded-lg tw-p-1",
|
|
1464
|
+
onClick: () => {
|
|
1465
|
+
p.current = !0, d === "Trabajando" ? w({ id: r }) : m({ id: r });
|
|
1466
|
+
},
|
|
1467
|
+
children: /* @__PURE__ */ t("p", { className: "tw-text-[12px] tw-font-normal tw-text-white", children: "Mover" })
|
|
1407
1468
|
}
|
|
1408
|
-
)
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1469
|
+
)
|
|
1470
|
+
] }), q = () => {
|
|
1471
|
+
let N = null;
|
|
1472
|
+
return /* @__PURE__ */ i("div", { className: "tw-w-[288px] tw-h-fit tw-flex tw-flex-col tw-bg-bg-card tw-rounded-lg tw-p-l tw-shadow-lg tw-gap-3 tw-transition-all tw-duration-200 tw-ease-in-out tw-translate-x-0", children: [
|
|
1473
|
+
C ? /* @__PURE__ */ i(R, { children: [
|
|
1474
|
+
/* @__PURE__ */ t("p", { className: "tw-text-[14px] tw-text-black-black_medium tw-font-semibold tw-text-left", children: "¿Estas seguro?" }),
|
|
1475
|
+
/* @__PURE__ */ t("p", { className: "tw-text-[14px] tw-text-black-black_medium tw-font-semibold tw-text-left", children: "Estás eliminando el atraso de la tarea seleccionada" })
|
|
1476
|
+
] }) : /* @__PURE__ */ i(R, { children: [
|
|
1477
|
+
/* @__PURE__ */ t("p", { className: "tw-text-[14px] tw-text-black-black_regular tw-font-semibold tw-text-left tw-mb-[11px]", children: "Atraso de tarea" }),
|
|
1478
|
+
/* @__PURE__ */ t(Ve, { isOpen: !0, options: [
|
|
1479
|
+
"Reprogramación de entrega de PDC, logística de mensajería/envió",
|
|
1480
|
+
"Dimensiones de paquete requieren mayor logística por paquetería",
|
|
1481
|
+
"Atraso por alta demanda, fila de impresión más extensa (tiempo)",
|
|
1482
|
+
"Pendiente a la autorización del arte por administración",
|
|
1483
|
+
"Fallas técnicas en la imprenta",
|
|
1484
|
+
"Temporada alta, se extendieron los días de entrega",
|
|
1485
|
+
"Paquetería extraviada",
|
|
1486
|
+
"El paquete no se pudo entregar, no se encontró al remitente",
|
|
1487
|
+
"Falta de información compartida a paquetería",
|
|
1488
|
+
"Dimensiones de paquete requieren mayor logística por paquetería",
|
|
1489
|
+
"Condiciones climáticas",
|
|
1490
|
+
"Condiciones climáticas",
|
|
1491
|
+
"En espera de autorización de accesos",
|
|
1492
|
+
"Capacidad limitada del proveedor para instalar muchas unidades",
|
|
1493
|
+
"Material incompleto o dañado",
|
|
1494
|
+
"Estructura dañada, no se puede instalar",
|
|
1495
|
+
"Zona caliente, restricciones para instalar (días, horarios)",
|
|
1496
|
+
"No se encuentran las unidades solicitadas",
|
|
1497
|
+
"Unidad asignada entro a taller",
|
|
1498
|
+
"Retraso en entrega de fotos de día por parte de proveedores",
|
|
1499
|
+
"Alta demanda de reportes",
|
|
1500
|
+
"No se encuentran las unidades para toma de fotos",
|
|
1501
|
+
"Fallas técnicas en el equipo de toma de fotos",
|
|
1502
|
+
"Testigos recibidos no cumplen con los lineamientos (estándares calidad)"
|
|
1503
|
+
], onSelect: (c) => N = c })
|
|
1504
|
+
] }),
|
|
1505
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-gap-3 tw-justify-end tw-my-[11px]", children: [
|
|
1417
1506
|
/* @__PURE__ */ t(
|
|
1418
|
-
"
|
|
1507
|
+
"button",
|
|
1419
1508
|
{
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1509
|
+
className: `tw-w-fit tw-h-fit tw-bg-silver-silver_light tw-rounded-lg tw-py-[8px] tw-px-[13px] tw-text-[14px]
|
|
1510
|
+
tw-font-semibold tw-text-blue-blue_dark tw-shadow-[0px_1px_4px_0px_rgba(37,37,37,0.20)] tw-border tw-border-blue-blue_medium tw-transition-all tw-duration-200 tw-ease-in-out hover:tw-border-texts-enfasis`,
|
|
1511
|
+
onClick: () => {
|
|
1512
|
+
C ? j(null) : v(!1);
|
|
1513
|
+
},
|
|
1514
|
+
children: C ? "Regresar" : "Cancelar"
|
|
1424
1515
|
}
|
|
1425
1516
|
),
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1517
|
+
/* @__PURE__ */ t(
|
|
1518
|
+
"button",
|
|
1519
|
+
{
|
|
1520
|
+
className: `tw-w-fit tw-h-fit tw-bg-texts-enfasis tw-rounded-lg tw-py-[8px] tw-px-[13px] tw-text-[14px]
|
|
1521
|
+
tw-font-semibold tw-text-blue-blue_light tw-shadow-[0px_1px_4px_0px_rgba(37,37,37,0.20)] tw-border tw-border-texts-enfasis`,
|
|
1522
|
+
onClick: () => {
|
|
1523
|
+
j(N);
|
|
1524
|
+
},
|
|
1525
|
+
children: "Aceptar"
|
|
1526
|
+
}
|
|
1527
|
+
)
|
|
1528
|
+
] })
|
|
1529
|
+
] });
|
|
1530
|
+
};
|
|
1531
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
1532
|
+
(k && n === 2 || !e) && /* @__PURE__ */ t(
|
|
1533
|
+
"button",
|
|
1534
|
+
{
|
|
1535
|
+
ref: u,
|
|
1536
|
+
onClick: () => {
|
|
1537
|
+
o(
|
|
1538
|
+
u
|
|
1539
|
+
), v(!0), b("first");
|
|
1540
|
+
},
|
|
1541
|
+
className: "tw-flex tw-items-center tw-justify-center tw-text-sm tw-font-extrabold tw-bg-bg tw-hover:filter-[drop-shadow(0_0_10px_#000000)] tw-rounded-full tw-w-[24px] tw-h-[24px] tw-m-block",
|
|
1542
|
+
children: /* @__PURE__ */ t("span", { className: "tw-rotate-90", children: /* @__PURE__ */ t(T, { icon: "elipsis", size: "xs" }) })
|
|
1543
|
+
}
|
|
1544
|
+
),
|
|
1545
|
+
y && /* @__PURE__ */ t(He, { actionsRef: u, newPosition: s, children: /* @__PURE__ */ t("div", { className: `
|
|
1546
|
+
tw-transition-all tw-duration-300 tw-ease
|
|
1547
|
+
${_ === "second" ? "tw-translate-x-[-8px]" : "tw-translate-x-0"}
|
|
1548
|
+
`, children: _ === "first" ? S() : _ === "second" ? D() : q() }) })
|
|
1549
|
+
] });
|
|
1550
|
+
}, Ve = ({ isOpen: a, onClose: e, options: n, onSelect: r, placeholderDropdown: l = "Seleccione una opción", placeholderInput: o = "Texto ejemplo" }) => {
|
|
1551
|
+
const [s, u] = f(!1), [w, m] = f(""), [p, y] = f(null);
|
|
1552
|
+
if (!a) return null;
|
|
1553
|
+
const v = n.filter(
|
|
1554
|
+
(d) => d.toLowerCase().includes(w.toLowerCase())
|
|
1555
|
+
);
|
|
1556
|
+
return /* @__PURE__ */ i("div", { className: "tw-relative tw-group tw-min-w-[150px] tw-w-full", children: [
|
|
1557
|
+
/* @__PURE__ */ i(
|
|
1429
1558
|
"button",
|
|
1430
1559
|
{
|
|
1431
|
-
|
|
1560
|
+
id: "dropdown-button",
|
|
1561
|
+
className: `tw-inline-flex tw-justify-center tw-w-full tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-text-gray-700 tw-bg-white tw-border
|
|
1562
|
+
tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-focus:outline-none tw-focus:ring-2 tw-focus:ring-offset-2
|
|
1563
|
+
tw-focus:ring-offset-gray-100 tw-focus:ring-blue-500 tw-justify-between tw-items-center tw-transition-all tw-duration-200 tw-ease-in-out
|
|
1564
|
+
${s ? "tw-border-texts-enfasis" : "tw-shadow-[0px_1px_4px_0px_rgba(37,37,37,0.20)_inset] "}`,
|
|
1432
1565
|
onClick: () => {
|
|
1433
|
-
|
|
1566
|
+
u(!s), m(""), e && s && e();
|
|
1434
1567
|
},
|
|
1435
1568
|
children: [
|
|
1436
|
-
/* @__PURE__ */ t("
|
|
1569
|
+
/* @__PURE__ */ t("span", { className: `tw-mr-2 tw-text-[14px] tw-font-normal tw-text-left ${s ? "tw-text-black-black_regular" : "tw-text-black-black_light"}`, children: p ?? l }),
|
|
1570
|
+
/* @__PURE__ */ t(T, { icon: "angle_up_outline", size: "xs", color: s ? g.black.black_medium : g.black.black_light, strokeWidth: 5, className: `tw-transition-transform tw-duration-200 ${s ? "tw-rotate-180" : "tw-rotate-0"}` })
|
|
1571
|
+
]
|
|
1572
|
+
}
|
|
1573
|
+
),
|
|
1574
|
+
s && /* @__PURE__ */ i("div", { className: `tw-w-full tw-absolute tw-right-0 tw-rounded-md tw-shadow-lg tw-bg-silver-silver_light
|
|
1575
|
+
tw-p-[8px] tw-space-y-1 tw-border tw-border-silver-silver_dark tw-shadow-[0px_1px_4px_0px_rgba(37,37,37,0.20)] tw-max-h-[500px] tw-overflow-y-auto`, children: [
|
|
1576
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2 tw-mb-[18px]", children: [
|
|
1577
|
+
/* @__PURE__ */ i("div", { className: "tw-relative tw-w-full", children: [
|
|
1437
1578
|
/* @__PURE__ */ t(
|
|
1438
|
-
|
|
1579
|
+
"input",
|
|
1439
1580
|
{
|
|
1440
|
-
|
|
1581
|
+
className: `tw-block tw-w-full tw-pl-12 tw-pr-4 tw-py-2 tw-text-black-black_regular placeholder:tw-text-black-black_light
|
|
1582
|
+
tw-text-[10px] tw-font-normal tw-border tw-rounded-[4px] tw-border-silver-silver_dark tw-focus:outline-none `,
|
|
1583
|
+
type: "text",
|
|
1584
|
+
placeholder: o,
|
|
1585
|
+
value: w,
|
|
1586
|
+
onChange: (d) => m(d.target.value),
|
|
1587
|
+
autoComplete: "off"
|
|
1588
|
+
}
|
|
1589
|
+
),
|
|
1590
|
+
/* @__PURE__ */ t("div", { className: "tw-absolute tw-top-[6px] tw-left-[10px] ", children: /* @__PURE__ */ t(
|
|
1591
|
+
T,
|
|
1592
|
+
{
|
|
1593
|
+
icon: "search",
|
|
1441
1594
|
size: "xs",
|
|
1442
|
-
|
|
1443
|
-
|
|
1595
|
+
color: g.black.black_light,
|
|
1596
|
+
style: { width: "16px", height: "16px" }
|
|
1444
1597
|
}
|
|
1445
|
-
)
|
|
1446
|
-
]
|
|
1447
|
-
|
|
1448
|
-
|
|
1598
|
+
) })
|
|
1599
|
+
] }),
|
|
1600
|
+
/* @__PURE__ */ t(
|
|
1601
|
+
T,
|
|
1602
|
+
{
|
|
1603
|
+
icon: "x_outline",
|
|
1604
|
+
size: "xs",
|
|
1605
|
+
strokeWidth: 6,
|
|
1606
|
+
color: g.black.black_medium,
|
|
1607
|
+
style: { width: "16px", height: "16px", cursor: "pointer" },
|
|
1608
|
+
onClick: () => {
|
|
1609
|
+
u(!1), m(""), e && s && e();
|
|
1610
|
+
},
|
|
1611
|
+
className: "tw-mt-[2px]"
|
|
1612
|
+
}
|
|
1613
|
+
)
|
|
1614
|
+
] }),
|
|
1615
|
+
v.map((d, x) => /* @__PURE__ */ i("div", { children: [
|
|
1616
|
+
/* @__PURE__ */ t(
|
|
1617
|
+
"a",
|
|
1618
|
+
{
|
|
1619
|
+
href: "#",
|
|
1620
|
+
className: `tw-block tw-px-[18px] tw-py-[8px] tw-text-[14px] tw-font-normal
|
|
1621
|
+
tw-cursor-pointer tw-rounded-md tw-transition-all tw-duration-200 tw-ease-in-out
|
|
1622
|
+
hover:tw-bg-blue-blue_medium hover:tw-text-primary-dark ${d === p ? "tw-text-primary-dark tw-bg-blue-blue_medium" : "tw-text-gray-gray_medium"}`,
|
|
1623
|
+
onClick: (_) => {
|
|
1624
|
+
_.preventDefault(), r(d, x), y(d), u(!1);
|
|
1625
|
+
},
|
|
1626
|
+
children: d
|
|
1627
|
+
},
|
|
1628
|
+
x
|
|
1629
|
+
),
|
|
1630
|
+
/* @__PURE__ */ t("div", { style: { width: "100%", height: "1px", backgroundColor: g.silver.silver_dark } })
|
|
1631
|
+
] }))
|
|
1632
|
+
] })
|
|
1449
1633
|
] });
|
|
1450
1634
|
};
|
|
1451
|
-
class
|
|
1635
|
+
class Ye {
|
|
1452
1636
|
static toPauseReasons(e) {
|
|
1453
1637
|
return {
|
|
1454
1638
|
id: e.id,
|
|
@@ -1456,40 +1640,40 @@ class We {
|
|
|
1456
1640
|
};
|
|
1457
1641
|
}
|
|
1458
1642
|
}
|
|
1459
|
-
const
|
|
1643
|
+
const Ge = async ({
|
|
1460
1644
|
tasks_api: a
|
|
1461
1645
|
}) => {
|
|
1462
1646
|
try {
|
|
1463
1647
|
const e = await a.get("/api/motivos");
|
|
1464
|
-
return
|
|
1648
|
+
return Y(e.data).map(Ye.toPauseReasons);
|
|
1465
1649
|
} catch (e) {
|
|
1466
1650
|
throw console.log("Error al obtener los usuarios comerciales", e), `Error al obtener los usuarios comerciales: ${e}`;
|
|
1467
1651
|
}
|
|
1468
|
-
},
|
|
1652
|
+
}, Ze = () => {
|
|
1469
1653
|
const { tasks_api: a } = B();
|
|
1470
|
-
return { pauseReasons:
|
|
1654
|
+
return { pauseReasons: ut({
|
|
1471
1655
|
queryKey: ["pause_task_reasons"],
|
|
1472
|
-
queryFn: () =>
|
|
1656
|
+
queryFn: () => Ge({
|
|
1473
1657
|
tasks_api: a
|
|
1474
1658
|
}),
|
|
1475
1659
|
staleTime: 1e3 * 60 * 60 * 24
|
|
1476
1660
|
// mantains the data for 24 hours
|
|
1477
1661
|
}) };
|
|
1478
1662
|
};
|
|
1479
|
-
class
|
|
1663
|
+
class Xe {
|
|
1480
1664
|
static toKanbanTasks(e) {
|
|
1481
|
-
var r,
|
|
1482
|
-
let
|
|
1483
|
-
return e != null && e.responsable &&
|
|
1665
|
+
var r, l, o, s, u, w, m, p, y, v, d;
|
|
1666
|
+
let n = [];
|
|
1667
|
+
return e != null && e.responsable && n.push({
|
|
1484
1668
|
id: e.responsable.id,
|
|
1485
1669
|
name: e.responsable.nombre,
|
|
1486
|
-
image: (
|
|
1487
|
-
}), (
|
|
1488
|
-
var
|
|
1489
|
-
|
|
1490
|
-
id:
|
|
1491
|
-
name:
|
|
1492
|
-
image: (
|
|
1670
|
+
image: (u = (s = (o = (l = (r = e.responsable) == null ? void 0 : r.userOBP) == null ? void 0 : l.imagen) == null ? void 0 : o.formats) == null ? void 0 : s.thumbnail) == null ? void 0 : u.url
|
|
1671
|
+
}), (w = e == null ? void 0 : e.equipo) != null && w.miembros && e.equipo.miembros.forEach((x) => {
|
|
1672
|
+
var _, b, k, C;
|
|
1673
|
+
n != null && n.find((j) => j.id === x.idUser.id) || x.idUser && n.push({
|
|
1674
|
+
id: x.idUser.id,
|
|
1675
|
+
name: x.idUser.nombre,
|
|
1676
|
+
image: (C = (k = (b = (_ = x == null ? void 0 : x.userOBP) == null ? void 0 : _.imagen) == null ? void 0 : b.formats) == null ? void 0 : k.thumbnail) == null ? void 0 : C.url
|
|
1493
1677
|
});
|
|
1494
1678
|
}), {
|
|
1495
1679
|
paused: e == null ? void 0 : e.pausada,
|
|
@@ -1497,7 +1681,7 @@ class Ge {
|
|
|
1497
1681
|
repeatsToDo: e == null ? void 0 : e.repeticiones,
|
|
1498
1682
|
comments: 0,
|
|
1499
1683
|
nameProject: (m = e == null ? void 0 : e.proyecto) == null ? void 0 : m.nombre,
|
|
1500
|
-
idProject: (
|
|
1684
|
+
idProject: (p = e == null ? void 0 : e.proyecto) == null ? void 0 : p.id,
|
|
1501
1685
|
willBePaused: e.es_pausable,
|
|
1502
1686
|
difficulty: e.nivel_dificultad,
|
|
1503
1687
|
endDate: new Date(e.ffin),
|
|
@@ -1505,148 +1689,147 @@ class Ge {
|
|
|
1505
1689
|
priority: e.prioridad ?? 0,
|
|
1506
1690
|
status: e.estatus,
|
|
1507
1691
|
task: e.texto_corto,
|
|
1508
|
-
users:
|
|
1692
|
+
users: n,
|
|
1509
1693
|
responsible: ((y = e == null ? void 0 : e.responsable) == null ? void 0 : y.id) ?? null,
|
|
1510
|
-
statusRequiredTask: ((
|
|
1511
|
-
nameRequiredTask: ((
|
|
1694
|
+
statusRequiredTask: ((v = e.id_t_requerida) == null ? void 0 : v.estatus) ?? null,
|
|
1695
|
+
nameRequiredTask: ((d = e.id_t_requerida) == null ? void 0 : d.texto_corto) ?? null,
|
|
1512
1696
|
medioName: (e == null ? void 0 : e.nombre_medio) ?? null
|
|
1513
1697
|
};
|
|
1514
1698
|
}
|
|
1515
1699
|
}
|
|
1516
|
-
const
|
|
1700
|
+
const Nt = async ({ filters: a, tasks_api: e }) => {
|
|
1517
1701
|
try {
|
|
1518
|
-
return (await e.get("/api/listado_tareas?populate=*", { params: a })).data.tareas.map(
|
|
1519
|
-
} catch (
|
|
1520
|
-
throw console.log({ error:
|
|
1702
|
+
return (await e.get("/api/listado_tareas?populate=*", { params: a })).data.tareas.map(Y).map(Xe.toKanbanTasks);
|
|
1703
|
+
} catch (n) {
|
|
1704
|
+
throw console.log({ error: n }), `Error al obtener las tareas: ${n}`;
|
|
1521
1705
|
}
|
|
1522
|
-
},
|
|
1706
|
+
}, _t = (a) => {
|
|
1523
1707
|
var e;
|
|
1524
1708
|
if (a != null && a.hasNextPage) {
|
|
1525
|
-
const
|
|
1526
|
-
(
|
|
1709
|
+
const n = (e = a == null ? void 0 : a.data) == null ? void 0 : e.pages[a.data.pages.length - 1];
|
|
1710
|
+
(n == null ? void 0 : n.length) === 30 && (a == null || a.fetchNextPage());
|
|
1527
1711
|
}
|
|
1528
|
-
},
|
|
1712
|
+
}, X = (a) => ({
|
|
1529
1713
|
pagination: {
|
|
1530
1714
|
page: a,
|
|
1531
1715
|
pageSize: 30,
|
|
1532
1716
|
withCount: !0
|
|
1533
1717
|
}
|
|
1534
|
-
}),
|
|
1718
|
+
}), Ht = () => {
|
|
1535
1719
|
var m;
|
|
1536
|
-
const a =
|
|
1720
|
+
const a = it(), { tasks_api: e } = B(), { user: n } = G(), { filters: r } = K(), [l, o] = f(0), [s, u] = f({
|
|
1537
1721
|
owner: {
|
|
1538
|
-
user:
|
|
1722
|
+
user: n.id,
|
|
1539
1723
|
config: ((m = r == null ? void 0 : r.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos"
|
|
1540
1724
|
},
|
|
1541
1725
|
status: "por_hacer"
|
|
1542
|
-
}),
|
|
1726
|
+
}), w = xt({
|
|
1543
1727
|
initialPageParam: 1,
|
|
1544
1728
|
queryKey: ["to_do_tasks", s],
|
|
1545
|
-
queryFn: ({ pageParam:
|
|
1729
|
+
queryFn: ({ pageParam: p }) => Nt({
|
|
1546
1730
|
filters: {
|
|
1547
1731
|
...s,
|
|
1548
1732
|
status: "por_hacer",
|
|
1549
|
-
...
|
|
1733
|
+
...X(p)
|
|
1550
1734
|
},
|
|
1551
|
-
tasks_api: e
|
|
1552
|
-
page: u
|
|
1735
|
+
tasks_api: e
|
|
1553
1736
|
}),
|
|
1554
1737
|
staleTime: 1e3 * 60 * 60 * 24,
|
|
1555
1738
|
// mantains the data for 24 hours
|
|
1556
|
-
getNextPageParam: (
|
|
1739
|
+
getNextPageParam: (p, y) => y.length + 1
|
|
1557
1740
|
});
|
|
1558
|
-
return
|
|
1559
|
-
var
|
|
1560
|
-
Object.keys(r).length > 0 &&
|
|
1741
|
+
return F(() => {
|
|
1742
|
+
var p;
|
|
1743
|
+
Object.keys(r).length > 0 && u({
|
|
1561
1744
|
...r,
|
|
1562
1745
|
owner: {
|
|
1563
|
-
user:
|
|
1564
|
-
config: ((
|
|
1746
|
+
user: n.id,
|
|
1747
|
+
config: ((p = r == null ? void 0 : r.owner) == null ? void 0 : p.config) ?? "yo_y_mis_equipos"
|
|
1565
1748
|
},
|
|
1566
1749
|
status: "por_hacer"
|
|
1567
1750
|
});
|
|
1568
|
-
}, [r]),
|
|
1751
|
+
}, [r]), F(() => {
|
|
1569
1752
|
a.invalidateQueries({
|
|
1570
1753
|
queryKey: ["to_do_tasks", s]
|
|
1571
1754
|
});
|
|
1572
|
-
}, [s]),
|
|
1755
|
+
}, [s]), F(() => {
|
|
1573
1756
|
(async () => {
|
|
1574
1757
|
const y = await e.get("/api/listado_tareas", {
|
|
1575
1758
|
params: {
|
|
1576
1759
|
...s,
|
|
1577
1760
|
status: "por_hacer",
|
|
1578
|
-
...
|
|
1761
|
+
...X(1),
|
|
1579
1762
|
tasks_api: e,
|
|
1580
1763
|
justCount: !0
|
|
1581
1764
|
}
|
|
1582
1765
|
});
|
|
1583
|
-
|
|
1766
|
+
o(y.data.total);
|
|
1584
1767
|
})();
|
|
1585
|
-
}, [s,
|
|
1768
|
+
}, [s, w == null ? void 0 : w.data]), {
|
|
1586
1769
|
//Properties
|
|
1587
|
-
toDoTasks:
|
|
1588
|
-
total:
|
|
1770
|
+
toDoTasks: w,
|
|
1771
|
+
total: l,
|
|
1589
1772
|
filtersToSend: s
|
|
1590
1773
|
};
|
|
1591
|
-
},
|
|
1592
|
-
const r =
|
|
1774
|
+
}, Vt = ({ idTask: a, setOpen: e, paused: n }) => {
|
|
1775
|
+
const r = it(), { toDoTasks: l, filtersToSend: o } = Ht(), [s, u] = f(!1), { control: w, watch: m } = $t(), { tasksProject: p } = et(), { postPauseTask: y, postReanudeTask: v } = ct(), { pauseReasons: d } = Ze(), x = async () => {
|
|
1593
1776
|
try {
|
|
1594
1777
|
if (e(!1), await y({ id: a, motiveId: m("pauseReason") }), await r.invalidateQueries({
|
|
1595
|
-
queryKey: ["to_do_tasks",
|
|
1778
|
+
queryKey: ["to_do_tasks", o]
|
|
1596
1779
|
}), await r.invalidateQueries({
|
|
1597
1780
|
queryKey: ["tasksProject"]
|
|
1598
|
-
}),
|
|
1599
|
-
const
|
|
1600
|
-
return [
|
|
1781
|
+
}), l && typeof l.refetch == "function" || p && typeof p.refetch == "function") {
|
|
1782
|
+
const b = await l.refetch(), k = await p.refetch();
|
|
1783
|
+
return [b, k];
|
|
1601
1784
|
}
|
|
1602
|
-
} catch (
|
|
1603
|
-
console.error("Error al pausar la tarea:",
|
|
1785
|
+
} catch (b) {
|
|
1786
|
+
console.error("Error al pausar la tarea:", b);
|
|
1604
1787
|
}
|
|
1605
|
-
},
|
|
1788
|
+
}, _ = async () => {
|
|
1606
1789
|
try {
|
|
1607
|
-
if (e(!1), await
|
|
1608
|
-
queryKey: ["to_do_tasks",
|
|
1790
|
+
if (e(!1), await v({ id: a }), await r.invalidateQueries({
|
|
1791
|
+
queryKey: ["to_do_tasks", o]
|
|
1609
1792
|
}), await r.invalidateQueries({
|
|
1610
1793
|
queryKey: ["tasksProject"]
|
|
1611
|
-
}),
|
|
1612
|
-
const
|
|
1613
|
-
return [
|
|
1794
|
+
}), l && typeof l.refetch == "function" || p && typeof p.refetch == "function") {
|
|
1795
|
+
const b = await l.refetch(), k = await p.refetch();
|
|
1796
|
+
return [b, k];
|
|
1614
1797
|
}
|
|
1615
|
-
} catch (
|
|
1616
|
-
console.error("Error al reanudar la tarea:",
|
|
1798
|
+
} catch (b) {
|
|
1799
|
+
console.error("Error al reanudar la tarea:", b);
|
|
1617
1800
|
}
|
|
1618
1801
|
};
|
|
1619
|
-
return /* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-max-w-[300px] tw-w-[300px] !tw-p-4", children: /* @__PURE__ */
|
|
1802
|
+
return /* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-max-w-[300px] tw-w-[300px] !tw-p-4", children: /* @__PURE__ */ i("div", { className: "tw-w-full tw-flex tw-flex-col tw-gap-s", children: [
|
|
1620
1803
|
/* @__PURE__ */ t("h6", { className: "tw-text-xl tw-font-regular tw-text-texts-subtexttw-truncate", children: "Pausar tarea:" }),
|
|
1621
|
-
s ? /* @__PURE__ */
|
|
1804
|
+
s ? /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-s", children: [
|
|
1622
1805
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-medium tw-text-neutral-600", children: "Esta acción detendrá la campaña en curso." }),
|
|
1623
1806
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-medium tw-text-neutral-600", children: "¿Estás seguro de continuar?" })
|
|
1624
|
-
] }) :
|
|
1807
|
+
] }) : n ? /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-s", children: [
|
|
1625
1808
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-medium tw-text-neutral-600", children: "Esta acción reanudará la campaña en curso." }),
|
|
1626
1809
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-medium tw-text-neutral-600", children: "¿Estás seguro de continuar?" })
|
|
1627
1810
|
] }) : /* @__PURE__ */ t(
|
|
1628
|
-
|
|
1811
|
+
ve,
|
|
1629
1812
|
{
|
|
1630
1813
|
name: "pauseReason",
|
|
1631
|
-
control:
|
|
1814
|
+
control: w,
|
|
1632
1815
|
rules: { required: !0 },
|
|
1633
|
-
render: ({ field:
|
|
1634
|
-
var
|
|
1635
|
-
return /* @__PURE__ */
|
|
1636
|
-
|
|
1816
|
+
render: ({ field: b }) => {
|
|
1817
|
+
var k;
|
|
1818
|
+
return /* @__PURE__ */ i(
|
|
1819
|
+
ue,
|
|
1637
1820
|
{
|
|
1638
|
-
value:
|
|
1639
|
-
onValueChange: (
|
|
1821
|
+
value: b.value,
|
|
1822
|
+
onValueChange: (C) => b.onChange(C),
|
|
1640
1823
|
children: [
|
|
1641
|
-
/* @__PURE__ */ t(
|
|
1642
|
-
/* @__PURE__ */ t(
|
|
1824
|
+
/* @__PURE__ */ t(pe, { className: "!tw-w-[290px] tw-border-none tw-shadow-input tw-h-[26px] tw-text-lg", children: /* @__PURE__ */ t(me, { placeholder: "Selecciona una razón" }) }),
|
|
1825
|
+
/* @__PURE__ */ t(ge, { className: "tw-bg-white tw-border-none tw-shadow-input", children: /* @__PURE__ */ t(xe, { children: (k = d == null ? void 0 : d.data) == null ? void 0 : k.map((C) => /* @__PURE__ */ t(
|
|
1643
1826
|
he,
|
|
1644
1827
|
{
|
|
1645
|
-
value:
|
|
1828
|
+
value: C.id,
|
|
1646
1829
|
className: "tw-border-none tw-bg-white tw-text-lg",
|
|
1647
|
-
children:
|
|
1830
|
+
children: C.motivo_imj
|
|
1648
1831
|
},
|
|
1649
|
-
|
|
1832
|
+
C.id
|
|
1650
1833
|
)) }) })
|
|
1651
1834
|
]
|
|
1652
1835
|
}
|
|
@@ -1654,7 +1837,7 @@ const bt = async ({ filters: a, tasks_api: e }) => {
|
|
|
1654
1837
|
}
|
|
1655
1838
|
}
|
|
1656
1839
|
),
|
|
1657
|
-
/* @__PURE__ */
|
|
1840
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-justify-end tw-w-full tw-gap-m tw-mt-5", children: [
|
|
1658
1841
|
/* @__PURE__ */ t(
|
|
1659
1842
|
"button",
|
|
1660
1843
|
{
|
|
@@ -1664,11 +1847,11 @@ const bt = async ({ filters: a, tasks_api: e }) => {
|
|
|
1664
1847
|
children: "Cancelar"
|
|
1665
1848
|
}
|
|
1666
1849
|
),
|
|
1667
|
-
|
|
1850
|
+
n ? /* @__PURE__ */ t(
|
|
1668
1851
|
"button",
|
|
1669
1852
|
{
|
|
1670
1853
|
type: "button",
|
|
1671
|
-
onClick: () =>
|
|
1854
|
+
onClick: () => _(),
|
|
1672
1855
|
className: "tw-bg-primary-regular tw-text-primary-light tw-flex tw-justify-center tw-items-center tw-text-center tw-font-regular tw-text-xl tw-rounded-lg tw-border-2 tw-border-primary-regular tw-py-s tw-w-[80px] tw-h-[26px]",
|
|
1673
1856
|
children: "Si, reanudar"
|
|
1674
1857
|
}
|
|
@@ -1677,7 +1860,7 @@ const bt = async ({ filters: a, tasks_api: e }) => {
|
|
|
1677
1860
|
{
|
|
1678
1861
|
type: "button",
|
|
1679
1862
|
disabled: !m("pauseReason"),
|
|
1680
|
-
onClick: () => s ?
|
|
1863
|
+
onClick: () => s ? x() : u(!0),
|
|
1681
1864
|
className: "tw-bg-primary-regular tw-text-primary-light tw-flex tw-justify-center tw-items-center tw-text-center tw-font-regular tw-text-xl tw-rounded-lg tw-border-2 tw-border-primary-regular tw-py-s tw-w-[80px] tw-h-[26px]",
|
|
1682
1865
|
children: "Aceptar"
|
|
1683
1866
|
}
|
|
@@ -1685,11 +1868,11 @@ const bt = async ({ filters: a, tasks_api: e }) => {
|
|
|
1685
1868
|
] })
|
|
1686
1869
|
] }) });
|
|
1687
1870
|
};
|
|
1688
|
-
function
|
|
1689
|
-
return /* @__PURE__ */
|
|
1690
|
-
/* @__PURE__ */ t(
|
|
1871
|
+
function Yt({ trigger: a, children: e, open: n, setOpen: r }) {
|
|
1872
|
+
return /* @__PURE__ */ i(fe, { open: n, onOpenChange: r, children: [
|
|
1873
|
+
/* @__PURE__ */ t(be, { children: a }),
|
|
1691
1874
|
/* @__PURE__ */ t(
|
|
1692
|
-
|
|
1875
|
+
ye,
|
|
1693
1876
|
{
|
|
1694
1877
|
align: "start",
|
|
1695
1878
|
className: "tw-bg-white tw-border-none tw-rounded-lg tw-p-4",
|
|
@@ -1698,56 +1881,56 @@ function Vt({ trigger: a, children: e, open: l, setOpen: r }) {
|
|
|
1698
1881
|
)
|
|
1699
1882
|
] });
|
|
1700
1883
|
}
|
|
1701
|
-
const
|
|
1884
|
+
const Je = ({
|
|
1702
1885
|
id: a,
|
|
1703
1886
|
task: e,
|
|
1704
|
-
endDate:
|
|
1887
|
+
endDate: n,
|
|
1705
1888
|
users: r,
|
|
1706
|
-
willBePaused:
|
|
1707
|
-
nameProject:
|
|
1889
|
+
willBePaused: l,
|
|
1890
|
+
nameProject: o,
|
|
1708
1891
|
comments: s,
|
|
1709
|
-
priority:
|
|
1710
|
-
difficulty:
|
|
1892
|
+
priority: u,
|
|
1893
|
+
difficulty: w,
|
|
1711
1894
|
responsible: m,
|
|
1712
|
-
nameRequiredTask:
|
|
1895
|
+
nameRequiredTask: p,
|
|
1713
1896
|
statusRequiredTask: y,
|
|
1714
|
-
status:
|
|
1715
|
-
repeatsToDo:
|
|
1716
|
-
repeats:
|
|
1717
|
-
medioName:
|
|
1718
|
-
paused:
|
|
1897
|
+
status: v,
|
|
1898
|
+
repeatsToDo: d,
|
|
1899
|
+
repeats: x,
|
|
1900
|
+
medioName: _,
|
|
1901
|
+
paused: b
|
|
1719
1902
|
}) => {
|
|
1720
|
-
var
|
|
1721
|
-
const [
|
|
1722
|
-
/* @__PURE__ */
|
|
1723
|
-
|
|
1903
|
+
var E, U, H, at, rt, st, nt, lt, ot;
|
|
1904
|
+
const [k, C] = f(!1), [j, M] = f(!1), { reasignResponsible: S, updateUnitys: D } = ct(), { getOBPUrlApi: q } = B(), [h, N] = f(x ?? 0), P = !!(d && x === d), c = !d || d === 1, A = v === 0, L = () => /* @__PURE__ */ i("div", { className: "tw-flex tw-justify-between tw-items-center tw-w-full tw-h-fit tw-relative", children: [
|
|
1905
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-row tw-items-start tw-gap-[8px] tw-w-[calc(100%-32px)]", children: [
|
|
1906
|
+
v < 2 && (P || c || A) && /* @__PURE__ */ t(
|
|
1724
1907
|
Ut,
|
|
1725
1908
|
{
|
|
1726
1909
|
id: a,
|
|
1727
|
-
nameRequiredTask:
|
|
1910
|
+
nameRequiredTask: p ?? "",
|
|
1728
1911
|
statusRequiredTask: y ?? 0,
|
|
1729
|
-
status:
|
|
1912
|
+
status: v
|
|
1730
1913
|
}
|
|
1731
1914
|
),
|
|
1732
1915
|
/* @__PURE__ */ t(
|
|
1733
1916
|
"p",
|
|
1734
1917
|
{
|
|
1735
1918
|
className: "tw-overflow-hidden tw-text-ellipsis tw-w-full tw-text-nowrap tw-text-[1.6rem] tw-font-medium tw-text-neutral-900",
|
|
1736
|
-
onClick: () =>
|
|
1919
|
+
onClick: () => C(!0),
|
|
1737
1920
|
children: e
|
|
1738
1921
|
}
|
|
1739
1922
|
)
|
|
1740
1923
|
] }),
|
|
1741
|
-
(
|
|
1924
|
+
(P || c || A) && /* @__PURE__ */ t(
|
|
1742
1925
|
Qt,
|
|
1743
1926
|
{
|
|
1744
1927
|
id: a,
|
|
1745
|
-
nameRequiredTask:
|
|
1746
|
-
status:
|
|
1928
|
+
nameRequiredTask: p,
|
|
1929
|
+
status: v,
|
|
1747
1930
|
statusRequiredTask: y
|
|
1748
1931
|
}
|
|
1749
1932
|
)
|
|
1750
|
-
] }),
|
|
1933
|
+
] }), $ = {
|
|
1751
1934
|
0: { title: "N/A", color: g.texts.placeholder },
|
|
1752
1935
|
1: { title: "Baja", color: g.primary.regular },
|
|
1753
1936
|
2: { title: "Media", color: g.success.regular },
|
|
@@ -1758,47 +1941,47 @@ const Ye = ({
|
|
|
1758
1941
|
2: { title: "Media", color: g.warning.regular },
|
|
1759
1942
|
3: { title: "Difícil", color: g.danger.regular },
|
|
1760
1943
|
4: { title: "Muy difícil", color: g.danger.dark }
|
|
1761
|
-
},
|
|
1762
|
-
|
|
1944
|
+
}, z = (W) => {
|
|
1945
|
+
N((Z) => W === "minus" ? Math.max(0, Z - 1) : Math.min(d, Z + 1));
|
|
1763
1946
|
};
|
|
1764
|
-
return /* @__PURE__ */
|
|
1765
|
-
/* @__PURE__ */
|
|
1947
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
1948
|
+
/* @__PURE__ */ i("div", { className: "tw-bg-white tw-border-cards tw-max-w-[350px] tw-rounded-lg tw-relative tw-h-fit tw-p-[12px_12px] hover:tw-border-active hover:tw-bg-active tw-cursor-pointer", children: [
|
|
1766
1949
|
/* @__PURE__ */ t(L, {}),
|
|
1767
|
-
/* @__PURE__ */
|
|
1768
|
-
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-regular tw-text-texts-subtext tw-max-w-[250px] tw-truncate", children:
|
|
1769
|
-
|
|
1950
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-[4px] tw-py-2", children: [
|
|
1951
|
+
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-regular tw-text-texts-subtext tw-max-w-[250px] tw-truncate", children: o }),
|
|
1952
|
+
_ && /* @__PURE__ */ t("p", { className: "tw-text-xl", children: _ })
|
|
1770
1953
|
] }),
|
|
1771
|
-
/* @__PURE__ */
|
|
1772
|
-
/* @__PURE__ */
|
|
1954
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-justify-between tw-items-center tw-w-full tw-h-fit tw-relative tw-pt-5 tw-pb-1", children: [
|
|
1955
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-relative", children: [
|
|
1773
1956
|
/* @__PURE__ */ t(
|
|
1774
|
-
|
|
1957
|
+
Wt,
|
|
1775
1958
|
{
|
|
1776
1959
|
responsible: m,
|
|
1777
|
-
users: r.filter((
|
|
1778
|
-
onClick: async (
|
|
1779
|
-
await
|
|
1780
|
-
idNewResponsible:
|
|
1960
|
+
users: r.filter((W) => m ? W.id === m : !0).map((W) => vt(W, q())),
|
|
1961
|
+
onClick: async (W, Z) => {
|
|
1962
|
+
await S({
|
|
1963
|
+
idNewResponsible: W,
|
|
1781
1964
|
id: a,
|
|
1782
|
-
typeOfSelect:
|
|
1965
|
+
typeOfSelect: Z
|
|
1783
1966
|
});
|
|
1784
1967
|
}
|
|
1785
1968
|
}
|
|
1786
1969
|
),
|
|
1787
|
-
|
|
1788
|
-
|
|
1970
|
+
l && /* @__PURE__ */ t(
|
|
1971
|
+
Yt,
|
|
1789
1972
|
{
|
|
1790
1973
|
open: j,
|
|
1791
|
-
setOpen:
|
|
1974
|
+
setOpen: M,
|
|
1792
1975
|
trigger: /* @__PURE__ */ t(
|
|
1793
1976
|
"button",
|
|
1794
1977
|
{
|
|
1795
1978
|
type: "button",
|
|
1796
|
-
onClick: () =>
|
|
1979
|
+
onClick: () => M(!0),
|
|
1797
1980
|
className: "tw-text-sm tw-font-regular tw-text-gray-400 tw-gap-2 !tw-h-[32px] !tw-w-[32px] tw-flex tw-justify-center tw-items-center",
|
|
1798
1981
|
children: /* @__PURE__ */ t(
|
|
1799
|
-
|
|
1982
|
+
T,
|
|
1800
1983
|
{
|
|
1801
|
-
icon:
|
|
1984
|
+
icon: b ? "play" : "pause",
|
|
1802
1985
|
size: "xs",
|
|
1803
1986
|
strokeWidth: 2
|
|
1804
1987
|
}
|
|
@@ -1806,27 +1989,64 @@ const Ye = ({
|
|
|
1806
1989
|
}
|
|
1807
1990
|
),
|
|
1808
1991
|
children: /* @__PURE__ */ t(
|
|
1809
|
-
|
|
1992
|
+
Vt,
|
|
1810
1993
|
{
|
|
1811
1994
|
idTask: a,
|
|
1812
|
-
setOpen:
|
|
1813
|
-
paused:
|
|
1995
|
+
setOpen: M,
|
|
1996
|
+
paused: b
|
|
1814
1997
|
}
|
|
1815
1998
|
)
|
|
1816
1999
|
}
|
|
1817
2000
|
)
|
|
1818
2001
|
] }),
|
|
1819
|
-
/* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */
|
|
2002
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-gap-m tw-items-center tw-flex-wrap", children: [
|
|
2003
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2", children: [
|
|
1821
2004
|
/* @__PURE__ */ t(
|
|
1822
|
-
|
|
2005
|
+
St,
|
|
2006
|
+
{
|
|
2007
|
+
content: "Atraso: esperalo pronto",
|
|
2008
|
+
children: /* @__PURE__ */ t(
|
|
2009
|
+
T,
|
|
2010
|
+
{
|
|
2011
|
+
icon: "exclamation_triangle",
|
|
2012
|
+
size: "xs",
|
|
2013
|
+
color: (E = I[w ?? 0]) == null ? void 0 : E.color,
|
|
2014
|
+
strokeWidth: 4
|
|
2015
|
+
}
|
|
2016
|
+
)
|
|
2017
|
+
}
|
|
2018
|
+
),
|
|
2019
|
+
/* @__PURE__ */ t(
|
|
2020
|
+
O,
|
|
1823
2021
|
{
|
|
1824
2022
|
dispatch: /* @__PURE__ */ t(
|
|
1825
|
-
|
|
2023
|
+
T,
|
|
2024
|
+
{
|
|
2025
|
+
icon: "exclamation_triangle",
|
|
2026
|
+
size: "xs",
|
|
2027
|
+
color: (U = I[w ?? 0]) == null ? void 0 : U.color,
|
|
2028
|
+
strokeWidth: 4
|
|
2029
|
+
}
|
|
2030
|
+
),
|
|
2031
|
+
children: /* @__PURE__ */ t(
|
|
2032
|
+
"p",
|
|
2033
|
+
{
|
|
2034
|
+
className: "tw-text-sm tw-font-regular tw-p-5 tw-bg-bg-card tw-rounded-lg",
|
|
2035
|
+
style: { color: (H = I[w ?? 0]) == null ? void 0 : H.color },
|
|
2036
|
+
children: "Atraso: esperalo pronto"
|
|
2037
|
+
}
|
|
2038
|
+
)
|
|
2039
|
+
}
|
|
2040
|
+
),
|
|
2041
|
+
/* @__PURE__ */ t(
|
|
2042
|
+
O,
|
|
2043
|
+
{
|
|
2044
|
+
dispatch: /* @__PURE__ */ t(
|
|
2045
|
+
T,
|
|
1826
2046
|
{
|
|
1827
2047
|
icon: "difficulty",
|
|
1828
2048
|
size: "xs",
|
|
1829
|
-
color: (
|
|
2049
|
+
color: (at = I[w ?? 0]) == null ? void 0 : at.color,
|
|
1830
2050
|
strokeWidth: 4
|
|
1831
2051
|
}
|
|
1832
2052
|
),
|
|
@@ -1834,21 +2054,21 @@ const Ye = ({
|
|
|
1834
2054
|
"p",
|
|
1835
2055
|
{
|
|
1836
2056
|
className: "tw-text-sm tw-font-regular tw-p-5 tw-bg-bg-card tw-rounded-lg",
|
|
1837
|
-
style: { color: (
|
|
1838
|
-
children: `Dificultad ${(
|
|
2057
|
+
style: { color: (rt = I[w ?? 0]) == null ? void 0 : rt.color },
|
|
2058
|
+
children: `Dificultad ${(st = I[w ?? 0]) == null ? void 0 : st.title}`
|
|
1839
2059
|
}
|
|
1840
2060
|
)
|
|
1841
2061
|
}
|
|
1842
2062
|
),
|
|
1843
2063
|
/* @__PURE__ */ t(
|
|
1844
|
-
|
|
2064
|
+
O,
|
|
1845
2065
|
{
|
|
1846
2066
|
dispatch: /* @__PURE__ */ t(
|
|
1847
|
-
|
|
2067
|
+
T,
|
|
1848
2068
|
{
|
|
1849
2069
|
icon: "flag",
|
|
1850
2070
|
size: "xs",
|
|
1851
|
-
color: (
|
|
2071
|
+
color: (nt = $[u ?? 0]) == null ? void 0 : nt.color,
|
|
1852
2072
|
strokeWidth: 4
|
|
1853
2073
|
}
|
|
1854
2074
|
),
|
|
@@ -1856,15 +2076,15 @@ const Ye = ({
|
|
|
1856
2076
|
"p",
|
|
1857
2077
|
{
|
|
1858
2078
|
className: "tw-text-sm tw-font-regular tw-p-5 tw-bg-bg-card tw-rounded-lg",
|
|
1859
|
-
style: { color: (
|
|
1860
|
-
children: `Prioridad: ${(
|
|
2079
|
+
style: { color: (lt = $[u ?? 0]) == null ? void 0 : lt.color },
|
|
2080
|
+
children: `Prioridad: ${(ot = $[u ?? 0]) == null ? void 0 : ot.title}`
|
|
1861
2081
|
}
|
|
1862
2082
|
)
|
|
1863
2083
|
}
|
|
1864
2084
|
),
|
|
1865
|
-
!
|
|
2085
|
+
!d || d && v === 0 && /* @__PURE__ */ i(R, { children: [
|
|
1866
2086
|
/* @__PURE__ */ t(
|
|
1867
|
-
|
|
2087
|
+
T,
|
|
1868
2088
|
{
|
|
1869
2089
|
icon: "calendar",
|
|
1870
2090
|
size: "xs",
|
|
@@ -1872,20 +2092,20 @@ const Ye = ({
|
|
|
1872
2092
|
color: g.texts.subtext
|
|
1873
2093
|
}
|
|
1874
2094
|
),
|
|
1875
|
-
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-font-regular tw-text-texts-subtext", children: `${
|
|
1876
|
-
|
|
2095
|
+
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-font-regular tw-text-texts-subtext", children: `${n.getDate()} ${yt(
|
|
2096
|
+
n.getMonth()
|
|
1877
2097
|
).slice(0, 3)}` })
|
|
1878
2098
|
] })
|
|
1879
2099
|
] }),
|
|
1880
|
-
|
|
2100
|
+
v === 1 && d && d > 0 && /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-m", children: [
|
|
1881
2101
|
/* @__PURE__ */ t("p", { className: "tw-text-xs tw-text-texts-placeholder ", children: "unidades" }),
|
|
1882
2102
|
/* @__PURE__ */ t(
|
|
1883
2103
|
"button",
|
|
1884
2104
|
{
|
|
1885
|
-
onClick: () =>
|
|
2105
|
+
onClick: () => z("minus"),
|
|
1886
2106
|
className: "tw-flex tw-items-center tw-justify-center tw-bg-gray-200 tw-w-[0] tw-rounded-full hover:tw-bg-gray-400",
|
|
1887
2107
|
children: /* @__PURE__ */ t(
|
|
1888
|
-
|
|
2108
|
+
T,
|
|
1889
2109
|
{
|
|
1890
2110
|
icon: "circle_minus",
|
|
1891
2111
|
size: "xs",
|
|
@@ -1895,14 +2115,14 @@ const Ye = ({
|
|
|
1895
2115
|
)
|
|
1896
2116
|
}
|
|
1897
2117
|
),
|
|
1898
|
-
/* @__PURE__ */ t("p", { className: "tw-text-xs tw-text-texts-placeholder", children: `${
|
|
2118
|
+
/* @__PURE__ */ t("p", { className: "tw-text-xs tw-text-texts-placeholder", children: `${h ?? 0} / ${d ?? 0}` }),
|
|
1899
2119
|
/* @__PURE__ */ t(
|
|
1900
2120
|
"button",
|
|
1901
2121
|
{
|
|
1902
|
-
onClick: () =>
|
|
2122
|
+
onClick: () => z("plus"),
|
|
1903
2123
|
className: "tw-flex tw-items-center tw-justify-center tw-bg-gray-200 tw-w-[0] tw-rounded-full hover:tw-bg-gray-400",
|
|
1904
2124
|
children: /* @__PURE__ */ t(
|
|
1905
|
-
|
|
2125
|
+
T,
|
|
1906
2126
|
{
|
|
1907
2127
|
icon: "circle_plus",
|
|
1908
2128
|
size: "xs",
|
|
@@ -1917,7 +2137,7 @@ const Ye = ({
|
|
|
1917
2137
|
{
|
|
1918
2138
|
className: "tw-text-xs tw-bg-primary-medium tw-rounded-md tw-py-s tw-px-m tw-text-primary-regular",
|
|
1919
2139
|
onClick: () => {
|
|
1920
|
-
D({ repeats:
|
|
2140
|
+
D({ repeats: h, id: a });
|
|
1921
2141
|
},
|
|
1922
2142
|
children: "Agregar"
|
|
1923
2143
|
}
|
|
@@ -1925,48 +2145,48 @@ const Ye = ({
|
|
|
1925
2145
|
] })
|
|
1926
2146
|
] })
|
|
1927
2147
|
] }),
|
|
1928
|
-
s > 0 && /* @__PURE__ */ t("div", { className: "tw-border-t tw-border-gray-200 tw-mt-4 tw-pt-2", children: /* @__PURE__ */
|
|
2148
|
+
s > 0 && /* @__PURE__ */ t("div", { className: "tw-border-t tw-border-gray-200 tw-mt-4 tw-pt-2", children: /* @__PURE__ */ i(
|
|
1929
2149
|
"button",
|
|
1930
2150
|
{
|
|
1931
|
-
onClick: () =>
|
|
2151
|
+
onClick: () => C(!0),
|
|
1932
2152
|
className: "tw-flex tw-items-center tw-gap-2",
|
|
1933
2153
|
children: [
|
|
1934
|
-
/* @__PURE__ */ t(
|
|
2154
|
+
/* @__PURE__ */ t(T, { icon: "comment", size: "xs", strokeWidth: 4 }),
|
|
1935
2155
|
/* @__PURE__ */ t("span", { className: "tw-text-xl tw-font-regular tw-text-gray-400", children: s })
|
|
1936
2156
|
]
|
|
1937
2157
|
}
|
|
1938
2158
|
) })
|
|
1939
2159
|
] }),
|
|
1940
|
-
/* @__PURE__ */ t(Qe, { taskId: a, isOpen:
|
|
2160
|
+
/* @__PURE__ */ t(Qe, { taskId: a, isOpen: k, setIsOpen: C })
|
|
1941
2161
|
] });
|
|
1942
|
-
},
|
|
1943
|
-
const
|
|
1944
|
-
|
|
1945
|
-
var
|
|
1946
|
-
|
|
1947
|
-
}, [
|
|
1948
|
-
const
|
|
1949
|
-
if (
|
|
1950
|
-
const { scrollTop: y, clientHeight:
|
|
1951
|
-
|
|
1952
|
-
|
|
2162
|
+
}, mt = ({ title: a, tasks: e, loadNextPage: n, isFetching: r, total: l }) => {
|
|
2163
|
+
const o = V(null), s = V(null), u = V(!1);
|
|
2164
|
+
F(() => {
|
|
2165
|
+
var p;
|
|
2166
|
+
o != null && o.current && (s != null && s.current) && (s.current.style.minHeight = `${((p = o == null ? void 0 : o.current) == null ? void 0 : p.clientHeight) - 300}px`);
|
|
2167
|
+
}, [o == null ? void 0 : o.current]);
|
|
2168
|
+
const w = (p) => {
|
|
2169
|
+
if (u.current) return;
|
|
2170
|
+
const { scrollTop: y, clientHeight: v, scrollHeight: d } = p == null ? void 0 : p.target, x = y / (d - v) * 100;
|
|
2171
|
+
x <= 95 || x >= 95 && (u.current = !0, n && n(), setTimeout(() => {
|
|
2172
|
+
u.current = !1;
|
|
1953
2173
|
}, 200));
|
|
1954
2174
|
};
|
|
1955
|
-
return /* @__PURE__ */
|
|
2175
|
+
return /* @__PURE__ */ i(
|
|
1956
2176
|
"div",
|
|
1957
2177
|
{
|
|
1958
|
-
ref:
|
|
2178
|
+
ref: o,
|
|
1959
2179
|
className: `tw-flex tw-flex-col tw-bg-containers tw-w-fit tw-max-w-[400px] tw-min-w-[400px] tw-h-full tw-min-h-[100%] tw-relative tw-p-[16px] tw-rounded-lg tw-overflow-hidden tw-border-t-4 ${{
|
|
1960
2180
|
"Por hacer": "tw-border-texts-placeholder",
|
|
1961
2181
|
Trabajando: "tw-border-primary-regular",
|
|
1962
2182
|
Completadas: "tw-border-success-regular"
|
|
1963
2183
|
}[a]}`,
|
|
1964
2184
|
children: [
|
|
1965
|
-
/* @__PURE__ */
|
|
2185
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-justify-between tw-items-center", children: [
|
|
1966
2186
|
/* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-gap-[8px]", children: /* @__PURE__ */ t("p", { className: "tw-text-2xl", children: a }) }),
|
|
1967
|
-
/* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-gap-[8px]", children: /* @__PURE__ */
|
|
2187
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-gap-[8px]", children: /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-[4px]", children: [
|
|
1968
2188
|
/* @__PURE__ */ t(
|
|
1969
|
-
|
|
2189
|
+
T,
|
|
1970
2190
|
{
|
|
1971
2191
|
icon: "group_files",
|
|
1972
2192
|
size: "xs",
|
|
@@ -1974,204 +2194,202 @@ const Ye = ({
|
|
|
1974
2194
|
color: g.texts.placeholder
|
|
1975
2195
|
}
|
|
1976
2196
|
),
|
|
1977
|
-
/* @__PURE__ */ t("p", { className: "tw-text-2xl tw-text-texts-placeholder", children:
|
|
2197
|
+
/* @__PURE__ */ t("p", { className: "tw-text-2xl tw-text-texts-placeholder", children: l ?? 0 })
|
|
1978
2198
|
] }) })
|
|
1979
2199
|
] }),
|
|
1980
|
-
/* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ i(
|
|
1981
2201
|
"div",
|
|
1982
2202
|
{
|
|
1983
2203
|
ref: s,
|
|
1984
2204
|
className: "tw-flex tw-flex-col tw-gap-[12px] tw-overflow-y-auto tw-scrollbar-none tw-pt-4 tw-pb-[200px] tw-h-full",
|
|
1985
|
-
onScroll:
|
|
2205
|
+
onScroll: w,
|
|
1986
2206
|
children: [
|
|
1987
|
-
e == null ? void 0 : e.map((
|
|
1988
|
-
r ? /* @__PURE__ */ t(
|
|
2207
|
+
e == null ? void 0 : e.map((p) => /* @__PURE__ */ t(Je, { ...p }, p.id)),
|
|
2208
|
+
r ? /* @__PURE__ */ t(Me, {}) : /* @__PURE__ */ t("p", { className: "tw-text-center tw-text-gray-500 tw-text-2xl", children: "No hay más tareas por mostrar..." })
|
|
1989
2209
|
]
|
|
1990
2210
|
}
|
|
1991
2211
|
)
|
|
1992
2212
|
]
|
|
1993
2213
|
}
|
|
1994
2214
|
);
|
|
1995
|
-
},
|
|
1996
|
-
var
|
|
2215
|
+
}, ta = () => {
|
|
2216
|
+
var l;
|
|
1997
2217
|
const { defineFields: a } = K(), { tasksProject: e } = et();
|
|
1998
|
-
|
|
2218
|
+
F(() => {
|
|
1999
2219
|
(async () => {
|
|
2000
2220
|
let s = [...Ae];
|
|
2001
2221
|
a(s);
|
|
2002
2222
|
})();
|
|
2003
2223
|
}, []);
|
|
2004
|
-
let
|
|
2224
|
+
let n = (l = e == null ? void 0 : e.data) == null ? void 0 : l.filter((o) => {
|
|
2005
2225
|
var s;
|
|
2006
|
-
return ((s =
|
|
2007
|
-
}).reduce((
|
|
2008
|
-
return /* @__PURE__ */ t("div", { className: "tw-flex tw-gap-4 tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: ["Por hacer", "Trabajando", "Completadas"].map((
|
|
2009
|
-
var
|
|
2226
|
+
return ((s = o == null ? void 0 : o.tasks) == null ? void 0 : s.length) === 0;
|
|
2227
|
+
}).reduce((o, s) => (o[s.status] = o[s.status] || [], o[s.status].push(s), o), {});
|
|
2228
|
+
return /* @__PURE__ */ t("div", { className: "tw-flex tw-gap-4 tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: ["Por hacer", "Trabajando", "Completadas"].map((o, s) => {
|
|
2229
|
+
var u;
|
|
2010
2230
|
return /* @__PURE__ */ t(
|
|
2011
|
-
|
|
2231
|
+
mt,
|
|
2012
2232
|
{
|
|
2013
|
-
total: ((
|
|
2014
|
-
title:
|
|
2015
|
-
tasks: (
|
|
2233
|
+
total: ((u = n == null ? void 0 : n[s]) == null ? void 0 : u.length) ?? 0,
|
|
2234
|
+
title: o,
|
|
2235
|
+
tasks: (n == null ? void 0 : n[s]) ?? [],
|
|
2016
2236
|
isFetching: e == null ? void 0 : e.isFetching,
|
|
2017
2237
|
isLoadingData: e == null ? void 0 : e.isLoading
|
|
2018
2238
|
}
|
|
2019
2239
|
);
|
|
2020
2240
|
}) });
|
|
2021
|
-
},
|
|
2022
|
-
var r,
|
|
2023
|
-
const { toDoTasks: a, total: e } =
|
|
2241
|
+
}, ea = () => {
|
|
2242
|
+
var r, l;
|
|
2243
|
+
const { toDoTasks: a, total: e } = Ht(), n = [...((l = (r = a == null ? void 0 : a.data) == null ? void 0 : r.pages) == null ? void 0 : l.flat()) ?? []];
|
|
2024
2244
|
return /* @__PURE__ */ t(
|
|
2025
|
-
|
|
2245
|
+
mt,
|
|
2026
2246
|
{
|
|
2027
2247
|
total: e,
|
|
2028
2248
|
title: "Por hacer",
|
|
2029
|
-
tasks:
|
|
2030
|
-
loadNextPage: () =>
|
|
2249
|
+
tasks: n,
|
|
2250
|
+
loadNextPage: () => _t(a),
|
|
2031
2251
|
isFetching: a == null ? void 0 : a.isFetching,
|
|
2032
2252
|
isLoadingData: a == null ? void 0 : a.isLoading
|
|
2033
2253
|
}
|
|
2034
2254
|
);
|
|
2035
|
-
},
|
|
2255
|
+
}, aa = () => {
|
|
2036
2256
|
var m;
|
|
2037
|
-
const a =
|
|
2257
|
+
const a = it(), { tasks_api: e } = B(), { user: n } = G(), { filters: r } = K(), [l, o] = f(0), [s, u] = f({
|
|
2038
2258
|
owner: {
|
|
2039
|
-
user:
|
|
2259
|
+
user: n.id,
|
|
2040
2260
|
config: ((m = r == null ? void 0 : r.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos"
|
|
2041
2261
|
},
|
|
2042
2262
|
status: "trabajando"
|
|
2043
|
-
}),
|
|
2263
|
+
}), w = xt({
|
|
2044
2264
|
initialPageParam: 1,
|
|
2045
2265
|
queryKey: ["working_tasks", s],
|
|
2046
|
-
queryFn: ({ pageParam:
|
|
2266
|
+
queryFn: ({ pageParam: p }) => Nt({
|
|
2047
2267
|
filters: {
|
|
2048
2268
|
...s,
|
|
2049
2269
|
status: "trabajando",
|
|
2050
|
-
...
|
|
2270
|
+
...X(p)
|
|
2051
2271
|
},
|
|
2052
|
-
tasks_api: e
|
|
2053
|
-
page: u
|
|
2272
|
+
tasks_api: e
|
|
2054
2273
|
}),
|
|
2055
2274
|
staleTime: 1e3 * 60 * 60 * 24,
|
|
2056
2275
|
// mantains the data for 24 hours
|
|
2057
|
-
getNextPageParam: (
|
|
2276
|
+
getNextPageParam: (p, y) => y.length + 1
|
|
2058
2277
|
});
|
|
2059
|
-
return
|
|
2060
|
-
var
|
|
2061
|
-
Object.keys(r).length > 0 &&
|
|
2278
|
+
return F(() => {
|
|
2279
|
+
var p;
|
|
2280
|
+
Object.keys(r).length > 0 && u({
|
|
2062
2281
|
...r,
|
|
2063
2282
|
owner: {
|
|
2064
|
-
user:
|
|
2065
|
-
config: ((
|
|
2283
|
+
user: n.id,
|
|
2284
|
+
config: ((p = r == null ? void 0 : r.owner) == null ? void 0 : p.config) ?? "yo_y_mis_equipos"
|
|
2066
2285
|
},
|
|
2067
2286
|
status: "trabajando"
|
|
2068
2287
|
});
|
|
2069
|
-
}, [r]),
|
|
2288
|
+
}, [r]), F(() => {
|
|
2070
2289
|
a.invalidateQueries({
|
|
2071
2290
|
queryKey: ["working_tasks", s]
|
|
2072
2291
|
});
|
|
2073
|
-
}, [s]),
|
|
2292
|
+
}, [s]), F(() => {
|
|
2074
2293
|
(async () => {
|
|
2075
2294
|
const y = await e.get("/api/listado_tareas", {
|
|
2076
2295
|
params: {
|
|
2077
2296
|
...s,
|
|
2078
2297
|
status: "trabajando",
|
|
2079
|
-
...
|
|
2298
|
+
...X(1),
|
|
2080
2299
|
tasks_api: e,
|
|
2081
2300
|
justCount: !0
|
|
2082
2301
|
}
|
|
2083
2302
|
});
|
|
2084
|
-
|
|
2303
|
+
o(y.data.total);
|
|
2085
2304
|
})();
|
|
2086
|
-
}, [s,
|
|
2305
|
+
}, [s, w == null ? void 0 : w.data]), {
|
|
2087
2306
|
//Properties
|
|
2088
|
-
workingTasks:
|
|
2089
|
-
total:
|
|
2307
|
+
workingTasks: w,
|
|
2308
|
+
total: l
|
|
2090
2309
|
};
|
|
2091
|
-
},
|
|
2092
|
-
var r,
|
|
2093
|
-
const { workingTasks: a, total: e } =
|
|
2310
|
+
}, ra = () => {
|
|
2311
|
+
var r, l;
|
|
2312
|
+
const { workingTasks: a, total: e } = aa(), n = [...((l = (r = a == null ? void 0 : a.data) == null ? void 0 : r.pages) == null ? void 0 : l.flat()) ?? []];
|
|
2094
2313
|
return /* @__PURE__ */ t(
|
|
2095
|
-
|
|
2314
|
+
mt,
|
|
2096
2315
|
{
|
|
2097
2316
|
total: e,
|
|
2098
2317
|
title: "Trabajando",
|
|
2099
|
-
tasks:
|
|
2100
|
-
loadNextPage: () =>
|
|
2318
|
+
tasks: n,
|
|
2319
|
+
loadNextPage: () => _t(a),
|
|
2101
2320
|
isFetching: a == null ? void 0 : a.isFetching
|
|
2102
2321
|
}
|
|
2103
2322
|
);
|
|
2104
|
-
},
|
|
2323
|
+
}, sa = () => {
|
|
2105
2324
|
var m;
|
|
2106
|
-
const a =
|
|
2325
|
+
const a = it(), { user: e } = G(), { tasks_api: n } = B(), { filters: r } = K(), [l, o] = f(0), [s, u] = f({
|
|
2107
2326
|
owner: {
|
|
2108
2327
|
user: e.id,
|
|
2109
2328
|
config: ((m = r == null ? void 0 : r.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos"
|
|
2110
2329
|
},
|
|
2111
2330
|
status: "completadas"
|
|
2112
|
-
}),
|
|
2331
|
+
}), w = xt({
|
|
2113
2332
|
initialPageParam: 1,
|
|
2114
2333
|
queryKey: ["done_tasks", s],
|
|
2115
|
-
queryFn: ({ pageParam:
|
|
2334
|
+
queryFn: ({ pageParam: p }) => Nt({
|
|
2116
2335
|
filters: {
|
|
2117
2336
|
...s,
|
|
2118
2337
|
status: "completadas",
|
|
2119
|
-
...
|
|
2338
|
+
...X(p)
|
|
2120
2339
|
},
|
|
2121
|
-
tasks_api:
|
|
2122
|
-
page: u
|
|
2340
|
+
tasks_api: n
|
|
2123
2341
|
}),
|
|
2124
2342
|
staleTime: 1e3 * 60 * 60 * 24,
|
|
2125
2343
|
// mantains the data for 24 hours
|
|
2126
|
-
getNextPageParam: (
|
|
2344
|
+
getNextPageParam: (p, y) => y.length + 1
|
|
2127
2345
|
});
|
|
2128
|
-
return
|
|
2129
|
-
var
|
|
2130
|
-
Object.keys(r).length > 0 &&
|
|
2346
|
+
return F(() => {
|
|
2347
|
+
var p;
|
|
2348
|
+
Object.keys(r).length > 0 && u({
|
|
2131
2349
|
...r,
|
|
2132
2350
|
owner: {
|
|
2133
2351
|
user: e.id,
|
|
2134
|
-
config: ((
|
|
2352
|
+
config: ((p = r == null ? void 0 : r.owner) == null ? void 0 : p.config) ?? "yo_y_mis_equipos"
|
|
2135
2353
|
},
|
|
2136
2354
|
status: "completadas"
|
|
2137
2355
|
});
|
|
2138
|
-
}, [r]),
|
|
2356
|
+
}, [r]), F(() => {
|
|
2139
2357
|
a.invalidateQueries({
|
|
2140
2358
|
queryKey: ["done_tasks", s]
|
|
2141
2359
|
});
|
|
2142
|
-
}, [s]),
|
|
2360
|
+
}, [s]), F(() => {
|
|
2143
2361
|
(async () => {
|
|
2144
|
-
const y = await
|
|
2362
|
+
const y = await n.get("/api/listado_tareas", {
|
|
2145
2363
|
params: {
|
|
2146
2364
|
...s,
|
|
2147
2365
|
status: "completadas",
|
|
2148
|
-
...
|
|
2366
|
+
...X(1),
|
|
2149
2367
|
justCount: !0,
|
|
2150
|
-
tasks_api:
|
|
2368
|
+
tasks_api: n
|
|
2151
2369
|
}
|
|
2152
2370
|
});
|
|
2153
|
-
|
|
2371
|
+
o(y.data.total);
|
|
2154
2372
|
})();
|
|
2155
|
-
}, [
|
|
2373
|
+
}, [w == null ? void 0 : w.data, s]), {
|
|
2156
2374
|
// Properties
|
|
2157
|
-
doneTasks:
|
|
2158
|
-
total:
|
|
2375
|
+
doneTasks: w,
|
|
2376
|
+
total: l
|
|
2159
2377
|
};
|
|
2160
|
-
},
|
|
2161
|
-
var r,
|
|
2162
|
-
const { doneTasks: a, total: e } =
|
|
2378
|
+
}, na = () => {
|
|
2379
|
+
var r, l;
|
|
2380
|
+
const { doneTasks: a, total: e } = sa(), n = [...((l = (r = a == null ? void 0 : a.data) == null ? void 0 : r.pages) == null ? void 0 : l.flat()) ?? []];
|
|
2163
2381
|
return /* @__PURE__ */ t(
|
|
2164
|
-
|
|
2382
|
+
mt,
|
|
2165
2383
|
{
|
|
2166
2384
|
title: "Completadas",
|
|
2167
|
-
tasks:
|
|
2168
|
-
loadNextPage: () =>
|
|
2385
|
+
tasks: n,
|
|
2386
|
+
loadNextPage: () => _t(a),
|
|
2169
2387
|
isFetching: a == null ? void 0 : a.isFetching,
|
|
2170
2388
|
total: e
|
|
2171
2389
|
}
|
|
2172
2390
|
);
|
|
2173
2391
|
};
|
|
2174
|
-
class
|
|
2392
|
+
class dt {
|
|
2175
2393
|
static toSalesmanUsers(e) {
|
|
2176
2394
|
return {
|
|
2177
2395
|
id: e.id,
|
|
@@ -2179,46 +2397,46 @@ class ot {
|
|
|
2179
2397
|
};
|
|
2180
2398
|
}
|
|
2181
2399
|
}
|
|
2182
|
-
const
|
|
2183
|
-
const { tasks_api: a } = B(), { filters: e } = K(), { user:
|
|
2400
|
+
const la = () => {
|
|
2401
|
+
const { tasks_api: a } = B(), { filters: e } = K(), { user: n } = G();
|
|
2184
2402
|
return {
|
|
2185
2403
|
//methods
|
|
2186
2404
|
getSalesmanAndProjects: async () => {
|
|
2187
|
-
var
|
|
2188
|
-
const [s,
|
|
2405
|
+
var w;
|
|
2406
|
+
const [s, u] = await Promise.all([
|
|
2189
2407
|
a.get("/api/obtener-comerciales"),
|
|
2190
2408
|
a.get("/api/listado_tareas", {
|
|
2191
2409
|
params: {
|
|
2192
2410
|
...e,
|
|
2193
2411
|
owner: {
|
|
2194
|
-
user:
|
|
2195
|
-
config: ((
|
|
2412
|
+
user: n == null ? void 0 : n.id,
|
|
2413
|
+
config: ((w = e == null ? void 0 : e.owner) == null ? void 0 : w.config) ?? "yo_y_mis_equipos"
|
|
2196
2414
|
},
|
|
2197
2415
|
justProjects: !0
|
|
2198
2416
|
}
|
|
2199
2417
|
})
|
|
2200
2418
|
]);
|
|
2201
2419
|
return {
|
|
2202
|
-
salesmanUsers: s.data.map(
|
|
2203
|
-
projects:
|
|
2420
|
+
salesmanUsers: s.data.map(dt.toSalesmanUsers),
|
|
2421
|
+
projects: u.data.map(dt.toSalesmanUsers)
|
|
2204
2422
|
};
|
|
2205
2423
|
},
|
|
2206
2424
|
getProjects: async () => {
|
|
2207
|
-
var
|
|
2425
|
+
var u;
|
|
2208
2426
|
return (await a.get("/api/listado_tareas", {
|
|
2209
2427
|
params: {
|
|
2210
2428
|
...e,
|
|
2211
2429
|
owner: {
|
|
2212
|
-
user:
|
|
2213
|
-
config: ((
|
|
2430
|
+
user: n.id,
|
|
2431
|
+
config: ((u = e == null ? void 0 : e.owner) == null ? void 0 : u.config) ?? "yo_y_mis_equipos"
|
|
2214
2432
|
},
|
|
2215
2433
|
justProjects: !0
|
|
2216
2434
|
}
|
|
2217
|
-
})).data.map(
|
|
2435
|
+
})).data.map(dt.toSalesmanUsers);
|
|
2218
2436
|
},
|
|
2219
|
-
getSalesmans: async () => (await a.get("/api/obtener-comerciales")).data.map(
|
|
2437
|
+
getSalesmans: async () => (await a.get("/api/obtener-comerciales")).data.map(dt.toSalesmanUsers)
|
|
2220
2438
|
};
|
|
2221
|
-
},
|
|
2439
|
+
}, oa = [
|
|
2222
2440
|
{
|
|
2223
2441
|
label: "Tipo de dependencia",
|
|
2224
2442
|
type: "select",
|
|
@@ -2287,7 +2505,7 @@ const ra = () => {
|
|
|
2287
2505
|
}
|
|
2288
2506
|
]
|
|
2289
2507
|
}
|
|
2290
|
-
],
|
|
2508
|
+
], Ft = [
|
|
2291
2509
|
{
|
|
2292
2510
|
label: "Responsable",
|
|
2293
2511
|
type: "select",
|
|
@@ -2304,23 +2522,23 @@ const ra = () => {
|
|
|
2304
2522
|
id: "ejecutivo",
|
|
2305
2523
|
options: []
|
|
2306
2524
|
}
|
|
2307
|
-
],
|
|
2308
|
-
const { defineFields: a } = K(), { getSalesmanAndProjects: e } =
|
|
2309
|
-
return
|
|
2525
|
+
], ia = () => {
|
|
2526
|
+
const { defineFields: a } = K(), { getSalesmanAndProjects: e } = la();
|
|
2527
|
+
return F(() => {
|
|
2310
2528
|
(async () => {
|
|
2311
|
-
let r = [...
|
|
2529
|
+
let r = [...oa], { salesmanUsers: l, projects: o } = await e();
|
|
2312
2530
|
a(
|
|
2313
|
-
r.map((s) => (s.id === "project.id" && (s.options =
|
|
2531
|
+
r.map((s) => (s.id === "project.id" && (s.options = o), s.id === "salesman.id" && (s.options = l), s))
|
|
2314
2532
|
);
|
|
2315
2533
|
})();
|
|
2316
|
-
}, []), /* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */ t(
|
|
2318
|
-
/* @__PURE__ */ t(
|
|
2319
|
-
/* @__PURE__ */ t(
|
|
2534
|
+
}, []), /* @__PURE__ */ i("div", { className: "tw-flex tw-gap-4 tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: [
|
|
2535
|
+
/* @__PURE__ */ t(ea, {}),
|
|
2536
|
+
/* @__PURE__ */ t(ra, {}),
|
|
2537
|
+
/* @__PURE__ */ t(na, {})
|
|
2320
2538
|
] });
|
|
2321
|
-
}, Gt = J({}),
|
|
2322
|
-
const [e,
|
|
2323
|
-
|
|
2539
|
+
}, Gt = J({}), ca = ({ children: a }) => {
|
|
2540
|
+
const [e, n] = f([]), r = (l) => {
|
|
2541
|
+
n((o) => o.includes(l) ? o.filter((s) => s !== l) : [...o, l]);
|
|
2324
2542
|
};
|
|
2325
2543
|
return /* @__PURE__ */ t(
|
|
2326
2544
|
Gt.Provider,
|
|
@@ -2334,8 +2552,8 @@ const ra = () => {
|
|
|
2334
2552
|
children: a
|
|
2335
2553
|
}
|
|
2336
2554
|
);
|
|
2337
|
-
},
|
|
2338
|
-
const a = () => /* @__PURE__ */
|
|
2555
|
+
}, wa = () => tt(Gt), Zt = () => {
|
|
2556
|
+
const a = () => /* @__PURE__ */ i("div", { className: "tw-w-full tw-flex tw-gap-m", children: [
|
|
2339
2557
|
/* @__PURE__ */ t("div", { className: "tw-w-[30px] tw-h-[30px] tw-min-w-[30px] tw-min-h-[30px] tw-bg-gray-200 tw-rounded-full tw-animate-pulse" }),
|
|
2340
2558
|
/* @__PURE__ */ t("div", { className: "tw-w-[30%] tw-h-[30px] tw-bg-gray-200 tw-rounded-md tw-animate-pulse" }),
|
|
2341
2559
|
/* @__PURE__ */ t("div", { className: "tw-w-[30px] tw-h-[30px] tw-min-w-[30px] tw-min-h-[30px] tw-bg-gray-200 tw-rounded-lg tw-animate-pulse" }),
|
|
@@ -2347,42 +2565,42 @@ const ra = () => {
|
|
|
2347
2565
|
/* @__PURE__ */ t("div", { className: "tw-w-[30px] tw-h-[30px] tw-min-w-[30px] tw-min-h-[30px] tw-bg-gray-200 tw-rounded-lg tw-animate-pulse" }),
|
|
2348
2566
|
/* @__PURE__ */ t("div", { className: "tw-w-[30px] tw-h-[30px] tw-min-w-[30px] tw-min-h-[30px] tw-bg-gray-200 tw-rounded-lg tw-animate-pulse" })
|
|
2349
2567
|
] });
|
|
2350
|
-
return /* @__PURE__ */
|
|
2568
|
+
return /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-m", children: [
|
|
2351
2569
|
/* @__PURE__ */ t(a, {}),
|
|
2352
|
-
/* @__PURE__ */
|
|
2570
|
+
/* @__PURE__ */ i("div", { className: "tw-pl-5 tw-flex tw-flex-col tw-gap-m", children: [
|
|
2353
2571
|
/* @__PURE__ */ t(a, {}),
|
|
2354
2572
|
/* @__PURE__ */ t("div", { className: "tw-pl-5", children: /* @__PURE__ */ t(a, {}) })
|
|
2355
2573
|
] }),
|
|
2356
2574
|
/* @__PURE__ */ t(a, {}),
|
|
2357
|
-
/* @__PURE__ */
|
|
2575
|
+
/* @__PURE__ */ i("div", { className: "tw-pl-5 tw-flex tw-flex-col tw-gap-m", children: [
|
|
2358
2576
|
/* @__PURE__ */ t(a, {}),
|
|
2359
2577
|
/* @__PURE__ */ t("div", { className: "tw-pl-5", children: /* @__PURE__ */ t(a, {}) })
|
|
2360
2578
|
] })
|
|
2361
2579
|
] });
|
|
2362
|
-
}, Xt = ({ startDate: a, endDate: e }) => /* @__PURE__ */
|
|
2363
|
-
/* @__PURE__ */
|
|
2364
|
-
/* @__PURE__ */ t(
|
|
2365
|
-
/* @__PURE__ */
|
|
2580
|
+
}, Xt = ({ startDate: a, endDate: e }) => /* @__PURE__ */ i(R, { children: [
|
|
2581
|
+
/* @__PURE__ */ i("div", { className: "tw-gap-s tw-bg-gray-100 tw-rounded-md tw-h-[30px] tw-w-fit tw-flex tw-justify-center tw-items-center tw-px-xxxl", children: [
|
|
2582
|
+
/* @__PURE__ */ t(T, { icon: "calendar", size: "xs", strokeWidth: 4, color: g.texts.subtext }),
|
|
2583
|
+
/* @__PURE__ */ i("p", { className: "tw-text-lg", children: [
|
|
2366
2584
|
" ",
|
|
2367
2585
|
jt(a)
|
|
2368
2586
|
] })
|
|
2369
2587
|
] }),
|
|
2370
|
-
/* @__PURE__ */ t(
|
|
2371
|
-
/* @__PURE__ */
|
|
2372
|
-
/* @__PURE__ */ t(
|
|
2373
|
-
/* @__PURE__ */
|
|
2588
|
+
/* @__PURE__ */ t(T, { icon: "arrow_right", size: "xs", strokeWidth: 4, color: g.texts.DEFAULT }),
|
|
2589
|
+
/* @__PURE__ */ i("div", { className: "tw-gap-s tw-bg-gray-100 tw-rounded-md tw-h-[30px] tw-w-fit tw-flex tw-justify-center tw-items-center tw-px-xxxl", children: [
|
|
2590
|
+
/* @__PURE__ */ t(T, { icon: "calendar", size: "xs", strokeWidth: 4, color: g.texts.subtext }),
|
|
2591
|
+
/* @__PURE__ */ i("p", { className: "tw-text-lg", children: [
|
|
2374
2592
|
" ",
|
|
2375
2593
|
jt(e)
|
|
2376
2594
|
] })
|
|
2377
2595
|
] })
|
|
2378
|
-
] }),
|
|
2596
|
+
] }), Jt = ({
|
|
2379
2597
|
id: a,
|
|
2380
2598
|
priority: e,
|
|
2381
|
-
difficulty:
|
|
2599
|
+
difficulty: n,
|
|
2382
2600
|
endDate: r
|
|
2383
2601
|
}) => {
|
|
2384
|
-
var s,
|
|
2385
|
-
const
|
|
2602
|
+
var s, u;
|
|
2603
|
+
const l = {
|
|
2386
2604
|
0: {
|
|
2387
2605
|
title: "N/A",
|
|
2388
2606
|
color: g.success.regular,
|
|
@@ -2403,7 +2621,7 @@ const ra = () => {
|
|
|
2403
2621
|
color: g.danger.regular,
|
|
2404
2622
|
bg: "tw-bg-danger-light tw-border-danger-regular"
|
|
2405
2623
|
}
|
|
2406
|
-
},
|
|
2624
|
+
}, o = {
|
|
2407
2625
|
0: {
|
|
2408
2626
|
title: "Muy fácil",
|
|
2409
2627
|
color: g.success.dark,
|
|
@@ -2430,12 +2648,12 @@ const ra = () => {
|
|
|
2430
2648
|
bg: "tw-bg-danger-light tw-border-danger-regular"
|
|
2431
2649
|
}
|
|
2432
2650
|
};
|
|
2433
|
-
return /* @__PURE__ */
|
|
2651
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
2434
2652
|
/* @__PURE__ */ t("button", { className: "tw-gap-s tw-bg-gray-100 tw-rounded-md tw-h-[30px] tw-w-[30px] tw-flex tw-justify-center tw-items-center hover:tw-bg-gray-200", children: /* @__PURE__ */ t(
|
|
2435
|
-
|
|
2653
|
+
O,
|
|
2436
2654
|
{
|
|
2437
2655
|
dispatch: /* @__PURE__ */ t(
|
|
2438
|
-
|
|
2656
|
+
T,
|
|
2439
2657
|
{
|
|
2440
2658
|
icon: "align_center",
|
|
2441
2659
|
size: "xs",
|
|
@@ -2453,20 +2671,20 @@ const ra = () => {
|
|
|
2453
2671
|
)
|
|
2454
2672
|
}
|
|
2455
2673
|
) }),
|
|
2456
|
-
/* @__PURE__ */
|
|
2674
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2", children: [
|
|
2457
2675
|
/* @__PURE__ */ t(
|
|
2458
2676
|
"div",
|
|
2459
2677
|
{
|
|
2460
|
-
className: `tw-gap-s ${((s =
|
|
2678
|
+
className: `tw-gap-s ${((s = o[n ?? 0]) == null ? void 0 : s.bg.replace(/\bbg-|border-/g, "tw-$&")) ?? "tw-bg-gray-100"} tw-border tw-rounded-md tw-h-[30px] tw-w-[30px] tw-flex tw-justify-center tw-items-center`,
|
|
2461
2679
|
children: /* @__PURE__ */ t(
|
|
2462
|
-
|
|
2680
|
+
O,
|
|
2463
2681
|
{
|
|
2464
2682
|
dispatch: /* @__PURE__ */ t(
|
|
2465
|
-
|
|
2683
|
+
T,
|
|
2466
2684
|
{
|
|
2467
2685
|
icon: "difficulty",
|
|
2468
2686
|
size: "xs",
|
|
2469
|
-
color:
|
|
2687
|
+
color: o[n ?? 0].color,
|
|
2470
2688
|
strokeWidth: 4
|
|
2471
2689
|
}
|
|
2472
2690
|
),
|
|
@@ -2474,8 +2692,8 @@ const ra = () => {
|
|
|
2474
2692
|
"p",
|
|
2475
2693
|
{
|
|
2476
2694
|
className: "tw-text-sm tw-font-regular tw-p-5 tw-bg-bg-card tw-rounded-lg",
|
|
2477
|
-
style: { color:
|
|
2478
|
-
children:
|
|
2695
|
+
style: { color: o[n ?? 0].color },
|
|
2696
|
+
children: o[n ?? 0].title
|
|
2479
2697
|
}
|
|
2480
2698
|
)
|
|
2481
2699
|
}
|
|
@@ -2485,16 +2703,16 @@ const ra = () => {
|
|
|
2485
2703
|
/* @__PURE__ */ t(
|
|
2486
2704
|
"div",
|
|
2487
2705
|
{
|
|
2488
|
-
className: `tw-gap-s ${((
|
|
2706
|
+
className: `tw-gap-s ${((u = l[e ?? 0]) == null ? void 0 : u.bg.replace(/\bbg-|border-/g, "tw-$&")) ?? "tw-bg-gray-100"} tw-border tw-rounded-md tw-h-[30px] tw-w-[30px] tw-flex tw-justify-center tw-items-center`,
|
|
2489
2707
|
children: /* @__PURE__ */ t(
|
|
2490
|
-
|
|
2708
|
+
O,
|
|
2491
2709
|
{
|
|
2492
2710
|
dispatch: /* @__PURE__ */ t(
|
|
2493
|
-
|
|
2711
|
+
T,
|
|
2494
2712
|
{
|
|
2495
2713
|
icon: "flag",
|
|
2496
2714
|
size: "xs",
|
|
2497
|
-
color:
|
|
2715
|
+
color: l[e ?? 0].color,
|
|
2498
2716
|
strokeWidth: 4
|
|
2499
2717
|
}
|
|
2500
2718
|
),
|
|
@@ -2502,21 +2720,21 @@ const ra = () => {
|
|
|
2502
2720
|
"p",
|
|
2503
2721
|
{
|
|
2504
2722
|
className: "tw-text-sm tw-font-regular tw-p-5 tw-bg-bg-card tw-rounded-lg",
|
|
2505
|
-
style: { color:
|
|
2506
|
-
children:
|
|
2723
|
+
style: { color: l[e ?? 0].color },
|
|
2724
|
+
children: l[e ?? 0].title
|
|
2507
2725
|
}
|
|
2508
2726
|
)
|
|
2509
2727
|
}
|
|
2510
2728
|
)
|
|
2511
2729
|
}
|
|
2512
2730
|
),
|
|
2513
|
-
/* @__PURE__ */ t(
|
|
2514
|
-
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-regular tw-text-texts-subtext", children: `${r.getDate()} ${
|
|
2731
|
+
/* @__PURE__ */ t(T, { icon: "calendar", size: "xs", strokeWidth: 3, color: g.texts.subtext }),
|
|
2732
|
+
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-regular tw-text-texts-subtext", children: `${r.getDate()} ${yt(r.getMonth()).slice(0, 3)}` })
|
|
2515
2733
|
] })
|
|
2516
2734
|
] });
|
|
2517
|
-
},
|
|
2518
|
-
const { selectedTasks: e, selectTask:
|
|
2519
|
-
return /* @__PURE__ */
|
|
2735
|
+
}, da = ({ id: a }) => {
|
|
2736
|
+
const { selectedTasks: e, selectTask: n } = wa();
|
|
2737
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
2520
2738
|
/* @__PURE__ */ t(
|
|
2521
2739
|
"label",
|
|
2522
2740
|
{
|
|
@@ -2527,7 +2745,7 @@ const ra = () => {
|
|
|
2527
2745
|
{
|
|
2528
2746
|
className: `${e.includes(a) ? "tw-opacity-100" : "tw-opacity-0"} tw-transition-opacity tw-duration-500`,
|
|
2529
2747
|
children: /* @__PURE__ */ t(
|
|
2530
|
-
|
|
2748
|
+
T,
|
|
2531
2749
|
{
|
|
2532
2750
|
icon: "check_outline",
|
|
2533
2751
|
size: "xs",
|
|
@@ -2545,21 +2763,21 @@ const ra = () => {
|
|
|
2545
2763
|
className: "tw-hidden",
|
|
2546
2764
|
id: a.toString(),
|
|
2547
2765
|
type: "checkbox",
|
|
2548
|
-
onChange: () =>
|
|
2766
|
+
onChange: () => n(a)
|
|
2549
2767
|
}
|
|
2550
2768
|
)
|
|
2551
2769
|
] });
|
|
2552
|
-
},
|
|
2553
|
-
|
|
2770
|
+
}, te = ({ task: a }) => /* @__PURE__ */ t(
|
|
2771
|
+
O,
|
|
2554
2772
|
{
|
|
2555
2773
|
dispatch: /* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-texts-subtext tw-max-w-[400px] tw-truncate", children: a }),
|
|
2556
2774
|
children: /* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-texts-subtext tw-p-2 tw-max-w-[400px]", children: a })
|
|
2557
2775
|
}
|
|
2558
|
-
),
|
|
2559
|
-
var
|
|
2560
|
-
const [e,
|
|
2561
|
-
return /* @__PURE__ */ t("div", { className: "tw-border-b tw-border-gray-200 tw-pb-3", children: /* @__PURE__ */
|
|
2562
|
-
!(s != null && s.nameRequiredTask) || (s == null ? void 0 : s.nameRequiredTask) !== "" && (s == null ? void 0 : s.statusRequiredTask) === 2 && /* @__PURE__ */ t(
|
|
2776
|
+
), ua = ({ id: a }) => {
|
|
2777
|
+
var u, w;
|
|
2778
|
+
const [e, n] = f(!1), { tasksProject: r } = et(), { reasignResponsible: l } = ct(), { getOBPUrlApi: o } = B(), s = (u = r == null ? void 0 : r.data) == null ? void 0 : u.find((m) => m.id === a);
|
|
2779
|
+
return /* @__PURE__ */ t("div", { className: "tw-border-b tw-border-gray-200 tw-pb-3", children: /* @__PURE__ */ i("div", { className: "tw-ml-[30px] tw-mb-3 tw-mt-1 tw-p-2 tw-flex tw-flex-wrap tw-items-center tw-gap-xl tw-rounded-md hover:tw-bg-gray-100", children: [
|
|
2780
|
+
!(s != null && s.nameRequiredTask) || (s == null ? void 0 : s.nameRequiredTask) !== "" && (s == null ? void 0 : s.statusRequiredTask) === 2 && /* @__PURE__ */ t(da, { id: a }),
|
|
2563
2781
|
/* @__PURE__ */ t(
|
|
2564
2782
|
Ut,
|
|
2565
2783
|
{
|
|
@@ -2571,19 +2789,19 @@ const ra = () => {
|
|
|
2571
2789
|
a
|
|
2572
2790
|
),
|
|
2573
2791
|
(s == null ? void 0 : s.willBePaused) && /* @__PURE__ */ t(
|
|
2574
|
-
|
|
2792
|
+
Yt,
|
|
2575
2793
|
{
|
|
2576
2794
|
open: e,
|
|
2577
|
-
setOpen:
|
|
2795
|
+
setOpen: n,
|
|
2578
2796
|
trigger: /* @__PURE__ */ t(
|
|
2579
|
-
|
|
2797
|
+
ft,
|
|
2580
2798
|
{
|
|
2581
2799
|
type: "button",
|
|
2582
2800
|
variant: "ghost",
|
|
2583
|
-
onClick: () =>
|
|
2801
|
+
onClick: () => n(!0),
|
|
2584
2802
|
className: "tw-text-sm tw-font-regular tw-text-gray-400 tw-flex tw-items-center tw-gap-2",
|
|
2585
2803
|
children: /* @__PURE__ */ t(
|
|
2586
|
-
|
|
2804
|
+
T,
|
|
2587
2805
|
{
|
|
2588
2806
|
icon: s != null && s.paused ? "play" : "pause",
|
|
2589
2807
|
size: "xs",
|
|
@@ -2593,33 +2811,33 @@ const ra = () => {
|
|
|
2593
2811
|
}
|
|
2594
2812
|
),
|
|
2595
2813
|
children: /* @__PURE__ */ t(
|
|
2596
|
-
|
|
2814
|
+
Vt,
|
|
2597
2815
|
{
|
|
2598
2816
|
idTask: s == null ? void 0 : s.id,
|
|
2599
|
-
setOpen:
|
|
2817
|
+
setOpen: n,
|
|
2600
2818
|
paused: s == null ? void 0 : s.paused
|
|
2601
2819
|
}
|
|
2602
2820
|
)
|
|
2603
2821
|
}
|
|
2604
2822
|
),
|
|
2605
2823
|
/* @__PURE__ */ t(
|
|
2606
|
-
|
|
2824
|
+
Wt,
|
|
2607
2825
|
{
|
|
2608
|
-
onClick: async (m,
|
|
2826
|
+
onClick: async (m, p) => {
|
|
2609
2827
|
var y;
|
|
2610
|
-
await
|
|
2828
|
+
await l({
|
|
2611
2829
|
idNewResponsible: (y = m == null ? void 0 : m.tasksUser) == null ? void 0 : y.id,
|
|
2612
2830
|
id: a,
|
|
2613
|
-
typeOfSelect:
|
|
2831
|
+
typeOfSelect: p
|
|
2614
2832
|
});
|
|
2615
2833
|
},
|
|
2616
2834
|
responsible: s == null ? void 0 : s.responsible,
|
|
2617
|
-
users: ((
|
|
2835
|
+
users: ((w = s == null ? void 0 : s.users) == null ? void 0 : w.map((m) => vt(m, o()))) ?? []
|
|
2618
2836
|
}
|
|
2619
2837
|
),
|
|
2620
|
-
/* @__PURE__ */ t(
|
|
2838
|
+
/* @__PURE__ */ t(te, { task: (s == null ? void 0 : s.task) ?? "" }),
|
|
2621
2839
|
/* @__PURE__ */ t(
|
|
2622
|
-
|
|
2840
|
+
Jt,
|
|
2623
2841
|
{
|
|
2624
2842
|
id: a,
|
|
2625
2843
|
priority: s == null ? void 0 : s.priority,
|
|
@@ -2638,99 +2856,131 @@ const ra = () => {
|
|
|
2638
2856
|
}
|
|
2639
2857
|
)
|
|
2640
2858
|
] }) });
|
|
2641
|
-
},
|
|
2642
|
-
var
|
|
2643
|
-
const { tasksProject: e, openTasks:
|
|
2644
|
-
return
|
|
2645
|
-
/* @__PURE__ */
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2859
|
+
}, ee = ({ id: a }) => {
|
|
2860
|
+
var u, w, m, p, y, v, d;
|
|
2861
|
+
const { tasksProject: e, openTasks: n, openTask: r } = et(), l = (u = e == null ? void 0 : e.data) == null ? void 0 : u.find((x) => x.id === a), [o, s] = f(null);
|
|
2862
|
+
return l ? /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-gap-m tw-mb-2 tw-overflow-y-auto", children: [
|
|
2863
|
+
/* @__PURE__ */ i(
|
|
2864
|
+
"div",
|
|
2865
|
+
{
|
|
2866
|
+
className: "tw-flex tw-items-center tw-gap-m tw-flex-wrap hover:tw-bg-silver-silver_light tw-p-2 tw-rounded-md tw-cursor-pointer",
|
|
2867
|
+
onMouseEnter: () => {
|
|
2868
|
+
s(a);
|
|
2869
|
+
},
|
|
2870
|
+
onMouseLeave: () => s(null),
|
|
2871
|
+
onClick: () => r(a),
|
|
2872
|
+
children: [
|
|
2873
|
+
/* @__PURE__ */ t(
|
|
2874
|
+
"button",
|
|
2875
|
+
{
|
|
2876
|
+
className: `${n.includes(a) ? "" : "tw--rotate-90"} tw-transition-all tw-duration-300`,
|
|
2877
|
+
children: /* @__PURE__ */ t(T, { icon: "angle_down_outline", color: g.texts.subtext })
|
|
2878
|
+
}
|
|
2879
|
+
),
|
|
2880
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-justify-center tw-min-w-[28px] tw-min-h-[28px] tw-w-fit tw-h-[28px] tw-mx-1 tw-bg-primary-medium tw-rounded-full", children: /* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-primary", children: ((w = l == null ? void 0 : l.tasks) == null ? void 0 : w.length) === 0 ? 1 : (m = l == null ? void 0 : l.tasks) == null ? void 0 : m.length }) }),
|
|
2881
|
+
/* @__PURE__ */ t(te, { task: (l == null ? void 0 : l.task) ?? "" }),
|
|
2882
|
+
/* @__PURE__ */ t(
|
|
2883
|
+
Jt,
|
|
2884
|
+
{
|
|
2885
|
+
id: a,
|
|
2886
|
+
priority: l == null ? void 0 : l.priority,
|
|
2887
|
+
difficulty: l.difficulty,
|
|
2888
|
+
endDate: l == null ? void 0 : l.endDate
|
|
2889
|
+
}
|
|
2890
|
+
),
|
|
2891
|
+
/* @__PURE__ */ t(Xt, { startDate: l == null ? void 0 : l.startDate, endDate: l == null ? void 0 : l.endDate }),
|
|
2892
|
+
/* @__PURE__ */ i("button", { className: "tw-gap-s tw-bg-gray-100 tw-rounded-md tw-h-[30px] tw-flex tw-justify-center tw-items-center tw-w-fit tw-px-m hover:tw-bg-gray-200", children: [
|
|
2893
|
+
/* @__PURE__ */ t(T, { icon: "subtasks", size: "xs", strokeWidth: 5, color: g.texts.subtext }),
|
|
2894
|
+
/* @__PURE__ */ t("p", { className: "tw-text-xl", children: ((p = l == null ? void 0 : l.tasks) == null ? void 0 : p.length) === 0 ? 1 : (y = l == null ? void 0 : l.tasks) == null ? void 0 : y.length })
|
|
2895
|
+
] }),
|
|
2896
|
+
o === a && /* @__PURE__ */ i("div", { className: "tw-h-[30px] tw-bg-silver-silver_dark tw-rounded-md tw-flex tw-justify-center tw-items-center tw-gap-2 tw-p-[4px] tw-rounded-[12px]", children: [
|
|
2897
|
+
/* @__PURE__ */ t(O, { dispatch: /* @__PURE__ */ t(
|
|
2898
|
+
"button",
|
|
2899
|
+
{
|
|
2900
|
+
className: "tw-z-10 tw-bg-silver-silver_light tw-rounded-[8px] tw-h-[21px] tw-w-[24px] tw-flex tw-justify-center tw-items-center tw-w-fit tw-px-[4px] hover:tw-bg-gray-200 hover:tw-cursor-help",
|
|
2901
|
+
onClick: (x) => {
|
|
2902
|
+
x.stopPropagation(), console.log("comment");
|
|
2903
|
+
},
|
|
2904
|
+
children: /* @__PURE__ */ t(T, { icon: "comment", size: "xs", strokeWidth: 5, color: g.texts.subtext, classNameDiv: "tw-w-[13px] tw-h-[13px]", style: { width: "13px", height: "13px" } })
|
|
2905
|
+
}
|
|
2906
|
+
), children: /* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-justify-center tw-px-3 tw-py-2 tw-bg-bg-card tw-rounded-lg tw-border tw-border-border-card", children: /* @__PURE__ */ t("p", { className: "tw-text-texts-placeholder tw-text-lg tw-font-semibold", children: "Espéralo muy pronto..." }) }) }),
|
|
2907
|
+
/* @__PURE__ */ t(
|
|
2908
|
+
"button",
|
|
2909
|
+
{
|
|
2910
|
+
className: "tw-bg-silver-silver_light tw-rounded-[8px] tw-h-[21px] tw-w-[24px] tw-flex tw-justify-center tw-items-center tw-w-fit tw-px-[4px] hover:tw-bg-gray-200",
|
|
2911
|
+
onClick: (x) => {
|
|
2912
|
+
x.stopPropagation(), console.log("elipsis");
|
|
2913
|
+
},
|
|
2914
|
+
children: /* @__PURE__ */ t(T, { icon: "elipsis", size: "xs", strokeWidth: 5, color: g.texts.subtext, classNameDiv: "tw-w-[13px] tw-h-[13px] tw-rotate-90", style: { width: "13px", height: "13px" } })
|
|
2915
|
+
}
|
|
2916
|
+
)
|
|
2917
|
+
] })
|
|
2918
|
+
]
|
|
2919
|
+
}
|
|
2920
|
+
),
|
|
2921
|
+
n.includes(a) && /* @__PURE__ */ t("div", { className: "tw-ml-[30px]", children: ((v = l == null ? void 0 : l.tasks) == null ? void 0 : v.length) > 0 ? (d = l == null ? void 0 : l.tasks) == null ? void 0 : d.map((x) => /* @__PURE__ */ t(ee, { id: x == null ? void 0 : x.id })) : /* @__PURE__ */ t(ua, { id: l == null ? void 0 : l.id }) })
|
|
2672
2922
|
] }) : null;
|
|
2673
|
-
},
|
|
2923
|
+
}, pa = () => {
|
|
2674
2924
|
var r;
|
|
2675
2925
|
const { tasksProject: a, projectID: e } = et();
|
|
2676
|
-
if (a != null && a.isFetching || a != null && a.isLoading) return /* @__PURE__ */ t(
|
|
2677
|
-
let
|
|
2678
|
-
return /* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-m", children: /* @__PURE__ */ t(
|
|
2679
|
-
},
|
|
2926
|
+
if (a != null && a.isFetching || a != null && a.isLoading) return /* @__PURE__ */ t(Zt, {});
|
|
2927
|
+
let n = [...(r = a == null ? void 0 : a.data) == null ? void 0 : r.filter((l) => l.isPrincipalTask)];
|
|
2928
|
+
return /* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-m", children: /* @__PURE__ */ t(ca, { project: e, children: n == null ? void 0 : n.sort((l, o) => l.orden - o.orden).map((l) => /* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-m tw-border-b tw-border-gray-200 tw-pb-m ", children: /* @__PURE__ */ t(ee, { id: l.id }) })) }) });
|
|
2929
|
+
}, ma = ({
|
|
2680
2930
|
setPath: a,
|
|
2681
2931
|
setProject: e
|
|
2682
2932
|
}) => {
|
|
2683
|
-
const [
|
|
2684
|
-
var L,
|
|
2933
|
+
const [n, r] = f([]), [l, o] = f(!0), [s, u] = f(0), [w, m] = f(10), [p, y] = f(0), [v, d] = f("nombre"), { filters: x, defineFields: _ } = K(), { tasks_api: b, getImageOBP: k } = B(), { user: C } = G(), j = async (c, A) => {
|
|
2934
|
+
var L, $, I;
|
|
2685
2935
|
try {
|
|
2686
|
-
|
|
2687
|
-
const
|
|
2936
|
+
o(!0);
|
|
2937
|
+
const z = {
|
|
2688
2938
|
filters: {
|
|
2689
|
-
search: (
|
|
2939
|
+
search: (x == null ? void 0 : x.search) ?? "",
|
|
2690
2940
|
responsable: {
|
|
2691
|
-
idUser:
|
|
2692
|
-
responsableType: (L =
|
|
2941
|
+
idUser: C.id,
|
|
2942
|
+
responsableType: (L = x == null ? void 0 : x.responsable) == null ? void 0 : L.responsableType
|
|
2693
2943
|
},
|
|
2694
|
-
ejecutivo: (
|
|
2944
|
+
ejecutivo: (x == null ? void 0 : x.ejecutivo) ?? ""
|
|
2695
2945
|
}
|
|
2696
|
-
},
|
|
2946
|
+
}, E = await b.get("/api/listado_campanias", {
|
|
2697
2947
|
params: {
|
|
2698
2948
|
pagination: {
|
|
2699
|
-
page:
|
|
2949
|
+
page: c,
|
|
2700
2950
|
pageSize: A
|
|
2701
2951
|
},
|
|
2702
|
-
orderBy:
|
|
2703
|
-
|
|
2952
|
+
orderBy: v,
|
|
2953
|
+
...z
|
|
2704
2954
|
}
|
|
2705
|
-
}), U =
|
|
2706
|
-
r(U), y((I = (
|
|
2707
|
-
} catch (
|
|
2708
|
-
console.error("Error fetching data en Lista Campaña:",
|
|
2955
|
+
}), U = Y(E == null ? void 0 : E.data);
|
|
2956
|
+
r(U), y((I = ($ = E == null ? void 0 : E.data) == null ? void 0 : $.meta) == null ? void 0 : I.total);
|
|
2957
|
+
} catch (z) {
|
|
2958
|
+
console.error("Error fetching data en Lista Campaña:", z);
|
|
2709
2959
|
} finally {
|
|
2710
|
-
|
|
2960
|
+
o(!1);
|
|
2711
2961
|
}
|
|
2712
|
-
},
|
|
2962
|
+
}, M = async () => {
|
|
2713
2963
|
try {
|
|
2714
|
-
const
|
|
2715
|
-
return [...
|
|
2716
|
-
id:
|
|
2717
|
-
name:
|
|
2964
|
+
const c = await b.get("/api/obtener-comerciales");
|
|
2965
|
+
return [...Ft].map((L) => (L.id === "ejecutivo" && (L.options = c.data.map(($) => ({
|
|
2966
|
+
id: $.nombre,
|
|
2967
|
+
name: $.nombre
|
|
2718
2968
|
}))), L));
|
|
2719
|
-
} catch (
|
|
2720
|
-
return console.error("Error fetching salesman data:",
|
|
2969
|
+
} catch (c) {
|
|
2970
|
+
return console.error("Error fetching salesman data:", c), [...Ft];
|
|
2721
2971
|
}
|
|
2722
2972
|
};
|
|
2723
|
-
|
|
2973
|
+
F(() => {
|
|
2724
2974
|
(async () => {
|
|
2725
|
-
const A = await
|
|
2726
|
-
|
|
2975
|
+
const A = await M();
|
|
2976
|
+
_(A);
|
|
2727
2977
|
})();
|
|
2728
|
-
}, []),
|
|
2729
|
-
const
|
|
2730
|
-
j(
|
|
2731
|
-
}, [s,
|
|
2732
|
-
const
|
|
2733
|
-
|
|
2978
|
+
}, []), F(() => {
|
|
2979
|
+
const c = Math.floor(s / w) + 1;
|
|
2980
|
+
j(c, w);
|
|
2981
|
+
}, [s, w, v, x]);
|
|
2982
|
+
const S = (c) => {
|
|
2983
|
+
u(c.first), m(c.rows);
|
|
2734
2984
|
}, D = [
|
|
2735
2985
|
{ label: "5 filas", value: 5 },
|
|
2736
2986
|
{ label: "10 filas", value: 10 },
|
|
@@ -2738,20 +2988,20 @@ const ra = () => {
|
|
|
2738
2988
|
{ label: "20 filas", value: 20 },
|
|
2739
2989
|
{ label: "25 filas", value: 25 },
|
|
2740
2990
|
{ label: "50 filas", value: 50 }
|
|
2741
|
-
],
|
|
2742
|
-
const A = parseInt(
|
|
2743
|
-
m(A),
|
|
2744
|
-
},
|
|
2745
|
-
|
|
2746
|
-
},
|
|
2991
|
+
], q = (c) => {
|
|
2992
|
+
const A = parseInt(c.target.value, 10);
|
|
2993
|
+
m(A), S({ first: 0, rows: A });
|
|
2994
|
+
}, h = (c) => {
|
|
2995
|
+
d((A) => A === c ? `${c}:desc` : c);
|
|
2996
|
+
}, N = (c) => v === c ? "↑↓" : v === `${c}:desc` ? "↓↑" : "↑↓", P = (c) => ({
|
|
2747
2997
|
padding: "auto",
|
|
2748
2998
|
backgroundColor: g.silver.silver_light,
|
|
2749
2999
|
borderRadius: "50%",
|
|
2750
|
-
cursor:
|
|
3000
|
+
cursor: c ? "not-allowed" : "pointer",
|
|
2751
3001
|
transition: "all 0.2s ease",
|
|
2752
3002
|
marginRight: "4px",
|
|
2753
|
-
border: `1px solid ${
|
|
2754
|
-
color:
|
|
3003
|
+
border: `1px solid ${c ? g.gray.gray_regular : g.gray.gray_dark}`,
|
|
3004
|
+
color: c ? g.gray.gray_regular : g.black.black_dark,
|
|
2755
3005
|
width: "32px",
|
|
2756
3006
|
height: "32px",
|
|
2757
3007
|
display: "flex",
|
|
@@ -2769,8 +3019,8 @@ const ra = () => {
|
|
|
2769
3019
|
flexDirection: "column",
|
|
2770
3020
|
height: "100%"
|
|
2771
3021
|
},
|
|
2772
|
-
children:
|
|
2773
|
-
/* @__PURE__ */ t("div", { className: "tw-flex-1 tw-overflow-auto", children: /* @__PURE__ */
|
|
3022
|
+
children: l ? /* @__PURE__ */ t("div", { className: "tw-w-full", children: /* @__PURE__ */ t(Zt, {}) }) : /* @__PURE__ */ t(R, { children: /* @__PURE__ */ i("div", { className: "tw-flex tw-flex-col tw-h-full", children: [
|
|
3023
|
+
/* @__PURE__ */ t("div", { className: "tw-flex-1 tw-overflow-auto", children: /* @__PURE__ */ i(
|
|
2774
3024
|
"table",
|
|
2775
3025
|
{
|
|
2776
3026
|
className: "tw-w-full tw-border-collapse tw-table-auto",
|
|
@@ -2780,7 +3030,7 @@ const ra = () => {
|
|
|
2780
3030
|
borderSpacing: "0"
|
|
2781
3031
|
},
|
|
2782
3032
|
children: [
|
|
2783
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */
|
|
3033
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ i(
|
|
2784
3034
|
"tr",
|
|
2785
3035
|
{
|
|
2786
3036
|
style: {
|
|
@@ -2790,12 +3040,12 @@ const ra = () => {
|
|
|
2790
3040
|
/* @__PURE__ */ t(
|
|
2791
3041
|
"th",
|
|
2792
3042
|
{
|
|
2793
|
-
onClick: () =>
|
|
3043
|
+
onClick: () => h("nombre"),
|
|
2794
3044
|
style: {
|
|
2795
3045
|
color: g.gray.gray_dark,
|
|
2796
3046
|
textAlign: "left"
|
|
2797
3047
|
},
|
|
2798
|
-
children: /* @__PURE__ */
|
|
3048
|
+
children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
2799
3049
|
/* @__PURE__ */ t(
|
|
2800
3050
|
"label",
|
|
2801
3051
|
{
|
|
@@ -2803,7 +3053,7 @@ const ra = () => {
|
|
|
2803
3053
|
style: {
|
|
2804
3054
|
color: g.gray.gray_dark
|
|
2805
3055
|
},
|
|
2806
|
-
children:
|
|
3056
|
+
children: N("nombre")
|
|
2807
3057
|
}
|
|
2808
3058
|
),
|
|
2809
3059
|
"Campaña"
|
|
@@ -2813,13 +3063,13 @@ const ra = () => {
|
|
|
2813
3063
|
/* @__PURE__ */ t(
|
|
2814
3064
|
"th",
|
|
2815
3065
|
{
|
|
2816
|
-
onClick: () =>
|
|
3066
|
+
onClick: () => h("inicia"),
|
|
2817
3067
|
className: "tw-whitespace-nowrap",
|
|
2818
3068
|
style: {
|
|
2819
3069
|
color: g.gray.gray_dark,
|
|
2820
3070
|
textAlign: "left"
|
|
2821
3071
|
},
|
|
2822
|
-
children: /* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-w-fit tw-space-x-1", children: /* @__PURE__ */
|
|
3072
|
+
children: /* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-w-fit tw-space-x-1", children: /* @__PURE__ */ i(
|
|
2823
3073
|
"label",
|
|
2824
3074
|
{
|
|
2825
3075
|
className: "tw-text-s tw-flex tw-items-center",
|
|
@@ -2827,9 +3077,9 @@ const ra = () => {
|
|
|
2827
3077
|
color: g.gray.gray_dark
|
|
2828
3078
|
},
|
|
2829
3079
|
children: [
|
|
2830
|
-
|
|
3080
|
+
N("inicia"),
|
|
2831
3081
|
/* @__PURE__ */ t(
|
|
2832
|
-
|
|
3082
|
+
T,
|
|
2833
3083
|
{
|
|
2834
3084
|
icon: "calendar",
|
|
2835
3085
|
size: "xs",
|
|
@@ -2854,13 +3104,13 @@ const ra = () => {
|
|
|
2854
3104
|
/* @__PURE__ */ t(
|
|
2855
3105
|
"th",
|
|
2856
3106
|
{
|
|
2857
|
-
onClick: () =>
|
|
3107
|
+
onClick: () => h("termina"),
|
|
2858
3108
|
className: "tw-whitespace-nowrap",
|
|
2859
3109
|
style: {
|
|
2860
3110
|
color: g.gray.gray_dark,
|
|
2861
3111
|
textAlign: "left"
|
|
2862
3112
|
},
|
|
2863
|
-
children: /* @__PURE__ */
|
|
3113
|
+
children: /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-w-fit", children: [
|
|
2864
3114
|
/* @__PURE__ */ t(
|
|
2865
3115
|
"label",
|
|
2866
3116
|
{
|
|
@@ -2868,11 +3118,11 @@ const ra = () => {
|
|
|
2868
3118
|
color: "#C4C4C4",
|
|
2869
3119
|
fontSize: "10px"
|
|
2870
3120
|
},
|
|
2871
|
-
children:
|
|
3121
|
+
children: N("termina")
|
|
2872
3122
|
}
|
|
2873
3123
|
),
|
|
2874
3124
|
/* @__PURE__ */ t(
|
|
2875
|
-
|
|
3125
|
+
T,
|
|
2876
3126
|
{
|
|
2877
3127
|
icon: "calendar",
|
|
2878
3128
|
size: "xs",
|
|
@@ -2917,9 +3167,9 @@ const ra = () => {
|
|
|
2917
3167
|
]
|
|
2918
3168
|
}
|
|
2919
3169
|
) }),
|
|
2920
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2921
|
-
var L,
|
|
2922
|
-
return /* @__PURE__ */
|
|
3170
|
+
/* @__PURE__ */ t("tbody", { children: n == null ? void 0 : n.map((c, A) => {
|
|
3171
|
+
var L, $, I, z, E, U, H, at, rt, st, nt, lt, ot, W, Z, Ct, Tt, kt;
|
|
3172
|
+
return /* @__PURE__ */ i(
|
|
2923
3173
|
"tr",
|
|
2924
3174
|
{
|
|
2925
3175
|
style: {
|
|
@@ -2929,21 +3179,21 @@ const ra = () => {
|
|
|
2929
3179
|
className: "tw-cursor-pointer",
|
|
2930
3180
|
onClick: () => {
|
|
2931
3181
|
e({
|
|
2932
|
-
id:
|
|
2933
|
-
project:
|
|
3182
|
+
id: c == null ? void 0 : c.id,
|
|
3183
|
+
project: c == null ? void 0 : c.nombre
|
|
2934
3184
|
}), a("kanban-campania");
|
|
2935
3185
|
},
|
|
2936
|
-
onMouseEnter: (
|
|
2937
|
-
|
|
3186
|
+
onMouseEnter: (gt) => {
|
|
3187
|
+
gt.currentTarget.style.backgroundColor = "#E1EBF9";
|
|
2938
3188
|
},
|
|
2939
|
-
onMouseLeave: (
|
|
2940
|
-
|
|
3189
|
+
onMouseLeave: (gt) => {
|
|
3190
|
+
gt.currentTarget.style.backgroundColor = A % 2 === 0 ? "#F5F5F5" : "#FAFAFA";
|
|
2941
3191
|
},
|
|
2942
3192
|
children: [
|
|
2943
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (L =
|
|
2944
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (
|
|
2945
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (I =
|
|
2946
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */
|
|
3193
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (L = c == null ? void 0 : c.campania) == null ? void 0 : L.nombre }),
|
|
3194
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: ($ = c == null ? void 0 : c.campania) == null ? void 0 : $.inicia }),
|
|
3195
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (I = c == null ? void 0 : c.campania) == null ? void 0 : I.termina }),
|
|
3196
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */ i(
|
|
2947
3197
|
"div",
|
|
2948
3198
|
{
|
|
2949
3199
|
style: {
|
|
@@ -2955,8 +3205,8 @@ const ra = () => {
|
|
|
2955
3205
|
minWidth: "100px"
|
|
2956
3206
|
},
|
|
2957
3207
|
children: [
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
|
|
3208
|
+
/* @__PURE__ */ i("label", { className: "tw-w-[50px] tw-min-w-[50px] tw-text-right tw-text-black", children: [
|
|
3209
|
+
c == null ? void 0 : c.progreso,
|
|
2960
3210
|
"%"
|
|
2961
3211
|
] }),
|
|
2962
3212
|
/* @__PURE__ */ t(
|
|
@@ -2978,8 +3228,8 @@ const ra = () => {
|
|
|
2978
3228
|
top: 0,
|
|
2979
3229
|
left: 0,
|
|
2980
3230
|
height: "100%",
|
|
2981
|
-
width: `${
|
|
2982
|
-
backgroundColor:
|
|
3231
|
+
width: `${c.progreso}%`,
|
|
3232
|
+
backgroundColor: c.progreso === 100 ? g.progressbar.green_regular : c.progreso > 50 ? g.progressbar.blue_regular : c.progreso > 0 ? g.progressbar.orange_regular : g.gray.gray_dark,
|
|
2983
3233
|
borderRadius: "10px",
|
|
2984
3234
|
transition: "width 0.3s ease-in-out"
|
|
2985
3235
|
}
|
|
@@ -2990,7 +3240,7 @@ const ra = () => {
|
|
|
2990
3240
|
]
|
|
2991
3241
|
}
|
|
2992
3242
|
) }),
|
|
2993
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */
|
|
3243
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */ i(
|
|
2994
3244
|
"div",
|
|
2995
3245
|
{
|
|
2996
3246
|
style: {
|
|
@@ -3002,8 +3252,8 @@ const ra = () => {
|
|
|
3002
3252
|
minWidth: "100px"
|
|
3003
3253
|
},
|
|
3004
3254
|
children: [
|
|
3005
|
-
/* @__PURE__ */
|
|
3006
|
-
(
|
|
3255
|
+
/* @__PURE__ */ i("label", { className: "tw-w-[50px] tw-min-w-[50px] tw-text-right tw-text-black", children: [
|
|
3256
|
+
(c == null ? void 0 : c.progresoVenta) ?? 0,
|
|
3007
3257
|
"%"
|
|
3008
3258
|
] }),
|
|
3009
3259
|
/* @__PURE__ */ t(
|
|
@@ -3025,8 +3275,8 @@ const ra = () => {
|
|
|
3025
3275
|
top: 0,
|
|
3026
3276
|
left: 0,
|
|
3027
3277
|
height: "100%",
|
|
3028
|
-
width: `${(
|
|
3029
|
-
backgroundColor: (
|
|
3278
|
+
width: `${(c == null ? void 0 : c.progresoVenta) ?? 0}%`,
|
|
3279
|
+
backgroundColor: (c == null ? void 0 : c.progresoVenta) === 100 ? g.progressbar.green_regular : (c == null ? void 0 : c.progresoVenta) > 50 ? g.progressbar.blue_regular : (c == null ? void 0 : c.progresoVenta) > 0 ? g.progressbar.orange_regular : g.gray.gray_dark,
|
|
3030
3280
|
borderRadius: "10px",
|
|
3031
3281
|
transition: "width 0.3s ease-in-out"
|
|
3032
3282
|
}
|
|
@@ -3037,19 +3287,19 @@ const ra = () => {
|
|
|
3037
3287
|
]
|
|
3038
3288
|
}
|
|
3039
3289
|
) }),
|
|
3040
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */
|
|
3290
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-justify-center tw-text-s", children: [
|
|
3041
3291
|
/* @__PURE__ */ t(
|
|
3042
|
-
|
|
3292
|
+
Q,
|
|
3043
3293
|
{
|
|
3044
|
-
imageUrl: (at = (H = (U = (
|
|
3045
|
-
(
|
|
3294
|
+
imageUrl: (at = (H = (U = (E = (z = c == null ? void 0 : c.campania) == null ? void 0 : z.responsable) == null ? void 0 : E.imagen) == null ? void 0 : U.formats) == null ? void 0 : H.thumbnail) != null && at.url ? k(
|
|
3295
|
+
(ot = (lt = (nt = (st = (rt = c == null ? void 0 : c.campania) == null ? void 0 : rt.responsable) == null ? void 0 : st.imagen) == null ? void 0 : nt.formats) == null ? void 0 : lt.thumbnail) == null ? void 0 : ot.url
|
|
3046
3296
|
) : "",
|
|
3047
|
-
alt: (Ct = (
|
|
3297
|
+
alt: (Ct = (Z = (W = c == null ? void 0 : c.campania) == null ? void 0 : W.responsable) == null ? void 0 : Z.nombre) == null ? void 0 : Ct.charAt(
|
|
3048
3298
|
0
|
|
3049
3299
|
)
|
|
3050
3300
|
}
|
|
3051
3301
|
),
|
|
3052
|
-
/* @__PURE__ */ t("span", { className: "tw-ml-4 tw-text-s", children: (
|
|
3302
|
+
/* @__PURE__ */ t("span", { className: "tw-ml-4 tw-text-s", children: (kt = (Tt = c == null ? void 0 : c.campania) == null ? void 0 : Tt.responsable) == null ? void 0 : kt.nombre })
|
|
3053
3303
|
] }) })
|
|
3054
3304
|
]
|
|
3055
3305
|
},
|
|
@@ -3059,8 +3309,8 @@ const ra = () => {
|
|
|
3059
3309
|
]
|
|
3060
3310
|
}
|
|
3061
3311
|
) }),
|
|
3062
|
-
/* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
3312
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-justify-between tw-p-2 tw-mt-4", children: [
|
|
3313
|
+
/* @__PURE__ */ i(
|
|
3064
3314
|
"div",
|
|
3065
3315
|
{
|
|
3066
3316
|
style: {
|
|
@@ -3071,9 +3321,9 @@ const ra = () => {
|
|
|
3071
3321
|
},
|
|
3072
3322
|
className: "tw-text-s tw-whitespace-nowrap",
|
|
3073
3323
|
children: [
|
|
3074
|
-
|
|
3324
|
+
n.length,
|
|
3075
3325
|
" elementos de ",
|
|
3076
|
-
|
|
3326
|
+
p
|
|
3077
3327
|
]
|
|
3078
3328
|
}
|
|
3079
3329
|
),
|
|
@@ -3081,10 +3331,10 @@ const ra = () => {
|
|
|
3081
3331
|
Ne,
|
|
3082
3332
|
{
|
|
3083
3333
|
first: s,
|
|
3084
|
-
rows:
|
|
3085
|
-
totalRecords:
|
|
3334
|
+
rows: w,
|
|
3335
|
+
totalRecords: p,
|
|
3086
3336
|
rowsPerPageOptions: [5, 10, 20, 50],
|
|
3087
|
-
onPageChange:
|
|
3337
|
+
onPageChange: S,
|
|
3088
3338
|
className: "tw-flex tw-justify-center tw-items-center tw-w-full tw-p-2 tw-gap-1 tw-rounded-lg",
|
|
3089
3339
|
style: {
|
|
3090
3340
|
display: "flex",
|
|
@@ -3097,65 +3347,65 @@ const ra = () => {
|
|
|
3097
3347
|
},
|
|
3098
3348
|
template: {
|
|
3099
3349
|
layout: "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",
|
|
3100
|
-
FirstPageLink: (
|
|
3350
|
+
FirstPageLink: (c) => /* @__PURE__ */ t(
|
|
3101
3351
|
"button",
|
|
3102
3352
|
{
|
|
3103
|
-
onClick:
|
|
3104
|
-
disabled:
|
|
3105
|
-
style:
|
|
3353
|
+
onClick: c.onClick,
|
|
3354
|
+
disabled: c.disabled,
|
|
3355
|
+
style: P(c.disabled),
|
|
3106
3356
|
className: "tw-flex tw-items-center tw-justify-center tw-text-s",
|
|
3107
3357
|
children: "<<"
|
|
3108
3358
|
}
|
|
3109
3359
|
),
|
|
3110
|
-
PrevPageLink: (
|
|
3360
|
+
PrevPageLink: (c) => /* @__PURE__ */ t(
|
|
3111
3361
|
"button",
|
|
3112
3362
|
{
|
|
3113
|
-
onClick:
|
|
3114
|
-
disabled:
|
|
3115
|
-
style:
|
|
3363
|
+
onClick: c.onClick,
|
|
3364
|
+
disabled: c.disabled,
|
|
3365
|
+
style: P(c.disabled),
|
|
3116
3366
|
className: "tw-text-s",
|
|
3117
3367
|
children: "<"
|
|
3118
3368
|
}
|
|
3119
3369
|
),
|
|
3120
|
-
NextPageLink: (
|
|
3370
|
+
NextPageLink: (c) => /* @__PURE__ */ t(
|
|
3121
3371
|
"button",
|
|
3122
3372
|
{
|
|
3123
|
-
onClick:
|
|
3124
|
-
disabled:
|
|
3125
|
-
style:
|
|
3373
|
+
onClick: c.onClick,
|
|
3374
|
+
disabled: c.disabled,
|
|
3375
|
+
style: P(c.disabled),
|
|
3126
3376
|
className: "tw-text-s",
|
|
3127
3377
|
children: ">"
|
|
3128
3378
|
}
|
|
3129
3379
|
),
|
|
3130
|
-
LastPageLink: (
|
|
3380
|
+
LastPageLink: (c) => /* @__PURE__ */ t(
|
|
3131
3381
|
"button",
|
|
3132
3382
|
{
|
|
3133
|
-
onClick:
|
|
3134
|
-
disabled:
|
|
3135
|
-
style:
|
|
3383
|
+
onClick: c.onClick,
|
|
3384
|
+
disabled: c.disabled,
|
|
3385
|
+
style: P(c.disabled),
|
|
3136
3386
|
className: "tw-text-s",
|
|
3137
3387
|
children: ">>"
|
|
3138
3388
|
}
|
|
3139
3389
|
),
|
|
3140
|
-
PageLinks: (
|
|
3390
|
+
PageLinks: (c) => /* @__PURE__ */ t("span", { style: { display: "inline-flex", gap: "1px" }, children: /* @__PURE__ */ t(
|
|
3141
3391
|
"button",
|
|
3142
3392
|
{
|
|
3143
|
-
onClick: (A) =>
|
|
3144
|
-
className: `tw-flex tw-items-center tw-justify-center tw-text-s ${
|
|
3393
|
+
onClick: (A) => c.onClick(A),
|
|
3394
|
+
className: `tw-flex tw-items-center tw-justify-center tw-text-s ${c.className.includes("p-highlight") ? "highlighted" : ""}`,
|
|
3145
3395
|
style: {
|
|
3146
|
-
...
|
|
3147
|
-
backgroundColor:
|
|
3396
|
+
...P(!1),
|
|
3397
|
+
backgroundColor: c.className.includes(
|
|
3148
3398
|
"p-highlight"
|
|
3149
3399
|
) ? "#E1EBF9" : g.silver.silver_light,
|
|
3150
3400
|
color: g.black.black_dark
|
|
3151
3401
|
},
|
|
3152
|
-
children:
|
|
3402
|
+
children: c.page + 1
|
|
3153
3403
|
}
|
|
3154
3404
|
) })
|
|
3155
3405
|
}
|
|
3156
3406
|
}
|
|
3157
3407
|
),
|
|
3158
|
-
/* @__PURE__ */
|
|
3408
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2", children: [
|
|
3159
3409
|
/* @__PURE__ */ t("span", { className: "tw-text-s tw-whitespace-nowrap", children: "Filas por página:" }),
|
|
3160
3410
|
/* @__PURE__ */ t(
|
|
3161
3411
|
"select",
|
|
@@ -3167,17 +3417,17 @@ const ra = () => {
|
|
|
3167
3417
|
border: `1px solid ${g.gray.gray_dark}`,
|
|
3168
3418
|
borderRadius: "4px"
|
|
3169
3419
|
},
|
|
3170
|
-
value:
|
|
3171
|
-
onChange: (
|
|
3172
|
-
children: D.map((
|
|
3420
|
+
value: w,
|
|
3421
|
+
onChange: (c) => q(c),
|
|
3422
|
+
children: D.map((c) => /* @__PURE__ */ t(
|
|
3173
3423
|
"option",
|
|
3174
3424
|
{
|
|
3175
|
-
value:
|
|
3425
|
+
value: c.value,
|
|
3176
3426
|
className: "tw-text-s",
|
|
3177
3427
|
style: { color: g.gray.gray_dark },
|
|
3178
|
-
children:
|
|
3428
|
+
children: c.label
|
|
3179
3429
|
},
|
|
3180
|
-
|
|
3430
|
+
c.value
|
|
3181
3431
|
))
|
|
3182
3432
|
}
|
|
3183
3433
|
)
|
|
@@ -3186,22 +3436,22 @@ const ra = () => {
|
|
|
3186
3436
|
] }) })
|
|
3187
3437
|
}
|
|
3188
3438
|
);
|
|
3189
|
-
},
|
|
3190
|
-
const
|
|
3191
|
-
"kanban-general": { kanban: /* @__PURE__ */ t(
|
|
3439
|
+
}, ga = ({ path: a, tab: e, setPath: n, project: r, setProject: l }) => {
|
|
3440
|
+
const o = {
|
|
3441
|
+
"kanban-general": { kanban: /* @__PURE__ */ t(ia, {}) },
|
|
3192
3442
|
"lista-campanias": {
|
|
3193
|
-
lista: /* @__PURE__ */ t(
|
|
3443
|
+
lista: /* @__PURE__ */ t(ma, { setPath: n, setProject: l }),
|
|
3194
3444
|
gantt: /* @__PURE__ */ t("div", { children: "gantt-campanias" })
|
|
3195
3445
|
},
|
|
3196
3446
|
"kanban-campania": {
|
|
3197
|
-
kanban: /* @__PURE__ */ t(
|
|
3198
|
-
lista: /* @__PURE__ */ t(
|
|
3447
|
+
kanban: /* @__PURE__ */ t(ta, {}),
|
|
3448
|
+
lista: /* @__PURE__ */ t(pa, {}),
|
|
3199
3449
|
gantt: /* @__PURE__ */ t("div", { children: "kanban-campania-gantt" })
|
|
3200
3450
|
}
|
|
3201
3451
|
};
|
|
3202
|
-
return a === "kanban-campania" ? /* @__PURE__ */ t(
|
|
3203
|
-
},
|
|
3204
|
-
|
|
3452
|
+
return a === "kanban-campania" ? /* @__PURE__ */ t(It, { project: r == null ? void 0 : r.id, children: o[a][e] }) : o[a][e];
|
|
3453
|
+
}, xa = ({ label: a, active: e, onClick: n, disabled: r }) => r ? /* @__PURE__ */ t(
|
|
3454
|
+
O,
|
|
3205
3455
|
{
|
|
3206
3456
|
dispatch: /* @__PURE__ */ t("button", { className: "tw-text-texts-placeholder tw-text-xl tw-font-semibold tw-cursor-help", children: a }),
|
|
3207
3457
|
children: /* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-justify-center tw-px-3 tw-py-2 tw-bg-bg-card tw-rounded-lg tw-border tw-border-border-card", children: /* @__PURE__ */ t("p", { className: "tw-text-texts-placeholder tw-text-lg tw-font-semibold", children: "Espéralo muy pronto..." }) })
|
|
@@ -3210,51 +3460,51 @@ const ra = () => {
|
|
|
3210
3460
|
"button",
|
|
3211
3461
|
{
|
|
3212
3462
|
disabled: r,
|
|
3213
|
-
onClick:
|
|
3463
|
+
onClick: n,
|
|
3214
3464
|
className: `${e ? "tw-text-texts-enfasis tw-border-b-2 tw-border-texts-enfasis" : ""} tw-text-xl tw-font-semibold ${r ? "tw-cursor-not-allowed tw-text-texts-placeholder tw-text-lg" : "tw-text-texts-subtext"}`,
|
|
3215
3465
|
children: a
|
|
3216
3466
|
}
|
|
3217
|
-
),
|
|
3218
|
-
const [r,
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
}, [
|
|
3222
|
-
const
|
|
3223
|
-
|
|
3467
|
+
), ha = ({ tabs: a, renderItem: e, initialTab: n }) => {
|
|
3468
|
+
const [r, l] = f(n ?? a[0].toLowerCase());
|
|
3469
|
+
F(() => {
|
|
3470
|
+
n && l(n);
|
|
3471
|
+
}, [n]);
|
|
3472
|
+
const o = (s) => {
|
|
3473
|
+
l(s), e(s);
|
|
3224
3474
|
};
|
|
3225
|
-
return /* @__PURE__ */ t("div", { className: "tw-flex", children: a.map((s,
|
|
3475
|
+
return /* @__PURE__ */ t("div", { className: "tw-flex", children: a.map((s, u) => /* @__PURE__ */ t(
|
|
3226
3476
|
"div",
|
|
3227
3477
|
{
|
|
3228
|
-
className: `${
|
|
3478
|
+
className: `${u === 0 ? "tw-border-l-2" : ""} tw-border-r-2 tw-border-gray-200 tw-px-m`,
|
|
3229
3479
|
children: /* @__PURE__ */ t(
|
|
3230
|
-
|
|
3480
|
+
xa,
|
|
3231
3481
|
{
|
|
3232
|
-
onClick: () =>
|
|
3482
|
+
onClick: () => o(s.toLowerCase()),
|
|
3233
3483
|
label: s,
|
|
3234
3484
|
active: s.toLowerCase() === r,
|
|
3235
3485
|
disabled: ["gantt"].includes(s.toLowerCase())
|
|
3236
3486
|
},
|
|
3237
|
-
|
|
3487
|
+
u
|
|
3238
3488
|
)
|
|
3239
3489
|
}
|
|
3240
3490
|
)) });
|
|
3241
3491
|
};
|
|
3242
|
-
function
|
|
3492
|
+
function fa() {
|
|
3243
3493
|
const { toast: a } = Kt();
|
|
3244
3494
|
return a.message ? /* @__PURE__ */ t(
|
|
3245
3495
|
"div",
|
|
3246
3496
|
{
|
|
3247
3497
|
className: `tw-fixed tw-top-[10%] tw-right-10 tw-z-50 tw-w-[300px] tw-h-[30px] tw-text-lg tw-bg-black tw-rounded-md tw-shadow-md ${a.type === "success" ? "tw-bg-success-medium" : "tw-bg-danger-medium"} tw-flex tw-items-center`,
|
|
3248
|
-
children: /* @__PURE__ */
|
|
3498
|
+
children: /* @__PURE__ */ i("div", { className: "relative tw-w-full tw-h-full tw-flex tw-items-center", children: [
|
|
3249
3499
|
/* @__PURE__ */ t(
|
|
3250
3500
|
"div",
|
|
3251
3501
|
{
|
|
3252
3502
|
className: `tw-w-[5px] tw-h-full ${a.type === "success" ? "tw-bg-success-dark" : "tw-bg-danger-regular"} tw-rounded-full tw-absolute tw-left-0`
|
|
3253
3503
|
}
|
|
3254
3504
|
),
|
|
3255
|
-
/* @__PURE__ */
|
|
3505
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-2 tw-pl-4", children: [
|
|
3256
3506
|
/* @__PURE__ */ t(
|
|
3257
|
-
|
|
3507
|
+
T,
|
|
3258
3508
|
{
|
|
3259
3509
|
icon: a.type === "success" ? "circle_checked" : "circle_x",
|
|
3260
3510
|
className: `tw-text-${a.type === "success" ? "success-dark" : "danger-dark"}`,
|
|
@@ -3273,63 +3523,63 @@ function ga() {
|
|
|
3273
3523
|
}
|
|
3274
3524
|
) : null;
|
|
3275
3525
|
}
|
|
3276
|
-
const
|
|
3526
|
+
const ba = ({ path: a }) => /* @__PURE__ */ t(Ce, { children: /* @__PURE__ */ i(De, { children: [
|
|
3277
3527
|
/* @__PURE__ */ t(() => {
|
|
3278
|
-
const { selectPath:
|
|
3528
|
+
const { selectPath: n, updateFilters: r, applyFilters: l, filters: o } = K(), [s, u] = f("kanban"), [w, m] = f(a), [p, y] = f({
|
|
3279
3529
|
id: 1704,
|
|
3280
3530
|
project: "Kanban de Campania"
|
|
3281
|
-
}), [
|
|
3282
|
-
{ path: "lista-campanias", search: (
|
|
3283
|
-
{ path: "kanban-campania", search: (
|
|
3284
|
-
{ path: "kanban-general", search: (
|
|
3285
|
-
]), [
|
|
3286
|
-
|
|
3287
|
-
var
|
|
3288
|
-
|
|
3289
|
-
}, [a,
|
|
3290
|
-
var
|
|
3291
|
-
((
|
|
3292
|
-
name:
|
|
3531
|
+
}), [v, d] = f([
|
|
3532
|
+
{ path: "lista-campanias", search: (o == null ? void 0 : o.search) ?? "" },
|
|
3533
|
+
{ path: "kanban-campania", search: (o == null ? void 0 : o.taskName) ?? "" },
|
|
3534
|
+
{ path: "kanban-general", search: (o == null ? void 0 : o.taskName) ?? "" }
|
|
3535
|
+
]), [x, _] = f(), b = V(null);
|
|
3536
|
+
F(() => {
|
|
3537
|
+
var q;
|
|
3538
|
+
u(w === "lista-campanias" ? "lista" : "kanban"), n(w), _(((q = v.find((h) => h.path === w)) == null ? void 0 : q.search) ?? "");
|
|
3539
|
+
}, [a, w]), F(() => {
|
|
3540
|
+
var q;
|
|
3541
|
+
((q = S()) == null ? void 0 : q.trim()) === "" && r({
|
|
3542
|
+
name: w === "lista-campanias" ? "search" : "taskName",
|
|
3293
3543
|
value: null
|
|
3294
|
-
}),
|
|
3295
|
-
}, [
|
|
3296
|
-
const
|
|
3544
|
+
}), l();
|
|
3545
|
+
}, [v]);
|
|
3546
|
+
const k = (q) => ({
|
|
3297
3547
|
"kanban-general": "Kanban General",
|
|
3298
3548
|
"lista-campanias": "Campanias",
|
|
3299
|
-
"kanban-campania": `Kanban de ${
|
|
3300
|
-
})[
|
|
3301
|
-
m(
|
|
3302
|
-
}, j = ["lista-campanias", "kanban-campania"],
|
|
3549
|
+
"kanban-campania": `Kanban de ${p.project}`
|
|
3550
|
+
})[q], C = (q) => {
|
|
3551
|
+
m(q);
|
|
3552
|
+
}, j = ["lista-campanias", "kanban-campania"], M = {
|
|
3303
3553
|
"lista-campanias": ["lista", "gantt"],
|
|
3304
3554
|
"kanban-campania": ["kanban", "lista", "gantt"]
|
|
3305
|
-
},
|
|
3306
|
-
var
|
|
3307
|
-
return ((
|
|
3308
|
-
}, D = (
|
|
3309
|
-
|
|
3310
|
-
(
|
|
3555
|
+
}, S = () => {
|
|
3556
|
+
var q;
|
|
3557
|
+
return ((q = v.find((h) => h.path === w)) == null ? void 0 : q.search) ?? "";
|
|
3558
|
+
}, D = (q) => {
|
|
3559
|
+
d(
|
|
3560
|
+
(h) => h.map((N) => N.path === w ? { ...N, search: q } : N)
|
|
3311
3561
|
);
|
|
3312
3562
|
};
|
|
3313
|
-
return
|
|
3314
|
-
const
|
|
3563
|
+
return F(() => {
|
|
3564
|
+
const q = setTimeout(() => {
|
|
3315
3565
|
r({
|
|
3316
|
-
name:
|
|
3317
|
-
value:
|
|
3318
|
-
}), D(
|
|
3566
|
+
name: w === "lista-campanias" ? "search" : "taskName",
|
|
3567
|
+
value: x == null ? void 0 : x.trim()
|
|
3568
|
+
}), D(x);
|
|
3319
3569
|
}, 500);
|
|
3320
3570
|
return () => {
|
|
3321
|
-
clearTimeout(
|
|
3571
|
+
clearTimeout(q);
|
|
3322
3572
|
};
|
|
3323
|
-
}, [
|
|
3324
|
-
/* @__PURE__ */
|
|
3325
|
-
/* @__PURE__ */
|
|
3326
|
-
|
|
3573
|
+
}, [x]), /* @__PURE__ */ i("div", { className: "tw-bg-bg-card tw-p-m tw-rounded-lg tw-border tw-border-gray-200 tw-flex tw-flex-col tw-gap-m tw-w-full tw-h-full tw-min-h-[100%] tw-relative tw-overflow-hidden", children: [
|
|
3574
|
+
/* @__PURE__ */ i("div", { className: "tw-w-full tw-justify-between tw-flex tw-items-end tw-border-b tw-border-gray-200 tw-pb-m tw-px-l tw-flex-wrap tw-gap-l", children: [
|
|
3575
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-gap-xl", children: [
|
|
3576
|
+
w === "kanban-campania" && /* @__PURE__ */ t(
|
|
3327
3577
|
"button",
|
|
3328
3578
|
{
|
|
3329
|
-
onClick: () =>
|
|
3579
|
+
onClick: () => C("lista-campanias"),
|
|
3330
3580
|
className: "tw-flex tw-items-center tw-text-primary hover:tw-text-primary/80 tw-transition-colors",
|
|
3331
3581
|
children: /* @__PURE__ */ t(
|
|
3332
|
-
|
|
3582
|
+
T,
|
|
3333
3583
|
{
|
|
3334
3584
|
icon: "arrow_left",
|
|
3335
3585
|
size: "xs",
|
|
@@ -3340,78 +3590,78 @@ const ha = ({ path: a }) => /* @__PURE__ */ t(_e, { children: /* @__PURE__ */ o(
|
|
|
3340
3590
|
)
|
|
3341
3591
|
}
|
|
3342
3592
|
),
|
|
3343
|
-
/* @__PURE__ */ t("h2", { className: "tw-text-texts tw-font-medium", children:
|
|
3344
|
-
j.includes(
|
|
3345
|
-
|
|
3593
|
+
/* @__PURE__ */ t("h2", { className: "tw-text-texts tw-font-medium", children: k(w) }),
|
|
3594
|
+
j.includes(w) && /* @__PURE__ */ t(
|
|
3595
|
+
ha,
|
|
3346
3596
|
{
|
|
3347
|
-
tabs:
|
|
3348
|
-
renderItem: (
|
|
3349
|
-
|
|
3597
|
+
tabs: M[w],
|
|
3598
|
+
renderItem: (q) => {
|
|
3599
|
+
u(q);
|
|
3350
3600
|
},
|
|
3351
3601
|
initialTab: s
|
|
3352
3602
|
}
|
|
3353
3603
|
)
|
|
3354
3604
|
] }),
|
|
3355
|
-
/* @__PURE__ */
|
|
3605
|
+
/* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-gap-s", children: [
|
|
3356
3606
|
/* @__PURE__ */ t(
|
|
3357
3607
|
"input",
|
|
3358
3608
|
{
|
|
3359
|
-
onChange: (
|
|
3360
|
-
|
|
3609
|
+
onChange: (q) => {
|
|
3610
|
+
_(q.target.value);
|
|
3361
3611
|
},
|
|
3362
3612
|
type: "text",
|
|
3363
3613
|
placeholder: "Buscar",
|
|
3364
|
-
value:
|
|
3614
|
+
value: x,
|
|
3365
3615
|
className: "tw-w-[200px] tw-h-[30px] tw-border-none tw-bg-bg-card tw-shadow-input tw-border tw-border-gray-200 tw-rounded-lg tw-px-l tw-text-xl "
|
|
3366
3616
|
}
|
|
3367
3617
|
),
|
|
3368
3618
|
/* @__PURE__ */ t(
|
|
3369
|
-
|
|
3619
|
+
_e,
|
|
3370
3620
|
{
|
|
3371
|
-
filterChildren:
|
|
3621
|
+
filterChildren: b,
|
|
3372
3622
|
children: /* @__PURE__ */ t(
|
|
3373
3623
|
"div",
|
|
3374
3624
|
{
|
|
3375
|
-
ref:
|
|
3625
|
+
ref: b,
|
|
3376
3626
|
className: "tw-w-max tw-max-w-[400px] tw-h-fit tw-bg-bg-card tw-shadow-lg tw-rounded-lg tw-p-l",
|
|
3377
|
-
children: /* @__PURE__ */ t(
|
|
3627
|
+
children: /* @__PURE__ */ t(qe, {})
|
|
3378
3628
|
}
|
|
3379
3629
|
)
|
|
3380
3630
|
}
|
|
3381
3631
|
)
|
|
3382
3632
|
] })
|
|
3383
3633
|
] }),
|
|
3384
|
-
/* @__PURE__ */ t("div", { className: "tw-overflow-y-auto tw-scrollbar-none tw-max-h-[100%] tw-h-full", children: /* @__PURE__ */ t(
|
|
3385
|
-
|
|
3634
|
+
/* @__PURE__ */ t("div", { className: "tw-overflow-y-auto tw-scrollbar-none tw-max-h-[100%] tw-h-full", children: /* @__PURE__ */ t(It, { project: p.id, children: /* @__PURE__ */ t(
|
|
3635
|
+
ga,
|
|
3386
3636
|
{
|
|
3387
|
-
path:
|
|
3637
|
+
path: w,
|
|
3388
3638
|
tab: s,
|
|
3389
|
-
setPath:
|
|
3390
|
-
project:
|
|
3639
|
+
setPath: C,
|
|
3640
|
+
project: p,
|
|
3391
3641
|
setProject: y
|
|
3392
3642
|
}
|
|
3393
3643
|
) }) })
|
|
3394
3644
|
] });
|
|
3395
3645
|
}, {}),
|
|
3396
|
-
/* @__PURE__ */ t(
|
|
3397
|
-
] }) }),
|
|
3646
|
+
/* @__PURE__ */ t(fa, {})
|
|
3647
|
+
] }) }), ya = () => /* @__PURE__ */ t("div", { className: "tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: /* @__PURE__ */ t("div", { className: "tw-flex tw-justify-center tw-items-center tw-h-full", children: /* @__PURE__ */ i("div", { className: "tw-text-2xl tw-font-bold tw-flex tw-flex-col tw-items-center", children: [
|
|
3398
3648
|
/* @__PURE__ */ t("div", { className: "tw-w-10 tw-h-10 tw-bg-primary-regular tw-rounded-full tw-animate-pulse" }),
|
|
3399
3649
|
/* @__PURE__ */ t("p", { className: "tw-text-l tw-text-texts-enfasis", children: "un momento..." }),
|
|
3400
3650
|
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-text-texts-placeholder", children: "estamos buscando tu usuario" })
|
|
3401
|
-
] }) }) }),
|
|
3651
|
+
] }) }) }), va = () => /* @__PURE__ */ t("div", { className: "tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: /* @__PURE__ */ t("div", { className: "tw-flex tw-justify-center tw-items-center tw-h-full", children: /* @__PURE__ */ i("div", { className: "tw-text-2xl tw-font-bold tw-flex tw-flex-col tw-items-center", children: [
|
|
3402
3652
|
/* @__PURE__ */ t("div", { className: "tw-w-10 tw-h-10 tw-bg-primary-regular tw-rounded-full tw-animate-pulse" }),
|
|
3403
3653
|
/* @__PURE__ */ t("p", { className: "tw-text-l tw-text-texts-enfasis", children: "No encontramos tu acceso" }),
|
|
3404
3654
|
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-text-texts-placeholder", children: "por favor, contacta al administrador" })
|
|
3405
|
-
] }) }) }),
|
|
3406
|
-
const
|
|
3407
|
-
if (!e) return /* @__PURE__ */ t(
|
|
3408
|
-
if (!e.accessToken) return /* @__PURE__ */ t(
|
|
3409
|
-
let
|
|
3410
|
-
return /* @__PURE__ */ t(
|
|
3411
|
-
/* @__PURE__ */ t(
|
|
3655
|
+
] }) }) }), $a = ({ path: a, user: e, url: n, mode: r }) => {
|
|
3656
|
+
const l = new ae();
|
|
3657
|
+
if (!e) return /* @__PURE__ */ t(ya, {});
|
|
3658
|
+
if (!e.accessToken) return /* @__PURE__ */ t(va, {});
|
|
3659
|
+
let o = { user: e, url: n, mode: r };
|
|
3660
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(Se, { ...o, children: /* @__PURE__ */ t(Fe, { ...o, children: /* @__PURE__ */ t("div", { className: "tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: /* @__PURE__ */ i(re, { client: l, children: [
|
|
3661
|
+
/* @__PURE__ */ t(ba, { path: a }),
|
|
3412
3662
|
" "
|
|
3413
3663
|
] }) }) }) }) });
|
|
3414
3664
|
};
|
|
3415
3665
|
export {
|
|
3416
|
-
|
|
3666
|
+
$a as AppTasks
|
|
3417
3667
|
};
|