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>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\figli_compta_ledger\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
|
||||
/**
|
||||
* Renders the JS-driven ledger dashboard (progressive decoupling: Drupal
|
||||
* serves the page shell + auth via the session cookie, dashboard.js fetches
|
||||
* JSON:API and does all the aggregation client-side).
|
||||
*/
|
||||
class DashboardController extends ControllerBase {
|
||||
|
||||
public function view() {
|
||||
return [
|
||||
'#theme' => 'figli_compta_dashboard',
|
||||
'#attached' => [
|
||||
'library' => ['figli_compta_ledger/dashboard'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user