From 29aa9b352ddd3cad3a0a58227ee97ccf571f5786 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 18 Jun 2026 15:53:25 +0200 Subject: [PATCH 01/32] fix(front) : pagination par defaut a 25 sur les repertoires (ERP-193) --- .../composables/__tests__/useClientsRepository.spec.ts | 10 +++++----- .../__tests__/useSuppliersRepository.spec.ts | 10 +++++----- .../commercial/composables/useClientsRepository.ts | 3 ++- .../commercial/composables/useSuppliersRepository.ts | 3 ++- .../__tests__/useProvidersRepository.test.ts | 2 +- .../technique/composables/useProvidersRepository.ts | 3 ++- .../__tests__/useCarriersRepository.test.ts | 2 +- .../transport/composables/useCarriersRepository.ts | 3 ++- 8 files changed, 20 insertions(+), 16 deletions(-) diff --git a/frontend/modules/commercial/composables/__tests__/useClientsRepository.spec.ts b/frontend/modules/commercial/composables/__tests__/useClientsRepository.spec.ts index 71e505e..0c3f194 100644 --- a/frontend/modules/commercial/composables/__tests__/useClientsRepository.spec.ts +++ b/frontend/modules/commercial/composables/__tests__/useClientsRepository.spec.ts @@ -25,8 +25,8 @@ function makeHydra(total: number): HydraCollection { describe('useClientsRepository', () => { beforeEach(() => { mockGet.mockReset() - // 25 items → 3 pages a 10/page : permet de tester la navigation page 2. - mockGet.mockResolvedValue(makeHydra(25)) + // 60 items → 3 pages a 25/page : permet de tester la navigation page 2. + mockGet.mockResolvedValue(makeHydra(60)) }) it('cible la ressource /clients en page 1 par defaut', async () => { @@ -35,7 +35,7 @@ describe('useClientsRepository', () => { expect(mockGet).toHaveBeenLastCalledWith( '/clients', - { page: 1, itemsPerPage: 10 }, + { page: 1, itemsPerPage: 25 }, expect.objectContaining({ toast: false }), ) }) @@ -65,7 +65,7 @@ describe('useClientsRepository', () => { 'siteId[]': ['1', '2'], archivedOnly: true, page: 1, - itemsPerPage: 10, + itemsPerPage: 25, }, expect.objectContaining({ toast: false }), ) @@ -78,7 +78,7 @@ describe('useClientsRepository', () => { expect(mockGet).toHaveBeenLastCalledWith( '/clients', - { page: 1, itemsPerPage: 10 }, + { page: 1, itemsPerPage: 25 }, expect.objectContaining({ toast: false }), ) }) diff --git a/frontend/modules/commercial/composables/__tests__/useSuppliersRepository.spec.ts b/frontend/modules/commercial/composables/__tests__/useSuppliersRepository.spec.ts index a7a6f42..0f7fb04 100644 --- a/frontend/modules/commercial/composables/__tests__/useSuppliersRepository.spec.ts +++ b/frontend/modules/commercial/composables/__tests__/useSuppliersRepository.spec.ts @@ -25,8 +25,8 @@ function makeHydra(total: number): HydraCollection { describe('useSuppliersRepository', () => { beforeEach(() => { mockGet.mockReset() - // 25 items → 3 pages a 10/page : permet de tester la navigation page 2. - mockGet.mockResolvedValue(makeHydra(25)) + // 60 items → 3 pages a 25/page : permet de tester la navigation page 2. + mockGet.mockResolvedValue(makeHydra(60)) }) it('cible la ressource /suppliers en page 1 par defaut', async () => { @@ -35,7 +35,7 @@ describe('useSuppliersRepository', () => { expect(mockGet).toHaveBeenLastCalledWith( '/suppliers', - { page: 1, itemsPerPage: 10 }, + { page: 1, itemsPerPage: 25 }, expect.objectContaining({ toast: false }), ) }) @@ -65,7 +65,7 @@ describe('useSuppliersRepository', () => { 'siteId[]': ['86', '17'], archivedOnly: true, page: 1, - itemsPerPage: 10, + itemsPerPage: 25, }, expect.objectContaining({ toast: false }), ) @@ -78,7 +78,7 @@ describe('useSuppliersRepository', () => { expect(mockGet).toHaveBeenLastCalledWith( '/suppliers', - { page: 1, itemsPerPage: 10 }, + { page: 1, itemsPerPage: 25 }, expect.objectContaining({ toast: false }), ) }) diff --git a/frontend/modules/commercial/composables/useClientsRepository.ts b/frontend/modules/commercial/composables/useClientsRepository.ts index d347435..95dbf7c 100644 --- a/frontend/modules/commercial/composables/useClientsRepository.ts +++ b/frontend/modules/commercial/composables/useClientsRepository.ts @@ -49,5 +49,6 @@ export interface Client { * gerer. */ export function useClientsRepository() { - return usePaginatedList({ url: '/clients' }) + // Pagination par defaut a 25 sur le repertoire (retour metier ERP-193). + return usePaginatedList({ url: '/clients', defaultItemsPerPage: 25 }) } diff --git a/frontend/modules/commercial/composables/useSuppliersRepository.ts b/frontend/modules/commercial/composables/useSuppliersRepository.ts index 37031ea..e8c4ff3 100644 --- a/frontend/modules/commercial/composables/useSuppliersRepository.ts +++ b/frontend/modules/commercial/composables/useSuppliersRepository.ts @@ -51,5 +51,6 @@ export interface Supplier { * `usePaginatedList`. Aucun reset au logout a gerer. */ export function useSuppliersRepository() { - return usePaginatedList({ url: '/suppliers' }) + // Pagination par defaut a 25 sur le repertoire (retour metier ERP-193). + return usePaginatedList({ url: '/suppliers', defaultItemsPerPage: 25 }) } diff --git a/frontend/modules/technique/composables/__tests__/useProvidersRepository.test.ts b/frontend/modules/technique/composables/__tests__/useProvidersRepository.test.ts index 3e0a201..336ff76 100644 --- a/frontend/modules/technique/composables/__tests__/useProvidersRepository.test.ts +++ b/frontend/modules/technique/composables/__tests__/useProvidersRepository.test.ts @@ -44,7 +44,7 @@ describe('useProvidersRepository', () => { expect(mockApiGet).toHaveBeenCalledTimes(1) const [url, query, opts] = mockApiGet.mock.calls[0] expect(url).toBe('/providers') - expect(query).toMatchObject({ page: 1, itemsPerPage: 10 }) + expect(query).toMatchObject({ page: 1, itemsPerPage: 25 }) expect(opts).toMatchObject({ toast: false, headers: { Accept: 'application/ld+json' }, diff --git a/frontend/modules/technique/composables/useProvidersRepository.ts b/frontend/modules/technique/composables/useProvidersRepository.ts index eadb9e3..610bd56 100644 --- a/frontend/modules/technique/composables/useProvidersRepository.ts +++ b/frontend/modules/technique/composables/useProvidersRepository.ts @@ -59,5 +59,6 @@ export interface Provider { * `usePaginatedList`. Aucun reset au logout a gerer. */ export function useProvidersRepository() { - return usePaginatedList({ url: '/providers' }) + // Pagination par defaut a 25 sur le repertoire (retour metier ERP-193). + return usePaginatedList({ url: '/providers', defaultItemsPerPage: 25 }) } diff --git a/frontend/modules/transport/composables/__tests__/useCarriersRepository.test.ts b/frontend/modules/transport/composables/__tests__/useCarriersRepository.test.ts index 3da48a3..5c92b97 100644 --- a/frontend/modules/transport/composables/__tests__/useCarriersRepository.test.ts +++ b/frontend/modules/transport/composables/__tests__/useCarriersRepository.test.ts @@ -50,7 +50,7 @@ describe('useCarriersRepository', () => { expect(mockApiGet).toHaveBeenCalledTimes(1) const [url, query, opts] = mockApiGet.mock.calls[0] expect(url).toBe('/carriers') - expect(query).toMatchObject({ page: 1, itemsPerPage: 10 }) + expect(query).toMatchObject({ page: 1, itemsPerPage: 25 }) expect(opts).toMatchObject({ toast: false, headers: { Accept: 'application/ld+json' }, diff --git a/frontend/modules/transport/composables/useCarriersRepository.ts b/frontend/modules/transport/composables/useCarriersRepository.ts index 941eee7..c4fa655 100644 --- a/frontend/modules/transport/composables/useCarriersRepository.ts +++ b/frontend/modules/transport/composables/useCarriersRepository.ts @@ -66,5 +66,6 @@ export interface CarrierFilters { * `usePaginatedList`. Aucun reset au logout a gerer. */ export function useCarriersRepository() { - return usePaginatedList({ url: '/carriers' }) + // Pagination par defaut a 25 sur le repertoire (retour metier ERP-193). + return usePaginatedList({ url: '/carriers', defaultItemsPerPage: 25 }) } -- 2.39.5 From 86507486a4c332bffa6f6b798335ce3efe58de26 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 18 Jun 2026 15:58:46 +0200 Subject: [PATCH 02/32] =?UTF-8?q?fix(front)=20:=20renomme=20la=20colonne?= =?UTF-8?q?=20=C2=AB=20Derni=C3=A8re=20activit=C3=A9=20=C2=BB=20en=20?= =?UTF-8?q?=C2=AB=20Derni=C3=A8re=20modification=20=C2=BB=20(ERP-193)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/i18n/locales/fr.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index e045b4c..e6bba9e 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -67,7 +67,7 @@ "companyName": "Nom", "categories": "Catégories", "sites": "Site", - "lastActivity": "Dernière activité" + "lastActivity": "Dernière modification" }, "filters": { "title": "Filtres", @@ -211,7 +211,7 @@ "companyName": "Nom", "categories": "Catégories", "sites": "Site", - "lastActivity": "Dernière activité" + "lastActivity": "Dernière modification" }, "filters": { "title": "Filtres", @@ -381,7 +381,7 @@ "companyName": "Nom", "categories": "Catégories", "sites": "Site", - "lastActivity": "Dernière activité" + "lastActivity": "Dernière modification" }, "filters": { "title": "Filtres", @@ -505,7 +505,7 @@ "name": "Nom", "certification": "Certification", "validityDate": "Date de validité", - "lastActivity": "Dernière activité" + "lastActivity": "Dernière modification" }, "certification": { "QUALIMAT": "QUALIMAT", -- 2.39.5 From 868141e3249ea8d0c584dfd3b4006f43cd1be87b Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 18 Jun 2026 16:15:41 +0200 Subject: [PATCH 03/32] fix(front) : masque les onglets vides en consultation des 4 repertoires (ERP-193) --- .../commercial/pages/clients/[id]/index.vue | 44 +++++++---- .../commercial/pages/suppliers/[id]/index.vue | 39 ++++++---- .../__tests__/clientConsultation.spec.ts | 73 +++++++++++++++++++ .../__tests__/supplierConsultation.spec.ts | 60 +++++++++++++++ .../utils/forms/clientConsultation.ts | 71 ++++++++++++++++++ .../utils/forms/supplierConsultation.ts | 72 ++++++++++++++++++ .../technique/pages/providers/[id]/index.vue | 39 +++++++--- .../forms/__tests__/providerDetail.spec.ts | 47 ++++++++++++ .../technique/utils/forms/providerDetail.ts | 52 +++++++++++++ .../transport/pages/carriers/[id]/index.vue | 24 +++++- .../forms/__tests__/carrierMappers.test.ts | 46 ++++++++++++ .../transport/utils/forms/carrierMappers.ts | 56 ++++++++++++++ 12 files changed, 578 insertions(+), 45 deletions(-) diff --git a/frontend/modules/commercial/pages/clients/[id]/index.vue b/frontend/modules/commercial/pages/clients/[id]/index.vue index 3fd2ec6..8501d1d 100644 --- a/frontend/modules/commercial/pages/clients/[id]/index.vue +++ b/frontend/modules/commercial/pages/clients/[id]/index.vue @@ -84,7 +84,9 @@ - + + - - - - - - + @@ -278,13 +277,14 @@