@imj_media/tareas 1.6.6 → 1.6.7
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.
|
@@ -16,9 +16,9 @@ export interface IFilters {
|
|
|
16
16
|
includeAllTasks?: boolean;
|
|
17
17
|
cancelada?: boolean | number | string;
|
|
18
18
|
taskType?: string;
|
|
19
|
-
/**
|
|
19
|
+
/** Filtro encargado: `POST listado-kanban-general` (`responsable.id`). */
|
|
20
20
|
assignment?: KanbanAssignmentFilter;
|
|
21
|
-
/**
|
|
21
|
+
/** Filtro encargado: IDs de usuario responsable (`responsable.id`). */
|
|
22
22
|
teamMemberIds?: number[];
|
|
23
23
|
}
|
|
24
24
|
interface IOwner {
|
|
@@ -52,14 +52,15 @@ type TPriority = 'Sin prioridad' | 'Prioridad Baja' | 'Prioridad Media' | 'Prior
|
|
|
52
52
|
type IDependency = 'con' | 'sin' | 'ambas';
|
|
53
53
|
type TStatus = 'por_hacer' | 'trabajando' | 'completadas';
|
|
54
54
|
export type KanbanAssignmentFilter = 'todas' | 'asignadas' | 'sin_asignar';
|
|
55
|
+
/** Subconjunto de `IFilters` enviado al POST cuando los filtros de encargado están activos. */
|
|
56
|
+
export type KanbanEncargadoListadoRequestFields = {
|
|
57
|
+
assignment?: Exclude<KanbanAssignmentFilter, 'todas'>;
|
|
58
|
+
teamMemberIds?: number[];
|
|
59
|
+
};
|
|
55
60
|
export interface GetTasksKanbanPage {
|
|
56
61
|
tasks: TasksKanbanGeneral[];
|
|
57
|
-
/** Total del servidor (
|
|
62
|
+
/** Total del servidor (`meta.pagination.total`, incluye filtros de encargado). */
|
|
58
63
|
total: number;
|
|
59
|
-
/** Filas crudas de la API en esta página (paginación con filtros en cliente). */
|
|
60
|
-
rawPageCount: number;
|
|
61
|
-
/** True si el filtro de asignación está activo en cliente. */
|
|
62
|
-
clientSideFilterActive?: boolean;
|
|
63
64
|
}
|
|
64
65
|
/**
|
|
65
66
|
* POST `listado-kanban-general`: filas ya normalizadas (sin mapear a card kanban).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InfiniteData, UseInfiniteQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { GetTasksKanbanPage, TConfigs } from '../core/actions/get_tasks_response.action';
|
|
2
|
+
import { GetTasksKanbanPage, KanbanAssignmentFilter, TConfigs } from '../core/actions/get_tasks_response.action';
|
|
3
3
|
/** Payload de filtros enviado al POST listado kanban (columnas del tablero general). */
|
|
4
4
|
export type KanbanListadoFiltersToSend = {
|
|
5
5
|
owner: {
|
|
@@ -8,6 +8,8 @@ export type KanbanListadoFiltersToSend = {
|
|
|
8
8
|
role?: string;
|
|
9
9
|
};
|
|
10
10
|
status?: string;
|
|
11
|
+
assignment?: KanbanAssignmentFilter;
|
|
12
|
+
teamMemberIds?: number[];
|
|
11
13
|
[key: string]: unknown;
|
|
12
14
|
};
|
|
13
15
|
export type KanbanListadoInfiniteQueryResult = UseInfiniteQueryResult<InfiniteData<GetTasksKanbanPage, unknown>, Error>;
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import { GetTasksKanbanPage } from '../core/actions/get_tasks_response.action';
|
|
1
|
+
import { GetTasksKanbanPage, KanbanAssignmentFilter, KanbanEncargadoListadoRequestFields } from '../core/actions/get_tasks_response.action';
|
|
2
2
|
import { KanbanIntegranteFilterOption } from './kanbanEquiposEncargados';
|
|
3
3
|
export declare const KANBAN_ASSIGNMENT_FILTER_ID = "assignment";
|
|
4
4
|
export declare const KANBAN_INTEGRANTE_FILTER_ID = "teamMemberIds";
|
|
5
|
-
export
|
|
6
|
-
export declare const KANBAN_ASSIGNMENT_FILTER_DEFAULT: KanbanAssignmentFilterValue;
|
|
5
|
+
export declare const KANBAN_ASSIGNMENT_FILTER_DEFAULT: KanbanAssignmentFilter;
|
|
7
6
|
/** Convierte la selección del multiselect (números o textos) en IDs de usuario válidos para filtrar. */
|
|
8
7
|
export declare function normalizeKanbanTeamMemberIds(raw: unknown): number[];
|
|
8
|
+
type KanbanEncargadoListadoRequestInput = {
|
|
9
|
+
assignment?: KanbanAssignmentFilter | unknown;
|
|
10
|
+
teamMemberIds?: number[] | unknown;
|
|
11
|
+
};
|
|
12
|
+
/** Campos de encargado listos para el cuerpo `data` del POST listado (omite defaults inactivos). */
|
|
13
|
+
export declare function buildKanbanEncargadoListadoRequestFields(filters: KanbanEncargadoListadoRequestInput): KanbanEncargadoListadoRequestFields;
|
|
9
14
|
type KanbanFilterField = {
|
|
10
15
|
id: string;
|
|
11
16
|
};
|
|
12
17
|
/** Inyecta filtros de encargado (asignación e integrantes) cuando aplican. */
|
|
13
18
|
export declare function buildKanbanEncargadoFilterFields<T extends KanbanFilterField>(baseFilters: T[], esEncargado: boolean, integrantesOptions?: KanbanIntegranteFilterOption[]): T[];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export declare function isKanbanListadoClientSideFilterActive(state: KanbanListadoClientFilterState): boolean;
|
|
19
|
-
export declare function applyKanbanListadoClientSideTaskFilters<T extends {
|
|
20
|
-
responsible: number | null;
|
|
21
|
-
}>(tasks: T[], state: KanbanListadoClientFilterState): T[];
|
|
22
|
-
export declare function pickKanbanListadoClientFilterState(filters: Record<string, unknown> | undefined): KanbanListadoClientFilterState;
|
|
23
|
-
/** Total de columna: meta del servidor o conteo filtrado en cliente si aplica. */
|
|
24
|
-
export declare function getKanbanListadoColumnTotal(pages: GetTasksKanbanPage[] | undefined, clientFilters: KanbanListadoClientFilterState): number;
|
|
19
|
+
/** Total de columna desde `meta.pagination.total` del servidor (primera página del infinite query). */
|
|
20
|
+
export declare function getKanbanListadoColumnTotal(pages: GetTasksKanbanPage[] | undefined): number;
|
|
21
|
+
/** Quita filtros de encargado de params legacy (`GET listado_tareas?justProjects`). */
|
|
22
|
+
export declare function omitKanbanEncargadoFiltersFromLegacyParams<T extends Record<string, unknown>>(params: T): T;
|
|
25
23
|
export {};
|