Initial commit for dashboard app
This commit is contained in:
parent
2ea73bddd7
commit
a37c0c3692
3 changed files with 77 additions and 0 deletions
0
dashboard/www/dashboard/__init__.py
Normal file
0
dashboard/www/dashboard/__init__.py
Normal file
71
dashboard/www/dashboard/index.html
Normal file
71
dashboard/www/dashboard/index.html
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
<div class="portal-wrapper">
|
||||||
|
<h1>Sea Haven Portal</h1>
|
||||||
|
<div class="grid">
|
||||||
|
{% if "Accounts User" in roles %}
|
||||||
|
<a href="https://accounting.getmynewsite.com" class="app-link">
|
||||||
|
<i class="fas fa-file-invoice-dollar"></i>
|
||||||
|
<div class="app-label">Accounting</div>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if "Wiki Editor" in roles %}
|
||||||
|
<a href="https://wiki.getmynewsite.com" class="app-link">
|
||||||
|
<i class="fas fa-book"></i>
|
||||||
|
<div class="app-label">Wiki</div>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if "OfficeTrax" in roles %}
|
||||||
|
<a href="https://seahaven.core7.net" class="app-link">
|
||||||
|
<i class="fas fa-th"></i>
|
||||||
|
<div class="app-label">OfficeTrax</div>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.portal-wrapper {
|
||||||
|
text-align: center;
|
||||||
|
padding: 40px;
|
||||||
|
font-family: "Segoe UI", sans-serif;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||||
|
gap: 30px;
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.app-link {
|
||||||
|
background: #fff;
|
||||||
|
padding: 30px 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #333;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: transform 0.2s, box-shadow 0.2s;
|
||||||
|
}
|
||||||
|
.app-link:hover {
|
||||||
|
transform: translateY(-4px);
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
.app-link i {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #007bff;
|
||||||
|
}
|
||||||
|
.app-label {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" />
|
||||||
6
dashboard/www/dashboard/index.py
Normal file
6
dashboard/www/dashboard/index.py
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
user = frappe.session.user
|
||||||
|
context.roles = frappe.get_roles(user)
|
||||||
|
return context
|
||||||
Loading…
Add table
Reference in a new issue