blob: 660427e5c9d5276cfd9e3188f4e10da53a70e733 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001*******************************************************************
2******* Explanation about menu.json *******
3*******************************************************************
4
5The menu.json defines the menu to show for each type of "roles":
6
7Supported roles:
8-----------------------------
9ADMIN
10DESIGNER
11PRODUCT_STRATEGIST
12PRODUCT_MANAGER
13TESTER
14OPS
15GOVERNOR
16
17The JSON is separated to roles, and for each role we define "states",
18what menu to show the user for each state of the component:
19
20Supported states:
21-----------------------------
22NOT_CERTIFIED_CHECKOUT
23NOT_CERTIFIED_CHECKIN
24READY_FOR_CERTIFICATION
25CERTIFICATION_IN_PROGRESS
26CERTIFIED
27
28For each state we can define the user that will see this menu, the available parameters are:
29
30Supported users:
31-----------------------------
32ANY
33NOT_OWNER
34
35Example:
36For designer, if the component state is checkout and the component was created by other user, the NOT_OWNER will be used.
37
38"DESIGNER":{
39 "states":{
40 "NOT_CERTIFIED_CHECKOUT":{
41 "ANY":[
42 {"text":"Edit" ,"action":"goToEntity"},
43 {"text":"Check in","action":"changeLifecycleState", "url":"lifecycleState/CHECKIN", "confirmationModal": "lifecycleState/CHECKIN"},
44 {"text":"Submit for Testing","action":"changeLifecycleState", "url":"lifecycleState/certificationRequest", "emailModal": "lifecycleState/CERTIFICATIONREQUEST"},
45 {"text":"View" ,"action":"openViewerModal"}
46 ],
47 "NOT_OWNER":[
48 {"text":"View" ,"action":"openViewerModal"}
49 ]
50 },
51
52
53Definition of the menu item:
54-----------------------------
55text - The text to show
56action - Function that will be called when pressing on the menu item
57url - 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.
58confirmationModal - Open confirmation modal (user should select "OK" or "Cancel"), and continue with the action.
59emailModal - Open email modal (user should fill email details), and continue with the action.
60blockedForTypes - This item will not be shown for specific components types.