bitovians / pto

PTO Policy + Freshbooks integration
https://bitovians.github.io/pto/
0 stars 1 forks source link

BUG: PTO Tracker not equal to Freshbooks Accrued Time Off #12

Closed ryangwilson closed 4 years ago

ryangwilson commented 5 years ago
screen shot 2019-01-22 at 11 25 24 am screen shot 2019-01-22 at 11 39 37 am

This is the link to my Google Sheets that is accurate to the Freshbooks information: https://docs.google.com/spreadsheets/d/1KU3gN5LI85u1Xiyzxg2mQEi-j5f8fdEYgVm8QVXiVfs/edit?usp=sharing

This is the link to the Freshbooks Accrued Time Off data

mjstahl commented 5 years ago

This is not inaccurate, but bad UX. In the application the accrued hours are added after the month is finished. The spread sheet adds them in-line with the current month.

I think this can be corrected by adding the accrued hours for the current month instead of waiting for the User to access the app in the following month.

mjstahl commented 4 years ago

I think this can be fixed by changing https://github.com/bitovians/pto/blob/master/components/dashboard/dashboard.js#L91 from let m = 1 to let m = 0.

For example, new Date().getMonth() for June would return 5 so that loop will iterate 5 times (1, 2, 3, 4, 5) where, to be inline with the spreadsheet, should include the current month which mean it should accrue for 6 months assuming a month of June.