File size: 6,378 Bytes
4de97b5
 
10fc7f2
 
4de97b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% extends 'base.html' %}{% block content %}
<div class="page-heading heading-row"><div><span class="eyebrow">ADMINISTRATOR</span><h1>Manage your workspace</h1><p>Manage employees, account access and weekly meetings.</p></div><div style="display: flex; gap: 0.5rem; flex-wrap: wrap;"><a class="button secondary" href="{{ url_for('resume_coordination') }}">Resume from Excel ⇡</a><a class="button secondary" href="{{ url_for('backup') }}">Download database backup ↓</a></div></div>
{% include 'employee_management.html' %}
{% include 'report_order.html' %}
<section class="card spaced">
  <div class="section-heading"><h2>Team accounts</h2><span class="count">{{ users|rejectattr('archived')|list|length }}</span></div>
  <p class="muted">Disable login to pause access while the employee stays on the team. Remove an employee when they leave: their history stays available, but they leave the rotation and future checklists. Password resets require a change at the next login.</p>
  <div class="table-scroll"><table><thead><tr><th>Team member</th><th>Username</th><th>Access</th><th>Password</th><th>Manage</th></tr></thead><tbody>
  {% for user in users if not user.archived %}
    <tr><td><strong>{{ user.name }}</strong>{{ ' (you)' if user.id==g.user.id }}{% if user.is_admin %}<small>Administrator</small>{% endif %}</td><td>{{ user.username }}</td><td><span class="pill {{ 'green' if user.active }}">{{ 'Active' if user.active else 'Login disabled' }}</span></td><td>{{ 'Change required' if user.must_change else 'Personal password set' }}</td>
    <td>{% if user.id!=g.user.id and not user.is_admin %}<div class="admin-actions">
      <form method="post" data-confirm="Reset this employee’s password to the default password?"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="operation" value="reset"><input type="hidden" name="user_id" value="{{ user.id }}"><button class="link">Reset password</button></form>
      <form method="post" data-confirm="Change this employee’s login access?"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="operation" value="toggle"><input type="hidden" name="user_id" value="{{ user.id }}"><button class="link">{{ 'Disable login' if user.active else 'Enable login' }}</button></form>
      <details><summary>Remove employee</summary><form method="post" data-confirm="Remove this employee from the active team? They will be signed out. Their history will be kept and you can restore them later.">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="operation" value="remove_employee"><input type="hidden" name="user_id" value="{{ user.id }}">
        {% if user.id==meeting.coordinator_id %}<label for="replacement-{{ user.id }}">Replacement for current coordinator</label><select id="replacement-{{ user.id }}" name="replacement_id" required><option value="">Choose a replacement</option>{% for person in users if person.active and not person.archived and person.rotation_order is not none and person.id!=user.id %}<option value="{{ person.id }}">{{ person.name }}</option>{% endfor %}</select>{% endif %}
        <button class="link danger">Confirm removal</button>
      </form></details>
    </div>{% elif user.id==g.user.id %}<a href="{{ url_for('password') }}">Change password</a>{% else %}<span class="muted">Administrator</span>{% endif %}</td></tr>
  {% endfor %}
  </tbody></table></div>
</section>
{% set removed=users|selectattr('archived')|list %}
{% if removed %}<section class="card spaced"><h2>Removed employees</h2><p class="muted">Restoring an employee keeps their existing password and history. They return outside the rotation; you can add them below.</p><div class="table-scroll"><table><thead><tr><th>Name</th><th>Username</th><th>Manage</th></tr></thead><tbody>{% for user in removed %}<tr><td>{{ user.name }}</td><td>{{ user.username }}</td><td><form method="post"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="operation" value="restore_employee"><input type="hidden" name="user_id" value="{{ user.id }}"><button class="link">Restore employee</button></form></td></tr>{% endfor %}</tbody></table></div></section>{% endif %}
<div class="spaced">{% include 'rotation.html' %}</div>
<section class="card spaced"><div class="section-heading"><h2>Resume or catch up from offline Excel</h2><span class="pill">Catch-up workflow</span></div><p class="muted">Paused app use for a few weeks or coordinated in Excel offline? Upload your team’s latest MOM Excel report to update the database, carry forward remaining actions, and set the baseline workbook for future downloads.</p><a class="button secondary" href="{{ url_for('resume_coordination') }}">Resume coordination from Excel →</a></section>
<section class="card"><div class="section-heading"><h2>Start the next meeting</h2><span class="pill">Current: {{ meeting.meeting_date|datefmt }}</span></div><p class="muted">Opening a new meeting closes the current one and carries forward unfinished actions. Saved drafts remain in the old report, labelled as drafts.</p><form method="post" data-confirm="Close the current meeting and open the next one? Make sure the team has finished entering their updates."><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="operation" value="meeting"><div class="form-grid"><div><label for="meeting_date">Meeting date (Monday)</label><input id="meeting_date" type="date" name="meeting_date" required min="{{ meeting.meeting_date }}"></div><div><label for="title">Subject</label><input id="title" name="title" value="Weekly Technical Meeting" required maxlength="150"></div><div><label for="location">Location</label><input id="location" name="location" value="{{ meeting.location }}" required maxlength="150"></div><div><label for="presenter">Presented by</label><input id="presenter" name="presenter" maxlength="100"></div><div><label for="minutes_by">Minutes taken by</label><input id="minutes_by" name="minutes_by" maxlength="100"></div></div><button class="button">Open next meeting →</button></form></section>
<p class="small muted">Backups include account records and meeting data. Keep them in a private folder. Restore instructions are in README.md.</p>
{% endblock %}