Skip to content

Commit

Permalink
Merge pull request #1492 from NicoPennec/fix/timesheets
Browse files Browse the repository at this point in the history
Fix selectable dates in timesheets
  • Loading branch information
NicoPennec authored Jul 15, 2024
2 parents 2ea1d1e + 074ee53 commit 1cf7602
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/lists/TimesheetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,13 @@ export default {
this.$refs['th-prod'].offsetWidth +
this.$refs['th-type'].offsetWidth +
'px'
const beginningOfTheWeek = moment().startOf('isoWeek').toDate()
this.disabledDates = {
to:
this.isCurrentUserArtist &&
this.organisation.timesheets_locked === 'true'
? beginningOfTheWeek
? moment().subtract(1, 'weeks').toDate() // Disable dates older than one week
: undefined,
from: moment().toDate() // Disable dates after today.
from: moment().toDate() // Disable dates after today
}
},
Expand Down

0 comments on commit 1cf7602

Please sign in to comment.