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