@imj_media/tareas 1.6.2 → 1.6.3
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/useDoneTasks.d.ts +3 -3
- package/dist/src/hooks/useToDoTasks.d.ts +3 -3
- package/dist/src/hooks/useWorkingTasks.d.ts +3 -3
- 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/templates/components/organisms/AddTemplateModal.d.ts +1 -1
- package/dist/src/modules/templates/components/organisms/NewTaskDrawer.d.ts +1 -1
- 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 +9 -9
- package/dist/src/modules/templates/hooks/useFlowActions.d.ts +1 -1
- package/dist/src/modules/templates/infraestructure/interfaces/filter.types.d.ts +4 -3
- package/dist/src/shared/store/useStore.d.ts +4 -2
- package/dist/src/types/index.d.ts +27 -3
- 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/kanbanOwnerFilterPermissions.d.ts +7 -0
- package/dist/src/utils/mapListItemToDetailsTaskData.d.ts +6 -0
- package/dist/src/utils/tanstack.functions.d.ts +12 -1
- package/dist/tareas.cjs +9 -9
- package/dist/tareas.css +1 -1
- package/dist/tareas.es.js +6127 -5918
- 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 {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const useDoneTasks: () => {
|
|
2
|
-
doneTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<
|
|
2
|
+
doneTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('../core/actions/get_tasks_response.action').GetTasksKanbanPage, unknown>, Error>;
|
|
3
3
|
total: number;
|
|
4
4
|
filtersToSend: {
|
|
5
5
|
owner: {
|
|
6
6
|
user: number;
|
|
7
|
-
config:
|
|
7
|
+
config: import('../core/actions/get_tasks_response.action').TConfigs;
|
|
8
8
|
role: string;
|
|
9
9
|
};
|
|
10
|
-
status:
|
|
10
|
+
status: "completadas";
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export default useDoneTasks;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const useToDoTasks: () => {
|
|
2
|
-
toDoTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<
|
|
2
|
+
toDoTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('../core/actions/get_tasks_response.action').GetTasksKanbanPage, unknown>, Error>;
|
|
3
3
|
total: number;
|
|
4
4
|
filtersToSend: {
|
|
5
5
|
owner: {
|
|
6
6
|
user: number;
|
|
7
|
-
config:
|
|
7
|
+
config: import('../core/actions/get_tasks_response.action').TConfigs;
|
|
8
8
|
role: string;
|
|
9
9
|
};
|
|
10
|
-
status:
|
|
10
|
+
status: "por_hacer";
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export default useToDoTasks;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const useWorkingTasks: () => {
|
|
2
|
-
workingTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<
|
|
2
|
+
workingTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('../core/actions/get_tasks_response.action').GetTasksKanbanPage, unknown>, Error>;
|
|
3
3
|
total: number;
|
|
4
4
|
filtersToSend: {
|
|
5
5
|
owner: {
|
|
6
6
|
user: number;
|
|
7
|
-
config:
|
|
7
|
+
config: import('../core/actions/get_tasks_response.action').TConfigs;
|
|
8
8
|
role: string;
|
|
9
9
|
};
|
|
10
|
-
status:
|
|
10
|
+
status: "trabajando";
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
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 {};
|
|
@@ -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 {};
|
|
@@ -26,5 +26,5 @@ interface TaskFormData {
|
|
|
26
26
|
type: string;
|
|
27
27
|
parent?: ParentNodeInfo;
|
|
28
28
|
}
|
|
29
|
-
export declare const NewTaskDrawer: ({ isOpen, onClose, onSuccess, nodeDataType, parentNodeInfo, editMode, taskToEdit, }: NewTaskDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const NewTaskDrawer: ({ isOpen, onClose, onSuccess, nodeDataType: _nodeDataType, parentNodeInfo, editMode, taskToEdit, }: NewTaskDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
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,7 +43,7 @@ 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;
|
|
@@ -74,26 +74,26 @@ export interface UseFlowReturn {
|
|
|
74
74
|
connectionPopup: ConnectionPopupState | null;
|
|
75
75
|
setNodes: (nodes: Node[] | ((nodes: Node[]) => Node[])) => void;
|
|
76
76
|
setEdges: (edges: Edge[] | ((edges: Edge[]) => Edge[])) => void;
|
|
77
|
-
onEdgesChange: (changes:
|
|
78
|
-
onConnect: (params:
|
|
79
|
-
onConnectEnd: (event:
|
|
77
|
+
onEdgesChange: (changes: EdgeChange[]) => void;
|
|
78
|
+
onConnect: (params: Connection) => void;
|
|
79
|
+
onConnectEnd: (event: unknown, connectionState: unknown) => void;
|
|
80
80
|
onDeleteNode: (deleted: Node[]) => void;
|
|
81
81
|
onEdgesDelete: (deleted: Edge[]) => void;
|
|
82
82
|
onBeforeDelete: (nodes: {
|
|
83
83
|
nodes: Node[];
|
|
84
84
|
}) => Promise<boolean>;
|
|
85
|
-
handleNodesChange: (changes:
|
|
85
|
+
handleNodesChange: (changes: NodeChange[]) => void;
|
|
86
86
|
getParentNodeInfo: () => ParentNodeInfo | null;
|
|
87
87
|
isProtectedConnection: (edge: Edge) => boolean;
|
|
88
88
|
isStartNode: (nodeId: string) => boolean;
|
|
89
89
|
createNodeFromPopup: (nodeType: string, connectionType: string, formData?: TaskFormData) => Promise<void>;
|
|
90
90
|
updateNodeFromPopup: (updatedData: Partial<TaskFormData> | {
|
|
91
|
-
templateData?:
|
|
92
|
-
} |
|
|
91
|
+
templateData?: Record<string, unknown>;
|
|
92
|
+
} | Record<string, unknown>) => Promise<void>;
|
|
93
93
|
closeNewNodePopup: () => void;
|
|
94
94
|
createConnectionFromPopup: (nodeType: string, connectionType: string) => void;
|
|
95
95
|
closeConnectionPopup: () => void;
|
|
96
|
-
onDragEnd: (event:
|
|
96
|
+
onDragEnd: (event: unknown, data: unknown, _pane: unknown) => void;
|
|
97
97
|
}
|
|
98
98
|
export type ConnectionType = 'dependiente' | 'hija';
|
|
99
99
|
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 {};
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IAllUsersOBPResponse } from '../infraestructure/interfaces/users-obp-response';
|
|
1
2
|
type TeamWork = {
|
|
2
3
|
id: number;
|
|
3
4
|
nombre: string;
|
|
@@ -6,6 +7,16 @@ type TeamWork = {
|
|
|
6
7
|
type TRequirement = {
|
|
7
8
|
id: number;
|
|
8
9
|
texto_corto: string;
|
|
10
|
+
/** Tarea previa obligatoria (`id_t_requerida` en listado / detalle acotado). */
|
|
11
|
+
estatus?: number | null;
|
|
12
|
+
responsable?: {
|
|
13
|
+
id?: number;
|
|
14
|
+
nombre?: string | null;
|
|
15
|
+
} | null;
|
|
16
|
+
equipo?: {
|
|
17
|
+
id?: number;
|
|
18
|
+
nombre?: string | null;
|
|
19
|
+
} | null;
|
|
9
20
|
};
|
|
10
21
|
type ImageType = {
|
|
11
22
|
formats: {
|
|
@@ -29,6 +40,12 @@ type Responsible = {
|
|
|
29
40
|
nombre: string;
|
|
30
41
|
imagen: ImageType;
|
|
31
42
|
};
|
|
43
|
+
/** Usuario de auditoría en listado kanban (`created_by` / `updated_by`). */
|
|
44
|
+
export type TaskUserAudit = {
|
|
45
|
+
id: number;
|
|
46
|
+
nombre: string;
|
|
47
|
+
email?: string;
|
|
48
|
+
};
|
|
32
49
|
type CommentItem = {
|
|
33
50
|
id: number;
|
|
34
51
|
comentario: string;
|
|
@@ -45,8 +62,10 @@ type CommentProps = {
|
|
|
45
62
|
comment: CommentItem;
|
|
46
63
|
};
|
|
47
64
|
type CommentsProps = {
|
|
48
|
-
data
|
|
49
|
-
|
|
65
|
+
data?: {
|
|
66
|
+
comentarios?: CommentItem[];
|
|
67
|
+
} | null;
|
|
68
|
+
currentUser: (CommentItem['autor'] | IAllUsersOBPResponse) | null;
|
|
50
69
|
taskId: number;
|
|
51
70
|
onNewComment: (addCommentF: boolean) => void;
|
|
52
71
|
};
|
|
@@ -75,11 +94,16 @@ type DetailsTaskData = {
|
|
|
75
94
|
ids_t_dependientes: TRequirement[];
|
|
76
95
|
atraso: IAtrasoReason | null;
|
|
77
96
|
categoria: ICategory | null;
|
|
97
|
+
/** Quién creó / actualizó cuando el API envía `created_by` / `updated_by` en el listado. */
|
|
98
|
+
createdBy?: TaskUserAudit | null;
|
|
99
|
+
updatedBy?: TaskUserAudit | null;
|
|
78
100
|
};
|
|
79
101
|
type DetailsTaskProps = {
|
|
80
102
|
isOpen: boolean;
|
|
81
103
|
taskId: number;
|
|
82
104
|
setIsOpen: (isOpen: boolean) => void;
|
|
105
|
+
/** Si viene del listado kanban acotado, se evita la primera petición a `/api/detalleTarea/:id`. */
|
|
106
|
+
initialFromList?: DetailsTaskData | null;
|
|
83
107
|
};
|
|
84
108
|
type TabDetailsTaskItem = {
|
|
85
109
|
id: number;
|
|
@@ -89,7 +113,7 @@ type TabDetailsTaskItem = {
|
|
|
89
113
|
type TabDetailsTaskProps = {
|
|
90
114
|
items: TabDetailsTaskItem[];
|
|
91
115
|
};
|
|
92
|
-
export type { DetailsTaskData, DetailsTaskProps, TabDetailsTaskProps, TabDetailsTaskItem, CommentsProps, CommentItem, CommentProps };
|
|
116
|
+
export type { DetailsTaskData, DetailsTaskProps, TabDetailsTaskProps, TabDetailsTaskItem, CommentsProps, CommentItem, CommentProps, };
|
|
93
117
|
export type ICategory = {
|
|
94
118
|
id: number;
|
|
95
119
|
nombre: string;
|
|
@@ -6,7 +6,7 @@ import { TFilters } from '../context/filtersLayout.context';
|
|
|
6
6
|
export declare const withoutProjectFilter: (filters: Record<string, unknown>) => {
|
|
7
7
|
[x: string]: unknown;
|
|
8
8
|
};
|
|
9
|
-
export declare const addEstructureToFilters: (filters: TFilters) =>
|
|
9
|
+
export declare const addEstructureToFilters: (filters: TFilters) => Record<string, unknown>;
|
|
10
10
|
export declare const formatQueryFilters: <T>({ search, filters }: {
|
|
11
11
|
search: string;
|
|
12
12
|
filters: T;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Listado kanban OBP: `equipo.miembros` es un árbol; `userOBP` (imagen) va en `idUser.userOBP`.
|
|
3
|
+
* Compatibilidad: si en un payload viejo `userOBP` solo existía en la raíz del nodo miembro, se usa ahí.
|
|
4
|
+
*/
|
|
5
|
+
type ObpThumbCore = {
|
|
6
|
+
imagen?: {
|
|
7
|
+
formats?: {
|
|
8
|
+
thumbnail?: {
|
|
9
|
+
url?: string | null;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
role?: {
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type ObpThumb = ObpThumbCore | null | undefined;
|
|
19
|
+
export type EquipoMiembroNode = {
|
|
20
|
+
idUser?: {
|
|
21
|
+
id: number;
|
|
22
|
+
nombre: string;
|
|
23
|
+
userOBP?: ObpThumb;
|
|
24
|
+
} | null;
|
|
25
|
+
userOBP?: ObpThumb;
|
|
26
|
+
miembros?: EquipoMiembroNode[];
|
|
27
|
+
};
|
|
28
|
+
export type EquipoMiembroVisit = {
|
|
29
|
+
idUser: NonNullable<EquipoMiembroNode['idUser']>;
|
|
30
|
+
node: EquipoMiembroNode;
|
|
31
|
+
};
|
|
32
|
+
export declare function forEachEquipoMiembroIdUser(miembros: EquipoMiembroNode[] | null | undefined, visit: (payload: EquipoMiembroVisit) => void): void;
|
|
33
|
+
export declare function thumbnailUrlFromEquipoMiembroVisit({ idUser, node }: EquipoMiembroVisit): string | undefined;
|
|
34
|
+
export declare function roleFromEquipoMiembroVisit({ idUser, node }: EquipoMiembroVisit): {
|
|
35
|
+
id: number;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
import { IUsers } from '../infraestructure/interfaces/users';
|
|
2
2
|
export declare const getMonthName: (month: number) => string;
|
|
3
|
-
export declare const formatDate: (date: Date) => string;
|
|
4
|
-
export declare const AddOBPUrl: (user: IUsers, url: string) =>
|
|
5
|
-
image: string;
|
|
6
|
-
id: number;
|
|
7
|
-
name: string;
|
|
8
|
-
nombre?: string;
|
|
9
|
-
tasksUser?: {
|
|
10
|
-
email: string;
|
|
11
|
-
id: number;
|
|
12
|
-
nombre: string;
|
|
13
|
-
};
|
|
14
|
-
role: {
|
|
15
|
-
id: number;
|
|
16
|
-
name: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
3
|
+
export declare const formatDate: (date: Date | string | null | undefined) => string;
|
|
4
|
+
export declare const AddOBPUrl: (user: IUsers, url: string) => IUsers;
|
|
19
5
|
export declare const extractRequiredTaskResponsible: (idTRequerida?: {
|
|
20
6
|
responsable?: {
|
|
21
|
-
nombre
|
|
7
|
+
nombre?: string | null;
|
|
22
8
|
} | null;
|
|
23
9
|
equipo?: {
|
|
24
|
-
nombre
|
|
10
|
+
nombre?: string | null;
|
|
25
11
|
} | null;
|
|
26
12
|
} | null) => string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function debounce(callback: (...args:
|
|
1
|
+
export declare function debounce<T extends unknown[]>(callback: (...args: T) => void, delay?: number, options?: {
|
|
2
2
|
leading: boolean;
|
|
3
3
|
trailing: boolean;
|
|
4
|
-
}): (...args:
|
|
4
|
+
}): (...args: T) => void;
|