novas funcionalidades dos formulario
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-02 11:13:37 +02:00
parent a6afb4e97a
commit 4f35313d06
104 changed files with 7653 additions and 178 deletions
@@ -17,6 +17,10 @@ type Props = {
canEdit: boolean;
owner: boolean;
canReview: boolean;
canTriage: boolean;
canApproveLevelOne: boolean;
canApproveLevelTwo: boolean;
canPublish: boolean;
modalities: string[];
objects: BusinessObject[];
objectKinds: string[];
@@ -34,6 +38,10 @@ function Editor({
canEdit,
owner,
canReview,
canTriage,
canApproveLevelOne,
canApproveLevelTwo,
canPublish,
modalities,
history,
objects,
@@ -235,6 +243,51 @@ function Editor({
Pedir informação
</button>
)}
{canTriage && record.status === "submitted" && (
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("triage")}>
Iniciar triagem
</button>
)}
{canReview && record.status === "triage" && (
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("in_review")}>
Encaminhar para revisão
</button>
)}
{canReview && record.status === "in_review" && (
<>
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("approval_l1")}>
Enviar para aprovação nível 1
</button>
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("rejected")}>
Rejeitar
</button>
</>
)}
{canApproveLevelOne && record.status === "approval_l1" && (
<>
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("approval_l2")}>
Aprovar nível 1 e enviar ao nível 2
</button>
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("rejected")}>
Rejeitar
</button>
</>
)}
{canApproveLevelTwo && record.status === "approval_l2" && (
<>
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("approved")}>
Aprovar nível 2
</button>
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("rejected")}>
Rejeitar
</button>
</>
)}
{canPublish && record.status === "approved" && (
<button className={button} disabled={busy || note.trim().length < 10} onClick={() => void run("published")}>
Publicar
</button>
)}
{owner && record.status !== "withdrawn" && (
<button
className={button}