Clarify supply execution states
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m47s

This commit is contained in:
Cauê Faleiros
2026-08-03 12:57:43 -03:00
parent 0ff267be2c
commit f69efb5358
3 changed files with 85 additions and 32 deletions

View File

@@ -201,6 +201,7 @@ const ProductionOrders = () => {
const progressCount = summary.counts.in_progress || 0;
const finishedCount = summary.counts.finished || 0;
const totalQuantity = summary.orders.reduce((total, order) => total + order.quantity, 0);
const activeOrders = summary.orders.filter(order => order.status !== 'finished' && order.status !== 'canceled');
const handleManualRefresh = () => {
void loadProductionOrders({ force: true });
@@ -352,6 +353,7 @@ const ProductionOrders = () => {
</div>
</div>
{activeOrders.length > 0 && (
<form onSubmit={handleProductionExit} className="rounded-2xl border border-dark-border bg-dark-card p-5 shadow-sm">
<div className="flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between">
<div>
@@ -373,7 +375,7 @@ const ProductionOrders = () => {
className="mt-1 h-10 w-full rounded-lg border border-dark-border bg-dark-input px-3 text-sm font-semibold text-dark-text outline-none focus:border-brand-primary"
>
<option value="">Selecione...</option>
{summary.orders.filter(order => order.status !== 'finished' && order.status !== 'canceled').map(order => (
{activeOrders.map(order => (
<option key={order.id} value={order.id}>
{order.number || `#${order.id}`} · {order.productDescription}
</option>
@@ -429,6 +431,7 @@ const ProductionOrders = () => {
</div>
)}
</form>
)}
<div className="overflow-hidden rounded-2xl border border-dark-border bg-dark-card shadow-sm">
<div className="border-b border-dark-border p-5">
@@ -655,6 +658,13 @@ const ProductionOrders = () => {
<p className="mt-1 max-w-md text-sm font-medium text-dark-muted">
Gere ordens pelo Plano de Corte para acompanhar status, produto, quantidade e baixa de material dentro do Graphs.
</p>
<Link
to="/cutting"
className="mt-5 inline-flex h-10 items-center gap-2 rounded-lg border border-brand-primary/35 bg-brand-primary/10 px-4 text-sm font-bold text-brand-primary transition-colors hover:bg-brand-primary/20"
>
<ClipboardList className="h-4 w-4" />
Ir para Plano de Corte
</Link>
</div>
)}