mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-02 16:39:29 +00:00
Added class stat data, and amended pluralisation logic
This commit is contained in:
@@ -26,17 +26,18 @@ router.get('/dashboard', async (req, res) => {
|
||||
stats: [
|
||||
{
|
||||
value: classes.length,
|
||||
text: 'Class' + (classes.length > 1 ? 'es' : '')
|
||||
text: 'Class' +
|
||||
(classes.length !== 1 ? 'es' : '')
|
||||
},
|
||||
{
|
||||
value: recentTests.length,
|
||||
text: 'Completed Test' +
|
||||
(recentTests.length > 1 ? 's' : '')
|
||||
(recentTests.length !== 1 ? 's' : '')
|
||||
},
|
||||
{
|
||||
value: upcomingTests.length,
|
||||
text: 'Upcoming Test' +
|
||||
(upcomingTests.length > 1 ? 's' : '')
|
||||
(upcomingTests.length !== 1 ? 's' : '')
|
||||
},
|
||||
{
|
||||
value: '90%',
|
||||
|
||||
Reference in New Issue
Block a user