phpreport icon indicating copy to clipboard operation
phpreport copied to clipboard

Error when shrinking holiday interval

Open jaragunde opened this issue 3 years ago • 0 comments

In holidayManagement.php, steps to reproduce:

  1. Create a holiday period between Monday and Friday, and save it.
  2. Click on Friday, then on Wednesday.

Expected: period between Wed and Fri is set. Actual: range disappears, error shows up in the console:

TypeError: day.attributes[idx] is undefined
    onDayClick http://localhost/phpreport/web/js/holidayManagement.js:297
    VueJS 4
    onDayClick http://localhost/phpreport/web/vuejs/v-calendar.2.3.2.min.js:1
    VueJS 4
    click http://localhost/phpreport/web/vuejs/v-calendar.2.3.2.min.js:1
    VueJS 24
    refreshPages http://localhost/phpreport/web/vuejs/v-calendar.2.3.2.min.js:1
    refreshPages http://localhost/phpreport/web/vuejs/v-calendar.2.3.2.min.js:1
    move http://localhost/phpreport/web/vuejs/v-calendar.2.3.2.min.js:1
    r http://localhost/phpreport/web/vuejs/v-calendar.2.3.2.min.js:1
    VueJS 17
vue.min.js:6:11762

Some additional facts:

  • It doesn't happen if you click on Monday, then on Wednesday.
  • It does happen if you click on Monday and then on Friday the week before.

jaragunde avatar Dec 08 '21 07:12 jaragunde