You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
679 B
16 lines
679 B
/** @odoo-module */
|
|
import { patch } from "@web/core/utils/patch";
|
|
import { TimeOffCalendarYearRenderer } from "@hr_holidays/views/calendar/year/calendar_year_renderer";
|
|
import { usePublicHolidays } from '@hr_leave_dashboard/js/hooks';
|
|
//The patch function to modify the TimeOffCalendarYearRenderer prototype
|
|
//by adding or modifying two methods: setup and onDayRender.
|
|
patch(TimeOffCalendarYearRenderer.prototype, 'hr_leave_dashboard.TimeOffCalendarYearRenderer',{
|
|
setup() {
|
|
this._super(...arguments);
|
|
this.publicHolidays = usePublicHolidays(this.props);
|
|
},
|
|
onDayRender(info) {
|
|
this._super(info);
|
|
this.publicHolidays(info);
|
|
}
|
|
});
|
|
|