@imj_media/tareas 1.3.0 → 1.3.2
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/LICENSE.md +21 -0
- package/dist/packages/tareas/src/components/organisms/Task.d.ts +1 -1
- package/dist/tareas.cjs +14 -14
- package/dist/tareas.css +1 -1
- package/dist/tareas.es.js +643 -601
- package/package.json +4 -4
package/dist/tareas.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as c, Fragment as
|
|
1
|
+
import { jsxs as c, Fragment as I, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "@imj_media/imj-ui/styles.css";
|
|
3
3
|
import { useQuery as wt, useQueryClient as nt, useMutation as at, useInfiniteQuery as xt, QueryClient as oe, QueryClientProvider as ie } from "@tanstack/react-query";
|
|
4
4
|
import { useState as y, useRef as Z, useEffect as A, createContext as lt, useContext as ot } from "react";
|
|
5
5
|
import { Icons as F, Tooltip as H, TooltipV2 as $t } from "@imj_media/tasks-modules";
|
|
6
|
-
import
|
|
6
|
+
import mt from "react-dom";
|
|
7
7
|
import Et from "axios";
|
|
8
8
|
import Dt from "qs";
|
|
9
|
-
import { parseISO as ce, formatDistanceToNow as we, format as
|
|
9
|
+
import { parseISO as ce, formatDistanceToNow as we, format as Rt } from "date-fns";
|
|
10
10
|
import { es as ht } from "date-fns/locale";
|
|
11
|
-
import { Button as ft, Input as de, Label as ue, Accordion as
|
|
12
|
-
import { useForm as
|
|
11
|
+
import { Button as ft, Input as de, Label as ue, Accordion as me, AccordionItem as pe, AccordionTrigger as ge, AccordionContent as xe, Select as he, SelectTrigger as fe, SelectValue as be, SelectContent as ye, SelectGroup as ve, SelectItem as Ne, DropdownMenu as _e, DropdownMenuTrigger as Ce, DropdownMenuContent as ke } from "@imj_media/imj-ui";
|
|
12
|
+
import { useForm as zt, Controller as Te } from "react-hook-form";
|
|
13
13
|
import { Paginator as Fe } from "primereact/paginator";
|
|
14
14
|
const x = {
|
|
15
15
|
bg: {
|
|
@@ -79,11 +79,11 @@ const x = {
|
|
|
79
79
|
const { position: s, setElementPosition: a } = bt(), n = Z(null), i = ({ children: o }) => {
|
|
80
80
|
const [d, l] = y();
|
|
81
81
|
return A(() => {
|
|
82
|
-
var g,
|
|
82
|
+
var g, m;
|
|
83
83
|
e.current && l(
|
|
84
|
-
((s == null ? void 0 : s.x) ?? 0) - (((
|
|
84
|
+
((s == null ? void 0 : s.x) ?? 0) - (((m = (g = e.current) == null ? void 0 : g.getBoundingClientRect()) == null ? void 0 : m.width) ?? 0)
|
|
85
85
|
);
|
|
86
|
-
}, [e == null ? void 0 : e.current, s == null ? void 0 : s.x]), s &&
|
|
86
|
+
}, [e == null ? void 0 : e.current, s == null ? void 0 : s.x]), s && mt.createPortal(
|
|
87
87
|
/* @__PURE__ */ t(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
@@ -96,7 +96,7 @@ const x = {
|
|
|
96
96
|
document.body
|
|
97
97
|
);
|
|
98
98
|
};
|
|
99
|
-
return /* @__PURE__ */ c(
|
|
99
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
100
100
|
/* @__PURE__ */ c(
|
|
101
101
|
"label",
|
|
102
102
|
{
|
|
@@ -130,28 +130,28 @@ const x = {
|
|
|
130
130
|
} else
|
|
131
131
|
e[s] = a;
|
|
132
132
|
}), e;
|
|
133
|
-
}, Lt = lt({}),
|
|
134
|
-
const [e, s] = y({}), [a, n] = y({}), [i, o] = y([]), [d, l] = y(""), g = ({ name: u, value:
|
|
133
|
+
}, Lt = lt({}), je = ({ children: r }) => {
|
|
134
|
+
const [e, s] = y({}), [a, n] = y({}), [i, o] = y([]), [d, l] = y(""), g = ({ name: u, value: p }) => {
|
|
135
135
|
function v(C) {
|
|
136
136
|
return !isNaN(C) && C !== null && C !== "" ? parseFloat(C) : null;
|
|
137
137
|
}
|
|
138
|
-
let h = v(
|
|
138
|
+
let h = v(p);
|
|
139
139
|
n((C) => {
|
|
140
|
-
let f = { ...C },
|
|
141
|
-
(
|
|
140
|
+
let f = { ...C }, P = i == null ? void 0 : i.find(
|
|
141
|
+
(j) => j.label.toLowerCase().replace(/ /g, "_") === u
|
|
142
142
|
);
|
|
143
|
-
return
|
|
143
|
+
return P ? f[P.id] = h ?? p : f[u] = h ?? p, f;
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
146
|
A(() => {
|
|
147
|
-
let u = i.map((
|
|
148
|
-
n((
|
|
149
|
-
let v = { search:
|
|
147
|
+
let u = i.map((p) => p.id === "owner.config" ? [p.id, "yo_y_mis_equipos"] : p.id === "dependency" ? [p.id, "ambas"] : [p.id, null]);
|
|
148
|
+
n((p) => {
|
|
149
|
+
let v = { search: p == null ? void 0 : p.search, taskName: p == null ? void 0 : p.taskName };
|
|
150
150
|
return v = { ...v, ...Object.fromEntries(u) }, v;
|
|
151
151
|
});
|
|
152
152
|
}, [i]);
|
|
153
|
-
const
|
|
154
|
-
let u = i.map((
|
|
153
|
+
const m = () => {
|
|
154
|
+
let u = i.map((p) => p.id === "owner.config" ? [p.id, "yo_y_mis_equipos"] : p.id === "dependency" ? [p.id, "ambas"] : [p.id, null]);
|
|
155
155
|
n(Object.fromEntries(u)), s(qt(Object.fromEntries(u)));
|
|
156
156
|
}, b = (u) => ({
|
|
157
157
|
1: "Muy facil",
|
|
@@ -174,7 +174,7 @@ const x = {
|
|
|
174
174
|
//methods
|
|
175
175
|
defineFields: o,
|
|
176
176
|
updateFilters: g,
|
|
177
|
-
cleanFilters:
|
|
177
|
+
cleanFilters: m,
|
|
178
178
|
applyFilters: _,
|
|
179
179
|
initialFilters: a,
|
|
180
180
|
selectPath: l
|
|
@@ -183,7 +183,7 @@ const x = {
|
|
|
183
183
|
}
|
|
184
184
|
);
|
|
185
185
|
}, V = () => ot(Lt);
|
|
186
|
-
function
|
|
186
|
+
function Pe(r, e = 300, s = { leading: !1, trailing: !0 }) {
|
|
187
187
|
let a, n = null;
|
|
188
188
|
return function(...i) {
|
|
189
189
|
const o = Date.now(), d = s.leading && !n;
|
|
@@ -213,7 +213,7 @@ const J = ({
|
|
|
213
213
|
className: `${a} tw-rounded-full tw-bg-containers tw-border-2 tw-border-white`
|
|
214
214
|
}
|
|
215
215
|
);
|
|
216
|
-
}, It = ({
|
|
216
|
+
}, Ae = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='uuid-870f9847-3249-4f3d-96c6-7627dd5f9e7b'%20data-name='Iconos'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2050%2050'%3e%3cdefs%3e%3cstyle%3e%20.uuid-4d76d382-032b-400f-b22d-b6e7be4cfaae%20{%20fill:%20none;%20stroke:%20%23252525;%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%204px;%20}%20%3c/style%3e%3c/defs%3e%3ccircle%20class='uuid-4d76d382-032b-400f-b22d-b6e7be4cfaae'%20cx='19.79'%20cy='19.79'%20r='13.54'/%3e%3cline%20class='uuid-4d76d382-032b-400f-b22d-b6e7be4cfaae'%20x1='41.67'%20y1='41.67'%20x2='29.17'%20y2='29.17'/%3e%3c/svg%3e", It = ({
|
|
217
217
|
options: r,
|
|
218
218
|
onselect: e
|
|
219
219
|
}) => {
|
|
@@ -233,7 +233,7 @@ const J = ({
|
|
|
233
233
|
placeholder: "Buscar"
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
|
-
/* @__PURE__ */ t("div", { className: "tw-absolute tw-right-[8px]", children: /* @__PURE__ */ t(
|
|
236
|
+
/* @__PURE__ */ t("div", { className: "tw-absolute tw-right-[8px]", children: /* @__PURE__ */ t("img", { src: Ae, alt: "Icono", className: "tw-w-[12px] tw-h-[12px]" }) })
|
|
237
237
|
] }),
|
|
238
238
|
/* @__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: i.map((o) => /* @__PURE__ */ c(
|
|
239
239
|
"button",
|
|
@@ -249,7 +249,7 @@ const J = ({
|
|
|
249
249
|
}
|
|
250
250
|
)) })
|
|
251
251
|
] });
|
|
252
|
-
},
|
|
252
|
+
}, Se = ({ error: r, options: e, onSelect: s, initialValue: a }) => {
|
|
253
253
|
const [n, i] = y(!1), [o, d] = y((a == null ? void 0 : a.name) ?? null);
|
|
254
254
|
return A(() => {
|
|
255
255
|
a && d(a);
|
|
@@ -268,7 +268,7 @@ const J = ({
|
|
|
268
268
|
}
|
|
269
269
|
) })
|
|
270
270
|
] });
|
|
271
|
-
},
|
|
271
|
+
}, Me = () => {
|
|
272
272
|
const { fields: r, updateFilters: e, cleanFilters: s, applyFilters: a, initialFilters: n } = V();
|
|
273
273
|
return /* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-gap-l tw-min-w-[250px] tw-z-[100]", children: [
|
|
274
274
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-justify-between tw-items-center", children: [
|
|
@@ -287,7 +287,7 @@ const J = ({
|
|
|
287
287
|
return /* @__PURE__ */ c("div", { style: { zIndex: 10 - o }, children: [
|
|
288
288
|
/* @__PURE__ */ t("p", { className: "tw-text-xl z-[1]", children: i.label }),
|
|
289
289
|
(i == null ? void 0 : i.type) === "select" ? /* @__PURE__ */ t("div", { className: "tw-relative tw-z-[10]", children: /* @__PURE__ */ t(
|
|
290
|
-
|
|
290
|
+
Se,
|
|
291
291
|
{
|
|
292
292
|
error: !1,
|
|
293
293
|
options: i == null ? void 0 : i.options,
|
|
@@ -306,12 +306,12 @@ const J = ({
|
|
|
306
306
|
type: i.type,
|
|
307
307
|
value: n == null ? void 0 : n[i == null ? void 0 : i.id],
|
|
308
308
|
name: i.label.toLowerCase().replace(/ /g, "_"),
|
|
309
|
-
onChange:
|
|
309
|
+
onChange: Pe(
|
|
310
310
|
(l) => {
|
|
311
|
-
var g,
|
|
311
|
+
var g, m;
|
|
312
312
|
return e({
|
|
313
313
|
name: (g = l == null ? void 0 : l.target) == null ? void 0 : g.name,
|
|
314
|
-
value: (
|
|
314
|
+
value: (m = l == null ? void 0 : l.target) == null ? void 0 : m.value
|
|
315
315
|
});
|
|
316
316
|
},
|
|
317
317
|
1e3
|
|
@@ -344,20 +344,20 @@ const J = ({
|
|
|
344
344
|
}
|
|
345
345
|
return r;
|
|
346
346
|
};
|
|
347
|
-
class
|
|
347
|
+
class $e {
|
|
348
348
|
static toCampaignTasks(e) {
|
|
349
|
-
var a, n, i, o, d, l, g,
|
|
349
|
+
var a, n, i, o, d, l, g, m, b, _, u, p;
|
|
350
350
|
let s = [];
|
|
351
351
|
return e != null && e.responsable && s.push({
|
|
352
352
|
id: e.responsable.id,
|
|
353
353
|
name: e.responsable.nombre,
|
|
354
354
|
image: (d = (o = (i = (n = (a = e.responsable) == null ? void 0 : a.userOBP) == null ? void 0 : n.imagen) == null ? void 0 : i.formats) == null ? void 0 : o.thumbnail) == null ? void 0 : d.url
|
|
355
355
|
}), (l = e == null ? void 0 : e.equipo) != null && l.miembros && e.equipo.miembros.forEach((v) => {
|
|
356
|
-
var h, C, f,
|
|
357
|
-
s != null && s.find((
|
|
356
|
+
var h, C, f, P;
|
|
357
|
+
s != null && s.find((j) => j.id === v.idUser.id) || v.idUser && s.push({
|
|
358
358
|
id: v.idUser.id,
|
|
359
359
|
name: v.idUser.nombre,
|
|
360
|
-
image: (
|
|
360
|
+
image: (P = (f = (C = (h = v == null ? void 0 : v.userOBP) == null ? void 0 : h.imagen) == null ? void 0 : C.formats) == null ? void 0 : f.thumbnail) == null ? void 0 : P.url
|
|
361
361
|
});
|
|
362
362
|
}), {
|
|
363
363
|
paused: e == null ? void 0 : e.pausada,
|
|
@@ -375,12 +375,12 @@ class Me {
|
|
|
375
375
|
users: s,
|
|
376
376
|
repeatsToDo: (e == null ? void 0 : e.repeticiones) ?? null,
|
|
377
377
|
repeats: (e == null ? void 0 : e.repeticiones_realizadas) ?? null,
|
|
378
|
-
comments: ((
|
|
378
|
+
comments: ((m = e == null ? void 0 : e.comentarios) == null ? void 0 : m.length) ?? null,
|
|
379
379
|
willBePaused: e == null ? void 0 : e.es_pausable,
|
|
380
380
|
statusRequiredTask: ((b = e == null ? void 0 : e.id_t_requerida) == null ? void 0 : b.estatus) ?? null,
|
|
381
381
|
nameRequiredTask: ((_ = e == null ? void 0 : e.id_t_requerida) == null ? void 0 : _.texto_corto) ?? null,
|
|
382
382
|
responsible: ((u = e == null ? void 0 : e.responsable) == null ? void 0 : u.id) ?? null,
|
|
383
|
-
tasks: ((
|
|
383
|
+
tasks: ((p = e == null ? void 0 : e.tareas) == null ? void 0 : p.map((v) => ({
|
|
384
384
|
id: v.id,
|
|
385
385
|
name: v.texto_corto,
|
|
386
386
|
status: v.estatus
|
|
@@ -390,7 +390,7 @@ class Me {
|
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
const
|
|
393
|
+
const Ee = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
394
394
|
try {
|
|
395
395
|
const a = await e.get("/api/listado_tareas_flujo", {
|
|
396
396
|
params: {
|
|
@@ -401,11 +401,11 @@ const $e = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
|
401
401
|
includeAllTasks: !0
|
|
402
402
|
}
|
|
403
403
|
});
|
|
404
|
-
return X(a.data.tareas).map(
|
|
404
|
+
return X(a.data.tareas).map($e.toCampaignTasks);
|
|
405
405
|
} catch (a) {
|
|
406
406
|
console.log(a);
|
|
407
407
|
}
|
|
408
|
-
}, Kt = lt({}),
|
|
408
|
+
}, Kt = lt({}), De = ({ children: r, user: e, url: s, mode: a }) => {
|
|
409
409
|
const n = a === "prod" ? "https://services.imjmedia.com.mx" : "https://devobp.imjmedia.com.mx", i = Et.create({
|
|
410
410
|
baseURL: s,
|
|
411
411
|
headers: {
|
|
@@ -425,7 +425,7 @@ const $e = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
|
425
425
|
children: r
|
|
426
426
|
}
|
|
427
427
|
);
|
|
428
|
-
},
|
|
428
|
+
}, B = () => ot(Kt), Bt = lt({}), Re = ({ children: r, user: e, url: s }) => {
|
|
429
429
|
const a = Et.create({
|
|
430
430
|
baseURL: s,
|
|
431
431
|
headers: {
|
|
@@ -447,9 +447,9 @@ const $e = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
|
447
447
|
);
|
|
448
448
|
}, Y = () => ot(Bt), Ot = lt({}), Ut = ({ children: r, project: e }) => {
|
|
449
449
|
var C;
|
|
450
|
-
const [s, a] = y([]), [n, i] = y(!1), [o, d] = y([]), { tasks_api: l } =
|
|
450
|
+
const [s, a] = y([]), [n, i] = y(!1), [o, d] = y([]), { tasks_api: l } = B(), { filters: g } = V(), { user: m } = Y(), [b, _] = y({
|
|
451
451
|
owner: {
|
|
452
|
-
user:
|
|
452
|
+
user: m.id,
|
|
453
453
|
config: ((C = g == null ? void 0 : g.owner) == null ? void 0 : C.config) ?? "yo_y_mis_equipos"
|
|
454
454
|
},
|
|
455
455
|
project: {
|
|
@@ -459,19 +459,19 @@ const $e = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
|
459
459
|
A(() => {
|
|
460
460
|
var f;
|
|
461
461
|
if (Object.keys(g).length > 0) {
|
|
462
|
-
const
|
|
462
|
+
const P = {
|
|
463
463
|
...g,
|
|
464
464
|
owner: {
|
|
465
|
-
user:
|
|
465
|
+
user: m.id,
|
|
466
466
|
config: ((f = g == null ? void 0 : g.owner) == null ? void 0 : f.config) ?? "yo_y_mis_equipos"
|
|
467
467
|
},
|
|
468
468
|
project: {
|
|
469
469
|
id: e
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
|
-
_(
|
|
472
|
+
_(P);
|
|
473
473
|
}
|
|
474
|
-
}, [g,
|
|
474
|
+
}, [g, m.id, e]);
|
|
475
475
|
const u = wt({
|
|
476
476
|
queryKey: ["tasksProject", b, e],
|
|
477
477
|
queryFn: () => {
|
|
@@ -483,16 +483,16 @@ const $e = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
|
483
483
|
config: b.owner.config || "yo_y_mis_equipos"
|
|
484
484
|
}
|
|
485
485
|
};
|
|
486
|
-
return
|
|
486
|
+
return Ee({
|
|
487
487
|
filters: f,
|
|
488
488
|
project: e,
|
|
489
489
|
tasks_api: l
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
|
-
}),
|
|
493
|
-
a((
|
|
492
|
+
}), p = (f) => {
|
|
493
|
+
a((P) => [...P, f]);
|
|
494
494
|
}, v = (f) => {
|
|
495
|
-
d((
|
|
495
|
+
d((P) => P.includes(f) ? P.filter((j) => j !== f) : [...P, f]);
|
|
496
496
|
}, h = e ?? null;
|
|
497
497
|
return /* @__PURE__ */ t(
|
|
498
498
|
Ot.Provider,
|
|
@@ -502,7 +502,7 @@ const $e = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
|
502
502
|
selectedTasks: s,
|
|
503
503
|
projectID: h,
|
|
504
504
|
openTasks: o,
|
|
505
|
-
selectTask:
|
|
505
|
+
selectTask: p,
|
|
506
506
|
filtersToSend: b,
|
|
507
507
|
openTask: v,
|
|
508
508
|
isRefetching: n,
|
|
@@ -523,7 +523,7 @@ const $e = async ({ filters: r, tasks_api: e, project: s }) => {
|
|
|
523
523
|
/* @__PURE__ */ t("div", { className: "tw-w-full tw-h-[30px] tw-bg-gray-300" }),
|
|
524
524
|
/* @__PURE__ */ t("div", { className: "tw-w-full tw-h-[30px] tw-bg-gray-300" })
|
|
525
525
|
] })
|
|
526
|
-
] }), Qt = lt(null),
|
|
526
|
+
] }), Qt = lt(null), Le = ({ children: r }) => {
|
|
527
527
|
const [e, s] = y({ message: "", type: "success" }), a = (n, i) => {
|
|
528
528
|
s({ message: n, type: i }), setTimeout(() => s({ message: "", type: "success" }), 3e3);
|
|
529
529
|
};
|
|
@@ -548,7 +548,7 @@ class Wt {
|
|
|
548
548
|
};
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
const
|
|
551
|
+
const Ie = async ({
|
|
552
552
|
tasks_api: r
|
|
553
553
|
}) => {
|
|
554
554
|
try {
|
|
@@ -569,17 +569,17 @@ const Le = async ({
|
|
|
569
569
|
throw console.log("Error al obtener los motivos de atraso", e), `Error al obtener los motivos de atraso: ${e}`;
|
|
570
570
|
}
|
|
571
571
|
}, Ht = ({ enabled: r = !1 } = {}) => {
|
|
572
|
-
const { tasks_api: e } =
|
|
572
|
+
const { tasks_api: e } = B(), { user: s } = Y(), a = nt(), { showSuccess: n, showError: i } = yt(), { filters: o, path: d } = V(), { data: l, isLoading: g } = wt({
|
|
573
573
|
queryKey: ["atraso_reasons"],
|
|
574
|
-
queryFn: () =>
|
|
574
|
+
queryFn: () => Ie({
|
|
575
575
|
tasks_api: e
|
|
576
576
|
}),
|
|
577
577
|
staleTime: 1e3 * 60 * 60 * 24,
|
|
578
578
|
// mantiene los datos por 24 horas
|
|
579
579
|
enabled: r
|
|
580
580
|
// Ahora la query se ejecutará solo cuando enabled sea true
|
|
581
|
-
}),
|
|
582
|
-
const
|
|
581
|
+
}), m = async () => {
|
|
582
|
+
const j = await e.get("/api/motivos", {
|
|
583
583
|
params: {
|
|
584
584
|
filters: {
|
|
585
585
|
tipo: {
|
|
@@ -588,10 +588,10 @@ const Le = async ({
|
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
|
-
return X(
|
|
591
|
+
return X(j.data).map(Wt.toAtrasoReasons);
|
|
592
592
|
}, b = async ({
|
|
593
|
-
taskId:
|
|
594
|
-
motivoId:
|
|
593
|
+
taskId: j,
|
|
594
|
+
motivoId: k,
|
|
595
595
|
projectID: M
|
|
596
596
|
}) => {
|
|
597
597
|
try {
|
|
@@ -599,41 +599,41 @@ const Le = async ({
|
|
|
599
599
|
data: {
|
|
600
600
|
inicio: /* @__PURE__ */ new Date(),
|
|
601
601
|
fin: null,
|
|
602
|
-
motivo:
|
|
602
|
+
motivo: k,
|
|
603
603
|
proyecto: M,
|
|
604
|
-
tarea:
|
|
604
|
+
tarea: j,
|
|
605
605
|
creada_por: s == null ? void 0 : s.id
|
|
606
606
|
}
|
|
607
607
|
})).data;
|
|
608
608
|
} catch (q) {
|
|
609
609
|
console.log("error", q);
|
|
610
610
|
}
|
|
611
|
-
}, _ = async (
|
|
611
|
+
}, _ = async (j) => {
|
|
612
612
|
try {
|
|
613
|
-
return (await e.delete(`/api/atrasos/${
|
|
614
|
-
} catch (
|
|
615
|
-
console.log("error",
|
|
613
|
+
return (await e.delete(`/api/atrasos/${j}`)).data;
|
|
614
|
+
} catch (k) {
|
|
615
|
+
console.log("error", k);
|
|
616
616
|
}
|
|
617
|
-
}, u = async (
|
|
617
|
+
}, u = async (j) => {
|
|
618
618
|
try {
|
|
619
|
-
return (await e.put(`/api/atrasos/${
|
|
619
|
+
return (await e.put(`/api/atrasos/${j}`, {
|
|
620
620
|
data: {
|
|
621
621
|
fin: /* @__PURE__ */ new Date()
|
|
622
622
|
}
|
|
623
623
|
})).data;
|
|
624
|
-
} catch (
|
|
625
|
-
console.log("error",
|
|
624
|
+
} catch (k) {
|
|
625
|
+
console.log("error", k);
|
|
626
626
|
}
|
|
627
|
-
},
|
|
628
|
-
taskId:
|
|
629
|
-
projectID:
|
|
627
|
+
}, p = async ({
|
|
628
|
+
taskId: j,
|
|
629
|
+
projectID: k,
|
|
630
630
|
motivo: M
|
|
631
631
|
}) => {
|
|
632
|
-
await C({ taskId:
|
|
633
|
-
}, v = async (
|
|
634
|
-
await f(
|
|
635
|
-
}, h = async (
|
|
636
|
-
await j
|
|
632
|
+
await C({ taskId: j, motivoId: M, projectID: k });
|
|
633
|
+
}, v = async (j) => {
|
|
634
|
+
await f(j);
|
|
635
|
+
}, h = async (j) => {
|
|
636
|
+
await P(j);
|
|
637
637
|
}, { mutateAsync: C } = at({
|
|
638
638
|
mutationFn: b,
|
|
639
639
|
onSuccess: () => {
|
|
@@ -658,7 +658,7 @@ const Le = async ({
|
|
|
658
658
|
onError: () => {
|
|
659
659
|
i("Error al eliminar el atraso");
|
|
660
660
|
}
|
|
661
|
-
}), { mutateAsync:
|
|
661
|
+
}), { mutateAsync: P } = at({
|
|
662
662
|
mutationFn: u,
|
|
663
663
|
onSuccess: () => {
|
|
664
664
|
n("Atraso finalizado correctamente");
|
|
@@ -670,36 +670,36 @@ const Le = async ({
|
|
|
670
670
|
return {
|
|
671
671
|
atrasoReasons: l,
|
|
672
672
|
isLoading: g,
|
|
673
|
-
createAtraso:
|
|
674
|
-
getAtrasoReasons:
|
|
673
|
+
createAtraso: p,
|
|
674
|
+
getAtrasoReasons: m,
|
|
675
675
|
deleteAtraso: v,
|
|
676
676
|
finalizarAtraso: h
|
|
677
677
|
};
|
|
678
678
|
}, dt = () => {
|
|
679
|
-
const { tasks_api: r } =
|
|
679
|
+
const { tasks_api: r } = B(), { user: e } = Y(), { filters: s, path: a } = V(), n = nt(), { projectID: i } = it(), { showSuccess: o, showError: d } = yt(), { finalizarAtraso: l } = Ht({ enabled: !1 }), g = async ({ id: N }) => (await r.put(`/api/tareas/${N}`, {
|
|
680
680
|
data: {
|
|
681
681
|
estatus: 1,
|
|
682
682
|
responsable: e == null ? void 0 : e.id,
|
|
683
683
|
updated_by: e == null ? void 0 : e.id
|
|
684
684
|
}
|
|
685
|
-
})).data,
|
|
685
|
+
})).data, m = async ({ id: N, idAtraso: T }) => {
|
|
686
686
|
const w = await r.post("/api/terminarTarea", {
|
|
687
687
|
id_task: N,
|
|
688
688
|
ended_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
689
689
|
id_user: e == null ? void 0 : e.id
|
|
690
690
|
});
|
|
691
|
-
return await l(
|
|
692
|
-
}, b = async ({ id: N, repeats:
|
|
691
|
+
return await l(T), w.data;
|
|
692
|
+
}, b = async ({ id: N, repeats: T }) => (await r.put(`/api/tareas/${N}`, {
|
|
693
693
|
data: {
|
|
694
|
-
repeticiones_realizadas:
|
|
694
|
+
repeticiones_realizadas: T,
|
|
695
695
|
updated_by: e == null ? void 0 : e.id
|
|
696
696
|
}
|
|
697
|
-
})).data, _ = async ({ id: N, motiveId:
|
|
697
|
+
})).data, _ = async ({ id: N, motiveId: T }) => {
|
|
698
698
|
try {
|
|
699
699
|
const w = await r.post("/api/pausarTarea", {
|
|
700
700
|
taskId: N,
|
|
701
701
|
userId: e == null ? void 0 : e.id,
|
|
702
|
-
motivoId:
|
|
702
|
+
motivoId: T
|
|
703
703
|
});
|
|
704
704
|
return o("Tarea pausada correctamente"), w.data;
|
|
705
705
|
} catch {
|
|
@@ -707,29 +707,29 @@ const Le = async ({
|
|
|
707
707
|
}
|
|
708
708
|
}, u = async ({ id: N }) => {
|
|
709
709
|
try {
|
|
710
|
-
const
|
|
710
|
+
const T = await r.post("/api/reanudarTarea", {
|
|
711
711
|
taskId: N
|
|
712
712
|
});
|
|
713
|
-
return o("Tarea reanudada correctamente"),
|
|
713
|
+
return o("Tarea reanudada correctamente"), T.data;
|
|
714
714
|
} catch {
|
|
715
715
|
d("Error al reanudar la tarea");
|
|
716
716
|
}
|
|
717
|
-
},
|
|
717
|
+
}, p = async ({
|
|
718
718
|
id: N,
|
|
719
|
-
idNewResponsible:
|
|
719
|
+
idNewResponsible: T,
|
|
720
720
|
typeOfSelect: w
|
|
721
721
|
}) => {
|
|
722
722
|
let S = {
|
|
723
723
|
updated_by: e == null ? void 0 : e.id
|
|
724
724
|
};
|
|
725
|
-
return w === "responsible" && (S = { ...S, responsable:
|
|
725
|
+
return w === "responsible" && (S = { ...S, responsable: T }), w === "team" && (S = {
|
|
726
726
|
...S,
|
|
727
727
|
responsable: null,
|
|
728
|
-
equipo:
|
|
728
|
+
equipo: T
|
|
729
729
|
}), (await r.put(`/api/tareas/${N}`, {
|
|
730
730
|
data: S
|
|
731
731
|
})).data;
|
|
732
|
-
}, v = async ({ id: N, data:
|
|
732
|
+
}, v = async ({ id: N, data: T, user: w }) => {
|
|
733
733
|
}, h = async ({ id: N }) => {
|
|
734
734
|
await C({ id: N });
|
|
735
735
|
}, { mutateAsync: C } = at({
|
|
@@ -743,8 +743,8 @@ const Le = async ({
|
|
|
743
743
|
a === "kanban-general" && (n.invalidateQueries({ queryKey: [N[a], s] }), n.invalidateQueries({ queryKey: ["working_tasks", s] })), a === "kanban-campania" && (n.invalidateQueries({ queryKey: ["tasksProject"] }), n.invalidateQueries({
|
|
744
744
|
queryKey: ["tasksProject", s, i]
|
|
745
745
|
}));
|
|
746
|
-
} catch (
|
|
747
|
-
console.error("Error updating the element:",
|
|
746
|
+
} catch (T) {
|
|
747
|
+
console.error("Error updating the element:", T);
|
|
748
748
|
}
|
|
749
749
|
},
|
|
750
750
|
onError: (N) => {
|
|
@@ -754,20 +754,20 @@ const Le = async ({
|
|
|
754
754
|
await n.cancelQueries({ queryKey: ["working_tasks"] }), await n.cancelQueries({ queryKey: ["to_do_tasks"] });
|
|
755
755
|
}
|
|
756
756
|
}), { mutateAsync: f } = at({
|
|
757
|
-
mutationFn:
|
|
757
|
+
mutationFn: m,
|
|
758
758
|
onSuccess: () => {
|
|
759
759
|
const N = {
|
|
760
760
|
"kanban-general": "to_do_tasks",
|
|
761
761
|
"kanban-campania": "tasksProject"
|
|
762
762
|
};
|
|
763
763
|
try {
|
|
764
|
-
n.setQueryData([N[a], s], (
|
|
765
|
-
console.log({ oldData:
|
|
764
|
+
n.setQueryData([N[a], s], (T) => {
|
|
765
|
+
console.log({ oldData: T });
|
|
766
766
|
}), a === "kanban-general" && (n.invalidateQueries({ queryKey: [N[a], s] }), n.invalidateQueries({ queryKey: ["done_tasks", s] }), n.invalidateQueries({ queryKey: ["working_tasks", s] })), a === "kanban-campania" && (n.invalidateQueries({ queryKey: ["tasksProject"] }), n.invalidateQueries({
|
|
767
767
|
queryKey: ["tasksProject", s, i]
|
|
768
768
|
}));
|
|
769
|
-
} catch (
|
|
770
|
-
console.error("Error invalidating queries:",
|
|
769
|
+
} catch (T) {
|
|
770
|
+
console.error("Error invalidating queries:", T);
|
|
771
771
|
}
|
|
772
772
|
},
|
|
773
773
|
onError: (N) => {
|
|
@@ -776,7 +776,7 @@ const Le = async ({
|
|
|
776
776
|
onMutate: async ({ id: N }) => {
|
|
777
777
|
await n.cancelQueries({ queryKey: ["working_tasks"] }), await n.cancelQueries({ queryKey: ["done_tasks"] }), await n.cancelQueries({ queryKey: ["to_do_tasks"] });
|
|
778
778
|
}
|
|
779
|
-
}), { mutateAsync:
|
|
779
|
+
}), { mutateAsync: P } = at({
|
|
780
780
|
mutationFn: b,
|
|
781
781
|
onSuccess: () => {
|
|
782
782
|
const N = {
|
|
@@ -787,8 +787,8 @@ const Le = async ({
|
|
|
787
787
|
a === "kanban-general" && (n.invalidateQueries({ queryKey: [N[a], s] }), n.invalidateQueries({ queryKey: ["done_tasks", s] }), n.invalidateQueries({ queryKey: ["working_tasks", s] })), a === "kanban-campania" && (n.invalidateQueries({ queryKey: ["tasksProject"] }), n.invalidateQueries({
|
|
788
788
|
queryKey: ["tasksProject", s, i]
|
|
789
789
|
}));
|
|
790
|
-
} catch (
|
|
791
|
-
console.error("Error invalidating queries:",
|
|
790
|
+
} catch (T) {
|
|
791
|
+
console.error("Error invalidating queries:", T);
|
|
792
792
|
}
|
|
793
793
|
},
|
|
794
794
|
onError: (N) => {
|
|
@@ -797,8 +797,8 @@ const Le = async ({
|
|
|
797
797
|
onMutate: async ({ id: N }) => {
|
|
798
798
|
await n.cancelQueries({ queryKey: ["working_tasks"] }), await n.cancelQueries({ queryKey: ["done_tasks"] }), await n.cancelQueries({ queryKey: ["to_do_tasks"] });
|
|
799
799
|
}
|
|
800
|
-
}), { mutateAsync:
|
|
801
|
-
mutationFn:
|
|
800
|
+
}), { mutateAsync: j } = at({
|
|
801
|
+
mutationFn: p,
|
|
802
802
|
onSuccess: () => {
|
|
803
803
|
const N = {
|
|
804
804
|
"kanban-general": "to_do_tasks",
|
|
@@ -808,8 +808,8 @@ const Le = async ({
|
|
|
808
808
|
a === "kanban-general" && (n.invalidateQueries({ queryKey: [N[a], s] }), n.invalidateQueries({ queryKey: ["done_tasks", s] }), n.invalidateQueries({ queryKey: ["working_tasks", s] })), a === "kanban-campania" && (n.invalidateQueries({ queryKey: ["tasksProject"] }), n.invalidateQueries({
|
|
809
809
|
queryKey: ["tasksProject", s, i]
|
|
810
810
|
}));
|
|
811
|
-
} catch (
|
|
812
|
-
console.error("Error invalidating queries:",
|
|
811
|
+
} catch (T) {
|
|
812
|
+
console.error("Error invalidating queries:", T);
|
|
813
813
|
}
|
|
814
814
|
},
|
|
815
815
|
onError: (N) => {
|
|
@@ -823,30 +823,30 @@ const Le = async ({
|
|
|
823
823
|
//* Methods
|
|
824
824
|
updateTask: v,
|
|
825
825
|
startWorking: h,
|
|
826
|
-
completeTask: async ({ id: N, idAtraso:
|
|
827
|
-
await f({ id: N, idAtraso:
|
|
826
|
+
completeTask: async ({ id: N, idAtraso: T }) => {
|
|
827
|
+
await f({ id: N, idAtraso: T });
|
|
828
828
|
},
|
|
829
|
-
reasignResponsible: async ({ id: N, idNewResponsible:
|
|
830
|
-
await
|
|
829
|
+
reasignResponsible: async ({ id: N, idNewResponsible: T, typeOfSelect: w }) => {
|
|
830
|
+
await j({ id: N, idNewResponsible: T, typeOfSelect: w });
|
|
831
831
|
},
|
|
832
|
-
updateUnitys: async ({ repeats: N, id:
|
|
833
|
-
await
|
|
832
|
+
updateUnitys: async ({ repeats: N, id: T }) => {
|
|
833
|
+
await P({ repeats: N, id: T });
|
|
834
834
|
},
|
|
835
|
-
pauseTask: async ({ id: N, motiveId:
|
|
836
|
-
console.log({ taksId: N, motivoId:
|
|
835
|
+
pauseTask: async ({ id: N, motiveId: T }) => {
|
|
836
|
+
console.log({ taksId: N, motivoId: T, user: e == null ? void 0 : e.id });
|
|
837
837
|
},
|
|
838
838
|
postPauseTask: _,
|
|
839
839
|
postReanudeTask: u
|
|
840
840
|
};
|
|
841
|
-
},
|
|
841
|
+
}, Ke = ({ id: r, idAtraso: e }) => {
|
|
842
842
|
const [s, a] = y(!1), { completeTask: n } = dt();
|
|
843
843
|
return { checked: s, checkTask: () => {
|
|
844
844
|
a(!s), n({ id: r, idAtraso: e });
|
|
845
845
|
} };
|
|
846
846
|
}, Vt = ({ id: r, nameRequiredTask: e, statusRequiredTask: s, status: a, idAtraso: n }) => {
|
|
847
|
-
const { checked: i, checkTask: o } =
|
|
847
|
+
const { checked: i, checkTask: o } = Ke({ id: r, idAtraso: n });
|
|
848
848
|
let d = Math.random().toString();
|
|
849
|
-
return /* @__PURE__ */ c(
|
|
849
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
850
850
|
a === 2 && /* @__PURE__ */ t(
|
|
851
851
|
"div",
|
|
852
852
|
{
|
|
@@ -869,7 +869,7 @@ const Le = async ({
|
|
|
869
869
|
}
|
|
870
870
|
)
|
|
871
871
|
}
|
|
872
|
-
) : /* @__PURE__ */ t(
|
|
872
|
+
) : /* @__PURE__ */ t(I, { children: " " }) : /* @__PURE__ */ t(
|
|
873
873
|
H,
|
|
874
874
|
{
|
|
875
875
|
dispatch: /* @__PURE__ */ t("label", { className: "tw-cursor-help", children: /* @__PURE__ */ t(
|
|
@@ -880,8 +880,12 @@ const Le = async ({
|
|
|
880
880
|
strokeWidth: 4
|
|
881
881
|
}
|
|
882
882
|
) }),
|
|
883
|
-
children: /* @__PURE__ */ c("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: [
|
|
884
|
-
/* @__PURE__ */
|
|
883
|
+
children: /* @__PURE__ */ c("div", { className: "tw-absolute tw-ml-[-2rem] tw-shadow-xl tw-shadow-black-300 tw-top-full tw-left-0 tw-mt-2 tw-z-10 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: [
|
|
884
|
+
/* @__PURE__ */ c("p", { className: "tw-font-bold tw-w-[210px]", children: [
|
|
885
|
+
" ",
|
|
886
|
+
"Requiere completar su tarea requerida:",
|
|
887
|
+
" "
|
|
888
|
+
] }),
|
|
885
889
|
/* @__PURE__ */ c("p", { children: [
|
|
886
890
|
" ",
|
|
887
891
|
e,
|
|
@@ -901,11 +905,11 @@ const Le = async ({
|
|
|
901
905
|
}
|
|
902
906
|
)
|
|
903
907
|
] });
|
|
904
|
-
},
|
|
908
|
+
}, jt = ({ trigger: r, user: e, showUser: s = !0 }) => /* @__PURE__ */ t(H, { dispatch: r, children: s && /* @__PURE__ */ c("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: [
|
|
905
909
|
/* @__PURE__ */ t(J, { imageUrl: e.image ?? "", alt: e.name }),
|
|
906
910
|
/* @__PURE__ */ t("p", { className: "tw-text-s tw-font-bold tw-text-texts-subtext", children: e.name })
|
|
907
911
|
] }) });
|
|
908
|
-
class
|
|
912
|
+
class Be {
|
|
909
913
|
static toDomain(e) {
|
|
910
914
|
return {
|
|
911
915
|
id: e.id,
|
|
@@ -914,17 +918,17 @@ class Ke {
|
|
|
914
918
|
};
|
|
915
919
|
}
|
|
916
920
|
}
|
|
917
|
-
const
|
|
918
|
-
const { tasks_api: r } =
|
|
921
|
+
const Oe = () => {
|
|
922
|
+
const { tasks_api: r } = B();
|
|
919
923
|
return { teams: wt({
|
|
920
924
|
queryKey: ["teams", "all"],
|
|
921
925
|
queryFn: async () => {
|
|
922
926
|
const s = await r.get("/api/equipos");
|
|
923
|
-
return X(s.data).map(
|
|
927
|
+
return X(s.data).map(Be.toDomain);
|
|
924
928
|
}
|
|
925
929
|
}) };
|
|
926
930
|
};
|
|
927
|
-
class
|
|
931
|
+
class Ue {
|
|
928
932
|
static toUsers(e) {
|
|
929
933
|
var s, a, n;
|
|
930
934
|
return {
|
|
@@ -939,31 +943,31 @@ class Oe {
|
|
|
939
943
|
};
|
|
940
944
|
}
|
|
941
945
|
}
|
|
942
|
-
const
|
|
946
|
+
const Qe = async ({
|
|
943
947
|
tasks_api: r
|
|
944
948
|
}) => {
|
|
945
949
|
try {
|
|
946
950
|
const e = await r.get("/api/allOBPUsers");
|
|
947
|
-
return X(e.data).map(
|
|
951
|
+
return X(e.data).map(Ue.toUsers);
|
|
948
952
|
} catch (e) {
|
|
949
953
|
throw console.log("Error al obtener los usuarios comerciales", e), `Error al obtener los usuarios comerciales: ${e}`;
|
|
950
954
|
}
|
|
951
|
-
},
|
|
952
|
-
const { tasks_api: r } =
|
|
955
|
+
}, We = () => {
|
|
956
|
+
const { tasks_api: r } = B();
|
|
953
957
|
return {
|
|
954
958
|
users: wt({
|
|
955
959
|
queryKey: ["users"],
|
|
956
|
-
queryFn: () =>
|
|
960
|
+
queryFn: () => Qe({ tasks_api: r }),
|
|
957
961
|
staleTime: 1e3 * 60 * 60 * 24
|
|
958
962
|
})
|
|
959
963
|
};
|
|
960
964
|
}, vt = (r) => new Intl.DateTimeFormat("es-MX", { month: "long" }).format(r);
|
|
961
|
-
function
|
|
965
|
+
function He(r) {
|
|
962
966
|
const e = ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], s = new Date(r).getDay();
|
|
963
967
|
return e[s];
|
|
964
968
|
}
|
|
965
|
-
const
|
|
966
|
-
let e = r || /* @__PURE__ */ new Date(), s = e.getDate(), a = vt(e.getMonth()).slice(0, 3), n = e.getFullYear().toString().slice(-2), i =
|
|
969
|
+
const Pt = (r) => {
|
|
970
|
+
let e = r || /* @__PURE__ */ new Date(), s = e.getDate(), a = vt(e.getMonth()).slice(0, 3), n = e.getFullYear().toString().slice(-2), i = He(e).slice(0, 3);
|
|
967
971
|
return `${i.charAt(0).toUpperCase() + i.slice(1)} ${s} ${a.charAt(0).toUpperCase() + a.slice(1)} ${n}`;
|
|
968
972
|
}, Nt = (r, e) => ({
|
|
969
973
|
...r,
|
|
@@ -973,24 +977,24 @@ const jt = (r) => {
|
|
|
973
977
|
onClick: e,
|
|
974
978
|
responsible: s
|
|
975
979
|
}) => {
|
|
976
|
-
const { getOBPUrlApi: a } =
|
|
980
|
+
const { getOBPUrlApi: a } = B();
|
|
977
981
|
let n = `button-assign-users-${Math.random().toString(36).substring(2, 15)}`;
|
|
978
982
|
const { setElementPosition: i, position: o, clearPosition: d } = bt(), l = Z(null), g = () => s ? null : r.length > 3 && /* @__PURE__ */ t(
|
|
979
983
|
H,
|
|
980
984
|
{
|
|
981
985
|
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: `+${r.length - 3}` }) }),
|
|
982
|
-
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: r == null ? void 0 : r.slice(3).map((u,
|
|
983
|
-
/* @__PURE__ */ t(J, { imageUrl: u.image ?? "", alt: u.name },
|
|
986
|
+
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: r == null ? void 0 : r.slice(3).map((u, p) => /* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-gap-2 ", children: [
|
|
987
|
+
/* @__PURE__ */ t(J, { imageUrl: u.image ?? "", alt: u.name }, p),
|
|
984
988
|
/* @__PURE__ */ t("p", { className: "tw-text-s tw-font-bold tw-text-texts-subtext", children: u.name })
|
|
985
|
-
] },
|
|
989
|
+
] }, p)) })
|
|
986
990
|
}
|
|
987
|
-
),
|
|
991
|
+
), m = () => {
|
|
988
992
|
if (s) {
|
|
989
993
|
let u = r.find(
|
|
990
|
-
(
|
|
994
|
+
(p) => p.id === s
|
|
991
995
|
);
|
|
992
996
|
return /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
993
|
-
|
|
997
|
+
jt,
|
|
994
998
|
{
|
|
995
999
|
trigger: /* @__PURE__ */ t(
|
|
996
1000
|
J,
|
|
@@ -1005,10 +1009,10 @@ const jt = (r) => {
|
|
|
1005
1009
|
}
|
|
1006
1010
|
) });
|
|
1007
1011
|
}
|
|
1008
|
-
return (r == null ? void 0 : r.length) > 0 && r.slice(0, 3).map((u,
|
|
1009
|
-
|
|
1012
|
+
return (r == null ? void 0 : r.length) > 0 && r.slice(0, 3).map((u, p) => /* @__PURE__ */ t("div", { className: `${p === 0 ? "" : "tw-ml-[-8px]"}`, children: /* @__PURE__ */ t(
|
|
1013
|
+
jt,
|
|
1010
1014
|
{
|
|
1011
|
-
trigger: /* @__PURE__ */ t(J, { imageUrl: u.image, alt: u.name },
|
|
1015
|
+
trigger: /* @__PURE__ */ t(J, { imageUrl: u.image, alt: u.name }, p),
|
|
1012
1016
|
user: u,
|
|
1013
1017
|
showUser: !(o != null && o.x)
|
|
1014
1018
|
}
|
|
@@ -1025,58 +1029,65 @@ const jt = (r) => {
|
|
|
1025
1029
|
if (r.length === 0)
|
|
1026
1030
|
return /* @__PURE__ */ t(b, { children: /* @__PURE__ */ t(F, { icon: "user", size: "xs", strokeWidth: 3 }) });
|
|
1027
1031
|
const _ = () => {
|
|
1028
|
-
var
|
|
1029
|
-
const [u,
|
|
1032
|
+
var j;
|
|
1033
|
+
const [u, p] = y(), [v, h] = y("team"), { teams: C } = Oe(), { users: f } = We();
|
|
1030
1034
|
A(() => {
|
|
1031
|
-
var
|
|
1032
|
-
l.current &&
|
|
1035
|
+
var k, M;
|
|
1036
|
+
l.current && p(((o == null ? void 0 : o.x) ?? 0) - (((M = (k = l.current) == null ? void 0 : k.getBoundingClientRect()) == null ? void 0 : M.width) ?? 0));
|
|
1033
1037
|
}, [l == null ? void 0 : l.current, o == null ? void 0 : o.x]);
|
|
1034
|
-
const
|
|
1035
|
-
const
|
|
1038
|
+
const P = () => {
|
|
1039
|
+
const k = [
|
|
1036
1040
|
{ id: "team", label: "Equipo" },
|
|
1037
1041
|
{ id: "responsible", label: "Responsable" }
|
|
1038
1042
|
];
|
|
1039
|
-
return /* @__PURE__ */ t("div", { className: "tw-w-full tw-flex tw-justify-center tw-gap-l tw-text-texts-placeholder tw-font-bold", children:
|
|
1043
|
+
return /* @__PURE__ */ t("div", { className: "tw-w-full tw-flex tw-justify-center tw-gap-l tw-text-texts-placeholder tw-font-bold", children: k.map((M, q) => /* @__PURE__ */ t(
|
|
1040
1044
|
"button",
|
|
1041
1045
|
{
|
|
1042
|
-
className: `tw-w-full tw-text-sm tw-border-texts-placeholder tw-text-center ${v === M.id ? "tw-text-primary-pastel" : ""} ${q ===
|
|
1046
|
+
className: `tw-w-full tw-text-sm tw-border-texts-placeholder tw-text-center ${v === M.id ? "tw-text-primary-pastel" : ""} ${q === k.length - 1 ? "tw-border-r-0" : " tw-border-r-2"}`,
|
|
1043
1047
|
onClick: () => h(M.id),
|
|
1044
1048
|
children: M.label
|
|
1045
1049
|
}
|
|
1046
1050
|
)) });
|
|
1047
1051
|
};
|
|
1048
|
-
return (o == null ? void 0 : o.x) &&
|
|
1052
|
+
return (o == null ? void 0 : o.x) && mt.createPortal(
|
|
1049
1053
|
/* @__PURE__ */ t(
|
|
1050
1054
|
"div",
|
|
1051
1055
|
{
|
|
1052
1056
|
"data-portal-host": !0,
|
|
1053
|
-
className: `absolute tw-w-[300px] tw-h-fit ${u ? "tw-block" : "tw-hidden"}`,
|
|
1057
|
+
className: `absolute tw-w-[300px] tw-h-fit tw-p-[1rem] ${u ? "tw-block" : "tw-hidden"}`,
|
|
1054
1058
|
style: { top: `${o == null ? void 0 : o.y}px`, left: `${u}px`, zIndex: 1 },
|
|
1055
|
-
children: /* @__PURE__ */ c(
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
{
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1059
|
+
children: /* @__PURE__ */ c(
|
|
1060
|
+
"div",
|
|
1061
|
+
{
|
|
1062
|
+
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",
|
|
1063
|
+
style: { boxShadow: "0px 2px 16px 0px rgba(0, 0, 0, 0.25)" },
|
|
1064
|
+
children: [
|
|
1065
|
+
/* @__PURE__ */ t(P, {}),
|
|
1066
|
+
/* @__PURE__ */ t(
|
|
1067
|
+
It,
|
|
1068
|
+
{
|
|
1069
|
+
options: v === "team" ? C.data.map((k) => ({
|
|
1070
|
+
id: k.id,
|
|
1071
|
+
name: k.name,
|
|
1072
|
+
image: ""
|
|
1073
|
+
})) : (j = f.data) == null ? void 0 : j.map((k) => Nt(k, a())),
|
|
1074
|
+
onselect: (k) => {
|
|
1075
|
+
var M;
|
|
1076
|
+
d(), e && e((M = k.tasksUser) == null ? void 0 : M.id, v);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
)
|
|
1080
|
+
]
|
|
1081
|
+
}
|
|
1082
|
+
)
|
|
1072
1083
|
}
|
|
1073
1084
|
),
|
|
1074
1085
|
document.body
|
|
1075
1086
|
);
|
|
1076
1087
|
};
|
|
1077
|
-
return /* @__PURE__ */ c(
|
|
1088
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
1078
1089
|
/* @__PURE__ */ c(b, { children: [
|
|
1079
|
-
|
|
1090
|
+
m(),
|
|
1080
1091
|
g()
|
|
1081
1092
|
] }),
|
|
1082
1093
|
/* @__PURE__ */ t(
|
|
@@ -1090,10 +1101,10 @@ const jt = (r) => {
|
|
|
1090
1101
|
/* @__PURE__ */ t(_, {})
|
|
1091
1102
|
] });
|
|
1092
1103
|
};
|
|
1093
|
-
function
|
|
1104
|
+
function Ve({ items: r }) {
|
|
1094
1105
|
var a;
|
|
1095
1106
|
const [e, s] = y(1);
|
|
1096
|
-
return /* @__PURE__ */ c(
|
|
1107
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
1097
1108
|
/* @__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: r.map((n, i) => /* @__PURE__ */ t(
|
|
1098
1109
|
"div",
|
|
1099
1110
|
{
|
|
@@ -1103,7 +1114,7 @@ function He({ items: r }) {
|
|
|
1103
1114
|
{
|
|
1104
1115
|
variant: "ghost",
|
|
1105
1116
|
onClick: () => s(n.id),
|
|
1106
|
-
className: `tw-
|
|
1117
|
+
className: `tw-font-montserrat tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-rounded-none tw-py-1 tw-h-12 ${e === n.id ? "tw-text-blue-600 tw-border-b tw-border-primary tw-font-montserrat tw-font-semibold tw-text-[1.4rem]" : "tw-text-black-400 tw-font-montserrat tw-font-[400] tw-text-[1.4rem] tw-border-b-0 "}`,
|
|
1107
1118
|
children: n.label
|
|
1108
1119
|
},
|
|
1109
1120
|
n.id
|
|
@@ -1114,12 +1125,12 @@ function He({ items: r }) {
|
|
|
1114
1125
|
/* @__PURE__ */ t("div", { className: "tw-pt-4 tw-flex-1 tw-overflow-y-auto tw-bg-white", children: (a = r.find((n) => n.id === e)) == null ? void 0 : a.component })
|
|
1115
1126
|
] });
|
|
1116
1127
|
}
|
|
1117
|
-
function
|
|
1128
|
+
function Ye({ comment: r }) {
|
|
1118
1129
|
var n, i, o, d, l;
|
|
1119
|
-
const { getImageOBP: e } =
|
|
1130
|
+
const { getImageOBP: e } = B(), s = (d = (o = (i = (n = r == null ? void 0 : r.autor) == null ? void 0 : n.imagen) == null ? void 0 : i.formats) == null ? void 0 : o.thumbnail) == null ? void 0 : d.url;
|
|
1120
1131
|
function a(g) {
|
|
1121
|
-
const
|
|
1122
|
-
return we(
|
|
1132
|
+
const m = ce(g);
|
|
1133
|
+
return we(m, { locale: ht, addSuffix: !0 });
|
|
1123
1134
|
}
|
|
1124
1135
|
return /* @__PURE__ */ t("div", { children: /* @__PURE__ */ c("div", { className: "tw-flex tw-flex-row tw-gap-3 tw-items-start", children: [
|
|
1125
1136
|
/* @__PURE__ */ t(J, { size: "xxl", imageUrl: s ? e(s) : "", alt: "@shadcn" }),
|
|
@@ -1132,15 +1143,15 @@ function Ve({ comment: r }) {
|
|
|
1132
1143
|
] })
|
|
1133
1144
|
] }) });
|
|
1134
1145
|
}
|
|
1135
|
-
function
|
|
1136
|
-
var u,
|
|
1137
|
-
const { tasks_api: n, getImageOBP: i } =
|
|
1146
|
+
function Ge({ currentUser: r, data: e, taskId: s, onNewComment: a }) {
|
|
1147
|
+
var u, p, v;
|
|
1148
|
+
const { tasks_api: n, getImageOBP: i } = B(), { register: o, handleSubmit: d, reset: l } = zt(), [g, m] = y([]), b = (v = (p = (u = r == null ? void 0 : r.imagen) == null ? void 0 : u.formats) == null ? void 0 : p.thumbnail) == null ? void 0 : v.url;
|
|
1138
1149
|
return A(() => {
|
|
1139
1150
|
if (e != null && e.comentarios) {
|
|
1140
1151
|
const h = [...e.comentarios].sort(
|
|
1141
1152
|
(C, f) => new Date(f.createdAt).getTime() - new Date(C.createdAt).getTime()
|
|
1142
1153
|
);
|
|
1143
|
-
|
|
1154
|
+
m(h);
|
|
1144
1155
|
}
|
|
1145
1156
|
}, [e]), /* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-h-full tw-gap-4", children: [
|
|
1146
1157
|
/* @__PURE__ */ c(
|
|
@@ -1164,7 +1175,7 @@ function Ye({ currentUser: r, data: e, taskId: s, onNewComment: a }) {
|
|
|
1164
1175
|
comentario: h.comment,
|
|
1165
1176
|
tarea: s
|
|
1166
1177
|
}
|
|
1167
|
-
}), a(!0),
|
|
1178
|
+
}), a(!0), m((f) => [C, ...f]), l();
|
|
1168
1179
|
} catch (C) {
|
|
1169
1180
|
console.error("Error al agregar comentario:", C);
|
|
1170
1181
|
}
|
|
@@ -1184,10 +1195,10 @@ function Ye({ currentUser: r, data: e, taskId: s, onNewComment: a }) {
|
|
|
1184
1195
|
]
|
|
1185
1196
|
}
|
|
1186
1197
|
),
|
|
1187
|
-
g && g.map((h, C) => /* @__PURE__ */ t(
|
|
1198
|
+
g && g.map((h, C) => /* @__PURE__ */ t(Ye, { comment: h }, C))
|
|
1188
1199
|
] });
|
|
1189
1200
|
}
|
|
1190
|
-
function
|
|
1201
|
+
function Je({ data: r }) {
|
|
1191
1202
|
const e = {
|
|
1192
1203
|
0: {
|
|
1193
1204
|
color: "tw-bg-gray-400",
|
|
@@ -1205,7 +1216,7 @@ function Ge({ data: r }) {
|
|
|
1205
1216
|
color: "tw-bg-success-regular",
|
|
1206
1217
|
label: "Finalizada"
|
|
1207
1218
|
}
|
|
1208
|
-
}, s = (a) => a ?
|
|
1219
|
+
}, s = (a) => a ? Rt(new Date(a), "d MMM", { locale: ht }) : "";
|
|
1209
1220
|
return /* @__PURE__ */ c("div", { children: [
|
|
1210
1221
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-row tw-items-center tw-gap-4", children: [
|
|
1211
1222
|
/* @__PURE__ */ t(ue, { className: "tw-text-2xl tw-font-medium tw-text-neutral-900", children: "Tareas dependientes" }),
|
|
@@ -1239,21 +1250,21 @@ function Ge({ data: r }) {
|
|
|
1239
1250
|
] });
|
|
1240
1251
|
}
|
|
1241
1252
|
function Gt({ isOpen: r, setIsOpen: e, taskId: s }) {
|
|
1242
|
-
var f,
|
|
1243
|
-
const [a, n] = y(null), [i, o] = y(!1), [d, l] = y(!1), [g,
|
|
1253
|
+
var f, P, j, k, M, q, K, N, T, w, S, E;
|
|
1254
|
+
const [a, n] = y(null), [i, o] = y(!1), [d, l] = y(!1), [g, m] = y(null), b = (k = (j = (P = (f = a == null ? void 0 : a.responsable) == null ? void 0 : f.imagen) == null ? void 0 : P.formats) == null ? void 0 : j.thumbnail) == null ? void 0 : k.url, { tasks_api: _, getImageOBP: u } = B(), { user: p } = Y();
|
|
1244
1255
|
A(() => {
|
|
1245
1256
|
if (r && s || i) {
|
|
1246
|
-
const
|
|
1247
|
-
const
|
|
1248
|
-
n(
|
|
1257
|
+
const z = async () => {
|
|
1258
|
+
const L = await _.get(`/api/detalleTarea/${s}`);
|
|
1259
|
+
n(L == null ? void 0 : L.data);
|
|
1249
1260
|
}, Q = async () => {
|
|
1250
|
-
var
|
|
1251
|
-
const
|
|
1252
|
-
emailList: [(
|
|
1261
|
+
var U, R;
|
|
1262
|
+
const L = await _.get(`/api/users/${p.id}`), D = await _.post("/api/obtenerUsuarioOBP/", {
|
|
1263
|
+
emailList: [(U = L == null ? void 0 : L.data) == null ? void 0 : U.email]
|
|
1253
1264
|
});
|
|
1254
|
-
|
|
1265
|
+
m((R = D == null ? void 0 : D.data) == null ? void 0 : R.data[0]);
|
|
1255
1266
|
};
|
|
1256
|
-
|
|
1267
|
+
z(), Q();
|
|
1257
1268
|
}
|
|
1258
1269
|
}, [r, s, i]);
|
|
1259
1270
|
const v = {
|
|
@@ -1277,14 +1288,14 @@ function Gt({ isOpen: r, setIsOpen: e, taskId: s }) {
|
|
|
1277
1288
|
color: "tw-text-danger-regular",
|
|
1278
1289
|
iconColor: "#C34335"
|
|
1279
1290
|
}
|
|
1280
|
-
}, h = (
|
|
1291
|
+
}, h = (z) => z ? Rt(z, "d MMM yyyy, h:mmaaa", {
|
|
1281
1292
|
locale: ht
|
|
1282
1293
|
}) : "Fecha no disponible", C = [
|
|
1283
1294
|
{
|
|
1284
1295
|
id: 1,
|
|
1285
1296
|
label: "Todo",
|
|
1286
1297
|
component: /* @__PURE__ */ t(
|
|
1287
|
-
|
|
1298
|
+
Ge,
|
|
1288
1299
|
{
|
|
1289
1300
|
taskId: s,
|
|
1290
1301
|
currentUser: g,
|
|
@@ -1296,11 +1307,11 @@ function Gt({ isOpen: r, setIsOpen: e, taskId: s }) {
|
|
|
1296
1307
|
{
|
|
1297
1308
|
id: 2,
|
|
1298
1309
|
label: "Dependencias",
|
|
1299
|
-
component: /* @__PURE__ */ t(
|
|
1310
|
+
component: /* @__PURE__ */ t(Je, { data: a == null ? void 0 : a.ids_t_dependientes })
|
|
1300
1311
|
}
|
|
1301
1312
|
];
|
|
1302
|
-
return r &&
|
|
1303
|
-
/* @__PURE__ */ c(
|
|
1313
|
+
return r && mt.createPortal(
|
|
1314
|
+
/* @__PURE__ */ c(I, { children: [
|
|
1304
1315
|
/* @__PURE__ */ t(
|
|
1305
1316
|
"div",
|
|
1306
1317
|
{
|
|
@@ -1315,7 +1326,7 @@ function Gt({ isOpen: r, setIsOpen: e, taskId: s }) {
|
|
|
1315
1326
|
children: /* @__PURE__ */ c("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: [
|
|
1316
1327
|
/* @__PURE__ */ c("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: [
|
|
1317
1328
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-row tw-items-start tw-gap-2 tw-relative", children: [
|
|
1318
|
-
((M = a == null ? void 0 : a.id_t_requerida) == null ? void 0 : M.id) && /* @__PURE__ */ c(
|
|
1329
|
+
((M = a == null ? void 0 : a.id_t_requerida) == null ? void 0 : M.id) && /* @__PURE__ */ c(I, { children: [
|
|
1319
1330
|
/* @__PURE__ */ t(
|
|
1320
1331
|
"div",
|
|
1321
1332
|
{
|
|
@@ -1348,7 +1359,21 @@ function Gt({ isOpen: r, setIsOpen: e, taskId: s }) {
|
|
|
1348
1359
|
] }),
|
|
1349
1360
|
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-items-center tw-gap-2", children: /* @__PURE__ */ c("h3", { className: "tw-text-3xl tw-font-semibold tw-text-neutral-900", children: [
|
|
1350
1361
|
a == null ? void 0 : a.texto_corto,
|
|
1351
|
-
(a == null ? void 0 : a.atraso) && /* @__PURE__ */ t(
|
|
1362
|
+
(a == null ? void 0 : a.atraso) && /* @__PURE__ */ t(
|
|
1363
|
+
$t,
|
|
1364
|
+
{
|
|
1365
|
+
content: (K = a == null ? void 0 : a.atraso) == null ? void 0 : K.motivo,
|
|
1366
|
+
position: "bottom",
|
|
1367
|
+
children: /* @__PURE__ */ t("button", { className: "tw-inline-block tw-align-middle tw-ml-2 tw-h-fit", children: /* @__PURE__ */ t(
|
|
1368
|
+
F,
|
|
1369
|
+
{
|
|
1370
|
+
icon: "exclamation_triangle",
|
|
1371
|
+
color: x.warning.dark,
|
|
1372
|
+
style: { width: "20px", height: "20px" }
|
|
1373
|
+
}
|
|
1374
|
+
) })
|
|
1375
|
+
}
|
|
1376
|
+
)
|
|
1352
1377
|
] }) })
|
|
1353
1378
|
] }),
|
|
1354
1379
|
/* @__PURE__ */ t(
|
|
@@ -1369,86 +1394,86 @@ function Gt({ isOpen: r, setIsOpen: e, taskId: s }) {
|
|
|
1369
1394
|
] }) }),
|
|
1370
1395
|
/* @__PURE__ */ c("div", { className: "tw-w-full tw-flex tw-flex-col tw-gap-3 tw-mt-8", children: [
|
|
1371
1396
|
/* @__PURE__ */ t("h6", { className: "tw-text-neutral-900 tw-font-semibold tw-text-2xl", children: "Descripción" }),
|
|
1372
|
-
/* @__PURE__ */ t("p", { className: "tw-text-
|
|
1397
|
+
/* @__PURE__ */ t("p", { className: "tw-font-sans tw-font-[400] tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: (a == null ? void 0 : a.texto_largo) ?? "Sin descripción" })
|
|
1373
1398
|
] }),
|
|
1374
1399
|
/* @__PURE__ */ t(
|
|
1375
|
-
|
|
1400
|
+
me,
|
|
1376
1401
|
{
|
|
1377
1402
|
type: "single",
|
|
1378
1403
|
collapsible: !0,
|
|
1379
1404
|
defaultValue: "item-1",
|
|
1380
1405
|
className: "tw-w-full tw-flex tw-flex-col tw-border tw-border-neutral-200 tw-rounded-xl tw-mt-6",
|
|
1381
|
-
children: /* @__PURE__ */ c(
|
|
1406
|
+
children: /* @__PURE__ */ c(pe, { value: "item-1", className: "tw-border-none", children: [
|
|
1382
1407
|
/* @__PURE__ */ t(ge, { 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" }),
|
|
1383
1408
|
/* @__PURE__ */ t(xe, { className: "tw-border-none", children: /* @__PURE__ */ c("div", { className: "tw-w-full tw-grid tw-grid-cols-3 tw-gap-4 tw-p-4", children: [
|
|
1384
1409
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1385
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1410
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Responsable" }),
|
|
1386
1411
|
(N = a == null ? void 0 : a.responsable) != null && N.nombre ? /* @__PURE__ */ c("div", { className: "tw-flex tw-flex-row tw-gap-2 tw-items-center", children: [
|
|
1387
1412
|
/* @__PURE__ */ t(
|
|
1388
1413
|
J,
|
|
1389
1414
|
{
|
|
1390
|
-
size: "
|
|
1415
|
+
size: "xs",
|
|
1391
1416
|
imageUrl: b ? u(b) : "",
|
|
1392
1417
|
alt: "@shadcn"
|
|
1393
1418
|
}
|
|
1394
1419
|
),
|
|
1395
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1396
|
-
] }) : /* @__PURE__ */ t("span", { className: "tw-
|
|
1420
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: (T = a == null ? void 0 : a.responsable) == null ? void 0 : T.nombre })
|
|
1421
|
+
] }) : /* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: "Sin responsable" })
|
|
1397
1422
|
] }),
|
|
1398
1423
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1399
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1400
|
-
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-gap-2", children: /* @__PURE__ */ t("span", { className: "tw-
|
|
1424
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Equipo asignado" }),
|
|
1425
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-gap-2", children: /* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: ((w = a == null ? void 0 : a.equipo) == null ? void 0 : w.nombre) ?? "Sin equipo" }) })
|
|
1401
1426
|
] }),
|
|
1402
1427
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1403
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1404
|
-
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-row tw-items-center tw-gap-2", children: [
|
|
1428
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Prioridad" }),
|
|
1429
|
+
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-row tw-items-center tw-gap-2 ", children: [
|
|
1405
1430
|
/* @__PURE__ */ t(
|
|
1406
1431
|
F,
|
|
1407
1432
|
{
|
|
1408
1433
|
icon: "flag",
|
|
1409
1434
|
size: "xs",
|
|
1410
1435
|
strokeWidth: 5,
|
|
1411
|
-
|
|
1436
|
+
style: { height: "14px", color: "#929292" }
|
|
1412
1437
|
}
|
|
1413
1438
|
),
|
|
1414
1439
|
/* @__PURE__ */ t(
|
|
1415
1440
|
"span",
|
|
1416
1441
|
{
|
|
1417
|
-
className: `tw-
|
|
1418
|
-
children: ((
|
|
1442
|
+
className: `tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292] ${(S = v[a == null ? void 0 : a.prioridad]) == null ? void 0 : S.color}`,
|
|
1443
|
+
children: ((E = v[a == null ? void 0 : a.prioridad]) == null ? void 0 : E.label) ?? "Sin prioridad"
|
|
1419
1444
|
}
|
|
1420
1445
|
)
|
|
1421
1446
|
] })
|
|
1422
1447
|
] }),
|
|
1423
1448
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1424
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1425
|
-
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-gap-2", children: /* @__PURE__ */ t("span", { className: "tw-
|
|
1449
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Lista" }),
|
|
1450
|
+
/* @__PURE__ */ t("div", { className: "tw-flex tw-flex-row tw-gap-2", children: /* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: (a == null ? void 0 : a.lista) ?? "Sin lista" }) })
|
|
1426
1451
|
] }),
|
|
1427
1452
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1428
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1429
|
-
/* @__PURE__ */ t("p", { className: "tw-
|
|
1453
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Fecha estimada de inicio" }),
|
|
1454
|
+
/* @__PURE__ */ t("p", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: h(a == null ? void 0 : a.f_inicio_estimada) })
|
|
1430
1455
|
] }),
|
|
1431
1456
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1432
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1433
|
-
/* @__PURE__ */ t("p", { className: "tw-
|
|
1457
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Fecha estimada de fin" }),
|
|
1458
|
+
/* @__PURE__ */ t("p", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: h(a == null ? void 0 : a.f_fin_estimada) })
|
|
1434
1459
|
] }),
|
|
1435
1460
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1436
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1437
|
-
/* @__PURE__ */ t("p", { className: "tw-
|
|
1461
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Fecha de fin" }),
|
|
1462
|
+
/* @__PURE__ */ t("p", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: h(a == null ? void 0 : a.ffin) })
|
|
1438
1463
|
] }),
|
|
1439
1464
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1440
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1441
|
-
/* @__PURE__ */ t("p", { className: "tw-
|
|
1465
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Creado" }),
|
|
1466
|
+
/* @__PURE__ */ t("p", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: h(a == null ? void 0 : a.createdAt) })
|
|
1442
1467
|
] }),
|
|
1443
1468
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-w-auto tw-gap-2", children: [
|
|
1444
|
-
/* @__PURE__ */ t("span", { className: "tw-
|
|
1445
|
-
/* @__PURE__ */ t("p", { className: "tw-
|
|
1469
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-bg-black", children: "Última modificación" }),
|
|
1470
|
+
/* @__PURE__ */ t("p", { className: "tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-text-[#929292]", children: h(a == null ? void 0 : a.updatedAt) })
|
|
1446
1471
|
] })
|
|
1447
1472
|
] }) })
|
|
1448
1473
|
] })
|
|
1449
1474
|
}
|
|
1450
1475
|
),
|
|
1451
|
-
/* @__PURE__ */ t(
|
|
1476
|
+
/* @__PURE__ */ t(Ve, { items: C })
|
|
1452
1477
|
] })
|
|
1453
1478
|
}
|
|
1454
1479
|
)
|
|
@@ -1456,7 +1481,7 @@ function Gt({ isOpen: r, setIsOpen: e, taskId: s }) {
|
|
|
1456
1481
|
document.body
|
|
1457
1482
|
);
|
|
1458
1483
|
}
|
|
1459
|
-
const
|
|
1484
|
+
const Xe = ({
|
|
1460
1485
|
children: r,
|
|
1461
1486
|
actionsRef: e,
|
|
1462
1487
|
newPosition: s,
|
|
@@ -1466,15 +1491,15 @@ const Je = ({
|
|
|
1466
1491
|
return A(() => {
|
|
1467
1492
|
var l, g;
|
|
1468
1493
|
if (e.current && s) {
|
|
1469
|
-
const
|
|
1470
|
-
i(
|
|
1494
|
+
const m = ((s == null ? void 0 : s.x) ?? 0) - (((g = (l = e.current) == null ? void 0 : l.getBoundingClientRect()) == null ? void 0 : g.width) ?? 0);
|
|
1495
|
+
i(m), requestAnimationFrame(() => {
|
|
1471
1496
|
d(!0);
|
|
1472
1497
|
});
|
|
1473
1498
|
}
|
|
1474
1499
|
return () => {
|
|
1475
1500
|
d(!1), i(void 0);
|
|
1476
1501
|
};
|
|
1477
|
-
}, [e == null ? void 0 : e.current, s == null ? void 0 : s.x]), !s || n === void 0 ? null :
|
|
1502
|
+
}, [e == null ? void 0 : e.current, s == null ? void 0 : s.x]), !s || n === void 0 ? null : mt.createPortal(
|
|
1478
1503
|
/* @__PURE__ */ t(
|
|
1479
1504
|
"div",
|
|
1480
1505
|
{
|
|
@@ -1507,49 +1532,49 @@ const Je = ({
|
|
|
1507
1532
|
atrasoId: o,
|
|
1508
1533
|
categoria: d
|
|
1509
1534
|
}) => {
|
|
1510
|
-
const { setElementPosition: l, position: g } = bt(),
|
|
1535
|
+
const { setElementPosition: l, position: g } = bt(), m = Z(null), { startWorking: b, completeTask: _ } = dt(), u = Z(!1), [p, v] = y(!1), [h, C] = y(null), [f, P] = y("first"), j = e !== "" && s === 2, [k, M] = y(null), {
|
|
1511
1536
|
atrasoReasons: q,
|
|
1512
|
-
isLoading:
|
|
1537
|
+
isLoading: K,
|
|
1513
1538
|
createAtraso: N,
|
|
1514
|
-
deleteAtraso:
|
|
1539
|
+
deleteAtraso: T
|
|
1515
1540
|
} = Ht({ enabled: !0 }), [w, S] = y(null);
|
|
1516
1541
|
A(() => {
|
|
1517
|
-
n &&
|
|
1542
|
+
n && P("third");
|
|
1518
1543
|
}, []);
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1521
|
-
},
|
|
1522
|
-
const
|
|
1544
|
+
const E = (R) => {
|
|
1545
|
+
P(R);
|
|
1546
|
+
}, z = () => {
|
|
1547
|
+
const R = [
|
|
1523
1548
|
{
|
|
1524
1549
|
name: "Mover a lista",
|
|
1525
1550
|
icon: "arrow_right",
|
|
1526
|
-
onClick: () =>
|
|
1551
|
+
onClick: () => E("second"),
|
|
1527
1552
|
disabled: !1
|
|
1528
1553
|
}
|
|
1529
1554
|
];
|
|
1530
|
-
return o ?
|
|
1555
|
+
return o ? R.push({
|
|
1531
1556
|
name: "Eliminar atraso",
|
|
1532
1557
|
icon: null,
|
|
1533
|
-
onClick: () =>
|
|
1558
|
+
onClick: () => E("third"),
|
|
1534
1559
|
disabled: !1
|
|
1535
|
-
}) :
|
|
1560
|
+
}) : R.push({
|
|
1536
1561
|
name: "Agregar atraso",
|
|
1537
1562
|
icon: null,
|
|
1538
|
-
onClick: () =>
|
|
1563
|
+
onClick: () => E("third"),
|
|
1539
1564
|
disabled: !1
|
|
1540
|
-
}), u != null && u.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__ */ t("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:
|
|
1565
|
+
}), u != null && u.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__ */ t("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: R.map(({ name: O, icon: $, onClick: W, disabled: tt }, et) => /* @__PURE__ */ c(
|
|
1541
1566
|
"button",
|
|
1542
1567
|
{
|
|
1543
1568
|
onClick: W,
|
|
1544
1569
|
className: `
|
|
1545
1570
|
tw-flex tw-items-center tw-justify-between tw-transition-colors tw-duration-200 tw-pl-3 tw-pr-10 tw-rounded-md
|
|
1546
1571
|
tw-text-[14px] tw-text-texts-placeholder tw-font-regular tw-text-left tw-border tw-gap-2
|
|
1547
|
-
hover:tw-bg-[#e1ebf9] hover:tw-text-primary-dark
|
|
1548
|
-
${h ===
|
|
1572
|
+
hover:tw-bg-[#e1ebf9] hover:tw-text-primary-dark tw-font-normal tw-font-sans
|
|
1573
|
+
${h === O ? "tw-bg-content tw-text-primary-dark tw-border tw-border-primary-regular" : "tw-border-bg-card"}
|
|
1549
1574
|
${tt ? "tw-opacity-50 tw-cursor-not-allowed" : "tw-cursor-pointer"}
|
|
1550
1575
|
`,
|
|
1551
1576
|
children: [
|
|
1552
|
-
|
|
1577
|
+
O,
|
|
1553
1578
|
$ && /* @__PURE__ */ t(
|
|
1554
1579
|
F,
|
|
1555
1580
|
{
|
|
@@ -1564,12 +1589,12 @@ const Je = ({
|
|
|
1564
1589
|
},
|
|
1565
1590
|
et
|
|
1566
1591
|
)) });
|
|
1567
|
-
},
|
|
1568
|
-
["Trabajando", "Completadas"].map((
|
|
1592
|
+
}, Q = () => /* @__PURE__ */ c("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: [
|
|
1593
|
+
["Trabajando", "Completadas"].map((O, $) => /* @__PURE__ */ t(
|
|
1569
1594
|
"button",
|
|
1570
1595
|
{
|
|
1571
1596
|
onClick: () => {
|
|
1572
|
-
C(
|
|
1597
|
+
C(O);
|
|
1573
1598
|
},
|
|
1574
1599
|
className: `
|
|
1575
1600
|
tw-transition-colors tw-duration-200
|
|
@@ -1582,9 +1607,9 @@ const Je = ({
|
|
|
1582
1607
|
tw-font-regular
|
|
1583
1608
|
tw-text-left
|
|
1584
1609
|
tw-border
|
|
1585
|
-
${h ===
|
|
1610
|
+
${h === O ? "tw-bg-content tw-text-primary-dark tw-border tw-border-primary-regular" : "tw-border-bg-card"}
|
|
1586
1611
|
`,
|
|
1587
|
-
children:
|
|
1612
|
+
children: O
|
|
1588
1613
|
},
|
|
1589
1614
|
$
|
|
1590
1615
|
)),
|
|
@@ -1598,11 +1623,11 @@ const Je = ({
|
|
|
1598
1623
|
children: /* @__PURE__ */ t("p", { className: "tw-text-[12px] tw-font-normal tw-text-white", children: "Mover" })
|
|
1599
1624
|
}
|
|
1600
1625
|
)
|
|
1601
|
-
] }),
|
|
1602
|
-
var
|
|
1603
|
-
if (
|
|
1626
|
+
] }), L = () => {
|
|
1627
|
+
var O;
|
|
1628
|
+
if (K)
|
|
1604
1629
|
return /* @__PURE__ */ t("div", { children: "Cargando motivos..." });
|
|
1605
|
-
const
|
|
1630
|
+
const R = (q == null ? void 0 : q.map(($) => {
|
|
1606
1631
|
var W;
|
|
1607
1632
|
return {
|
|
1608
1633
|
id: $ == null ? void 0 : $.id,
|
|
@@ -1611,22 +1636,22 @@ const Je = ({
|
|
|
1611
1636
|
};
|
|
1612
1637
|
}).filter(($) => $.categoria === (d == null ? void 0 : d.nombre))) || [];
|
|
1613
1638
|
return /* @__PURE__ */ c("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: [
|
|
1614
|
-
!
|
|
1639
|
+
!k && !o ? /* @__PURE__ */ c(I, { children: [
|
|
1615
1640
|
/* @__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" }),
|
|
1616
1641
|
/* @__PURE__ */ t(
|
|
1617
|
-
|
|
1642
|
+
Ze,
|
|
1618
1643
|
{
|
|
1619
1644
|
isOpen: !0,
|
|
1620
|
-
options:
|
|
1645
|
+
options: R,
|
|
1621
1646
|
onSelect: ($, W) => S({
|
|
1622
1647
|
id: W,
|
|
1623
1648
|
nombre: $
|
|
1624
1649
|
})
|
|
1625
1650
|
}
|
|
1626
1651
|
)
|
|
1627
|
-
] }) : /* @__PURE__ */ c(
|
|
1652
|
+
] }) : /* @__PURE__ */ c(I, { children: [
|
|
1628
1653
|
/* @__PURE__ */ t("p", { className: "tw-text-[14px] tw-text-black-black_medium tw-font-semibold tw-text-left", children: "¿Estas seguro?" }),
|
|
1629
|
-
/* @__PURE__ */ t("p", { className: "tw-text-[14px] tw-text-black-black_medium tw-font-semibold tw-text-left", children: o ? "Estás eliminando el atraso de la tarea seleccionada" : `Esta tarea está atrasada debido a ${(
|
|
1654
|
+
/* @__PURE__ */ t("p", { className: "tw-text-[14px] tw-text-black-black_medium tw-font-semibold tw-text-left", children: o ? "Estás eliminando el atraso de la tarea seleccionada" : `Esta tarea está atrasada debido a ${(O = k == null ? void 0 : k.nombre) == null ? void 0 : O.nombre}` })
|
|
1630
1655
|
] }),
|
|
1631
1656
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-gap-3 tw-justify-end tw-my-[11px]", children: [
|
|
1632
1657
|
/* @__PURE__ */ t(
|
|
@@ -1635,9 +1660,9 @@ const Je = ({
|
|
|
1635
1660
|
className: `tw-w-fit tw-h-fit tw-bg-silver-silver_light tw-rounded-lg tw-py-[8px] tw-px-[13px] tw-text-[14px]
|
|
1636
1661
|
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`,
|
|
1637
1662
|
onClick: () => {
|
|
1638
|
-
|
|
1663
|
+
k ? M(null) : v(!1);
|
|
1639
1664
|
},
|
|
1640
|
-
children:
|
|
1665
|
+
children: k ? "Regresar" : "Cancelar"
|
|
1641
1666
|
}
|
|
1642
1667
|
),
|
|
1643
1668
|
/* @__PURE__ */ t(
|
|
@@ -1646,14 +1671,14 @@ const Je = ({
|
|
|
1646
1671
|
className: `tw-w-fit tw-h-fit tw-bg-texts-enfasis tw-rounded-lg tw-py-[8px] tw-px-[13px] tw-text-[14px]
|
|
1647
1672
|
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`,
|
|
1648
1673
|
onClick: () => {
|
|
1649
|
-
M(w), o && !
|
|
1674
|
+
M(w), o && !k ? T(o) : k && U();
|
|
1650
1675
|
},
|
|
1651
1676
|
children: "Aceptar"
|
|
1652
1677
|
}
|
|
1653
1678
|
)
|
|
1654
1679
|
] })
|
|
1655
1680
|
] });
|
|
1656
|
-
},
|
|
1681
|
+
}, D = () => f === "first" ? z() : f === "second" ? Q() : L(), U = async () => {
|
|
1657
1682
|
if (w)
|
|
1658
1683
|
try {
|
|
1659
1684
|
await N({
|
|
@@ -1661,34 +1686,34 @@ const Je = ({
|
|
|
1661
1686
|
projectID: i,
|
|
1662
1687
|
motivo: (w == null ? void 0 : w.id) ?? null
|
|
1663
1688
|
}), v(!1);
|
|
1664
|
-
} catch (
|
|
1665
|
-
console.error("Error al crear atraso:",
|
|
1689
|
+
} catch (R) {
|
|
1690
|
+
console.error("Error al crear atraso:", R);
|
|
1666
1691
|
}
|
|
1667
1692
|
};
|
|
1668
|
-
return /* @__PURE__ */ c(
|
|
1669
|
-
(
|
|
1693
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
1694
|
+
(j && s === 2 || !e) && /* @__PURE__ */ t(
|
|
1670
1695
|
"button",
|
|
1671
1696
|
{
|
|
1672
|
-
ref:
|
|
1697
|
+
ref: m,
|
|
1673
1698
|
onClick: () => {
|
|
1674
|
-
l(
|
|
1699
|
+
l(m), v(!0), P("first");
|
|
1675
1700
|
},
|
|
1676
1701
|
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",
|
|
1677
1702
|
children: /* @__PURE__ */ t("span", { className: "tw-rotate-90", children: /* @__PURE__ */ t(F, { icon: "elipsis", size: "xs" }) })
|
|
1678
1703
|
}
|
|
1679
1704
|
),
|
|
1680
|
-
|
|
1705
|
+
p && /* @__PURE__ */ t(Xe, { actionsRef: m, newPosition: g, children: /* @__PURE__ */ t(
|
|
1681
1706
|
"div",
|
|
1682
1707
|
{
|
|
1683
1708
|
className: `
|
|
1684
1709
|
tw-transition-all tw-duration-300 tw-ease
|
|
1685
1710
|
${f === "second" ? "tw-translate-x-[-8px]" : "tw-translate-x-0"}
|
|
1686
1711
|
`,
|
|
1687
|
-
children:
|
|
1712
|
+
children: D()
|
|
1688
1713
|
}
|
|
1689
1714
|
) })
|
|
1690
1715
|
] });
|
|
1691
|
-
},
|
|
1716
|
+
}, Ze = ({
|
|
1692
1717
|
isOpen: r,
|
|
1693
1718
|
onClose: e,
|
|
1694
1719
|
options: s,
|
|
@@ -1696,7 +1721,7 @@ const Je = ({
|
|
|
1696
1721
|
placeholderDropdown: n = "Seleccione una opción",
|
|
1697
1722
|
placeholderInput: i = "Texto ejemplo"
|
|
1698
1723
|
}) => {
|
|
1699
|
-
const [o, d] = y(!1), [l, g] = y(""), [
|
|
1724
|
+
const [o, d] = y(!1), [l, g] = y(""), [m, b] = y(
|
|
1700
1725
|
null
|
|
1701
1726
|
);
|
|
1702
1727
|
if (!r) return null;
|
|
@@ -1720,7 +1745,7 @@ const Je = ({
|
|
|
1720
1745
|
"span",
|
|
1721
1746
|
{
|
|
1722
1747
|
className: `tw-mr-2 tw-text-[14px] tw-font-normal tw-text-left ${o ? "tw-text-black-black_regular" : "tw-text-black-black_light"}`,
|
|
1723
|
-
children: (typeof
|
|
1748
|
+
children: (typeof m == "object" ? m == null ? void 0 : m.nombre : m) ?? n
|
|
1724
1749
|
}
|
|
1725
1750
|
),
|
|
1726
1751
|
/* @__PURE__ */ t(
|
|
@@ -1781,19 +1806,19 @@ const Je = ({
|
|
|
1781
1806
|
}
|
|
1782
1807
|
)
|
|
1783
1808
|
] }),
|
|
1784
|
-
_.map((u,
|
|
1809
|
+
_.map((u, p) => /* @__PURE__ */ c("div", { children: [
|
|
1785
1810
|
/* @__PURE__ */ t(
|
|
1786
1811
|
"a",
|
|
1787
1812
|
{
|
|
1788
1813
|
href: "#",
|
|
1789
1814
|
className: `tw-block tw-px-[18px] tw-py-[8px] tw-text-[14px] tw-font-normal
|
|
1790
1815
|
tw-cursor-pointer tw-rounded-md tw-transition-all tw-duration-200 tw-ease-in-out
|
|
1791
|
-
hover:tw-bg-blue-blue_medium hover:tw-text-primary-dark ${u.nombre ===
|
|
1816
|
+
hover:tw-bg-blue-blue_medium hover:tw-text-primary-dark ${u.nombre === m ? "tw-text-primary-dark tw-bg-blue-blue_medium" : "tw-text-gray-gray_medium"}`,
|
|
1792
1817
|
onClick: (v) => {
|
|
1793
1818
|
v.preventDefault(), a(
|
|
1794
1819
|
u,
|
|
1795
1820
|
typeof u == "string" ? null : u.id,
|
|
1796
|
-
|
|
1821
|
+
p
|
|
1797
1822
|
), b(
|
|
1798
1823
|
typeof u == "string" ? u : u.nombre
|
|
1799
1824
|
), d(!1);
|
|
@@ -1811,13 +1836,13 @@ const Je = ({
|
|
|
1811
1836
|
}
|
|
1812
1837
|
}
|
|
1813
1838
|
)
|
|
1814
|
-
] },
|
|
1839
|
+
] }, p))
|
|
1815
1840
|
]
|
|
1816
1841
|
}
|
|
1817
1842
|
)
|
|
1818
1843
|
] });
|
|
1819
1844
|
};
|
|
1820
|
-
class
|
|
1845
|
+
class tr {
|
|
1821
1846
|
static toPauseReasons(e) {
|
|
1822
1847
|
return {
|
|
1823
1848
|
id: e.id,
|
|
@@ -1825,40 +1850,40 @@ class Ze {
|
|
|
1825
1850
|
};
|
|
1826
1851
|
}
|
|
1827
1852
|
}
|
|
1828
|
-
const
|
|
1853
|
+
const er = async ({
|
|
1829
1854
|
tasks_api: r
|
|
1830
1855
|
}) => {
|
|
1831
1856
|
try {
|
|
1832
1857
|
const e = await r.get("/api/motivos");
|
|
1833
|
-
return X(e.data).map(
|
|
1858
|
+
return X(e.data).map(tr.toPauseReasons);
|
|
1834
1859
|
} catch (e) {
|
|
1835
1860
|
throw console.log("Error al obtener los usuarios comerciales", e), `Error al obtener los usuarios comerciales: ${e}`;
|
|
1836
1861
|
}
|
|
1837
|
-
},
|
|
1838
|
-
const { tasks_api: r } =
|
|
1862
|
+
}, rr = () => {
|
|
1863
|
+
const { tasks_api: r } = B();
|
|
1839
1864
|
return { pauseReasons: wt({
|
|
1840
1865
|
queryKey: ["pause_task_reasons"],
|
|
1841
|
-
queryFn: () =>
|
|
1866
|
+
queryFn: () => er({
|
|
1842
1867
|
tasks_api: r
|
|
1843
1868
|
}),
|
|
1844
1869
|
staleTime: 1e3 * 60 * 60 * 24
|
|
1845
1870
|
// mantains the data for 24 hours
|
|
1846
1871
|
}) };
|
|
1847
1872
|
};
|
|
1848
|
-
class
|
|
1873
|
+
class ar {
|
|
1849
1874
|
static toKanbanTasks(e) {
|
|
1850
|
-
var a, n, i, o, d, l, g,
|
|
1875
|
+
var a, n, i, o, d, l, g, m, b, _, u;
|
|
1851
1876
|
let s = [];
|
|
1852
1877
|
return e != null && e.responsable && s.push({
|
|
1853
1878
|
id: e.responsable.id,
|
|
1854
1879
|
name: e.responsable.nombre,
|
|
1855
1880
|
image: (d = (o = (i = (n = (a = e.responsable) == null ? void 0 : a.userOBP) == null ? void 0 : n.imagen) == null ? void 0 : i.formats) == null ? void 0 : o.thumbnail) == null ? void 0 : d.url
|
|
1856
|
-
}), (l = e == null ? void 0 : e.equipo) != null && l.miembros && e.equipo.miembros.forEach((
|
|
1881
|
+
}), (l = e == null ? void 0 : e.equipo) != null && l.miembros && e.equipo.miembros.forEach((p) => {
|
|
1857
1882
|
var v, h, C, f;
|
|
1858
|
-
s != null && s.find((
|
|
1859
|
-
id:
|
|
1860
|
-
name:
|
|
1861
|
-
image: (f = (C = (h = (v =
|
|
1883
|
+
s != null && s.find((P) => P.id === p.idUser.id) || p.idUser && s.push({
|
|
1884
|
+
id: p.idUser.id,
|
|
1885
|
+
name: p.idUser.nombre,
|
|
1886
|
+
image: (f = (C = (h = (v = p == null ? void 0 : p.userOBP) == null ? void 0 : v.imagen) == null ? void 0 : h.formats) == null ? void 0 : C.thumbnail) == null ? void 0 : f.url
|
|
1862
1887
|
});
|
|
1863
1888
|
}), {
|
|
1864
1889
|
paused: e == null ? void 0 : e.pausada,
|
|
@@ -1866,7 +1891,7 @@ class rr {
|
|
|
1866
1891
|
repeatsToDo: e == null ? void 0 : e.repeticiones,
|
|
1867
1892
|
comments: 0,
|
|
1868
1893
|
nameProject: (g = e == null ? void 0 : e.proyecto) == null ? void 0 : g.nombre,
|
|
1869
|
-
idProject: (
|
|
1894
|
+
idProject: (m = e == null ? void 0 : e.proyecto) == null ? void 0 : m.id,
|
|
1870
1895
|
willBePaused: e.es_pausable,
|
|
1871
1896
|
difficulty: e.nivel_dificultad,
|
|
1872
1897
|
endDate: new Date(e.ffin),
|
|
@@ -1886,7 +1911,7 @@ class rr {
|
|
|
1886
1911
|
}
|
|
1887
1912
|
const _t = async ({ filters: r, tasks_api: e }) => {
|
|
1888
1913
|
try {
|
|
1889
|
-
return (await e.get("/api/listado_tareas?populate=*", { params: r })).data.tareas.map(X).map(
|
|
1914
|
+
return (await e.get("/api/listado_tareas?populate=*", { params: r })).data.tareas.map(X).map(ar.toKanbanTasks);
|
|
1890
1915
|
} catch (s) {
|
|
1891
1916
|
throw console.log({ error: s }), `Error al obtener las tareas: ${s}`;
|
|
1892
1917
|
}
|
|
@@ -1904,7 +1929,7 @@ const _t = async ({ filters: r, tasks_api: e }) => {
|
|
|
1904
1929
|
}
|
|
1905
1930
|
}), Xt = () => {
|
|
1906
1931
|
var g;
|
|
1907
|
-
const r = nt(), { tasks_api: e } =
|
|
1932
|
+
const r = nt(), { tasks_api: e } = B(), { user: s } = Y(), { filters: a } = V(), [n, i] = y(0), [o, d] = y({
|
|
1908
1933
|
owner: {
|
|
1909
1934
|
user: s.id,
|
|
1910
1935
|
config: ((g = a == null ? void 0 : a.owner) == null ? void 0 : g.config) ?? "yo_y_mis_equipos",
|
|
@@ -1914,25 +1939,25 @@ const _t = async ({ filters: r, tasks_api: e }) => {
|
|
|
1914
1939
|
}), l = xt({
|
|
1915
1940
|
initialPageParam: 1,
|
|
1916
1941
|
queryKey: ["to_do_tasks", o],
|
|
1917
|
-
queryFn: ({ pageParam:
|
|
1942
|
+
queryFn: ({ pageParam: m }) => _t({
|
|
1918
1943
|
filters: {
|
|
1919
1944
|
...o,
|
|
1920
1945
|
status: "por_hacer",
|
|
1921
|
-
...st(
|
|
1946
|
+
...st(m)
|
|
1922
1947
|
},
|
|
1923
1948
|
tasks_api: e
|
|
1924
1949
|
}),
|
|
1925
1950
|
staleTime: 1e3 * 60 * 60 * 24,
|
|
1926
1951
|
// mantains the data for 24 hours
|
|
1927
|
-
getNextPageParam: (
|
|
1952
|
+
getNextPageParam: (m, b) => b.length + 1
|
|
1928
1953
|
});
|
|
1929
1954
|
return A(() => {
|
|
1930
|
-
var
|
|
1955
|
+
var m;
|
|
1931
1956
|
Object.keys(a).length > 0 && d({
|
|
1932
1957
|
...a,
|
|
1933
1958
|
owner: {
|
|
1934
1959
|
user: s.id,
|
|
1935
|
-
config: ((
|
|
1960
|
+
config: ((m = a == null ? void 0 : a.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos",
|
|
1936
1961
|
role: s.role
|
|
1937
1962
|
},
|
|
1938
1963
|
status: "por_hacer"
|
|
@@ -1961,14 +1986,14 @@ const _t = async ({ filters: r, tasks_api: e }) => {
|
|
|
1961
1986
|
filtersToSend: o
|
|
1962
1987
|
};
|
|
1963
1988
|
}, Zt = ({ idTask: r, setOpen: e, paused: s }) => {
|
|
1964
|
-
const a = nt(), { toDoTasks: n, filtersToSend: i } = Xt(), [o, d] = y(!1), { control: l, watch: g } =
|
|
1989
|
+
const a = nt(), { toDoTasks: n, filtersToSend: i } = Xt(), [o, d] = y(!1), { control: l, watch: g } = zt(), { tasksProject: m } = it(), { postPauseTask: b, postReanudeTask: _ } = dt(), { pauseReasons: u } = rr(), p = async () => {
|
|
1965
1990
|
try {
|
|
1966
1991
|
if (e(!1), await b({ id: r, motiveId: g("pauseReason") }), await a.invalidateQueries({
|
|
1967
1992
|
queryKey: ["to_do_tasks", i]
|
|
1968
1993
|
}), await a.invalidateQueries({
|
|
1969
1994
|
queryKey: ["tasksProject"]
|
|
1970
|
-
}), n && typeof n.refetch == "function" ||
|
|
1971
|
-
const h = await n.refetch(), C = await
|
|
1995
|
+
}), n && typeof n.refetch == "function" || m && typeof m.refetch == "function") {
|
|
1996
|
+
const h = await n.refetch(), C = await m.refetch();
|
|
1972
1997
|
return [h, C];
|
|
1973
1998
|
}
|
|
1974
1999
|
} catch (h) {
|
|
@@ -1980,8 +2005,8 @@ const _t = async ({ filters: r, tasks_api: e }) => {
|
|
|
1980
2005
|
queryKey: ["to_do_tasks", i]
|
|
1981
2006
|
}), await a.invalidateQueries({
|
|
1982
2007
|
queryKey: ["tasksProject"]
|
|
1983
|
-
}), n && typeof n.refetch == "function" ||
|
|
1984
|
-
const h = await n.refetch(), C = await
|
|
2008
|
+
}), n && typeof n.refetch == "function" || m && typeof m.refetch == "function") {
|
|
2009
|
+
const h = await n.refetch(), C = await m.refetch();
|
|
1985
2010
|
return [h, C];
|
|
1986
2011
|
}
|
|
1987
2012
|
} catch (h) {
|
|
@@ -1997,7 +2022,7 @@ const _t = async ({ filters: r, tasks_api: e }) => {
|
|
|
1997
2022
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-medium tw-text-neutral-600", children: "Esta acción reanudará la campaña en curso." }),
|
|
1998
2023
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-medium tw-text-neutral-600", children: "¿Estás seguro de continuar?" })
|
|
1999
2024
|
] }) : /* @__PURE__ */ t(
|
|
2000
|
-
|
|
2025
|
+
Te,
|
|
2001
2026
|
{
|
|
2002
2027
|
name: "pauseReason",
|
|
2003
2028
|
control: l,
|
|
@@ -2049,7 +2074,7 @@ const _t = async ({ filters: r, tasks_api: e }) => {
|
|
|
2049
2074
|
{
|
|
2050
2075
|
type: "button",
|
|
2051
2076
|
disabled: !g("pauseReason"),
|
|
2052
|
-
onClick: () => o ?
|
|
2077
|
+
onClick: () => o ? p() : d(!0),
|
|
2053
2078
|
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]",
|
|
2054
2079
|
children: "Aceptar"
|
|
2055
2080
|
}
|
|
@@ -2061,7 +2086,7 @@ function te({ trigger: r, children: e, open: s, setOpen: a }) {
|
|
|
2061
2086
|
return /* @__PURE__ */ c(_e, { open: s, onOpenChange: a, children: [
|
|
2062
2087
|
/* @__PURE__ */ t(Ce, { children: r }),
|
|
2063
2088
|
/* @__PURE__ */ t(
|
|
2064
|
-
|
|
2089
|
+
ke,
|
|
2065
2090
|
{
|
|
2066
2091
|
align: "start",
|
|
2067
2092
|
className: "tw-bg-white tw-border-none tw-rounded-lg tw-p-4",
|
|
@@ -2070,7 +2095,7 @@ function te({ trigger: r, children: e, open: s, setOpen: a }) {
|
|
|
2070
2095
|
)
|
|
2071
2096
|
] });
|
|
2072
2097
|
}
|
|
2073
|
-
const
|
|
2098
|
+
const sr = ({
|
|
2074
2099
|
id: r,
|
|
2075
2100
|
task: e,
|
|
2076
2101
|
endDate: s,
|
|
@@ -2081,25 +2106,25 @@ const ar = ({
|
|
|
2081
2106
|
priority: d,
|
|
2082
2107
|
difficulty: l,
|
|
2083
2108
|
responsible: g,
|
|
2084
|
-
nameRequiredTask:
|
|
2109
|
+
nameRequiredTask: m,
|
|
2085
2110
|
statusRequiredTask: b,
|
|
2086
2111
|
status: _,
|
|
2087
2112
|
repeatsToDo: u,
|
|
2088
|
-
repeats:
|
|
2113
|
+
repeats: p,
|
|
2089
2114
|
medioName: v,
|
|
2090
2115
|
paused: h,
|
|
2091
2116
|
idProject: C,
|
|
2092
2117
|
atraso: f,
|
|
2093
|
-
categoria:
|
|
2118
|
+
categoria: P
|
|
2094
2119
|
}) => {
|
|
2095
|
-
var
|
|
2096
|
-
const [
|
|
2120
|
+
var O, $, W, tt, et, ct;
|
|
2121
|
+
const [j, k] = y(!1), [M, q] = y(!1), { reasignResponsible: K, updateUnitys: N } = dt(), { getOBPUrlApi: T } = B(), [w, S] = y(p ?? 0), E = !!(u && p === u), z = !u || u === 1, Q = _ === 0, L = () => /* @__PURE__ */ c("div", { className: "tw-flex tw-justify-between tw-items-center tw-w-full tw-h-fit tw-relative", children: [
|
|
2097
2122
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-row tw-items-start tw-gap-[8px] tw-w-[calc(100%-32px)]", children: [
|
|
2098
|
-
_ < 2 && (
|
|
2123
|
+
_ < 2 && (E || z || Q) && /* @__PURE__ */ t(
|
|
2099
2124
|
Vt,
|
|
2100
2125
|
{
|
|
2101
2126
|
id: r,
|
|
2102
|
-
nameRequiredTask:
|
|
2127
|
+
nameRequiredTask: m ?? "",
|
|
2103
2128
|
statusRequiredTask: b ?? 0,
|
|
2104
2129
|
status: _,
|
|
2105
2130
|
idAtraso: f == null ? void 0 : f.atrasoId
|
|
@@ -2109,24 +2134,24 @@ const ar = ({
|
|
|
2109
2134
|
"p",
|
|
2110
2135
|
{
|
|
2111
2136
|
className: "tw-overflow-hidden tw-text-ellipsis tw-w-full tw-text-nowrap tw-text-[1.6rem] tw-font-medium tw-text-neutral-900",
|
|
2112
|
-
onClick: () =>
|
|
2137
|
+
onClick: () => k(!0),
|
|
2113
2138
|
children: e
|
|
2114
2139
|
}
|
|
2115
2140
|
)
|
|
2116
2141
|
] }),
|
|
2117
|
-
(
|
|
2142
|
+
(E || z || Q) && _ !== 2 && /* @__PURE__ */ t(
|
|
2118
2143
|
Jt,
|
|
2119
2144
|
{
|
|
2120
2145
|
id: r,
|
|
2121
|
-
nameRequiredTask:
|
|
2146
|
+
nameRequiredTask: m,
|
|
2122
2147
|
status: _,
|
|
2123
2148
|
statusRequiredTask: b,
|
|
2124
2149
|
projectID: C,
|
|
2125
2150
|
atrasoId: f == null ? void 0 : f.atrasoId,
|
|
2126
|
-
categoria:
|
|
2151
|
+
categoria: P
|
|
2127
2152
|
}
|
|
2128
2153
|
)
|
|
2129
|
-
] }),
|
|
2154
|
+
] }), D = {
|
|
2130
2155
|
0: { title: "N/A", color: x.texts.placeholder },
|
|
2131
2156
|
1: { title: "Baja", color: x.primary.regular },
|
|
2132
2157
|
2: { title: "Media", color: x.success.regular },
|
|
@@ -2137,12 +2162,12 @@ const ar = ({
|
|
|
2137
2162
|
2: { title: "Media", color: x.warning.regular },
|
|
2138
2163
|
3: { title: "Difícil", color: x.danger.regular },
|
|
2139
2164
|
4: { title: "Muy difícil", color: x.danger.dark }
|
|
2140
|
-
},
|
|
2165
|
+
}, R = (G) => {
|
|
2141
2166
|
S((rt) => G === "minus" ? Math.max(0, rt - 1) : Math.min(u, rt + 1));
|
|
2142
2167
|
};
|
|
2143
|
-
return /* @__PURE__ */ c(
|
|
2144
|
-
/* @__PURE__ */ c("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-primary-light tw-cursor-pointer tw-transition-all tw-duration-300", children: [
|
|
2145
|
-
/* @__PURE__ */ t(
|
|
2168
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
2169
|
+
/* @__PURE__ */ c("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-primary-light tw-cursor-pointer tw-transition-all tw-duration-300 hover:tw-border hover:tw-border-blue-500", children: [
|
|
2170
|
+
/* @__PURE__ */ t(L, {}),
|
|
2146
2171
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-gap-[4px] tw-py-2", children: [
|
|
2147
2172
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-regular tw-text-texts-subtext tw-max-w-[250px] tw-truncate", children: i }),
|
|
2148
2173
|
v && /* @__PURE__ */ t("p", { className: "tw-text-xl", children: v })
|
|
@@ -2153,9 +2178,9 @@ const ar = ({
|
|
|
2153
2178
|
Yt,
|
|
2154
2179
|
{
|
|
2155
2180
|
responsible: g,
|
|
2156
|
-
users: a.filter((G) => g ? G.id === g : !0).map((G) => Nt(G,
|
|
2181
|
+
users: a.filter((G) => g ? G.id === g : !0).map((G) => Nt(G, T())),
|
|
2157
2182
|
onClick: async (G, rt) => {
|
|
2158
|
-
await
|
|
2183
|
+
await K({
|
|
2159
2184
|
idNewResponsible: G,
|
|
2160
2185
|
id: r,
|
|
2161
2186
|
typeOfSelect: rt
|
|
@@ -2197,21 +2222,15 @@ const ar = ({
|
|
|
2197
2222
|
] }),
|
|
2198
2223
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-gap-m tw-items-center tw-flex-wrap", children: [
|
|
2199
2224
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-gap-2", children: [
|
|
2200
|
-
f && /* @__PURE__ */ t(
|
|
2201
|
-
|
|
2225
|
+
f && /* @__PURE__ */ t($t, { content: `Tarea atrasada debido a: ${f == null ? void 0 : f.motivo}`, children: /* @__PURE__ */ t(
|
|
2226
|
+
F,
|
|
2202
2227
|
{
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
icon: "exclamation_triangle",
|
|
2208
|
-
size: "xs",
|
|
2209
|
-
color: "#C62E1F",
|
|
2210
|
-
strokeWidth: 4
|
|
2211
|
-
}
|
|
2212
|
-
)
|
|
2228
|
+
icon: "exclamation_triangle",
|
|
2229
|
+
size: "xs",
|
|
2230
|
+
color: "#C62E1F",
|
|
2231
|
+
strokeWidth: 4
|
|
2213
2232
|
}
|
|
2214
|
-
),
|
|
2233
|
+
) }),
|
|
2215
2234
|
/* @__PURE__ */ t(
|
|
2216
2235
|
H,
|
|
2217
2236
|
{
|
|
@@ -2220,8 +2239,9 @@ const ar = ({
|
|
|
2220
2239
|
{
|
|
2221
2240
|
icon: "difficulty",
|
|
2222
2241
|
size: "xs",
|
|
2223
|
-
color: (
|
|
2224
|
-
strokeWidth: 4
|
|
2242
|
+
color: (O = U[l ?? 0]) == null ? void 0 : O.color,
|
|
2243
|
+
strokeWidth: 4,
|
|
2244
|
+
style: { border: "1.5px" }
|
|
2225
2245
|
}
|
|
2226
2246
|
),
|
|
2227
2247
|
children: /* @__PURE__ */ t(
|
|
@@ -2242,7 +2262,7 @@ const ar = ({
|
|
|
2242
2262
|
{
|
|
2243
2263
|
icon: "flag",
|
|
2244
2264
|
size: "xs",
|
|
2245
|
-
color: (tt =
|
|
2265
|
+
color: (tt = D[d ?? 0]) == null ? void 0 : tt.color,
|
|
2246
2266
|
strokeWidth: 4
|
|
2247
2267
|
}
|
|
2248
2268
|
),
|
|
@@ -2250,13 +2270,13 @@ const ar = ({
|
|
|
2250
2270
|
"p",
|
|
2251
2271
|
{
|
|
2252
2272
|
className: "tw-text-sm tw-font-regular tw-p-5 tw-bg-bg-card tw-rounded-lg",
|
|
2253
|
-
style: { color: (et =
|
|
2254
|
-
children: `Prioridad: ${(ct =
|
|
2273
|
+
style: { color: (et = D[d ?? 0]) == null ? void 0 : et.color },
|
|
2274
|
+
children: `Prioridad: ${(ct = D[d ?? 0]) == null ? void 0 : ct.title}`
|
|
2255
2275
|
}
|
|
2256
2276
|
)
|
|
2257
2277
|
}
|
|
2258
2278
|
),
|
|
2259
|
-
!u || u && _ === 0 && /* @__PURE__ */ c(
|
|
2279
|
+
!u || u && _ === 0 && /* @__PURE__ */ c(I, { children: [
|
|
2260
2280
|
/* @__PURE__ */ t(
|
|
2261
2281
|
F,
|
|
2262
2282
|
{
|
|
@@ -2276,7 +2296,7 @@ const ar = ({
|
|
|
2276
2296
|
/* @__PURE__ */ t(
|
|
2277
2297
|
"button",
|
|
2278
2298
|
{
|
|
2279
|
-
onClick: () =>
|
|
2299
|
+
onClick: () => R("minus"),
|
|
2280
2300
|
className: "tw-flex tw-items-center tw-justify-center tw-bg-gray-200 tw-w-[0] tw-rounded-full hover:tw-bg-gray-400 tw-mr-[4px]",
|
|
2281
2301
|
children: /* @__PURE__ */ t(
|
|
2282
2302
|
F,
|
|
@@ -2293,7 +2313,7 @@ const ar = ({
|
|
|
2293
2313
|
/* @__PURE__ */ t(
|
|
2294
2314
|
"button",
|
|
2295
2315
|
{
|
|
2296
|
-
onClick: () =>
|
|
2316
|
+
onClick: () => R("plus"),
|
|
2297
2317
|
className: "tw-flex tw-items-center tw-justify-center tw-bg-gray-200 tw-w-[0] tw-rounded-full hover:tw-bg-gray-400 tw-ml-[4px]",
|
|
2298
2318
|
children: /* @__PURE__ */ t(
|
|
2299
2319
|
F,
|
|
@@ -2322,7 +2342,7 @@ const ar = ({
|
|
|
2322
2342
|
o > 0 && /* @__PURE__ */ t("div", { className: "tw-border-t tw-border-gray-200 tw-mt-4 tw-pt-2", children: /* @__PURE__ */ c(
|
|
2323
2343
|
"button",
|
|
2324
2344
|
{
|
|
2325
|
-
onClick: () =>
|
|
2345
|
+
onClick: () => k(!0),
|
|
2326
2346
|
className: "tw-flex tw-items-center tw-gap-2",
|
|
2327
2347
|
children: [
|
|
2328
2348
|
/* @__PURE__ */ t(F, { icon: "comment", size: "xs", strokeWidth: 4 }),
|
|
@@ -2331,18 +2351,18 @@ const ar = ({
|
|
|
2331
2351
|
}
|
|
2332
2352
|
) })
|
|
2333
2353
|
] }),
|
|
2334
|
-
/* @__PURE__ */ t(Gt, { taskId: r, isOpen:
|
|
2354
|
+
/* @__PURE__ */ t(Gt, { taskId: r, isOpen: j, setIsOpen: k })
|
|
2335
2355
|
] });
|
|
2336
|
-
},
|
|
2356
|
+
}, pt = ({ title: r, tasks: e, loadNextPage: s, isFetching: a, total: n }) => {
|
|
2337
2357
|
const i = Z(null), o = Z(null), d = Z(!1);
|
|
2338
2358
|
A(() => {
|
|
2339
|
-
var
|
|
2340
|
-
i != null && i.current && (o != null && o.current) && (o.current.style.minHeight = `${((
|
|
2359
|
+
var m;
|
|
2360
|
+
i != null && i.current && (o != null && o.current) && (o.current.style.minHeight = `${((m = i == null ? void 0 : i.current) == null ? void 0 : m.clientHeight) - 300}px`);
|
|
2341
2361
|
}, [i == null ? void 0 : i.current]);
|
|
2342
|
-
const l = (
|
|
2362
|
+
const l = (m) => {
|
|
2343
2363
|
if (d.current) return;
|
|
2344
|
-
const { scrollTop: b, clientHeight: _, scrollHeight: u } =
|
|
2345
|
-
|
|
2364
|
+
const { scrollTop: b, clientHeight: _, scrollHeight: u } = m == null ? void 0 : m.target, p = b / (u - _) * 100;
|
|
2365
|
+
p <= 95 || p >= 95 && (d.current = !0, s && s(), setTimeout(() => {
|
|
2346
2366
|
d.current = !1;
|
|
2347
2367
|
}, 200));
|
|
2348
2368
|
};
|
|
@@ -2350,7 +2370,7 @@ const ar = ({
|
|
|
2350
2370
|
"div",
|
|
2351
2371
|
{
|
|
2352
2372
|
ref: i,
|
|
2353
|
-
className: `tw-flex tw-flex-col tw-bg-
|
|
2373
|
+
className: `tw-flex tw-flex-col tw-bg-gray-100 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 ${{
|
|
2354
2374
|
"Por hacer": "tw-border-texts-placeholder",
|
|
2355
2375
|
Trabajando: "tw-border-primary-regular",
|
|
2356
2376
|
Completadas: "tw-border-success-regular"
|
|
@@ -2375,12 +2395,10 @@ const ar = ({
|
|
|
2375
2395
|
"div",
|
|
2376
2396
|
{
|
|
2377
2397
|
ref: o,
|
|
2378
|
-
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",
|
|
2398
|
+
className: "tw-flex tw-flex-col tw-gap-[12px] tw-max-w-[350px] tw-overflow-y-auto tw-scrollbar-none tw-pt-4 tw-pb-[200px] tw-h-full hover:tw-bg-gray-100 focus:tw-bg-gray-200 hover:tw-border-gray-300 focus:tw-border-gray-400 focus:tw-outline-none",
|
|
2379
2399
|
onScroll: l,
|
|
2380
2400
|
children: [
|
|
2381
|
-
e == null ? void 0 : e.map(
|
|
2382
|
-
(p) => /* @__PURE__ */ t(ar, { ...p }, p.id)
|
|
2383
|
-
),
|
|
2401
|
+
e == null ? void 0 : e.map((m) => /* @__PURE__ */ t(sr, { ...m }, m.id)),
|
|
2384
2402
|
a ? /* @__PURE__ */ t(ze, {}) : /* @__PURE__ */ t("p", { className: "tw-text-center tw-text-gray-500 tw-text-2xl", children: "No hay más tareas por mostrar..." })
|
|
2385
2403
|
]
|
|
2386
2404
|
}
|
|
@@ -2439,9 +2457,9 @@ const ar = ({
|
|
|
2439
2457
|
name: "Muy dificil"
|
|
2440
2458
|
}]
|
|
2441
2459
|
}
|
|
2442
|
-
],
|
|
2460
|
+
], nr = () => {
|
|
2443
2461
|
const { user: r } = Y(), [e, s] = y([...At]), a = [{
|
|
2444
|
-
roles: ["
|
|
2462
|
+
roles: ["Project Manager", "Manager", "Operation Manager"],
|
|
2445
2463
|
id: "owner.config",
|
|
2446
2464
|
filters: [
|
|
2447
2465
|
{ id: "todas", name: "Todas las tareas" }
|
|
@@ -2452,7 +2470,7 @@ const ar = ({
|
|
|
2452
2470
|
a.forEach((d) => {
|
|
2453
2471
|
if (d.roles.includes(r.role)) {
|
|
2454
2472
|
const l = n.find((g) => g.id === d.id);
|
|
2455
|
-
l && (l.options.some((
|
|
2473
|
+
l && (l.options.some((m) => m.id === "todas") || (l.options = [
|
|
2456
2474
|
{ id: "todas", name: "Todas las tareas" },
|
|
2457
2475
|
...l.options
|
|
2458
2476
|
]));
|
|
@@ -2463,9 +2481,9 @@ const ar = ({
|
|
|
2463
2481
|
}, [r.role]), {
|
|
2464
2482
|
filters: e
|
|
2465
2483
|
};
|
|
2466
|
-
},
|
|
2484
|
+
}, lr = () => {
|
|
2467
2485
|
var i;
|
|
2468
|
-
const { defineFields: r } = V(), { tasksProject: e } = it(), { filters: s } =
|
|
2486
|
+
const { defineFields: r } = V(), { tasksProject: e } = it(), { filters: s } = nr();
|
|
2469
2487
|
A(() => {
|
|
2470
2488
|
(async () => {
|
|
2471
2489
|
let d = [...s];
|
|
@@ -2479,7 +2497,7 @@ const ar = ({
|
|
|
2479
2497
|
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, d) => {
|
|
2480
2498
|
var l;
|
|
2481
2499
|
return /* @__PURE__ */ t(
|
|
2482
|
-
|
|
2500
|
+
pt,
|
|
2483
2501
|
{
|
|
2484
2502
|
total: ((l = a == null ? void 0 : a[d]) == null ? void 0 : l.length) ?? 0,
|
|
2485
2503
|
title: o,
|
|
@@ -2489,11 +2507,11 @@ const ar = ({
|
|
|
2489
2507
|
}
|
|
2490
2508
|
);
|
|
2491
2509
|
}) });
|
|
2492
|
-
},
|
|
2510
|
+
}, or = () => {
|
|
2493
2511
|
var a, n;
|
|
2494
2512
|
const { toDoTasks: r, total: e } = Xt(), s = [...((n = (a = r == null ? void 0 : r.data) == null ? void 0 : a.pages) == null ? void 0 : n.flat()) ?? []];
|
|
2495
2513
|
return /* @__PURE__ */ t(
|
|
2496
|
-
|
|
2514
|
+
pt,
|
|
2497
2515
|
{
|
|
2498
2516
|
total: e,
|
|
2499
2517
|
title: "Por hacer",
|
|
@@ -2503,9 +2521,9 @@ const ar = ({
|
|
|
2503
2521
|
isLoadingData: r == null ? void 0 : r.isLoading
|
|
2504
2522
|
}
|
|
2505
2523
|
);
|
|
2506
|
-
},
|
|
2524
|
+
}, ir = () => {
|
|
2507
2525
|
var g;
|
|
2508
|
-
const r = nt(), { tasks_api: e } =
|
|
2526
|
+
const r = nt(), { tasks_api: e } = B(), { user: s } = Y(), { filters: a } = V(), [n, i] = y(0), [o, d] = y({
|
|
2509
2527
|
owner: {
|
|
2510
2528
|
user: s.id,
|
|
2511
2529
|
config: ((g = a == null ? void 0 : a.owner) == null ? void 0 : g.config) ?? "yo_y_mis_equipos",
|
|
@@ -2515,25 +2533,25 @@ const ar = ({
|
|
|
2515
2533
|
}), l = xt({
|
|
2516
2534
|
initialPageParam: 1,
|
|
2517
2535
|
queryKey: ["working_tasks", o],
|
|
2518
|
-
queryFn: ({ pageParam:
|
|
2536
|
+
queryFn: ({ pageParam: m }) => _t({
|
|
2519
2537
|
filters: {
|
|
2520
2538
|
...o,
|
|
2521
2539
|
status: "trabajando",
|
|
2522
|
-
...st(
|
|
2540
|
+
...st(m)
|
|
2523
2541
|
},
|
|
2524
2542
|
tasks_api: e
|
|
2525
2543
|
}),
|
|
2526
2544
|
staleTime: 1e3 * 60 * 60 * 24,
|
|
2527
2545
|
// mantains the data for 24 hours
|
|
2528
|
-
getNextPageParam: (
|
|
2546
|
+
getNextPageParam: (m, b) => b.length + 1
|
|
2529
2547
|
});
|
|
2530
2548
|
return A(() => {
|
|
2531
|
-
var
|
|
2549
|
+
var m;
|
|
2532
2550
|
Object.keys(a).length > 0 && d({
|
|
2533
2551
|
...a,
|
|
2534
2552
|
owner: {
|
|
2535
2553
|
user: s.id,
|
|
2536
|
-
config: ((
|
|
2554
|
+
config: ((m = a == null ? void 0 : a.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos",
|
|
2537
2555
|
role: s.role
|
|
2538
2556
|
},
|
|
2539
2557
|
status: "trabajando"
|
|
@@ -2560,11 +2578,11 @@ const ar = ({
|
|
|
2560
2578
|
workingTasks: l,
|
|
2561
2579
|
total: n
|
|
2562
2580
|
};
|
|
2563
|
-
},
|
|
2581
|
+
}, cr = () => {
|
|
2564
2582
|
var a, n;
|
|
2565
|
-
const { workingTasks: r, total: e } =
|
|
2583
|
+
const { workingTasks: r, total: e } = ir(), s = [...((n = (a = r == null ? void 0 : r.data) == null ? void 0 : a.pages) == null ? void 0 : n.flat()) ?? []];
|
|
2566
2584
|
return /* @__PURE__ */ t(
|
|
2567
|
-
|
|
2585
|
+
pt,
|
|
2568
2586
|
{
|
|
2569
2587
|
total: e,
|
|
2570
2588
|
title: "Trabajando",
|
|
@@ -2573,9 +2591,9 @@ const ar = ({
|
|
|
2573
2591
|
isFetching: r == null ? void 0 : r.isFetching
|
|
2574
2592
|
}
|
|
2575
2593
|
);
|
|
2576
|
-
},
|
|
2594
|
+
}, wr = () => {
|
|
2577
2595
|
var g;
|
|
2578
|
-
const r = nt(), { user: e } = Y(), { tasks_api: s } =
|
|
2596
|
+
const r = nt(), { user: e } = Y(), { tasks_api: s } = B(), { filters: a } = V(), [n, i] = y(0), [o, d] = y({
|
|
2579
2597
|
owner: {
|
|
2580
2598
|
user: e.id,
|
|
2581
2599
|
config: ((g = a == null ? void 0 : a.owner) == null ? void 0 : g.config) ?? "yo_y_mis_equipos",
|
|
@@ -2585,25 +2603,25 @@ const ar = ({
|
|
|
2585
2603
|
}), l = xt({
|
|
2586
2604
|
initialPageParam: 1,
|
|
2587
2605
|
queryKey: ["done_tasks", o],
|
|
2588
|
-
queryFn: ({ pageParam:
|
|
2606
|
+
queryFn: ({ pageParam: m }) => _t({
|
|
2589
2607
|
filters: {
|
|
2590
2608
|
...o,
|
|
2591
2609
|
status: "completadas",
|
|
2592
|
-
...st(
|
|
2610
|
+
...st(m)
|
|
2593
2611
|
},
|
|
2594
2612
|
tasks_api: s
|
|
2595
2613
|
}),
|
|
2596
2614
|
staleTime: 1e3 * 60 * 60 * 24,
|
|
2597
2615
|
// mantains the data for 24 hours
|
|
2598
|
-
getNextPageParam: (
|
|
2616
|
+
getNextPageParam: (m, b) => b.length + 1
|
|
2599
2617
|
});
|
|
2600
2618
|
return A(() => {
|
|
2601
|
-
var
|
|
2619
|
+
var m;
|
|
2602
2620
|
Object.keys(a).length > 0 && d({
|
|
2603
2621
|
...a,
|
|
2604
2622
|
owner: {
|
|
2605
2623
|
user: e.id,
|
|
2606
|
-
config: ((
|
|
2624
|
+
config: ((m = a == null ? void 0 : a.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos",
|
|
2607
2625
|
role: e.role
|
|
2608
2626
|
},
|
|
2609
2627
|
status: "completadas"
|
|
@@ -2630,11 +2648,11 @@ const ar = ({
|
|
|
2630
2648
|
doneTasks: l,
|
|
2631
2649
|
total: n
|
|
2632
2650
|
};
|
|
2633
|
-
},
|
|
2651
|
+
}, dr = () => {
|
|
2634
2652
|
var a, n;
|
|
2635
|
-
const { doneTasks: r, total: e } =
|
|
2653
|
+
const { doneTasks: r, total: e } = wr(), s = [...((n = (a = r == null ? void 0 : r.data) == null ? void 0 : a.pages) == null ? void 0 : n.flat()) ?? []];
|
|
2636
2654
|
return /* @__PURE__ */ t(
|
|
2637
|
-
|
|
2655
|
+
pt,
|
|
2638
2656
|
{
|
|
2639
2657
|
title: "Completadas",
|
|
2640
2658
|
tasks: s,
|
|
@@ -2652,8 +2670,8 @@ class ut {
|
|
|
2652
2670
|
};
|
|
2653
2671
|
}
|
|
2654
2672
|
}
|
|
2655
|
-
const
|
|
2656
|
-
const { tasks_api: r } =
|
|
2673
|
+
const ur = () => {
|
|
2674
|
+
const { tasks_api: r } = B(), { filters: e } = V(), { user: s } = Y();
|
|
2657
2675
|
return {
|
|
2658
2676
|
//methods
|
|
2659
2677
|
getSalesmanAndProjects: async () => {
|
|
@@ -2779,9 +2797,9 @@ const dr = () => {
|
|
|
2779
2797
|
id: "ejecutivo",
|
|
2780
2798
|
options: []
|
|
2781
2799
|
}
|
|
2782
|
-
],
|
|
2800
|
+
], mr = () => {
|
|
2783
2801
|
const { user: r } = Y(), [e, s] = y([...St]), a = [{
|
|
2784
|
-
roles: ["
|
|
2802
|
+
roles: ["Project Manager", "Manager", "Operation Manager"],
|
|
2785
2803
|
id: "owner.config",
|
|
2786
2804
|
filters: [
|
|
2787
2805
|
{ id: "todas", name: "Todas las tareas" }
|
|
@@ -2792,7 +2810,7 @@ const dr = () => {
|
|
|
2792
2810
|
a.forEach((d) => {
|
|
2793
2811
|
if (d.roles.includes(r.role)) {
|
|
2794
2812
|
const l = n.find((g) => g.id === d.id);
|
|
2795
|
-
l && (l.options.some((
|
|
2813
|
+
l && (l.options.some((m) => m.id === "todas") || (l.options = [
|
|
2796
2814
|
{ id: "todas", name: "Todas las tareas" },
|
|
2797
2815
|
...l.options
|
|
2798
2816
|
]));
|
|
@@ -2804,7 +2822,7 @@ const dr = () => {
|
|
|
2804
2822
|
filters: e
|
|
2805
2823
|
};
|
|
2806
2824
|
}, pr = () => {
|
|
2807
|
-
const { defineFields: r } = V(), { getSalesmanAndProjects: e } =
|
|
2825
|
+
const { defineFields: r } = V(), { getSalesmanAndProjects: e } = ur(), { filters: s } = mr();
|
|
2808
2826
|
return A(() => {
|
|
2809
2827
|
(async () => {
|
|
2810
2828
|
let n = [...s], { salesmanUsers: i, projects: o } = await e();
|
|
@@ -2813,11 +2831,11 @@ const dr = () => {
|
|
|
2813
2831
|
);
|
|
2814
2832
|
})();
|
|
2815
2833
|
}, []), /* @__PURE__ */ c("div", { className: "tw-flex tw-gap-4 tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: [
|
|
2816
|
-
/* @__PURE__ */ t(
|
|
2817
|
-
/* @__PURE__ */ t(
|
|
2818
|
-
/* @__PURE__ */ t(
|
|
2834
|
+
/* @__PURE__ */ t(or, {}),
|
|
2835
|
+
/* @__PURE__ */ t(cr, {}),
|
|
2836
|
+
/* @__PURE__ */ t(dr, {})
|
|
2819
2837
|
] });
|
|
2820
|
-
}, ee = lt({}),
|
|
2838
|
+
}, ee = lt({}), gr = ({ children: r }) => {
|
|
2821
2839
|
const [e, s] = y([]), a = (n) => {
|
|
2822
2840
|
s((i) => i.includes(n) ? i.filter((o) => o !== n) : [...i, n]);
|
|
2823
2841
|
};
|
|
@@ -2833,7 +2851,7 @@ const dr = () => {
|
|
|
2833
2851
|
children: r
|
|
2834
2852
|
}
|
|
2835
2853
|
);
|
|
2836
|
-
},
|
|
2854
|
+
}, xr = () => ot(ee), re = () => {
|
|
2837
2855
|
const r = () => /* @__PURE__ */ c("div", { className: "tw-w-full tw-flex tw-gap-m", children: [
|
|
2838
2856
|
/* @__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" }),
|
|
2839
2857
|
/* @__PURE__ */ t("div", { className: "tw-w-[30%] tw-h-[30px] tw-bg-gray-200 tw-rounded-md tw-animate-pulse" }),
|
|
@@ -2858,12 +2876,12 @@ const dr = () => {
|
|
|
2858
2876
|
/* @__PURE__ */ t("div", { className: "tw-pl-5", children: /* @__PURE__ */ t(r, {}) })
|
|
2859
2877
|
] })
|
|
2860
2878
|
] });
|
|
2861
|
-
}, ae = ({ startDate: r, endDate: e }) => /* @__PURE__ */ c(
|
|
2879
|
+
}, ae = ({ startDate: r, endDate: e }) => /* @__PURE__ */ c(I, { children: [
|
|
2862
2880
|
/* @__PURE__ */ c("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: [
|
|
2863
2881
|
/* @__PURE__ */ t(F, { icon: "calendar", size: "xs", strokeWidth: 4, color: x.texts.subtext }),
|
|
2864
2882
|
/* @__PURE__ */ c("p", { className: "tw-text-lg", children: [
|
|
2865
2883
|
" ",
|
|
2866
|
-
|
|
2884
|
+
Pt(r)
|
|
2867
2885
|
] })
|
|
2868
2886
|
] }),
|
|
2869
2887
|
/* @__PURE__ */ t(F, { icon: "arrow_right", size: "xs", strokeWidth: 4, color: x.texts.DEFAULT }),
|
|
@@ -2871,7 +2889,7 @@ const dr = () => {
|
|
|
2871
2889
|
/* @__PURE__ */ t(F, { icon: "calendar", size: "xs", strokeWidth: 4, color: x.texts.subtext }),
|
|
2872
2890
|
/* @__PURE__ */ c("p", { className: "tw-text-lg", children: [
|
|
2873
2891
|
" ",
|
|
2874
|
-
|
|
2892
|
+
Pt(e)
|
|
2875
2893
|
] })
|
|
2876
2894
|
] })
|
|
2877
2895
|
] }), se = ({
|
|
@@ -2881,7 +2899,7 @@ const dr = () => {
|
|
|
2881
2899
|
endDate: a,
|
|
2882
2900
|
atraso: n
|
|
2883
2901
|
}) => {
|
|
2884
|
-
var g,
|
|
2902
|
+
var g, m, b;
|
|
2885
2903
|
const [i, o] = y({
|
|
2886
2904
|
priority: !1,
|
|
2887
2905
|
difficulty: !1,
|
|
@@ -2952,7 +2970,7 @@ const dr = () => {
|
|
|
2952
2970
|
borderHover: "hover:tw-border-danger-dark"
|
|
2953
2971
|
}
|
|
2954
2972
|
};
|
|
2955
|
-
return /* @__PURE__ */ c(
|
|
2973
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
2956
2974
|
/* @__PURE__ */ t("button", { className: "tw-gap-s tw-bg-gray-100 tw-rounded-[8px] tw-h-[30px] tw-w-[30px] tw-flex tw-justify-center tw-items-center hover:tw-bg-gray-200", children: /* @__PURE__ */ t(
|
|
2957
2975
|
H,
|
|
2958
2976
|
{
|
|
@@ -2982,7 +3000,7 @@ const dr = () => {
|
|
|
2982
3000
|
onMouseEnter: () => o({ ...i, difficulty: !0 }),
|
|
2983
3001
|
onMouseLeave: () => o({ ...i, difficulty: !1 }),
|
|
2984
3002
|
className: `tw-gap-s ${(g = l[s === 0 ? 1 : s]) == null ? void 0 : g.border}
|
|
2985
|
-
${(
|
|
3003
|
+
${(m = l[s === 0 ? 1 : s]) == null ? void 0 : m.borderHover}
|
|
2986
3004
|
tw-border tw-rounded-[8px] tw-h-[30px] tw-w-[30px] tw-flex tw-justify-center tw-items-center
|
|
2987
3005
|
transition-all duration-300 tw-shadow-[0px_0px_2px_0px_rgba(37,37,37,0.10)]`,
|
|
2988
3006
|
children: /* @__PURE__ */ t(
|
|
@@ -3075,9 +3093,9 @@ const dr = () => {
|
|
|
3075
3093
|
/* @__PURE__ */ t("p", { className: "tw-text-xl tw-font-regular tw-text-texts-subtext", children: `${a.getDate()} ${vt(a.getMonth()).slice(0, 3)}` })
|
|
3076
3094
|
] })
|
|
3077
3095
|
] });
|
|
3078
|
-
},
|
|
3079
|
-
const { selectedTasks: e, selectTask: s } =
|
|
3080
|
-
return /* @__PURE__ */ c(
|
|
3096
|
+
}, hr = ({ id: r }) => {
|
|
3097
|
+
const { selectedTasks: e, selectTask: s } = xr();
|
|
3098
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
3081
3099
|
/* @__PURE__ */ t(
|
|
3082
3100
|
"label",
|
|
3083
3101
|
{
|
|
@@ -3116,21 +3134,21 @@ const dr = () => {
|
|
|
3116
3134
|
dispatch: /* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-texts-subtext tw-max-w-[400px] tw-truncate", children: r }),
|
|
3117
3135
|
children: /* @__PURE__ */ t("p", { className: "tw-text-xl tw-text-texts-subtext tw-p-2 tw-max-w-[400px]", children: r })
|
|
3118
3136
|
}
|
|
3119
|
-
),
|
|
3120
|
-
var b, _, u,
|
|
3121
|
-
const [e, s] = y(!1), [a, n] = y(!1), { tasksProject: i } = it(), { reasignResponsible: o } = dt(), { getOBPUrlApi: d } =
|
|
3122
|
-
return /* @__PURE__ */ c(
|
|
3137
|
+
), fr = ({ id: r }) => {
|
|
3138
|
+
var b, _, u, p, v;
|
|
3139
|
+
const [e, s] = y(!1), [a, n] = y(!1), { tasksProject: i } = it(), { reasignResponsible: o } = dt(), { getOBPUrlApi: d } = B(), l = (b = i == null ? void 0 : i.data) == null ? void 0 : b.find((h) => h.id === r), [g, m] = y(null);
|
|
3140
|
+
return /* @__PURE__ */ c(I, { children: [
|
|
3123
3141
|
/* @__PURE__ */ t("div", { className: "tw-border-b tw-border-gray-200 tw-pb-3", children: /* @__PURE__ */ c(
|
|
3124
3142
|
"div",
|
|
3125
3143
|
{
|
|
3126
3144
|
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",
|
|
3127
3145
|
onMouseEnter: () => {
|
|
3128
|
-
|
|
3146
|
+
m(r);
|
|
3129
3147
|
},
|
|
3130
|
-
onMouseLeave: () =>
|
|
3148
|
+
onMouseLeave: () => m(null),
|
|
3131
3149
|
onClick: () => n(!0),
|
|
3132
3150
|
children: [
|
|
3133
|
-
!(l != null && l.nameRequiredTask) || (l == null ? void 0 : l.nameRequiredTask) !== "" && (l == null ? void 0 : l.statusRequiredTask) === 2 && /* @__PURE__ */ t(
|
|
3151
|
+
!(l != null && l.nameRequiredTask) || (l == null ? void 0 : l.nameRequiredTask) !== "" && (l == null ? void 0 : l.statusRequiredTask) === 2 && /* @__PURE__ */ t(hr, { id: r }),
|
|
3134
3152
|
/* @__PURE__ */ t(
|
|
3135
3153
|
Vt,
|
|
3136
3154
|
{
|
|
@@ -3202,30 +3220,52 @@ const dr = () => {
|
|
|
3202
3220
|
),
|
|
3203
3221
|
/* @__PURE__ */ t(ae, { startDate: l == null ? void 0 : l.startDate, endDate: l == null ? void 0 : l.endDate }),
|
|
3204
3222
|
g === r && /* @__PURE__ */ c("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: [
|
|
3205
|
-
/* @__PURE__ */ t(
|
|
3206
|
-
|
|
3223
|
+
/* @__PURE__ */ t(
|
|
3224
|
+
H,
|
|
3207
3225
|
{
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3226
|
+
dispatch: /* @__PURE__ */ t(
|
|
3227
|
+
"button",
|
|
3228
|
+
{
|
|
3229
|
+
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",
|
|
3230
|
+
onClick: (h) => {
|
|
3231
|
+
h.stopPropagation(), console.log("comment");
|
|
3232
|
+
},
|
|
3233
|
+
children: /* @__PURE__ */ t(
|
|
3234
|
+
F,
|
|
3235
|
+
{
|
|
3236
|
+
icon: "comment",
|
|
3237
|
+
size: "xs",
|
|
3238
|
+
strokeWidth: 5,
|
|
3239
|
+
color: x.texts.subtext,
|
|
3240
|
+
classNameDiv: "tw-w-[13px] tw-h-[13px]",
|
|
3241
|
+
style: { width: "13px", height: "13px" }
|
|
3242
|
+
}
|
|
3243
|
+
)
|
|
3244
|
+
}
|
|
3245
|
+
),
|
|
3246
|
+
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..." }) })
|
|
3213
3247
|
}
|
|
3214
|
-
),
|
|
3215
|
-
(l == null ? void 0 : l.status) !== 2 && /* @__PURE__ */ t(
|
|
3216
|
-
|
|
3217
|
-
}, children: /* @__PURE__ */ t(
|
|
3218
|
-
Jt,
|
|
3248
|
+
),
|
|
3249
|
+
(l == null ? void 0 : l.status) !== 2 && /* @__PURE__ */ t(
|
|
3250
|
+
"div",
|
|
3219
3251
|
{
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3252
|
+
onClick: (h) => {
|
|
3253
|
+
h.stopPropagation();
|
|
3254
|
+
},
|
|
3255
|
+
children: /* @__PURE__ */ t(
|
|
3256
|
+
Jt,
|
|
3257
|
+
{
|
|
3258
|
+
id: r,
|
|
3259
|
+
nameRequiredTask: l.nameRequiredTask,
|
|
3260
|
+
status: l.status,
|
|
3261
|
+
statusRequiredTask: l.statusRequiredTask,
|
|
3262
|
+
projectID: (p = i == null ? void 0 : i.data) == null ? void 0 : p.id,
|
|
3263
|
+
atrasoId: (v = l == null ? void 0 : l.atraso) == null ? void 0 : v.atrasoId,
|
|
3264
|
+
categoria: l == null ? void 0 : l.categoria
|
|
3265
|
+
}
|
|
3266
|
+
)
|
|
3227
3267
|
}
|
|
3228
|
-
)
|
|
3268
|
+
)
|
|
3229
3269
|
] })
|
|
3230
3270
|
]
|
|
3231
3271
|
}
|
|
@@ -3233,14 +3273,14 @@ const dr = () => {
|
|
|
3233
3273
|
/* @__PURE__ */ t(Gt, { taskId: r, isOpen: a, setIsOpen: n })
|
|
3234
3274
|
] });
|
|
3235
3275
|
}, le = ({ id: r }) => {
|
|
3236
|
-
var d, l, g,
|
|
3276
|
+
var d, l, g, m, b, _;
|
|
3237
3277
|
const { tasksProject: e, openTasks: s, openTask: a } = it(), n = (d = e == null ? void 0 : e.data) == null ? void 0 : d.find((u) => u.id === r), o = (() => {
|
|
3238
3278
|
var v;
|
|
3239
|
-
const u = e == null ? void 0 : e.data,
|
|
3279
|
+
const u = e == null ? void 0 : e.data, p = [];
|
|
3240
3280
|
return (v = n == null ? void 0 : n.tasks) == null || v.forEach((h) => {
|
|
3241
3281
|
const C = u.find((f) => f.id === (h == null ? void 0 : h.id));
|
|
3242
|
-
C &&
|
|
3243
|
-
}),
|
|
3282
|
+
C && p.push(C);
|
|
3283
|
+
}), p;
|
|
3244
3284
|
})();
|
|
3245
3285
|
return n ? /* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-gap-m tw-mb-2 tw-overflow-y-auto", children: [
|
|
3246
3286
|
/* @__PURE__ */ c(
|
|
@@ -3271,73 +3311,73 @@ const dr = () => {
|
|
|
3271
3311
|
/* @__PURE__ */ t(ae, { startDate: n == null ? void 0 : n.startDate, endDate: n == null ? void 0 : n.endDate }),
|
|
3272
3312
|
/* @__PURE__ */ c("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: [
|
|
3273
3313
|
/* @__PURE__ */ t(F, { icon: "subtasks", size: "xs", strokeWidth: 5, color: x.texts.subtext }),
|
|
3274
|
-
/* @__PURE__ */ t("p", { className: "tw-text-xl", children: ((g = n == null ? void 0 : n.tasks) == null ? void 0 : g.length) === 0 ? 1 : (
|
|
3314
|
+
/* @__PURE__ */ t("p", { className: "tw-text-xl", children: ((g = n == null ? void 0 : n.tasks) == null ? void 0 : g.length) === 0 ? 1 : (m = n == null ? void 0 : n.tasks) == null ? void 0 : m.length })
|
|
3275
3315
|
] })
|
|
3276
3316
|
]
|
|
3277
3317
|
}
|
|
3278
3318
|
),
|
|
3279
|
-
s.includes(r) && /* @__PURE__ */ t("div", { className: "tw-ml-[30px]", children: ((b = n == null ? void 0 : n.tasks) == null ? void 0 : b.length) > 0 ? (_ = n == null ? void 0 : n.tasks) == null ? void 0 : _.map((u) => /* @__PURE__ */ t(le, { id: u == null ? void 0 : u.id })) : /* @__PURE__ */ t(
|
|
3319
|
+
s.includes(r) && /* @__PURE__ */ t("div", { className: "tw-ml-[30px]", children: ((b = n == null ? void 0 : n.tasks) == null ? void 0 : b.length) > 0 ? (_ = n == null ? void 0 : n.tasks) == null ? void 0 : _.map((u) => /* @__PURE__ */ t(le, { id: u == null ? void 0 : u.id })) : /* @__PURE__ */ t(fr, { id: n == null ? void 0 : n.id }) })
|
|
3280
3320
|
] }) : null;
|
|
3281
|
-
},
|
|
3321
|
+
}, br = () => {
|
|
3282
3322
|
var a;
|
|
3283
3323
|
const { tasksProject: r, projectID: e } = it();
|
|
3284
3324
|
if (r != null && r.isFetching || r != null && r.isLoading) return /* @__PURE__ */ t(re, {});
|
|
3285
3325
|
let s = [...(a = r == null ? void 0 : r.data) == null ? void 0 : a.filter((n) => n.isPrincipalTask)];
|
|
3286
|
-
return /* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-m", children: /* @__PURE__ */ t(
|
|
3287
|
-
},
|
|
3326
|
+
return /* @__PURE__ */ t("div", { className: "tw-flex tw-flex-col tw-gap-m", children: /* @__PURE__ */ t(gr, { project: e, children: s == null ? void 0 : s.sort((n, i) => n.orden - i.orden).map((n) => /* @__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(le, { id: n.id }) })) }) });
|
|
3327
|
+
}, yr = ({
|
|
3288
3328
|
setPath: r,
|
|
3289
3329
|
setProject: e
|
|
3290
3330
|
}) => {
|
|
3291
|
-
const [s, a] = y([]), [n, i] = y(!0), [o, d] = y(0), [l, g] = y(10), [
|
|
3292
|
-
var
|
|
3331
|
+
const [s, a] = y([]), [n, i] = y(!0), [o, d] = y(0), [l, g] = y(10), [m, b] = y(0), [_, u] = y("nombre"), { filters: p, defineFields: v } = V(), { tasks_api: h, getImageOBP: C } = B(), { user: f } = Y(), P = async (w, S) => {
|
|
3332
|
+
var E, z, Q;
|
|
3293
3333
|
try {
|
|
3294
3334
|
i(!0);
|
|
3295
|
-
const
|
|
3335
|
+
const L = {
|
|
3296
3336
|
filters: {
|
|
3297
|
-
search: (
|
|
3337
|
+
search: (p == null ? void 0 : p.search) ?? "",
|
|
3298
3338
|
responsable: {
|
|
3299
3339
|
idUser: f.id,
|
|
3300
|
-
responsableType: (
|
|
3340
|
+
responsableType: (E = p == null ? void 0 : p.responsable) == null ? void 0 : E.responsableType
|
|
3301
3341
|
},
|
|
3302
|
-
ejecutivo: (
|
|
3342
|
+
ejecutivo: (p == null ? void 0 : p.ejecutivo) ?? ""
|
|
3303
3343
|
}
|
|
3304
|
-
},
|
|
3344
|
+
}, D = await h.get("/api/listado_campanias", {
|
|
3305
3345
|
params: {
|
|
3306
3346
|
pagination: {
|
|
3307
3347
|
page: w,
|
|
3308
3348
|
pageSize: S
|
|
3309
3349
|
},
|
|
3310
3350
|
orderBy: _,
|
|
3311
|
-
...
|
|
3351
|
+
...L
|
|
3312
3352
|
}
|
|
3313
|
-
}), U = X(
|
|
3314
|
-
a(U), b((
|
|
3315
|
-
} catch (
|
|
3316
|
-
console.error("Error fetching data en Lista Campaña:",
|
|
3353
|
+
}), U = X(D == null ? void 0 : D.data);
|
|
3354
|
+
a(U), b((Q = (z = D == null ? void 0 : D.data) == null ? void 0 : z.meta) == null ? void 0 : Q.total);
|
|
3355
|
+
} catch (L) {
|
|
3356
|
+
console.error("Error fetching data en Lista Campaña:", L);
|
|
3317
3357
|
} finally {
|
|
3318
3358
|
i(!1);
|
|
3319
3359
|
}
|
|
3320
|
-
},
|
|
3360
|
+
}, j = async () => {
|
|
3321
3361
|
try {
|
|
3322
3362
|
const w = await h.get("/api/obtener-comerciales");
|
|
3323
|
-
return [...Mt].map((
|
|
3324
|
-
id:
|
|
3325
|
-
name:
|
|
3326
|
-
}))),
|
|
3363
|
+
return [...Mt].map((E) => (E.id === "ejecutivo" && (E.options = w.data.map((z) => ({
|
|
3364
|
+
id: z.nombre,
|
|
3365
|
+
name: z.nombre
|
|
3366
|
+
}))), E));
|
|
3327
3367
|
} catch (w) {
|
|
3328
3368
|
return console.error("Error fetching salesman data:", w), [...Mt];
|
|
3329
3369
|
}
|
|
3330
3370
|
};
|
|
3331
3371
|
A(() => {
|
|
3332
3372
|
(async () => {
|
|
3333
|
-
const S = await
|
|
3373
|
+
const S = await j();
|
|
3334
3374
|
v(S);
|
|
3335
3375
|
})();
|
|
3336
3376
|
}, []), A(() => {
|
|
3337
3377
|
const w = Math.floor(o / l) + 1;
|
|
3338
|
-
|
|
3339
|
-
}, [o, l, _,
|
|
3340
|
-
const
|
|
3378
|
+
P(w, l);
|
|
3379
|
+
}, [o, l, _, p]);
|
|
3380
|
+
const k = (w) => {
|
|
3341
3381
|
d(w.first), g(w.rows);
|
|
3342
3382
|
}, M = [
|
|
3343
3383
|
{ label: "5 filas", value: 5 },
|
|
@@ -3348,10 +3388,10 @@ const dr = () => {
|
|
|
3348
3388
|
{ label: "50 filas", value: 50 }
|
|
3349
3389
|
], q = (w) => {
|
|
3350
3390
|
const S = parseInt(w.target.value, 10);
|
|
3351
|
-
g(S),
|
|
3352
|
-
},
|
|
3391
|
+
g(S), k({ first: 0, rows: S });
|
|
3392
|
+
}, K = (w) => {
|
|
3353
3393
|
u((S) => S === w ? `${w}:desc` : w);
|
|
3354
|
-
}, N = (w) => _ === w ? "↑↓" : _ === `${w}:desc` ? "↓↑" : "↑↓",
|
|
3394
|
+
}, N = (w) => _ === w ? "↑↓" : _ === `${w}:desc` ? "↓↑" : "↑↓", T = (w) => ({
|
|
3355
3395
|
padding: "auto",
|
|
3356
3396
|
backgroundColor: x.silver.silver_light,
|
|
3357
3397
|
borderRadius: "50%",
|
|
@@ -3377,7 +3417,7 @@ const dr = () => {
|
|
|
3377
3417
|
flexDirection: "column",
|
|
3378
3418
|
height: "100%"
|
|
3379
3419
|
},
|
|
3380
|
-
children: n ? /* @__PURE__ */ t("div", { className: "tw-w-full", children: /* @__PURE__ */ t(re, {}) }) : /* @__PURE__ */ t(
|
|
3420
|
+
children: n ? /* @__PURE__ */ t("div", { className: "tw-w-full", children: /* @__PURE__ */ t(re, {}) }) : /* @__PURE__ */ t(I, { children: /* @__PURE__ */ c("div", { className: "tw-flex tw-flex-col tw-h-full", children: [
|
|
3381
3421
|
/* @__PURE__ */ t("div", { className: "tw-flex-1 tw-overflow-auto", children: /* @__PURE__ */ c(
|
|
3382
3422
|
"table",
|
|
3383
3423
|
{
|
|
@@ -3398,71 +3438,69 @@ const dr = () => {
|
|
|
3398
3438
|
/* @__PURE__ */ t(
|
|
3399
3439
|
"th",
|
|
3400
3440
|
{
|
|
3401
|
-
onClick: () =>
|
|
3441
|
+
onClick: () => K("nombre"),
|
|
3402
3442
|
style: {
|
|
3403
3443
|
color: x.gray.gray_dark,
|
|
3404
3444
|
textAlign: "left"
|
|
3405
3445
|
},
|
|
3406
|
-
children: /* @__PURE__ */ c(
|
|
3407
|
-
|
|
3408
|
-
"label",
|
|
3409
|
-
{
|
|
3410
|
-
className: "tw-text-s",
|
|
3411
|
-
style: {
|
|
3412
|
-
color: x.gray.gray_dark
|
|
3413
|
-
},
|
|
3414
|
-
children: N("nombre")
|
|
3415
|
-
}
|
|
3416
|
-
),
|
|
3417
|
-
"Campaña"
|
|
3418
|
-
] })
|
|
3419
|
-
}
|
|
3420
|
-
),
|
|
3421
|
-
/* @__PURE__ */ t(
|
|
3422
|
-
"th",
|
|
3423
|
-
{
|
|
3424
|
-
onClick: () => I("inicia"),
|
|
3425
|
-
className: "tw-whitespace-nowrap",
|
|
3426
|
-
style: {
|
|
3427
|
-
color: x.gray.gray_dark,
|
|
3428
|
-
textAlign: "left"
|
|
3429
|
-
},
|
|
3430
|
-
children: /* @__PURE__ */ t("div", { className: "tw-flex tw-items-center tw-w-fit tw-space-x-1", children: /* @__PURE__ */ c(
|
|
3431
|
-
"label",
|
|
3446
|
+
children: /* @__PURE__ */ c(
|
|
3447
|
+
"div",
|
|
3432
3448
|
{
|
|
3433
|
-
className: "tw-
|
|
3434
|
-
style: {
|
|
3435
|
-
color: x.gray.gray_dark
|
|
3436
|
-
},
|
|
3449
|
+
className: "tw-flex tw-items-center tw-w-fit tw-space-x-1",
|
|
3450
|
+
style: { display: "flex", alignItems: "center" },
|
|
3437
3451
|
children: [
|
|
3438
|
-
N("inicia"),
|
|
3439
3452
|
/* @__PURE__ */ t(
|
|
3440
|
-
|
|
3441
|
-
{
|
|
3442
|
-
icon: "calendar",
|
|
3443
|
-
size: "xs",
|
|
3444
|
-
strokeWidth: 5,
|
|
3445
|
-
color: x.gray.gray_dark
|
|
3446
|
-
}
|
|
3447
|
-
),
|
|
3448
|
-
/* @__PURE__ */ t(
|
|
3449
|
-
"span",
|
|
3453
|
+
"label",
|
|
3450
3454
|
{
|
|
3455
|
+
className: "tw-text-s",
|
|
3451
3456
|
style: {
|
|
3452
3457
|
color: x.gray.gray_dark
|
|
3453
3458
|
},
|
|
3454
|
-
children: "
|
|
3459
|
+
children: N("nombre")
|
|
3455
3460
|
}
|
|
3456
|
-
)
|
|
3461
|
+
),
|
|
3462
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-normal tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-align-middle", children: "Campaña" })
|
|
3457
3463
|
]
|
|
3458
3464
|
}
|
|
3459
|
-
)
|
|
3465
|
+
)
|
|
3466
|
+
}
|
|
3467
|
+
),
|
|
3468
|
+
/* @__PURE__ */ t(
|
|
3469
|
+
"th",
|
|
3470
|
+
{
|
|
3471
|
+
onClick: () => K("inicia"),
|
|
3472
|
+
className: "tw-whitespace-nowrap",
|
|
3473
|
+
style: {
|
|
3474
|
+
color: x.gray.gray_dark,
|
|
3475
|
+
textAlign: "left"
|
|
3476
|
+
},
|
|
3477
|
+
children: /* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-w-fit tw-space-x-1", children: [
|
|
3478
|
+
/* @__PURE__ */ t("label", { style: { color: x.gray.gray_dark }, children: N("inicia") }),
|
|
3479
|
+
/* @__PURE__ */ t(
|
|
3480
|
+
F,
|
|
3481
|
+
{
|
|
3482
|
+
icon: "calendar",
|
|
3483
|
+
size: "xs",
|
|
3484
|
+
strokeWidth: 5,
|
|
3485
|
+
color: x.gray.gray_dark,
|
|
3486
|
+
className: "tw-mt-1 tw-w-[15px] tw-h-[15px]"
|
|
3487
|
+
}
|
|
3488
|
+
),
|
|
3489
|
+
/* @__PURE__ */ t(
|
|
3490
|
+
"span",
|
|
3491
|
+
{
|
|
3492
|
+
style: { color: x.gray.gray_dark },
|
|
3493
|
+
className: "tw-font-sans tw-font-normal tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-align-middle",
|
|
3494
|
+
children: "Fecha Inicio"
|
|
3495
|
+
}
|
|
3496
|
+
)
|
|
3497
|
+
] })
|
|
3460
3498
|
}
|
|
3461
3499
|
),
|
|
3462
3500
|
/* @__PURE__ */ t(
|
|
3463
3501
|
"th",
|
|
3464
3502
|
{
|
|
3465
|
-
onClick: () =>
|
|
3503
|
+
onClick: () => K("termina"),
|
|
3466
3504
|
className: "tw-whitespace-nowrap",
|
|
3467
3505
|
style: {
|
|
3468
3506
|
color: x.gray.gray_dark,
|
|
@@ -3473,8 +3511,7 @@ const dr = () => {
|
|
|
3473
3511
|
"label",
|
|
3474
3512
|
{
|
|
3475
3513
|
style: {
|
|
3476
|
-
color: "#C4C4C4"
|
|
3477
|
-
fontSize: "10px"
|
|
3514
|
+
color: "#C4C4C4"
|
|
3478
3515
|
},
|
|
3479
3516
|
children: N("termina")
|
|
3480
3517
|
}
|
|
@@ -3485,48 +3522,49 @@ const dr = () => {
|
|
|
3485
3522
|
icon: "calendar",
|
|
3486
3523
|
size: "xs",
|
|
3487
3524
|
strokeWidth: 5,
|
|
3488
|
-
color: x.gray.gray_dark
|
|
3525
|
+
color: x.gray.gray_dark,
|
|
3526
|
+
className: "tw-mt-1 tw-w-[15px] tw-h-[15px]"
|
|
3489
3527
|
}
|
|
3490
3528
|
),
|
|
3491
|
-
/* @__PURE__ */ t("span", { children: "Fecha Fin" })
|
|
3529
|
+
/* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-normal tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal tw-align-middle", children: "Fecha Fin" })
|
|
3492
3530
|
] })
|
|
3493
3531
|
}
|
|
3494
3532
|
),
|
|
3495
3533
|
/* @__PURE__ */ t(
|
|
3496
3534
|
"th",
|
|
3497
3535
|
{
|
|
3536
|
+
className: "tw-whitespace-nowrap tw-text-center align-middle",
|
|
3498
3537
|
style: {
|
|
3499
|
-
color: x.gray.gray_dark
|
|
3500
|
-
textAlign: "left"
|
|
3538
|
+
color: x.gray.gray_dark
|
|
3501
3539
|
},
|
|
3502
|
-
children: "Status"
|
|
3540
|
+
children: /* @__PURE__ */ t("div", { className: "tw-inline-flex tw-items-center tw-justify-center tw-w-full", children: /* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-normal tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal", children: "Status de campaña" }) })
|
|
3503
3541
|
}
|
|
3504
3542
|
),
|
|
3505
3543
|
/* @__PURE__ */ t(
|
|
3506
3544
|
"th",
|
|
3507
3545
|
{
|
|
3546
|
+
className: "tw-whitespace-nowrap tw-text-center align-middle",
|
|
3508
3547
|
style: {
|
|
3509
|
-
color: x.gray.gray_dark
|
|
3510
|
-
textAlign: "left"
|
|
3548
|
+
color: x.gray.gray_dark
|
|
3511
3549
|
},
|
|
3512
|
-
children: "Progreso de Ejecución"
|
|
3550
|
+
children: /* @__PURE__ */ t("div", { className: "tw-inline-flex tw-items-center tw-justify-center tw-w-full", children: /* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-normal tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal", children: "Progreso de Ejecución" }) })
|
|
3513
3551
|
}
|
|
3514
3552
|
),
|
|
3515
3553
|
/* @__PURE__ */ t(
|
|
3516
3554
|
"th",
|
|
3517
3555
|
{
|
|
3556
|
+
className: "tw-whitespace-nowrap tw-text-center align-middle",
|
|
3518
3557
|
style: {
|
|
3519
|
-
color: x.gray.gray_dark
|
|
3520
|
-
textAlign: "left"
|
|
3558
|
+
color: x.gray.gray_dark
|
|
3521
3559
|
},
|
|
3522
|
-
children: "Responsable"
|
|
3560
|
+
children: /* @__PURE__ */ t("div", { className: "tw-inline-flex tw-items-center tw-justify-center tw-w-full", children: /* @__PURE__ */ t("span", { className: "tw-font-sans tw-font-normal tw-text-[1.4rem] tw-leading-[100%] tw-tracking-normal", children: "Responsable" }) })
|
|
3523
3561
|
}
|
|
3524
3562
|
)
|
|
3525
3563
|
]
|
|
3526
3564
|
}
|
|
3527
3565
|
) }),
|
|
3528
3566
|
/* @__PURE__ */ t("tbody", { children: s == null ? void 0 : s.map((w, S) => {
|
|
3529
|
-
var
|
|
3567
|
+
var E, z, Q, L, D, U, R, O, $, W, tt, et, ct, G, rt, kt, Tt, Ft;
|
|
3530
3568
|
return /* @__PURE__ */ c(
|
|
3531
3569
|
"tr",
|
|
3532
3570
|
{
|
|
@@ -3534,7 +3572,7 @@ const dr = () => {
|
|
|
3534
3572
|
background: S % 2 === 0 ? "#F5F5F5" : "#FAFAFA",
|
|
3535
3573
|
transition: "background-color 0.2s ease"
|
|
3536
3574
|
},
|
|
3537
|
-
className: "tw-cursor-pointer",
|
|
3575
|
+
className: "tw-cursor-pointer ",
|
|
3538
3576
|
onClick: () => {
|
|
3539
3577
|
e({
|
|
3540
3578
|
id: w == null ? void 0 : w.id,
|
|
@@ -3548,9 +3586,9 @@ const dr = () => {
|
|
|
3548
3586
|
gt.currentTarget.style.backgroundColor = S % 2 === 0 ? "#F5F5F5" : "#FAFAFA";
|
|
3549
3587
|
},
|
|
3550
3588
|
children: [
|
|
3551
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (
|
|
3552
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (
|
|
3553
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (
|
|
3589
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (E = w == null ? void 0 : w.campania) == null ? void 0 : E.nombre }),
|
|
3590
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (z = w == null ? void 0 : w.campania) == null ? void 0 : z.inicia }),
|
|
3591
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s", children: (Q = w == null ? void 0 : w.campania) == null ? void 0 : Q.termina }),
|
|
3554
3592
|
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */ c(
|
|
3555
3593
|
"div",
|
|
3556
3594
|
{
|
|
@@ -3576,7 +3614,8 @@ const dr = () => {
|
|
|
3576
3614
|
flex: 1,
|
|
3577
3615
|
backgroundColor: x.gray.gray_dark,
|
|
3578
3616
|
borderRadius: "10px",
|
|
3579
|
-
overflow: "hidden"
|
|
3617
|
+
overflow: "hidden",
|
|
3618
|
+
maxWidth: "140px"
|
|
3580
3619
|
},
|
|
3581
3620
|
children: /* @__PURE__ */ t(
|
|
3582
3621
|
"div",
|
|
@@ -3617,13 +3656,15 @@ const dr = () => {
|
|
|
3617
3656
|
/* @__PURE__ */ t(
|
|
3618
3657
|
"div",
|
|
3619
3658
|
{
|
|
3659
|
+
className: "tw-inline-flex tw-items-center tw-justify-center tw-w-full",
|
|
3620
3660
|
style: {
|
|
3621
3661
|
position: "relative",
|
|
3622
3662
|
height: "10px",
|
|
3623
3663
|
flex: 1,
|
|
3624
3664
|
backgroundColor: x.gray.gray_dark,
|
|
3625
3665
|
borderRadius: "10px",
|
|
3626
|
-
overflow: "hidden"
|
|
3666
|
+
overflow: "hidden",
|
|
3667
|
+
maxWidth: "180px"
|
|
3627
3668
|
},
|
|
3628
3669
|
children: /* @__PURE__ */ t(
|
|
3629
3670
|
"div",
|
|
@@ -3645,19 +3686,19 @@ const dr = () => {
|
|
|
3645
3686
|
]
|
|
3646
3687
|
}
|
|
3647
3688
|
) }),
|
|
3648
|
-
/* @__PURE__ */ t("td", { className: "tw-text-s", children: /* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-justify-center tw-text-s", children: [
|
|
3689
|
+
/* @__PURE__ */ t("td", { className: "tw-text-s tw-pt-[1.2rem] tw-pb-[1.2rem]", children: /* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-justify-center tw-text-s", children: [
|
|
3649
3690
|
/* @__PURE__ */ t(
|
|
3650
3691
|
J,
|
|
3651
3692
|
{
|
|
3652
|
-
imageUrl: (
|
|
3693
|
+
imageUrl: (O = (R = (U = (D = (L = w == null ? void 0 : w.campania) == null ? void 0 : L.responsable) == null ? void 0 : D.imagen) == null ? void 0 : U.formats) == null ? void 0 : R.thumbnail) != null && O.url ? C(
|
|
3653
3694
|
(ct = (et = (tt = (W = ($ = w == null ? void 0 : w.campania) == null ? void 0 : $.responsable) == null ? void 0 : W.imagen) == null ? void 0 : tt.formats) == null ? void 0 : et.thumbnail) == null ? void 0 : ct.url
|
|
3654
3695
|
) : "",
|
|
3655
|
-
alt: (
|
|
3696
|
+
alt: (kt = (rt = (G = w == null ? void 0 : w.campania) == null ? void 0 : G.responsable) == null ? void 0 : rt.nombre) == null ? void 0 : kt.charAt(
|
|
3656
3697
|
0
|
|
3657
3698
|
)
|
|
3658
3699
|
}
|
|
3659
3700
|
),
|
|
3660
|
-
/* @__PURE__ */ t("span", { className: "tw-ml-4 tw-text-s", children: (Ft = (
|
|
3701
|
+
/* @__PURE__ */ t("span", { className: "tw-ml-4 tw-text-s", children: (Ft = (Tt = w == null ? void 0 : w.campania) == null ? void 0 : Tt.responsable) == null ? void 0 : Ft.nombre })
|
|
3661
3702
|
] }) })
|
|
3662
3703
|
]
|
|
3663
3704
|
},
|
|
@@ -3677,11 +3718,11 @@ const dr = () => {
|
|
|
3677
3718
|
justifyContent: "flex-start",
|
|
3678
3719
|
color: x.black.black_dark
|
|
3679
3720
|
},
|
|
3680
|
-
className: "tw-text-
|
|
3721
|
+
className: "tw-whitespace-nowrap tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-none tw-tracking-normal tw-text-[#696E79]",
|
|
3681
3722
|
children: [
|
|
3682
3723
|
s.length,
|
|
3683
3724
|
" elementos de ",
|
|
3684
|
-
|
|
3725
|
+
m
|
|
3685
3726
|
]
|
|
3686
3727
|
}
|
|
3687
3728
|
),
|
|
@@ -3690,9 +3731,9 @@ const dr = () => {
|
|
|
3690
3731
|
{
|
|
3691
3732
|
first: o,
|
|
3692
3733
|
rows: l,
|
|
3693
|
-
totalRecords:
|
|
3734
|
+
totalRecords: m,
|
|
3694
3735
|
rowsPerPageOptions: [5, 10, 20, 50],
|
|
3695
|
-
onPageChange:
|
|
3736
|
+
onPageChange: k,
|
|
3696
3737
|
className: "tw-flex tw-justify-center tw-items-center tw-w-full tw-p-2 tw-gap-1 tw-rounded-lg",
|
|
3697
3738
|
style: {
|
|
3698
3739
|
display: "flex",
|
|
@@ -3710,7 +3751,7 @@ const dr = () => {
|
|
|
3710
3751
|
{
|
|
3711
3752
|
onClick: w.onClick,
|
|
3712
3753
|
disabled: w.disabled,
|
|
3713
|
-
style:
|
|
3754
|
+
style: T(w.disabled),
|
|
3714
3755
|
className: "tw-flex tw-items-center tw-justify-center tw-text-s",
|
|
3715
3756
|
children: "<<"
|
|
3716
3757
|
}
|
|
@@ -3720,7 +3761,7 @@ const dr = () => {
|
|
|
3720
3761
|
{
|
|
3721
3762
|
onClick: w.onClick,
|
|
3722
3763
|
disabled: w.disabled,
|
|
3723
|
-
style:
|
|
3764
|
+
style: T(w.disabled),
|
|
3724
3765
|
className: "tw-text-s",
|
|
3725
3766
|
children: "<"
|
|
3726
3767
|
}
|
|
@@ -3730,7 +3771,7 @@ const dr = () => {
|
|
|
3730
3771
|
{
|
|
3731
3772
|
onClick: w.onClick,
|
|
3732
3773
|
disabled: w.disabled,
|
|
3733
|
-
style:
|
|
3774
|
+
style: T(w.disabled),
|
|
3734
3775
|
className: "tw-text-s",
|
|
3735
3776
|
children: ">"
|
|
3736
3777
|
}
|
|
@@ -3740,7 +3781,7 @@ const dr = () => {
|
|
|
3740
3781
|
{
|
|
3741
3782
|
onClick: w.onClick,
|
|
3742
3783
|
disabled: w.disabled,
|
|
3743
|
-
style:
|
|
3784
|
+
style: T(w.disabled),
|
|
3744
3785
|
className: "tw-text-s",
|
|
3745
3786
|
children: ">>"
|
|
3746
3787
|
}
|
|
@@ -3751,7 +3792,7 @@ const dr = () => {
|
|
|
3751
3792
|
onClick: (S) => w.onClick(S),
|
|
3752
3793
|
className: `tw-flex tw-items-center tw-justify-center tw-text-s ${w.className.includes("p-highlight") ? "highlighted" : ""}`,
|
|
3753
3794
|
style: {
|
|
3754
|
-
...
|
|
3795
|
+
...T(!1),
|
|
3755
3796
|
backgroundColor: w.className.includes(
|
|
3756
3797
|
"p-highlight"
|
|
3757
3798
|
) ? "#E1EBF9" : x.silver.silver_light,
|
|
@@ -3764,7 +3805,7 @@ const dr = () => {
|
|
|
3764
3805
|
}
|
|
3765
3806
|
),
|
|
3766
3807
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-gap-2", children: [
|
|
3767
|
-
/* @__PURE__ */ t("span", { className: "tw-text-
|
|
3808
|
+
/* @__PURE__ */ t("span", { className: "tw-whitespace-nowrap tw-font-sans tw-font-semibold tw-text-[1.4rem] tw-leading-none tw-tracking-normal tw-text-[#696E79]", children: "Filas por página:" }),
|
|
3768
3809
|
/* @__PURE__ */ t(
|
|
3769
3810
|
"select",
|
|
3770
3811
|
{
|
|
@@ -3775,6 +3816,7 @@ const dr = () => {
|
|
|
3775
3816
|
border: `1px solid ${x.gray.gray_dark}`,
|
|
3776
3817
|
borderRadius: "4px"
|
|
3777
3818
|
},
|
|
3819
|
+
className: "tw-whitespace-nowrap tw-font-sans tw-font-[400] tw-text-[1.4rem] tw-leading-none tw-tracking-normal tw-text-[#696E79]",
|
|
3778
3820
|
value: l,
|
|
3779
3821
|
onChange: (w) => q(w),
|
|
3780
3822
|
children: M.map((w) => /* @__PURE__ */ t(
|
|
@@ -3794,21 +3836,21 @@ const dr = () => {
|
|
|
3794
3836
|
] }) })
|
|
3795
3837
|
}
|
|
3796
3838
|
);
|
|
3797
|
-
},
|
|
3839
|
+
}, vr = ({ path: r, tab: e, setPath: s, project: a, setProject: n }) => {
|
|
3798
3840
|
const i = {
|
|
3799
3841
|
"kanban-general": { kanban: /* @__PURE__ */ t(pr, {}) },
|
|
3800
3842
|
"lista-campanias": {
|
|
3801
|
-
lista: /* @__PURE__ */ t(
|
|
3843
|
+
lista: /* @__PURE__ */ t(yr, { setPath: s, setProject: n }),
|
|
3802
3844
|
gantt: /* @__PURE__ */ t("div", { children: "gantt-campanias" })
|
|
3803
3845
|
},
|
|
3804
3846
|
"kanban-campania": {
|
|
3805
|
-
kanban: /* @__PURE__ */ t(
|
|
3806
|
-
lista: /* @__PURE__ */ t(
|
|
3847
|
+
kanban: /* @__PURE__ */ t(lr, {}),
|
|
3848
|
+
lista: /* @__PURE__ */ t(br, {}),
|
|
3807
3849
|
gantt: /* @__PURE__ */ t("div", { children: "kanban-campania-gantt" })
|
|
3808
3850
|
}
|
|
3809
3851
|
};
|
|
3810
3852
|
return r === "kanban-campania" ? /* @__PURE__ */ t(Ut, { project: a == null ? void 0 : a.id, children: i[r][e] }) : i[r][e];
|
|
3811
|
-
},
|
|
3853
|
+
}, Nr = ({ label: r, active: e, onClick: s, disabled: a }) => a ? /* @__PURE__ */ t(
|
|
3812
3854
|
H,
|
|
3813
3855
|
{
|
|
3814
3856
|
dispatch: /* @__PURE__ */ t("button", { className: "tw-text-texts-placeholder tw-text-xl tw-font-semibold tw-cursor-help", children: r }),
|
|
@@ -3819,10 +3861,10 @@ const dr = () => {
|
|
|
3819
3861
|
{
|
|
3820
3862
|
disabled: a,
|
|
3821
3863
|
onClick: s,
|
|
3822
|
-
className: `${e ? "tw-text-texts-enfasis tw-border-b-2 tw-border-texts-enfasis" : ""} tw-text-xl tw-font-semibold ${a ? "tw-cursor-not-allowed tw-text-texts-placeholder tw-text-lg" : "tw-text-texts-subtext"}`,
|
|
3864
|
+
className: `${e ? "tw-text-texts-enfasis tw-border-b-2 tw-border-texts-enfasis tw-text-blue-600" : ""} tw-text-xl tw-font-semibold ${a ? "tw-cursor-not-allowed tw-text-texts-placeholder tw-text-lg" : "tw-text-texts-subtext"}`,
|
|
3823
3865
|
children: r
|
|
3824
3866
|
}
|
|
3825
|
-
),
|
|
3867
|
+
), _r = ({ tabs: r, renderItem: e, initialTab: s }) => {
|
|
3826
3868
|
const [a, n] = y(s ?? r[0].toLowerCase());
|
|
3827
3869
|
A(() => {
|
|
3828
3870
|
s && n(s);
|
|
@@ -3835,7 +3877,7 @@ const dr = () => {
|
|
|
3835
3877
|
{
|
|
3836
3878
|
className: `${d === 0 ? "tw-border-l-2" : ""} tw-border-r-2 tw-border-gray-200 tw-px-m`,
|
|
3837
3879
|
children: /* @__PURE__ */ t(
|
|
3838
|
-
|
|
3880
|
+
Nr,
|
|
3839
3881
|
{
|
|
3840
3882
|
onClick: () => i(o.toLowerCase()),
|
|
3841
3883
|
label: o,
|
|
@@ -3847,7 +3889,7 @@ const dr = () => {
|
|
|
3847
3889
|
}
|
|
3848
3890
|
)) });
|
|
3849
3891
|
};
|
|
3850
|
-
function
|
|
3892
|
+
function Cr() {
|
|
3851
3893
|
const { toast: r } = yt();
|
|
3852
3894
|
return r.message ? /* @__PURE__ */ t(
|
|
3853
3895
|
"div",
|
|
@@ -3881,22 +3923,22 @@ function _r() {
|
|
|
3881
3923
|
}
|
|
3882
3924
|
) : null;
|
|
3883
3925
|
}
|
|
3884
|
-
const
|
|
3926
|
+
const kr = ({ path: r }) => /* @__PURE__ */ t(je, { children: /* @__PURE__ */ c(Le, { children: [
|
|
3885
3927
|
/* @__PURE__ */ t(() => {
|
|
3886
|
-
const { selectPath: s, updateFilters: a, applyFilters: n, filters: i } = V(), [o, d] = y("kanban"), [l, g] = y(r), [
|
|
3928
|
+
const { selectPath: s, updateFilters: a, applyFilters: n, filters: i } = V(), [o, d] = y("kanban"), [l, g] = y(r), [m, b] = y({
|
|
3887
3929
|
id: 1704,
|
|
3888
3930
|
project: "Kanban de Campania"
|
|
3889
3931
|
}), [_, u] = y([
|
|
3890
3932
|
{ path: "lista-campanias", search: (i == null ? void 0 : i.search) ?? "" },
|
|
3891
3933
|
{ path: "kanban-campania", search: (i == null ? void 0 : i.taskName) ?? "" },
|
|
3892
3934
|
{ path: "kanban-general", search: (i == null ? void 0 : i.taskName) ?? "" }
|
|
3893
|
-
]), [
|
|
3935
|
+
]), [p, v] = y(), h = Z(null);
|
|
3894
3936
|
A(() => {
|
|
3895
3937
|
var q;
|
|
3896
|
-
d(l === "lista-campanias" ? "lista" : "kanban"), s(l), v(((q = _.find((
|
|
3938
|
+
d(l === "lista-campanias" ? "lista" : "kanban"), s(l), v(((q = _.find((K) => K.path === l)) == null ? void 0 : q.search) ?? "");
|
|
3897
3939
|
}, [r, l]), A(() => {
|
|
3898
3940
|
var q;
|
|
3899
|
-
((q =
|
|
3941
|
+
((q = k()) == null ? void 0 : q.trim()) === "" && a({
|
|
3900
3942
|
name: l === "lista-campanias" ? "search" : "taskName",
|
|
3901
3943
|
value: null
|
|
3902
3944
|
}), n();
|
|
@@ -3904,31 +3946,31 @@ const Cr = ({ path: r }) => /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ c(
|
|
|
3904
3946
|
const C = (q) => ({
|
|
3905
3947
|
"kanban-general": "Kanban General",
|
|
3906
3948
|
"lista-campanias": "Campanias",
|
|
3907
|
-
"kanban-campania": `Kanban de ${
|
|
3949
|
+
"kanban-campania": `Kanban de ${m.project}`
|
|
3908
3950
|
})[q], f = (q) => {
|
|
3909
3951
|
g(q);
|
|
3910
|
-
},
|
|
3952
|
+
}, P = ["lista-campanias", "kanban-campania"], j = {
|
|
3911
3953
|
"lista-campanias": ["lista", "gantt"],
|
|
3912
3954
|
"kanban-campania": ["kanban", "lista", "gantt"]
|
|
3913
|
-
},
|
|
3955
|
+
}, k = () => {
|
|
3914
3956
|
var q;
|
|
3915
|
-
return ((q = _.find((
|
|
3957
|
+
return ((q = _.find((K) => K.path === l)) == null ? void 0 : q.search) ?? "";
|
|
3916
3958
|
}, M = (q) => {
|
|
3917
3959
|
u(
|
|
3918
|
-
(
|
|
3960
|
+
(K) => K.map((N) => N.path === l ? { ...N, search: q } : N)
|
|
3919
3961
|
);
|
|
3920
3962
|
};
|
|
3921
3963
|
return A(() => {
|
|
3922
3964
|
const q = setTimeout(() => {
|
|
3923
3965
|
a({
|
|
3924
3966
|
name: l === "lista-campanias" ? "search" : "taskName",
|
|
3925
|
-
value:
|
|
3926
|
-
}), M(
|
|
3967
|
+
value: p == null ? void 0 : p.trim()
|
|
3968
|
+
}), M(p);
|
|
3927
3969
|
}, 500);
|
|
3928
3970
|
return () => {
|
|
3929
3971
|
clearTimeout(q);
|
|
3930
3972
|
};
|
|
3931
|
-
}, [
|
|
3973
|
+
}, [p]), /* @__PURE__ */ c("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: [
|
|
3932
3974
|
/* @__PURE__ */ c("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: [
|
|
3933
3975
|
/* @__PURE__ */ c("div", { className: "tw-flex tw-gap-xl", children: [
|
|
3934
3976
|
l === "kanban-campania" && /* @__PURE__ */ t(
|
|
@@ -3948,11 +3990,11 @@ const Cr = ({ path: r }) => /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ c(
|
|
|
3948
3990
|
)
|
|
3949
3991
|
}
|
|
3950
3992
|
),
|
|
3951
|
-
/* @__PURE__ */ t("h2", { className: "tw-text-texts tw-font-
|
|
3952
|
-
|
|
3953
|
-
|
|
3993
|
+
/* @__PURE__ */ t("h2", { className: "tw-text-texts tw-font-sans tw-text-[1.6rem] tw-font-semibold ", children: C(l) }),
|
|
3994
|
+
P.includes(l) && /* @__PURE__ */ t(
|
|
3995
|
+
_r,
|
|
3954
3996
|
{
|
|
3955
|
-
tabs:
|
|
3997
|
+
tabs: j[l],
|
|
3956
3998
|
renderItem: (q) => {
|
|
3957
3999
|
d(q);
|
|
3958
4000
|
},
|
|
@@ -3960,7 +4002,7 @@ const Cr = ({ path: r }) => /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ c(
|
|
|
3960
4002
|
}
|
|
3961
4003
|
)
|
|
3962
4004
|
] }),
|
|
3963
|
-
/* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-gap-s", children: [
|
|
4005
|
+
/* @__PURE__ */ c("div", { className: "tw-flex tw-items-center tw-gap-s ", children: [
|
|
3964
4006
|
/* @__PURE__ */ t(
|
|
3965
4007
|
"input",
|
|
3966
4008
|
{
|
|
@@ -3969,8 +4011,8 @@ const Cr = ({ path: r }) => /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ c(
|
|
|
3969
4011
|
},
|
|
3970
4012
|
type: "text",
|
|
3971
4013
|
placeholder: "Buscar",
|
|
3972
|
-
value:
|
|
3973
|
-
className: "tw-w-[200px] tw-h-[30px] tw-
|
|
4014
|
+
value: p,
|
|
4015
|
+
className: "tw-w-[200px] tw-h-[30px] tw-bg-bg-card tw-shadow-input tw-border tw-border-gray-200 tw-rounded-lg tw-px-l tw-text-xl hover:tw-border-active hover:tw-border hover:tw-border-2 hover:tw-border-blue-500"
|
|
3974
4016
|
}
|
|
3975
4017
|
),
|
|
3976
4018
|
/* @__PURE__ */ t(
|
|
@@ -3982,44 +4024,44 @@ const Cr = ({ path: r }) => /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ c(
|
|
|
3982
4024
|
{
|
|
3983
4025
|
ref: h,
|
|
3984
4026
|
className: "tw-w-max tw-max-w-[400px] tw-h-fit tw-bg-bg-card tw-shadow-lg tw-rounded-lg tw-p-l",
|
|
3985
|
-
children: /* @__PURE__ */ t(
|
|
4027
|
+
children: /* @__PURE__ */ t(Me, {})
|
|
3986
4028
|
}
|
|
3987
4029
|
)
|
|
3988
4030
|
}
|
|
3989
4031
|
)
|
|
3990
4032
|
] })
|
|
3991
4033
|
] }),
|
|
3992
|
-
/* @__PURE__ */ t("div", { className: "tw-overflow-y-auto tw-scrollbar-none tw-max-h-[100%] tw-h-full", children: /* @__PURE__ */ t(Ut, { project:
|
|
3993
|
-
|
|
4034
|
+
/* @__PURE__ */ t("div", { className: "tw-overflow-y-auto tw-scrollbar-none tw-max-h-[100%] tw-h-full", children: /* @__PURE__ */ t(Ut, { project: m.id, children: /* @__PURE__ */ t(
|
|
4035
|
+
vr,
|
|
3994
4036
|
{
|
|
3995
4037
|
path: l,
|
|
3996
4038
|
tab: o,
|
|
3997
4039
|
setPath: f,
|
|
3998
|
-
project:
|
|
4040
|
+
project: m,
|
|
3999
4041
|
setProject: b
|
|
4000
4042
|
}
|
|
4001
4043
|
) }) })
|
|
4002
4044
|
] });
|
|
4003
4045
|
}, {}),
|
|
4004
|
-
/* @__PURE__ */ t(
|
|
4046
|
+
/* @__PURE__ */ t(Cr, {})
|
|
4005
4047
|
] }) }), Tr = () => /* @__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__ */ c("div", { className: "tw-text-2xl tw-font-bold tw-flex tw-flex-col tw-items-center", children: [
|
|
4006
4048
|
/* @__PURE__ */ t("div", { className: "tw-w-10 tw-h-10 tw-bg-primary-regular tw-rounded-full tw-animate-pulse" }),
|
|
4007
4049
|
/* @__PURE__ */ t("p", { className: "tw-text-l tw-text-texts-enfasis", children: "un momento..." }),
|
|
4008
4050
|
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-text-texts-placeholder", children: "estamos buscando tu usuario" })
|
|
4009
|
-
] }) }) }),
|
|
4051
|
+
] }) }) }), Fr = () => /* @__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__ */ c("div", { className: "tw-text-2xl tw-font-bold tw-flex tw-flex-col tw-items-center", children: [
|
|
4010
4052
|
/* @__PURE__ */ t("div", { className: "tw-w-10 tw-h-10 tw-bg-primary-regular tw-rounded-full tw-animate-pulse" }),
|
|
4011
4053
|
/* @__PURE__ */ t("p", { className: "tw-text-l tw-text-texts-enfasis", children: "No encontramos tu acceso" }),
|
|
4012
4054
|
/* @__PURE__ */ t("p", { className: "tw-text-sm tw-text-texts-placeholder", children: "por favor, contacta al administrador" })
|
|
4013
|
-
] }) }) }),
|
|
4055
|
+
] }) }) }), Kr = ({ path: r, user: e, url: s, mode: a }) => {
|
|
4014
4056
|
const n = new oe();
|
|
4015
4057
|
if (!e) return /* @__PURE__ */ t(Tr, {});
|
|
4016
|
-
if (!e.accessToken) return /* @__PURE__ */ t(
|
|
4058
|
+
if (!e.accessToken) return /* @__PURE__ */ t(Fr, {});
|
|
4017
4059
|
let i = { user: e, url: s, mode: a };
|
|
4018
|
-
return /* @__PURE__ */ t(
|
|
4019
|
-
/* @__PURE__ */ t(
|
|
4060
|
+
return /* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(Re, { ...i, children: /* @__PURE__ */ t(De, { ...i, children: /* @__PURE__ */ t("div", { className: "tw-w-full tw-h-full tw-min-h-[100%] tw-relative", children: /* @__PURE__ */ c(ie, { client: n, children: [
|
|
4061
|
+
/* @__PURE__ */ t(kr, { path: r }),
|
|
4020
4062
|
" "
|
|
4021
4063
|
] }) }) }) }) });
|
|
4022
4064
|
};
|
|
4023
4065
|
export {
|
|
4024
|
-
|
|
4066
|
+
Kr as AppTasks
|
|
4025
4067
|
};
|