ajusta y agrega vista de lista al calendario

This commit is contained in:
Germán Correa 2021-09-03 03:07:12 +07:00
parent 5e1422f7ce
commit 0842aaeaf4

View File

@ -55,43 +55,39 @@ document.addEventListener("DOMContentLoaded", function () {
url: "/api/eventos/premiados",
color: "darkred",
},
{ url:"/api/eventos/sesiones/",
color: "gray",
},
{ url: "/api/eventos/sesiones/", color: "gray" },
{
events: function(info,success,fail){
events: function (info, success, fail) {
let comisiones = [];
for(let i=0;i<3;i++){
comisiones.push({
title: "Comisión de Género",
start: `2021-09-${14 + i}T18:30-0300`,
end: `2021-09-${14 + i}T19:30-0300`,
speaker: { nombre: "organizadores" },
description: "Reuniones de Comisión de Género de UMALCA",
color: "#812c64",
});
for (let i = 0; i < 3; i++) {
comisiones.push({
title: "Comisión de Género",
start: `2021-09-${14 + i}T18:30-0300`,
end: `2021-09-${14 + i}T19:30-0300`,
speaker: { nombre: "organizadores" },
description: "Reuniones de Comisión de Género de UMALCA",
color: "#812c64",
});
}
success(comisiones);
}
},
},
{
events: function(info,success,fail){
events: function (info, success, fail) {
let asamblea = {
title: "Asamblea UMALCA",
start: "2021-09-13T19:00-0300",
end: "2019-09-13T20:00-0300",
speaker: { nombre: "organizadores" },
color: "black",
}
success([asamblea])
}
}
title: "Asamblea UMALCA",
start: "2021-09-13T19:00-0300",
end: "2019-09-13T20:00-0300",
speaker: { nombre: "organizadores" },
color: "black",
};
success([asamblea]);
},
},
],
headerToolbar: {
center: "timeGridAll,timeGridThree,timeGridOne",
center: "timeGridAll,timeGridThree,timeGridOne,listView",
},
eventTimeFormat: {
hour: "numeric",
@ -109,7 +105,7 @@ document.addEventListener("DOMContentLoaded", function () {
nowIndicator: true,
now: "2021-09-12",
slotMinTime: "11:00:00",
slotMaxTime: "21:00:00",
slotMaxTime: "21:00:00",
slotDuration: "00:15",
allDaySlot: false,
slotLabelFormat: {
@ -135,7 +131,18 @@ document.addEventListener("DOMContentLoaded", function () {
duration: { days: 1 },
buttonText: "1 dia",
},
duration: { days: 1 },
dayGridD: {
type: "dayGridDay",
},
dayGridW: {
type: "dayGridWeek",
duration: { days: 2 },
},
listView:{
type:"listWeek",
buttonText:"Lista"
},
},
});
calendar.render();
@ -152,6 +159,7 @@ document.addEventListener("DOMContentLoaded", function () {
start: "2021-09-13",
end: "2021-09-18",
});
calendar.changeView("timeGridAll");
break;
case "UTC":
calendar.setOption("slotMinTime", "14:00:00");
@ -161,8 +169,10 @@ document.addEventListener("DOMContentLoaded", function () {
start: "2021-09-13",
end: "2021-09-18",
});
calendar.changeView("timeGridAll");
break;
default:
calendar.changeView("dayGridW");
let initial = moment("2021-09-13T14:00Z");
let final = moment("2021-09-17T23:30Z");
let offset = initial.utcOffset();