This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user