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

useMyShiftAnchor

@mineflow/client-react


@mineflow/client-react / PRD / useMyShiftAnchor

Function: useMyShiftAnchor()

function useMyShiftAnchor(shiftDate: string): UseQueryResult<{
anchor: | {
assetCode: string | null;
assetId: string;
blockCode: string | null;
compressorCode: string | null;
machinistName: string | null;
productionObjectId: string;
shiftType: MyShiftAnchorResponse_OutputAnchorAnyOf0ShiftType;
targetMeters: number;
}
| null;
}>;

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

Станок-якорь смены буровика из issued-наряда (operator-aware, ADR-0113/B) — источник one-tap «Начать смену». По дате находит наряд буровика (перебор обоих типов смены на сервере), строку, где машинист = сам оператор, и возвращает станок

  • участок + ТИП СМЕНЫ из наряда (не с часов устройства). Тот же источник, что own-station-гейт приёмки. anchor=null — нет issued-наряда на дату / оператор в нём не машинист (кокпит покажет «наряд не выпущен»). Object-scope на сервере.

Parameters​

ParameterType
shiftDatestring

Returns​

UseQueryResult<{ anchor: | { assetCode: string | null; assetId: string; blockCode: string | null; compressorCode: string | null; machinistName: string | null; productionObjectId: string; shiftType: MyShiftAnchorResponse_OutputAnchorAnyOf0ShiftType; targetMeters: number; } | null; }>