More updates to the RSVP page

Slack message improvements
Font changes
This commit is contained in:
2017-02-13 17:19:22 +00:00
parent b62774e4cf
commit 5725161616
8 changed files with 48 additions and 26 deletions

View File

@@ -120,7 +120,12 @@ app.post('/rsvp/save', (req, res) => {
where: { key: req.body.key },
}).then(data => {
if (data.completed) {
sendSlackMsgWithDebounce(`${data.firstname} ${data.lastname} has saved their RSVP:\n${data.firstname} ${data.attending ? 'is' : 'is not'} coming.${data.attending ? `\nStarter: ${starters[data.starter]}\nMain: ${mains[data.main]}\nDietary requirements: ${data.dietary ? data.dietary : 'None'}` : ''}`, req.body.key);
const attending = `\nAttending: ${data.attending ? 'Yes' : 'No'}`;
const starter = (data.attending && data.starter !== -1) ? `\nStarter: ${starters[data.starter]}` : '';
const main = (data.attending && data.main !== -1) ? `\nMain: ${mains[data.main]}` : '';
const dietary = (data.attending && data.dietary) ? `\nDietary requirements: ${data.dietary}` : '';
sendSlackMsgWithDebounce(`${data.firstname} ${data.lastname} has saved their RSVP:${attending}${starter}${main}${dietary}`, req.body.key);
}
res.json({
success: true,