Compare commits

...

25 Commits

Author SHA1 Message Date
Alexis Burnaz c414de04aa feat(advalo): parité v1 (montants AXA, documents, cumul/reporting) + migration prod
Logique alignée sur advalorem v1 dans le module Advalo de etv:
- Facturation QT550: cotisation HT (Pos=329) + coût d'acte (Pos=1696) une seule
  fois — fin du double comptage (facturerBatch/createPonctuel).
- Documents Avenant/Attestation: valeurs réellement saisies (taux/prime/HT/acte/TTC)
  au lieu des valeurs figées, coordonnées agent propagées, templates reconstruits
  avec tableau de prix + récap transports via docxtemplater (+ _source pristine).
- Cumul/Reporting/Historique: region/dpt/souscripteur enrichis depuis advalo_ref_contrat
  (parité getVarByNumContrat).
- Mode périodique côté front (advalo-module.js) + Modification d'une demande hors
  grille dans l'Historique (parité v1).
- Tests Jest (formules, anti double-comptage, contexte doc, lookup, update).

Migration prod Excel→PocketBase fiabilisée et auto-portable:
- sources embarquées dans scripts/seed-data/ (repli sur repo v1 en dev),
- création idempotente des collections + import complet,
- validé de zéro sur base vierge: 188 users / 938 ref / 57234 déléguée / 23122 hors-grille.

Le binaire pb_data/data.db (38 Mo) sort du suivi git (régénérable via la migration);
le squelette pb_data_backup (admin + collections + régions) reste versionné.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 15:58:33 +02:00
Alexis Burnaz 70dd59b03e feat(advalo): integrate module in etv2 and restore v1 AXA scripts flow 2026-04-27 12:08:22 +02:00
Alexis Burnaz 7b484f34c9 RC: stabilise projet validation and reorganize product scripts 2026-04-24 17:38:30 +02:00
Alexis Burnaz 349c379dc7 boutons flottants supr 2026-04-22 10:32:44 +02:00
Alexis Burnaz 5338f682af RC UI: uniformiser labels flottants et fiabiliser blocages projet/tarif 2026-04-21 15:24:37 +02:00
Alexis Burnaz 4927d22387 RC projet: restaurer prime HT de reference et fiabiliser listeners modal impact 2026-04-21 10:34:42 +02:00
Alexis Burnaz 0b7d8b6eb3 RC tarif: repositionner le blocage, placeholders et assouplir le blocage choix 2026-04-21 09:48:30 +02:00
Alexis Burnaz 47c70697d3 fix(rc): fiabiliser modal impact projet et bypass cache scripts 2026-04-20 11:38:03 +02:00
Alexis Burnaz a8d0e69585 fix(rc): decoupler detection impact modal des modulateurs 2026-04-20 10:26:17 +02:00
Alexis Burnaz f57855d143 chore(rc): tracer raisons de non-ouverture du modal impact 2026-04-16 15:59:16 +02:00
Alexis Burnaz b35d64a241 fix(rc): armer modal projet avec tarifRC/tarif fallback 2026-04-16 15:53:04 +02:00
Alexis Burnaz bb695a820e chore(rc): push complet sync tarif/projet et donnees locales 2026-04-16 15:30:31 +02:00
Alexis Burnaz cc7d3d9e08 RC: auto-check activités complémentaires 2026-03-20 10:53:55 +01:00
Alexis Burnaz e4cb9906b4 RC: restituer historique et valeurs par defaut 2026-03-20 10:33:51 +01:00
Alexis Burnaz 4919940a26 RC: nouveaux formulaires et synchro 2026-03-19 10:26:15 +01:00
Alexis Burnaz 0125e2ae69 Lm : plus de AJAX, plus de soucis de token, mais loader pas fou, du a l'app en elle meme 2025-12-22 17:20:33 +01:00
Alexis Burnaz d6f06dfd7b Lm : a jour 2025-12-22 16:05:14 +01:00
Alexis Burnaz 77bf98e6cd fix : recherche globale + tous les champs 2025-12-22 13:42:13 +01:00
Alexis Burnaz 0a536140ab fix : bouton desactivé pendant le téléchargement + plus de abort 2025-12-22 12:24:30 +01:00
Alexis Burnaz 5de492b308 fix : exports (csv, xls) fixed, clients expand, fixed 2025-12-22 11:46:51 +01:00
Alexis Burnaz 4f82b29f18 minor changes 2025-12-19 18:27:17 +01:00
Alexis Burnaz a929c0770c Ajout .gitignore et retrait node_modules/logs du suivi 2025-12-19 18:11:52 +01:00
Alexis Burnaz 4cc8167ad8 Hp quasiment terminé, version tres avancé, aucune erreur dans la console 2025-12-19 18:10:03 +01:00
Alexis Burnaz 5a0ff43300 Hp quasiment terminé, version tres avancé, aucune erreur dans la console 2025-12-19 18:08:26 +01:00
Alexis Burnaz 013cd0eb8d travail 2025-12-19 13:37:51 +01:00
270 changed files with 105963 additions and 4751 deletions

