75 Commits

Author SHA1 Message Date
Matthieu
f82a79b2aa fix: correct DEFAULT_ORIENTATIONS for _ProductConstructeurs
After migration, the table orientation is now A=constructeur, B=product.
Update the fallback orientation to match the new schema.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 12:06:08 +01:00
Matthieu
208d49aac8 fix: use DELETE instead of TRUNCATE for migration
Use DELETE instead of TRUNCATE to avoid requiring table ownership.
Wrap in DO block for better error handling and logging.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 11:51:57 +01:00
Matthieu
ff278f5549 fix: correct Product-Constructeur join table orientation
The _ProductConstructeurs table was created with wrong column order:
- Before: A=product, B=constructeur
- After: A=constructeur, B=product (alphabetical order expected by Prisma)

This caused Prisma to fail loading constructeurs relations, resulting in empty constructeurs arrays in API responses.

Changes:
- Added migration to swap A/B columns and recreate foreign keys
- Added debug logs in products.service.ts and constructeur-link.util.ts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 11:48:06 +01:00
Matthieu
8cfe48e0f5 Hydrate constructeur links for products and pieces 2025-12-03 11:35:09 +01:00
Matthieu
ead5d98e61 Test CI OK 2025-12-03 11:35:09 +01:00
Matthieu
82fa6589f2 Test CI Woodpecker 2025-12-03 11:35:09 +01:00
1d3d606bd6 Actualiser .github/workflows/ci.yml 2025-11-21 23:37:14 +00:00
baa855c7a1 Actualiser .github/workflows/ci.yml 2025-11-21 22:29:10 +00:00
fb0a18cb87 Actualiser .github/workflows/ci.yml
Some checks failed
test-ci-simple / test (push) Has been cancelled
2025-11-21 22:18:09 +00:00
Matthieu
6cf2b566ce feat: add product domain and machine integration
- extend Prisma schema with products, product constructs and link tables\n- introduce product service, DTOs and includes with constructeur support\n- integrate product selections across model type skeletons, composants, pièces and machines\n- validate product requirements when building machine skeletons and payloads
2025-11-05 15:34:42 +01:00
Matthieu
e81f71e3e7 fix: prune orphan constructeur links before orientation swap 2025-10-30 12:01:49 +01:00
Matthieu
d05b91d7cd feat: centralize constructeur link synchronization 2025-10-30 11:32:34 +01:00
Matthieu
fe471b9e81 fix: normalize constructeur join tables orientation 2025-10-30 11:32:11 +01:00
Matthieu
9f522a6dbb feat: gérer l'ordre des champs personnalisés 2025-10-28 18:08:08 +01:00
Matthieu
635ea0e84e fix: corrige les associations constructeurs 2025-10-28 16:37:06 +01:00
Matthieu
4db64351b7 feat: autoriser la suppression quand seuls les champs personnalisés restent 2025-10-24 15:50:09 +02:00
Matthieu
b9c9b2c421 fix: préciser les erreurs de suppression des ressources 2025-10-24 15:42:04 +02:00
Matthieu
16a703a4c3 feat: persist type requirement order 2025-10-23 09:36:39 +02:00
Matthieu
582a6fd7e1 feat(backend): enforce unique names and surface duplicate errors 2025-10-13 17:03:36 +02:00
Matthieu
dc4a12440b feat: auto populate machine structures and seed sample data 2025-10-13 09:01:33 +02:00
MatthieuTD
b7682ac312 Expand machine hydration unit coverage 2025-10-09 09:34:50 +02:00
Matthieu
48a74b74d7 refactor: prepare multi-machine inventory associations 2025-10-08 16:23:49 +02:00
MatthieuTD
c23ba3a587 Migrate away from legacy component and piece models 2025-10-02 15:44:02 +02:00
MatthieuTD
44fd4bb8c7 Map seeded component models to type identifiers 2025-10-02 09:33:59 +02:00
MatthieuTD
6f52b27efc Normalize component model structures in industrial seed 2025-10-02 08:19:44 +02:00
MatthieuTD
bd439f6096 Enrich component model templates with BOM guidance 2025-10-01 18:02:06 +02:00
MatthieuTD
099294bb37 Refactor demo seed to use independent machines 2025-10-01 17:46:04 +02:00
MatthieuTD
2a13974125 Revamp demo seed dataset with detailed machines 2025-10-01 16:44:20 +02:00
MatthieuTD
5f77fb25cb feat: add industrial grain demo seed script 2025-10-01 16:12:10 +02:00
MatthieuTD
1a4cedb431 feat: normalize and validate component model structure 2025-10-01 11:47:45 +02:00
Matthieu
f48e7aad30 delete seed file 2025-10-01 11:10:08 +02:00
Matthieu
5306b61dd2 add seed data 2025-09-30 15:58:45 +02:00
Matthieu
5a366595e6 feat: synchronize backend and frontend custom field handling 2025-09-30 15:36:13 +02:00
Matthieu
bd058cd533 feat(custom-fields): allow creating values without predefined field ID 2025-09-30 15:34:06 +02:00
Matthieu
55c57362c5 chore: refresh lockfile metadata 2025-09-29 15:04:58 +02:00
Matthieu
5ce92d2ca4 linter 2025-09-26 08:52:10 +02:00
Matthieu
1727526e89 test: stub prisma modelType delegate 2025-09-26 08:22:01 +02:00
MatthieuTD
b10a6baf47 Refactor types service into modular services and repositories 2025-09-25 16:15:37 +02:00
Matthieu
2ce164784f FIx: delete champs par default 2025-09-25 11:26:22 +02:00
Matthieu
e64fba3ae7 feat: Add Model gestion for piece and component 2025-09-23 15:05:33 +02:00
MatthieuTD
bc225bf3e8 Merge pull request #5 from MatthieuTD/codex/prepare-minimal-context-for-repositories
Fix e2e inventory tests to rely on in-memory Prisma stub
2025-09-22 10:39:20 +02:00
MatthieuTD
af5010bb51 Use spies instead of mock properties in e2e tests 2025-09-22 10:38:08 +02:00
MatthieuTD
ea7efceb57 Merge pull request #4 from MatthieuTD/codex/add-e2e-tests-for-type-creation-and-editing
Add e2e coverage for machine creation flow and CI
2025-09-22 10:24:20 +02:00
MatthieuTD
e8f1fc4700 Merge branch 'master' into codex/add-e2e-tests-for-type-creation-and-editing 2025-09-22 10:24:14 +02:00
MatthieuTD
4ecf6bf3b1 Merge pull request #3 from MatthieuTD/codex/refactor-customfieldscontroller-and-service
Secure custom field value routing
2025-09-22 10:22:56 +02:00
MatthieuTD
6025e526cb Merge pull request #2 from MatthieuTD/codex/exiger-machineid-ou-composantid-dans-dtos
Validate component and piece creation against machine requirements
2025-09-22 10:22:40 +02:00
MatthieuTD
00ddf474a7 Merge branch 'master' into codex/exiger-machineid-ou-composantid-dans-dtos 2025-09-22 10:22:22 +02:00
MatthieuTD
69381a41ba test: add machine creation e2e flow and CI 2025-09-22 10:21:06 +02:00
MatthieuTD
c8cc15c907 feat: secure custom field value routing 2025-09-22 10:20:49 +02:00
MatthieuTD
3a614bab72 Validate component and piece requirements 2025-09-22 10:20:40 +02:00