From 314288147a58de350a556dcae7152b1ac0039376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Thu, 27 Aug 2026 20:15:54 -0300 Subject: [PATCH] Select checklist reviewer from users --- src/pages/ProductionPlans.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/ProductionPlans.tsx b/src/pages/ProductionPlans.tsx index db47446..2106226 100644 --- a/src/pages/ProductionPlans.tsx +++ b/src/pages/ProductionPlans.tsx @@ -31,6 +31,7 @@ const ProductionPlans = () => { const [operationalUsers, setOperationalUsers] = useState([]); const [responsiblePickerPlanId, setResponsiblePickerPlanId] = useState(null); const [reviewingPlanId, setReviewingPlanId] = useState(null); + const [isReviewUserPickerOpen, setIsReviewUserPickerOpen] = useState(false); const [reviewForm, setReviewForm] = useState({ decision: 'pending' as ProductionPlanReviewDecision, materialsReserved: false, @@ -91,6 +92,11 @@ const ProductionPlans = () => { if (!operationalUsers.length) void loadOperationalUsers(); }; + const toggleReviewUserPicker = () => { + setIsReviewUserPickerOpen(current => !current); + if (!operationalUsers.length) void loadOperationalUsers(); + }; + const movePlan = async (plan: ProductionPlan, status: ProductionOrderStatus) => { if (status === plan.status) return; setBusyPlanId(plan.id); @@ -165,6 +171,7 @@ const ProductionPlans = () => { reviewedBy: plan.review?.reviewedBy || plan.responsibleName || '', }); setResponsiblePickerPlanId(null); + setIsReviewUserPickerOpen(false); setReviewingPlanId(plan.id); }; @@ -255,7 +262,7 @@ const ProductionPlans = () => {

Revise os pontos de liberação antes de avançar a operação. Este registro não movimenta estoque nem substitui o recebimento físico.

Conferências

{[{ key: 'materialsReserved', label: 'Materiais reservados' }, { key: 'cutSpecificationReady', label: 'Ficha e corte definidos' }, { key: 'sizeAndColorReviewed', label: 'Tamanhos e cores revisados' }, { key: 'responsibleAndDateDefined', label: 'Responsável e prazo definidos' }].map(item => )}
-
+

Revisado por

{isReviewUserPickerOpen &&
Usuários ativos do Graphs
{isLoadingOperationalUsers ?

Carregando usuários...

: operationalUsers.length ? operationalUsers.map(user => ) :

Nenhum usuário ativo encontrado.

}
{reviewForm.reviewedBy && }
}