Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/approval-action-hierarchy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@objectstack/plugin-approvals": patch
---

fix(plugin-approvals): give the decision actions a visual hierarchy (objectui#2762 P1-5)

The `sys_approval_request` decision actions all declared as equal-weight
buttons, so the drawer's action bar rendered five identical outlined
buttons with no emphasis on the primary path. `approval_approve` now
declares `variant: 'primary'` and `approval_reject` declares
`variant: 'danger'`, so a metadata-driven renderer highlights Approve and
styles Reject as destructive — matching the hierarchy the mobile card
already has. Pure metadata; the secondary levers stay unstyled (tertiary).
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ export const SysApprovalRequest = ObjectSchema.create({
name: 'approval_approve',
label: 'Approve',
icon: 'check-circle',
// Primary decision — the console renders this filled/highlighted so it
// stands out from the secondary levers in the drawer's action bar,
// matching the mobile card hierarchy (objectui#2762 P1-5).
variant: 'primary',
type: 'api',
method: 'POST',
target: '/api/v1/approvals/requests/{id}/approve',
Expand All @@ -266,6 +270,9 @@ export const SysApprovalRequest = ObjectSchema.create({
name: 'approval_reject',
label: 'Reject',
icon: 'x-circle',
// Destructive decision — rendered in the console's danger styling so it
// reads as the irreversible action it is (objectui#2762 P1-5).
variant: 'danger',
type: 'api',
method: 'POST',
target: '/api/v1/approvals/requests/{id}/reject',
Expand Down