Properly consider new role in templates.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<h3>Company Work Policies <span class="read-only">(Read-only)</span></h3>
|
||||
<p class="section-description">
|
||||
These policies are set by your administrator and apply to all employees.
|
||||
{% if g.user.role == Role.ADMIN %}
|
||||
{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %}
|
||||
<a href="{{ url_for('admin_work_policies') }}">Click here to modify these settings</a>.
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% block content %}
|
||||
<div class="admin-container">
|
||||
<h1>
|
||||
{% if g.user.role == Role.ADMIN %}
|
||||
{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %}
|
||||
Admin Dashboard
|
||||
{% elif g.user.role == Role.SUPERVISOR %}
|
||||
Supervisor Dashboard
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Admin-only sections -->
|
||||
{% if g.user.role == Role.ADMIN %}
|
||||
{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %}
|
||||
<div class="stats-section">
|
||||
<h2>System Overview</h2>
|
||||
<div class="stats-grid">
|
||||
@@ -90,7 +90,7 @@
|
||||
{% endif %}
|
||||
|
||||
<!-- Team Leader and Supervisor sections -->
|
||||
{% if g.user.role in [Role.TEAM_LEADER, Role.SUPERVISOR, Role.ADMIN] %}
|
||||
{% if g.user.role in [Role.TEAM_LEADER, Role.SUPERVISOR, Role.ADMIN, Role.SYSTEM_ADMIN] %}
|
||||
<div class="team-section">
|
||||
<h2>Team Management</h2>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
</div>
|
||||
|
||||
<div class="admin-panel">
|
||||
{% if g.user.role == Role.ADMIN %}
|
||||
{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %}
|
||||
<div class="admin-card">
|
||||
<h2>Team Configuration</h2>
|
||||
<p>Create and manage team structures.</p>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<li><a href="{{ url_for('analytics') }}" data-tooltip="Time Analytics"><i class="nav-icon">📊</i><span class="nav-text">Analytics</span></a></li>
|
||||
|
||||
<!-- Role-based menu items -->
|
||||
{% if g.user.role == Role.ADMIN %}
|
||||
{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %}
|
||||
<li class="nav-divider">Admin</li>
|
||||
<li><a href="{{ url_for('profile') }}" data-tooltip="Profile"><i class="nav-icon">👤</i><span class="nav-text">Profile</span></a></li>
|
||||
<li><a href="{{ url_for('config') }}" data-tooltip="Config"><i class="nav-icon">⚙️</i><span class="nav-text">Config</span></a></li>
|
||||
|
||||
Reference in New Issue
Block a user