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

useCompleteMaintenance

@mineflow/client-react


@mineflow/client-react / EAM / useCompleteMaintenance

Function: useCompleteMaintenance()

function useCompleteMaintenance(): 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;
}>;

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

Завершение ТО: FSM maintenance → operational (событие COMPLETE_MAINTENANCE). ADR-0045: dedicated PATCH /eam/assets/:id/complete-maintenance; реактивно завершает открытую запись MaintenanceRecord. Тело не требуется.

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; }>