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

useTransferAsset

@mineflow/client-react


@mineflow/client-react / useTransferAsset

Function: useTransferAsset()

function useTransferAsset(): UseMutationResult<{
assetClassId: string;
commissionedAt: string;
currentObjectId: string;
id: string;
inventoryNumber: string;
name: string;
passport: {
manufacturer: string;
model: string;
productionYear: number;
specifications: {
[key: string]: unknown;
};
};
responsibleMechanicId: string | null;
status: AssetResponse_OutputStatus;
}, Error, {
body: {
reason?: string;
toObjectId: string;
};
id: string;
}>;

Defined in: client-react/src/domain-hooks/eam.ts:88

Перемещение/передача актива на другой объект (PATCH). На успехе инвалидирует список активов.

Returns

UseMutationResult<{ assetClassId: string; commissionedAt: string; currentObjectId: string; id: string; inventoryNumber: string; name: string; passport: { manufacturer: string; model: string; productionYear: number; specifications: { [key: string]: unknown; }; }; responsibleMechanicId: string | null; status: AssetResponse_OutputStatus; }, Error, { body: { reason?: string; toObjectId: string; }; id: string; }>

UseMutationResultmutate({ id, body: TransferAssetBody }).