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