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

useAmendProductionPlan

@mineflow/client-react


@mineflow/client-react / PRD / useAmendProductionPlan

Function: useAmendProductionPlan()

function useAmendProductionPlan(): UseMutationResult<{
deltaPct: number;
plan: {
createdAt: string;
createdBy: string;
currentVersionId: string | null;
horizon: AmendProductionPlanResponseDto_OutputPlanHorizon;
id: string;
month: number | null;
organizationId: string;
status: AmendProductionPlanResponseDto_OutputPlanStatus;
updatedAt: string;
versions: object[];
year: number;
};
significant: boolean;
version: {
approvedAt: string | null;
approvedBy: string | null;
createdAt: string;
createdBy: string;
id: string;
objectPlans: object[];
previousVersionId: string | null;
reason: string | null;
rejectedAt: string | null;
rejectedBy: string | null;
rejectionReason: string | null;
requiresCeoApproval: boolean;
status: AmendProductionPlanResponseDto_OutputVersionStatus;
versionNumber: number;
};
}, Error, {
body: {
objectPlans: object[];
reason: string;
};
id: string;
}>;

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

Поправка утверждённого плана (FSM approved → approved) — версия v(n+1). delta ≤20% или инициатор-CEO → auto-approved; >20% инженером → ждёт одобрения CEO.

Returns​

UseMutationResult<{ deltaPct: number; plan: { createdAt: string; createdBy: string; currentVersionId: string | null; horizon: AmendProductionPlanResponseDto_OutputPlanHorizon; id: string; month: number | null; organizationId: string; status: AmendProductionPlanResponseDto_OutputPlanStatus; updatedAt: string; versions: object[]; year: number; }; significant: boolean; version: { approvedAt: string | null; approvedBy: string | null; createdAt: string; createdBy: string; id: string; objectPlans: object[]; previousVersionId: string | null; reason: string | null; rejectedAt: string | null; rejectedBy: string | null; rejectionReason: string | null; requiresCeoApproval: boolean; status: AmendProductionPlanResponseDto_OutputVersionStatus; versionNumber: number; }; }, Error, { body: { objectPlans: object[]; reason: string; }; id: string; }>