Skip to content
Extraits de code Groupes Projets
Valider e855591c rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[fix] error calendar display

parent 2989b988
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -6,6 +6,7 @@
"license": "AGPL-3",
"application": False,
"depends": [
"web",
"cgscop_partner",
"cgscop_resource",
"hr_timesheet",
......
......@@ -10,3 +10,8 @@
background-color: #138496;
border-color: #17a2b8;
}
.o_calendar_home .fc-event {
background: rgba(23, 162, 184, 0.1);
border-left: 3px solid rgb(23, 162, 184) !important;
border-top: 0 !important;
}
......@@ -9,6 +9,20 @@ odoo.define("cgscop_home.home", function (require) {
var CgScopHome = AbstractAction.extend({
template: "CgScopHome",
jsLibs: [
"/web/static/lib/fullcalendar/core/main.js",
"/web/static/lib/fullcalendar/core/locales/fr.js",
"/web/static/lib/fullcalendar/daygrid/main.js",
"/web/static/lib/fullcalendar/timegrid/main.js",
"/web/static/lib/fullcalendar/moment/main.js",
"/web/static/lib/fullcalendar/interaction/main.js",
],
cssLibs: [
"/web/static/lib/fullcalendar/core/main.css",
"/web/static/lib/fullcalendar/daygrid/main.css",
"/web/static/lib/fullcalendar/timegrid/main.css",
"/web/static/lib/fullcalendar/list/main.css",
],
events: {
"click #my-calendar": function (e) {
......@@ -54,15 +68,12 @@ odoo.define("cgscop_home.home", function (require) {
},
start: function () {
return Promise.all([
this.calendar = this.render_calendar(),
this._super()
]);
// this.calendar.refetchEvents();
this.calendar = this.render_calendar();
this.calendar.refetchEvents();
},
render_calendar: function () {
var self = this
var calendarEl = this.$(".o_calendar_home_widget")[0];
var calendarEl = this.$(".o_calendar_widget")[0];
var calendar = new FullCalendar.Calendar(calendarEl, {
themeSystem: "standard",
plugins: ["dayGrid", "timeGrid", "list"],
......@@ -86,11 +97,11 @@ odoo.define("cgscop_home.home", function (require) {
endTime: "18:00",
},
weekends: false,
// height: "parent",
height: "parent",
});
setTimeout(function () {
calendar.render();
}, 800);
}, 400);
return calendar;
},
});
......
......@@ -187,7 +187,9 @@
</h4>
<hr />
<div class="calendar-container" style="height: 520px;">
<div class="o_calendar_home_widget" />
<div class="o_calendar_view">
<div class="o_calendar_widget o_calendar_home" />
</div>
</div>
</div>
</div>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter