Skip to content

Commit

Permalink
#217 use correct datDatePrevu for DDS accord val
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaetanbrl committed Jun 8, 2022
1 parent cf56d8c commit 39ef4a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/extension/components/form/identify/Tabou2DdsAccord.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function Tabou2DdsAccord({ initialItem, programme, operation, map
label: "tabou2.identify.accordions.ddcData",
msg: ["tabou2.getHelp", props.help?.ddc || props.help?.url || ""],
type: "table",
fields: ["numAds", "depotDossier", "adsDate", "docDate", "datDate "],
fields: ["numAds", "depotDossier", "adsDate", "docDate", "datDatePrevu "],
labels: [
"tabou2.identify.accordions.numAds",
"tabou2.identify.accordions.depotDossier",
Expand Down Expand Up @@ -88,7 +88,7 @@ export default function Tabou2DdsAccord({ initialItem, programme, operation, map
* @returns any
*/
const getValueByField = (field, val) => {
let isDate = ["depotDossier", "adsDate", "docDate", "datDate"].includes(field);
let isDate = ["depotDossier", "adsDate", "docDate", "datDatePrevu"].includes(field);
return isDate && val ? new Date(val).toLocaleDateString() : val;
};

Expand Down

0 comments on commit 39ef4a7

Please sign in to comment.