Browse Source

[Administration] Distributions > calendrier : dates passées dans une couleur différente #1269

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
a7f88403c6
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      backend/web/js/vuejs/distribution-index.js

+ 14
- 2
backend/web/js/vuejs/distribution-index.js View File

} }


if (distributions.length) { if (distributions.length) {
var fillMode = 'solid';
var dayToday = app.formatDate(new Date());
for (var i = 0; i < distributions.length; i++) { for (var i = 0; i < distributions.length; i++) {
if(distributions[i].date < dayToday) {
fillMode = 'outline';
}
else {
fillMode = 'solid';
}

app.calendar.attrs.push({ app.calendar.attrs.push({
key: distributions[i].date, key: distributions[i].date,
highlight: true,
dates: distributions[i].date
dates: distributions[i].date,
highlight: {
color: 'green',
fillMode: fillMode
}
}); });


if (distributions[i].date == dateFormatCompare) { if (distributions[i].date == dateFormatCompare) {

Loading…
Cancel
Save