Merge branch 'test' into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-02-26 14:26:47 +01:00
commit 4d53564602
11 changed files with 29 additions and 22 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -28,9 +28,6 @@ class VnMySQL extends MySQL {
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;
}
@ -57,7 +54,6 @@ class VnMySQL extends MySQL {
let locale = new Date(param);
let offset = locale.getTimezoneOffset() * 60000;
param.setTime(param.getTime() - offset);
console.log(param);
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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