[FIX] hr_holidays: accrual plan day selection#5041
[FIX] hr_holidays: accrual plan day selection#5041renol-odoo wants to merge 1 commit intomaster-hr-onboarding-renolfrom
Conversation
|
This PR targets the un-managed branch odoo-dev/odoo:master-hr-onboarding-renol, it needs to be retargeted before it can be merged. |
259dc54 to
ba94da9
Compare
ziriraha
left a comment
There was a problem hiding this comment.
Great idea to use useEffect! one small comment
| _buildDayOptions(maxDays) { | ||
| return Array.from({ length: maxDays }, (_, i) => { | ||
| const day = i + 1; | ||
| return [String(day), String(day)]; | ||
| }); | ||
| } |
There was a problem hiding this comment.
We already have the options, why not filter them instead of building them?
There was a problem hiding this comment.
Good catch, indeed... I've updated it so that it builds the array once and then return the appropriate slice
ba94da9 to
a7c32be
Compare
| const ALL_DAY_OPTIONS = Array.from({ length: 31 }, (_, i) => { | ||
| const day = String(i + 1); | ||
| return [day, day]; | ||
| }); |
There was a problem hiding this comment.
what I meant is that super.options has an array with all the options, you can just filter that, no need to build it :) I don't know if they're sorted though (for the .slice)
There was a problem hiding this comment.
Mmmm all right, I'll see how I can use that
a7c32be to
4ae26d1
Compare
Disable selecting non existing day of the month in accrual plan milestones Task: 5998551
4ae26d1 to
adad142
Compare
Disable selecting non existing day of the month in accrual plan milestones.
Task: 5998551