Abbreviate PPs

And call them 'PP's instead of 'In charge' 😉
This commit is contained in:
Badri Sunderarajan 2021-02-25 15:38:27 +05:30
parent 41a095e465
commit ced39b9328

View file

@ -76,15 +76,15 @@ app.post("/edcal", (req, res) => {
if (req.body.command != 'edcal') {
articleTable = (articles
.reverse()
.map(a => `|${a.title}|${a.in_charge.map(u=>u.name).join(',')}|${a.due_date}|${a.publish_date}|${a.status}|`)
.map(a => `|${a.title}|${a.in_charge.map(u=>u.name[0]).join(',')}|${a.due_date}|${a.publish_date}|${a.status}|`)
.join("\n"))
res.send({
response_type: "in_channel",
text: `---
#### Editorial Calendar
|Title|In charge|Due Date|Publish Date|Status|
|:----|:--------|:-------|:-----------|:-----|
|Title|PP|Due Date|Publish Date|Status|
|:----|:-|:-------|:-----------|:-----|
${articleTable}
---`,
})