Commit Graph
7 Commits
Author SHA1 Message Date
FrankandClaude Sonnet 5 574d903715 Add family tree page, linked from the NPC's family name
- /npcs/family/{family} (app_npc_family) renders a parent->child tree for
  everyone sharing that family name; co-parents who are both in the family
  are paired into one couple node, elders first
- FamilyTreeBuilder does the flat-list -> tree assembly
- the NPC detail page's family name (subtitle + Details row) now links there
- .family-tree CSS: nested list with connector lines, small portrait avatars

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 16:23:03 +02:00
FrankandClaude Sonnet 5 d43746970b Split NPC page: read-only detail + game notes, separate full edit form
- /npcs/{id} (app_npc_show): portrait, all fields shown read-only, and
  the only editable control is the game-notes textarea. Father/Mother
  link through to their own pages.
- /npcs/{id}/edit (app_npc_edit): the full structured form, now WITHOUT
  game notes; saving returns to the detail page.
- NpcType drops gameNotes; new NpcGameNotesType holds just that field.
- The DataTable row link (/npcs/{id}) now lands on the detail page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 16:17:03 +02:00
FrankandClaude Sonnet 5 71b5cb6633 Show the NPC portrait on the detail page
Npc::getPortraitPath() maps the name to image/npc-pictures/<NameNoSpaces>.png;
the edit page renders it beside the heading (with family · occupation), and
drops the <img> via onerror when a portrait is missing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 16:10:00 +02:00
FrankandClaude Sonnet 5 5bf25d1802 Add father/mother links to NPCs, derived from the relationships text
- Npc gains self-referencing father/mother (nullable, ON DELETE SET NULL);
  editable as dropdowns on the per-NPC form
- app:npc:link-parents parses "son/daughter/child of X [and Y]" from the
  Relationships / Notes column, resolves the names within the same family,
  and works out which parent is father vs mother from husband/wife/widow(er)
  and son/daughter/sister/brother cues (plus a small name-gender table for
  the few the text can't disambiguate). --dry-run / --force. 92/180 linked,
  none ambiguous.
- migrations now pin ENGINE=InnoDB - the local WAMP MariaDB defaults to
  MyISAM, which silently drops foreign keys

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 15:21:03 +02:00
FrankandClaude Sonnet 5 01d5fd13b2 Drop Family, Race and Updated columns from the NPC table view
Still stored on the entity and editable on the per-NPC form; just no
longer shown in the /npcs list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 15:07:36 +02:00
FrankandClaude Sonnet 5 1ccab6ed68 Add NPC database table with server-side DataTable and per-NPC game notes
- Npc entity (village spreadsheet columns) + game_notes text field for
  the DM's live play notes, plus updated_at touched on every change
- Race / VillageStatus / BloodCartInvolvement / MysteryImportance as
  string-backed PHP enums, rendered as dropdowns on the edit form
- /npcs: server-side DataTables (paging, global search and column sort
  all run in the backend via NpcRepository::findForDataTable); name cell
  links to the edit page, game notes shown truncated
- /npcs/{id}: Bootstrap-themed edit form (all fields + a large game
  notes textarea); Symfony forms now use the bootstrap_5 theme
- app.js: generic server-side DataTable wiring driven by data-* on the
  <table>/<th> (data-datatable-src, data-row-url, data-format)
- app:npc:import console command - upserts from data/npcs.csv by
  (family, name), never overwrites game_notes; --purge / --dry-run
- data/npcs.csv: 180 villagers exported from the working spreadsheet

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 15:04:39 +02:00
FrankandClaude Sonnet 5 cc4fbf425d Add nav menu with Characters, NPC's and Storyline pages
Navbar (collapsible) with active-state highlighting driven by a nav list
in base.html.twig. Three routed, auth-gated controllers each rendering a
shared placeholder partial - data models still to be designed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 14:36:17 +02:00