From bb66863a3b7616f28ee50637524f75d5be1a25fa Mon Sep 17 00:00:00 2001 From: Landry Breuil Date: Tue, 16 Aug 2022 17:38:26 +0200 Subject: [PATCH 1/2] prefix ccosec by ccopre in the ReferenceRow selectbox label cf georchestra/mapstore2-cadastrapp#164 --- js/extension/components/lists/ReferenceRow.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/extension/components/lists/ReferenceRow.jsx b/js/extension/components/lists/ReferenceRow.jsx index 628beab..c278910 100644 --- a/js/extension/components/lists/ReferenceRow.jsx +++ b/js/extension/components/lists/ReferenceRow.jsx @@ -49,7 +49,7 @@ export default function ReferenceRow({ defaultOpen disabled={isEmpty(sections)} style={fieldStyle} - textField="ccosec" + textField="label" placeholder={'cadastrapp.parcelle.result.ccosec'} value={section} onChange={() => { }} @@ -57,10 +57,11 @@ export default function ReferenceRow({ onSetValue('section', newSection); }} filter="contains" - data={sections.map(({ ccosec, ...rest}) => ({ + data={sections.map(({ ccosec, ccopre, ...rest}) => ({ ccosec, + ccopre, ...rest, - label: "" + ccosec + label: ccopre + ccosec }))} /> Date: Tue, 16 Aug 2022 17:39:07 +0200 Subject: [PATCH 2/2] prefix ccosec with ccopre in the search result table cf georchestra/mapstore2-cadastrapp#164 --- js/extension/components/table/PlotsSelectionTable.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/extension/components/table/PlotsSelectionTable.jsx b/js/extension/components/table/PlotsSelectionTable.jsx index f42ad34..50cd7d4 100644 --- a/js/extension/components/table/PlotsSelectionTable.jsx +++ b/js/extension/components/table/PlotsSelectionTable.jsx @@ -10,7 +10,7 @@ const columns = [{ name: "cadastrapp.parcelle.result.commune", resizable: true }, { - key: "ccosec", + key: "sectionLabel", width: 80, sortable: true, name: "cadastrapp.parcelle.result.ccosec", @@ -45,8 +45,8 @@ function PlotsSelectionTable({ if (!data) { return null; } - // create mixed column for address - const processedRows = data.map(v => ({ ...v, cadastralAddr: v.dnvoiri + " " + v.cconvo + " " + v.dvoilib })); + // create mixed column for address and section + const processedRows = data.map(v => ({ ...v, sectionLabel: v.ccopre + v.ccosec, cadastralAddr: v.dnvoiri + " " + v.cconvo + " " + v.dvoilib })); const rows = (({sortColumn, sortDirection} = {}) => { if (sortDirection === "ASC") { return sortBy(processedRows, sortColumn);