feat(19.7-01): admin SPA account contributions and prompted record actions
- AccountContributions.vue on My account: one card per contributed section
with status and outline buttons; confirm or danger actions go through the
shared ConfirmDialog; a returned URL opens in a new tab (noopener) and stays
as a visible link; 409 reloads with the stale toast
- ConfirmRequest.prompt and useConfirm value; ConfirmDialog renders one
labelled text input (maxlength, autocomplete off, aria-describedby comment,
autofocus), confirm disabled until a value is typed, Enter confirms
- RecordActions posts {payload} for a prompted action and {} otherwise; a 422
on payload shows the server's detail as a danger toast
- types.ts exports RecordActionPrompt, AccountContribution,
AccountContributionAction, AccountActionResult
- vitest smokes AccountContributions.test.ts and RecordActionsPrompt.test.ts
This commit is contained in:
@@ -59,6 +59,14 @@ export type BulkResult = Schemas['cabana.BulkResult']
|
||||
export type BulkAction = Schemas['cabana.BulkAction']
|
||||
/** A record action the record response offers: name, label and confirm text. */
|
||||
export type RecordAction = Schemas['cabana.RecordAction']
|
||||
/** The text input a prompted record action asks for in its confirm dialog. */
|
||||
export type RecordActionPrompt = Schemas['cabana.RecordActionPrompt']
|
||||
/** A section a plugin contributes to My account: label, status and offered actions. */
|
||||
export type AccountContribution = Schemas['cabana.AccountContributionView']
|
||||
/** One action of a contributed My account section. */
|
||||
export type AccountContributionAction = Schemas['cabana.AccountContributionActionView']
|
||||
/** An account contribution action's answer: the toast message and an optional URL. */
|
||||
export type AccountActionResult = Schemas['cabana.AccountActionResultView']
|
||||
/** A declared bulk action's answer: the toast message and the affected count. */
|
||||
export type BulkActionResult = Schemas['cabana.BulkActionResult']
|
||||
/** Body of a widget action: the record id (absent on create) and fill values. */
|
||||
|
||||
Reference in New Issue
Block a user