@imj_media/tareas 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/lista-campania/ActionsTaskList.d.ts +3 -1
- package/dist/src/components/tasks/DifficultyButton.d.ts +10 -0
- package/dist/src/components/tasks/PriorityButton.d.ts +3 -1
- package/dist/src/components/templates/progress-modal/config/estadoTareaProgreso.config.d.ts +2 -2
- package/dist/src/modules/teams/utils/teams.utils.d.ts +24 -1
- package/dist/src/modules/templates/hooks/filters/useGetInputFiltersByPath.d.ts +2 -2
- package/dist/src/modules/templates/hooks/useZoomAndCenter.d.ts +6 -1
- package/dist/src/modules/templates/store/useTemplateGrid.d.ts +11 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/utils/canEditTaskFields.d.ts +6 -0
- package/dist/src/utils/taskKanbanBulkEligibility.d.ts +8 -7
- package/dist/tareas.cjs +9 -9
- package/dist/tareas.css +1 -1
- package/dist/tareas.es.js +4511 -4416
- package/package.json +1 -1
- package/dist/src/components/atoms/Toast.d.ts +0 -1
- package/dist/src/context/toastContext.d.ts +0 -14
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
declare const ActionsTaskList: ({ id, priority, difficulty, endDate, atraso }: {
|
|
1
|
+
declare const ActionsTaskList: ({ id, priority, difficulty, endDate, atraso, role, status, }: {
|
|
2
2
|
id: number;
|
|
3
3
|
priority: number;
|
|
4
4
|
difficulty: any;
|
|
5
5
|
endDate: any;
|
|
6
6
|
atraso: any;
|
|
7
|
+
role?: string | null;
|
|
8
|
+
status: number;
|
|
7
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export default ActionsTaskList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DifficultyButtonProps {
|
|
2
|
+
difficulty: number | null | undefined;
|
|
3
|
+
id: number;
|
|
4
|
+
/** Show level title next to the icon (e.g. details drawer, same as `PriorityButton`). */
|
|
5
|
+
withLabel?: boolean;
|
|
6
|
+
/** When false, show read-only tooltip (same pattern as `PriorityButton`). */
|
|
7
|
+
canEdit?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const DifficultyButton: ({ difficulty, id, withLabel, canEdit }: DifficultyButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default DifficultyButton;
|
|
@@ -2,6 +2,8 @@ interface IPriorityButtonProps {
|
|
|
2
2
|
priority: number;
|
|
3
3
|
id: number;
|
|
4
4
|
withLabel?: boolean;
|
|
5
|
+
/** When false, show read-only tooltip (aligned with `ButtonAssignUsers` / `canEditTaskFields`). */
|
|
6
|
+
canEdit?: boolean;
|
|
5
7
|
}
|
|
6
|
-
declare const PriorityButton: ({ priority, id, withLabel }: IPriorityButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const PriorityButton: ({ priority, id, withLabel, canEdit }: IPriorityButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export default PriorityButton;
|
|
@@ -50,8 +50,8 @@ export declare const ESTADO_TAREA_PROGRESO_DEFS: readonly [{
|
|
|
50
50
|
export type GraficoSerieNombreApi = (typeof ESTADO_TAREA_PROGRESO_DEFS)[number]['serieApiName'];
|
|
51
51
|
/** Orden fijo de segmentos en la barra apilada (claves que envía / espera el API en `grafico`). */
|
|
52
52
|
export declare const SERIE_API_NAMES_ORDER: GraficoSerieNombreApi[];
|
|
53
|
-
/**
|
|
54
|
-
export declare const
|
|
53
|
+
/** Singulares que el toggle de demora del modal incluye (misma regla en cliente). */
|
|
54
|
+
export declare const ESTADOS_TOGGLE_DEMORA_SET: ReadonlySet<string>;
|
|
55
55
|
export declare function getEstadoDefBySingular(estadoTrimmedLower: string): {
|
|
56
56
|
readonly singular: "completada";
|
|
57
57
|
readonly serieApiName: "completadas";
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import { generatePopulateStructure } from './populate.utils';
|
|
2
|
-
import { TeamFilters } from '../infrastructure/interfaces/team';
|
|
2
|
+
import { MemberList, Team, TeamFilters } from '../infrastructure/interfaces/team';
|
|
3
|
+
/**
|
|
4
|
+
* Aplana hijos directos del primer raíz para la API (alta y edición).
|
|
5
|
+
*
|
|
6
|
+
* - El primer raíz se mantiene con su árbol anidado (no se mueve a otros hijos).
|
|
7
|
+
* - Cada hijo directo del principal se envía también como fila raíz hermana
|
|
8
|
+
* (`miembros: []`, `miembro_padre: null`, `esEncargado: false`), para quienes
|
|
9
|
+
* **aún no** tienen esa fila plana en `otherRoots` (mismo `idUser.id`).
|
|
10
|
+
* - Así, un colaborador nuevo bajo el principal (p. ej. `id: null`) aparece en raíz
|
|
11
|
+
* sin duplicar a Maria/Andre/Zeferino que ya vienen como hermanos desde el backend.
|
|
12
|
+
*
|
|
13
|
+
* No se fuerza encargado: se respeta `esEncargado` del primer raíz.
|
|
14
|
+
*
|
|
15
|
+
* @see POST /api/registrar-equipo-miembros
|
|
16
|
+
* @see PATCH /api/actualizar-equipo-miembros/:id
|
|
17
|
+
*/
|
|
18
|
+
export declare function expandFirstRootDirectChildrenForTeamPayload(team: Team): Team;
|
|
19
|
+
/**
|
|
20
|
+
* Miembros raíz a mostrar en el modal de equipo: solo encargados (`esEncargado`) y,
|
|
21
|
+
* bajo ellos, el árbol que ya viene en `miembros`. Oculta hermanos planos del API
|
|
22
|
+
* que no son encargado. Si no hay ningún encargado en raíz (p. ej. alta nueva),
|
|
23
|
+
* se muestran todos los raíz para poder seguir editando.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getMembersForModalView(miembros: MemberList): MemberList;
|
|
3
26
|
export declare const randomColor: () => string;
|
|
4
27
|
/**
|
|
5
28
|
* Construye el objeto filters para la API de equipos (Strapi).
|
|
@@ -38,7 +38,7 @@ export declare const useGetInputFiltersByPath: (currentPath: string) => {
|
|
|
38
38
|
options?: import('@imj_media/ui').DropdownOption[];
|
|
39
39
|
placeholder?: string;
|
|
40
40
|
clearText?: string;
|
|
41
|
-
type?: "date" | "
|
|
41
|
+
type?: "date" | "multiple" | "group" | "dropdown" | "input" | "textarea" | "dateRange";
|
|
42
42
|
title?: string;
|
|
43
43
|
} | {
|
|
44
44
|
options: any;
|
|
@@ -49,7 +49,7 @@ export declare const useGetInputFiltersByPath: (currentPath: string) => {
|
|
|
49
49
|
onValueChange?: (value: import('@imj_media/ui').FilterChangeValue) => void;
|
|
50
50
|
placeholder?: string;
|
|
51
51
|
clearText?: string;
|
|
52
|
-
type?: "date" | "
|
|
52
|
+
type?: "date" | "multiple" | "group" | "dropdown" | "input" | "textarea" | "dateRange";
|
|
53
53
|
title?: string;
|
|
54
54
|
})[];
|
|
55
55
|
};
|
|
@@ -100,6 +100,11 @@ export interface UseZoomAndCenterParams {
|
|
|
100
100
|
* Se usa para detectar nodo principal y calcular viewport inicial.
|
|
101
101
|
*/
|
|
102
102
|
nodes: any[];
|
|
103
|
+
/**
|
|
104
|
+
* Al cambiar (p. ej. otra plantilla activa), se limpia el historial de zoom
|
|
105
|
+
* para no mezclar deshacer entre flujos distintos.
|
|
106
|
+
*/
|
|
107
|
+
resetZoomHistoryKey?: number | null;
|
|
103
108
|
}
|
|
104
109
|
/**
|
|
105
110
|
* @interface UseZoomAndCenterReturn
|
|
@@ -156,4 +161,4 @@ export interface UseZoomAndCenterReturn {
|
|
|
156
161
|
* └── handleDoubleClick() // Undo zoom
|
|
157
162
|
* ```
|
|
158
163
|
*/
|
|
159
|
-
export declare function useZoomAndCenter({ reactFlowWrapper, nodes }: UseZoomAndCenterParams): UseZoomAndCenterReturn;
|
|
164
|
+
export declare function useZoomAndCenter({ reactFlowWrapper, nodes, resetZoomHistoryKey, }: UseZoomAndCenterParams): UseZoomAndCenterReturn;
|
|
@@ -27,6 +27,17 @@ interface TemplateGridStore {
|
|
|
27
27
|
setViewMode: (templateId: number, viewMode: 'readonly' | 'edit') => void;
|
|
28
28
|
getViewMode: (templateId: number) => 'readonly' | 'edit';
|
|
29
29
|
clearViewMode: (templateId: number) => void;
|
|
30
|
+
/** Pan/zoom del lienzo por plantilla (sesión actual); independiente entre flujos */
|
|
31
|
+
flowViewportByTemplateId: Record<number, {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
zoom: number;
|
|
35
|
+
}>;
|
|
36
|
+
setFlowViewportForTemplate: (templateId: number, viewport: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
zoom: number;
|
|
40
|
+
}) => void;
|
|
30
41
|
expandedGroups: Set<string>;
|
|
31
42
|
groupTemplateData: Record<string, any>;
|
|
32
43
|
toggleGroupExpansion: (groupId: string) => void;
|
|
@@ -66,6 +66,8 @@ type DetailsTaskData = {
|
|
|
66
66
|
fterminada: Date | null;
|
|
67
67
|
responsable: Responsible | null;
|
|
68
68
|
prioridad: string | null;
|
|
69
|
+
/** API `nivel_dificultad` (1–5); optional if older payloads omit it. */
|
|
70
|
+
nivel_dificultad?: number | string | null;
|
|
69
71
|
lista: string | null;
|
|
70
72
|
texto_corto: string | null;
|
|
71
73
|
texto_largo: string | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Same rules as assignment (`ButtonAssignUsers`): Project Managers can edit regardless of status;
|
|
3
|
+
* other roles only when the task is still in backlog (`estatus === 0`).
|
|
4
|
+
*/
|
|
5
|
+
export declare const TASKS_PROJECT_MANAGER_ROLE = "Project Manager";
|
|
6
|
+
export declare function canEditTaskFields(role: string | undefined | null, status: number): boolean;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Elegibilidad para multiselección masiva del Kanban (listado y campaña)
|
|
3
|
-
*
|
|
2
|
+
* Elegibilidad para multiselección masiva del Kanban (listado y campaña): misma regla que
|
|
3
|
+
* `hasMoveMenuForBulk` en `Task.tsx` (menú «mover» + checkbox bulk).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* - **
|
|
7
|
-
*
|
|
8
|
-
* `repeatsToDo === 1` se trataba como «sin repeticiones» y permitía `0/1` con menú mover y bulk.
|
|
9
|
-
* - **Dependencia:** misma regla que el render de `ButtonMoveTask` (tarea previa obligatoria incompleta bloquea).
|
|
5
|
+
* - **`isVisibleMoveMenu`:** `(repeatsAreCompleted || dontHaveRepeats || statusIsZero) && status !== 2`
|
|
6
|
+
* - **Tarea requerida (como `ButtonMoveTask`):** `haveRequiredTask || !nameRequiredTask`, con
|
|
7
|
+
* `haveRequiredTask = (nameRequiredTask ?? '') !== '' && statusRequiredTask === 2`
|
|
10
8
|
*/
|
|
11
9
|
export type TaskKanbanBulkEligibilityInput = {
|
|
12
10
|
status: number;
|
|
@@ -15,4 +13,7 @@ export type TaskKanbanBulkEligibilityInput = {
|
|
|
15
13
|
repeatsToDo?: number | null | undefined;
|
|
16
14
|
repeats?: number | null | undefined;
|
|
17
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* `true` si la tarea puede mostrar fila «mover» + bulk en la card (`Task` / `KanbanCampania` «Seleccionar todas»).
|
|
18
|
+
*/
|
|
18
19
|
export declare function isTaskEligibleForKanbanBulkSelection(t: TaskKanbanBulkEligibilityInput): boolean;
|