Skip to content

Commit

Permalink
remove cancelled leave from response
Browse files Browse the repository at this point in the history
  • Loading branch information
markdturner committed Oct 7, 2024
1 parent 2aabd5a commit 3689064
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/timesheet/services/timesheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ module.exports = ({ strapi }) => ({

// Include the leave that is within the FY period
response.forEach(leave => {
if (period.contains(DateTime.fromISO(leave.DATE))) {
if (period.contains(DateTime.fromISO(leave.DATE)) && leave.STATUS !== '3') {
if(username && leave.ID !== username) return
FYleave.push(leave)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-generation-date": "2024-09-26T05:17:23.053Z"
"x-generation-date": "2024-10-07T11:54:13.386Z"
},
"x-strapi-config": {
"path": "/documentation",
Expand Down

0 comments on commit 3689064

Please sign in to comment.