110 Commits
Author SHA1 Message Date
bachirandClaude Sonnet 5 a86875c03c Add admin/editeur/user roles for the associates
root (renamed from the default admin/admin account) keeps full,
unrestricted access outside any role system. These three cover the
actual associates:

- user: read-only, 'access content' only -- can browse /lignes and
  /dashboard, nothing else.
- editeur: 'access content' + create/edit any/delete any
  ligne_comptable content -- can enter and correct accounting lines,
  no site configuration.
- admin: identical permission set to editeur for now (per instruction,
  actual config permissions to be scoped later).

Left the pre-existing "administrator" (is_admin bypass -- too broad)
and "content_editor" (generic Standard-recipe scaffolding, permissions
unrelated to ligne_comptable) roles untouched but unused; worth
pruning later if nothing ends up using them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 11:01:07 +02:00
bachirandClaude Sonnet 5 f8ae2d6a9e Lock the site down to authenticated users only
All the ledger data is confidential (real client names, amounts,
associate balances) -- revoke 'access content' from the anonymous
role so nodes, taxonomy terms, and JSON:API all deny anonymous reads
(verified: JSON:API returns an empty data[] + "omitted" notice instead
of the records, /lignes and /dashboard 403).

Set the site's 403 page to /user/login: anonymous visitors hitting "/"
(the front page is /lignes) land on the login form instead of an
access-denied page; authenticated users still land on /lignes as
before since they still hold 'access content' via the authenticated
role.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 10:57:18 +02:00
bachirandClaude Sonnet 5 8c63c19619 Add per-row edit button and paired column highlight to /lignes
Pencil icon opens the existing node edit form in the same AJAX modal
as "+ Ajouter une ligne" -- no new form logic, reuses the form_alter
validation/close-on-save already in place for the add form.

Column highlight pairs with the existing row hover (from Gin's global
table CSS) to form a crosshair. Column position is computed logically
(accounting for colspan) rather than via DOM cellIndex, since the
totals row's label cell spans 4 columns and would otherwise misalign
every column after it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 10:40:21 +02:00
bachirandClaude Sonnet 5 a5af59a349 Stop tracking web/sites/default/settings.php
Committed in git since the initial commit -- contains the DB credentials
and the Drupal hash_salt in clear text, already pushed to gitea and prod.
Keeping the file locally (still needed for the site to run) but no longer
tracked, so future secret rotations don't get recommitted. The already-
exposed history is left untouched for now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 10:40:11 +02:00
bachirandClaude Sonnet 5 f2a8f469b3 Add "Hébergement" type, reclassify EXT.WEB sorties into it
27 lines (18 previously "charge", 9 "versement") that touch the EXT.WEB
compte in their répartition are now typed "hebergement" instead -- makes
Bachir's separate hosting activity filterable/visible as its own category
rather than blended into general charges/versements. Amounts/répartition
untouched, only the classification changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 23:07:12 +02:00
bachirandClaude Sonnet 5 2ebfa3b413 Add solde totals footer row + fix JSON:API pagination duplicate bug
- tfoot row: sum per compte (créditeur/débiteur colored) for the
  currently filtered rows, plus HT/TTC/écart totals
- Fixed a real bug: fetchAllLignes() paginated without a unique sort key
  (field_date_ligne alone, many ties), which let Drupal's JSON:API return
  the same row on two pages -- silently inflating totals (Bachir showed
  -3115,38€ instead of -3013,56€). Now sorts by
  field_date_ligne,drupal_internal__nid (home) / drupal_internal__nid
  (dashboard), plus a defensive client-side de-dup by node id either way.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 23:04:33 +02:00
bachirandClaude Sonnet 5 41ab7445f7 Remove Provision EPAU as a tracked compte
Not used going forward. Deleted the term + its 2 répartition paragraphs
(the standalone opening line was removed entirely since it had nothing
left; the EPAU F_2617 line now shows a real 5214,01€ écart instead of
silently absorbing that amount under a compte nobody uses).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 22:59:25 +02:00
bachirandClaude Sonnet 5 a6626e023a Fix dark mode readability + replace error-row fill with thin red outline
Gin dark mode (html.gin--dark-mode) is on by default and the previous CSS
relied on Gin custom properties that didn't resolve here, causing
black-on-black/white-on-white text. Now uses self-contained explicit
colors with a dark-mode override block. Error rows get a thin red border
instead of a background fill, as requested.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 22:55:11 +02:00
bachirandClaude Sonnet 5 10f6271fec Add spreadsheet-style home page, migrate full 2026 ledger
- New /lignes route (set as site front page): full line-by-line table of
  every ligne comptable, Vue app with filters (compte/client/type/année)
  and month/year grouping, columns matching the original spreadsheet
  (one per compte). Rows with répartition ≠ montant HT are visibly
  flagged (red row + écart column), not hidden or auto-corrected.
- /dashboard now only holds the aggregate solde-par-compte/par-client view
- Migrated all 199 real 2026 transaction lines + 9 opening balances (from
  REPORT CLOTURE 2025) via a drush import script, preserving raw source
  data (known répartition mismatches included) -- validated with a new
  state-flag bypass of the presave check, used only for historical import
- Added "Autre" as an allowed field_type_ligne value for edge-case rows
- Client taxonomy grew from 15 seeded terms to the full unified list

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 22:52:00 +02:00
bachirandClaude Sonnet 5 ca800be21a Initial Drupal site: content model + validation + Vue dashboard
- Content type "Ligne comptable" with Paragraphs "Répartition" (Compte + Montant)
- Taxonomies: Compte (9 comptes) and Client (unified client list)
- hook_node_presave + form validate: sum(répartition) must equal montant HT
- /dashboard route (progressive decoupling): Vue 3 app fetching JSON:API,
  computing solde par compte / par client client-side
- "Ajouter une ligne" opens the real Drupal node form in an AJAX modal
- Gin as default + admin theme
- 9 opening-balance lines seeded from suivi_compta_SASFigli2026_v2.ods

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 22:32:54 +02:00