| 1 |
import { CalendarCommonPopover } from "@web/views/calendar/calendar_common/calendar_common_popover"; |
| 2 |
import { useService } from "@web/core/utils/hooks"; |
| 3 |
|
| 4 |
export class TimeOffCalendarCommonPopover extends CalendarCommonPopover { |
| 5 |
static subTemplates = { |
| 6 |
...CalendarCommonPopover.subTemplates, |
| 7 |
popover: "hr_holidays.TimeOffCalendarCommonPopover.popover", |
| 8 |
}; |
| 9 |
|
| 10 |
setup() { |
| 11 |
super.setup(); |
| 12 |
this.orm = useService("orm"); |
| 13 |
this.actionService = useService("action"); |
| 14 |
this.viewType = "calendar"; |
| 15 |
} |
| 16 |
|
| 17 |
onEditEvent() { |
| 18 |
this.props.close() |
| 19 |
this.actionService.doAction({ |
| 20 |
name: this.record.display_name, |
| 21 |
type: "ir.actions.act_window", |
| 22 |
res_model: this.props.model.resModel, |
| 23 |
res_id: this.record.id, |
| 24 |
views: [[false, "form"]], |
| 25 |
}); |
| 26 |
} |
| 27 |
} |