Skip to content

fix(groups): la ficha se actualiza al editar y mantenimiento no ve contactos - #18

Merged
bpstack merged 2 commits into
claude/compassionate-planck-gh6aoffrom
opencode/fix-group-detail
Oct 12, 2026
Merged

bpstack merged 2 commits into
claude/compassionate-planck-gh6aoffrom
opencode/fix-group-detail

Conversation

@bpstack

@bpstack bpstack commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Cambios

  • La ficha de grupo se refresca tras una edición (antes pintaba un store que no se actualizaba).
  • Los contactos (y su rastro en el historial) solo los ven admin, recepción y group-admin; para mantenimiento desaparecen la pestaña y la petición.
  • docs/groups: quién ve los contactos y cómo se repiten de verdad los recordatorios.

Por qué

Editar el importe no se veía hasta recargar, y mantenimiento veía correos y teléfonos de los contactos. Decidido el 2026-10-12.

…rom maintenance

- GroupDetailClient: the page paints useGroupStore, filled once from the
  server; it now copies the fresh useGroup data into the store and, after
  an edit, invalidates the group key (payments, status and rooms share the
  prefix). useGroup reads initialGroup.id, not the store, which may still
  hold the previous page's group.
- canViewGroupContacts (admin, recepcionista, group-admin) guards GET
  /contacts and /contacts/primary; the history leaves out the
  group_contacts entries, which keep the email and phone as JSON, for the
  other roles.
- Frontend: the contacts tab and its query are left out for those roles,
  ?tab=contacts opens the summary, and ContactPanel drops a contacts query
  it never read.
- docs/groups: who sees the contacts.
- Tests: the middleware, the routes and the history filter; the page code
  (no frontend test runner).

Why: after "Grupo actualizado correctamente" the page kept the old total
and balance until another action reloaded it; and every role, maintenance
included, could read the contacts. Decided on 2026-10-12: maintenance keeps
groups for its notifications, not the contacts. Checked in the browser:
before, a 3200 -> 4000 edit kept showing 3200; now it shows 4000 at once;
as maintenance there is no contacts tab, no /contacts request and no
contact entry in the history; admin still sees both.
- The 48-hour duplicate check: a payment due soon gets the 15- and 7-day
  reminders every two days, overdue payments and rooming lists repeat too.

Why: the doc said a reminder is never created twice; the owner decided on
2026-10-12 to keep the current behaviour.
@bpstack
bpstack merged commit 8cc0b3a into claude/compassionate-planck-gh6aof Oct 12, 2026
4 checks passed
@vercel

vercel Bot commented Oct 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
four-points Ready Ready Preview Oct 12, 2026 6:34pm UTC

@bpstack
bpstack deleted the opencode/fix-group-detail branch October 12, 2026 19:02

This branch was successfully deployed

1 active deployment
Preview — 6b60a4c6 Deployed Oct 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant