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

useUpdateShiftAssetUsage

@mineflow/client-react


@mineflow/client-react / PRD / useUpdateShiftAssetUsage

Function: useUpdateShiftAssetUsage()

function useUpdateShiftAssetUsage(): UseMutationResult<{
acceptedAt: string | null;
acceptedBy: string | null;
assetId: string;
createdAt: string;
hoursWorked: number | null;
id: string;
intakeStatus: ShiftAssetUsageResponse_OutputIntakeStatus;
meterReadingEnd: number | null;
meterReadingStart: number | null;
operatorPersonnelId: string | null;
organizationId: string;
shiftReportId: string;
submittedAt: string | null;
submittedBy: string | null;
updatedAt: string;
}, Error, UpdateAssetUsageVars>;

Defined in: client-react/src/domain-hooks/prd.ts:144

Дозаполнение факта строки-станка (часы/показания счётчика/оператор): якорь создаётся автостартом смены без факта, итог вносится при «Завершить смену». Допускается пока рапорт в draft и строка не принята (accepted → 409).

Returns​

UseMutationResult<{ acceptedAt: string | null; acceptedBy: string | null; assetId: string; createdAt: string; hoursWorked: number | null; id: string; intakeStatus: ShiftAssetUsageResponse_OutputIntakeStatus; meterReadingEnd: number | null; meterReadingStart: number | null; operatorPersonnelId: string | null; organizationId: string; shiftReportId: string; submittedAt: string | null; submittedBy: string | null; updatedAt: string; }, Error, UpdateAssetUsageVars>

UseMutationResult — mutate({ id, usageId, body, idempotencyKey }).