23 lines
759 B
JavaScript
23 lines
759 B
JavaScript
/** @odoo-module **/
|
|
// Fusion Claims - Calendar Store Hours Restriction
|
|
// Copyright 2024-2026 Nexa Systems Inc.
|
|
// License OPL-1
|
|
//
|
|
// Restricts the technician task calendar view to only show store hours.
|
|
// Default: 9:00 AM - 6:00 PM (configurable in Settings).
|
|
|
|
import { patch } from "@web/core/utils/patch";
|
|
import { CalendarRenderer } from "@web/views/calendar/calendar_renderer";
|
|
|
|
patch(CalendarRenderer.prototype, {
|
|
get fcOptions() {
|
|
const options = super.fcOptions;
|
|
// Only restrict hours for the technician task calendar
|
|
if (this.props.model?.resModel === "fusion.technician.task") {
|
|
options.slotMinTime = "08:00:00";
|
|
options.slotMaxTime = "19:00:00";
|
|
}
|
|
return options;
|
|
},
|
|
});
|