Merge branch 'test' into dev

This commit is contained in:
Gerard 2019-02-25 13:46:56 +01:00
commit 699757543a
5 changed files with 4 additions and 33 deletions

View File

@ -1,3 +1,4 @@
node_modules
print/node_modules
front/node_modules
services

View File

@ -1,4 +1,5 @@
FROM debian:stretch-slim
ENV TZ Europe/Madrid
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \

View File

@ -93,7 +93,7 @@ export default class Calendar extends Component {
}
applyOffset(date) {
// date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
}
repaint() {
@ -139,12 +139,6 @@ export default class Calendar extends Component {
return event.date >= newDate && event.date <= newDate;
});
/* if (curDate >= newDate && curDate <= newDate)
color = 'orange'; */
/* if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 6)
color = 'light-blue'; */
if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 0)
color = 'red';

View File

@ -24,18 +24,6 @@ class VnMySQL extends MySQL {
}
}
fromColumnValue(prop, val) {
if (val == null || !prop || prop.type !== Date)
return MySQL.prototype.fromColumnValue.call(this, prop, val);
let date = new Date(val);
let locale = new Date(val);
let offset = locale.getTimezoneOffset() * 60000;
date.setTime(date.getTime() + offset);
return date;
}
/**
* Promisified version of execute().
*
@ -46,16 +34,6 @@ class VnMySQL extends MySQL {
* @return {Promise} The operation promise
*/
executeP(query, params, options = {}, cb) {
if (params) {
for (let param of params) {
if (param && typeof param.getMonth === 'function') {
let locale = new Date(param);
let offset = locale.getTimezoneOffset() * 60000;
param.setTime(param.getTime() - offset);
}
}
}
return new Promise((resolve, reject) => {
this.execute(query, params, options, (error, response) => {
if (cb)

View File

@ -116,10 +116,7 @@ class Controller {
if (event && !event.isRemovable)
return false;
// FIXME - Date offset
let date = new Date(day.date);
date.setHours(0, 0, 0, 0);
dates.push(date);
dates.push(day.date);
this.stMonth.removeEvent(day.date);
this.stMonth.repaint();