Merge branch 'test' into dev
This commit is contained in:
commit
699757543a
|
@ -1,3 +1,4 @@
|
|||
node_modules
|
||||
print/node_modules
|
||||
front/node_modules
|
||||
services
|
|
@ -1,4 +1,5 @@
|
|||
FROM debian:stretch-slim
|
||||
ENV TZ Europe/Madrid
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update \
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue