From b67893dcd632bea6f0f1b0873b06e74b0f2ac98e Mon Sep 17 00:00:00 2001 From: Mark Turner Date: Tue, 8 Oct 2024 21:36:31 +0100 Subject: [PATCH] fixed bug when reducing project durations --- src/api/timesheet/services/timesheet.js | 2 +- .../documentation/documentation/1.0.0/full_documentation.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/timesheet/services/timesheet.js b/src/api/timesheet/services/timesheet.js index fa716c7..c708922 100644 --- a/src/api/timesheet/services/timesheet.js +++ b/src/api/timesheet/services/timesheet.js @@ -632,7 +632,7 @@ module.exports = ({ strapi }) => ({ rse.children.forEach(month => { - let billableTime = month.children.reduce((total, project) => project.amount > 0 ? total + project.duration : 0, 0) + let billableTime = month.children.reduce((total, project) => project.amount > 0 ? total + project.duration : total + 0, 0) const start = DateTime.fromFormat(month.name, 'MMM yyyy').startOf('month'), end = start.month === DateTime.now().month && start.year === DateTime.now().year ? DateTime.now() : start.endOf('month') diff --git a/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 5477a86..5dbbbc1 100644 --- a/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-10-07T11:54:13.386Z" + "x-generation-date": "2024-10-08T20:36:17.037Z" }, "x-strapi-config": { "path": "/documentation",