Add company feature.

This commit is contained in:
2025-07-02 12:42:18 +02:00
committed by Jens Luedicke
parent 85847b5d39
commit 8f49958dfa
17 changed files with 1465 additions and 216 deletions

View File

@@ -3,7 +3,7 @@
{% block content %}
<div class="admin-container">
<h1>
{% if g.user.is_admin or g.user.role == Role.ADMIN %}
{% if g.user.role == Role.ADMIN %}
Admin Dashboard
{% elif g.user.role == Role.SUPERVISOR %}
Supervisor Dashboard
@@ -39,7 +39,7 @@
</div>
<!-- Admin-only sections -->
{% if g.user.is_admin or g.user.role == Role.ADMIN %}
{% if g.user.role == Role.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] or g.user.is_admin %}
{% if g.user.role in [Role.TEAM_LEADER, Role.SUPERVISOR, Role.ADMIN] %}
<div class="team-section">
<h2>Team Management</h2>
@@ -113,7 +113,7 @@
<a href="{{ url_for('team_hours') }}" class="btn btn-primary">View Team Hours</a>
</div>
{% if g.user.is_admin %}
{% if g.user.role == Role.ADMIN %}
<div class="admin-card">
<h2>Team Configuration</h2>
<p>Create and manage team structures.</p>
@@ -161,7 +161,7 @@
<table class="time-history">
<thead>
<tr>
{% if g.user.is_admin or g.user.role in [Role.TEAM_LEADER, Role.SUPERVISOR] %}
{% if g.user.role in [Role.ADMIN, Role.TEAM_LEADER, Role.SUPERVISOR] %}
<th>User</th>
{% endif %}
<th>Date</th>
@@ -174,7 +174,7 @@
<tbody>
{% for entry in recent_entries %}
<tr>
{% if g.user.is_admin or g.user.role in [Role.TEAM_LEADER, Role.SUPERVISOR] %}
{% if g.user.role in [Role.ADMIN, Role.TEAM_LEADER, Role.SUPERVISOR] %}
<td>{{ entry.user.username }}</td>
{% endif %}
<td>{{ entry.arrival_time.strftime('%Y-%m-%d') }}</td>