aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/configurations/MenuReadMe.txt
blob: 660427e5c9d5276cfd9e3188f4e10da53a70e733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
*******************************************************************
*******             Explanation about menu.json             *******
*******************************************************************

The menu.json defines the menu to show for each type of "roles":

Supported roles:
-----------------------------
ADMIN
DESIGNER
PRODUCT_STRATEGIST
PRODUCT_MANAGER
TESTER
OPS
GOVERNOR

The JSON is separated to roles, and for each role we define "states",
what menu to show the user for each state of the component:

Supported states:
-----------------------------
NOT_CERTIFIED_CHECKOUT
NOT_CERTIFIED_CHECKIN
READY_FOR_CERTIFICATION
CERTIFICATION_IN_PROGRESS
CERTIFIED

For each state we can define the user that will see this menu, the available parameters are:

Supported users:
-----------------------------
ANY
NOT_OWNER

Example:
For designer, if the component state is checkout and the component was created by other user, the NOT_OWNER will be used.

"DESIGNER":{
            "states":{
                "NOT_CERTIFIED_CHECKOUT":{
                    "ANY":[
                        {"text":"Edit"    ,"action":"goToEntity"},
                        {"text":"Check in","action":"changeLifecycleState", "url":"lifecycleState/CHECKIN", "confirmationModal": "lifecycleState/CHECKIN"},
                        {"text":"Submit for Testing","action":"changeLifecycleState", "url":"lifecycleState/certificationRequest", "emailModal": "lifecycleState/CERTIFICATIONREQUEST"},
                        {"text":"View"    ,"action":"openViewerModal"}
                    ],
                    "NOT_OWNER":[
                        {"text":"View"    ,"action":"openViewerModal"}
                    ]
                },


Definition of the menu item:
-----------------------------
text                - The text to show
action              - Function that will be called when pressing on the menu item
url                 - Data added to menu item, in case the function need to use it, example: for function "changeLifecycleState", I need to pass also the url "lifecycleState/CHECKOUT" that I want the state to change to.
confirmationModal   - Open confirmation modal (user should select "OK" or "Cancel"), and continue with the action.
emailModal          - Open email modal (user should fill email details), and continue with the action.
blockedForTypes     - This item will not be shown for specific components types.