Actions
The actions
attribute is used to whitelist user actions on the List and Details screens. They appear at the top right of the Details screen, either as a button if there is only one available action, or in a dropdown list if multiple actions are available.
There are two types of action:
jobActions
: Actions that are on a job level. Supported actions:Receipt
.txnActions
: Actions specific to their associated Txn. Supported actions:Recover
,View Form (Resume)
,Withdraw
.
Available actions are displayed in the following order:
Receipt
View Form (Resume)
Recover
Withdraw
Job Actions
Receipt
The Receipt action opens a modal displaying the current Txn formReceipt. If there is more than one receipt attached to the Txn, the modal includes a dropdown list allowing the user to select a receipt to view.
Display rules
txn.job || txn.receiptUrl;
Txn Actions
Recover
The Recover action re-opens an abandoned Txn.
Display rules
txn.taskType !== 'Review' &&
txn.availableActions.includes('reopen') &&
txn.userLoginName === currentUser &&
txn.formStatus === 'Abandoned';
View Form (Resume)
The View Form action opens a modal displaying the form with the current Txn formUrl and &pageId=''
appended to it.
info
We send a message using a postMessage API with the following schema:
{
pageId: '';
}
Display rules
txn.taskType !== 'Review' &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
Withdraw
The Withdraw action is used to abandon a saved Txn.
Display rules
txn.taskType === 'Review' &&
txn.userLoginName === currentUser &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
Actions config
{
...
txnActions: {
ViewForm: {
label: 'Resume',
},
Withdraw: {
label: 'Withdraw',
},
Recover: {
label: 'Recover',
},
},
jobActions: {
Receipt: {
label: 'Receipt',
permissions: {
type: 'group',
value: ['Manual Review'],
}
},
},
...
}
Attributes
To review the list of supported attributes, see CurrentSpaceTxnActions and CurrentSpaceJobActions.