Delete team start times, fix download link style, fix download file name
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import passport from "passport"
|
import passport from "passport"
|
||||||
import createError from "http-errors"
|
import createError from "http-errors"
|
||||||
import autobind from "autobind-decorator"
|
import autobind from "autobind-decorator"
|
||||||
import { catchAll } from "."
|
import { catchAll, TeamRoutes } from "."
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
export class ActivityRoutes {
|
export class ActivityRoutes {
|
||||||
@@ -166,8 +166,10 @@ export class ActivityRoutes {
|
|||||||
|
|
||||||
async deleteAllActivities(req, res, next) {
|
async deleteAllActivities(req, res, next) {
|
||||||
const Activity = this.db.Activity
|
const Activity = this.db.Activity
|
||||||
|
const Team = this.db.Team
|
||||||
|
|
||||||
await Activity.remove({})
|
await Activity.remove({})
|
||||||
|
await Team.updateMany({}, { $set: { start: null } })
|
||||||
|
|
||||||
res.json({})
|
res.json({})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ export class TeamRoutes {
|
|||||||
|
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
"Content-Type": "application/gzip",
|
"Content-Type": "application/gzip",
|
||||||
|
"Content-Disposition": 'attachment; filename="team-scores.gzip"',
|
||||||
})
|
})
|
||||||
readable.pipe(gzip).pipe(res)
|
readable.pipe(gzip).pipe(res)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ export class WorkItemRoutes {
|
|||||||
const WorkItem = this.db.WorkItem
|
const WorkItem = this.db.WorkItem
|
||||||
|
|
||||||
await Activity.remove({})
|
await Activity.remove({})
|
||||||
|
await Team.updateMany({}, { $set: { start: null } })
|
||||||
await WorkItem.remove({})
|
await WorkItem.remove({})
|
||||||
|
|
||||||
res.json({})
|
res.json({})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component, Fragment } from "react"
|
import React, { Component, Fragment } from "react"
|
||||||
import PropTypes from "prop-types"
|
import PropTypes from "prop-types"
|
||||||
import { Box, Image, Column, Row, Button, Link, Text } from "ui"
|
import { Box, Image, Column, Row, Button, Link } from "ui"
|
||||||
import { MessageModal, WaitModal, YesNoMessageModal } from "../Modal"
|
import { MessageModal, WaitModal, YesNoMessageModal } from "../Modal"
|
||||||
import { sizeInfo, colorInfo } from "ui/style"
|
import { sizeInfo, colorInfo } from "ui/style"
|
||||||
import headerLogo from "images/deighton.png"
|
import headerLogo from "images/deighton.png"
|
||||||
@@ -187,7 +187,7 @@ export class System extends Component {
|
|||||||
<Row.Item grow />
|
<Row.Item grow />
|
||||||
<Row.Item>
|
<Row.Item>
|
||||||
<Link to={api.makeTeamStatusUrl()}>
|
<Link to={api.makeTeamStatusUrl()}>
|
||||||
<Text>Download Team Data</Text>
|
Download Team Data
|
||||||
</Link>
|
</Link>
|
||||||
</Row.Item>
|
</Row.Item>
|
||||||
<Row.Item grow />
|
<Row.Item grow />
|
||||||
|
|||||||
Reference in New Issue
Block a user