Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Gerard 2019-02-26 17:19:49 +01:00
commit 44bc150d49
11 changed files with 29 additions and 22 deletions

View File

@ -19,7 +19,7 @@
icon="keyboard_arrow_right" icon="keyboard_arrow_right"
class="pointer" class="pointer"
ng-click="$ctrl.moveNext($ctrl.skip)" ng-click="$ctrl.moveNext($ctrl.skip)"
ng-show="$ctrl.displayControls" ng-show="$ctrl.displayControls">
</vn-icon> </vn-icon>
</vn-auto> </vn-auto>
</vn-horizontal> </vn-horizontal>

View File

@ -3,7 +3,7 @@
<div class="textField"> <div class="textField">
<div class="leftIcons"> <div class="leftIcons">
<vn-icon-button <vn-icon-button
ng-if="::$ctrl.step" ng-if="$ctrl.controls"
icon="remove" icon="remove"
ng-click="$ctrl.remove()" ng-click="$ctrl.remove()"
tabindex="-1" tabindex="-1"
@ -27,7 +27,7 @@
<div class="selected underline"></div> <div class="selected underline"></div>
<div class="suffix"> <div class="suffix">
<vn-icon-button <vn-icon-button
ng-if="::$ctrl.step" ng-if="$ctrl.controls"
icon="add" icon="add"
ng-click="$ctrl.add()" ng-click="$ctrl.add()"
tabindex="-1" tabindex="-1"

View File

@ -5,7 +5,7 @@ import './style.scss';
export default class InputNumber extends Textfield { export default class InputNumber extends Textfield {
constructor($element, $scope, $attrs, vnTemplate, $transclude) { constructor($element, $scope, $attrs, vnTemplate, $transclude) {
super($element, $scope, $attrs, vnTemplate, $transclude); super($element, $scope, $attrs, vnTemplate, $transclude);
this.displayControls = true;
this.input.addEventListener('change', () => { this.input.addEventListener('change', () => {
this.validateValue(); this.validateValue();
}); });
@ -94,6 +94,7 @@ ngModule.component('vnInputNumber', {
min: '<?', min: '<?',
max: '<?', max: '<?',
step: '<?', step: '<?',
displayControls: '<?',
rule: '@?', rule: '@?',
value: '=model', value: '=model',
validate: '&', validate: '&',

View File

@ -424,7 +424,8 @@ function dockerWait() {
user: dbConf.username, user: dbConf.username,
password: dbConf.password, password: dbConf.password,
host: dbConf.host, host: dbConf.host,
port: dbConf.port port: dbConf.port,
dateStrings: true
}; };
log('Waiting for MySQL init process...'); log('Waiting for MySQL init process...');

View File

@ -28,9 +28,6 @@ class VnMySQL extends MySQL {
return MySQL.prototype.fromColumnValue.call(this, prop, val); return MySQL.prototype.fromColumnValue.call(this, prop, val);
let date = new Date(val); let date = new Date(val);
let locale = new Date(val);
let offset = locale.getTimezoneOffset() * 60000;
date.setTime(date.getTime() + offset);
return date; return date;
} }
@ -57,7 +54,6 @@ class VnMySQL extends MySQL {
let locale = new Date(param); let locale = new Date(param);
let offset = locale.getTimezoneOffset() * 60000; let offset = locale.getTimezoneOffset() * 60000;
param.setTime(param.getTime() - offset); param.setTime(param.getTime() - offset);
console.log(param);
} }
} }
} }

View File

