diff --git a/AGENTS.md b/AGENTS.md index 80e5c7a..dae84b2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,7 +11,7 @@ Maintain a deliberately small, self-hosted rota application for a non-profit bar - `night`: fixed/manual, every day of the month. - `saturday-lunch`: rotating, Saturdays only. - `sunday-lunch`: rotating, Sundays only. -3. Saturday and Sunday rotations are independent, each with its own configuration page (`/admin/schedules/`); the night schedule is fixed and repeats every month with a single configuration. The `/admin/schedules` and `/schedules` pages are hubs that link to one page per schedule. +3. Saturday and Sunday rotations are independent, each with its own configuration page (`/admin/schedules/`); the night schedule is fixed and repeats every month with a single configuration. `/admin/schedules` is the hub: it shows every schedule (kind, hours, next dates, rotation order or night pattern) and links to its configuration page. There is no public schedule page: `/`, the rota, is the only page open to signed-out visitors. 4. Never silently rewrite an existing assignment when rotation membership/order changes. 5. A swap/change request only applies if the requester still owns the assignment when it is accepted/approved. 6. `email` and `phone` are optional. Signing in belongs to a `login_accounts` row (username, password, admin flag) that several people can share; a person with no login account is rota-only. A username is unique across accounts, not across people. The session stores the login account, and everything a member sees and controls is scoped to the people on it. diff --git a/README.md b/README.md index 9fa32c1..083237b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Open `http://localhost:8000`. With the example configuration, the administrator To fill your own data, skip `seed-demo`, sign in as administrator, and: 1. Open **People** (`/admin/users`) and add members. Contact details are optional; credentials are optional as a pair. -2. Open **Schedules** (`/admin/schedules`) and configure each schedule: Night's repeating day-of-month pattern, Saturday's rotation, and Sunday's independent rotation. +2. Open **Gerir escalas** (`/admin/schedules`) to see every schedule, then configure each one: Night's repeating day-of-month pattern, Saturday's rotation, and Sunday's independent rotation. 3. View the rota (`/`) and use each schedule's configuration page to edit assignments. 4. Sign in as a member to request a change, as another member to accept it, then as admin to approve it. @@ -39,7 +39,7 @@ On either lunch schedule page, **Apply rotation** updates the displayed month's Rotation uses the previous assigned person in that same schedule as its reference, then selects the next active person in the order, wrapping to the start. This continues across months and respects manual assignments and completed swaps as references. For example, with Alice → Bruno → Carla, a previous shift assigned to Bruno means the next automatic shift goes to Carla. If no usable previous assignee exists, the schedule's anchor date supplies the starting position. -Demo seeding creates **alice, bruno, carla, diogo**, each with password **demo-password** for newly created accounts, both lunch rotations, and all 31 days of the repeating Night pattern. It generates this month and next so there are future shifts available for testing changes. Re-running it preserves existing accounts, configured schedules, and assignments, including intentionally unassigned shifts. If you already opened a month before seeding, its existing rows stay as they were; use the next month or edit them in the admin UI. +Demo seeding creates the logins **alice** and **bruno**, plus a shared **sabado** login that both **carla** and **diogo** sign in through, all with password **demo-password** for newly created accounts, together with both lunch rotations and all 31 days of the repeating Night pattern. It generates this month and next so there are future shifts available for testing changes. Re-running it preserves existing accounts, configured schedules, and assignments, including intentionally unassigned shifts. If you already opened a month before seeding, its existing rows stay as they were; use the next month or edit them in the admin UI. **Important:** the initial admin is only created when the database has no users. Changing `INITIAL_ADMIN_PASSWORD` later does not reset that account; reset it from the People screen. diff --git a/app/templates/admin_schedules.html b/app/templates/admin_schedules.html index 40f2f46..6b7eb87 100644 --- a/app/templates/admin_schedules.html +++ b/app/templates/admin_schedules.html @@ -21,7 +21,19 @@ {% if card.kind == 'rotation' %}

Próximas datas

{{ card.dates | join(' · ') }}

-

Rotação: {{ card.rotation_names | join(', ') if card.rotation_names else 'sem membros ainda' }}

+

Ordem da rotação

+
    + {% for name in card.rotation_names %} +
  1. {{ name }}
  2. + {% else %}
  3. Ainda não há membros.
  4. {% endfor %} +
+ {% else %} +

Padrão

+ {% endif %} {% else %} diff --git a/app/templates/base.html b/app/templates/base.html index 37f5ce3..1714c65 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -16,7 +16,6 @@ {{ settings.app_name }}