diff --git a/src/components/Features/ExportStrategies/BureauVeritasExporter.js b/src/components/Features/ExportStrategies/BureauVeritasExporter.js index f6042ec0..d41a2183 100644 --- a/src/components/Features/ExportStrategies/BureauVeritasExporter.js +++ b/src/components/Features/ExportStrategies/BureauVeritasExporter.js @@ -71,7 +71,7 @@ function getSheet () { getFeatureGroups(featureCollection, [GROUPE_CULTURE, GROUPE_NIVEAU_CONVERSION, GROUPE_DATE_ENGAGEMENT]).forEach(({ features, mainKey, surface }, index) => { const culture = fromCodeCpf(mainKey) - const autresInfos = generateAutresInfos(features, { pivot: mainKey }) + const autresInfos = generateAutresInfos(features, { pivot: mainKey, withExplicitName: true, withName: true }) const varietes = generateAutresInfos(features, { pivot: mainKey, withNotes: false, withDate: false, withName: false, withSurface: false }) sheet_add_aoa(sheet, [ diff --git a/src/components/Features/ExportStrategies/BureauVeritasExporter.test.js b/src/components/Features/ExportStrategies/BureauVeritasExporter.test.js index 091f0b11..685f3ae1 100644 --- a/src/components/Features/ExportStrategies/BureauVeritasExporter.test.js +++ b/src/components/Features/ExportStrategies/BureauVeritasExporter.test.js @@ -60,7 +60,7 @@ describe('BureauVeritasExporter', () => { "Luzerne", "1125", "", - "Ilots : 1.1 ; 1.2", + "Ilots : 1.1 (nom personnalisé) ; 1.2", 2.092976314534671, "ha", "C1", diff --git a/src/components/Features/ExportStrategies/CertipaqExporter.js b/src/components/Features/ExportStrategies/CertipaqExporter.js index 41b1dacc..98cbd78b 100644 --- a/src/components/Features/ExportStrategies/CertipaqExporter.js +++ b/src/components/Features/ExportStrategies/CertipaqExporter.js @@ -85,7 +85,7 @@ function getSheet () { // Libellé Culture #C culture?.libelle_code_cpf ?? `[ERREUR] culture inconnue (${props.cultures?.at(0).CPF})`, // Variété / infos #D - generateAutresInfos([{ id, geometry, properties: props }], { withCode: false, withDate: false, withName: false, withNotes: true, withSurface: false, withVariete: true, initialCulture: culture?.code_cpf }), + generateAutresInfos([{ id, geometry, properties: props }], { withCode: false, withDate: false, withExplicitName: true, withName: false, withNotes: true, withSurface: false, withVariete: true, initialCulture: culture?.code_cpf }), // C0 - AB - C1 - C2 - C3 props.conversion_niveau === 'CONV' ? surfaceHa : '', props.conversion_niveau === 'AB' ? surfaceHa : '', diff --git a/src/components/Features/ExportStrategies/CertipaqExporter.test.js b/src/components/Features/ExportStrategies/CertipaqExporter.test.js index 164dd5d7..c1d7b8d4 100644 --- a/src/components/Features/ExportStrategies/CertipaqExporter.test.js +++ b/src/components/Features/ExportStrategies/CertipaqExporter.test.js @@ -41,7 +41,7 @@ describe('CertipaqExporter', () => { '', '1_1', 'Luzerne', - '', + 'nom personnalisé', '', '', '1,05', diff --git a/src/components/Features/ExportStrategies/CertisExporter.test.js b/src/components/Features/ExportStrategies/CertisExporter.test.js index 397bb2e2..e0520103 100644 --- a/src/components/Features/ExportStrategies/CertisExporter.test.js +++ b/src/components/Features/ExportStrategies/CertisExporter.test.js @@ -46,7 +46,7 @@ describe('CertisExporter', () => { "Id. Parcelle" ], [ - '', + 'nom personnalisé', '1', '1', 1.0464881572673355, diff --git a/src/components/Features/ExportStrategies/CertisudExporter.js b/src/components/Features/ExportStrategies/CertisudExporter.js index 7b8530dd..38d3755c 100644 --- a/src/components/Features/ExportStrategies/CertisudExporter.js +++ b/src/components/Features/ExportStrategies/CertisudExporter.js @@ -50,7 +50,7 @@ function getSheet () { getFeatureGroups(featureCollection, [GROUPE_CULTURE, GROUPE_NIVEAU_CONVERSION, GROUPE_DATE_ENGAGEMENT]).forEach(({ features, mainKey, surface }, index) => { const culture = fromCodeCpf(mainKey) - const autresInfos = generateAutresInfos(features, { withAnnotations: true, pivot: mainKey, permissions }) + const autresInfos = generateAutresInfos(features, { withAnnotations: true, withExplicitName: true, withName: true, pivot: mainKey, permissions }) sheet_add_aoa(sheet, [ [ diff --git a/src/components/Features/ExportStrategies/CertisudExporter.test.js b/src/components/Features/ExportStrategies/CertisudExporter.test.js index 4e1576ec..a5ac552a 100644 --- a/src/components/Features/ExportStrategies/CertisudExporter.test.js +++ b/src/components/Features/ExportStrategies/CertisudExporter.test.js @@ -47,7 +47,7 @@ describe('CertisudExporter', () => { 'Luzerne', // expect.closeTo(2.1), // in vite@5 + vitest@1 2.092976314534671, - '1.1, Visitée ; 1.2, Prélèvement effectué, À risque', + '1.1 (nom personnalisé), Visitée ; 1.2, Prélèvement effectué, À risque', 'C1', new Date('2023-01-01T00:00:00.000Z'), '1,2' diff --git a/src/components/Features/ExportStrategies/ControlUnionExporter.js b/src/components/Features/ExportStrategies/ControlUnionExporter.js index 1d65d43f..26a92a9f 100644 --- a/src/components/Features/ExportStrategies/ControlUnionExporter.js +++ b/src/components/Features/ExportStrategies/ControlUnionExporter.js @@ -61,7 +61,7 @@ function getSheet () { surfaceHa, props.engagement_date ? new Date(props.engagement_date) : '', props.conversion_niveau, - generateAutresInfos([{ properties: props }], { withAnnotations: true, initialCulture: culture?.code_cpf, permissions }), + generateAutresInfos([{ properties: props }], { withAnnotations: true, withExplicitName: true, withName: true, initialCulture: culture?.code_cpf, permissions }), String(props.id), culture?.code_cpf ] diff --git a/src/components/Features/ExportStrategies/ControlUnionExporter.test.js b/src/components/Features/ExportStrategies/ControlUnionExporter.test.js index 9d456048..bd72a75a 100644 --- a/src/components/Features/ExportStrategies/ControlUnionExporter.test.js +++ b/src/components/Features/ExportStrategies/ControlUnionExporter.test.js @@ -35,7 +35,7 @@ describe('ControlUnionExporter', () => { 1.0464881572673355, new Date('2023-01-01T00:00:00.000Z'), 'C1', - '1.1, Visitée', + '1.1 (nom personnalisé), Visitée', '1', '01.19.10.8', ], diff --git a/src/components/Features/ExportStrategies/OcaciaExporter.js b/src/components/Features/ExportStrategies/OcaciaExporter.js index 0a828962..d73d528a 100644 --- a/src/components/Features/ExportStrategies/OcaciaExporter.js +++ b/src/components/Features/ExportStrategies/OcaciaExporter.js @@ -58,7 +58,7 @@ function getSheet () { // N° Cadastre props.cadastre, // Variété / infos - generateAutresInfos([{ id, geometry, properties: props }], { withDate: false, withName: false, withNotes: false, withSurface: false, withVariete: true, initialCulture: culture?.code_cpf }), + generateAutresInfos([{ id, geometry, properties: props }], { withDate: false, withExplicitName: false, withName: false, withNotes: false, withSurface: false, withVariete: true, initialCulture: culture?.code_cpf }), // C0 - AB - C1 - C2 - C3 props.conversion_niveau === 'CONV' ? surfaceHa : '', props.conversion_niveau === 'AB' ? surfaceHa : '', @@ -68,7 +68,7 @@ function getSheet () { // Date conv #K props.engagement_date ? new Date(props.engagement_date) : '', // Observation / date de semis - generateAutresInfos([{ id, geometry, properties: props }], { withAnnotations: true, withDate: true, withName: false, withNotes: true, withSurface: true, withVariete: false, initialCulture: culture?.code_cpf, permissions }), + generateAutresInfos([{ id, geometry, properties: props }], { withAnnotations: true, withDate: true, withExplicitName: true, withName: false, withNotes: true, withSurface: true, withVariete: false, initialCulture: culture?.code_cpf, permissions }), // Précédent '', // Anté précédent diff --git a/src/components/Features/ExportStrategies/OcaciaExporter.test.js b/src/components/Features/ExportStrategies/OcaciaExporter.test.js index e409ec01..4e64ad54 100644 --- a/src/components/Features/ExportStrategies/OcaciaExporter.test.js +++ b/src/components/Features/ExportStrategies/OcaciaExporter.test.js @@ -51,7 +51,7 @@ describe('OcaciaExporter', () => { '', '', new Date('2023-01-01T00:00:00.000Z'), - 'Visitée', + 'nom personnalisé, Visitée', '', '', '', diff --git a/src/components/Features/ExportStrategies/QualisudExporter.js b/src/components/Features/ExportStrategies/QualisudExporter.js index 1313ca7b..f98f537e 100644 --- a/src/components/Features/ExportStrategies/QualisudExporter.js +++ b/src/components/Features/ExportStrategies/QualisudExporter.js @@ -55,7 +55,7 @@ function getSheet () { [ firstCulture?.code_cpf ?? `[ERREUR] culture inconnue (${properties.cultures.at(0)?.CPF})`, autresInfos, - featureName({ properties }, { placeholder: '' }), + featureName({ properties }, { placeholder: '', explicitName: true }), surface(geometry) / 10_000, properties.conversion_niveau, properties.engagement_date ? new Date(properties.engagement_date) : '', diff --git a/src/components/Features/ExportStrategies/QualisudExporter.test.js b/src/components/Features/ExportStrategies/QualisudExporter.test.js index 4e40b0bc..093363e6 100644 --- a/src/components/Features/ExportStrategies/QualisudExporter.test.js +++ b/src/components/Features/ExportStrategies/QualisudExporter.test.js @@ -31,7 +31,7 @@ describe('QualisudExporter', () => { [ '01.19.10.8', 'Visitée', - 'ilot 1, parcelle 1', + 'ilot 1, parcelle 1 (nom personnalisé)', 1.0464881572673355, 'C1', new Date('2023-01-01T00:00:00.000Z'),