Skip to content

Commit

Permalink
Merge branch 'develop' into fix-3724-add-document-to-schema-update-de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
ihar-tsykala authored Aug 20, 2024
2 parents e1963c3 + 90248b0 commit e10c7e1
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 0 deletions.
Binary file added docs/.gitbook/assets/image (677).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/image (678).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/image (679).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
* [externalTopicBlock](guardian/standard-registry/policies/policy-creation/introduction/externaltopicblock.md)
* [messagesReportBlock](guardian/standard-registry/policies/policy-creation/introduction/messagesreportblock.md)
* [notificationBlock](guardian/standard-registry/policies/policy-creation/introduction/notificationblock.md)
* [Button Block Addon (buttonBlockAddon)](guardian/standard-registry/policies/policy-creation/introduction/button-block-addon-buttonblockaddon.md)
* [💻 Creating Policy using UI](guardian/standard-registry/policies/policy-creation/policy-demo.md)
* [💻 Creating a Policy through Policy Configurator](guardian/standard-registry/policies/policy-creation/creating-a-policy-through-policy-configurator/README.md)
* [Getting Started with the Policy Workflows](guardian/standard-registry/policies/policy-creation/creating-a-policy-through-policy-configurator/getting-started-with-the-policy-workflows.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ Starting with the [Wikipedia definition](https://en.wikipedia.org/wiki/Workflow\
| messagesReportBlock | This block allows to create report based on the inter-referenced messages. | [messagesReportBlock](messagesreportblock.md) |
| notificationBlock | This block is used to generate notifications | [notificationBlock](notificationblock.md) |
| extractDataBlock | This block extractDataBlock provides means to extract a data set which corresponds to any of these embedded schemas (at any depth level) | [extractDataBlock](externaldatablock.md) |
| button block Addon | This block is used to display interactive buttons | [buttonBlockAddon](button-block-addon-buttonblockaddon.md) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Button Block Addon (buttonBlockAddon)

The purpose of this block is to display interactive buttons in documents source block (interfaceDocumentsSourceBlock).

## Usage

As shown in the example below, buttonBlockAddon blocks should be placed inside interfaceDocumentsSourceBlock blocks.

<figure><img src="../../../../../.gitbook/assets/image (677).png" alt=""><figcaption></figcaption></figure>

## Properties

<table><thead><tr><th>Property Name</th><th>Description</th><th width="243">Example</th><th>Status</th></tr></thead><tbody><tr><td>Button Name (<em>name</em>)</td><td>The label (name) of the button as displayed to the user</td><td>"Approve", "Reject"</td><td></td></tr><tr><td>UI Class (<em>uiClass</em>)</td><td>The UI class of the button</td><td>“btn-approve”, “btn-reject”, “btn-link”</td><td></td></tr><tr><td>Dialog (<em>dialog)</em></td><td>Determines if a dialog should be opened after the button is clicked</td><td><p></p><p>true, false.</p></td><td></td></tr><tr><td>Dialog Options (<em>dialogOptions</em>)</td><td>Will be shown only if the Dialog setting is set to true.</td><td><p></p><ol start="1"><li>Dialog Title (<em>dialogOptions.dialogTitle</em>): The title of the dialog. Example: “Rejection”.</li><li>Dialog Description (<em>dialogOptions.dialogDescription</em>): The description of the dialog. Example: “Enter reject reason”.</li><li>Dialog Result Field Path (<em>dialogOptions.dialogResultFieldPath</em>): The field which will contain the result value from the dialog. Example: “option.comment”.</li></ol></td><td></td></tr></tbody></table>

<figure><img src="../../../../../.gitbook/assets/image (678).png" alt=""><figcaption></figcaption></figure>

## Events

Button block addon events will be automatically added to document source.

<figure><img src="../../../../../.gitbook/assets/image (679).png" alt=""><figcaption></figcaption></figure>

## API

The API for the buttonBlockAddon features both GET and POST methods:

1. Example response to the GET request:

```
{
"id": "4e43f63f-f2e9-4336-a69e-931ec4aafaee",
"blockType": "buttonBlockAddon",
"dialog": true,
"dialogOptions": {
"dialogTitle": "Reject",
"dialogDescription": "Enter reject reason",
"dialogResultFieldPath": "option.comment"
},
"name": "Reject",
"uiClass": "btn-reject",
}
```

The response to the GET request includes all block settings.

2. Example payload for the POST request:

```
{
"documentId": "66b2838927c34db3c18e3c49",
"dialogResult": "Typo in name"
}
```

Where

documentId - selected document identifier.

dialogResult is used for the dialog only.

0 comments on commit e10c7e1

Please sign in to comment.