Commit Graph

161 Commits

Author SHA1 Message Date
Matthieu
7ea4cc8c12 chore(submodule) : update frontend pointer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:22:01 +01:00
Matthieu
bb300a7ca7 feat(composant) : add virtual getStructure() rebuilding legacy JSON from slot tables
Exposes structure as a computed property from pieceSlots, productSlots,
and subcomponentSlots relations, including slotId for frontend quantity
persistence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:21:17 +01:00
Matthieu
556da6e451 fix(custom-fields) : include customFields and customFieldValues in product normalization
normalizeProduct() had customFields hardcoded to [] and was missing
customFieldValues entirely, unlike normalizeComposant and normalizePiece.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:20:28 +01:00
Matthieu
8871440c9a fix(custom-fields) : populate customFields in ModelType structure from relations
getStructure() was returning hardcoded empty customFields arrays after
the JSON-to-tables migration. Now reads from the relational CustomField
entities via serializeCustomFields() for all three categories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:19:42 +01:00
Matthieu
6f1756e82e fix(fixtures) : add INSERT statements for new relational tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 08:31:02 +01:00
Matthieu
55bed90ac7 test(normalization) : add tests for skeleton requirements, composant slots, piece-product relation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 08:25:00 +01:00
Matthieu
a6139d7090 feat(normalization) : drop structure and productIds JSON columns
- Remove Composant.structure property, getter/setter
- Remove Piece.productIds property, setProductIds()
- Update fixtures to remove dropped columns
- Add migrations to drop both columns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 08:19:54 +01:00
Matthieu
8ed5f90b63 feat(structure) : read composant structure from slot relations instead of JSON
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:23:56 +01:00
Matthieu
5194543d16 feat(composant) : create composant slot tables and migrate data from structure JSON
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:20:31 +01:00
Matthieu
c01b71fe06 feat(composant) : add composant slot entities for structure normalization
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:15:42 +01:00
Matthieu
5336dfc09d feat(skeleton) : drop skeleton JSON columns from model_types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:11:14 +01:00
Matthieu
77c5d25cea feat(skeleton) : wire skeleton writes to SkeletonStructureService
ModelType.setStructure() now stores data in pendingStructure instead of
writing to JSON columns. A new ModelTypeProcessor intercepts API Platform
POST/PUT/PATCH operations and delegates skeleton writes to
SkeletonStructureService, which persists to relation tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:03:32 +01:00
Matthieu
e2326064ba feat(skeleton) : expose skeleton relations via API and create SkeletonStructureService
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:58:18 +01:00
Matthieu
100e24725c feat(skeleton) : create skeleton requirement tables and migrate data from JSON
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:54:14 +01:00
Matthieu
515bae189e feat(skeleton) : add skeleton requirement entities for ModelType
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:48:39 +01:00
Matthieu
333f2a88af feat(machine) : exposer structure composant + pièces résolues dans la vue machine
- normalizeComposant : inclure structure du composant dans la réponse
- enrichStructureWithPieceData : résoudre selectedPieceId vers les
  données complètes de la pièce catalogue (nom, référence, prix, etc.)
- Update submodule : affichage pièces incluses + quantité machine

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:23:55 +01:00
Matthieu
eccbc1bd56 chore(frontend) : update submodule — fix quantity save on composant edit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:02:55 +01:00
Matthieu
2a0809a065 chore(frontend) : update submodule — quantity on composant edit page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:41:12 +01:00
Matthieu
f2061abce8 chore(frontend) : update submodule — piece quantity display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:33:04 +01:00
Matthieu
42c7072bcd chore(frontend) : update submodule — piece quantity feature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:14:09 +01:00
Matthieu
1f90f809ac test(piece) : add quantity tests for MachinePieceLink
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:06:23 +01:00
Matthieu
a940f53f8a feat(piece) : add quantity to structure normalization, PATCH and clone
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:04:03 +01:00
Matthieu
c74bdedf9b feat(piece) : add quantity field to MachinePieceLink entity + migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:01:42 +01:00
Matthieu
233ee3faf3 docs : add piece quantity implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:56:24 +01:00
Matthieu
b8edf1ea95 docs : update piece quantity spec after review
Address review findings: drop Groups attribute, add clone logic,
specify PATCH payload format, list frontend functions to update,
add validation and test cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:48:01 +01:00
Matthieu
7a7af58074 docs : add piece quantity design spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:44:34 +01:00
Matthieu
03e6c2432b fix(machine) : add addConstructeur/removeConstructeur methods + fix fournisseur display
API Platform silently ignored the constructeurs field on PATCH because
Machine was missing the add/remove methods (unlike Composant, Piece, Product).
Also fixes the read-only fournisseur display overflow in MachineInfoCard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 18:00:09 +01:00
Matthieu
31408ded7f chore : bump version to 1.9.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v1.9.0
2026-03-09 15:52:21 +01:00
Matthieu
4054fb24e6 feat(site) : add color field to sites + frontend submodule update
- Add color VARCHAR(7) column to sites entity
- Migration with IF NOT EXISTS for idempotence
- Update reference config
- Frontend: site color picker, dark mode, card styling improvements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:51:55 +01:00
Matthieu
32ba4928df chore(frontend) : update submodule — site edit + card buttons alignment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:11:55 +01:00
edf7d0fa9e chore(frontend) : update submodule — changelog v1.9.0 2026-03-09 13:04:54 +01:00
233927df19 chore : sync frontend submodule and update reference config
Update frontend submodule pointer to latest UI refactor.
Update config/reference.php with Symfony auto-generated changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:14:49 +01:00
dcb5f15769 docs : update CLAUDE.md with custom controllers, fields architecture and factories
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:43:19 +01:00
d3cd3fc3ce feat(machine) : add custom field management on machine detail page
- Fix: return customFieldValues in structure endpoint (was hardcoded null)
- Frontend: add editor to create/edit/delete custom field definitions
- Tests: add integration tests for structure values + definition CRUD

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:36:14 +01:00
33fc80cbc2 fix(security) : disable session migration on API firewall
Symfony's default session_fixation_strategy (migrate) regenerated the
session ID on every authenticated request, breaking concurrent API calls
from the SPA — only the first request succeeded, all others got 401.
The login controller already calls $session->migrate(true) explicitly,
so disabling automatic migration is safe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:30:38 +01:00
33e3f25850 docs : update project documentation and frontend submodule pointer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 13:47:46 +01:00
efc6ec5691 test(api) : add comprehensive API test suite (161 tests)
- Add AbstractApiTestCase with auth helpers and entity factories
- Add tests for all entities: Machine, Piece, Composant, Product, Site,
  ModelType, Constructeur, CustomField, CustomFieldValue, Document,
  MachineComponentLink, MachinePieceLink, MachineProductLink, Profile