@ -4,7 +4,7 @@
}, },
"vn": { "vn": {
"connector": "vn-mysql", "connector": "vn-mysql",
"timezone": "CET", "timezone": "local",
"database": "vn", "database": "vn",
"debug": false, "debug": false,
"host": "localhost", "host": "localhost",

View File

@ -37,7 +37,8 @@
min="0" min="0"
step="1" step="1"
label="Traveling days" label="Traveling days"
field="$ctrl.zone.travelingDays"> field="$ctrl.zone.travelingDays"
display-controls="false">
</vn-input-number> </vn-input-number>
<vn-input-time <vn-input-time
vn-two vn-two
@ -50,13 +51,15 @@
label="Price" label="Price"
field="$ctrl.zone.price" field="$ctrl.zone.price"
min="0.00" min="0.00"
step="0.50"> step="0.20"
display-controls="false">
</vn-input-number> </vn-input-number>
<vn-input-number vn-one <vn-input-number vn-one
label="Bonus" label="Bonus"
field="$ctrl.zone.bonus" field="$ctrl.zone.bonus"
min="0.00" min="0.00"
step="0.50"> step="0.20"
display-controls="false">
</vn-input-number> </vn-input-number>
</vn-horizontal> </vn-horizontal>
</vn-card> </vn-card>

View File

@ -56,8 +56,11 @@ class Controller {
const events = []; const events = [];
value.forEach(event => { value.forEach(event => {
let date = new Date(event.delivered);
date.setHours(0, 0, 0, 0);
events.push({ events.push({
date: event.delivered, date: date,
color: 'green-circle', color: 'green-circle',
title: 'Has delivery', title: 'Has delivery',
isRemovable: true isRemovable: true

View File

@ -39,7 +39,8 @@
value="$ctrl.zone.travelingDays" value="$ctrl.zone.travelingDays"
step="1" step="1"
label="Traveling days" label="Traveling days"
field="$ctrl.zone.travelingDays"> field="$ctrl.zone.travelingDays"
display-controls="false">
</vn-input-number> </vn-input-number>
<vn-input-time <vn-input-time
vn-two vn-two
@ -51,12 +52,16 @@
<vn-input-number vn-one <vn-input-number vn-one
label="Price" label="Price"
field="$ctrl.zone.price" field="$ctrl.zone.price"
min="0.00"> min="0.00"
step="0.20"
display-controls="false">
</vn-input-number> </vn-input-number>
<vn-input-number vn-one <vn-input-number vn-one
label="Bonus" label="Bonus"
field="$ctrl.zone.bonus" field="$ctrl.zone.bonus"
min="0.00"> min="0.00"
step="0.20"
display-controls="false">
</vn-input-number> </vn-input-number>
</vn-horizontal> </vn-horizontal>
</vn-card> </vn-card>

View File

@ -1,5 +1,4 @@
import ngModule from '../../module'; import ngModule from '../../module';
import {toJsonDate} from 'core/lib/date';
import './style.scss'; import './style.scss';
class Controller { class Controller {
@ -66,7 +65,7 @@ class Controller {
onChangeShipped(value) { onChangeShipped(value) {
let data = { let data = {
shipped: toJsonDate(value), shipped: value,
addressFk: this.ticket.addressFk, addressFk: this.ticket.addressFk,
agencyModeFk: this.ticket.agencyModeFk, agencyModeFk: this.ticket.agencyModeFk,
warehouseFk: this.ticket.warehouseFk warehouseFk: this.ticket.warehouseFk
@ -128,7 +127,7 @@ class Controller {
let query = `/ticket/api/sales/${this.ticket.id}/priceDifference`; let query = `/ticket/api/sales/${this.ticket.id}/priceDifference`;
let data = { let data = {
landed: toJsonDate(this.ticket.landed), landed: this.ticket.landed,
addressFk: this.ticket.addressFk, addressFk: this.ticket.addressFk,
agencyModeFk: this.ticket.agencyModeFk, agencyModeFk: this.ticket.agencyModeFk,
warehouseFk: this.ticket.warehouseFk warehouseFk: this.ticket.warehouseFk

View File

@ -1,5 +1,4 @@
import './index.js'; import './index.js';
import {toJsonDate} from 'core/lib/date';
describe('Ticket', () => { describe('Ticket', () => {
describe('Component vnTicketDataStepOne', () => { describe('Component vnTicketDataStepOne', () => {
@ -68,7 +67,7 @@ describe('Ticket', () => {
warehouseFk: 1 warehouseFk: 1
}; };
let data = { let data = {
shipped: toJsonDate(shipped), shipped: shipped,
addressFk: 121, addressFk: 121,
agencyModeFk: 2, agencyModeFk: 2,
warehouseFk: 1 warehouseFk: 1