Compare commits
base: MALIO-DEV/Starseed:edde89bcbae69dbdb5f786eb70e7355bae52018e
MALIO-DEV/Starseed:develop
MALIO-DEV/Starseed:feature/ERP-94-suppliers-new
MALIO-DEV/Starseed:feature/ERP-97-suppliers-i18n-sidebar
MALIO-DEV/Starseed:feature/ERP-93-suppliers-list
MALIO-DEV/Starseed:feature/ERP-116-country-referentiel
MALIO-DEV/Starseed:feature/ERP-88-sous-ressources-m2
MALIO-DEV/Starseed:feature/ERP-89-validators-m2
MALIO-DEV/Starseed:refactor/refonte-contact-suppression-inline-back
MALIO-DEV/Starseed:feat/admin-tables-filter-pagination
MALIO-DEV/Starseed:main
MALIO-DEV/Starseed:v0.1.101
MALIO-DEV/Starseed:v0.1.100
MALIO-DEV/Starseed:v0.1.99
MALIO-DEV/Starseed:v0.1.98
MALIO-DEV/Starseed:v0.1.97
MALIO-DEV/Starseed:v0.1.96
MALIO-DEV/Starseed:v0.1.95
MALIO-DEV/Starseed:v0.1.94
MALIO-DEV/Starseed:v0.1.93
MALIO-DEV/Starseed:v0.1.92
MALIO-DEV/Starseed:v0.1.91
MALIO-DEV/Starseed:v0.1.90
MALIO-DEV/Starseed:v0.1.89
MALIO-DEV/Starseed:v0.1.88
MALIO-DEV/Starseed:v0.1.87
MALIO-DEV/Starseed:v0.1.86
MALIO-DEV/Starseed:v0.1.85
MALIO-DEV/Starseed:v0.1.84
MALIO-DEV/Starseed:v0.1.83
MALIO-DEV/Starseed:v0.1.82
MALIO-DEV/Starseed:v0.1.81
MALIO-DEV/Starseed:v0.1.80
MALIO-DEV/Starseed:v0.1.79
MALIO-DEV/Starseed:v0.1.78
MALIO-DEV/Starseed:v0.1.77
MALIO-DEV/Starseed:v0.1.76
MALIO-DEV/Starseed:v0.1.75
MALIO-DEV/Starseed:v0.1.74
MALIO-DEV/Starseed:v0.1.73
MALIO-DEV/Starseed:v0.1.72
MALIO-DEV/Starseed:v0.1.71
MALIO-DEV/Starseed:v0.1.70
MALIO-DEV/Starseed:v0.1.69
MALIO-DEV/Starseed:v0.1.68
MALIO-DEV/Starseed:v0.1.67
MALIO-DEV/Starseed:v0.1.66
MALIO-DEV/Starseed:v0.1.65
MALIO-DEV/Starseed:v0.1.64
MALIO-DEV/Starseed:v0.1.63
MALIO-DEV/Starseed:v0.1.62
MALIO-DEV/Starseed:v0.1.61
MALIO-DEV/Starseed:v0.1.60
MALIO-DEV/Starseed:v0.1.59
MALIO-DEV/Starseed:v0.1.58
MALIO-DEV/Starseed:v0.1.57
MALIO-DEV/Starseed:v0.1.56
MALIO-DEV/Starseed:v0.1.55
MALIO-DEV/Starseed:v0.1.54
MALIO-DEV/Starseed:v0.1.53
MALIO-DEV/Starseed:v0.1.52
MALIO-DEV/Starseed:v0.1.51
MALIO-DEV/Starseed:v0.1.50
MALIO-DEV/Starseed:v0.1.49
MALIO-DEV/Starseed:v0.1.48
MALIO-DEV/Starseed:v0.1.47
MALIO-DEV/Starseed:v0.1.46
MALIO-DEV/Starseed:v0.1.45
MALIO-DEV/Starseed:v0.1.44
MALIO-DEV/Starseed:v0.1.43
MALIO-DEV/Starseed:v0.1.42
MALIO-DEV/Starseed:v0.1.41
MALIO-DEV/Starseed:v0.1.40
MALIO-DEV/Starseed:v0.1.39
MALIO-DEV/Starseed:v0.1.38
MALIO-DEV/Starseed:v0.1.37
MALIO-DEV/Starseed:v0.1.36
MALIO-DEV/Starseed:v0.1.35
MALIO-DEV/Starseed:v0.1.34
MALIO-DEV/Starseed:v0.1.33
MALIO-DEV/Starseed:v0.1.32
MALIO-DEV/Starseed:v0.1.31
MALIO-DEV/Starseed:v0.1.30
MALIO-DEV/Starseed:v0.1.29
MALIO-DEV/Starseed:v0.1.28
MALIO-DEV/Starseed:v0.1.27
MALIO-DEV/Starseed:v0.1.26
MALIO-DEV/Starseed:v0.1.25
MALIO-DEV/Starseed:v0.1.24
MALIO-DEV/Starseed:v0.1.23
MALIO-DEV/Starseed:v0.1.22
MALIO-DEV/Starseed:v0.1.21
MALIO-DEV/Starseed:v0.1.20
MALIO-DEV/Starseed:v0.1.19
MALIO-DEV/Starseed:v0.1.18
MALIO-DEV/Starseed:v0.1.17
MALIO-DEV/Starseed:v0.1.16
MALIO-DEV/Starseed:v0.1.15
MALIO-DEV/Starseed:v0.1.14
MALIO-DEV/Starseed:v0.1.13
MALIO-DEV/Starseed:v0.1.12
MALIO-DEV/Starseed:v0.1.11
MALIO-DEV/Starseed:v0.1.10
MALIO-DEV/Starseed:v0.1.9
MALIO-DEV/Starseed:v0.1.8
MALIO-DEV/Starseed:v0.1.7
MALIO-DEV/Starseed:v0.1.6
MALIO-DEV/Starseed:v0.1.5
MALIO-DEV/Starseed:v0.1.4
MALIO-DEV/Starseed:v0.1.3
MALIO-DEV/Starseed:v0.1.2
MALIO-DEV/Starseed:v0.1.1
MALIO-DEV/Starseed:v0.1.0
..
compare: MALIO-DEV/Starseed:380b0c9ef10a79be501484f63f37bc633fb0cedf
MALIO-DEV/Starseed:feature/ERP-94-suppliers-new
MALIO-DEV/Starseed:feature/ERP-97-suppliers-i18n-sidebar
MALIO-DEV/Starseed:feature/ERP-93-suppliers-list
MALIO-DEV/Starseed:develop
MALIO-DEV/Starseed:feature/ERP-116-country-referentiel
MALIO-DEV/Starseed:feature/ERP-88-sous-ressources-m2
MALIO-DEV/Starseed:feature/ERP-89-validators-m2
MALIO-DEV/Starseed:refactor/refonte-contact-suppression-inline-back
MALIO-DEV/Starseed:feat/admin-tables-filter-pagination
MALIO-DEV/Starseed:main
MALIO-DEV/Starseed:v0.1.101
MALIO-DEV/Starseed:v0.1.100
MALIO-DEV/Starseed:v0.1.99
MALIO-DEV/Starseed:v0.1.98
MALIO-DEV/Starseed:v0.1.97
MALIO-DEV/Starseed:v0.1.96
MALIO-DEV/Starseed:v0.1.95
MALIO-DEV/Starseed:v0.1.94
MALIO-DEV/Starseed:v0.1.93
MALIO-DEV/Starseed:v0.1.92
MALIO-DEV/Starseed:v0.1.91
MALIO-DEV/Starseed:v0.1.90
MALIO-DEV/Starseed:v0.1.89
MALIO-DEV/Starseed:v0.1.88
MALIO-DEV/Starseed:v0.1.87
MALIO-DEV/Starseed:v0.1.86
MALIO-DEV/Starseed:v0.1.85
MALIO-DEV/Starseed:v0.1.84
MALIO-DEV/Starseed:v0.1.83
MALIO-DEV/Starseed:v0.1.82
MALIO-DEV/Starseed:v0.1.81
MALIO-DEV/Starseed:v0.1.80
MALIO-DEV/Starseed:v0.1.79
MALIO-DEV/Starseed:v0.1.78
MALIO-DEV/Starseed:v0.1.77
MALIO-DEV/Starseed:v0.1.76
MALIO-DEV/Starseed:v0.1.75
MALIO-DEV/Starseed:v0.1.74
MALIO-DEV/Starseed:v0.1.73
MALIO-DEV/Starseed:v0.1.72
MALIO-DEV/Starseed:v0.1.71
MALIO-DEV/Starseed:v0.1.70
MALIO-DEV/Starseed:v0.1.69
MALIO-DEV/Starseed:v0.1.68
MALIO-DEV/Starseed:v0.1.67
MALIO-DEV/Starseed:v0.1.66
MALIO-DEV/Starseed:v0.1.65
MALIO-DEV/Starseed:v0.1.64
MALIO-DEV/Starseed:v0.1.63
MALIO-DEV/Starseed:v0.1.62
MALIO-DEV/Starseed:v0.1.61
MALIO-DEV/Starseed:v0.1.60
MALIO-DEV/Starseed:v0.1.59
MALIO-DEV/Starseed:v0.1.58
MALIO-DEV/Starseed:v0.1.57
MALIO-DEV/Starseed:v0.1.56
MALIO-DEV/Starseed:v0.1.55
MALIO-DEV/Starseed:v0.1.54
MALIO-DEV/Starseed:v0.1.53
MALIO-DEV/Starseed:v0.1.52
MALIO-DEV/Starseed:v0.1.51
MALIO-DEV/Starseed:v0.1.50
MALIO-DEV/Starseed:v0.1.49
MALIO-DEV/Starseed:v0.1.48
MALIO-DEV/Starseed:v0.1.47
MALIO-DEV/Starseed:v0.1.46
MALIO-DEV/Starseed:v0.1.45
MALIO-DEV/Starseed:v0.1.44
MALIO-DEV/Starseed:v0.1.43
MALIO-DEV/Starseed:v0.1.42
MALIO-DEV/Starseed:v0.1.41
MALIO-DEV/Starseed:v0.1.40
MALIO-DEV/Starseed:v0.1.39
MALIO-DEV/Starseed:v0.1.38
MALIO-DEV/Starseed:v0.1.37
MALIO-DEV/Starseed:v0.1.36
MALIO-DEV/Starseed:v0.1.35
MALIO-DEV/Starseed:v0.1.34
MALIO-DEV/Starseed:v0.1.33
MALIO-DEV/Starseed:v0.1.32
MALIO-DEV/Starseed:v0.1.31
MALIO-DEV/Starseed:v0.1.30
MALIO-DEV/Starseed:v0.1.29
MALIO-DEV/Starseed:v0.1.28
MALIO-DEV/Starseed:v0.1.27
MALIO-DEV/Starseed:v0.1.26
MALIO-DEV/Starseed:v0.1.25
MALIO-DEV/Starseed:v0.1.24
MALIO-DEV/Starseed:v0.1.23
MALIO-DEV/Starseed:v0.1.22
MALIO-DEV/Starseed:v0.1.21
MALIO-DEV/Starseed:v0.1.20
MALIO-DEV/Starseed:v0.1.19
MALIO-DEV/Starseed:v0.1.18
MALIO-DEV/Starseed:v0.1.17
MALIO-DEV/Starseed:v0.1.16
MALIO-DEV/Starseed:v0.1.15
MALIO-DEV/Starseed:v0.1.14
MALIO-DEV/Starseed:v0.1.13
MALIO-DEV/Starseed:v0.1.12
MALIO-DEV/Starseed:v0.1.11
MALIO-DEV/Starseed:v0.1.10
MALIO-DEV/Starseed:v0.1.9
MALIO-DEV/Starseed:v0.1.8
MALIO-DEV/Starseed:v0.1.7
MALIO-DEV/Starseed:v0.1.6
MALIO-DEV/Starseed:v0.1.5
MALIO-DEV/Starseed:v0.1.4
MALIO-DEV/Starseed:v0.1.3
MALIO-DEV/Starseed:v0.1.2
MALIO-DEV/Starseed:v0.1.1
MALIO-DEV/Starseed:v0.1.0
18 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
380b0c9ef1 |
test(commercial) : SupplierExportControllerTest sur base fournisseurs (catégories FOURNISSEUR, dédup F3) (ERP-113)
Fait étendre SupplierExportControllerTest à AbstractSupplierApiTestCase au
lieu d'AbstractCommercialApiTestCase. Supprime le seedSupplier() privé (qui
seedait des catégories de type CLIENT via createCategory(), violant RG-2.10)
et le tearDown() redondant, désormais portés par la base sur des catégories
FOURNISSEUR.
Le contact principal utilise le helper addContact() de la base ; le téléphone
secondaire, non porté par ce helper, est posé via le setter sur le contact
retourné. L'assertion de la colonne Catégories dérive le libellé attendu de
supplierCategory('NEGOCIANT') au lieu de hardcoder le préfixe de nom de test.
|
||
|
|
1343c1b797 |
test(commercial) : fix CI anti-N+1 (profiling test) + durcissement 422/gating M2 fournisseurs (ERP-92)
- config/packages/test/doctrine.yaml : force dbal profiling en test pour que doctrine.debug_data_holder existe sous APP_DEBUG=0 (CI). Le test anti-N+1 SupplierListTest passait en local (debug=1) mais cassait en CI. - RBACMatrix/SupplierApi : les 422 RG-2.03 et RG-2.14 assertent desormais le propertyPath / message (plus seulement le code) — un 422 orthogonal ne peut plus faire passer le test. - RBACMatrix : gating bureau/commerciale verifie l'ensemble des champs comptables (accountNumber/nTva/tvaMode/paymentType), plus seulement siren/ribs. - violationsByPath() mutualise dans AbstractSupplierApiTestCase (dedup). |
||
|
|
2a17e9c45c |
test(commercial) : tests PHPUnit M2 fournisseurs (matrice RG + contrat sérialisation + DoD JSON réel) (ERP-92)
Suite fonctionnelle M2 assertant sur le CORPS JSON (jamais les annotations),
jumelle de la suite clients M1 :
- contrat de sérialisation : 4 régressions M1 re-testées (RIB gaté absent pour
Commerciale, booléens triageProvider/isArchived présents, embed
categories[].code/name, embed sites[].name/postalCode objet) + enveloppe AP4
(member/totalItems/view, archivés exclus) + suppression du contact inline ;
- matrice RBAC réelle (app:seed-rbac) bureau/compta/commerciale/usine 200/403,
gating accounting par omission de clé, mode strict PATCH (RG-2.16) ;
- RG-2.03/2.04/2.05/2.06/2.07/2.08/2.09/2.10/2.11/2.12/2.14/2.15/2.17 ;
- sous-ressources contacts/adresses/ribs (CRUD, sécurité, normalisation) ;
- anti N+1 liste (compte de requêtes constant), audit Supplier + RIB iban/bic.
Fix de contrat découvert et corrigé (sinon DoD figée sur un contrat faux) :
les référentiels comptables (TvaMode/PaymentType/PaymentDelay/Bank) ne portaient
que le groupe client:read:accounting (M1) → sur un fournisseur ils sortaient en
IRI nu. Ajout de supplier:read:accounting → objet {id, code, label} embarqué.
makefile : test-db-setup recrée l'index partiel uq_supplier_company_name_active
(droppé par schema:update comme pour le client) — oubli M2.
DoD § 4.0.bis : réponses JSON RÉELLES (liste + détail admin/commerciale) collées,
capturées via SupplierSerializationContractTest.
|
||
|
|
b35deed8fe |
feat(commercial) : fixtures Doctrine fournisseurs (≈13 suppliers complets + sous-collections) (ERP-112) (#72)
Auto Tag Develop / tag (push) Successful in 6s
## ERP-112 — Fixtures Doctrine fournisseurs (M2) `SupplierFixtures` (calquée sur `ClientFixtures` / ERP-68) : ~13 fournisseurs de démonstration couvrant les cas pivots du répertoire fournisseurs (M2), chargés par `make db-reset`. ### Contenu - **13 fournisseurs** (dont **2 archivés** — RG-2.17), `companyName` variés (UPPERCASE serveur), mono et multi-catégories de type FOURNISSEUR (RG-2.10). - **19 contacts** (1 à 3 par fournisseur, dont un avec téléphone secondaire et un nommé par le seul nom — RG-2.04). - **15 adresses** multi-types PROSPECT / DEPART / RENDU (RG-2.09) et multi-sites 86/17/82 (RG-2.06), avec `bennes` et `triageProvider`. - **3 RIB**, compta complète sur une partie (siren, tvaMode, paymentDelay, paymentType). ### Cas pivots - VIREMENT → banque renseignée (RG-2.07) ; LCR → 1 puis 2 RIB (RG-2.08) ; CHEQUE et NON_SOUMISE sans RIB. - Onglet Information complet (dont `volumeForecast`, spécifique fournisseur). - Cohérence gating comptable (un rôle sans `accounting.view` ne voit pas la compta) — support des tests ERP-92 et du golden path front. ### Notes - **Idempotent** (lookup par companyName normalisé, aligné sur `uq_supplier_company_name_active`) ; rejouable sans doublon même purger désactivé. - Référentiels comptables **réutilisés de M1** (tva_modes / payment_delays / payment_types / banks) — aucune nouvelle table. - Données de démonstration **dev uniquement** : early return en env `test` (les tests seedent leurs propres données). ### Vérifications - `make db-reset` : 13 fournisseurs (2 archivés), 19 contacts, 15 adresses, 3 RIB chargés sans erreur. - Idempotence `--append` : compteurs inchangés. - `make php-cs-fixer-allow-risky` : 0 fichier à corriger. - `make test` : 574 tests OK. Base : `feature/ERP-92-tests-phpunit-m2` (sommet de la pile M2). --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #72 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
6f9bb68170 |
test(commercial) : tests PHPUnit M2 fournisseurs (matrice RG + contrat sérialisation + DoD JSON réel) (ERP-92) (#71)
Auto Tag Develop / tag (push) Successful in 7s
## ERP-92 — Tests PHPUnit M2 fournisseurs (#521) Suite fonctionnelle M2 assertant sur le **corps JSON** (jamais les annotations), jumelle de la suite clients M1. ### Couverture - **Contrat de sérialisation** (`SupplierSerializationContractTest`) : 4 régressions M1 re-testées — RIB gaté **absent** pour la Commerciale, booléens `triageProvider`/`isArchived` présents, embed `categories[].code/name`, embed `sites[].name/postalCode` (objet, pas IRI) — + enveloppe AP4 (`member`/`totalItems`/`view`, archivés exclus) + suppression du contact inline. - **Matrice RBAC réelle** (`app:seed-rbac`, pas de mock) : bureau/compta/commerciale/usine 200/403, gating `accounting` par **omission de clé**, mode strict PATCH (RG-2.16). - **Matrice RG-2.03 → RG-2.17** (création, normalisation RG-2.12, catégorie FOURNISSEUR RG-2.10, unicité RG-2.11, archivage RG-2.14/2.15, RG-2.07/2.08 compta, sous-ressources RG-2.04/2.05/2.06/2.09). - **Anti N+1 liste** : nombre de requêtes constant entre 2 et 4 fournisseurs. **Audit** Supplier + RIB (`iban`/`bic` dans le diff). ### Fix de contrat (découvert par la DoD) Les référentiels comptables (`TvaMode`/`PaymentType`/`PaymentDelay`/`Bank`) ne portaient que `client:read:accounting` (M1) → sur un fournisseur ils sortaient en **IRI nu**. Ajout de `supplier:read:accounting` → objet `{id, code, label}` embarqué (additif, zéro impact M1). Sans ce fix, #95/#96 auraient été développés contre un contrat faux. ### Infra `makefile` : `test-db-setup` recrée l'index partiel `uq_supplier_company_name_active` (droppé par `schema:update` comme celui du client — oubli M2). ### DoD ✅ § 4.0.bis : réponses JSON **réelles** (liste + détail admin/commerciale) collées. Front #93→#96 peuvent démarrer. ### Vérifs - `make test` : **574 tests OK** (suite complète verte) - `make php-cs-fixer-allow-risky` : 0 correction --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #71 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
97459e798f |
feat(commercial) : export XLSX fournisseurs (ERP-91) (#70)
Auto Tag Develop / tag (push) Successful in 7s
Export XLSX du répertoire fournisseurs (spec-back M2 § 4.6), jumeau de l'export client M1. **Stack : cible `feature/ERP-90-rbac-fournisseurs`** (ERP-84→91 non encore mergés dans develop).
## Périmètre
- **`SupplierExportController`** avec `#[Route(priority: 1)]` (anti-conflit API Platform `{id}`) + `is_granted('commercial.suppliers.view')`.
- Mêmes filtres que la liste (`includeArchived`/`archivedOnly`/`search`/`categoryCode`/`siteId`) via `createListQueryBuilder()` partagé avec le `SupplierProvider` ; non archivés par défaut.
- Colonnes : Nom fournisseur, **Contact principal** (Nom + Prénom du `SupplierContact` de plus petit `position`, ERP-106), Tél principal, Tél secondaire, Email, Catégories (CSV), Sites (CSV), **SIREN omis sans `accounting.view`**, Date de création.
- Fichier `repertoire-fournisseurs-{YYYYMMDD}.xlsx`.
- **`hydrateContacts()`** ajouté au repository : chargement batché des contacts en une requête `IN` (anti-N+1). Méthode dédiée à l'export — la liste paginée n'embarque pas les contacts, on ne lui impose pas ce coût.
## Correctif hors-périmètre (signalé)
Tables `supplier*` ajoutées à `ColumnCommentsCatalog` : leurs `COMMENT ON COLUMN` (posés par la migration ERP-85) étaient dropés par le `schema:update --force` du `test-db-setup` et non restaurés (catalogue = source rejouée par `app:apply-column-comments`), cassant `ColumnsHaveSqlCommentTest` dès un re-setup de la base de test. Trou laissé par ERP-85/86, vert tant que personne ne re-setup la base.
## Tests
- `SupplierExportControllerTest` (9 cas) : réponse/filename, exclusion archives, filtre search, contact principal, colonnes catégories/sites, gating SIREN avec/sans `accounting.view`, 403, 401.
- `make test` : 508 tests / 2035 assertions, 0 échec. `php-cs-fixer` clean.
---------
Co-authored-by: Matthieu <contact@malio.fr>
Reviewed-on: #70
Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr>
Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr>
|
||
|
|
58cbfe4437 |
feat(commercial) : RBAC fournisseurs (permissions + 3 sources + seed par rôle + sécurité référentiels) (ERP-90) (#69)
Auto Tag Develop / tag (push) Successful in 6s
ERP-90 — Étape 3/7 M2 fournisseurs (stack sur ERP-89). ## Périmètre - **5 permissions** `commercial.suppliers.*` (view / manage / accounting.view / accounting.manage / archive) dans `CommercialModule::permissions()`. - **3 sources RBAC synchronisées** (règle ABSOLUE n°8, même commit) : - `config/sidebar.php` — item `/suppliers` + `commercial.suppliers.view` - `frontend/tests/e2e/_fixtures/personas.ts` — persona `user-full` - `SeedE2ECommand.php` — miroir back - **Assignation par rôle** dans `RbacSeeder::MATRIX` (§ 2.9, idempotent) : - Bureau : view + manage - Compta : view + accounting.view + accounting.manage - Commerciale : view + manage - Usine : aucune - archive : Admin seul - **Sécurité des référentiels** (`tva_modes` / `payment_delays` / `payment_types` / `banks`) élargie : `view client OR view fournisseur` (§ 4.7). ## Vérifications - `app:sync-permissions` (+5) et `app:seed-rbac --with-demo-users` (idempotent) OK - `make test` : 499 tests verts - `make php-cs-fixer-allow-risky` : 0 fix - `make nuxt-test` : 234 tests verts --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #69 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
54091be60e | chore: bump version to v0.1.89 | ||
|
|
e265a008bc |
feat(commercial) : validators M2 fournisseurs (RG-2.03/2.07/2.08/2.10) (ERP-89) (#68)
Auto Tag Develop / tag (push) Successful in 7s
Étape 4/7 du M2 fournisseurs — stackée sur #67 (ERP-88). ## Périmètre (RG-2.03 / 2.07 / 2.08 / 2.10) Décision figée ERP-89 : les RG inter-champs passent par `Assert\Callback` + `->atPath()` sur l'entité Supplier (et non dans le Processor), pour que chaque 422 porte un `propertyPath` consommable par `extractApiViolations` (mapping inline, pas un toast — ERP-101). - **RG-2.10** — `Supplier::validateCategoryType()` → `atPath('categories')` : catégories de type FOURNISSEUR uniquement sur `supplier.categories` (miroir d'ERP-88 côté adresse). - **RG-2.07** — `Supplier::validatePaymentTypeConsistency()` → `atPath('bank')` : VIREMENT impose une banque. - **RG-2.08** — même Callback → `atPath('ribs')` : LCR impose ≥ 1 RIB (le 409 sur DELETE du dernier RIB en LCR reste porté par ERP-88). - **RG-2.03** — `SupplierInformationCompletenessValidator` (8 champs Information dont `volumeForecast`), invoqué par le `SupplierProcessor` après détection back du rôle Commerciale via `BusinessRoleAwareInterface`. Le Processor ne porte que rôle / mode strict / gating. ## Tests (16, verts) - `SupplierValidationTest` — Callbacks RG-2.07/2.08/2.10, assertion par propertyPath. - `SupplierInformationCompletenessValidatorTest` — complétude / champs manquants / zéros valides. - `SupplierProcessorTest` — détection rôle RG-2.03 (POST + PATCH main-only + non-Commerciale). `make test` : 499 tests OK. `php-cs-fixer` : clean. --------- Co-authored-by: admin malio <malio@yuno.malio.fr> Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #68 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
145d4362db |
feat(commercial) : sous-ressources M2 fournisseurs (contacts/adresses/ribs) (ERP-88) (#67)
Auto Tag Develop / tag (push) Successful in 7s
## ERP-88 — Sous-ressources M2 (contacts / adresses / ribs) Étape 4/7 du pipeline M2. Dépend de #86 (entités) et #87 (Provider/Processor). Bloque #92. ### Contenu Opérations API Platform + Processors d'écriture des sous-collections du fournisseur (POST/PATCH/DELETE + GET unitaire). **SupplierContactProcessor** - Rattachement au fournisseur parent (404 si absent). - Normalisation serveur RG-2.12 (Title Case nom/prénom, téléphones chiffres seuls, email lowercase). - RG-2.04 : firstName **ou** lastName obligatoire (422 sur `firstName`). - DELETE libre (RG-2.13 front-driven : collection peut rester vide côté back). **SupplierAddressProcessor** - Rattachement au fournisseur parent. - RG-2.05 (CP `^[0-9]{4,5}$`), RG-2.06 (≥1 site), RG-2.09 (type d'adresse) portées par les contraintes d'entité (ERP-86). - RG-2.10 (catégorie de type FOURNISSEUR) ajoutée via `Assert\Callback validateCategoryType` (propertyPath=`categories`). **SupplierRibProcessor** - Rattachement au fournisseur parent. - RG-2.08 : refus du DELETE du dernier RIB quand `paymentType.code = LCR` → **409**. ### Security différenciée | Sous-ressource | Écriture | Lecture | |---|---|---| | contacts / adresses | `commercial.suppliers.manage` | `commercial.suppliers.view` | | ribs | `commercial.suppliers.accounting.manage` | `commercial.suppliers.accounting.view` | POST en `read:false` (parent rattaché manuellement) — parade NonUniqueResult héritée du M1. Messages FR (ERP-107) + `violations[].propertyPath` aligné (ERP-101). ### Vérifications - `make php-cs-fixer-allow-risky` : 0 fichier à corriger - `make test` : 483 tests OK - `debug:router` : 12 routes générées (4 par sous-ressource) ### Hors périmètre (tickets suivants) - Déclaration RBAC `commercial.suppliers.*` dans `CommercialModule` (#7) — sans elle, l'accès reste 403. - Tests fonctionnels de la matrice RG (#8) — dépendent du RBAC + fixtures Supplier. ### Notes de review (non bloquantes, alignées M1) - `position` des sous-collections non exposé à l'API (décision ERP-86, géré serveur). - M2M `SupplierAddress.contacts` non vérifié same-supplier — comportement identique au M1 (ClientAddress), à traiter globalement si besoin. --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #67 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
cd36c45b67 | chore: bump version to v0.1.87 | ||
|
|
e77c6378d3 |
feat(commercial) : SupplierProvider + SupplierProcessor + gating compta (ERP-87) (#66)
Auto Tag Develop / tag (push) Successful in 7s
## ERP-87 — Provider + Processor du répertoire fournisseurs (M2) Étape 3/7 du pipeline M2. Dépend de #86, bloque #88/#91/#92. Jumelle du M1 (Client*). ### Livré - **SupplierProvider** : liste paginée (Paginator ORM), exclusion archivés + soft-deletes par défaut, filtres `includeArchived`/`categoryCode`/`siteId`/`search`, échappatoire `?pagination=false`, item 404 si soft-delete (RG-2.17). - **SupplierProcessor** : normalisation `companyName`, archivage `isArchived`/`archivedAt` (RG-2.14/2.15), gating fin accounting/manage en **mode strict** (403 sur tout payload hors-permission, RG-2.16), 409 doublon `companyName` + conflit de restauration (RG-2.11). - **SupplierReadGroupContextBuilder** : ajoute `supplier:read:accounting` au contexte de lecture si `accounting.view` → gating compta + RIB **par omission de clé** (parade bug #4 M1). Un Provider ne pouvant pas influencer les groupes de sérialisation, c'est le point d'extension idiomatique (miroir de `ClientReadGroupContextBuilder`). - **SupplierFieldNormalizer** : normalisation serveur (RG-2.12). - **Supplier** : ajout `#[ApiResource]` (GetCollection/Get/Post/Patch) wirant Provider/Processor. ### Décision d'archi La spec décrit « le Provider retire le groupe accounting » — techniquement impossible (le Provider ne touche pas les groupes de sérialisation). Implémenté via décorateur `SerializerContextBuilder` (mirror M1), résultat fonctionnel identique (clé absente sans permission). ### Hors périmètre (ticket suivant #5) Validators métier : RG-2.03 (complétude Information Commerciale), RG-2.07 (Virement→banque), RG-2.08 (LCR→RIB), RG-2.10 (catégorie type FOURNISSEUR). Le Processor est structuré pour les accueillir. ### À noter Les permissions `commercial.suppliers.*` (référencées par les `security`) ne sont pas encore déclarées — ticket RBAC #7. Sans elles, `is_granted` renvoie `false` (pas d'erreur de compilation). ### Vérifs - `make test` : 483/483 vert - `make php-cs-fixer-allow-risky` : appliqué --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #66 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
3e138e1c17 | chore: bump version to v0.1.86 | ||
|
|
6a01067746 |
feat(commercial) : entités + repositories M2 fournisseurs (ERP-86) (#65)
Auto Tag Develop / tag (push) Successful in 7s
## ERP-86 — Entités + Repositories M2 Fournisseurs (étape 2/7) PR **empilée sur ERP-85** (#64) : ne contient que le commit ERP-86. À merger après #64 (la base rebascule automatiquement au fil des merges de la chaîne #63 → #64 → develop). Dépend de #64 (migration BDD). Bloque #87 (Provider + Processor) et suivants. ### Contenu 4 entités jumelles du M1 `Client*`, mapping ORM aligné **exactement** sur la migration ERP-85 (noms, types, longueurs, FK, M2M, index), **sans contact inline** (ERP-106) : - **`Supplier`** — `#[Auditable]` + Timestampable/Blamable. Formulaire principal, onglet Information (+ `volumeForecast`, spécifique fournisseur), onglet Comptabilité (FK référentiels M1 partagés), archivage (`isArchived`/`archivedAt`), soft-delete préparé. Catégories M2M via `CategoryInterface` (règle n°1, pas d'import inter-module). Pas de `distributor`/`broker`. - **`SupplierContact`** — onglet Contacts (RG-2.04 : `firstName` OU `lastName`). - **`SupplierAddress`** — enum `addressType` (`PROSPECT`/`DEPART`/`RENDU` via `Assert\Choice`), `bennes`, `triageProvider` ; M2M sites/contacts/categories. - **`SupplierRib`** — RIB, embed gaté comptable. - **Repositories** : interfaces `Domain/Repository/` + impls `Infrastructure/Doctrine/`. ### Points clés - **Contrat de sérialisation (RETEX M1, 3 maillons posés sur l'entité)** : read-groups sur les propriétés ; getters `isArchived()` / `isTriageProvider()` avec `#[Groups]` + `#[SerializedName('isX')]` (parade piège booléen n°3) ; embed `contacts`/`addresses` (`supplier:item:read`) et `ribs` (`supplier:read:accounting`). `getSites()` agrège/dédoublonne les `Site` des adresses (`name`/`postalCode`, pas de `code`). - **Fetch-joins anti-N+1** dans le **repository de liste** : `hydrateListCollections()` en 2 passes (`categories`, puis `addresses.sites`) — évite le produit cartésien (pattern ERP-100). Filtres : recherche `companyName` + contacts liés (D1), `categoryCode`, `siteId`, archivage. - **Pas d'`#[ApiResource]`** : Provider/Processor (gating accounting, archivage, mode strict) sont au ticket **ERP-87**. L'ajouter ici référencerait des classes inexistantes → boot/tests cassés. Les groupes de lecture/écriture sont déjà en place ; le `normalizationContext` viendra avec #87. - **Validation FR (ERP-107)** : messages FR sur toutes les contraintes ; `Assert\Length(max)` calé sur les colonnes. Garde-fou `EntityConstraintsHaveFrenchMessageTest` étendu : `Assert\Choice` ajouté au mapping ; `addressType` et `postalCode` whitelistés du miroir Length (déjà bornés par Choice / Regex). - Clés i18n `audit.entity.commercial_supplier*` ajoutées (garde-fou `AuditableEntitiesHaveI18nLabelTest`). ### Vérifications - `make test` : **483/483 OK** (1965 assertions). - `make php-cs-fixer-allow-risky` : 0 correction. - `doctrine:schema:validate` : mapping correct (bruit d'index FK cosmétique identique au M1 `client`). --------- Co-authored-by: admin malio <malio@yuno.malio.fr> Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #65 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
cd98817b0a | chore: bump version to v0.1.85 | ||
|
|
1a29bcf76c |
feat(commercial) : migration BDD M2 fournisseurs (supplier + sous-collections + M2M) (ERP-85) (#64)
Auto Tag Develop / tag (push) Successful in 7s
## ERP-85 — Migration BDD M2 Fournisseurs (étape 1/7) PR **empilée sur ERP-84** (#63) : ne contient que le commit ERP-85. À merger après #63 (la base rebascule sur develop automatiquement au merge de #63). ### Contenu Migration `Version20260605130000.php` (namespace racine `DoctrineMigrations`) — schéma M2 sous le module Commercial, jumeau du M1 client. **8 tables** : `supplier`, `supplier_category` (M2M), `supplier_contact`, `supplier_address`, `supplier_address_site` / `_contact` / `_category` (3 M2M), `supplier_rib`. **Spécificités M2 (vs M1 client)** - `supplier` **sans contact inline** (ERP-106) ni auto-référence distributor/broker ; ajout `volume_forecast`. - `supplier_address` : enum `address_type` `CHECK (PROSPECT|DEPART|RENDU)`, `bennes` + `triage_provider`, **pas** de `billing_email`. - Index partiel unique `uq_supplier_company_name_active` (nom seul, hors archives/soft-delete). **Réutilisations (zéro duplication)** : référentiels comptables M1 (`tva_mode`/`payment_delay`/`payment_type`/`bank`) + `CategoryType FOURNISSEUR` (seedé par ERP-84). Pas de re-seed. **Conventions** : `COMMENT ON COLUMN` sur chaque colonne (règle n°12) + helper Timestampable/Blamable ; namespace racine (FK cross-module, exception règle n°11). ### Vérifications - `make db-reset` ✅ de bout en bout (aucune erreur FK) - `make test` ✅ 483 tests OK (`ColumnsHaveSqlCommentTest` vert, 0 colonne sans commentaire) - `make php-cs-fixer-allow-risky` ✅ 0 fichier à corriger Bloque : #86 (entités `Supplier*` + ApiResource). --------- Co-authored-by: admin malio <malio@yuno.malio.fr> Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #64 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
da343464c6 | chore: bump version to v0.1.84 | ||
|
|
0b33bcb0f2 |
feat(catalog) : taxonomie FOURNISSEUR (type + filtre ?typeCode= + seed) (ERP-84) (#63)
Auto Tag Develop / tag (push) Successful in 8s
## ERP-84 — Taxonomie FOURNISSEUR (Catalog) Prérequis du multi-select « Catégorie » de l'écran Ajouter fournisseur (#94) et de #92. Spec : `docs/specs/M2-suppliers/spec-back.md` § 2.4 + § 4.7. ### Contexte ERP-78 avait unifié la taxonomie sur un **type unique CLIENT** ; `GET /api/categories?typeCode=FOURNISSEUR` renvoyait alors les catégories CLIENT (filtre **ignoré**, un seul `CategoryType`). Le filtre `?typeCode=` n'existait pas en prod. ### Changements - **Filtre `?typeCode=` réel** sur `GET /api/categories` : `CategoryProvider` lit le filtre (même pattern que `includeDeleted`) et le passe à `DoctrineCategoryRepository::createListQueryBuilder`, qui joint le `CategoryType` et filtre sur son `code`. N'altère pas l'échappatoire `?pagination=false` ni la pagination Hydra. - **CategoryType FOURNISSEUR recréé** : migration racine `Version20260605120000` (`INSERT … ON CONFLICT` pour le type + 5 catégories de démo en `NOT EXISTS` : Négociant, Coopérative, Producteur, Grossiste, Importateur). Aucune colonne créée → pas de `COMMENT ON COLUMN`. - **Fixtures étendues** : `CategoryTypeFixtures` + `CategoryFixtures` seedent FOURNISSEUR de façon idempotente (survit à `make db-reset`). - **Test** : `CategoryTypeCodeFilterTest` (filtre exclusif, compat pagination Hydra, code inexistant → liste vide). ### Vérifications - `make php-cs-fixer-allow-risky` : clean. - `make test` : **483 tests OK** (1844 assertions). - Après `make db-reset` : - `/api/category_types` → `CLIENT` + `FOURNISSEUR`. - `?typeCode=FOURNISSEUR` → uniquement les 5 catégories FOURNISSEUR. - `?typeCode=CLIENT` → 11 catégories, type unique CLIENT. ### Critères d'acceptation - [x] `CategoryType` FOURNISSEUR présent après `make db-reset`. - [x] `?typeCode=FOURNISSEUR` ne renvoie QUE les catégories FOURNISSEUR. - [x] Catégories fournisseurs seedées sous ce type. - [x] `make test` vert. --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #63 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
1 changed files with 1 additions and 1 deletions
+1
-1
@@ -1,2 +1,2 @@
|
||||
parameters:
|
||||
app.version: '0.1.83'
|
||||
app.version: '0.1.89'
|
||||
|
||||
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.