From a37c0c3692d7d980e090cf0ddada5712e8a140f8 Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Fri, 18 Jul 2025 20:31:28 +0000 Subject: [PATCH] Initial commit for dashboard app --- dashboard/www/dashboard/__init__.py | 0 dashboard/www/dashboard/index.html | 71 +++++++++++++++++++++++++++++ dashboard/www/dashboard/index.py | 6 +++ 3 files changed, 77 insertions(+) create mode 100644 dashboard/www/dashboard/__init__.py create mode 100644 dashboard/www/dashboard/index.html create mode 100644 dashboard/www/dashboard/index.py diff --git a/dashboard/www/dashboard/__init__.py b/dashboard/www/dashboard/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dashboard/www/dashboard/index.html b/dashboard/www/dashboard/index.html new file mode 100644 index 0000000..ac3f0fc --- /dev/null +++ b/dashboard/www/dashboard/index.html @@ -0,0 +1,71 @@ +
+

Sea Haven Portal

+
+ {% if "Accounts User" in roles %} + + +
Accounting
+
+ {% endif %} + + {% if "Wiki Editor" in roles %} + + +
Wiki
+
+ {% endif %} + + {% if "OfficeTrax" in roles %} + + +
OfficeTrax
+
+ {% endif %} +
+
+ + + + diff --git a/dashboard/www/dashboard/index.py b/dashboard/www/dashboard/index.py new file mode 100644 index 0000000..a8c36bb --- /dev/null +++ b/dashboard/www/dashboard/index.py @@ -0,0 +1,6 @@ +import frappe + +def get_context(context): + user = frappe.session.user + context.roles = frappe.get_roles(user) + return context