@imj_media/tareas 0.1.13 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tareas.es.js CHANGED
@@ -1,34 +1,32 @@
1
- import { jsx as e, jsxs as o, Fragment as S } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as o, Fragment as j } from "react/jsx-runtime";
2
2
  import "@imj_media/imj-ui/styles.css";
3
- import { useQueryClient as W, useQuery as J, useMutation as qe, useInfiniteQuery as Z, QueryClient as je, QueryClientProvider as $e } from "@tanstack/react-query";
4
- import { useState as y, useEffect as v, useRef as L, createContext as U, useContext as K } from "react";
5
- import { Tooltip as I, Icons as N } from "@imj_media/tasks-modules";
6
- import V from "react-dom";
7
- import pe from "axios";
8
- import he from "qs";
9
- import { parseISO as Ee, formatDistanceToNow as Be, format as xe } from "date-fns";
10
- import { es as k } from "date-fns/locale";
11
- import { Button as ge, Avatar as ee, AvatarImage as te, AvatarFallback as ae, Input as Le, Label as Me, Accordion as ze, AccordionItem as Oe, AccordionTrigger as Ie, AccordionContent as Re } from "@imj_media/imj-ui";
12
- import { useForm as We } from "react-hook-form";
13
- import { Avatar as Ue } from "primereact/avatar";
14
- import { Paginator as Ke } from "primereact/paginator";
15
- import { Dropdown as Qe } from "primereact/dropdown";
16
- const He = ({ label: a, active: t, onClick: r, disabled: n }) => n ? /* @__PURE__ */ e(I, { dispatch: /* @__PURE__ */ o("button", { className: "text-texts-placeholder text-xs font-semibold cursor-help", children: [
3
+ import { useQueryClient as Q, useQuery as ae, useMutation as We, useInfiniteQuery as ne, QueryClient as Ue, QueryClientProvider as Ke } from "@tanstack/react-query";
4
+ import { useState as y, useEffect as C, useRef as L, createContext as H, useContext as V } from "react";
5
+ import { Tooltip as R, Icons as v } from "@imj_media/tasks-modules";
6
+ import X from "react-dom";
7
+ import ve from "axios";
8
+ import Ce from "qs";
9
+ import { parseISO as Qe, formatDistanceToNow as He, format as _e } from "date-fns";
10
+ import { es as re } from "date-fns/locale";
11
+ import { Button as Te, Avatar as J, AvatarImage as Z, AvatarFallback as k, Input as Ve, Label as Ge, Accordion as Ye, AccordionItem as Xe, AccordionTrigger as Je, AccordionContent as Ze } from "@imj_media/imj-ui";
12
+ import { useForm as ke } from "react-hook-form";
13
+ import { Paginator as et } from "primereact/paginator";
14
+ const tt = ({ label: a, active: t, onClick: r, disabled: n }) => n ? /* @__PURE__ */ e(R, { dispatch: /* @__PURE__ */ o("button", { className: "text-texts-placeholder text-xs font-semibold cursor-help", children: [
17
15
  " ",
18
16
  a,
19
17
  " "
20
- ] }), children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center px-3 py-2 bg-bg-card rounded-lg border border-border-card", children: /* @__PURE__ */ e("p", { className: "text-texts-placeholder text-xs font-semibold", children: "Espéralo muy pronto..." }) }) }) : /* @__PURE__ */ e("button", { disabled: n, onClick: r, className: `${t ? "text-texts-enfasis border-b-2 border-texts-enfasis" : ""} text-xs font-semibold ${n ? "cursor-not-allowed text-texts-placeholder" : "text-texts-subtext"} `, children: a }), Ve = ({ tabs: a, renderItem: t, initialTab: r }) => {
21
- const [n, l] = y(r ?? a[0].toLowerCase());
22
- v(() => {
23
- r && l(r);
18
+ ] }), children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center px-3 py-2 bg-bg-card rounded-lg border border-border-card", children: /* @__PURE__ */ e("p", { className: "text-texts-placeholder text-xs font-semibold", children: "Espéralo muy pronto..." }) }) }) : /* @__PURE__ */ e("button", { disabled: n, onClick: r, className: `${t ? "text-texts-enfasis border-b-2 border-texts-enfasis" : ""} text-xs font-semibold ${n ? "cursor-not-allowed text-texts-placeholder" : "text-texts-subtext"} `, children: a }), at = ({ tabs: a, renderItem: t, initialTab: r }) => {
19
+ const [n, s] = y(r ?? a[0].toLowerCase());
20
+ C(() => {
21
+ r && s(r);
24
22
  }, [r]);
25
- const s = (i) => {
26
- l(i), t(i);
23
+ const l = (i) => {
24
+ s(i), t(i);
27
25
  };
28
26
  return /* @__PURE__ */ e("div", { className: "flex", children: a.map((i, u) => /* @__PURE__ */ e("div", { className: `${u === 0 ? "border-l-2" : ""} border-r-2 border-gray-200 px-m`, children: /* @__PURE__ */ e(
29
- He,
27
+ tt,
30
28
  {
31
- onClick: () => s(i.toLowerCase()),
29
+ onClick: () => l(i.toLowerCase()),
32
30
  label: i,
33
31
  active: i.toLowerCase() === n,
34
32
  disabled: ["gantt"].includes(i.toLowerCase())
@@ -97,159 +95,159 @@ const He = ({ label: a, active: t, onClick: r, disabled: n }) => n ? /* @__PURE_
97
95
  regular: "#0EA5E9",
98
96
  pastel: "#0EA5E9"
99
97
  }
100
- }, ne = () => {
98
+ }, se = () => {
101
99
  const [a, t] = y(null);
102
100
  return {
103
101
  //Properties
104
102
  position: a,
105
103
  //Methods
106
- setElementPosition: (s) => {
107
- var p;
108
- let i = (p = s.current) == null ? void 0 : p.getBoundingClientRect(), u = (i == null ? void 0 : i.x) + ((i == null ? void 0 : i.width) ?? 0), c = (i == null ? void 0 : i.y) + (i == null ? void 0 : i.height);
104
+ setElementPosition: (l) => {
105
+ var m;
106
+ let i = (m = l.current) == null ? void 0 : m.getBoundingClientRect(), u = (i == null ? void 0 : i.x) + ((i == null ? void 0 : i.width) ?? 0), c = (i == null ? void 0 : i.y) + (i == null ? void 0 : i.height);
109
107
  t(a ? null : { x: u ?? 0, y: c ?? 0 });
110
108
  },
111
- getChildrenSize: (s) => {
109
+ getChildrenSize: (l) => {
112
110
  var i;
113
- return (i = s.current) == null ? void 0 : i.getBoundingClientRect();
111
+ return (i = l.current) == null ? void 0 : i.getBoundingClientRect();
114
112
  },
115
113
  clearPosition: () => {
116
114
  t(null);
117
115
  }
118
116
  };
119
- }, Ge = ({ children: a, filterChildren: t }) => {
120
- const { position: r, setElementPosition: n } = ne(), l = L(null), s = ({ children: i }) => {
117
+ }, nt = ({ children: a, filterChildren: t }) => {
118
+ const { position: r, setElementPosition: n } = se(), s = L(null), l = ({ children: i }) => {
121
119
  const [u, c] = y();
122
- return v(() => {
123
- var p, d;
124
- t.current && c(((r == null ? void 0 : r.x) ?? 0) - (((d = (p = t.current) == null ? void 0 : p.getBoundingClientRect()) == null ? void 0 : d.width) ?? 0));
125
- }, [t == null ? void 0 : t.current, r == null ? void 0 : r.x]), r && V.createPortal(
120
+ return C(() => {
121
+ var m, d;
122
+ t.current && c(((r == null ? void 0 : r.x) ?? 0) - (((d = (m = t.current) == null ? void 0 : m.getBoundingClientRect()) == null ? void 0 : d.width) ?? 0));
123
+ }, [t == null ? void 0 : t.current, r == null ? void 0 : r.x]), r && X.createPortal(
126
124
  /* @__PURE__ */ e("div", { className: `absolute w-fit h-fit ${u ? "block" : "hidden"}`, style: { top: `${r == null ? void 0 : r.y}px`, left: `${u}px` }, children: i }),
127
125
  document.body
128
126
  );
129
127
  };
130
- return /* @__PURE__ */ o(S, { children: [
128
+ return /* @__PURE__ */ o(j, { children: [
131
129
  /* @__PURE__ */ o(
132
130
  "label",
133
131
  {
134
- ref: l,
132
+ ref: s,
135
133
  htmlFor: "filter-button",
136
134
  className: "flex cursor-pointer items-center gap-m p-s text-texts-enfasis fill-texts-enfasis bg-bg rounded-lg px-l h-[30px] shadow-button-primary hover:shadow-button-primary-hover ",
137
135
  children: [
138
- /* @__PURE__ */ e(N, { icon: "filter", size: "xs", strokeWidth: 5, color: F.primary.regular }),
136
+ /* @__PURE__ */ e(v, { icon: "filter", size: "xs", strokeWidth: 5, color: F.primary.regular }),
139
137
  "Filtrar"
140
138
  ]
141
139
  }
142
140
  ),
143
141
  /* @__PURE__ */ e("button", { className: "hidden", id: "filter-button", onClick: () => {
144
- n(l);
142
+ n(s);
145
143
  } }),
146
- /* @__PURE__ */ e(s, { children: a })
144
+ /* @__PURE__ */ e(l, { children: a })
147
145
  ] });
148
- }, de = (a) => {
146
+ }, ye = (a) => {
149
147
  let t = {};
150
148
  return Object.entries(a).forEach(([r, n]) => {
151
149
  if (r.includes(".")) {
152
- let [l, s] = r.split(".");
153
- t[l] = t[l] || {}, t[l][s] = n;
150
+ let [s, l] = r.split(".");
151
+ t[s] = t[s] || {}, t[s][l] = n;
154
152
  } else
155
153
  t[r] = n;
156
154
  }), t;
157
- }, fe = U({}), Ye = ({ children: a }) => {
158
- const [t, r] = y({}), [n, l] = y({}), [s, i] = y([]), u = ({ name: d, value: h }) => {
159
- function x(g) {
160
- return !isNaN(g) && g !== null && g !== "" ? parseFloat(g) : null;
155
+ }, Fe = H({}), rt = ({ children: a }) => {
156
+ const [t, r] = y({}), [n, s] = y({}), [l, i] = y([]), u = ({ name: d, value: x }) => {
157
+ function h(f) {
158
+ return !isNaN(f) && f !== null && f !== "" ? parseFloat(f) : null;
161
159
  }
162
- let b = x(h);
163
- l((g) => {
164
- let f = { ...g }, w = s == null ? void 0 : s.find((m) => m.label.toLowerCase().replace(/ /g, "_") === d);
165
- return w ? f[w.id] = b ?? h : f[d] = b ?? h, f;
160
+ let b = h(x);
161
+ s((f) => {
162
+ let g = { ...f }, N = l == null ? void 0 : l.find((w) => w.label.toLowerCase().replace(/ /g, "_") === d);
163
+ return N ? g[N.id] = b ?? x : g[d] = b ?? x, g;
166
164
  });
167
165
  };
168
- v(() => {
169
- let d = s.map((h) => h.id === "owner.config" ? [h.id, "yo_y_mis_equipos"] : h.id === "dependency" ? [h.id, "ambas"] : [h.id, null]);
170
- l(
166
+ C(() => {
167
+ let d = l.map((x) => x.id === "owner.config" ? [x.id, "yo_y_mis_equipos"] : x.id === "dependency" ? [x.id, "ambas"] : [x.id, null]);
168
+ s(
171
169
  Object.fromEntries(d)
172
170
  );
173
- }, [s]);
171
+ }, [l]);
174
172
  const c = () => {
175
- let d = s.map((h) => h.id === "owner.config" ? [h.id, "yo_y_mis_equipos"] : h.id === "dependency" ? [h.id, "ambas"] : [h.id, null]);
176
- l(Object.fromEntries(d)), r(de(Object.fromEntries(d)));
177
- }, p = () => {
178
- let d = de(n);
173
+ let d = l.map((x) => x.id === "owner.config" ? [x.id, "yo_y_mis_equipos"] : x.id === "dependency" ? [x.id, "ambas"] : [x.id, null]);
174
+ s(Object.fromEntries(d)), r(ye(Object.fromEntries(d)));
175
+ }, m = () => {
176
+ let d = ye(n);
179
177
  r(d);
180
178
  };
181
- return /* @__PURE__ */ e(fe.Provider, { value: {
179
+ return /* @__PURE__ */ e(Fe.Provider, { value: {
182
180
  //properties
183
- fields: s,
181
+ fields: l,
184
182
  filters: t,
185
183
  //methods
186
184
  defineFields: i,
187
185
  updateFilters: u,
188
186
  cleanFilters: c,
189
- applyFilters: p,
187
+ applyFilters: m,
190
188
  initialFilters: n
191
189
  }, children: a });
192
- }, $ = () => K(fe);
193
- function be(a, t = 300, r = { leading: !1, trailing: !0 }) {
194
- let n, l = null;
195
- return function(...s) {
196
- const i = Date.now(), u = r.leading && !l;
197
- clearTimeout(n), u && a(...s), l = i, n = setTimeout(() => {
198
- r.trailing && (!r.leading || i - l >= t) && (a(...s), l = null);
190
+ }, B = () => V(Fe);
191
+ function Pe(a, t = 300, r = { leading: !1, trailing: !0 }) {
192
+ let n, s = null;
193
+ return function(...l) {
194
+ const i = Date.now(), u = r.leading && !s;
195
+ clearTimeout(n), u && a(...l), s = i, n = setTimeout(() => {
196
+ r.trailing && (!r.leading || i - s >= t) && (a(...l), s = null);
199
197
  }, t);
200
198
  };
201
199
  }
202
- const Xe = () => {
200
+ const st = () => {
203
201
  const {
204
202
  fields: a,
205
203
  updateFilters: t,
206
204
  cleanFilters: r,
207
205
  applyFilters: n,
208
- initialFilters: l
209
- } = $();
206
+ initialFilters: s
207
+ } = B();
210
208
  return /* @__PURE__ */ o("div", { className: "flex flex-col gap-l min-w-[250px]", children: [
211
209
  /* @__PURE__ */ o("div", { className: "flex justify-between items-center", children: [
212
210
  /* @__PURE__ */ e("p", { className: "text-texts text-m", children: "Filtros" }),
213
211
  /* @__PURE__ */ e("button", { className: "text-xs font-semibold flex cursor-pointer items-center gap-m p-s text-texts-enfasis fill-texts-enfasis bg-bg rounded-lg px-l h-fit shadow-button-primary hover:shadow-button-primary-hover ", onClick: r, children: "Limpiar" })
214
212
  ] }),
215
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-m", children: a == null ? void 0 : a.map((s, i) => {
213
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-m", children: a == null ? void 0 : a.map((l, i) => {
216
214
  var u;
217
215
  return /* @__PURE__ */ o("div", { children: [
218
- /* @__PURE__ */ e("p", { className: "text-sm", children: s.label }),
219
- (s == null ? void 0 : s.type) === "select" ? /* @__PURE__ */ e(
216
+ /* @__PURE__ */ e("p", { className: "text-sm", children: l.label }),
217
+ (l == null ? void 0 : l.type) === "select" ? /* @__PURE__ */ e(
220
218
  "select",
221
219
  {
222
220
  onChange: (c) => {
223
- var p, d;
221
+ var m, d;
224
222
  t({
225
- name: (p = c == null ? void 0 : c.target) == null ? void 0 : p.name,
223
+ name: (m = c == null ? void 0 : c.target) == null ? void 0 : m.name,
226
224
  value: (d = c == null ? void 0 : c.target) == null ? void 0 : d.value
227
225
  });
228
226
  },
229
- value: l == null ? void 0 : l[s == null ? void 0 : s.id],
227
+ value: s == null ? void 0 : s[l == null ? void 0 : l.id],
230
228
  className: "w-full h-[30px] shadow-input rounded-lg p-s",
231
- name: s.id,
232
- id: s.id,
233
- children: (u = s == null ? void 0 : s.options) == null ? void 0 : u.map((c, p) => /* @__PURE__ */ e(
229
+ name: l.id,
230
+ id: l.id,
231
+ children: (u = l == null ? void 0 : l.options) == null ? void 0 : u.map((c, m) => /* @__PURE__ */ e(
234
232
  "option",
235
233
  {
236
234
  value: c.id,
237
235
  children: c.name
238
236
  },
239
- p
237
+ m
240
238
  ))
241
239
  }
242
240
  ) : /* @__PURE__ */ e(
243
241
  "input",
244
242
  {
245
243
  className: "w-full h-[30px] shadow-input rounded-lg p-s",
246
- type: s.type,
247
- value: l == null ? void 0 : l[s == null ? void 0 : s.id],
248
- name: s.label.toLowerCase().replace(/ /g, "_"),
249
- onChange: be((c) => {
250
- var p, d;
244
+ type: l.type,
245
+ value: s == null ? void 0 : s[l == null ? void 0 : l.id],
246
+ name: l.label.toLowerCase().replace(/ /g, "_"),
247
+ onChange: Pe((c) => {
248
+ var m, d;
251
249
  return t({
252
- name: (p = c == null ? void 0 : c.target) == null ? void 0 : p.name,
250
+ name: (m = c == null ? void 0 : c.target) == null ? void 0 : m.name,
253
251
  value: (d = c == null ? void 0 : c.target) == null ? void 0 : d.value
254
252
  });
255
253
  }, 1e3)
@@ -274,16 +272,16 @@ const Xe = () => {
274
272
  }
275
273
  return a;
276
274
  };
277
- class Je {
275
+ class lt {
278
276
  static toCampaignTasks(t) {
279
- var n, l, s, i, u, c, p, d, h, x, b, g;
277
+ var n, s, l, i, u, c, m, d, x, h, b, f;
280
278
  let r = [];
281
- return t != null && t.responsable && r.push({ id: t.responsable.id, name: t.responsable.nombre, image: (u = (i = (s = (l = (n = t.responsable) == null ? void 0 : n.userOBP) == null ? void 0 : l.imagen) == null ? void 0 : s.formats) == null ? void 0 : i.thumbnail) == null ? void 0 : u.url }), console.log("task", t), (c = t == null ? void 0 : t.equipo) != null && c.miembros && t.equipo.miembros.forEach((f) => {
282
- var w, m, C, T;
283
- r != null && r.find((_) => _.id === f.idUser.id) || f.idUser && r.push({ id: f.idUser.id, name: f.idUser.nombre, image: (T = (C = (m = (w = f == null ? void 0 : f.userOBP) == null ? void 0 : w.imagen) == null ? void 0 : m.formats) == null ? void 0 : C.thumbnail) == null ? void 0 : T.url });
279
+ return t != null && t.responsable && r.push({ id: t.responsable.id, name: t.responsable.nombre, image: (u = (i = (l = (s = (n = t.responsable) == null ? void 0 : n.userOBP) == null ? void 0 : s.imagen) == null ? void 0 : l.formats) == null ? void 0 : i.thumbnail) == null ? void 0 : u.url }), console.log("task", t), (c = t == null ? void 0 : t.equipo) != null && c.miembros && t.equipo.miembros.forEach((g) => {
280
+ var N, w, T, S;
281
+ r != null && r.find((_) => _.id === g.idUser.id) || g.idUser && r.push({ id: g.idUser.id, name: g.idUser.nombre, image: (S = (T = (w = (N = g == null ? void 0 : g.userOBP) == null ? void 0 : N.imagen) == null ? void 0 : w.formats) == null ? void 0 : T.thumbnail) == null ? void 0 : S.url });
284
282
  }), {
285
283
  isPrincipalTask: (t == null ? void 0 : t.tarea_principal) ?? !1,
286
- projectName: ((p = t == null ? void 0 : t.proyecto) == null ? void 0 : p.nombre) ?? null,
284
+ projectName: ((m = t == null ? void 0 : t.proyecto) == null ? void 0 : m.nombre) ?? null,
287
285
  orden: (t == null ? void 0 : t.orden) ?? null,
288
286
  id: (t == null ? void 0 : t.id) ?? null,
289
287
  task: (t == null ? void 0 : t.texto_corto) ?? null,
@@ -298,14 +296,14 @@ class Je {
298
296
  repeats: (t == null ? void 0 : t.repeticiones_realizadas) ?? null,
299
297
  comments: ((d = t == null ? void 0 : t.comentarios) == null ? void 0 : d.length) ?? null,
300
298
  willBePaused: t == null ? void 0 : t.es_pausable,
301
- statusRequiredTask: ((h = t == null ? void 0 : t.id_t_requerida) == null ? void 0 : h.estatus) ?? null,
302
- nameRequiredTask: ((x = t == null ? void 0 : t.id_t_requerida) == null ? void 0 : x.texto_corto) ?? null,
299
+ statusRequiredTask: ((x = t == null ? void 0 : t.id_t_requerida) == null ? void 0 : x.estatus) ?? null,
300
+ nameRequiredTask: ((h = t == null ? void 0 : t.id_t_requerida) == null ? void 0 : h.texto_corto) ?? null,
303
301
  responsible: ((b = t == null ? void 0 : t.responsable) == null ? void 0 : b.id) ?? null,
304
- tasks: ((g = t == null ? void 0 : t.tareas) == null ? void 0 : g.map((f) => ({ id: f.id, name: f.texto_corto, status: f.estatus }))) ?? null
302
+ tasks: ((f = t == null ? void 0 : t.tareas) == null ? void 0 : f.map((g) => ({ id: g.id, name: g.texto_corto, status: g.estatus }))) ?? null
305
303
  };
306
304
  }
307
305
  }
308
- const Ze = async ({ filters: a, tasks_api: t, project: r }) => {
306
+ const it = async ({ filters: a, tasks_api: t, project: r }) => {
309
307
  try {
310
308
  const n = await t.get("/api/listado_tareas", {
311
309
  params: {
@@ -316,20 +314,20 @@ const Ze = async ({ filters: a, tasks_api: t, project: r }) => {
316
314
  includeAllTasks: !0
317
315
  }
318
316
  });
319
- return M(n.data.tareas).map(Je.toCampaignTasks);
317
+ return M(n.data.tareas).map(lt.toCampaignTasks);
320
318
  } catch (n) {
321
319
  console.log(n);
322
320
  }
323
- }, ye = U({}), ke = ({ children: a, user: t, url: r }) => {
324
- const n = pe.create({
321
+ }, Se = H({}), ot = ({ children: a, user: t, url: r }) => {
322
+ const n = ve.create({
325
323
  baseURL: r,
326
324
  headers: {
327
325
  Authorization: `Bearer ${t.accessToken}`
328
326
  },
329
- paramsSerializer: (l) => he.stringify(l, { encodeValuesOnly: !0 })
327
+ paramsSerializer: (s) => Ce.stringify(s, { encodeValuesOnly: !0 })
330
328
  });
331
329
  return /* @__PURE__ */ e(
332
- ye.Provider,
330
+ Se.Provider,
333
331
  {
334
332
  value: {
335
333
  //methods
@@ -338,16 +336,16 @@ const Ze = async ({ filters: a, tasks_api: t, project: r }) => {
338
336
  children: a
339
337
  }
340
338
  );
341
- }, P = () => K(ye), we = U({}), et = ({ children: a, user: t, url: r }) => {
342
- const n = pe.create({
339
+ }, D = () => V(Se), Ae = H({}), ct = ({ children: a, user: t, url: r }) => {
340
+ const n = ve.create({
343
341
  baseURL: r,
344
342
  headers: {
345
343
  Authorization: `Bearer ${t.accessToken}`
346
344
  },
347
- paramsSerializer: (l) => he.stringify(l, { encodeValuesOnly: !0 })
345
+ paramsSerializer: (s) => Ce.stringify(s, { encodeValuesOnly: !0 })
348
346
  });
349
347
  return /* @__PURE__ */ e(
350
- we.Provider,
348
+ Ae.Provider,
351
349
  {
352
350
  value: {
353
351
  //properties
@@ -358,23 +356,23 @@ const Ze = async ({ filters: a, tasks_api: t, project: r }) => {
358
356
  children: a
359
357
  }
360
358
  );
361
- }, R = () => K(we), Ne = U({}), tt = ({ children: a, project: t }) => {
362
- var w;
363
- const r = W(), [n, l] = y([]), [s, i] = y([]), { tasks_api: u } = P(), { filters: c } = $(), { user: p } = R(), [d, h] = y({
359
+ }, W = () => V(Ae), qe = H({}), dt = ({ children: a, project: t }) => {
360
+ var N;
361
+ const r = Q(), [n, s] = y([]), [l, i] = y([]), { tasks_api: u } = D(), { filters: c } = B(), { user: m } = W(), [d, x] = y({
364
362
  owner: {
365
- user: p.id,
366
- config: ((w = c == null ? void 0 : c.owner) == null ? void 0 : w.config) ?? "yo_y_mis_equipos"
363
+ user: m.id,
364
+ config: ((N = c == null ? void 0 : c.owner) == null ? void 0 : N.config) ?? "yo_y_mis_equipos"
367
365
  },
368
366
  project: {
369
367
  id: t
370
368
  }
371
369
  });
372
- v(() => {
370
+ C(() => {
373
371
  console.log(n);
374
372
  }, [n]);
375
- const x = J({
373
+ const h = ae({
376
374
  queryKey: ["tasksProject", t],
377
- queryFn: () => Ze({
375
+ queryFn: () => it({
378
376
  filters: {
379
377
  ...d
380
378
  },
@@ -382,45 +380,45 @@ const Ze = async ({ filters: a, tasks_api: t, project: r }) => {
382
380
  tasks_api: u
383
381
  })
384
382
  });
385
- v(() => {
386
- var m;
387
- Object.keys(c).length > 0 && h({
383
+ C(() => {
384
+ var w;
385
+ Object.keys(c).length > 0 && x({
388
386
  ...c,
389
387
  owner: {
390
- user: p.id,
391
- config: ((m = c == null ? void 0 : c.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos"
388
+ user: m.id,
389
+ config: ((w = c == null ? void 0 : c.owner) == null ? void 0 : w.config) ?? "yo_y_mis_equipos"
392
390
  },
393
391
  project: {
394
392
  id: t
395
393
  }
396
394
  });
397
- }, [c]), v(() => {
395
+ }, [c]), C(() => {
398
396
  r.invalidateQueries({
399
397
  queryKey: ["tasksProject", t]
400
398
  });
401
399
  }, [d]);
402
- const b = (m) => {
403
- l((C) => [...C, m]);
404
- }, g = (m) => {
405
- i((C) => C.includes(m) ? C.filter((T) => T !== m) : [...C, m]);
406
- }, f = t ?? null;
400
+ const b = (w) => {
401
+ s((T) => [...T, w]);
402
+ }, f = (w) => {
403
+ i((T) => T.includes(w) ? T.filter((S) => S !== w) : [...T, w]);
404
+ }, g = t ?? null;
407
405
  return /* @__PURE__ */ e(
408
- Ne.Provider,
406
+ qe.Provider,
409
407
  {
410
408
  value: {
411
409
  //properties
412
- tasksProject: x,
410
+ tasksProject: h,
413
411
  selectedTasks: n,
414
- projectID: f,
415
- openTasks: s,
412
+ projectID: g,
413
+ openTasks: l,
416
414
  //methods
417
415
  selectTask: b,
418
- openTask: g
416
+ openTask: f
419
417
  },
420
418
  children: a
421
419
  }
422
420
  );
423
- }, G = () => K(Ne), at = [
421
+ }, ee = () => V(qe), ut = [
424
422
  {
425
423
  label: "Tipo de dependencia",
426
424
  type: "select",
@@ -471,51 +469,51 @@ const Ze = async ({ filters: a, tasks_api: t, project: r }) => {
471
469
  name: "Muy dificil"
472
470
  }]
473
471
  }
474
- ], nt = ({ id: a }) => {
472
+ ], mt = ({ id: a }) => {
475
473
  const [t, r] = y(!1);
476
474
  return { checked: t, checkTask: () => {
477
475
  r(!t), console.log("completar tarea", a);
478
476
  } };
479
- }, ve = ({ id: a, nameRequiredTask: t, statusRequiredTask: r, status: n }) => {
480
- const { checked: l, checkTask: s } = nt({ id: a });
477
+ }, je = ({ id: a, nameRequiredTask: t, statusRequiredTask: r, status: n }) => {
478
+ const { checked: s, checkTask: l } = mt({ id: a });
481
479
  let i = Math.random().toString();
482
- return console.log({ statusRequiredTask: r }), /* @__PURE__ */ o(S, { children: [
483
- n === 1 && (r < 2 && t !== "" ? /* @__PURE__ */ e(I, { dispatch: /* @__PURE__ */ e("label", { htmlFor: i, children: /* @__PURE__ */ e(N, { icon: "info_circle", color: F.warning.regular, strokeWidth: 4 }) }), children: /* @__PURE__ */ o("div", { className: "px-m py-s max-w-[200px] bg-warning-light rounded-lg border-l-[5px] border-warning-regular text-warning-dark text-xs", children: [
480
+ return console.log({ statusRequiredTask: r }), /* @__PURE__ */ o(j, { children: [
481
+ n === 1 && (r < 2 && t !== "" ? /* @__PURE__ */ e(R, { dispatch: /* @__PURE__ */ e("label", { htmlFor: i, children: /* @__PURE__ */ e(v, { icon: "info_circle", color: F.warning.regular, strokeWidth: 4 }) }), children: /* @__PURE__ */ o("div", { className: "px-m py-s max-w-[200px] bg-warning-light rounded-lg border-l-[5px] border-warning-regular text-warning-dark text-xs", children: [
484
482
  /* @__PURE__ */ e("p", { className: "font-bold", children: "Requiere completar su tarea requerida:" }),
485
483
  /* @__PURE__ */ o("p", { children: [
486
484
  " ",
487
485
  t,
488
486
  " "
489
487
  ] })
490
- ] }) }) : /* @__PURE__ */ e("label", { htmlFor: i, className: l ? "bg-success-regular rounded-full w-[20px] h-[20px] flex items-center justify-center mx-[2px] transition-all" : " transition-colors", children: /* @__PURE__ */ e(
491
- N,
488
+ ] }) }) : /* @__PURE__ */ e("label", { htmlFor: i, className: s ? "bg-success-regular rounded-full w-[20px] h-[20px] flex items-center justify-center mx-[2px] transition-all" : " transition-colors", children: /* @__PURE__ */ e(
489
+ v,
492
490
  {
493
- icon: l ? "check_outline" : "circle_checked",
494
- color: l ? "white" : F.texts.placeholder,
491
+ icon: s ? "check_outline" : "circle_checked",
492
+ color: s ? "white" : F.texts.placeholder,
495
493
  strokeWidth: 4,
496
- size: l ? "xs" : "s"
494
+ size: s ? "xs" : "s"
497
495
  }
498
496
  ) })),
499
- /* @__PURE__ */ e("input", { id: i, checked: l, onChange: s, type: "checkbox", className: "hidden" })
497
+ /* @__PURE__ */ e("input", { id: i, checked: s, onChange: l, type: "checkbox", className: "hidden" })
500
498
  ] });
501
- }, z = ({ imageUrl: a = "https://www.uv.unach.mx/assets/img/prueba/directorio/userM.png", alt: t = "avatar" }) => /* @__PURE__ */ e(
499
+ }, I = ({ imageUrl: a = "https://www.uv.unach.mx/assets/img/prueba/directorio/userM.png", alt: t = "avatar" }) => /* @__PURE__ */ e(
502
500
  "img",
503
501
  {
504
502
  src: a === "" ? "https://www.uv.unach.mx/assets/img/prueba/directorio/userM.png" : a,
505
503
  alt: t ?? "avatar",
506
504
  className: "w-[28px] h-[28px] min-w-[28px] min-h-[28px] rounded-full bg-containers border-2 border-white"
507
505
  }
508
- ), ue = ({ trigger: a, user: t, showUser: r = !0 }) => /* @__PURE__ */ e(I, { dispatch: a, children: r && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 bg-containers w-fit h-fit p-2 rounded-lg border-containers", children: [
509
- /* @__PURE__ */ e(z, { imageUrl: t.image ?? "", alt: t.name }),
506
+ ), we = ({ trigger: a, user: t, showUser: r = !0 }) => /* @__PURE__ */ e(R, { dispatch: a, children: r && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 bg-containers w-fit h-fit p-2 rounded-lg border-containers", children: [
507
+ /* @__PURE__ */ e(I, { imageUrl: t.image ?? "", alt: t.name }),
510
508
  /* @__PURE__ */ e("p", { className: "text-xs font-bold content-text", children: t.name })
511
- ] }) }), rt = ({ options: a, onselect: t }) => {
512
- const [r, n] = y(null), l = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15), s = [...a].filter((i) => i.name.toLowerCase().includes((r == null ? void 0 : r.toLowerCase()) ?? ""));
509
+ ] }) }), pt = ({ options: a, onselect: t }) => {
510
+ const [r, n] = y(null), s = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15), l = [...a].filter((i) => i.name.toLowerCase().includes((r == null ? void 0 : r.toLowerCase()) ?? ""));
513
511
  return /* @__PURE__ */ o("div", { className: "h-fit w-full min-w-max", children: [
514
512
  /* @__PURE__ */ o("div", { className: "relative flex items-center", children: [
515
513
  /* @__PURE__ */ e(
516
514
  "input",
517
515
  {
518
- id: l,
516
+ id: s,
519
517
  value: r ?? "",
520
518
  onChange: (i) => n(i.target.value),
521
519
  type: "text",
@@ -523,17 +521,17 @@ const Ze = async ({ filters: a, tasks_api: t, project: r }) => {
523
521
  placeholder: "Buscar"
524
522
  }
525
523
  ),
526
- /* @__PURE__ */ e("div", { className: "absolute right-[8px]", children: /* @__PURE__ */ e(N, { icon: "search", size: "xs", strokeWidth: 3 }) })
524
+ /* @__PURE__ */ e("div", { className: "absolute right-[8px]", children: /* @__PURE__ */ e(v, { icon: "search", size: "xs", strokeWidth: 3 }) })
527
525
  ] }),
528
- /* @__PURE__ */ e("div", { className: "bg-bg-card border-cards rounded-lg p-2 flex flex-col gap-s overflow-y-auto max-h-[120px] min-w-max", children: s.map((i) => /* @__PURE__ */ o("button", { onClick: () => {
526
+ /* @__PURE__ */ e("div", { className: "bg-bg-card border-cards rounded-lg p-2 flex flex-col gap-s overflow-y-auto max-h-[120px] min-w-max", children: l.map((i) => /* @__PURE__ */ o("button", { onClick: () => {
529
527
  t(i);
530
528
  }, className: "flex gap-s items-center max-w-[200px] min-w-full hover:bg-primary-light cursor-pointer", children: [
531
- /* @__PURE__ */ e(z, { imageUrl: i.image, alt: i.name }),
529
+ /* @__PURE__ */ e(I, { imageUrl: i.image, alt: i.name }),
532
530
  /* @__PURE__ */ e("p", { className: "text-xs font-bold content-text", children: i.name })
533
531
  ] })) })
534
532
  ] });
535
533
  };
536
- class lt {
534
+ class ht {
537
535
  static toDomain(t) {
538
536
  return {
539
537
  id: t.id,
@@ -542,141 +540,141 @@ class lt {
542
540
  };
543
541
  }
544
542
  }
545
- const st = () => {
546
- const { tasks_api: a } = P();
547
- return { teams: J({
543
+ const xt = () => {
544
+ const { tasks_api: a } = D();
545
+ return { teams: ae({
548
546
  queryKey: ["teams", "all"],
549
547
  queryFn: async () => {
550
548
  const r = await a.get("/api/equipos");
551
- return M(r.data).map(lt.toDomain);
549
+ return M(r.data).map(ht.toDomain);
552
550
  }
553
551
  }) };
554
552
  };
555
- class it {
553
+ class gt {
556
554
  static toUsers(t) {
557
- var r, n, l;
555
+ var r, n, s;
558
556
  return {
559
557
  id: t.id,
560
558
  name: t.nombre,
561
- image: (l = (n = (r = t.imagen) == null ? void 0 : r.formats) == null ? void 0 : n.thumbnail) == null ? void 0 : l.url
559
+ image: (s = (n = (r = t.imagen) == null ? void 0 : r.formats) == null ? void 0 : n.thumbnail) == null ? void 0 : s.url
562
560
  };
563
561
  }
564
562
  }
565
- const ot = async ({
563
+ const ft = async ({
566
564
  tasks_api: a
567
565
  }) => {
568
566
  try {
569
567
  const t = await a.get("/api/allOBPUsers");
570
- return M(t.data).map(it.toUsers);
568
+ return M(t.data).map(gt.toUsers);
571
569
  } catch (t) {
572
570
  throw console.log("Error al obtener los usuarios comerciales", t), `Error al obtener los usuarios comerciales: ${t}`;
573
571
  }
574
- }, ct = () => {
575
- const { tasks_api: a } = P();
572
+ }, bt = () => {
573
+ const { tasks_api: a } = D();
576
574
  return {
577
- users: J({
575
+ users: ae({
578
576
  queryKey: ["users"],
579
- queryFn: () => ot({ tasks_api: a }),
577
+ queryFn: () => ft({ tasks_api: a }),
580
578
  staleTime: 1e3 * 60 * 60 * 24
581
579
  })
582
580
  };
583
- }, Ce = (a) => new Intl.DateTimeFormat("es-MX", { month: "long" }).format(a);
584
- function dt(a) {
581
+ }, De = (a) => new Intl.DateTimeFormat("es-MX", { month: "long" }).format(a);
582
+ function yt(a) {
585
583
  const t = ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], r = new Date(a).getDay();
586
584
  return t[r];
587
585
  }
588
- const me = (a) => {
589
- let t = a || /* @__PURE__ */ new Date(), r = t.getDate(), n = Ce(t.getMonth()).slice(0, 3), l = t.getFullYear().toString().slice(-2), s = dt(t).slice(0, 3);
590
- return `${s.charAt(0).toUpperCase() + s.slice(1)} ${r} ${n.charAt(0).toUpperCase() + n.slice(1)} ${l}`;
591
- }, re = (a) => ({
586
+ const Ne = (a) => {
587
+ let t = a || /* @__PURE__ */ new Date(), r = t.getDate(), n = De(t.getMonth()).slice(0, 3), s = t.getFullYear().toString().slice(-2), l = yt(t).slice(0, 3);
588
+ return `${l.charAt(0).toUpperCase() + l.slice(1)} ${r} ${n.charAt(0).toUpperCase() + n.slice(1)} ${s}`;
589
+ }, le = (a) => ({
592
590
  ...a,
593
591
  image: a.image ? `https://devobp.imjmedia.com.mx${a.image}` : ""
594
- }), _e = ({
592
+ }), $e = ({
595
593
  users: a,
596
594
  onClick: t,
597
595
  responsible: r
598
596
  }) => {
599
597
  let n = `button-assign-users-${Math.random().toString(36).substring(2, 15)}`;
600
- const { setElementPosition: l, position: s, clearPosition: i } = ne(), u = L(null);
598
+ const { setElementPosition: s, position: l, clearPosition: i } = se(), u = L(null);
601
599
  console.log(a);
602
600
  const c = () => r ? null : a.length > 3 && /* @__PURE__ */ e(
603
- I,
601
+ R,
604
602
  {
605
603
  dispatch: /* @__PURE__ */ e("div", { className: "w-[28px] h-[28px] rounded-full btn-primary flex items-center justify-center border-2 border-white ml-[-8px]", children: /* @__PURE__ */ e("p", { className: "text-xs font-bold text-white ", children: `+${a.length - 3}` }) }),
606
- children: /* @__PURE__ */ e("div", { className: "bg-containers w-fit h-fit p-2 rounded-lg border-containers", children: a == null ? void 0 : a.slice(3).map((x, b) => /* @__PURE__ */ o("div", { className: "flex items-center gap-2 ", children: [
607
- /* @__PURE__ */ e(z, { imageUrl: x.image ?? "", alt: x.name }, b),
608
- /* @__PURE__ */ e("p", { className: "text-xs font-bold content-text", children: x.name })
604
+ children: /* @__PURE__ */ e("div", { className: "bg-containers w-fit h-fit p-2 rounded-lg border-containers", children: a == null ? void 0 : a.slice(3).map((h, b) => /* @__PURE__ */ o("div", { className: "flex items-center gap-2 ", children: [
605
+ /* @__PURE__ */ e(I, { imageUrl: h.image ?? "", alt: h.name }, b),
606
+ /* @__PURE__ */ e("p", { className: "text-xs font-bold content-text", children: h.name })
609
607
  ] }, b)) })
610
608
  }
611
- ), p = () => {
609
+ ), m = () => {
612
610
  if (r) {
613
- let x = a.find(
611
+ let h = a.find(
614
612
  (b) => b.id === r
615
613
  );
616
614
  return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
617
- ue,
615
+ we,
618
616
  {
619
617
  trigger: /* @__PURE__ */ e(
620
- z,
618
+ I,
621
619
  {
622
- imageUrl: x == null ? void 0 : x.image,
623
- alt: x == null ? void 0 : x.name
620
+ imageUrl: h == null ? void 0 : h.image,
621
+ alt: h == null ? void 0 : h.name
624
622
  },
625
623
  r
626
624
  ),
627
- user: x,
628
- showUser: !(s != null && s.x)
625
+ user: h,
626
+ showUser: !(l != null && l.x)
629
627
  }
630
628
  ) });
631
629
  }
632
- return (a == null ? void 0 : a.length) > 0 && a.slice(0, 3).map((x, b) => /* @__PURE__ */ e("div", { className: `${b === 0 ? "" : "ml-[-8px]"}`, children: /* @__PURE__ */ e(
633
- ue,
630
+ return (a == null ? void 0 : a.length) > 0 && a.slice(0, 3).map((h, b) => /* @__PURE__ */ e("div", { className: `${b === 0 ? "" : "ml-[-8px]"}`, children: /* @__PURE__ */ e(
631
+ we,
634
632
  {
635
- trigger: /* @__PURE__ */ e(z, { imageUrl: x.image, alt: x.name }, b),
636
- user: x,
637
- showUser: !(s != null && s.x)
633
+ trigger: /* @__PURE__ */ e(I, { imageUrl: h.image, alt: h.name }, b),
634
+ user: h,
635
+ showUser: !(l != null && l.x)
638
636
  }
639
637
  ) }));
640
- }, d = ({ children: x }) => /* @__PURE__ */ e("label", { ref: u, htmlFor: n, className: "cursor-pointer flex items-center", children: x });
638
+ }, d = ({ children: h }) => /* @__PURE__ */ e("label", { ref: u, htmlFor: n, className: "cursor-pointer flex items-center", children: h });
641
639
  if (a.length === 0)
642
- return /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(N, { icon: "user", size: "xs", strokeWidth: 3 }) });
643
- const h = () => {
644
- var T;
645
- const [x, b] = y(), [g, f] = y("team"), { teams: w } = st(), { users: m } = ct();
646
- v(() => {
647
- var _, A;
648
- u.current && b(((s == null ? void 0 : s.x) ?? 0) - (((A = (_ = u.current) == null ? void 0 : _.getBoundingClientRect()) == null ? void 0 : A.width) ?? 0));
649
- }, [u == null ? void 0 : u.current, s == null ? void 0 : s.x]);
650
- const C = () => {
640
+ return /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(v, { icon: "user", size: "xs", strokeWidth: 3 }) });
641
+ const x = () => {
642
+ var S;
643
+ const [h, b] = y(), [f, g] = y("team"), { teams: N } = xt(), { users: w } = bt();
644
+ C(() => {
645
+ var _, P;
646
+ u.current && b(((l == null ? void 0 : l.x) ?? 0) - (((P = (_ = u.current) == null ? void 0 : _.getBoundingClientRect()) == null ? void 0 : P.width) ?? 0));
647
+ }, [u == null ? void 0 : u.current, l == null ? void 0 : l.x]);
648
+ const T = () => {
651
649
  const _ = [
652
650
  { id: "team", label: "Equipo" },
653
651
  { id: "responsible", label: "Responsable" }
654
652
  ];
655
- return /* @__PURE__ */ e("div", { className: "w-full flex justify-center gap-l text-texts-placeholder font-bold", children: _.map((A, D) => /* @__PURE__ */ e(
653
+ return /* @__PURE__ */ e("div", { className: "w-full flex justify-center gap-l text-texts-placeholder font-bold", children: _.map((P, p) => /* @__PURE__ */ e(
656
654
  "button",
657
655
  {
658
- className: `w-full text-sm border-texts-placeholder text-center ${g === A.id ? "text-primary-pastel" : ""} ${D === _.length - 1 ? "border-r-0" : " border-r-2"}`,
659
- onClick: () => f(A.id),
660
- children: A.label
656
+ className: `w-full text-sm border-texts-placeholder text-center ${f === P.id ? "text-primary-pastel" : ""} ${p === _.length - 1 ? "border-r-0" : " border-r-2"}`,
657
+ onClick: () => g(P.id),
658
+ children: P.label
661
659
  }
662
660
  )) });
663
661
  };
664
- return (s == null ? void 0 : s.x) && V.createPortal(
662
+ return (l == null ? void 0 : l.x) && X.createPortal(
665
663
  /* @__PURE__ */ e(
666
664
  "div",
667
665
  {
668
- className: `absolute w-[300px] h-fit ${x ? "block" : "hidden"}`,
669
- style: { top: `${s == null ? void 0 : s.y}px`, left: `${x}px` },
666
+ className: `absolute w-[300px] h-fit ${h ? "block" : "hidden"}`,
667
+ style: { top: `${l == null ? void 0 : l.y}px`, left: `${h}px` },
670
668
  children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-m bg-bg-card border-cards rounded-lg p-2 max-h-[200px] overflow-y-hidden", children: [
671
- /* @__PURE__ */ e(C, {}),
669
+ /* @__PURE__ */ e(T, {}),
672
670
  /* @__PURE__ */ e(
673
- rt,
671
+ pt,
674
672
  {
675
- options: g === "team" ? w.data.map((_) => ({
673
+ options: f === "team" ? N.data.map((_) => ({
676
674
  id: _.id,
677
675
  name: _.name,
678
676
  image: ""
679
- })) : (T = m.data) == null ? void 0 : T.map(re),
677
+ })) : (S = w.data) == null ? void 0 : S.map(le),
680
678
  onselect: (_) => {
681
679
  i(), t && t(_);
682
680
  }
@@ -688,9 +686,9 @@ const me = (a) => {
688
686
  document.body
689
687
  );
690
688
  };
691
- return /* @__PURE__ */ o(S, { children: [
689
+ return /* @__PURE__ */ o(j, { children: [
692
690
  /* @__PURE__ */ o(d, { children: [
693
- p(),
691
+ m(),
694
692
  c()
695
693
  ] }),
696
694
  /* @__PURE__ */ e(
@@ -698,56 +696,56 @@ const me = (a) => {
698
696
  {
699
697
  className: "hidden",
700
698
  id: n,
701
- onClick: () => l(u)
699
+ onClick: () => s(u)
702
700
  }
703
701
  ),
704
- /* @__PURE__ */ e(h, {})
702
+ /* @__PURE__ */ e(x, {})
705
703
  ] });
706
- }, ut = () => {
707
- const { tasks_api: a } = P(), t = W(), r = async ({ newData: s, id: i }) => (await a.put(`/api/tareas/${i}`, {
708
- data: s
709
- })).data, n = qe({
710
- mutationFn: ({ newData: s, id: i }) => r({ newData: s, id: i }),
704
+ }, wt = () => {
705
+ const { tasks_api: a } = D(), t = Q(), r = async ({ newData: l, id: i }) => (await a.put(`/api/tareas/${i}`, {
706
+ data: l
707
+ })).data, n = We({
708
+ mutationFn: ({ newData: l, id: i }) => r({ newData: l, id: i }),
711
709
  onSuccess: () => {
712
710
  t.invalidateQueries({ queryKey: ["toDoTasks"] }), t.invalidateQueries({ queryKey: ["inProgressTasks"] }), t.invalidateQueries({ queryKey: ["doneTasks"] }), console.log("Task updated successfully!");
713
711
  },
714
- onError: (s) => {
715
- console.error("Failed to update the task.", s);
712
+ onError: (l) => {
713
+ console.error("Failed to update the task.", l);
716
714
  }
717
715
  });
718
716
  return {
719
717
  //* Methods
720
- updateTask: async ({ id: s, data: i, user: u }) => {
718
+ updateTask: async ({ id: l, data: i, user: u }) => {
721
719
  let c = {
722
720
  updated_at: (/* @__PURE__ */ new Date()).toISOString(),
723
721
  updated_by: u,
724
722
  ...i
725
723
  };
726
724
  try {
727
- await n.mutateAsync({ newData: c, id: s });
728
- } catch (p) {
729
- console.error("Error updating the element:", p);
725
+ await n.mutateAsync({ newData: c, id: l });
726
+ } catch (m) {
727
+ console.error("Error updating the element:", m);
730
728
  }
731
729
  }
732
730
  };
733
- }, Te = ({ priority: a, id: t }) => {
734
- const { updateTask: r } = ut(), n = Math.random().toString(36), [l, s] = y(null), i = (c) => ({
731
+ }, Ee = ({ priority: a, id: t }) => {
732
+ const { updateTask: r } = wt(), n = Math.random().toString(36), [s, l] = y(null), i = (c) => ({
735
733
  0: F.primary.regular,
736
734
  1: F.success.regular,
737
735
  2: F.warning.regular,
738
736
  3: F.danger.regular
739
737
  })[c], u = () => {
740
- if (!l) return null;
741
- const c = ({ priority: p, text: d }) => /* @__PURE__ */ o("button", { onClick: () => {
742
- r({ id: t, data: { prioridad: p }, user: 272 }), s(null);
738
+ if (!s) return null;
739
+ const c = ({ priority: m, text: d }) => /* @__PURE__ */ o("button", { onClick: () => {
740
+ r({ id: t, data: { prioridad: m }, user: 272 }), l(null);
743
741
  }, className: "flex gap-m items-center px-l py-s hover:bg-primary-light", children: [
744
- /* @__PURE__ */ e(N, { icon: "flag", size: "xs", strokeWidth: 3, color: i(p) }),
745
- /* @__PURE__ */ e("p", { className: "text-sm", style: { color: i(p) }, children: d })
742
+ /* @__PURE__ */ e(v, { icon: "flag", size: "xs", strokeWidth: 3, color: i(m) }),
743
+ /* @__PURE__ */ e("p", { className: "text-sm", style: { color: i(m) }, children: d })
746
744
  ] });
747
- return V.createPortal(
745
+ return X.createPortal(
748
746
  /* @__PURE__ */ o("div", { onBlur: () => {
749
- s(null);
750
- }, id: `${n}-options`, style: { top: `${l.y + 5}px`, left: `${l.x + 5}px` }, className: `absolute h-fit p-m flex flex-col gap-2 bg-bg-card rounded-xl shadow-lg
747
+ l(null);
748
+ }, id: `${n}-options`, style: { top: `${s.y + 5}px`, left: `${s.x + 5}px` }, className: `absolute h-fit p-m flex flex-col gap-2 bg-bg-card rounded-xl shadow-lg
751
749
  w-max`, children: [
752
750
  /* @__PURE__ */ e(c, { priority: 0, text: "Baja" }),
753
751
  /* @__PURE__ */ e(c, { priority: 1, text: "Normal" }),
@@ -762,11 +760,11 @@ const me = (a) => {
762
760
  "label",
763
761
  {
764
762
  onBlur: () => {
765
- s(null);
763
+ l(null);
766
764
  },
767
765
  htmlFor: n,
768
766
  className: "flex items-center gap-2 cursor-pointer active:opacity-50",
769
- children: /* @__PURE__ */ e(N, { icon: "flag", size: "xs", strokeWidth: 3, color: i(a) })
767
+ children: /* @__PURE__ */ e(v, { icon: "flag", size: "xs", strokeWidth: 3, color: i(a) })
770
768
  }
771
769
  ),
772
770
  /* @__PURE__ */ e(
@@ -774,7 +772,7 @@ const me = (a) => {
774
772
  {
775
773
  id: n,
776
774
  onClick: (c) => {
777
- s(l ? null : { x: c.clientX, y: c.clientY });
775
+ l(s ? null : { x: c.clientX, y: c.clientY });
778
776
  },
779
777
  className: "hidden"
780
778
  }
@@ -782,54 +780,54 @@ const me = (a) => {
782
780
  /* @__PURE__ */ e(u, {})
783
781
  ] });
784
782
  };
785
- function mt({ items: a }) {
783
+ function Nt({ items: a }) {
786
784
  var n;
787
785
  const [t, r] = y(1);
788
- return /* @__PURE__ */ o(S, { children: [
789
- /* @__PURE__ */ e("div", { className: "flex flex-row mb-2 border-b border-neutral-100 bg-white mt-4", children: a.map((l, s) => /* @__PURE__ */ e(
786
+ return /* @__PURE__ */ o(j, { children: [
787
+ /* @__PURE__ */ e("div", { className: "flex flex-row mb-2 border-b border-neutral-100 bg-white mt-4", children: a.map((s, l) => /* @__PURE__ */ e(
790
788
  "div",
791
789
  {
792
- className: `border-r border-neutral-100 pr-3 py-1 ${s !== 0 ? "px-3" : ""}`,
790
+ className: `border-r border-neutral-100 pr-3 py-1 ${l !== 0 ? "px-3" : ""}`,
793
791
  children: /* @__PURE__ */ e(
794
- ge,
792
+ Te,
795
793
  {
796
794
  variant: "ghost",
797
- onClick: () => r(l.id),
798
- className: `text-sm font-normal rounded-none py-1 h-8 ${t === l.id ? "text-primary border-b border-primary" : "text-neutral-400 border-b-0"}`,
799
- children: l.label
795
+ onClick: () => r(s.id),
796
+ className: `text-sm font-normal rounded-none py-1 h-8 ${t === s.id ? "text-primary border-b border-primary" : "text-neutral-400 border-b-0"}`,
797
+ children: s.label
800
798
  },
801
- l.id
799
+ s.id
802
800
  )
803
801
  },
804
- l.id
802
+ s.id
805
803
  )) }),
806
- /* @__PURE__ */ e("div", { className: "pt-4 flex-1 overflow-y-auto bg-white", children: (n = a.find((l) => l.id === t)) == null ? void 0 : n.component })
804
+ /* @__PURE__ */ e("div", { className: "pt-4 flex-1 overflow-y-auto bg-white", children: (n = a.find((s) => s.id === t)) == null ? void 0 : n.component })
807
805
  ] });
808
806
  }
809
- const pt = "https://devobp.imjmedia.com.mx";
810
- function le(a) {
807
+ const Be = "https://devobp.imjmedia.com.mx";
808
+ function ie(a) {
811
809
  return a ? a.split(" ").map((n) => {
812
- var l;
813
- return (l = n[0]) == null ? void 0 : l.toUpperCase();
810
+ var s;
811
+ return (s = n[0]) == null ? void 0 : s.toUpperCase();
814
812
  }).slice(0, 2).join("") : "";
815
813
  }
816
- const ht = "https://devobp.imjmedia.com.mx";
817
- function xt({ comment: a }) {
818
- var r, n, l, s, i, u;
814
+ const vt = "https://devobp.imjmedia.com.mx";
815
+ function Ct({ comment: a }) {
816
+ var r, n, s, l, i, u;
819
817
  function t(c) {
820
- const p = Ee(c);
821
- return Be(p, { locale: k, addSuffix: !0 });
818
+ const m = Qe(c);
819
+ return He(m, { locale: re, addSuffix: !0 });
822
820
  }
823
821
  return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ o("div", { className: "flex flex-row gap-3 items-start", children: [
824
- /* @__PURE__ */ o(ee, { className: "w-[48px] h-[48px]", children: [
822
+ /* @__PURE__ */ o(J, { className: "w-[28px] h-[28px]", children: [
825
823
  /* @__PURE__ */ e(
826
- te,
824
+ Z,
827
825
  {
828
- src: `${ht}${(s = (l = (n = (r = a == null ? void 0 : a.autor) == null ? void 0 : r.imagen) == null ? void 0 : n.formats) == null ? void 0 : l.thumbnail) == null ? void 0 : s.url}`,
826
+ src: `${vt}${(l = (s = (n = (r = a == null ? void 0 : a.autor) == null ? void 0 : r.imagen) == null ? void 0 : n.formats) == null ? void 0 : s.thumbnail) == null ? void 0 : l.url}`,
829
827
  alt: "@shadcn"
830
828
  }
831
829
  ),
832
- /* @__PURE__ */ e(ae, { children: le((i = a == null ? void 0 : a.autor) == null ? void 0 : i.nombre) })
830
+ /* @__PURE__ */ e(k, { children: ie((i = a == null ? void 0 : a.autor) == null ? void 0 : i.nombre) })
833
831
  ] }),
834
832
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
835
833
  /* @__PURE__ */ o("div", { className: "flex flex-row gap-2", children: [
@@ -840,64 +838,64 @@ function xt({ comment: a }) {
840
838
  ] })
841
839
  ] }) });
842
840
  }
843
- function gt({ currentUser: a, data: t, taskId: r, onNewComment: n }) {
844
- var h, x, b;
845
- const { tasks_api: l } = P(), { register: s, handleSubmit: i, reset: u } = We(), [c, p] = y([]);
846
- return v(() => {
841
+ function _t({ currentUser: a, data: t, taskId: r, onNewComment: n }) {
842
+ var x, h, b;
843
+ const { tasks_api: s } = D(), { register: l, handleSubmit: i, reset: u } = ke(), [c, m] = y([]);
844
+ return C(() => {
847
845
  if (t != null && t.comentarios) {
848
- const g = [...t.comentarios].sort(
849
- (f, w) => new Date(w.createdAt).getTime() - new Date(f.createdAt).getTime()
846
+ const f = [...t.comentarios].sort(
847
+ (g, N) => new Date(N.createdAt).getTime() - new Date(g.createdAt).getTime()
850
848
  );
851
- p(g);
849
+ m(f);
852
850
  }
853
851
  }, [t]), /* @__PURE__ */ o("div", { className: "flex flex-col h-full gap-4", children: [
854
- /* @__PURE__ */ o("form", { onSubmit: i(async (g) => {
852
+ /* @__PURE__ */ o("form", { onSubmit: i(async (f) => {
855
853
  try {
856
- const f = {
854
+ const g = {
857
855
  autor: {
858
856
  id: a == null ? void 0 : a.id,
859
857
  email: a == null ? void 0 : a.email,
860
858
  nombre: a == null ? void 0 : a.nombre,
861
859
  imagen: a == null ? void 0 : a.imagen
862
860
  },
863
- comentario: g == null ? void 0 : g.comment,
861
+ comentario: f == null ? void 0 : f.comment,
864
862
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
865
863
  };
866
- await l.post("/api/comentarios", {
864
+ await s.post("/api/comentarios", {
867
865
  data: {
868
866
  autor: a == null ? void 0 : a.id,
869
- comentario: g.comment,
867
+ comentario: f.comment,
870
868
  tarea: r
871
869
  }
872
- }), n(!0), p((w) => [f, ...w]), u();
873
- } catch (f) {
874
- console.error("Error al agregar comentario:", f);
870
+ }), n(!0), m((N) => [g, ...N]), u();
871
+ } catch (g) {
872
+ console.error("Error al agregar comentario:", g);
875
873
  }
876
874
  }), className: "flex flex-row items-center gap-3", children: [
877
- /* @__PURE__ */ o(ee, { className: "w-[48px] h-[48px]", children: [
875
+ /* @__PURE__ */ o(J, { className: "w-[28px] h-[28px]", children: [
878
876
  /* @__PURE__ */ e(
879
- te,
877
+ Z,
880
878
  {
881
- src: `${pt}${(b = (x = (h = a == null ? void 0 : a.imagen) == null ? void 0 : h.formats) == null ? void 0 : x.thumbnail) == null ? void 0 : b.url}`,
879
+ src: `${Be}${(b = (h = (x = a == null ? void 0 : a.imagen) == null ? void 0 : x.formats) == null ? void 0 : h.thumbnail) == null ? void 0 : b.url}`,
882
880
  alt: "@shadcn"
883
881
  }
884
882
  ),
885
- /* @__PURE__ */ e(ae, { className: "border border-x-primary-pastel", children: le(a == null ? void 0 : a.nombre) })
883
+ /* @__PURE__ */ e(k, { className: "border border-x-primary-pastel", children: ie(a == null ? void 0 : a.nombre) })
886
884
  ] }),
887
885
  /* @__PURE__ */ e(
888
- Le,
886
+ Ve,
889
887
  {
890
- ...s("comment", { required: !0 }),
888
+ ...l("comment", { required: !0 }),
891
889
  autoComplete: "off",
892
890
  placeholder: "Escribe un comentario",
893
891
  className: "w-full bg-white border border-neutral-200"
894
892
  }
895
893
  )
896
894
  ] }),
897
- c.map((g, f) => /* @__PURE__ */ e(xt, { comment: g }, f))
895
+ c.map((f, g) => /* @__PURE__ */ e(Ct, { comment: f }, g))
898
896
  ] });
899
897
  }
900
- function ft({ data: a }) {
898
+ function Tt({ data: a }) {
901
899
  const t = {
902
900
  0: {
903
901
  color: "bg-gray-400",
@@ -915,21 +913,21 @@ function ft({ data: a }) {
915
913
  color: "bg-success-regular",
916
914
  label: "Finalizada"
917
915
  }
918
- }, r = (n) => n ? xe(new Date(n), "d MMM", { locale: k }) : "";
916
+ }, r = (n) => n ? _e(new Date(n), "d MMM", { locale: re }) : "";
919
917
  return /* @__PURE__ */ o("div", { children: [
920
918
  /* @__PURE__ */ o("div", { className: "flex flex-row items-center gap-4", children: [
921
- /* @__PURE__ */ e(Me, { className: "text-lg font-medium text-neutral-900", children: "Tareas dependientes" }),
919
+ /* @__PURE__ */ e(Ge, { className: "text-lg font-medium text-neutral-900", children: "Tareas dependientes" }),
922
920
  /* @__PURE__ */ e("span", { className: "text-sm font-normal text-neutral-600 bg-[#E1EBF9] w-6 h-6 rounded-full flex items-center justify-center text-primary", children: a == null ? void 0 : a.length })
923
921
  ] }),
924
922
  /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 border border-neutral-200 rounded-lg mt-3", children: a == null ? void 0 : a.map((n) => {
925
- var l, s, i, u, c;
923
+ var s, l, i, u, c;
926
924
  return /* @__PURE__ */ o(
927
925
  "div",
928
926
  {
929
927
  className: "flex flex-row w-full items-center justify-between gap-s border-b border-neutral-200 py-1 px-2",
930
928
  children: [
931
929
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
932
- /* @__PURE__ */ e(z, { imageUrl: (u = (i = (s = (l = n.responsable) == null ? void 0 : l.image) == null ? void 0 : s.formats) == null ? void 0 : i.thumbnail) == null ? void 0 : u.url }),
930
+ /* @__PURE__ */ e(I, { imageUrl: (u = (i = (l = (s = n.responsable) == null ? void 0 : s.image) == null ? void 0 : l.formats) == null ? void 0 : i.thumbnail) == null ? void 0 : u.url }),
933
931
  /* @__PURE__ */ e("p", { className: "text-sm font-normal w-[400px] text-nowrap text-ellipsis overflow-hidden", children: n == null ? void 0 : n.texto_corto })
934
932
  ] }),
935
933
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
@@ -948,26 +946,26 @@ function ft({ data: a }) {
948
946
  }) })
949
947
  ] });
950
948
  }
951
- const bt = "https://devobp.imjmedia.com.mx";
952
- function yt({ isOpen: a, setIsOpen: t, taskId: r }) {
953
- var g, f, w, m, C, T, _, A, D, q, j;
954
- const [n, l] = y(null), [s, i] = y(!1), [u, c] = y(null), { tasks_api: p } = P(), { user: d } = R();
955
- v(() => {
956
- if (a && r || s) {
949
+ const Ft = "https://devobp.imjmedia.com.mx";
950
+ function Pt({ isOpen: a, setIsOpen: t, taskId: r }) {
951
+ var f, g, N, w, T, S, _, P, p, A, q;
952
+ const [n, s] = y(null), [l, i] = y(!1), [u, c] = y(null), { tasks_api: m } = D(), { user: d } = W();
953
+ C(() => {
954
+ if (a && r || l) {
957
955
  const E = async () => {
958
- const B = await p.get(`/api/detalleTarea/${r}`);
959
- l(B == null ? void 0 : B.data);
960
- }, Q = async () => {
961
- var oe, ce;
962
- const B = await p.get(`/api/users/${d.id}`), X = await p.post("/api/obtenerUsuarioOBP/", {
963
- emailList: [(oe = B == null ? void 0 : B.data) == null ? void 0 : oe.email]
956
+ const $ = await m.get(`/api/detalleTarea/${r}`);
957
+ s($ == null ? void 0 : $.data);
958
+ }, G = async () => {
959
+ var U, K;
960
+ const $ = await m.get(`/api/users/${d.id}`), z = await m.post("/api/obtenerUsuarioOBP/", {
961
+ emailList: [(U = $ == null ? void 0 : $.data) == null ? void 0 : U.email]
964
962
  });
965
- c((ce = X == null ? void 0 : X.data) == null ? void 0 : ce.data[0]);
963
+ c((K = z == null ? void 0 : z.data) == null ? void 0 : K.data[0]);
966
964
  };
967
- E(), Q();
965
+ E(), G();
968
966
  }
969
- }, [a, r, s]);
970
- const h = {
967
+ }, [a, r, l]);
968
+ const x = {
971
969
  0: {
972
970
  label: "Sin prioridad",
973
971
  color: "text-primary-regular",
@@ -988,14 +986,14 @@ function yt({ isOpen: a, setIsOpen: t, taskId: r }) {
988
986
  color: "text-danger-regular",
989
987
  iconColor: "#C34335"
990
988
  }
991
- }, x = (E) => E ? xe(E, "d MMM yyyy, h:mmaaa", {
992
- locale: k
989
+ }, h = (E) => E ? _e(E, "d MMM yyyy, h:mmaaa", {
990
+ locale: re
993
991
  }) : "Fecha no disponible", b = [
994
992
  {
995
993
  id: 1,
996
994
  label: "Todo",
997
995
  component: /* @__PURE__ */ e(
998
- gt,
996
+ _t,
999
997
  {
1000
998
  taskId: r,
1001
999
  currentUser: u,
@@ -1007,10 +1005,10 @@ function yt({ isOpen: a, setIsOpen: t, taskId: r }) {
1007
1005
  {
1008
1006
  id: 2,
1009
1007
  label: "Dependencias",
1010
- component: /* @__PURE__ */ e(ft, { data: n == null ? void 0 : n.ids_t_dependientes })
1008
+ component: /* @__PURE__ */ e(Tt, { data: n == null ? void 0 : n.ids_t_dependientes })
1011
1009
  }
1012
1010
  ];
1013
- return /* @__PURE__ */ e(S, { children: /* @__PURE__ */ o(S, { children: [
1011
+ return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ o(j, { children: [
1014
1012
  /* @__PURE__ */ e(
1015
1013
  "div",
1016
1014
  {
@@ -1026,13 +1024,13 @@ function yt({ isOpen: a, setIsOpen: t, taskId: r }) {
1026
1024
  /* @__PURE__ */ o("div", { className: "w-full flex flex-row justify-between pb-4 gap-10 border-none", children: [
1027
1025
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-neutral-900", children: n == null ? void 0 : n.texto_corto }),
1028
1026
  /* @__PURE__ */ e(
1029
- ge,
1027
+ Te,
1030
1028
  {
1031
1029
  variant: "shadow",
1032
1030
  size: "sm",
1033
1031
  onClick: () => t(!1),
1034
1032
  className: "bg-neutral-100 w-10 h-10",
1035
- children: /* @__PURE__ */ e(N, { icon: "x_outline" })
1033
+ children: /* @__PURE__ */ e(v, { icon: "x_outline" })
1036
1034
  }
1037
1035
  )
1038
1036
  ] }),
@@ -1046,52 +1044,52 @@ function yt({ isOpen: a, setIsOpen: t, taskId: r }) {
1046
1044
  /* @__PURE__ */ e("p", { className: "text-neutral-600 font-normal text-sm", children: (n == null ? void 0 : n.texto_largo) ?? "Sin descripción" })
1047
1045
  ] }),
1048
1046
  /* @__PURE__ */ e(
1049
- ze,
1047
+ Ye,
1050
1048
  {
1051
1049
  type: "single",
1052
1050
  collapsible: !0,
1053
1051
  defaultValue: "item-1",
1054
1052
  className: "w-full flex flex-col border border-neutral-200 rounded-xl mt-4",
1055
- children: /* @__PURE__ */ o(Oe, { value: "item-1", className: "border-none", children: [
1056
- /* @__PURE__ */ e(Ie, { className: "text-neutral-900 font-medium text-sm w-full flex flex-row border-b border-neutral-200 p-4 ", children: "Detalles" }),
1057
- /* @__PURE__ */ e(Re, { className: "border-none", children: /* @__PURE__ */ o("div", { className: "w-[100%] grid grid-cols-3 gap-4 p-4", children: [
1053
+ children: /* @__PURE__ */ o(Xe, { value: "item-1", className: "border-none", children: [
1054
+ /* @__PURE__ */ e(Je, { className: "text-neutral-900 font-medium text-sm w-full flex flex-row border-b border-neutral-200 p-4 ", children: "Detalles" }),
1055
+ /* @__PURE__ */ e(Ze, { className: "border-none", children: /* @__PURE__ */ o("div", { className: "w-[100%] grid grid-cols-3 gap-4 p-4", children: [
1058
1056
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1059
1057
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Responsable" }),
1060
- (g = n == null ? void 0 : n.responsable) != null && g.nombre ? /* @__PURE__ */ o("div", { className: "flex flex-row gap-2 items-center", children: [
1061
- /* @__PURE__ */ o(ee, { className: "w-8 h-8", children: [
1058
+ (f = n == null ? void 0 : n.responsable) != null && f.nombre ? /* @__PURE__ */ o("div", { className: "flex flex-row gap-2 items-center", children: [
1059
+ /* @__PURE__ */ o(J, { className: "w-[28px] h-[28px]", children: [
1062
1060
  /* @__PURE__ */ e(
1063
- te,
1061
+ Z,
1064
1062
  {
1065
- src: `${bt}${(C = (m = (w = (f = n == null ? void 0 : n.responsable) == null ? void 0 : f.imagen) == null ? void 0 : w.formats) == null ? void 0 : m.thumbnail) == null ? void 0 : C.url}`,
1063
+ src: `${Ft}${(T = (w = (N = (g = n == null ? void 0 : n.responsable) == null ? void 0 : g.imagen) == null ? void 0 : N.formats) == null ? void 0 : w.thumbnail) == null ? void 0 : T.url}`,
1066
1064
  alt: "@shadcn"
1067
1065
  }
1068
1066
  ),
1069
- /* @__PURE__ */ e(ae, { children: le((T = n == null ? void 0 : n.responsable) == null ? void 0 : T.nombre) })
1067
+ /* @__PURE__ */ e(k, { children: ie((S = n == null ? void 0 : n.responsable) == null ? void 0 : S.nombre) })
1070
1068
  ] }),
1071
1069
  /* @__PURE__ */ e("span", { className: "text-xs text-neutral-600 font-normal", children: (_ = n == null ? void 0 : n.responsable) == null ? void 0 : _.nombre })
1072
1070
  ] }) : /* @__PURE__ */ e("span", { className: "text-xs text-neutral-600 font-normal", children: "Sin responsable" })
1073
1071
  ] }),
1074
1072
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1075
1073
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Equipo asignado" }),
1076
- /* @__PURE__ */ e("div", { className: "flex flex-row gap-2", children: /* @__PURE__ */ e("span", { className: "text-xs text-neutral-600 font-normal", children: ((A = n == null ? void 0 : n.equipo) == null ? void 0 : A.nombre) ?? "Sin equipo" }) })
1074
+ /* @__PURE__ */ e("div", { className: "flex flex-row gap-2", children: /* @__PURE__ */ e("span", { className: "text-xs text-neutral-600 font-normal", children: ((P = n == null ? void 0 : n.equipo) == null ? void 0 : P.nombre) ?? "Sin equipo" }) })
1077
1075
  ] }),
1078
1076
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1079
1077
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Prioridad" }),
1080
1078
  /* @__PURE__ */ o("div", { className: "flex flex-row items-center gap-2", children: [
1081
1079
  /* @__PURE__ */ e(
1082
- N,
1080
+ v,
1083
1081
  {
1084
1082
  icon: "flag",
1085
1083
  size: "xs",
1086
1084
  strokeWidth: 5,
1087
- color: (D = h[n == null ? void 0 : n.prioridad]) == null ? void 0 : D.iconColor
1085
+ color: (p = x[n == null ? void 0 : n.prioridad]) == null ? void 0 : p.iconColor
1088
1086
  }
1089
1087
  ),
1090
1088
  /* @__PURE__ */ e(
1091
1089
  "span",
1092
1090
  {
1093
- className: `text-sm text-neutral-600 font-normal ${(q = h[n == null ? void 0 : n.prioridad]) == null ? void 0 : q.color}`,
1094
- children: ((j = h[n == null ? void 0 : n.prioridad]) == null ? void 0 : j.label) ?? "Sin prioridad"
1091
+ className: `text-sm text-neutral-600 font-normal ${(A = x[n == null ? void 0 : n.prioridad]) == null ? void 0 : A.color}`,
1092
+ children: ((q = x[n == null ? void 0 : n.prioridad]) == null ? void 0 : q.label) ?? "Sin prioridad"
1095
1093
  }
1096
1094
  )
1097
1095
  ] })
@@ -1102,95 +1100,95 @@ function yt({ isOpen: a, setIsOpen: t, taskId: r }) {
1102
1100
  ] }),
1103
1101
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1104
1102
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Fecha estimada de inicio" }),
1105
- /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: x(n == null ? void 0 : n.f_inicio_estimada) })
1103
+ /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: h(n == null ? void 0 : n.f_inicio_estimada) })
1106
1104
  ] }),
1107
1105
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1108
1106
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Fecha estimada de fin" }),
1109
- /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: x(n == null ? void 0 : n.f_fin_estimada) })
1107
+ /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: h(n == null ? void 0 : n.f_fin_estimada) })
1110
1108
  ] }),
1111
1109
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1112
1110
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Fecha de fin" }),
1113
- /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: x(n == null ? void 0 : n.ffin) })
1111
+ /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: h(n == null ? void 0 : n.ffin) })
1114
1112
  ] }),
1115
1113
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1116
1114
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Creado" }),
1117
- /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: x(n == null ? void 0 : n.createdAt) })
1115
+ /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: h(n == null ? void 0 : n.createdAt) })
1118
1116
  ] }),
1119
1117
  /* @__PURE__ */ o("div", { className: "flex flex-col w-auto gap-2", children: [
1120
1118
  /* @__PURE__ */ e("span", { className: "text-sm text-neutral-900 font-medium", children: "Última modificación" }),
1121
- /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: x(n == null ? void 0 : n.updatedAt) })
1119
+ /* @__PURE__ */ e("p", { className: "text-xs text-neutral-600 font-normal", children: h(n == null ? void 0 : n.updatedAt) })
1122
1120
  ] })
1123
1121
  ] }) })
1124
1122
  ] })
1125
1123
  }
1126
1124
  ),
1127
- /* @__PURE__ */ e(mt, { items: b })
1125
+ /* @__PURE__ */ e(Nt, { items: b })
1128
1126
  ] })
1129
1127
  }
1130
1128
  )
1131
1129
  ] }) });
1132
1130
  }
1133
- const wt = ({
1131
+ const St = ({
1134
1132
  id: a,
1135
1133
  task: t,
1136
1134
  endDate: r,
1137
1135
  users: n,
1138
- willBePaused: l,
1139
- nameProject: s,
1136
+ willBePaused: s,
1137
+ nameProject: l,
1140
1138
  idProject: i,
1141
1139
  comments: u,
1142
1140
  priority: c,
1143
- responsible: p,
1141
+ responsible: m,
1144
1142
  nameRequiredTask: d,
1145
- statusRequiredTask: h,
1146
- status: x
1143
+ statusRequiredTask: x,
1144
+ status: h
1147
1145
  }) => {
1148
- const b = L(null), [g, f] = y(!1), { setElementPosition: w, position: m } = ne(), C = ({ children: _ }) => {
1149
- const [A, D] = y();
1150
- return v(() => {
1151
- var q, j;
1152
- b.current && D(
1153
- ((m == null ? void 0 : m.x) ?? 0) - (((j = (q = b.current) == null ? void 0 : q.getBoundingClientRect()) == null ? void 0 : j.width) ?? 0)
1146
+ const b = L(null), [f, g] = y(!1), { setElementPosition: N, position: w } = se(), T = ({ children: _ }) => {
1147
+ const [P, p] = y();
1148
+ return C(() => {
1149
+ var A, q;
1150
+ b.current && p(
1151
+ ((w == null ? void 0 : w.x) ?? 0) - (((q = (A = b.current) == null ? void 0 : A.getBoundingClientRect()) == null ? void 0 : q.width) ?? 0)
1154
1152
  );
1155
- }, [b == null ? void 0 : b.current, m == null ? void 0 : m.x]), m && V.createPortal(
1153
+ }, [b == null ? void 0 : b.current, w == null ? void 0 : w.x]), w && X.createPortal(
1156
1154
  /* @__PURE__ */ e(
1157
1155
  "div",
1158
1156
  {
1159
- className: `absolute w-fit h-fit ${A ? "block" : "hidden"}`,
1160
- style: { top: `${m == null ? void 0 : m.y}px`, left: `${A}px` },
1157
+ className: `absolute w-fit h-fit ${P ? "block" : "hidden"}`,
1158
+ style: { top: `${w == null ? void 0 : w.y}px`, left: `${P}px` },
1161
1159
  children: _
1162
1160
  }
1163
1161
  ),
1164
1162
  document.body
1165
1163
  );
1166
1164
  };
1167
- return /* @__PURE__ */ o(S, { children: [
1165
+ return /* @__PURE__ */ o(j, { children: [
1168
1166
  /* @__PURE__ */ o("div", { className: "bg-bg-card border-cards max-w-[350px] rounded-lg relative h-fit p-[12px_12px] hover:border-active hover:bg-active cursor-pointer ", children: [
1169
1167
  /* @__PURE__ */ e(() => /* @__PURE__ */ o("div", { className: "flex justify-between items-center w-full h-fit relative", children: [
1170
1168
  /* @__PURE__ */ o("div", { className: "flex items-center gap-[8px] w-[calc(100%-32px)] ", children: [
1171
1169
  /* @__PURE__ */ e(
1172
- ve,
1170
+ je,
1173
1171
  {
1174
1172
  id: a,
1175
1173
  nameRequiredTask: d ?? "",
1176
- statusRequiredTask: h ?? 0,
1177
- status: x
1174
+ statusRequiredTask: x ?? 0,
1175
+ status: h
1178
1176
  }
1179
1177
  ),
1180
- /* @__PURE__ */ e("p", { className: "title-text", onClick: () => f(!0), children: t })
1178
+ /* @__PURE__ */ e("p", { className: "title-text", onClick: () => g(!0), children: t })
1181
1179
  ] }),
1182
1180
  /* @__PURE__ */ e(
1183
1181
  "button",
1184
1182
  {
1185
1183
  ref: b,
1186
1184
  onClick: () => {
1187
- w(b);
1185
+ N(b);
1188
1186
  },
1189
1187
  className: "flex items-center justify-center text-sm font-extrabold bg-bg hover:filter-[drop-shadow(0_0_10px_#000000)] rounded-full w-[24px] h-[24px] m-block",
1190
- children: /* @__PURE__ */ e("span", { className: "rotate-90", children: /* @__PURE__ */ e(N, { icon: "elipsis", size: "xs" }) })
1188
+ children: /* @__PURE__ */ e("span", { className: "rotate-90", children: /* @__PURE__ */ e(v, { icon: "elipsis", size: "xs" }) })
1191
1189
  }
1192
1190
  ),
1193
- /* @__PURE__ */ e(C, { children: /* @__PURE__ */ o(
1191
+ /* @__PURE__ */ e(T, { children: /* @__PURE__ */ o(
1194
1192
  "button",
1195
1193
  {
1196
1194
  className: "w-max h-fit bg-bg-card rounded-lg p-l shadow-lg flex items-center gap-2 hover:bg-primary-light",
@@ -1199,7 +1197,7 @@ const wt = ({
1199
1197
  children: [
1200
1198
  /* @__PURE__ */ e("p", { className: "text-sm font-normal text-texts-placeholder font-regular", children: "Mover a trabajando" }),
1201
1199
  /* @__PURE__ */ e(
1202
- N,
1200
+ v,
1203
1201
  {
1204
1202
  icon: "arrow_right",
1205
1203
  size: "xs",
@@ -1212,26 +1210,26 @@ const wt = ({
1212
1210
  ) })
1213
1211
  ] }), {}),
1214
1212
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-[4px] py-2", children: [
1215
- /* @__PURE__ */ e("p", { className: "subtitle-text", children: s }),
1213
+ /* @__PURE__ */ e("p", { className: "subtitle-text", children: l }),
1216
1214
  i && // TODO: Add nameMEDIUM
1217
1215
  /* @__PURE__ */ e("p", { className: "content-text", children: i })
1218
1216
  ] }),
1219
1217
  /* @__PURE__ */ o("div", { className: "flex justify-between items-center w-full h-fit relative pt-5 pb-1", children: [
1220
1218
  /* @__PURE__ */ o("div", { className: "flex items-center relative", children: [
1221
1219
  /* @__PURE__ */ e(
1222
- _e,
1220
+ $e,
1223
1221
  {
1224
- responsible: p,
1225
- users: n.filter((_) => p ? _.id === p : !0).map(re),
1222
+ responsible: m,
1223
+ users: n.filter((_) => m ? _.id === m : !0).map(le),
1226
1224
  onClick: () => {
1227
1225
  }
1228
1226
  }
1229
1227
  ),
1230
- l && /* @__PURE__ */ e(
1231
- I,
1228
+ s && /* @__PURE__ */ e(
1229
+ R,
1232
1230
  {
1233
1231
  dispatch: /* @__PURE__ */ o("button", { className: "text-sm font-regular text-gray-400 flex items-center gap-2", children: [
1234
- /* @__PURE__ */ e(N, { icon: "pause", size: "s", strokeWidth: 2 }),
1232
+ /* @__PURE__ */ e(v, { icon: "pause", size: "s", strokeWidth: 2 }),
1235
1233
  /* @__PURE__ */ e("span", { children: "Pause" })
1236
1234
  ] }),
1237
1235
  children: /* @__PURE__ */ e("p", { className: "text-sm font-regular text-white p-5", children: "Al pulsar el botón se solicitará razón del pausado" })
@@ -1239,10 +1237,10 @@ const wt = ({
1239
1237
  )
1240
1238
  ] }),
1241
1239
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
1242
- /* @__PURE__ */ e(N, { icon: "at", size: "xs" }),
1243
- /* @__PURE__ */ e(Te, { priority: c, id: a }),
1240
+ /* @__PURE__ */ e(v, { icon: "at", size: "xs" }),
1241
+ /* @__PURE__ */ e(Ee, { priority: c, id: a }),
1244
1242
  /* @__PURE__ */ e(
1245
- N,
1243
+ v,
1246
1244
  {
1247
1245
  icon: "calendar",
1248
1246
  size: "xs",
@@ -1250,17 +1248,17 @@ const wt = ({
1250
1248
  color: F.texts.subtext
1251
1249
  }
1252
1250
  ),
1253
- /* @__PURE__ */ e("p", { className: "text-sm font-regular text-texts-subtext", children: `${r.getDate()} ${Ce(r.getMonth()).slice(0, 3)}` })
1251
+ /* @__PURE__ */ e("p", { className: "text-sm font-regular text-texts-subtext", children: `${r.getDate()} ${De(r.getMonth()).slice(0, 3)}` })
1254
1252
  ] })
1255
1253
  ] }),
1256
1254
  u > 0 && /* @__PURE__ */ e("div", { className: "border-t border-gray-200 mt-4 pt-2", children: /* @__PURE__ */ o("button", { className: "flex items-center gap-2", children: [
1257
- /* @__PURE__ */ e(N, { icon: "comment", size: "xs", strokeWidth: 4 }),
1255
+ /* @__PURE__ */ e(v, { icon: "comment", size: "xs", strokeWidth: 4 }),
1258
1256
  /* @__PURE__ */ e("span", { className: "text-sm font-regular text-gray-400", children: u })
1259
1257
  ] }) })
1260
1258
  ] }),
1261
- /* @__PURE__ */ e(yt, { taskId: a, isOpen: g, setIsOpen: f })
1259
+ /* @__PURE__ */ e(Pt, { taskId: a, isOpen: f, setIsOpen: g })
1262
1260
  ] });
1263
- }, Nt = () => /* @__PURE__ */ o("div", { className: "bg-gray-200 h-[150px] w-full animate-pulse rounded-md flex flex-col gap-[50px] p-4", children: [
1261
+ }, At = () => /* @__PURE__ */ o("div", { className: "bg-gray-200 h-[150px] w-full animate-pulse rounded-md flex flex-col gap-[50px] p-4", children: [
1264
1262
  /* @__PURE__ */ o("div", { className: "flex h-[30px] gap-3", children: [
1265
1263
  /* @__PURE__ */ e("div", { className: "w-[30px] min-w-[30px] h-full bg-gray-300 rounded-full" }),
1266
1264
  /* @__PURE__ */ e("div", { className: "w-full h-full bg-gray-300" }),
@@ -1270,23 +1268,23 @@ const wt = ({
1270
1268
  /* @__PURE__ */ e("div", { className: "w-full h-[30px] bg-gray-300" }),
1271
1269
  /* @__PURE__ */ e("div", { className: "w-full h-[30px] bg-gray-300" })
1272
1270
  ] })
1273
- ] }), Y = ({ title: a, tasks: t, loadNextPage: r, isFetching: n, total: l }) => {
1274
- const s = L(null), i = L(null), u = L(!1);
1275
- v(() => {
1271
+ ] }), te = ({ title: a, tasks: t, loadNextPage: r, isFetching: n, total: s }) => {
1272
+ const l = L(null), i = L(null), u = L(!1);
1273
+ C(() => {
1276
1274
  var d;
1277
- s != null && s.current && (i != null && i.current) && (i.current.style.minHeight = `${((d = s == null ? void 0 : s.current) == null ? void 0 : d.clientHeight) - 50}px`);
1278
- }, [s == null ? void 0 : s.current]);
1275
+ l != null && l.current && (i != null && i.current) && (i.current.style.minHeight = `${((d = l == null ? void 0 : l.current) == null ? void 0 : d.clientHeight) - 50}px`);
1276
+ }, [l == null ? void 0 : l.current]);
1279
1277
  const c = (d) => {
1280
1278
  if (u.current) return;
1281
- const { scrollTop: h, clientHeight: x, scrollHeight: b } = d == null ? void 0 : d.target, g = h / (b - x) * 100;
1282
- g <= 95 || g >= 95 && (u.current = !0, r && r(), setTimeout(() => {
1279
+ const { scrollTop: x, clientHeight: h, scrollHeight: b } = d == null ? void 0 : d.target, f = x / (b - h) * 100;
1280
+ f <= 95 || f >= 95 && (u.current = !0, r && r(), setTimeout(() => {
1283
1281
  u.current = !1;
1284
1282
  }, 200));
1285
1283
  };
1286
1284
  return /* @__PURE__ */ o(
1287
1285
  "div",
1288
1286
  {
1289
- ref: s,
1287
+ ref: l,
1290
1288
  className: ` flex flex-col bg-containers w-fit max-w-[400px] min-w-[400px] h-full min-h-[100%] pb-[200px] relative p-[16px] rounded-lg overflow-hidden border-t-4 ${{
1291
1289
  "Por hacer": "border-texts-placeholder",
1292
1290
  Trabajando: "border-primary-regular",
@@ -1297,7 +1295,7 @@ const wt = ({
1297
1295
  /* @__PURE__ */ e("div", { className: "flex items-center gap-[8px]", children: /* @__PURE__ */ e("p", { className: "text-base", children: a }) }),
1298
1296
  /* @__PURE__ */ e("div", { className: "flex items-center gap-[8px]", children: /* @__PURE__ */ o("div", { className: "flex items-center gap-[4px]", children: [
1299
1297
  /* @__PURE__ */ e(
1300
- N,
1298
+ v,
1301
1299
  {
1302
1300
  icon: "group_files",
1303
1301
  size: "xs",
@@ -1305,7 +1303,7 @@ const wt = ({
1305
1303
  color: F.texts.placeholder
1306
1304
  }
1307
1305
  ),
1308
- /* @__PURE__ */ e("p", { className: "text-md text-texts-placeholder", children: l ?? 0 })
1306
+ /* @__PURE__ */ e("p", { className: "text-md text-texts-placeholder", children: s ?? 0 })
1309
1307
  ] }) })
1310
1308
  ] }),
1311
1309
  /* @__PURE__ */ o(
@@ -1315,34 +1313,34 @@ const wt = ({
1315
1313
  className: "flex flex-col gap-[12px] overflow-y-auto scrollbar-none py-4",
1316
1314
  onScroll: c,
1317
1315
  children: [
1318
- t == null ? void 0 : t.map((d) => /* @__PURE__ */ e(wt, { ...d }, d.id)),
1319
- n ? /* @__PURE__ */ e(Nt, {}) : /* @__PURE__ */ e("p", { className: "text-center text-gray-500", children: "No hay más tareas por mostrar..." })
1316
+ t == null ? void 0 : t.map((d) => /* @__PURE__ */ e(St, { ...d }, d.id)),
1317
+ n ? /* @__PURE__ */ e(At, {}) : /* @__PURE__ */ e("p", { className: "text-center text-gray-500", children: "No hay más tareas por mostrar..." })
1320
1318
  ]
1321
1319
  }
1322
1320
  )
1323
1321
  ]
1324
1322
  }
1325
1323
  );
1326
- }, vt = () => {
1327
- var l;
1328
- const { defineFields: a } = $(), { tasksProject: t } = G();
1329
- v(() => {
1324
+ }, qt = () => {
1325
+ var s;
1326
+ const { defineFields: a } = B(), { tasksProject: t } = ee();
1327
+ C(() => {
1330
1328
  (async () => {
1331
- let i = [...at];
1329
+ let i = [...ut];
1332
1330
  a(i);
1333
1331
  })();
1334
1332
  }, []);
1335
- let r = (l = t == null ? void 0 : t.data) == null ? void 0 : l.filter((s) => {
1333
+ let r = (s = t == null ? void 0 : t.data) == null ? void 0 : s.filter((l) => {
1336
1334
  var i;
1337
- return ((i = s == null ? void 0 : s.tasks) == null ? void 0 : i.length) === 0;
1338
- }).reduce((s, i) => (s[i.status] = s[i.status] || [], s[i.status].push(i), s), {});
1339
- return /* @__PURE__ */ e("div", { className: "flex gap-4 w-full h-full min-h-[100%] relative ", children: ["Por hacer", "Trabajando", "Completadas"].map((s, i) => {
1335
+ return ((i = l == null ? void 0 : l.tasks) == null ? void 0 : i.length) === 0;
1336
+ }).reduce((l, i) => (l[i.status] = l[i.status] || [], l[i.status].push(i), l), {});
1337
+ return /* @__PURE__ */ e("div", { className: "flex gap-4 w-full h-full min-h-[100%] relative ", children: ["Por hacer", "Trabajando", "Completadas"].map((l, i) => {
1340
1338
  var u;
1341
1339
  return /* @__PURE__ */ e(
1342
- Y,
1340
+ te,
1343
1341
  {
1344
1342
  total: ((u = r == null ? void 0 : r[i]) == null ? void 0 : u.length) ?? 0,
1345
- title: s,
1343
+ title: l,
1346
1344
  tasks: (r == null ? void 0 : r[i]) ?? [],
1347
1345
  isFetching: t == null ? void 0 : t.isFetching,
1348
1346
  isLoadingData: t == null ? void 0 : t.isLoading
@@ -1350,16 +1348,16 @@ const wt = ({
1350
1348
  );
1351
1349
  }) });
1352
1350
  };
1353
- class Ct {
1351
+ class jt {
1354
1352
  static toKanbanTasks(t) {
1355
- var n, l, s, i, u, c, p, d, h, x, b;
1353
+ var n, s, l, i, u, c, m, d, x, h, b;
1356
1354
  let r = [];
1357
- return t != null && t.responsable && r.push({ id: t.responsable.id, name: t.responsable.nombre, image: (u = (i = (s = (l = (n = t.responsable) == null ? void 0 : n.userOBP) == null ? void 0 : l.imagen) == null ? void 0 : s.formats) == null ? void 0 : i.thumbnail) == null ? void 0 : u.url }), (c = t == null ? void 0 : t.equipo) != null && c.miembros && t.equipo.miembros.forEach((g) => {
1358
- var f, w, m, C;
1359
- r != null && r.find((T) => T.id === g.idUser.id) || g.idUser && r.push({ id: g.idUser.id, name: g.idUser.nombre, image: (C = (m = (w = (f = g == null ? void 0 : g.userOBP) == null ? void 0 : f.imagen) == null ? void 0 : w.formats) == null ? void 0 : m.thumbnail) == null ? void 0 : C.url });
1355
+ return t != null && t.responsable && r.push({ id: t.responsable.id, name: t.responsable.nombre, image: (u = (i = (l = (s = (n = t.responsable) == null ? void 0 : n.userOBP) == null ? void 0 : s.imagen) == null ? void 0 : l.formats) == null ? void 0 : i.thumbnail) == null ? void 0 : u.url }), (c = t == null ? void 0 : t.equipo) != null && c.miembros && t.equipo.miembros.forEach((f) => {
1356
+ var g, N, w, T;
1357
+ r != null && r.find((S) => S.id === f.idUser.id) || f.idUser && r.push({ id: f.idUser.id, name: f.idUser.nombre, image: (T = (w = (N = (g = f == null ? void 0 : f.userOBP) == null ? void 0 : g.imagen) == null ? void 0 : N.formats) == null ? void 0 : w.thumbnail) == null ? void 0 : T.url });
1360
1358
  }), {
1361
1359
  comments: 0,
1362
- nameProject: (p = t == null ? void 0 : t.proyecto) == null ? void 0 : p.nombre,
1360
+ nameProject: (m = t == null ? void 0 : t.proyecto) == null ? void 0 : m.nombre,
1363
1361
  idProject: (d = t == null ? void 0 : t.proyecto) == null ? void 0 : d.id,
1364
1362
  willBePaused: t.es_pausable,
1365
1363
  difficulty: t.nivel_dificultad,
@@ -1369,19 +1367,19 @@ class Ct {
1369
1367
  status: t.estatus,
1370
1368
  task: t.texto_corto,
1371
1369
  users: r,
1372
- responsible: ((h = t == null ? void 0 : t.responsable) == null ? void 0 : h.id) ?? null,
1373
- statusRequiredTask: ((x = t.id_t_requerida) == null ? void 0 : x.estatus) ?? null,
1370
+ responsible: ((x = t == null ? void 0 : t.responsable) == null ? void 0 : x.id) ?? null,
1371
+ statusRequiredTask: ((h = t.id_t_requerida) == null ? void 0 : h.estatus) ?? null,
1374
1372
  nameRequiredTask: ((b = t.id_t_requerida) == null ? void 0 : b.texto_corto) ?? null
1375
1373
  };
1376
1374
  }
1377
1375
  }
1378
- const se = async ({ filters: a, tasks_api: t }) => {
1376
+ const oe = async ({ filters: a, tasks_api: t }) => {
1379
1377
  try {
1380
- return (await t.get("/api/listado_tareas", { params: a })).data.tareas.map(M).map(Ct.toKanbanTasks);
1378
+ return (await t.get("/api/listado_tareas", { params: a })).data.tareas.map(M).map(jt.toKanbanTasks);
1381
1379
  } catch (r) {
1382
1380
  throw console.log({ error: r }), `Error al obtener las tareas: ${r}`;
1383
1381
  }
1384
- }, ie = (a) => {
1382
+ }, ce = (a) => {
1385
1383
  var t;
1386
1384
  if (a != null && a.hasNextPage) {
1387
1385
  const r = (t = a == null ? void 0 : a.data) == null ? void 0 : t.pages[a.data.pages.length - 1];
@@ -1393,18 +1391,18 @@ const se = async ({ filters: a, tasks_api: t }) => {
1393
1391
  pageSize: 30,
1394
1392
  withCount: !0
1395
1393
  }
1396
- }), _t = () => {
1397
- var p;
1398
- const a = W(), { tasks_api: t } = P(), { user: r } = R(), { filters: n } = $(), [l, s] = y(0), [i, u] = y({
1394
+ }), Dt = () => {
1395
+ var m;
1396
+ const a = Q(), { tasks_api: t } = D(), { user: r } = W(), { filters: n } = B(), [s, l] = y(0), [i, u] = y({
1399
1397
  owner: {
1400
1398
  user: r.id,
1401
- config: ((p = n == null ? void 0 : n.owner) == null ? void 0 : p.config) ?? "yo_y_mis_equipos"
1399
+ config: ((m = n == null ? void 0 : n.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos"
1402
1400
  },
1403
1401
  status: "por_hacer"
1404
- }), c = Z({
1402
+ }), c = ne({
1405
1403
  initialPageParam: 1,
1406
1404
  queryKey: ["to_do_tasks", i],
1407
- queryFn: ({ pageParam: d }) => se({
1405
+ queryFn: ({ pageParam: d }) => oe({
1408
1406
  filters: {
1409
1407
  ...i,
1410
1408
  status: "por_hacer",
@@ -1415,9 +1413,9 @@ const se = async ({ filters: a, tasks_api: t }) => {
1415
1413
  }),
1416
1414
  staleTime: 1e3 * 60 * 60 * 24,
1417
1415
  // mantains the data for 24 hours
1418
- getNextPageParam: (d, h) => h.length + 1
1416
+ getNextPageParam: (d, x) => x.length + 1
1419
1417
  });
1420
- return v(() => {
1418
+ return C(() => {
1421
1419
  var d;
1422
1420
  Object.keys(n).length > 0 && u({
1423
1421
  ...n,
@@ -1427,13 +1425,13 @@ const se = async ({ filters: a, tasks_api: t }) => {
1427
1425
  },
1428
1426
  status: "por_hacer"
1429
1427
  });
1430
- }, [n]), v(() => {
1428
+ }, [n]), C(() => {
1431
1429
  a.invalidateQueries({
1432
1430
  queryKey: ["to_do_tasks", i]
1433
1431
  });
1434
- }, [i]), v(() => {
1432
+ }, [i]), C(() => {
1435
1433
  (async () => {
1436
- const h = await t.get("/api/listado_tareas", {
1434
+ const x = await t.get("/api/listado_tareas", {
1437
1435
  params: {
1438
1436
  ...i,
1439
1437
  status: "por_hacer",
@@ -1442,29 +1440,29 @@ const se = async ({ filters: a, tasks_api: t }) => {
1442
1440
  justCount: !0
1443
1441
  }
1444
1442
  });
1445
- s(h.data.total);
1443
+ l(x.data.total);
1446
1444
  })();
1447
1445
  }, [i, c == null ? void 0 : c.data]), {
1448
1446
  //Properties
1449
1447
  toDoTasks: c,
1450
- total: l
1448
+ total: s
1451
1449
  };
1452
- }, Tt = () => {
1453
- var n, l;
1454
- const { toDoTasks: a, total: t } = _t(), r = [...((l = (n = a == null ? void 0 : a.data) == null ? void 0 : n.pages) == null ? void 0 : l.flat()) ?? []];
1455
- return /* @__PURE__ */ e(Y, { total: t, title: "Por hacer", tasks: r, loadNextPage: () => ie(a), isFetching: a == null ? void 0 : a.isFetching, isLoadingData: a == null ? void 0 : a.isLoading });
1456
- }, Ft = () => {
1457
- var p;
1458
- const a = W(), { tasks_api: t } = P(), { user: r } = R(), { filters: n } = $(), [l, s] = y(0), [i, u] = y({
1450
+ }, $t = () => {
1451
+ var n, s;
1452
+ const { toDoTasks: a, total: t } = Dt(), r = [...((s = (n = a == null ? void 0 : a.data) == null ? void 0 : n.pages) == null ? void 0 : s.flat()) ?? []];
1453
+ return /* @__PURE__ */ e(te, { total: t, title: "Por hacer", tasks: r, loadNextPage: () => ce(a), isFetching: a == null ? void 0 : a.isFetching, isLoadingData: a == null ? void 0 : a.isLoading });
1454
+ }, Et = () => {
1455
+ var m;
1456
+ const a = Q(), { tasks_api: t } = D(), { user: r } = W(), { filters: n } = B(), [s, l] = y(0), [i, u] = y({
1459
1457
  owner: {
1460
1458
  user: r.id,
1461
- config: ((p = n == null ? void 0 : n.owner) == null ? void 0 : p.config) ?? "yo_y_mis_equipos"
1459
+ config: ((m = n == null ? void 0 : n.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos"
1462
1460
  },
1463
1461
  status: "trabajando"
1464
- }), c = Z({
1462
+ }), c = ne({
1465
1463
  initialPageParam: 1,
1466
1464
  queryKey: ["working_tasks", i],
1467
- queryFn: ({ pageParam: d }) => se({
1465
+ queryFn: ({ pageParam: d }) => oe({
1468
1466
  filters: {
1469
1467
  ...i,
1470
1468
  status: "trabajando",
@@ -1475,9 +1473,9 @@ const se = async ({ filters: a, tasks_api: t }) => {
1475
1473
  }),
1476
1474
  staleTime: 1e3 * 60 * 60 * 24,
1477
1475
  // mantains the data for 24 hours
1478
- getNextPageParam: (d, h) => h.length + 1
1476
+ getNextPageParam: (d, x) => x.length + 1
1479
1477
  });
1480
- return v(() => {
1478
+ return C(() => {
1481
1479
  var d;
1482
1480
  Object.keys(n).length > 0 && u({
1483
1481
  ...n,
@@ -1487,13 +1485,13 @@ const se = async ({ filters: a, tasks_api: t }) => {
1487
1485
  },
1488
1486
  status: "trabajando"
1489
1487
  });
1490
- }, [n]), v(() => {
1488
+ }, [n]), C(() => {
1491
1489
  a.invalidateQueries({
1492
1490
  queryKey: ["working_tasks", i]
1493
1491
  });
1494
- }, [i]), v(() => {
1492
+ }, [i]), C(() => {
1495
1493
  (async () => {
1496
- const h = await t.get("/api/listado_tareas", {
1494
+ const x = await t.get("/api/listado_tareas", {
1497
1495
  params: {
1498
1496
  ...i,
1499
1497
  status: "trabajando",
@@ -1502,38 +1500,38 @@ const se = async ({ filters: a, tasks_api: t }) => {
1502
1500
  justCount: !0
1503
1501
  }
1504
1502
  });
1505
- s(h.data.total);
1503
+ l(x.data.total);
1506
1504
  })();
1507
1505
  }, [i, c == null ? void 0 : c.data]), {
1508
1506
  //Properties
1509
1507
  workingTasks: c,
1510
- total: l
1508
+ total: s
1511
1509
  };
1512
- }, At = () => {
1513
- var n, l;
1514
- const { workingTasks: a, total: t } = Ft(), r = [...((l = (n = a == null ? void 0 : a.data) == null ? void 0 : n.pages) == null ? void 0 : l.flat()) ?? []];
1510
+ }, Bt = () => {
1511
+ var n, s;
1512
+ const { workingTasks: a, total: t } = Et(), r = [...((s = (n = a == null ? void 0 : a.data) == null ? void 0 : n.pages) == null ? void 0 : s.flat()) ?? []];
1515
1513
  return /* @__PURE__ */ e(
1516
- Y,
1514
+ te,
1517
1515
  {
1518
1516
  total: t,
1519
1517
  title: "Trabajando",
1520
1518
  tasks: r,
1521
- loadNextPage: () => ie(a),
1519
+ loadNextPage: () => ce(a),
1522
1520
  isFetching: a == null ? void 0 : a.isFetching
1523
1521
  }
1524
1522
  );
1525
- }, St = () => {
1526
- var p;
1527
- const a = W(), { user: t } = R(), { tasks_api: r } = P(), { filters: n } = $(), [l, s] = y(0), [i, u] = y({
1523
+ }, Lt = () => {
1524
+ var m;
1525
+ const a = Q(), { user: t } = W(), { tasks_api: r } = D(), { filters: n } = B(), [s, l] = y(0), [i, u] = y({
1528
1526
  owner: {
1529
1527
  user: t.id,
1530
- config: ((p = n == null ? void 0 : n.owner) == null ? void 0 : p.config) ?? "yo_y_mis_equipos"
1528
+ config: ((m = n == null ? void 0 : n.owner) == null ? void 0 : m.config) ?? "yo_y_mis_equipos"
1531
1529
  },
1532
1530
  status: "completadas"
1533
- }), c = Z({
1531
+ }), c = ne({
1534
1532
  initialPageParam: 1,
1535
1533
  queryKey: ["done_tasks", i],
1536
- queryFn: ({ pageParam: d }) => se({
1534
+ queryFn: ({ pageParam: d }) => oe({
1537
1535
  filters: {
1538
1536
  ...i,
1539
1537
  status: "completadas",
@@ -1544,9 +1542,9 @@ const se = async ({ filters: a, tasks_api: t }) => {
1544
1542
  }),
1545
1543
  staleTime: 1e3 * 60 * 60 * 24,
1546
1544
  // mantains the data for 24 hours
1547
- getNextPageParam: (d, h) => h.length + 1
1545
+ getNextPageParam: (d, x) => x.length + 1
1548
1546
  });
1549
- return v(() => {
1547
+ return C(() => {
1550
1548
  var d;
1551
1549
  Object.keys(n).length > 0 && u({
1552
1550
  ...n,
@@ -1556,13 +1554,13 @@ const se = async ({ filters: a, tasks_api: t }) => {
1556
1554
  },
1557
1555
  status: "completadas"
1558
1556
  });
1559
- }, [n]), v(() => {
1557
+ }, [n]), C(() => {
1560
1558
  a.invalidateQueries({
1561
1559
  queryKey: ["done_tasks", i]
1562
1560
  });
1563
- }, [i]), v(() => {
1561
+ }, [i]), C(() => {
1564
1562
  (async () => {
1565
- const h = await r.get("/api/listado_tareas", {
1563
+ const x = await r.get("/api/listado_tareas", {
1566
1564
  params: {
1567
1565
  ...i,
1568
1566
  status: "completadas",
@@ -1571,28 +1569,28 @@ const se = async ({ filters: a, tasks_api: t }) => {
1571
1569
  tasks_api: r
1572
1570
  }
1573
1571
  });
1574
- s(h.data.total);
1572
+ l(x.data.total);
1575
1573
  })();
1576
1574
  }, [c == null ? void 0 : c.data, i]), {
1577
1575
  // Properties
1578
1576
  doneTasks: c,
1579
- total: l
1577
+ total: s
1580
1578
  };
1581
- }, Pt = () => {
1582
- var n, l;
1583
- const { doneTasks: a, total: t } = St(), r = [...((l = (n = a == null ? void 0 : a.data) == null ? void 0 : n.pages) == null ? void 0 : l.flat()) ?? []];
1579
+ }, Mt = () => {
1580
+ var n, s;
1581
+ const { doneTasks: a, total: t } = Lt(), r = [...((s = (n = a == null ? void 0 : a.data) == null ? void 0 : n.pages) == null ? void 0 : s.flat()) ?? []];
1584
1582
  return /* @__PURE__ */ e(
1585
- Y,
1583
+ te,
1586
1584
  {
1587
1585
  title: "Completadas",
1588
1586
  tasks: r,
1589
- loadNextPage: () => ie(a),
1587
+ loadNextPage: () => ce(a),
1590
1588
  isFetching: a == null ? void 0 : a.isFetching,
1591
1589
  total: t
1592
1590
  }
1593
1591
  );
1594
1592
  };
1595
- class H {
1593
+ class Y {
1596
1594
  static toSalesmanUsers(t) {
1597
1595
  return {
1598
1596
  id: t.id,
@@ -1600,8 +1598,8 @@ class H {
1600
1598
  };
1601
1599
  }
1602
1600
  }
1603
- const Dt = () => {
1604
- const { tasks_api: a } = P(), { filters: t } = $(), { user: r } = R();
1601
+ const zt = () => {
1602
+ const { tasks_api: a } = D(), { filters: t } = B(), { user: r } = W();
1605
1603
  return {
1606
1604
  //methods
1607
1605
  getSalesmanAndProjects: async () => {
@@ -1620,8 +1618,8 @@ const Dt = () => {
1620
1618
  })
1621
1619
  ]);
1622
1620
  return {
1623
- salesmanUsers: i.data.map(H.toSalesmanUsers),
1624
- projects: u.data.map(H.toSalesmanUsers)
1621
+ salesmanUsers: i.data.map(Y.toSalesmanUsers),
1622
+ projects: u.data.map(Y.toSalesmanUsers)
1625
1623
  };
1626
1624
  },
1627
1625
  getProjects: async () => {
@@ -1635,11 +1633,11 @@ const Dt = () => {
1635
1633
  },
1636
1634
  justProjects: !0
1637
1635
  }
1638
- })).data.map(H.toSalesmanUsers);
1636
+ })).data.map(Y.toSalesmanUsers);
1639
1637
  },
1640
- getSalesmans: async () => (await a.get("/api/obtener-comerciales")).data.map(H.toSalesmanUsers)
1638
+ getSalesmans: async () => (await a.get("/api/obtener-comerciales")).data.map(Y.toSalesmanUsers)
1641
1639
  };
1642
- }, qt = [
1640
+ }, It = [
1643
1641
  {
1644
1642
  label: "Tipo de dependencia",
1645
1643
  type: "select",
@@ -1702,33 +1700,33 @@ const Dt = () => {
1702
1700
  name: "Muy dificil"
1703
1701
  }]
1704
1702
  }
1705
- ], jt = () => {
1706
- const { defineFields: a } = $(), { getSalesmanAndProjects: t } = Dt();
1707
- return v(() => {
1703
+ ], Ot = () => {
1704
+ const { defineFields: a } = B(), { getSalesmanAndProjects: t } = zt();
1705
+ return C(() => {
1708
1706
  (async () => {
1709
- let n = [...qt], { salesmanUsers: l, projects: s } = await t();
1710
- a(n.map((i) => (i.id === "project.id" && (i.options = s), i.id === "salesman.name" && (i.options = l), i)));
1707
+ let n = [...It], { salesmanUsers: s, projects: l } = await t();
1708
+ a(n.map((i) => (i.id === "project.id" && (i.options = l), i.id === "salesman.name" && (i.options = s), i)));
1711
1709
  })();
1712
1710
  }, []), /* @__PURE__ */ o("div", { className: "flex gap-4 w-full h-full min-h-[100%] relative ", children: [
1713
- /* @__PURE__ */ e(Tt, {}),
1714
- /* @__PURE__ */ e(At, {}),
1715
- /* @__PURE__ */ e(Pt, {})
1711
+ /* @__PURE__ */ e($t, {}),
1712
+ /* @__PURE__ */ e(Bt, {}),
1713
+ /* @__PURE__ */ e(Mt, {})
1716
1714
  ] });
1717
- }, Fe = U({}), $t = ({ children: a }) => {
1715
+ }, Le = H({}), Rt = ({ children: a }) => {
1718
1716
  const [t, r] = y([]);
1719
- v(() => {
1717
+ C(() => {
1720
1718
  console.log({ selectedTasks: t });
1721
1719
  }, [t]);
1722
- const n = (l) => {
1723
- r((s) => s.includes(l) ? s.filter((i) => i !== l) : [...s, l]);
1720
+ const n = (s) => {
1721
+ r((l) => l.includes(s) ? l.filter((i) => i !== s) : [...l, s]);
1724
1722
  };
1725
- return /* @__PURE__ */ e(Fe.Provider, { value: {
1723
+ return /* @__PURE__ */ e(Le.Provider, { value: {
1726
1724
  //properties
1727
1725
  selectedTasks: t,
1728
1726
  //methods
1729
1727
  selectTask: n
1730
1728
  }, children: a });
1731
- }, Et = () => K(Fe), Bt = () => {
1729
+ }, Wt = () => V(Le), Me = () => {
1732
1730
  const a = () => /* @__PURE__ */ o("div", { className: "w-full flex gap-m", children: [
1733
1731
  /* @__PURE__ */ e("div", { className: "w-[30px] h-[30px] min-w-[30px] min-h-[30px] bg-gray-200 rounded-full animate-pulse" }),
1734
1732
  /* @__PURE__ */ e("div", { className: "w-[30%] h-[30px] bg-gray-200 rounded-md animate-pulse" }),
@@ -1753,119 +1751,152 @@ const Dt = () => {
1753
1751
  /* @__PURE__ */ e("div", { className: "pl-5", children: /* @__PURE__ */ e(a, {}) })
1754
1752
  ] })
1755
1753
  ] });
1756
- }, Ae = ({
1754
+ }, ze = ({
1757
1755
  startDate: a,
1758
1756
  endDate: t
1759
- }) => /* @__PURE__ */ o(S, { children: [
1757
+ }) => /* @__PURE__ */ o(j, { children: [
1760
1758
  /* @__PURE__ */ o("div", { className: "gap-s bg-gray-100 rounded-md h-[30px] w-fit flex justify-center items-center px-xxxl", children: [
1761
- /* @__PURE__ */ e(N, { icon: "calendar", size: "xs", strokeWidth: 4, color: F.texts.subtext }),
1759
+ /* @__PURE__ */ e(v, { icon: "calendar", size: "xs", strokeWidth: 4, color: F.texts.subtext }),
1762
1760
  /* @__PURE__ */ o("p", { className: "text-sm", children: [
1763
1761
  " ",
1764
- me(a)
1762
+ Ne(a)
1765
1763
  ] })
1766
1764
  ] }),
1767
- /* @__PURE__ */ e(N, { icon: "arrow_right", size: "xs", strokeWidth: 4, color: F.texts.DEFAULT }),
1765
+ /* @__PURE__ */ e(v, { icon: "arrow_right", size: "xs", strokeWidth: 4, color: F.texts.DEFAULT }),
1768
1766
  /* @__PURE__ */ o("div", { className: "gap-s bg-gray-100 rounded-md h-[30px] w-fit flex justify-center items-center px-xxxl", children: [
1769
- /* @__PURE__ */ e(N, { icon: "calendar", size: "xs", strokeWidth: 4, color: F.texts.subtext }),
1767
+ /* @__PURE__ */ e(v, { icon: "calendar", size: "xs", strokeWidth: 4, color: F.texts.subtext }),
1770
1768
  /* @__PURE__ */ o("p", { className: "text-sm", children: [
1771
1769
  " ",
1772
- me(t)
1770
+ Ne(t)
1773
1771
  ] })
1774
1772
  ] })
1775
- ] }), Lt = ({ id: a }) => /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("button", { onClick: () => alert("pausar tarea " + a), children: /* @__PURE__ */ e(N, { icon: "pause", size: "xs", strokeWidth: 4, color: F.texts.subtext }) }) }), Se = ({ id: a, priority: t }) => /* @__PURE__ */ o(S, { children: [
1776
- /* @__PURE__ */ e("button", { className: "gap-s bg-gray-100 rounded-md h-[30px] w-[30px] flex justify-center items-center hover:bg-gray-200", children: /* @__PURE__ */ e(N, { icon: "align_center", size: "xs", strokeWidth: 4, color: F.texts.subtext }) }),
1777
- /* @__PURE__ */ e("div", { className: "gap-s bg-success-medium border border-success-pastel rounded-md h-[30px] w-[30px] flex justify-center items-center", children: /* @__PURE__ */ e(Te, { id: a, priority: t }) }),
1778
- /* @__PURE__ */ e("button", { className: "gap-s bg-danger-light border border-danger-regular rounded-md h-[30px] w-[30px] flex justify-center items-center", children: /* @__PURE__ */ e(N, { icon: "difficulty", size: "xs", strokeWidth: 4, color: F.danger.regular }) })
1779
- ] }), Mt = ({ id: a }) => {
1780
- const { selectedTasks: t, selectTask: r } = Et();
1781
- return /* @__PURE__ */ o(S, { children: [
1782
- /* @__PURE__ */ e("label", { className: "cursor-pointer w-[20px] h-[20px] border-2 border-gray-200 rounded-md flex justify-center items-center", htmlFor: a.toString(), children: /* @__PURE__ */ e("span", { className: `${t.includes(a) ? "opacity-100" : "opacity-0"} transition-opacity duration-500`, children: /* @__PURE__ */ e(N, { icon: "check_outline", size: "xs", color: F.primary.regular, strokeWidth: 6 }) }) }),
1773
+ ] }), Ut = ({ id: a }) => /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e("button", { onClick: () => alert("pausar tarea " + a), children: /* @__PURE__ */ e(v, { icon: "pause", size: "xs", strokeWidth: 4, color: F.texts.subtext }) }) }), Ie = ({ id: a, priority: t }) => /* @__PURE__ */ o(j, { children: [
1774
+ /* @__PURE__ */ e("button", { className: "gap-s bg-gray-100 rounded-md h-[30px] w-[30px] flex justify-center items-center hover:bg-gray-200", children: /* @__PURE__ */ e(v, { icon: "align_center", size: "xs", strokeWidth: 4, color: F.texts.subtext }) }),
1775
+ /* @__PURE__ */ e("div", { className: "gap-s bg-success-medium border border-success-pastel rounded-md h-[30px] w-[30px] flex justify-center items-center", children: /* @__PURE__ */ e(Ee, { id: a, priority: t }) }),
1776
+ /* @__PURE__ */ e("button", { className: "gap-s bg-danger-light border border-danger-regular rounded-md h-[30px] w-[30px] flex justify-center items-center", children: /* @__PURE__ */ e(v, { icon: "difficulty", size: "xs", strokeWidth: 4, color: F.danger.regular }) })
1777
+ ] }), Kt = ({ id: a }) => {
1778
+ const { selectedTasks: t, selectTask: r } = Wt();
1779
+ return /* @__PURE__ */ o(j, { children: [
1780
+ /* @__PURE__ */ e("label", { className: "cursor-pointer w-[20px] h-[20px] border-2 border-gray-200 rounded-md flex justify-center items-center", htmlFor: a.toString(), children: /* @__PURE__ */ e("span", { className: `${t.includes(a) ? "opacity-100" : "opacity-0"} transition-opacity duration-500`, children: /* @__PURE__ */ e(v, { icon: "check_outline", size: "xs", color: F.primary.regular, strokeWidth: 6 }) }) }),
1783
1781
  /* @__PURE__ */ e("input", { className: "hidden", id: a.toString(), type: "checkbox", onChange: () => r(a) })
1784
1782
  ] });
1785
- }, Pe = ({ task: a }) => /* @__PURE__ */ e(
1786
- I,
1783
+ }, Oe = ({ task: a }) => /* @__PURE__ */ e(
1784
+ R,
1787
1785
  {
1788
1786
  dispatch: /* @__PURE__ */ e("p", { className: "text-sm text-texts-subtext max-w-[400px] truncate", children: a }),
1789
1787
  children: /* @__PURE__ */ e("p", { className: "text-sm text-texts-subtext p-2 max-w-[400px]", children: a })
1790
1788
  }
1791
- ), zt = ({ id: a }) => {
1792
- var n, l;
1793
- const { tasksProject: t } = G(), r = (n = t == null ? void 0 : t.data) == null ? void 0 : n.find((s) => s.id === a);
1789
+ ), Qt = ({ id: a }) => {
1790
+ var n, s;
1791
+ const { tasksProject: t } = ee(), r = (n = t == null ? void 0 : t.data) == null ? void 0 : n.find((l) => l.id === a);
1794
1792
  return /* @__PURE__ */ o("div", { className: "ml-[30px] mb-3 mt-1 flex flex-wrap items-center gap-xl", children: [
1795
- !(r != null && r.nameRequiredTask) || (r == null ? void 0 : r.nameRequiredTask) !== "" && (r == null ? void 0 : r.statusRequiredTask) === 2 && /* @__PURE__ */ e(Mt, { id: a }),
1796
- /* @__PURE__ */ e(ve, { id: a, nameRequiredTask: (r == null ? void 0 : r.nameRequiredTask) ?? "", status: r == null ? void 0 : r.status, statusRequiredTask: (r == null ? void 0 : r.statusRequiredTask) ?? 0 }, a),
1797
- (r == null ? void 0 : r.willBePaused) && /* @__PURE__ */ e(Lt, { id: a }),
1793
+ !(r != null && r.nameRequiredTask) || (r == null ? void 0 : r.nameRequiredTask) !== "" && (r == null ? void 0 : r.statusRequiredTask) === 2 && /* @__PURE__ */ e(Kt, { id: a }),
1794
+ /* @__PURE__ */ e(je, { id: a, nameRequiredTask: (r == null ? void 0 : r.nameRequiredTask) ?? "", status: r == null ? void 0 : r.status, statusRequiredTask: (r == null ? void 0 : r.statusRequiredTask) ?? 0 }, a),
1795
+ (r == null ? void 0 : r.willBePaused) && /* @__PURE__ */ e(Ut, { id: a }),
1798
1796
  /* @__PURE__ */ e(
1799
- _e,
1797
+ $e,
1800
1798
  {
1801
1799
  onClick: () => {
1802
1800
  },
1803
1801
  responsible: r == null ? void 0 : r.responsible,
1804
- users: ((l = r == null ? void 0 : r.users) == null ? void 0 : l.map(re)) ?? []
1802
+ users: ((s = r == null ? void 0 : r.users) == null ? void 0 : s.map(le)) ?? []
1805
1803
  }
1806
1804
  ),
1807
- /* @__PURE__ */ e(Pe, { task: (r == null ? void 0 : r.task) ?? "" }),
1808
- /* @__PURE__ */ e(Se, { id: a, priority: r == null ? void 0 : r.priority }),
1809
- /* @__PURE__ */ e(Ae, { startDate: r == null ? void 0 : r.startDate, endDate: r == null ? void 0 : r.endDate })
1805
+ /* @__PURE__ */ e(Oe, { task: (r == null ? void 0 : r.task) ?? "" }),
1806
+ /* @__PURE__ */ e(Ie, { id: a, priority: r == null ? void 0 : r.priority }),
1807
+ /* @__PURE__ */ e(ze, { startDate: r == null ? void 0 : r.startDate, endDate: r == null ? void 0 : r.endDate })
1810
1808
  ] });
1811
- }, De = ({ id: a }) => {
1812
- var s, i, u, c, p, d, h;
1813
- const { tasksProject: t, openTasks: r, openTask: n } = G(), l = (s = t == null ? void 0 : t.data) == null ? void 0 : s.find((x) => x.id === a);
1814
- return l ? (console.log({ task: l }), /* @__PURE__ */ o("div", { className: "flex flex-col gap-m mb-2 ", children: [
1809
+ }, Re = ({ id: a }) => {
1810
+ var l, i, u, c, m, d, x;
1811
+ const { tasksProject: t, openTasks: r, openTask: n } = ee(), s = (l = t == null ? void 0 : t.data) == null ? void 0 : l.find((h) => h.id === a);
1812
+ return s ? (console.log({ task: s }), /* @__PURE__ */ o("div", { className: "flex flex-col gap-m mb-2 ", children: [
1815
1813
  /* @__PURE__ */ o("div", { className: "flex items-center gap-m flex-wrap hover:bg-gray-100", children: [
1816
- /* @__PURE__ */ e("button", { className: `${r.includes(a) ? "" : "-rotate-90"} transition-all duration-300`, onClick: () => n(a), children: /* @__PURE__ */ e(N, { icon: "angle_down_outline", color: F.texts.subtext }) }),
1817
- /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-w-[20px] min-h-[20px] w-fit h-[20px] mx-1 bg-primary-medium rounded-full", children: /* @__PURE__ */ e("p", { className: "text-sm text-primary", children: ((i = l == null ? void 0 : l.tasks) == null ? void 0 : i.length) === 0 ? 1 : (u = l == null ? void 0 : l.tasks) == null ? void 0 : u.length }) }),
1818
- /* @__PURE__ */ e(Pe, { task: (l == null ? void 0 : l.task) ?? "" }),
1819
- /* @__PURE__ */ e(Se, { id: a, priority: l == null ? void 0 : l.priority }),
1820
- /* @__PURE__ */ e(Ae, { startDate: l == null ? void 0 : l.startDate, endDate: l == null ? void 0 : l.endDate }),
1814
+ /* @__PURE__ */ e("button", { className: `${r.includes(a) ? "" : "-rotate-90"} transition-all duration-300`, onClick: () => n(a), children: /* @__PURE__ */ e(v, { icon: "angle_down_outline", color: F.texts.subtext }) }),
1815
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-w-[20px] min-h-[20px] w-fit h-[20px] mx-1 bg-primary-medium rounded-full", children: /* @__PURE__ */ e("p", { className: "text-sm text-primary", children: ((i = s == null ? void 0 : s.tasks) == null ? void 0 : i.length) === 0 ? 1 : (u = s == null ? void 0 : s.tasks) == null ? void 0 : u.length }) }),
1816
+ /* @__PURE__ */ e(Oe, { task: (s == null ? void 0 : s.task) ?? "" }),
1817
+ /* @__PURE__ */ e(Ie, { id: a, priority: s == null ? void 0 : s.priority }),
1818
+ /* @__PURE__ */ e(ze, { startDate: s == null ? void 0 : s.startDate, endDate: s == null ? void 0 : s.endDate }),
1821
1819
  /* @__PURE__ */ o("button", { className: "gap-s bg-gray-100 rounded-md h-[30px] flex justify-center items-center w-fit px-m hover:bg-gray-200", children: [
1822
- /* @__PURE__ */ e(N, { icon: "subtasks", size: "xs", strokeWidth: 5, color: F.texts.subtext }),
1823
- /* @__PURE__ */ e("p", { children: ((c = l == null ? void 0 : l.tasks) == null ? void 0 : c.length) === 0 ? 1 : (p = l == null ? void 0 : l.tasks) == null ? void 0 : p.length })
1820
+ /* @__PURE__ */ e(v, { icon: "subtasks", size: "xs", strokeWidth: 5, color: F.texts.subtext }),
1821
+ /* @__PURE__ */ e("p", { children: ((c = s == null ? void 0 : s.tasks) == null ? void 0 : c.length) === 0 ? 1 : (m = s == null ? void 0 : s.tasks) == null ? void 0 : m.length })
1824
1822
  ] })
1825
1823
  ] }),
1826
- r.includes(a) && /* @__PURE__ */ e("div", { className: "ml-[30px]", children: ((d = l == null ? void 0 : l.tasks) == null ? void 0 : d.length) > 0 ? (h = l == null ? void 0 : l.tasks) == null ? void 0 : h.map((x) => /* @__PURE__ */ e(De, { id: x == null ? void 0 : x.id })) : /* @__PURE__ */ e(zt, { id: l == null ? void 0 : l.id }) })
1824
+ r.includes(a) && /* @__PURE__ */ e("div", { className: "ml-[30px]", children: ((d = s == null ? void 0 : s.tasks) == null ? void 0 : d.length) > 0 ? (x = s == null ? void 0 : s.tasks) == null ? void 0 : x.map((h) => /* @__PURE__ */ e(Re, { id: h == null ? void 0 : h.id })) : /* @__PURE__ */ e(Qt, { id: s == null ? void 0 : s.id }) })
1827
1825
  ] })) : null;
1828
- }, Ot = () => {
1826
+ }, Ht = () => {
1829
1827
  var n;
1830
- const { tasksProject: a, projectID: t } = G();
1831
- if (a != null && a.isFetching || a != null && a.isLoading) return /* @__PURE__ */ e(Bt, {});
1832
- let r = [...(n = a == null ? void 0 : a.data) == null ? void 0 : n.filter((l) => l.isPrincipalTask)];
1833
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-m", children: /* @__PURE__ */ e($t, { project: t, children: r == null ? void 0 : r.sort((l, s) => l.orden - s.orden).map((l) => /* @__PURE__ */ e("div", { className: "flex flex-col gap-m border-b border-gray-200 pb-m", children: /* @__PURE__ */ e(De, { id: l.id }) })) }) });
1834
- }, It = () => {
1835
- const [a, t] = y([]), [r, n] = y(0), [l, s] = y(10), [i, u] = y(0), [c, p] = y("nombre"), { tasks_api: d } = P(), h = async (m, C) => {
1828
+ const { tasksProject: a, projectID: t } = ee();
1829
+ if (a != null && a.isFetching || a != null && a.isLoading) return /* @__PURE__ */ e(Me, {});
1830
+ let r = [...(n = a == null ? void 0 : a.data) == null ? void 0 : n.filter((s) => s.isPrincipalTask)];
1831
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-m", children: /* @__PURE__ */ e(Rt, { project: t, children: r == null ? void 0 : r.sort((s, l) => s.orden - l.orden).map((s) => /* @__PURE__ */ e("div", { className: "flex flex-col gap-m border-b border-gray-200 pb-m", children: /* @__PURE__ */ e(Re, { id: s.id }) })) }) });
1832
+ }, Vt = ({
1833
+ setPath: a,
1834
+ setProject: t
1835
+ }) => {
1836
+ const [r, n] = y([]), [s, l] = y(!0), [i, u] = y(0), [c, m] = y(10), [d, x] = y(0), [h, b] = y("nombre"), { defineFields: f } = B(), { tasks_api: g } = D(), N = async (p, A) => {
1836
1837
  try {
1837
- const T = await d.get("/api/listado_campanias", {
1838
+ l(!0);
1839
+ const q = await g.get("/api/listado_campanias", {
1838
1840
  params: {
1839
1841
  pagination: {
1840
- page: m,
1841
- pageSize: C
1842
+ page: p,
1843
+ pageSize: A
1842
1844
  },
1843
- orderBy: c
1845
+ orderBy: h
1844
1846
  // Agregar orderBy a los parámetros
1847
+ //agrega consulta de filtros
1845
1848
  }
1846
- }), _ = M(T.data);
1847
- t(_), u(T.data.meta.total);
1848
- } catch (T) {
1849
- console.error("Error fetching data:", T);
1849
+ }), E = M(q.data);
1850
+ n(E), x(q.data.meta.total);
1851
+ } catch (q) {
1852
+ console.error("Error fetching data en Lista Campaña:", q);
1853
+ } finally {
1854
+ l(!1);
1850
1855
  }
1851
1856
  };
1852
- v(() => {
1853
- const m = Math.floor(r / l) + 1;
1854
- h(m, l);
1855
- }, [r, l, c]);
1856
- const x = (m) => {
1857
- n(m.first), s(m.rows);
1858
- }, b = [
1859
- { label: "5", value: 5 },
1860
- { label: "10", value: 10 },
1861
- { label: "15", value: 15 },
1862
- { label: "20", value: 20 }
1863
- ], g = (m) => {
1864
- m.value !== l && (s(m.value), n(0));
1865
- }, f = (m) => {
1866
- p((C) => C === m ? `${m}:desc` : m);
1867
- }, w = (m) => c === m ? "↑↓" : c === `${m}:desc` ? "↓↑" : "↑↓";
1868
- return /* @__PURE__ */ o("div", { className: "table-container", children: [
1857
+ C(() => {
1858
+ f([
1859
+ {
1860
+ label: "Búsqueda",
1861
+ type: "text",
1862
+ id: "search"
1863
+ },
1864
+ {
1865
+ label: "Responsable",
1866
+ type: "select",
1867
+ id: "responsable.responsableType",
1868
+ options: [
1869
+ { id: "yo_y_mis_equipos", name: "Yo y mis equipos" },
1870
+ { id: "mis_equipos", name: "Mis equipos" },
1871
+ { id: "yo", name: "Yo" }
1872
+ ]
1873
+ },
1874
+ {
1875
+ label: "Ejecutivo",
1876
+ type: "text",
1877
+ id: "ejecutivo"
1878
+ }
1879
+ ]);
1880
+ }, []), C(() => {
1881
+ const p = Math.floor(i / c) + 1;
1882
+ N(p, c);
1883
+ }, [i, c, h]);
1884
+ const w = (p) => {
1885
+ u(p.first), m(p.rows);
1886
+ }, T = [
1887
+ { label: "5 filas", value: 5 },
1888
+ { label: "10 filas", value: 10 },
1889
+ { label: "15 filas", value: 15 },
1890
+ { label: "20 filas", value: 20 },
1891
+ { label: "25 filas", value: 25 },
1892
+ { label: "50 filas", value: 50 }
1893
+ ], S = (p) => {
1894
+ const A = parseInt(p.target.value, 10);
1895
+ m(A), w({ first: 0, rows: A });
1896
+ }, _ = (p) => {
1897
+ b((A) => A === p ? `${p}:desc` : p);
1898
+ }, P = (p) => h === p ? "↑↓" : h === `${p}:desc` ? "↓↑" : "↑↓";
1899
+ return /* @__PURE__ */ e("div", { className: "table-container", children: s ? /* @__PURE__ */ e("div", { style: { width: "100%" }, children: /* @__PURE__ */ e(Me, {}) }) : /* @__PURE__ */ o(j, { children: [
1869
1900
  /* @__PURE__ */ o(
1870
1901
  "table",
1871
1902
  {
@@ -1877,28 +1908,93 @@ const Dt = () => {
1877
1908
  },
1878
1909
  children: [
1879
1910
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ o("tr", { children: [
1880
- /* @__PURE__ */ o("th", { onClick: () => f("nombre"), children: [
1881
- /* @__PURE__ */ e("label", { style: { color: "#C4C4C4", fontSize: "10px" }, children: w("nombre") }),
1911
+ /* @__PURE__ */ o("th", { onClick: () => _("nombre"), children: [
1912
+ /* @__PURE__ */ e("label", { style: { color: "#C4C4C4", fontSize: "10px" }, children: P("nombre") }),
1882
1913
  "Campaña"
1883
1914
  ] }),
1884
- /* @__PURE__ */ o("th", { onClick: () => f("inicia"), children: [
1885
- /* @__PURE__ */ e("label", { style: { color: "#C4C4C4", fontSize: "10px" }, children: w("inicia") }),
1886
- "Fecha Inicio"
1887
- ] }),
1888
- /* @__PURE__ */ o("th", { onClick: () => f("termina"), children: [
1889
- /* @__PURE__ */ e("label", { style: { color: "#C4C4C4", fontSize: "10px" }, children: w("termina") }),
1890
- "Fecha Fin"
1891
- ] }),
1915
+ /* @__PURE__ */ e(
1916
+ "th",
1917
+ {
1918
+ onClick: () => _("inicia"),
1919
+ style: { textAlign: "center", whiteSpace: "nowrap" },
1920
+ children: /* @__PURE__ */ o(
1921
+ "div",
1922
+ {
1923
+ style: {
1924
+ display: "flex",
1925
+ alignItems: "center",
1926
+ width: "fit-content"
1927
+ },
1928
+ children: [
1929
+ /* @__PURE__ */ e("label", { style: { color: "#C4C4C4", fontSize: "10px" }, children: P("inicia") }),
1930
+ " ",
1931
+ /* @__PURE__ */ e(
1932
+ v,
1933
+ {
1934
+ icon: "calendar",
1935
+ size: "xs",
1936
+ strokeWidth: 5,
1937
+ color: "#C4C4C4"
1938
+ }
1939
+ ),
1940
+ /* @__PURE__ */ e("span", { children: "Fecha Inicio" })
1941
+ ]
1942
+ }
1943
+ )
1944
+ }
1945
+ ),
1946
+ /* @__PURE__ */ e(
1947
+ "th",
1948
+ {
1949
+ onClick: () => _("termina"),
1950
+ style: { whiteSpace: "nowrap", textAlign: "center" },
1951
+ children: /* @__PURE__ */ o(
1952
+ "div",
1953
+ {
1954
+ style: {
1955
+ display: "flex",
1956
+ alignItems: "center",
1957
+ width: "fit-content"
1958
+ },
1959
+ children: [
1960
+ /* @__PURE__ */ e(
1961
+ "label",
1962
+ {
1963
+ style: {
1964
+ color: "#C4C4C4",
1965
+ fontSize: "10px"
1966
+ },
1967
+ children: P("termina")
1968
+ }
1969
+ ),
1970
+ /* @__PURE__ */ e(
1971
+ v,
1972
+ {
1973
+ icon: "calendar",
1974
+ size: "xs",
1975
+ strokeWidth: 5,
1976
+ color: "#C4C4C4"
1977
+ }
1978
+ ),
1979
+ /* @__PURE__ */ e("span", { children: "Fecha Fin" })
1980
+ ]
1981
+ }
1982
+ )
1983
+ }
1984
+ ),
1892
1985
  /* @__PURE__ */ e("th", { children: "Status" }),
1893
1986
  /* @__PURE__ */ e("th", { children: "Responsable" })
1894
1987
  ] }) }),
1895
- /* @__PURE__ */ e("tbody", { children: a == null ? void 0 : a.map((m, C) => {
1896
- var T, _, A, D, q, j, E, Q;
1988
+ /* @__PURE__ */ e("tbody", { children: r == null ? void 0 : r.map((p, A) => {
1989
+ var q, E, G, $, z, U, K, de, ue, me, pe, he, xe, ge, fe, be;
1897
1990
  return /* @__PURE__ */ o("tr", { className: "table-row", children: [
1898
- /* @__PURE__ */ e("td", { children: (T = m == null ? void 0 : m.campania) == null ? void 0 : T.nombre }),
1899
- /* @__PURE__ */ e("td", { children: (_ = m == null ? void 0 : m.campania) == null ? void 0 : _.inicia }),
1900
- /* @__PURE__ */ e("td", { children: (A = m == null ? void 0 : m.campania) == null ? void 0 : A.termina }),
1901
- /* @__PURE__ */ e("td", { style: { width: "20%" }, children: /* @__PURE__ */ o(
1991
+ /* @__PURE__ */ e("td", { children: (q = p == null ? void 0 : p.campania) == null ? void 0 : q.nombre }),
1992
+ /* @__PURE__ */ o("td", { children: [
1993
+ " ",
1994
+ (E = p == null ? void 0 : p.campania) == null ? void 0 : E.inicia
1995
+ ] }),
1996
+ /* @__PURE__ */ e("td", { children: (G = p == null ? void 0 : p.campania) == null ? void 0 : G.termina }),
1997
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ o(
1902
1998
  "div",
1903
1999
  {
1904
2000
  style: {
@@ -1906,21 +2002,22 @@ const Dt = () => {
1906
2002
  alignItems: "center",
1907
2003
  gap: "15px",
1908
2004
  padding: "none",
1909
- fontSize: "12px",
1910
- width: "auto"
2005
+ fontSize: "10px",
2006
+ width: "auto",
2007
+ minWidth: "170px"
1911
2008
  },
1912
2009
  children: [
1913
2010
  /* @__PURE__ */ o(
1914
2011
  "label",
1915
2012
  {
1916
2013
  style: {
1917
- width: "20px",
2014
+ width: "50px",
1918
2015
  minWidth: "50px",
1919
2016
  textAlign: "right",
1920
2017
  color: "#000"
1921
2018
  },
1922
2019
  children: [
1923
- m == null ? void 0 : m.progreso,
2020
+ p == null ? void 0 : p.progreso,
1924
2021
  "%"
1925
2022
  ]
1926
2023
  }
@@ -1944,8 +2041,8 @@ const Dt = () => {
1944
2041
  top: 0,
1945
2042
  left: 0,
1946
2043
  height: "100%",
1947
- width: `${m.progreso}%`,
1948
- backgroundColor: m.progreso === 100 ? "#039B59" : m.progreso > 50 ? "#3658C1" : m.progreso > 0 ? "#DC8921" : "#C4C4C4",
2044
+ width: `${p.progreso}%`,
2045
+ backgroundColor: p.progreso === 100 ? "#039B59" : p.progreso > 50 ? "#3658C1" : p.progreso > 0 ? "#DC8921" : "#C4C4C4",
1949
2046
  borderRadius: "10px",
1950
2047
  transition: "width 0.3s ease-in-out"
1951
2048
  }
@@ -1956,18 +2053,30 @@ const Dt = () => {
1956
2053
  ]
1957
2054
  }
1958
2055
  ) }),
1959
- /* @__PURE__ */ e("td", { style: { width: "auto" }, children: /* @__PURE__ */ o("div", { className: "avatar-container", children: [
1960
- /* @__PURE__ */ e(
1961
- Ue,
1962
- {
1963
- className: "avatar",
1964
- label: (j = (q = (D = m == null ? void 0 : m.campania) == null ? void 0 : D.responsable) == null ? void 0 : q.nombre) == null ? void 0 : j.charAt(0),
1965
- shape: "circle"
1966
- }
1967
- ),
1968
- /* @__PURE__ */ e("span", { style: { marginLeft: "8px", fontSize: "12px" }, children: (Q = (E = m == null ? void 0 : m.campania) == null ? void 0 : E.responsable) == null ? void 0 : Q.nombre })
2056
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ o("div", { className: "avatar-container", children: [
2057
+ /* @__PURE__ */ o(J, { className: "avatar", children: [
2058
+ /* @__PURE__ */ e(
2059
+ Z,
2060
+ {
2061
+ src: `${Be}${(de = (K = (U = (z = ($ = p == null ? void 0 : p.campania) == null ? void 0 : $.responsable) == null ? void 0 : z.imagen) == null ? void 0 : U.formats) == null ? void 0 : K.thumbnail) == null ? void 0 : de.url}`,
2062
+ alt: (pe = (me = (ue = p == null ? void 0 : p.campania) == null ? void 0 : ue.responsable) == null ? void 0 : me.nombre) == null ? void 0 : pe.charAt(
2063
+ 0
2064
+ )
2065
+ }
2066
+ ),
2067
+ /* @__PURE__ */ e(
2068
+ k,
2069
+ {
2070
+ style: {
2071
+ boxShadow: "10px 5px 10px rgba(0, 0, 0, 0.5)"
2072
+ },
2073
+ children: (ge = (xe = (he = p == null ? void 0 : p.campania) == null ? void 0 : he.responsable) == null ? void 0 : xe.nombre) == null ? void 0 : ge.charAt(0)
2074
+ }
2075
+ )
2076
+ ] }),
2077
+ /* @__PURE__ */ e("span", { style: { marginLeft: "8px", fontSize: "10px" }, children: (be = (fe = p == null ? void 0 : p.campania) == null ? void 0 : fe.responsable) == null ? void 0 : be.nombre })
1969
2078
  ] }) })
1970
- ] }, C);
2079
+ ] }, A);
1971
2080
  }) })
1972
2081
  ]
1973
2082
  }
@@ -1978,9 +2087,8 @@ const Dt = () => {
1978
2087
  className: "pagination",
1979
2088
  style: {
1980
2089
  background: "#FAFAFA",
1981
- marginTop: "1rem",
1982
- display: "flex",
1983
- gap: "0.5rem"
2090
+ display: "flex"
2091
+ // gap: '0.5rem',
1984
2092
  },
1985
2093
  children: [
1986
2094
  /* @__PURE__ */ o(
@@ -1996,20 +2104,20 @@ const Dt = () => {
1996
2104
  whiteSpace: "nowrap"
1997
2105
  },
1998
2106
  children: [
1999
- l,
2107
+ r.length,
2000
2108
  " elementos de ",
2001
- i
2109
+ d
2002
2110
  ]
2003
2111
  }
2004
2112
  ),
2005
2113
  /* @__PURE__ */ e(
2006
- Ke,
2114
+ et,
2007
2115
  {
2008
- first: r,
2009
- rows: l,
2010
- totalRecords: i,
2116
+ first: i,
2117
+ rows: c,
2118
+ totalRecords: d,
2011
2119
  rowsPerPageOptions: [5, 10, 20, 50],
2012
- onPageChange: x,
2120
+ onPageChange: w,
2013
2121
  className: "pagination",
2014
2122
  template: "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink"
2015
2123
  }
@@ -2020,29 +2128,26 @@ const Dt = () => {
2020
2128
  style: {
2021
2129
  display: "flex",
2022
2130
  alignItems: "center",
2023
- gap: "8px",
2024
- whiteSpace: "nowrap",
2025
- padding: "0 1rem"
2131
+ gap: "8px"
2026
2132
  },
2027
2133
  children: [
2028
- /* @__PURE__ */ e("span", { style: { fontSize: "12px" }, children: "Filas por página:" }),
2134
+ /* @__PURE__ */ e("span", { style: { fontSize: "10px", whiteSpace: "nowrap" }, children: "Filas por página:" }),
2029
2135
  /* @__PURE__ */ e(
2030
- Qe,
2136
+ "select",
2031
2137
  {
2032
- value: l,
2033
- options: b,
2034
- onChange: g,
2035
- style: {
2036
- minWidth: "5rem",
2037
- width: "auto",
2038
- height: "2rem",
2039
- zIndex: "999999",
2040
- transform: "translateY(-100%)"
2041
- // Move dropdown upwards
2042
- },
2043
- className: "p-dropdown-sm",
2044
- optionLabel: "label",
2045
- optionValue: "value"
2138
+ className: "select",
2139
+ value: c,
2140
+ onChange: (p) => S(p),
2141
+ children: T.map((p) => /* @__PURE__ */ e(
2142
+ "option",
2143
+ {
2144
+ className: "option-select",
2145
+ value: p.value,
2146
+ style: { background: "#F5F5F5" },
2147
+ children: p.label
2148
+ },
2149
+ p.value
2150
+ ))
2046
2151
  }
2047
2152
  )
2048
2153
  ]
@@ -2051,44 +2156,49 @@ const Dt = () => {
2051
2156
  ]
2052
2157
  }
2053
2158
  )
2054
- ] });
2055
- }, Rt = ({ path: a, tab: t }) => {
2056
- const r = {
2057
- "kanban-general": { kanban: /* @__PURE__ */ e(jt, {}) },
2159
+ ] }) });
2160
+ }, Gt = ({ path: a, tab: t, setPath: r, project: n, setProject: s }) => {
2161
+ const l = {
2162
+ "kanban-general": { kanban: /* @__PURE__ */ e(Ot, {}) },
2058
2163
  "lista-campanias": {
2059
- lista: /* @__PURE__ */ e(It, {}),
2164
+ lista: /* @__PURE__ */ e(Vt, { setPath: r, setProject: s }),
2060
2165
  gantt: /* @__PURE__ */ e("div", { children: "gantt-campanias" })
2061
2166
  },
2062
2167
  "kanban-campania": {
2063
- kanban: /* @__PURE__ */ e(vt, {}),
2064
- lista: /* @__PURE__ */ e(Ot, {}),
2168
+ kanban: /* @__PURE__ */ e(qt, {}),
2169
+ lista: /* @__PURE__ */ e(Ht, {}),
2065
2170
  gantt: /* @__PURE__ */ e("div", { children: "kanban-campania-gantt" })
2066
2171
  }
2067
2172
  };
2068
- return a === "kanban-campania" ? /* @__PURE__ */ e(tt, { project: 1839, children: r[a][t] }) : r[a][t];
2069
- }, Wt = ({ path: a }) => /* @__PURE__ */ e(Ye, { children: /* @__PURE__ */ e(() => {
2070
- const [r, n] = y("kanban"), [l, s] = y(""), i = L(null);
2071
- v(() => {
2173
+ return a === "kanban-campania" ? /* @__PURE__ */ e(dt, { project: n == null ? void 0 : n.id, children: l[a][t] }) : l[a][t];
2174
+ }, Yt = ({ path: a }) => /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(() => {
2175
+ const [r, n] = y("kanban"), [s, l] = y(a), [i, u] = y({
2176
+ id: 1839,
2177
+ project: "Kanban de Campania"
2178
+ }), [c, m] = y(""), d = L(null);
2179
+ C(() => {
2072
2180
  n("kanban");
2073
2181
  }, [a]);
2074
- const u = (d) => ({
2182
+ const x = (g) => ({
2075
2183
  "kanban-general": "Kanban General",
2076
2184
  "lista-campanias": "Campanias",
2077
- "kanban-campania": "Kanban de Campania"
2078
- })[d], c = ["lista-campanias", "kanban-campania"], p = {
2185
+ "kanban-campania": `Kanban de ${i.project}`
2186
+ })[g], h = (g) => {
2187
+ l(g);
2188
+ }, b = ["lista-campanias", "kanban-campania"], f = {
2079
2189
  "lista-campanias": ["lista", "gantt"],
2080
2190
  "kanban-campania": ["kanban", "lista", "gantt"]
2081
2191
  };
2082
2192
  return /* @__PURE__ */ o("div", { className: "bg-bg-card p-m rounded-lg border border-gray-200 flex flex-col gap-m w-full h-full min-h-[100%] relative overflow-hidden", children: [
2083
2193
  /* @__PURE__ */ o("div", { className: "w-full justify-between flex items-end border-b border-gray-200 pb-m px-l flex-wrap gap-l", children: [
2084
2194
  /* @__PURE__ */ o("div", { className: "flex gap-xl", children: [
2085
- /* @__PURE__ */ e("h2", { className: "text-texts font-medium", children: u(a) }),
2086
- c.includes(a) && /* @__PURE__ */ e(
2087
- Ve,
2195
+ /* @__PURE__ */ e("h2", { className: "text-texts font-medium", children: x(s) }),
2196
+ b.includes(s) && /* @__PURE__ */ e(
2197
+ at,
2088
2198
  {
2089
- tabs: p[a],
2090
- renderItem: (d) => {
2091
- n(d);
2199
+ tabs: f[s],
2200
+ renderItem: (g) => {
2201
+ n(g);
2092
2202
  }
2093
2203
  }
2094
2204
  )
@@ -2097,35 +2207,60 @@ const Dt = () => {
2097
2207
  /* @__PURE__ */ e(
2098
2208
  "input",
2099
2209
  {
2100
- onChange: be((d) => {
2101
- var h;
2102
- return s((h = d == null ? void 0 : d.target) == null ? void 0 : h.value);
2103
- }, 1e3),
2210
+ onChange: Pe(
2211
+ (g) => {
2212
+ var N;
2213
+ return m((N = g == null ? void 0 : g.target) == null ? void 0 : N.value);
2214
+ },
2215
+ 1e3
2216
+ ),
2104
2217
  type: "text",
2105
2218
  placeholder: "Buscar",
2106
2219
  className: "w-[200px] h-[30px] border-none bg-bg-card shadow-input border border-gray-200 rounded-lg px-l "
2107
2220
  }
2108
2221
  ),
2109
- /* @__PURE__ */ e(Ge, { filterChildren: i, children: /* @__PURE__ */ e("div", { ref: i, className: "w-max max-w-[400px] h-fit bg-bg-card shadow-lg rounded-lg p-l", children: /* @__PURE__ */ e(Xe, {}) }) })
2222
+ /* @__PURE__ */ e(
2223
+ nt,
2224
+ {
2225
+ filterChildren: d,
2226
+ children: /* @__PURE__ */ e(
2227
+ "div",
2228
+ {
2229
+ ref: d,
2230
+ className: "w-max max-w-[400px] h-fit bg-bg-card shadow-lg rounded-lg p-l",
2231
+ children: /* @__PURE__ */ e(st, {})
2232
+ }
2233
+ )
2234
+ }
2235
+ )
2110
2236
  ] })
2111
2237
  ] }),
2112
- /* @__PURE__ */ e("div", { className: "overflow-auto scrollbar-none", children: /* @__PURE__ */ e(Rt, { path: a, tab: r }) })
2238
+ /* @__PURE__ */ e("div", { className: "overflow-auto scrollbar-none", children: /* @__PURE__ */ e(
2239
+ Gt,
2240
+ {
2241
+ path: s,
2242
+ tab: r,
2243
+ setPath: h,
2244
+ project: i,
2245
+ setProject: u
2246
+ }
2247
+ ) })
2113
2248
  ] });
2114
- }, {}) }), Ut = () => /* @__PURE__ */ e("div", { className: "w-full h-full min-h-[100%] relative", children: /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-full", children: /* @__PURE__ */ o("div", { className: "text-2xl font-bold flex flex-col items-center", children: [
2249
+ }, {}) }), Xt = () => /* @__PURE__ */ e("div", { className: "w-full h-full min-h-[100%] relative", children: /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-full", children: /* @__PURE__ */ o("div", { className: "text-2xl font-bold flex flex-col items-center", children: [
2115
2250
  /* @__PURE__ */ e("div", { className: "w-10 h-10 bg-primary-regular rounded-full animate-pulse" }),
2116
2251
  /* @__PURE__ */ e("p", { className: "text-l text-texts-enfasis", children: "un momento..." }),
2117
2252
  /* @__PURE__ */ e("p", { className: "text-sm text-texts-placeholder", children: "estamos buscando tu usuario" })
2118
- ] }) }) }), Kt = () => /* @__PURE__ */ e("div", { className: "w-full h-full min-h-[100%] relative", children: /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-full", children: /* @__PURE__ */ o("div", { className: "text-2xl font-bold flex flex-col items-center", children: [
2253
+ ] }) }) }), Jt = () => /* @__PURE__ */ e("div", { className: "w-full h-full min-h-[100%] relative", children: /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-full", children: /* @__PURE__ */ o("div", { className: "text-2xl font-bold flex flex-col items-center", children: [
2119
2254
  /* @__PURE__ */ e("div", { className: "w-10 h-10 bg-primary-regular rounded-full animate-pulse" }),
2120
2255
  /* @__PURE__ */ e("p", { className: "text-l text-texts-enfasis", children: "No encontramos tu acceso" }),
2121
2256
  /* @__PURE__ */ e("p", { className: "text-sm text-texts-placeholder", children: "por favor, contacta al administrador" })
2122
- ] }) }) }), sa = ({ path: a, user: t, url: r }) => {
2123
- const n = new je();
2124
- if (!t) return /* @__PURE__ */ e(Ut, {});
2125
- if (!t.accessToken) return /* @__PURE__ */ e(Kt, {});
2126
- let l = { user: t, url: r };
2127
- return /* @__PURE__ */ e(et, { ...l, children: /* @__PURE__ */ e(ke, { ...l, children: /* @__PURE__ */ e("div", { className: "w-full h-full min-h-[100%] relative", children: /* @__PURE__ */ e($e, { client: n, children: /* @__PURE__ */ e(Wt, { path: a }) }) }) }) });
2257
+ ] }) }) }), ua = ({ path: a, user: t, url: r }) => {
2258
+ const n = new Ue();
2259
+ if (!t) return /* @__PURE__ */ e(Xt, {});
2260
+ if (!t.accessToken) return /* @__PURE__ */ e(Jt, {});
2261
+ let s = { user: t, url: r };
2262
+ return /* @__PURE__ */ e(ct, { ...s, children: /* @__PURE__ */ e(ot, { ...s, children: /* @__PURE__ */ e("div", { className: "w-full h-full min-h-[100%] relative", children: /* @__PURE__ */ e(Ke, { client: n, children: /* @__PURE__ */ e(Yt, { path: a }) }) }) }) });
2128
2263
  };
2129
2264
  export {
2130
- sa as AppTasks
2265
+ ua as AppTasks
2131
2266
  };