Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | ******************************************************************* |
| 2 | ******* Explanation about menu.json ******* |
| 3 | ******************************************************************* |
| 4 | |
| 5 | The menu.json defines the menu to show for each type of "roles": |
| 6 | |
| 7 | Supported roles: |
| 8 | ----------------------------- |
| 9 | ADMIN |
| 10 | DESIGNER |
| 11 | PRODUCT_STRATEGIST |
| 12 | PRODUCT_MANAGER |
| 13 | TESTER |
| 14 | OPS |
| 15 | GOVERNOR |
| 16 | |
| 17 | The JSON is separated to roles, and for each role we define "states", |
| 18 | what menu to show the user for each state of the component: |
| 19 | |
| 20 | Supported states: |
| 21 | ----------------------------- |
| 22 | NOT_CERTIFIED_CHECKOUT |
| 23 | NOT_CERTIFIED_CHECKIN |
| 24 | READY_FOR_CERTIFICATION |
| 25 | CERTIFICATION_IN_PROGRESS |
| 26 | CERTIFIED |
| 27 | |
| 28 | For each state we can define the user that will see this menu, the available parameters are: |
| 29 | |
| 30 | Supported users: |
| 31 | ----------------------------- |
| 32 | ANY |
| 33 | NOT_OWNER |
| 34 | |
| 35 | Example: |
| 36 | For 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 | |
| 53 | Definition of the menu item: |
| 54 | ----------------------------- |
| 55 | text - The text to show |
| 56 | action - Function that will be called when pressing on the menu item |
| 57 | 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. |
| 58 | confirmationModal - Open confirmation modal (user should select "OK" or "Cancel"), and continue with the action. |
| 59 | emailModal - Open email modal (user should fill email details), and continue with the action. |
| 60 | blockedForTypes - This item will not be shown for specific components types. |