- Add controller tests: CommentController, EntityHistory
- Add HealthCheck, Filter, Pagination, Validation, Session tests
- Test auth (401), authorization (403), CRUD, and edge cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 13:42:56 +01:00
b342d0e50a fix(security) : harden auth, session, document access and health endpoint
- Remove orphaned PUBLIC_ACCESS rule for deleted /api/test route
- Remove JWT login firewall (app is session-based only)
- Set APP_SECRET placeholder (real value must be in .env.local)
- Remove JWT env vars from .env
- Add session regeneration on login (prevent session fixation)
- Remove Document.path from API serialization groups (prevent path leak)
- Restrict health check details to ROLE_ADMIN (anonymes get status only)
- Add path traversal guard in DocumentStorageService
- Convert CreateProfileCommand password to interactive hidden prompt
- Restrict Profile Get endpoint to ROLE_ADMIN
- Change api firewall to stateless: false (matches session-based auth)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 13:42:09 +01:00
0709d01240 chore(config) : add DAMA test bundle, update API Platform config, improve makefile
- Register DAMADoctrineTestBundle for test env (transaction rollback)
- Update API Platform title/description, add pagination defaults
- Configure services for new controllers and commands
- Update makefile targets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 13:39:44 +01:00
74f77a3ba8 refactor(backend) : extract CuidEntityTrait, abstract audit subscriber, merge history controllers
- Extract shared ID generation + timestamps into CuidEntityTrait used by all entities
- Create AbstractAuditSubscriber to deduplicate audit logic across 7 subscribers
- Merge per-entity history controllers into single EntityHistoryController
- Delete redundant ComposantHistory/MachineHistory/PieceHistory/ProductHistoryController
- Add OpenApiDecorator for API documentation customization
- Disable failOnDeprecation in PHPUnit (vendor API Platform deprecation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 13:39:03 +01:00
bab13e5c57 chore : clean project config — untrack .idea/, gitignore Zone.Identifier and frontend/, blank JWT secret
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:01:54 +01:00
Matthieu
378026ebce chore(frontend) : update submodule — add buttons repositioned
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:32:56 +01:00
Matthieu
ea2b813728 chore(frontend) : update submodule — product delete confirmation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:07:06 +01:00
Matthieu
20653b9046 docs(changelog) : add delete confirmation dialog entry
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:59:48 +01:00
Matthieu
c6deef6028 chore(frontend) : update submodule — delete confirmation dialog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:59:10 +01:00
Matthieu
e922b14419 feat(api) : add /api/health endpoint for monitoring
- Returns status, version, timestamp, PHP version, DB latency and memory usage
- Accessible without authentication (PUBLIC_ACCESS)
- Returns 200 when healthy, 503 when degraded (DB down)
2026-03-06 09:51:09 +01:00
Matthieu
d16b042739 chore(frontend) : update submodule — changelog v1.8.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:39:07 +01:00
Matthieu
2b3c1fe08e docs(changelog) : complete v1.8.1 changelog with all frontend changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:36:37 +01:00
Matthieu
51248b7854 chore(release) : v1.8.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v1.8.1
2026-03-05 17:27:29 +01:00
Matthieu
0e11f4ad2d refactor(api) : remove TypeMachine skeleton system, fix ModelType serialization
- Remove TypeMachine, TypeMachineComponentRequirement, TypeMachinePieceRequirement,
  TypeMachineProductRequirement entities and related repositories/state processor
- Replace MachineSkeletonController with MachineStructureController
- Link CustomField directly to Machine instead of TypeMachine
- Add migration to drop TypeMachine tables and migrate custom fields to machines
- Fix ModelType serialization: Annotation\Groups → Attribute\Groups (Symfony 8 compat)
  and add product:read, composant:read, piece:read groups for embedded category display
- Fix Profile: same Annotation → Attribute import
- Fix SearchFilter: partial → ipartial on Comment and Document
- Update frontend submodule (remove skeleton pages/components, simplify machine creation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:26:16 +01:00