diff --git a/apps/common/behaviours/email.js b/apps/common/behaviours/email.js index f2725ee1..2c145d75 100644 --- a/apps/common/behaviours/email.js +++ b/apps/common/behaviours/email.js @@ -1,6 +1,7 @@ /* eslint-disable consistent-return */ 'use strict'; +const moment = require('moment'); const _ = require('underscore'); const StatsD = require('hot-shots'); const client = new StatsD(); @@ -63,6 +64,8 @@ module.exports = superclass => class Emailer extends superclass { saveValues(req, res, callback) { super.saveValues(req, res, () => { const data = _.pick(req.sessionModel.toJSON(), _.identity); + data['date-lost'] = moment(data['date-lost']).format('DD MMMM YYYY'); + data['date-of-birth'] = moment(data['date-of-birth']).format('DD MMMM YYYY'); const service = serviceMap[req.baseUrl] && serviceMap[req.baseUrl](data); if (!service) { diff --git a/apps/lost-stolen/views/confirm.html b/apps/lost-stolen/views/confirm.html index 3b7bc0b7..fffdd4b6 100644 --- a/apps/lost-stolen/views/confirm.html +++ b/apps/lost-stolen/views/confirm.html @@ -35,7 +35,7 @@
{{#t}}pages.check-details.table.headers.date-lost{{/t}} | -{{values.date-lost}} | +{{#date}}{{values.date-lost}}{{/date}} | {{#t}}buttons.change.date-lost{{/t}} |
{{#t}}pages.check-details.table.headers.date-of-birth{{/t}} | -{{values.date-of-birth}} | +{{#date}}{{values.date-of-birth}}{{/date}} | {{#t}}buttons.change.date-of-birth{{/t}} |