Matthieu
|
e88bb059e6
|
feat(logistique) : pesée pont bascule stub + allocateur DSD + endpoint (ERP-184)
- WeighbridgeReaderInterface (contrat) + RandomWeighbridgeReader (stub,
poids aléatoire ∈ [10000,50000] kg, RG-5.06) + WeighbridgeUnavailableException
- DsdAllocator : compteur DSD par site (weighbridge_dsd_counter) incrémenté
sous verrou ligne SELECT ... FOR UPDATE (RG-5.04, § 2.7)
- endpoint POST /api/weighbridge_readings : ressource virtuelle
WeighbridgeReadingResource + WeighbridgeReadingProcessor (pas de controller)
- AUTO -> {weight, dsd, mode} ; MANUAL -> {weight, dsd, manualNumber, mode}
- WeighbridgeUnavailableException -> HTTP 503 explicite (RG-5.06)
- site courant via CurrentSiteProviderInterface (contrat Sites)
- is_granted('logistique.weighing_tickets.manage')
- dsd renvoyé prévisionnel : attribution autoritaire refaite à la création
du ticket (ERP-185)
- tests : WeighbridgeReaderStubTest, DsdAllocatorTest, processor (503/400),
WeighbridgeReadingApiTest (RBAC + AUTO/MANUAL + 422)
|
2026-06-18 14:37:16 +02:00 |
|
Matthieu
|
312c119c06
|
feat(logistique) : entité WeighingTicket + dette site.code (ERP-183)
Entité WeighingTicket
- Entité métier complète (#[Auditable], TimestampableBlamableTrait, relations
ORM Client/Supplier/Site) + contrat de sérialisation à 3 maillons
(weighing_ticket:read / :item:read + contextes par opération).
- Getters calculés displayDate et plateFreeFormat (#[SerializedName]),
sécurité view/manage, pas de Delete/archive.
- Validation #[Assert\*] messages FR + #[Assert\Callback] RG-5.03 (->atPath()),
libellé i18n audit.entity.logistique_weighingticket.
- Repository : interface Domain + DoctrineWeighingTicketRepository
(recherche + tri number DESC, deletedAt IS NULL).
Dette site.code
- Site.code mappé VARCHAR(8) (groupes read/write), dérivation auto au
PrePersist (2 premiers chiffres du CP), UniqueConstraint uq_site_code.
- Migration Version20260617160000 : ALTER COLUMN code SET NOT NULL + COMMENT.
- Fixtures (codes 86/17/82) et SiteApiTest ajustés.
Câblage
- doctrine.yaml : mapping ORM du module Logistique (absent du scaffold ERP-181).
- ColumnCommentsCatalog : site.code + table weighing_ticket.
Specs M5 versionnées (spec-back / spec-front / prompts).
|
2026-06-18 14:37:16 +02:00 |
|
Matthieu
|
c63a5f971f
|
feat(logistique) : scaffold module + socle RBAC tickets de pesée (ERP-181)
Pull Request — Quality gate / Backend (PHP CS + PHPUnit) (pull_request) Successful in 3m12s
Pull Request — Quality gate / Frontend (lint + Vitest + build) (pull_request) Successful in 1m44s
Nouveau module Logistique (M5), sans entité ni migration (ticket 1.2) :
- LogistiqueModule (ID logistique, permissions weighing_tickets.view/manage)
enregistré dans config/modules.php
- layer front frontend/modules/logistique (auto-détecté)
- sidebar : section Logistique + item /weighing-tickets (gate ...view)
+ clés i18n sidebar.logistique.*
- 3 miroirs RBAC alignés : sidebar.php, personas.ts (user-full),
SeedE2ECommand (user-full)
- matrice métier RbacSeeder : Bureau + Usine = view/manage ;
Compta + Commerciale = aucun accès (spec § 5.2)
|
2026-06-18 14:36:05 +02:00 |
|