Перейти к основному содержимому

useCreateProductionObject

@mineflow/client-react


@mineflow/client-react / Справочники / useCreateProductionObject

Function: useCreateProductionObject()

function useCreateProductionObject(): UseMutationResult<{
active: boolean;
code: string;
createdAt: string;
id: string;
name: string;
region: string | null;
updatedAt: string;
}, Error, {
[key: string]: unknown;
}>;

Defined in: client-react/src/domain-hooks/refs.ts:406

Создание производственного объекта (POST). На успехе инвалидирует оба кэша участков. Дубликат code → 409 на бэке.

Returns​

UseMutationResult<{ active: boolean; code: string; createdAt: string; id: string; name: string; region: string | null; updatedAt: string; }, Error, { [key: string]: unknown; }>

UseMutationResult — mutate(body).