@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,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;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { KanbanListadoFiltersToSend } from '../hooks/kanbanListadoColumnTasks.types';
|
|
2
|
+
type KanbanListadoStatus = 'por_hacer' | 'trabajando' | 'completadas';
|
|
3
|
+
type LayoutFilters = Record<string, unknown> & {
|
|
4
|
+
owner?: {
|
|
5
|
+
config?: string;
|
|
6
|
+
user?: number;
|
|
7
|
+
role?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Filtros listos para POST `listado-kanban-general` (una columna del tablero general).
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildKanbanListadoColumnFilters(filters: LayoutFilters, user: {
|
|
14
|
+
id: number;
|
|
15
|
+
role: string;
|
|
16
|
+
}, status: KanbanListadoStatus): KanbanListadoFiltersToSend;
|
|
17
|
+
/** No disparar columnas hasta que el layout aplicó defaults (`owner.config`). */
|
|
18
|
+
export declare function isKanbanListadoFiltersReady(filters: LayoutFilters): boolean;
|
|
19
|
+
export {};
|
|
@@ -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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TConfigs } from '../core/actions/get_tasks_response.action';
|
|
2
|
+
export declare const KANBAN_TODAS_TAREAS_ROLE_ALLOWLIST: readonly ["Project Manager", "Administrador"];
|
|
3
|
+
export declare function canUseKanbanTodasTareasFilter(role: string | undefined | null): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Evita enviar `config: 'todas'` al listado si el rol no está autorizado (p. ej. manipulación del payload).
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveOwnerConfigForKanbanListado(config: string | undefined | null, role: string | undefined | null): TConfigs;
|
|
@@ -20,9 +20,14 @@ export declare const KANBAN_CAMPAIGN_TASKS_QUERY_ROOT: "tasksProject";
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function invalidateKanbanListadoTasksQueries(queryClient: QueryClient): Promise<void>;
|
|
22
22
|
/**
|
|
23
|
-
* Botón “refrescar” del layout en tablero listado:
|
|
23
|
+
* Botón “refrescar” del layout en tablero listado: reinicia cada infinite query (solo página 1).
|
|
24
|
+
* No combinar `invalidateQueries` + `refetchQueries`: duplica POST y, con páginas en caché, refetch N veces por columna.
|
|
24
25
|
*/
|
|
25
26
|
export declare function invalidateAndRefetchKanbanListadoTasks(queryClient: QueryClient): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Botón “refrescar” del layout en tablero campaña: un solo refetch de `tasksProject` activo.
|
|
29
|
+
*/
|
|
30
|
+
export declare function invalidateAndRefetchKanbanCampaignTasks(queryClient: QueryClient): Promise<void>;
|
|
26
31
|
/**
|
|
27
32
|
* Tras un bulk-update en el tablero **campaña**: obsoleta la query de proyecto (cualquier filtro/proyecto activo).
|
|
28
33
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DetailsTaskData } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Construye un `DetailsTaskData` desde la fila del listado kanban (normalizada).
|
|
4
|
+
* Permite abrir el panel sin `GET /api/detalleTarea` cuando el listado ya trae los campos.
|
|
5
|
+
*/
|
|
6
|
+
export declare function mapListItemToDetailsTaskData(task: Record<string, unknown>): DetailsTaskData;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
+
import { GetTasksKanbanPage } from '../core/actions/get_tasks_response.action';
|
|
1
2
|
/**
|
|
2
3
|
* Tamaño de página del infinite query de las columnas del Kanban **listado** (`useToDoTasks`, etc.).
|
|
3
4
|
* `fetchAllKanbanListadoTaskIds` y `fetchNextPage` deben usar el mismo valor para no cortar mal el bucle.
|
|
4
5
|
*/
|
|
5
6
|
export declare const KANBAN_LISTADO_INFINITE_PAGE_SIZE = 30;
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Siguiente página del infinite query del kanban listado.
|
|
9
|
+
* Evita pedir páginas de más (respuestas vacías / solo meta) y que un refresh refetch todas las páginas en caché sin necesidad.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getKanbanListadoNextPageParam(lastPage: GetTasksKanbanPage | undefined, allPages: GetTasksKanbanPage[]): number | undefined;
|
|
12
|
+
/** Subconjunto de infinite query usado por `fetchNextPage` (Kanban listado). */
|
|
13
|
+
type KanbanInfiniteFetchKey = {
|
|
14
|
+
hasNextPage?: boolean;
|
|
15
|
+
fetchNextPage?: () => void;
|
|
16
|
+
data?: {
|
|
17
|
+
pages: Array<{
|
|
18
|
+
tasks?: unknown[];
|
|
19
|
+
} | unknown[] | undefined>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const fetchNextPage: (key: KanbanInfiniteFetchKey | null | undefined) => void;
|
|
7
23
|
export declare const getPaginationEstructure: (page: number) => {
|
|
8
24
|
pagination: {
|
|
9
25
|
page: number;
|
|
@@ -11,3 +27,4 @@ export declare const getPaginationEstructure: (page: number) => {
|
|
|
11
27
|
withCount: boolean;
|
|
12
28
|
};
|
|
13
29
|
};
|
|
30
|
+
export {};
|