|
|
@@ -155,6 +155,7 @@ var app = new Vue({ |
|
|
|
|
|
|
|
axios.get("ajax-infos",{params: {date : this.getDate()}}) |
|
|
|
.then(function(response) { |
|
|
|
app.calendar.attrs = []; |
|
|
|
app.distribution = response.data.distribution ; |
|
|
|
app.producer = response.data.producer ; |
|
|
|
app.products = response.data.products ; |
|
|
@@ -202,13 +203,25 @@ var app = new Vue({ |
|
|
|
|
|
|
|
app.calendar.attrs = [] ; |
|
|
|
var distributions = response.data.distributions ; |
|
|
|
var dayCurrentIsDistributionActive = false; |
|
|
|
var dateFormatCompare = false; |
|
|
|
if(app.date) { |
|
|
|
dateFormatCompare = app.date.getFullYear() + '-' |
|
|
|
+ ('0' + (app.date.getMonth() +1)).slice(-2) + '-' |
|
|
|
+ ('0' + app.date.getDate()).slice(-2); |
|
|
|
} |
|
|
|
|
|
|
|
if(distributions.length) { |
|
|
|
for(var i= 0; i < distributions.length; i++) { |
|
|
|
app.calendar.attrs.push({ |
|
|
|
key: distributions[i].date, |
|
|
|
highlight: true, |
|
|
|
dates: distributions[i].date |
|
|
|
}) ; |
|
|
|
|
|
|
|
if(distributions[i].date == dateFormatCompare) { |
|
|
|
dayCurrentIsDistributionActive = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -226,6 +239,22 @@ var app = new Vue({ |
|
|
|
} |
|
|
|
|
|
|
|
setTimeout("opendistrib_popover();", 500); |
|
|
|
|
|
|
|
var highlightStyle = { |
|
|
|
color: 'orange', |
|
|
|
fillMode: 'light' |
|
|
|
} |
|
|
|
if(dayCurrentIsDistributionActive) { |
|
|
|
highlightStyle = { |
|
|
|
color: 'orange', |
|
|
|
fillMode: 'solid' |
|
|
|
} |
|
|
|
} |
|
|
|
app.calendar.attrs.push({ |
|
|
|
key: 'current', |
|
|
|
highlight: highlightStyle, |
|
|
|
dates: app.date |
|
|
|
}); |
|
|
|
}) ; |
|
|
|
}, |
|
|
|
initCountActiveProducts: function() { |