Commit Graph

8 Commits

Author SHA1 Message Date
Julio Ruiz b840172946 Merge row edit/delete into a dropdown menu
- New deletePastor server action (also removes the pastor's letter to avoid
  orphaned uploads)
- Replace the per-row edit icon with a "⋮" actions dropdown containing
  Editar and Eliminar (Eliminar confirms before deleting)
- Uses the popover API + CSS anchor positioning so the menu isn't clipped by
  the table's horizontal-scroll container

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-14 01:25:49 -05:00
Julio Ruiz ba08fc087b Add church-registered flag + fix country search
- Pastors: churchRegistered boolean; the registration code field now shows
  only when the church is registered (admin condition), and is cleared when
  the flag is turned off
- Frontend modal: "Iglesia registrada" toggle reveals a conditional
  "Código de registro" input; two new toggleable table columns
- Search: country is stored as an ISO code, so a country typed by name (e.g.
  "venezuela", accent-insensitive) now resolves to its code(s) and matches

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-14 01:17:06 -05:00
Julio Ruiz efeee14752 Add impacted-people total and letter deletion
- Home header shows a running sum of impacted people across all matching
  records (respects the current search filter), next to the record count
- Letters can be deleted from the table (trash button next to Download),
  which unlinks the pastor and removes the upload doc so a new file can be
  uploaded in its place

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-13 22:53:03 -05:00
Julio Ruiz 348bb3480a Add place field and expand pastors table
Collection:
- New `place` text field on Pastors

Frontend table:
- Show church name, place, state, and impacted people columns
- Column-visibility toggle ("Columnas" dropdown) to show/hide any column
- Replace "Editar" text button with an edit icon
- Create/edit modal now covers church, place, and impacted people too

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-13 21:42:05 -05:00
Julio Ruiz db9eb8a304 Fix type errors and set PM2 port to 3111
- page.tsx: type the search filter as Where
- PastorsTable.tsx: narrow action result before setError
- seed.ts: tag ids are numbers on SQLite
- ecosystem: PORT 3111

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-13 21:10:39 -05:00
Julio Ruiz 57c5594963 Change PM2 app port to 3001
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-13 21:04:44 -05:00
Julio Ruiz d9d156d0a8 Add PM2 ecosystem config for server deployment
Runs `next start` under PM2 (fork mode, autorestart, 1G memory cap).
Config is .cjs because the package is ESM.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-13 21:02:01 -05:00
Julio Ruiz e1bd3c7949 Initial commit: Payload CMS ministerial database
Payload CMS 3 + Next.js app with a Spanish frontend.

- Pastors collection (name, church, location, phones[], Telegram, letter upload)
- PastorLetters upload collection restricted to PDF/Word
- CSV importer (pnpm import:pastors) loading data/pastores_unificado.csv
- Frontend home page: daisyUI pastors data table with search, pagination,
  and create/edit/upload-letter modals (all in Spanish)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-13 20:55:10 -05:00