@imj_media/tareas 1.6.2 → 1.6.4
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/atoms/InputSearch.d.ts +8 -3
- package/dist/src/components/molecules/ButtonAssignUsers.d.ts +3 -1
- package/dist/src/components/organisms/ConfirmationModal.d.ts +1 -1
- package/dist/src/components/organisms/DetailsTask.d.ts +1 -1
- package/dist/src/components/organisms/Task.d.ts +1 -1
- package/dist/src/core/actions/get_tasks_project.action.d.ts +9 -39
- package/dist/src/core/actions/get_tasks_response.action.d.ts +26 -3
- package/dist/src/core/actions/get_teams_project.action.d.ts +1 -1
- package/dist/src/hooks/kanbanListadoColumnTasks.types.d.ts +28 -0
- package/dist/src/hooks/useDoneTasks.d.ts +2 -12
- package/dist/src/hooks/useToDoTasks.d.ts +2 -12
- package/dist/src/hooks/useWorkingTasks.d.ts +2 -12
- package/dist/src/infraestructure/interfaces/atraso-reasons-response.d.ts +1 -1
- package/dist/src/infraestructure/interfaces/pause-reasons.d.ts +1 -1
- package/dist/src/infraestructure/interfaces/tasks-campania-response.d.ts +2 -1
- package/dist/src/infraestructure/interfaces/tasks-kanban-general.d.ts +3 -1
- package/dist/src/infraestructure/interfaces/tasks-reponse.d.ts +27 -4
- package/dist/src/infraestructure/mappers/pause-reasons.d.ts +1 -0
- package/dist/src/modules/teams/ui/atoms/TeamModalHeader.d.ts +2 -2
- package/dist/src/modules/teams/utils/teams.utils.d.ts +7 -17
- package/dist/src/modules/templates/components/atoms/tasks/WitnessesIndicator.d.ts +7 -0
- package/dist/src/modules/templates/components/atoms/tasks/index.d.ts +1 -0
- package/dist/src/modules/templates/components/organisms/AddTemplateModal.d.ts +1 -1
- package/dist/src/modules/templates/components/organisms/NewTaskDrawer.d.ts +4 -13
- package/dist/src/modules/templates/hooks/filters/useStaticFilters.d.ts +1 -1
- package/dist/src/modules/templates/hooks/states/useStates.d.ts +1 -1
- package/dist/src/modules/templates/hooks/useFetchGraphTemplates.d.ts +1 -1
- package/dist/src/modules/templates/hooks/useFlow.types.d.ts +15 -13
- package/dist/src/modules/templates/hooks/useFlowActions.d.ts +1 -1
- package/dist/src/modules/templates/infraestructure/interfaces/api.types.d.ts +2 -0
- package/dist/src/modules/templates/infraestructure/interfaces/filter.types.d.ts +4 -3
- package/dist/src/modules/templates/types/template_graph.d.ts +10 -0
- package/dist/src/shared/store/useStore.d.ts +4 -2
- package/dist/src/types/index.d.ts +27 -3
- package/dist/src/utils/buildKanbanListadoColumnFilters.d.ts +19 -0
- package/dist/src/utils/filters.functions.d.ts +1 -1
- package/dist/src/utils/flattenEquipoMiembros.d.ts +38 -0
- package/dist/src/utils/formats.d.ts +4 -18
- package/dist/src/utils/inputs.functions.d.ts +2 -2
- package/dist/src/utils/kanbanFilterFieldsEqual.d.ts +3 -0
- package/dist/src/utils/kanbanOwnerFilterPermissions.d.ts +7 -0
- package/dist/src/utils/kanbanTasksQueries.d.ts +6 -1
- package/dist/src/utils/mapListItemToDetailsTaskData.d.ts +6 -0
- package/dist/src/utils/tanstack.functions.d.ts +18 -1
- package/dist/tareas.cjs +9 -9
- package/dist/tareas.css +1 -1
- package/dist/tareas.es.js +5828 -5609
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
type SearchOption = {
|
|
2
|
+
id?: string | number;
|
|
3
|
+
name: string;
|
|
4
|
+
image?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const InputSearch: ({ options, onselect, }: {
|
|
7
|
+
options: SearchOption[];
|
|
8
|
+
onselect: (option: SearchOption) => void;
|
|
4
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
10
|
export default InputSearch;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IUsers } from '../../infraestructure/interfaces/users';
|
|
2
|
-
declare const ButtonAssignUsers: ({ users, onClick, responsible, role, status, }: {
|
|
2
|
+
declare const ButtonAssignUsers: ({ users, responsibleCandidateIds, onClick, responsible, role, status, }: {
|
|
3
3
|
users: IUsers[] | [];
|
|
4
|
+
/** IDs de usuarios vinculados a la tarea en kanban (mismo orden que `users` sin filtrar por responsable). */
|
|
5
|
+
responsibleCandidateIds?: number[];
|
|
4
6
|
onClick: (idNewResponsible: number | undefined, typeOfSelect: string) => void;
|
|
5
7
|
role: string;
|
|
6
8
|
responsible: number | null;
|
|
@@ -9,5 +9,5 @@ interface ConfirmationModalProps {
|
|
|
9
9
|
confirmLabel?: string;
|
|
10
10
|
cancelLabel?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const ConfirmationModal: ({ open, handleChange, children, title, onConfirm, contentLabel, confirmLabel, cancelLabel, isLoading }: ConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const ConfirmationModal: ({ open, handleChange, children, title, onConfirm, contentLabel, confirmLabel: _confirmLabel, cancelLabel: _cancelLabel, isLoading: _isLoading, }: ConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DetailsTaskProps } from '../../types';
|
|
2
|
-
export default function DetailsTask({ isOpen, setIsOpen, taskId }: DetailsTaskProps): import('react').ReactPortal;
|
|
2
|
+
export default function DetailsTask({ isOpen, setIsOpen, taskId, initialFromList, }: DetailsTaskProps): import('react').ReactPortal;
|
|
@@ -9,5 +9,5 @@ type TaskProps = TasksKanbanGeneral & {
|
|
|
9
9
|
/** Columna no base durante una sesión masiva: sin interacción con las cards. */
|
|
10
10
|
isBulkColumnLocked?: boolean;
|
|
11
11
|
};
|
|
12
|
-
declare const Task: ({ id, task, endDate, users, willBePaused, nameProject, comments, priority, difficulty, responsible, nameRequiredTask, nameRequiredTaskResponsible, statusRequiredTask, status, repeatsToDo, repeats, medioName, paused, idProject, atraso, categoria, cambio_arte, name_father_required_task, name_father_required_task_responsible, boardColumnTitle, isBulkColumnLocked, }: TaskProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const Task: ({ id, task, endDate, users, willBePaused, nameProject, comments, priority, difficulty, responsible, nameRequiredTask, nameRequiredTaskResponsible, statusRequiredTask, status, repeatsToDo, repeats, medioName, paused, idProject, atraso, categoria, cambio_arte, name_father_required_task, name_father_required_task_responsible, panelDataFromList, boardColumnTitle, isBulkColumnLocked, }: TaskProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export default Task;
|
|
@@ -1,44 +1,14 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
difficulty?: TDifficulty;
|
|
6
|
-
priority?: TPriority;
|
|
7
|
-
dependency?: IDependency;
|
|
8
|
-
status?: TStatus;
|
|
9
|
-
project?: IProject;
|
|
10
|
-
salesman?: ISalesman;
|
|
11
|
-
pagination?: IPagination;
|
|
12
|
-
cancelada?: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface IOwner {
|
|
15
|
-
user: number;
|
|
16
|
-
config?: TConfigs;
|
|
17
|
-
}
|
|
18
|
-
interface IProject {
|
|
19
|
-
id?: number;
|
|
20
|
-
name?: string;
|
|
21
|
-
}
|
|
22
|
-
interface ISalesman {
|
|
23
|
-
id?: number;
|
|
24
|
-
name?: string;
|
|
25
|
-
}
|
|
26
|
-
interface IPagination {
|
|
27
|
-
page?: number;
|
|
28
|
-
pageSize?: number;
|
|
29
|
-
withCount?: boolean;
|
|
30
|
-
}
|
|
31
|
-
interface IGetTasksResponse {
|
|
2
|
+
import { IFilters } from './get_tasks_response.action';
|
|
3
|
+
export type { TConfigs, IFilters } from './get_tasks_response.action';
|
|
4
|
+
interface IGetTasksProjectParams {
|
|
32
5
|
filters: IFilters;
|
|
33
|
-
page?: number;
|
|
34
|
-
limit?: number;
|
|
35
6
|
tasks_api: AxiosInstance;
|
|
36
7
|
project: number;
|
|
37
8
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export declare const getTasksProject: ({ filters, tasks_api, project }:
|
|
44
|
-
export {};
|
|
9
|
+
/**
|
|
10
|
+
* Tareas del kanban de **una campaña** (proyecto): mismo POST que el kanban general,
|
|
11
|
+
* con `project.id` fijado al proyecto actual e `includeAllTasks: true` (equivalente al antiguo `listado_tareas_flujo`).
|
|
12
|
+
* Pagina hasta cubrir `meta.pagination.total`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getTasksProject: ({ filters, tasks_api, project }: IGetTasksProjectParams) => Promise<import('../../infraestructure/interfaces/tasks-campania').ITasksCampaign[]>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { TasksKanbanGeneral } from '../../infraestructure/interfaces/tasks-kanban-general';
|
|
1
2
|
import { AxiosInstance } from 'axios';
|
|
3
|
+
/** Filtros compartidos entre el GET legacy `listado_tareas` (otros flujos) y el POST `listado-kanban-general`. */
|
|
2
4
|
export interface IFilters {
|
|
3
5
|
owner: IOwner;
|
|
4
6
|
taskName?: string;
|
|
@@ -11,10 +13,15 @@ export interface IFilters {
|
|
|
11
13
|
pagination?: IPagination;
|
|
12
14
|
justProjects?: boolean;
|
|
13
15
|
populate?: string[];
|
|
16
|
+
includeAllTasks?: boolean;
|
|
17
|
+
cancelada?: boolean | number | string;
|
|
18
|
+
taskType?: string;
|
|
14
19
|
}
|
|
15
20
|
interface IOwner {
|
|
16
21
|
user: number;
|
|
17
22
|
config?: TConfigs;
|
|
23
|
+
role?: string;
|
|
24
|
+
teamIds?: number[];
|
|
18
25
|
}
|
|
19
26
|
interface IProject {
|
|
20
27
|
id?: number;
|
|
@@ -35,10 +42,26 @@ interface IGetTasksResponse {
|
|
|
35
42
|
limit?: number;
|
|
36
43
|
tasks_api: AxiosInstance;
|
|
37
44
|
}
|
|
38
|
-
type TConfigs = 'yo_y_mis_equipos' | 'mis_equipos' | 'yo';
|
|
45
|
+
export type TConfigs = 'yo_y_mis_equipos' | 'mis_equipos' | 'yo' | 'todas';
|
|
39
46
|
type TDifficulty = 'Muy facil' | 'Facil' | 'Media' | 'Dificil' | 'Muy dificil';
|
|
40
47
|
type TPriority = 'Sin prioridad' | 'Prioridad Baja' | 'Prioridad Media' | 'Prioridad Alta';
|
|
41
|
-
type IDependency = 'con' | 'sin';
|
|
48
|
+
type IDependency = 'con' | 'sin' | 'ambas';
|
|
42
49
|
type TStatus = 'por_hacer' | 'trabajando' | 'completadas';
|
|
43
|
-
export
|
|
50
|
+
export interface GetTasksKanbanPage {
|
|
51
|
+
tasks: TasksKanbanGeneral[];
|
|
52
|
+
total: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* POST `listado-kanban-general`: filas ya normalizadas (sin mapear a card kanban).
|
|
56
|
+
* Sirve para kanban general (`KanbanTasksMapper`) y kanban campaña (`CampaignTasksMapper`).
|
|
57
|
+
*/
|
|
58
|
+
export declare function fetchListadoKanbanGeneralRaw({ filters, tasks_api, }: IGetTasksResponse): Promise<{
|
|
59
|
+
rows: unknown[];
|
|
60
|
+
total: number;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* Listado kanban general vía POST acotado (`listado-kanban-general`).
|
|
64
|
+
* `id_t_requerida` ya viene con responsable/equipo en servidor: no se llama a `/api/tareas` por filas.
|
|
65
|
+
*/
|
|
66
|
+
export declare const getTasksResponse: ({ filters, tasks_api, }: IGetTasksResponse) => Promise<GetTasksKanbanPage>;
|
|
44
67
|
export {};
|
|
@@ -40,5 +40,5 @@ type TDifficulty = 'Muy facil' | 'Facil' | 'Media' | 'Dificil' | 'Muy dificil';
|
|
|
40
40
|
type TPriority = 'Sin prioridad' | 'Prioridad Baja' | 'Prioridad Media' | 'Prioridad Alta';
|
|
41
41
|
type IDependency = 'con' | 'sin';
|
|
42
42
|
type TStatus = 'por_hacer' | 'trabajando' | 'completadas';
|
|
43
|
-
export declare const getTeamsResponse: ({ filters, tasks_api }: IGetTasksResponse) => Promise<void>;
|
|
43
|
+
export declare const getTeamsResponse: ({ filters: _filters, tasks_api: _tasks_api }: IGetTasksResponse) => Promise<void>;
|
|
44
44
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InfiniteData, UseInfiniteQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { GetTasksKanbanPage } from '../core/actions/get_tasks_response.action';
|
|
3
|
+
/** Payload de filtros enviado al POST listado kanban (columnas del tablero general). */
|
|
4
|
+
export type KanbanListadoFiltersToSend = {
|
|
5
|
+
owner: {
|
|
6
|
+
user: number;
|
|
7
|
+
config: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
};
|
|
10
|
+
status?: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type KanbanListadoInfiniteQueryResult = UseInfiniteQueryResult<InfiniteData<GetTasksKanbanPage, unknown>, Error>;
|
|
14
|
+
export type UseDoneTasksResult = {
|
|
15
|
+
doneTasks: KanbanListadoInfiniteQueryResult;
|
|
16
|
+
total: number;
|
|
17
|
+
filtersToSend: KanbanListadoFiltersToSend;
|
|
18
|
+
};
|
|
19
|
+
export type UseToDoTasksResult = {
|
|
20
|
+
toDoTasks: KanbanListadoInfiniteQueryResult;
|
|
21
|
+
total: number;
|
|
22
|
+
filtersToSend: KanbanListadoFiltersToSend;
|
|
23
|
+
};
|
|
24
|
+
export type UseWorkingTasksResult = {
|
|
25
|
+
workingTasks: KanbanListadoInfiniteQueryResult;
|
|
26
|
+
total: number;
|
|
27
|
+
filtersToSend: KanbanListadoFiltersToSend;
|
|
28
|
+
};
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
total: number;
|
|
4
|
-
filtersToSend: {
|
|
5
|
-
owner: {
|
|
6
|
-
user: number;
|
|
7
|
-
config: any;
|
|
8
|
-
role: string;
|
|
9
|
-
};
|
|
10
|
-
status: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
1
|
+
import { UseDoneTasksResult } from './kanbanListadoColumnTasks.types';
|
|
2
|
+
declare const useDoneTasks: () => UseDoneTasksResult;
|
|
13
3
|
export default useDoneTasks;
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
total: number;
|
|
4
|
-
filtersToSend: {
|
|
5
|
-
owner: {
|
|
6
|
-
user: number;
|
|
7
|
-
config: any;
|
|
8
|
-
role: string;
|
|
9
|
-
};
|
|
10
|
-
status: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
1
|
+
import { UseToDoTasksResult } from './kanbanListadoColumnTasks.types';
|
|
2
|
+
declare const useToDoTasks: () => UseToDoTasksResult;
|
|
13
3
|
export default useToDoTasks;
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
total: number;
|
|
4
|
-
filtersToSend: {
|
|
5
|
-
owner: {
|
|
6
|
-
user: number;
|
|
7
|
-
config: any;
|
|
8
|
-
role: string;
|
|
9
|
-
};
|
|
10
|
-
status: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
1
|
+
import { UseWorkingTasksResult } from './kanbanListadoColumnTasks.types';
|
|
2
|
+
declare const useWorkingTasks: () => UseWorkingTasksResult;
|
|
13
3
|
export default useWorkingTasks;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAtrasoReason, ICategory } from '../../types';
|
|
1
|
+
import { DetailsTaskData, IAtrasoReason, ICategory } from '../../types';
|
|
2
2
|
import { IUsers } from './users';
|
|
3
3
|
export interface TasksKanbanGeneral {
|
|
4
4
|
id: number;
|
|
@@ -30,4 +30,6 @@ export interface TasksKanbanGeneral {
|
|
|
30
30
|
};
|
|
31
31
|
name_father_required_task?: string;
|
|
32
32
|
name_father_required_task_responsible?: string;
|
|
33
|
+
/** Snapshot para el panel lateral sin `GET /api/detalleTarea` cuando el listado ya trae los campos. */
|
|
34
|
+
panelDataFromList?: DetailsTaskData | null;
|
|
33
35
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { IAtrasoReason, ICategory } from '../../types';
|
|
2
|
+
/** Auditoría listado kanban (doc `ListadoKanbanUserAudit`). */
|
|
3
|
+
export interface TareaUserAudit {
|
|
4
|
+
id: number | null;
|
|
5
|
+
nombre: string | null;
|
|
6
|
+
email: string | null;
|
|
7
|
+
}
|
|
2
8
|
export interface ITasksResponse {
|
|
3
9
|
id: number;
|
|
4
10
|
texto_corto: string;
|
|
11
|
+
/** Descripción larga cuando el listado acotado la incluye (panel lateral sin detalle). */
|
|
12
|
+
texto_largo?: string | null;
|
|
5
13
|
orden: number;
|
|
6
14
|
prioridad: null;
|
|
7
15
|
estatus: number;
|
|
@@ -24,9 +32,18 @@ export interface ITasksResponse {
|
|
|
24
32
|
equipo: Equipo | null;
|
|
25
33
|
supervisor: null;
|
|
26
34
|
id_t_requerida: IDTRequerida | null;
|
|
27
|
-
ids_t_dependientes
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
ids_t_dependientes?: IDTRequerida[] | unknown[];
|
|
36
|
+
comentarios?: unknown[];
|
|
37
|
+
lista?: string | null;
|
|
38
|
+
f_inicio_estimada?: Date | string | null;
|
|
39
|
+
f_fin_estimada?: Date | string | null;
|
|
40
|
+
createdAt?: Date | string | null;
|
|
41
|
+
updatedAt?: Date | string | null;
|
|
42
|
+
/** Respuestas legacy / serialización snake_case. */
|
|
43
|
+
created_at?: Date | string | null;
|
|
44
|
+
updated_at?: Date | string | null;
|
|
45
|
+
created_by?: TareaUserAudit | null;
|
|
46
|
+
updated_by?: TareaUserAudit | null;
|
|
30
47
|
nombre_medio: string | null;
|
|
31
48
|
pausada: boolean;
|
|
32
49
|
atraso: IAtrasoReason | null;
|
|
@@ -45,13 +62,19 @@ export interface Equipo {
|
|
|
45
62
|
miembros: Miembro[];
|
|
46
63
|
}
|
|
47
64
|
export interface Miembro {
|
|
65
|
+
id?: number;
|
|
48
66
|
idUser: User;
|
|
49
|
-
|
|
67
|
+
/** Payload legacy: OBP a veces venía en la raíz del miembro. */
|
|
68
|
+
userOBP?: UserOBP | null;
|
|
69
|
+
/** Jerarquía de equipo (listado OBP): sub-miembros con la misma forma. */
|
|
70
|
+
miembros?: Miembro[];
|
|
50
71
|
}
|
|
51
72
|
interface User {
|
|
52
73
|
id: number;
|
|
53
74
|
nombre: string;
|
|
54
75
|
email: string;
|
|
76
|
+
/** Imagen/rol OBP del usuario (listado kanban). */
|
|
77
|
+
userOBP?: UserOBP | null;
|
|
55
78
|
}
|
|
56
79
|
interface UserOBP {
|
|
57
80
|
id: number;
|
|
@@ -2,7 +2,7 @@ import { IconType } from '@imj_media/ui';
|
|
|
2
2
|
interface TeamModalHeaderProps {
|
|
3
3
|
title: string;
|
|
4
4
|
color?: IconType;
|
|
5
|
-
icon:
|
|
5
|
+
icon: IconType;
|
|
6
6
|
}
|
|
7
|
-
export declare function TeamModalHeader({ title, color, icon }: TeamModalHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function TeamModalHeader({ title, color: _color, icon }: TeamModalHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
import { generatePopulateStructure } from './populate.utils';
|
|
2
|
-
import { MemberList,
|
|
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;
|
|
2
|
+
import { MemberList, TeamFilters } from '../infrastructure/interfaces/team';
|
|
19
3
|
/**
|
|
20
4
|
* Miembros raíz a mostrar en el modal de equipo: solo encargados (`esEncargado`) y,
|
|
21
5
|
* bajo ellos, el árbol que ya viene en `miembros`. Oculta hermanos planos del API
|
|
@@ -23,6 +7,12 @@ export declare function expandFirstRootDirectChildrenForTeamPayload(team: Team):
|
|
|
23
7
|
* se muestran todos los raíz para poder seguir editando.
|
|
24
8
|
*/
|
|
25
9
|
export declare function getMembersForModalView(miembros: MemberList): MemberList;
|
|
10
|
+
/**
|
|
11
|
+
* Lista única de integrantes para contador y avatares: solo árbol bajo encargado(s) en raíz,
|
|
12
|
+
* sin hermanos planos del API. Deduplica por id de miembro, uid e idUser.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getUniqueIntegrantesFromTeamRoots(miembros: MemberList): MemberList;
|
|
15
|
+
export declare function countUniqueIntegrantes(miembros: MemberList): number;
|
|
26
16
|
export declare const randomColor: () => string;
|
|
27
17
|
/**
|
|
28
18
|
* Construye el objeto filters para la API de equipos (Strapi).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface WitnessesIndicatorProps {
|
|
2
|
+
/** column: nodo del grafo; row: footer de card de plantilla */
|
|
3
|
+
layout?: 'column' | 'row';
|
|
4
|
+
}
|
|
5
|
+
/** Cámara + leyenda «Testigos»; layout column (grafo) o row (listado). */
|
|
6
|
+
export declare const WitnessesIndicator: ({ layout }: WitnessesIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -16,5 +16,5 @@ interface TemplateAddProps {
|
|
|
16
16
|
nodeDataType: NodeDataType;
|
|
17
17
|
parentNodeInfo?: ParentNodeInfo;
|
|
18
18
|
}
|
|
19
|
-
export declare const TemplateAdd: ({ isOpen, onClose, onSuccess, nodeDataType, parentNodeInfo }: TemplateAddProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const TemplateAdd: ({ isOpen, onClose, onSuccess, nodeDataType, parentNodeInfo: _parentNodeInfo, }: TemplateAddProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { NodeDataType } from '../atoms/PlusNode';
|
|
2
|
+
import { TaskFormData } from '../../hooks/useFlow.types';
|
|
3
|
+
import { RawTareaPlantilla } from '../../infraestructure/interfaces/api.types';
|
|
2
4
|
interface ParentNodeInfo {
|
|
3
5
|
id: string;
|
|
4
6
|
label?: string;
|
|
@@ -13,18 +15,7 @@ interface NewTaskDrawerProps {
|
|
|
13
15
|
nodeDataType?: NodeDataType;
|
|
14
16
|
parentNodeInfo?: ParentNodeInfo;
|
|
15
17
|
editMode?: boolean;
|
|
16
|
-
taskToEdit?:
|
|
18
|
+
taskToEdit?: Partial<RawTareaPlantilla>;
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
title: string;
|
|
20
|
-
description: string;
|
|
21
|
-
priority: string | number;
|
|
22
|
-
difficulty: string | number;
|
|
23
|
-
duration: string | number;
|
|
24
|
-
team: number | string;
|
|
25
|
-
responsible: string;
|
|
26
|
-
type: string;
|
|
27
|
-
parent?: ParentNodeInfo;
|
|
28
|
-
}
|
|
29
|
-
export declare const NewTaskDrawer: ({ isOpen, onClose, onSuccess, nodeDataType, parentNodeInfo, editMode, taskToEdit, }: NewTaskDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const NewTaskDrawer: ({ isOpen, onClose, onSuccess, nodeDataType: _nodeDataType, parentNodeInfo, editMode, taskToEdit, }: NewTaskDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
21
|
export {};
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
export declare const useStaticFilters: (currentPath: string) => {
|
|
22
|
-
inputFilters: import('../../infraestructure/interfaces/filter.types').KanbanGeneralFiltersConfig;
|
|
22
|
+
inputFilters: import('../../infraestructure/interfaces/filter.types').TemplateFiltersConfig | import('../../infraestructure/interfaces/filter.types').TeamsFiltersConfig | import('../../infraestructure/interfaces/filter.types').KanbanGeneralFiltersConfig;
|
|
23
23
|
};
|
|
@@ -18,7 +18,7 @@ export declare const useStates: () => {
|
|
|
18
18
|
templateId: number;
|
|
19
19
|
id: unknown;
|
|
20
20
|
}) => Promise<void>;
|
|
21
|
-
updateNodeWithNewEdge: ({ templateId, edge, task }: {
|
|
21
|
+
updateNodeWithNewEdge: ({ templateId, edge: _edge, task }: {
|
|
22
22
|
templateId: number;
|
|
23
23
|
edge: any;
|
|
24
24
|
task: RawTareaPlantilla;
|
|
@@ -3,7 +3,7 @@ import { AxiosInstance } from 'axios';
|
|
|
3
3
|
import { ApiResponse, MetaData } from '../../../types/api.types';
|
|
4
4
|
import { UseQueryProps } from '../../../types/interfaces';
|
|
5
5
|
import { TemplateGraph } from '../types/template_graph';
|
|
6
|
-
export declare const getAllTemplatesResponse: ({ tasks_api, page, pageSize, search }: {
|
|
6
|
+
export declare const getAllTemplatesResponse: ({ tasks_api: _tasks_api, page, pageSize, search: _search }: {
|
|
7
7
|
tasks_api: AxiosInstance;
|
|
8
8
|
page?: number;
|
|
9
9
|
pageSize?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node, Edge } from '@xyflow/react';
|
|
1
|
+
import { Node, Edge, Connection, EdgeChange, NodeChange } from '@xyflow/react';
|
|
2
2
|
export declare const FLOW_CONSTANTS: {
|
|
3
3
|
readonly DEFAULT_CHILD_WIDTH: 260;
|
|
4
4
|
readonly DEFAULT_CHILD_HEIGHT: 80;
|
|
@@ -43,17 +43,19 @@ export interface ParentNodeInfo {
|
|
|
43
43
|
label?: string;
|
|
44
44
|
nodeType?: string;
|
|
45
45
|
connectionType?: string;
|
|
46
|
-
data:
|
|
46
|
+
data: Record<string, unknown>;
|
|
47
47
|
}
|
|
48
48
|
export interface TaskFormData {
|
|
49
49
|
id?: number;
|
|
50
50
|
title: string;
|
|
51
51
|
description: string;
|
|
52
|
-
priority: string;
|
|
53
|
-
difficulty: string;
|
|
54
|
-
duration: string;
|
|
55
|
-
team: string;
|
|
52
|
+
priority: string | number;
|
|
53
|
+
difficulty: string | number;
|
|
54
|
+
duration: string | number;
|
|
55
|
+
team: string | number;
|
|
56
56
|
responsible: string;
|
|
57
|
+
/** Solicitud de testigos al crear/editar tarea en plantilla */
|
|
58
|
+
is_monitoring_trigger: boolean;
|
|
57
59
|
}
|
|
58
60
|
export interface TaskData extends TaskFormData {
|
|
59
61
|
reference_graph: string;
|
|
@@ -74,26 +76,26 @@ export interface UseFlowReturn {
|
|
|
74
76
|
connectionPopup: ConnectionPopupState | null;
|
|
75
77
|
setNodes: (nodes: Node[] | ((nodes: Node[]) => Node[])) => void;
|
|
76
78
|
setEdges: (edges: Edge[] | ((edges: Edge[]) => Edge[])) => void;
|
|
77
|
-
onEdgesChange: (changes:
|
|
78
|
-
onConnect: (params:
|
|
79
|
-
onConnectEnd: (event:
|
|
79
|
+
onEdgesChange: (changes: EdgeChange[]) => void;
|
|
80
|
+
onConnect: (params: Connection) => void;
|
|
81
|
+
onConnectEnd: (event: unknown, connectionState: unknown) => void;
|
|
80
82
|
onDeleteNode: (deleted: Node[]) => void;
|
|
81
83
|
onEdgesDelete: (deleted: Edge[]) => void;
|
|
82
84
|
onBeforeDelete: (nodes: {
|
|
83
85
|
nodes: Node[];
|
|
84
86
|
}) => Promise<boolean>;
|
|
85
|
-
handleNodesChange: (changes:
|
|
87
|
+
handleNodesChange: (changes: NodeChange[]) => void;
|
|
86
88
|
getParentNodeInfo: () => ParentNodeInfo | null;
|
|
87
89
|
isProtectedConnection: (edge: Edge) => boolean;
|
|
88
90
|
isStartNode: (nodeId: string) => boolean;
|
|
89
91
|
createNodeFromPopup: (nodeType: string, connectionType: string, formData?: TaskFormData) => Promise<void>;
|
|
90
92
|
updateNodeFromPopup: (updatedData: Partial<TaskFormData> | {
|
|
91
|
-
templateData?:
|
|
92
|
-
} |
|
|
93
|
+
templateData?: Record<string, unknown>;
|
|
94
|
+
} | Record<string, unknown>) => Promise<void>;
|
|
93
95
|
closeNewNodePopup: () => void;
|
|
94
96
|
createConnectionFromPopup: (nodeType: string, connectionType: string) => void;
|
|
95
97
|
closeConnectionPopup: () => void;
|
|
96
|
-
onDragEnd: (event:
|
|
98
|
+
onDragEnd: (event: unknown, data: unknown, _pane: unknown) => void;
|
|
97
99
|
}
|
|
98
100
|
export type ConnectionType = 'dependiente' | 'hija';
|
|
99
101
|
export type NodeType = 'main' | 'group' | 'start';
|
|
@@ -20,6 +20,6 @@ export declare const useFlowActions: ({ nodes, edges, setNodes, setEdges, newNod
|
|
|
20
20
|
updateNodeFromPopup: (updatedData: Partial<TaskFormData> | {
|
|
21
21
|
templateData?: any;
|
|
22
22
|
} | any) => Promise<void>;
|
|
23
|
-
updateAfterDeleted: (deletedNodeIds?: any[],
|
|
23
|
+
updateAfterDeleted: (deletedNodeIds?: any[], _edges?: any[], templateId?: number, deletedNodeId?: number) => Promise<void>;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
@@ -53,6 +53,8 @@ export interface RawTareaPlantilla {
|
|
|
53
53
|
nivel_dificultad: number;
|
|
54
54
|
duracion: number | null;
|
|
55
55
|
start: boolean;
|
|
56
|
+
/** Solicitud de testigos; null se trata como false en UI */
|
|
57
|
+
is_monitoring_trigger?: boolean | null;
|
|
56
58
|
equipo: {
|
|
57
59
|
id: number | null;
|
|
58
60
|
};
|
|
@@ -12,9 +12,10 @@ export type TeamsFiltersConfig = {
|
|
|
12
12
|
integrantes_min: Filter;
|
|
13
13
|
integrantes_max: Filter;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
export type
|
|
17
|
-
export type
|
|
15
|
+
/** Sin filtros adicionales en esta vista (evita `{}` como tipo “vacío”). */
|
|
16
|
+
export type KanbanGeneralFiltersConfig = Record<string, never>;
|
|
17
|
+
export type KanbanCampaniaFiltersConfig = Record<string, never>;
|
|
18
|
+
export type ListaCampaniasFiltersConfig = Record<string, never>;
|
|
18
19
|
export type InputFiltersByPathType = {
|
|
19
20
|
'templates-container': TemplateFiltersConfig;
|
|
20
21
|
'teams-container': TeamsFiltersConfig;
|
|
@@ -40,6 +40,15 @@ export interface Editor {
|
|
|
40
40
|
username: string;
|
|
41
41
|
image: string;
|
|
42
42
|
}
|
|
43
|
+
/** Tarea resumida en listado de plantillas (all-plantillas) */
|
|
44
|
+
export interface TemplateTareaPlantillaListItem {
|
|
45
|
+
id: number;
|
|
46
|
+
start?: boolean;
|
|
47
|
+
cancelada?: boolean;
|
|
48
|
+
texto_corto?: string;
|
|
49
|
+
texto_largo?: string;
|
|
50
|
+
is_monitoring_trigger?: boolean | null;
|
|
51
|
+
}
|
|
43
52
|
export interface Template {
|
|
44
53
|
id: number;
|
|
45
54
|
nombre_plantilla: string;
|
|
@@ -62,6 +71,7 @@ export interface Template {
|
|
|
62
71
|
updated_by: Editor;
|
|
63
72
|
created_by: Editor;
|
|
64
73
|
publication_date: string;
|
|
74
|
+
tarea_plantillas?: TemplateTareaPlantillaListItem[];
|
|
65
75
|
}
|
|
66
76
|
export interface TemplateFilters {
|
|
67
77
|
etstatus?: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Template } from '../../modules/templates/types/template_graph';
|
|
2
2
|
import { ITemplateFormData, IDisableFields, IClaveParams, IParamsTipo } from '../../modules/templates/infraestructure/interfaces/templates';
|
|
3
3
|
type TViewMode = 'list' | 'grid';
|
|
4
|
+
/** Refetch típico de React Query (lista plantillas / grid). */
|
|
5
|
+
type QueryRefetchFn = () => Promise<unknown>;
|
|
4
6
|
interface Store {
|
|
5
7
|
path: string;
|
|
6
8
|
viewMode: TViewMode;
|
|
@@ -14,7 +16,7 @@ interface Store {
|
|
|
14
16
|
isEditTemplate: boolean;
|
|
15
17
|
openModalCreateTemplate: boolean;
|
|
16
18
|
currentTemplateForEdit: Template | null;
|
|
17
|
-
refetch:
|
|
19
|
+
refetch: QueryRefetchFn | null;
|
|
18
20
|
openModalUnsavedChanges: boolean;
|
|
19
21
|
isDuplicateTemplate: boolean;
|
|
20
22
|
hasFormChanges: boolean;
|
|
@@ -42,7 +44,7 @@ interface Store {
|
|
|
42
44
|
setIsEditTemplate: (isEditTemplate: boolean) => void;
|
|
43
45
|
setOpenModalCreateTemplate: (open: boolean) => void;
|
|
44
46
|
setCurrentTemplateForEdit: (template: Template | null) => void;
|
|
45
|
-
setRefetch: (refetch:
|
|
47
|
+
setRefetch: (refetch: QueryRefetchFn) => void;
|
|
46
48
|
setOpenModalUnsavedChanges: (open: boolean) => void;
|
|
47
49
|
setIsDuplicateTemplate: (isDuplicateTemplate: boolean) => void;
|
|
48
50
|
setHasFormChanges: (hasChanges: boolean) => void;
|