@imj_media/tareas 1.1.13 → 1.2.0

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