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

useTransferAsset

@mineflow/client-react


@mineflow/client-react / EAM / useTransferAsset

Function: useTransferAsset()

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

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

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

Returns​

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

UseMutationResult — mutate({ id, body: TransferAssetBody }).