c4610d5e by Ean Schuessler

Add global navigation to MCP browse_screens response

Adds globalNav array to every browse_screens response with links to:
- My Notifications (apps/my/User/Notifications)
- My Messages (apps/my/User/Messages/FindMessage)
- My Calendar (apps/my/User/Calendar/MyCalendar)
- My Tasks (apps/my/User/Task/MyTasks)

These mirror the MyAccountNav component in the web UI and are always
available regardless of which app the user is currently browsing.

Also adds a hint in uiNarrative.notes about globalNav and search.
1 parent c36293a2
......@@ -2449,6 +2449,15 @@ def wikiInstructions = getWikiInstructions(inputScreenPath)
subscreens: subscreens,
renderMode: actualRenderMode
]
// Add global navigation - these are always available regardless of current app
// Mirrors the MyAccountNav component in the web UI
resultMap.globalNav = [
[name: "My Notifications", path: "apps/my/User/Notifications", icon: "info"],
[name: "My Messages", path: "apps/my/User/Messages/FindMessage", icon: "message"],
[name: "My Calendar", path: "apps/my/User/Calendar/MyCalendar", icon: "calendar"],
[name: "My Tasks", path: "apps/my/User/Task/MyTasks", icon: "tasks"]
]
if (currentPath != "root") {
try {
......
......@@ -251,6 +251,9 @@ class UiNarrativeBuilder {
}
}
// Hint about global nav and search
notes << "Global nav (Messages, Tasks, Calendar, Notifications) available in response.globalNav. Use moqui_search_screens(query='...') to find other screens."
return notes
}
......