5
ecole/.env Normal file
View File

@ -0,0 +1,5 @@
DB_URL=http://127.0.0.1:8091/
DB_ADMIN=admin@axa.fr
DB_PASSWORD=DTadmin123TT
NODE_ENV=developpement
PORT=8082

13
ecole/.env.example Normal file
View File

@ -0,0 +1,13 @@
DB_URL=http://127.0.0.1:8091/
DB_ADMIN=admin@example.local
DB_PASSWORD=change-me
NODE_ENV=development
PORT=8082
# Optional runtime overrides for Advalorem
# ADV_WORKSPACE_ROOT=/absolute/path/to/ecole
# Optional AXA bridge tuning
# AXA_TIMEOUT_MS=65000
# AXA_RETRY_COUNT=1
# AXA_RETRY_DELAY_MS=1200

54
ecole/.gitignore vendored Normal file
View File

@ -0,0 +1,54 @@
# Dependencies
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Classique
package-lock.json
# Logs
logs/
*.log
# PocketBase runtime data (local only)
src/db/pb_data/*.db
src/db/pb_data/*.db-shm
src/db/pb_data/*.db-wal
# Squelette versionné (data.db/logs.db) mais pas les transients
src/db/pb_data_backup/*.db-shm
src/db/pb_data_backup/*.db-wal
# Environment variables
.env
.env.local
.env.*.local
# OS files
.DS_Store
Thumbs.db
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# Build outputs
dist/
build/
# Documents Advalo générés (données client) — régénérés à l'exécution
documents/
# Rapports de migration/bench (régénérés)
reports/
scripts/reports/
# Build du helper AXA C# (recompilé via dotnet publish)
src/axa-helper/bin/
src/axa-helper/obj/
# Runtime
.runtime/

22
ecole/README.md Normal file
View File

@ -0,0 +1,22 @@
# EasyTransport / Advalorem Runtime Notes
## Local PocketBase workflow
1. Bootstrap local DB files from tracked backup:
- `npm run db:bootstrap`
- `npm run db:bootstrap:reset` (force overwrite)
2. Start PocketBase on `DB_URL` host/port:
- `npm run db:start`
3. Start app:
- `npm run start`
## Advalorem runtime overrides
- `ADV_WORKSPACE_ROOT`: force workspace root for packaged/runtime environments
- Advalorem APIs (`/advalo/*`) run in PocketBase mode by default.
- No `sqlite3` CLI dependency is required for historique/cumul/reporting/export.
## Notes
- `pb_data/*.db*` are local runtime files and are no longer intended to be versioned.
- `src/db/pb_data_backup/` remains the baseline source for local bootstrap.

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,17 @@
"main": "./src/server.js", "main": "./src/server.js",
"scripts": { "scripts": {
"start": "nodemon ./src/server.js", "start": "nodemon ./src/server.js",
"db:start": "node ./scripts/db-start.js",
"db:bootstrap": "node ./scripts/db-bootstrap-local.js",
"db:bootstrap:reset": "node ./scripts/db-bootstrap-local.js --reset",
"advalo:migrate": "node ./scripts/advalo-migrate-v1-to-v2.js --reset",
"advalo:bench": "node ./scripts/advalo-bench.js",
"advalo:axa-smoke": "node ./scripts/axa-smoke.js",
"build": "pkg ./src/server.js -o EasyTransport", "build": "pkg ./src/server.js -o EasyTransport",
"test": "jest" "test": "jest"
}, },
"pkg": { "pkg": {
"assets": [ "assets": ["public/**"]
"public/**"
]
}, },
"keywords": [], "keywords": [],
"author": "cyril.ducaffy@axa.fr", "author": "cyril.ducaffy@axa.fr",
@ -19,6 +23,7 @@
"dependencies": { "dependencies": {
"axios": "^1.7.2", "axios": "^1.7.2",
"cjs": "^0.0.11", "cjs": "^0.0.11",
"csv-parse": "^5.5.6",
"docxtemplater": "^3.46.1", "docxtemplater": "^3.46.1",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"ejs": "^3.1.9", "ejs": "^3.1.9",
@ -31,6 +36,7 @@
"numeral": "^2.0.6", "numeral": "^2.0.6",
"pizzip": "^3.1.6", "pizzip": "^3.1.6",
"pocketbase": "^0.15.3", "pocketbase": "^0.15.3",
"xlsx": "^0.18.5",
"winston": "^3.13.0", "winston": "^3.13.0",
"winston-daily-rotate-file": "^4.7.1" "winston-daily-rotate-file": "^4.7.1"
}, },

View File

@ -1,5 +1,8 @@
body { body {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
background-color: white;
color: black;
color-scheme: light;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
@ -183,6 +186,17 @@ hr.form {
padding: 5px 12px !important; padding: 5px 12px !important;
} }
.chip-info{
padding: 5px;
width: 30%;
text-align: center;
background: darkblue;
color: white;
border-radius: 10px;
font-size: 13px;
font-weight: 500;
}
#goodParcoursModal { #goodParcoursModal {
width: 80%; width: 80%;
max-height: 80%; max-height: 80%;
@ -226,6 +240,63 @@ hr.form {
background: #26a69a; background: #26a69a;
} }
#advaloNavSelect .active a {
background: #26a69a;
}
#advaloNavSelect li a {
font-weight: 500;
letter-spacing: 0.2px;
}
.advalo-panel .input-field > label {
color: #1a237e !important;
transition: transform .18s ease, color .18s ease, font-size .18s ease;
}
.advalo-panel .input-field > label.active {
transform: translateY(-24px) scale(0.82) !important;
transform-origin: 0 0;
}
.advalo-loader-wrap {
min-height: 46px;
}
.advalo-ring-loader {
width: 34px;
height: 34px;
border: 3px solid rgba(0, 0, 139, 0.18);
border-top-color: #00008b;
border-right-color: #26a69a;
border-radius: 50%;
margin: 0 auto;
animation: advalo-spin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}
.advalo-cumul-hist,
.advalo-cumul-fact {
margin-right: 6px;
margin-bottom: 6px;
}
.advalo-panel .btn,
.advalo-panel .btn-flat {
color: #fff !important;
}
@keyframes advalo-spin {
0% {
transform: rotate(0deg) scale(1);
}
40% {
transform: rotate(180deg) scale(1.04);
}
100% {
transform: rotate(360deg) scale(1);
}
}
.border { .border {
border-radius: 10px !important; border-radius: 10px !important;
} }
@ -408,6 +479,110 @@ a.grille-garanties:hover{
color : white color : white
} }
#rcProjetBlockingSummary,
#rcTarifBlockingSummary {
margin: 1rem 0 1.5rem 0;
}
.rc-blocking-summary {
display: none;
border-left: 6px solid #c62828;
background-color: #ffebee;
color: #b71c1c;
padding: 12px 16px;
border-radius: 6px;
}
.rc-blocking-title {
font-weight: 700;
margin-bottom: 8px;
}
.rc-blocking-list {
margin: 0;
padding-left: 20px;
}
.rc-blocking-list li {
margin: 3px 0;
}
.rc-field-label {
display: block;
color: #1a237e;
font-weight: 700;
margin-bottom: 6px;
text-align: left;
}
.rc-has-floating-label {
position: relative;
margin-top: 0.5rem;
}
.rc-has-floating-label .rc-field-label.rc-floating-label {
position: static;
top: auto;
left: auto;
margin: 0 0 6px 0;
font-size: 0.95rem;
font-weight: 700;
color: #1a237e;
pointer-events: none;
transition: none;
background: transparent;
padding: 0;
z-index: auto;
}
.rc-has-floating-label .rc-field-label.rc-floating-label.active {
top: auto;
font-size: 0.95rem;
font-weight: 700;
color: #1a237e;
}
.rc-tarifettes-hidden {
display: none !important;
}
.rc-three-col-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px;
}
.rc-three-col-grid > [class*="col"] {
width: 100% !important;
margin-left: 0 !important;
padding: 0 !important;
display: flex;
}
.rc-three-col-grid .card {
width: 100%;
display: flex;
flex-direction: column;
}
.rc-three-col-grid .card-content {
flex: 1;
}
.rc-equal-card-row > [class*="col"] {
display: flex;
}
.rc-equal-card-row .card {
width: 100%;
display: flex;
flex-direction: column;
}
.rc-equal-card-row .card-content {
flex: 1;
}
#modalTarifCom span.material-icons { #modalTarifCom span.material-icons {
font-size: 4rem; font-size: 4rem;
} }
@ -512,3 +687,49 @@ a.grille-garanties:hover{
@keyframes l13 { @keyframes l13 {
100% { transform: rotate(1turn); } 100% { transform: rotate(1turn); }
} }
/* Message d'erreur du loader */
#error-message {
display: none;
color: #ff4444;
font-weight: bold;
text-align: center;
margin-top: 20px;
white-space: pre-line;
font-size: 16px;
}
/* Message de timeout du loader */
#timeout-message {
display: none;
margin-top: 30px;
text-align: center;
color: #d0d0d0;
font-size: 14px;
max-width: 420px;
line-height: 1.6;
padding: 0 20px;
animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* Lien cliquable pour annuler le chargement */
#cancel-loading-link {
color: #66B2FF;
text-decoration: underline;
text-underline-offset: 3px;
text-decoration-thickness: 1px;
cursor: pointer;
transition: all 0.2s ease;
font-weight: 500;
}
#cancel-loading-link:hover {
color: #90CAF9;
text-decoration-thickness: 2px;
text-shadow: 0 0 10px rgba(102, 178, 255, 0.6);
}

Some files were not shown because too many files have changed in this diff Show More