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

useConserveAsset

@mineflow/client-react


@mineflow/client-react / EAM / useConserveAsset

Function: useConserveAsset()

function useConserveAsset(): 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, {
id: string;
reason: string;
}>;

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

Консервация актива: FSM operational → conserved (событие CONSERVE, ADR-0022). ADR-0045 (asset-centric): dedicated PATCH /eam/assets/:id/conserve. reason обязателен (OPS_REQUIRING_REASON). Запись журнала движений создаётся РЕАКТИВНО по событию eam.asset.status-changed. На успехе инвалидируется список активов.

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, { id: string; reason: string; }>