-
+
!this.hasInvoice()},
- {callback: this.createClaim, name: 'Add claim'},
- {callback: this.showSMSDialog, name: 'Send SMS'}
+ {name: 'Send SMS', callback: this.showSMSDialog},
+ {
+ name: 'Mark as reserved',
+ callback: this.markAsReserved,
+ show: () => this.isEditable
+ },
+ {
+ name: 'Unmark as reserved',
+ callback: this.unmarkAsReserved,
+ show: () => this.isEditable
+ },
+ {
+ name: 'Update discount',
+ callback: this.showEditDialog,
+ show: () => this.isEditable
+ },
+ {
+ name: 'Add claim',
+ callback: this.createClaim,
+ show: () => this.isEditable
+ },
];
this._sales = [];
this.imagesPath = '//verdnatura.es/vn-image-data/catalog';
@@ -431,15 +447,6 @@ class Controller {
this.$scope.sms.open();
}
- /**
- * Returns if the current ticket
- * is already invoiced
- * @return {Boolean} - True if invoiced
- */
- hasInvoice() {
- return this.ticket.refFk !== null;
- }
-
/**
* Inserts a new instance
*/
diff --git a/modules/ticket/front/sale/style.scss b/modules/ticket/front/sale/style.scss
index 8abb6d6b42..fb70f08445 100644
--- a/modules/ticket/front/sale/style.scss
+++ b/modules/ticket/front/sale/style.scss
@@ -89,17 +89,19 @@ vn-ticket-sale {
}
}
.edit-price {
- width: 200px;
+ min-width: 200px;
- .header {
+ section.header {
background-color: $color-main;
color: $color-font-dark;
+ text-align: center;
h5 {
color: inherit;
margin: 0 auto;
}
}
+
p.simulatorTitle {
margin-bottom: 0px;
font-size: 12px;
diff --git a/modules/worker/back/methods/worker-time-control/addTime.js b/modules/worker/back/methods/worker-time-control/addTime.js
index cb639f9af8..5548654bc9 100644
--- a/modules/worker/back/methods/worker-time-control/addTime.js
+++ b/modules/worker/back/methods/worker-time-control/addTime.js
@@ -38,5 +38,8 @@ module.exports = Self => {
timed: data.timed,
manual: 1
});
+
+ /* return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [
+ subordinate.userFk, null, data.timed, true]); */
};
};
diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json
index 35a039d3c3..df2b776fb5 100644
--- a/modules/worker/back/model-config.json
+++ b/modules/worker/back/model-config.json
@@ -49,5 +49,14 @@
},
"Device": {
"dataSource": "vn"
+ },
+ "UserPhoneType": {
+ "dataSource": "vn"
+ },
+ "UserPhone": {
+ "dataSource": "vn"
+ },
+ "UserLog": {
+ "dataSource": "vn"
}
}
diff --git a/modules/worker/back/models/user-log.json b/modules/worker/back/models/user-log.json
new file mode 100644
index 0000000000..e3e3a67521
--- /dev/null
+++ b/modules/worker/back/models/user-log.json
@@ -0,0 +1,58 @@
+{
+ "name": "UserLog",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "userLog"
+ }
+ },
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "Number",
+ "forceId": false
+ },
+ "originFk": {
+ "type": "Number",
+ "required": true
+ },
+ "userFk": {
+ "type": "Number"
+ },
+ "action": {
+ "type": "String",
+ "required": true
+ },
+ "changedModel": {
+ "type": "String"
+ },
+ "oldInstance": {
+ "type": "Object"
+ },
+ "newInstance": {
+ "type": "Object"
+ },
+ "creationDate": {
+ "type": "Date"
+ },
+ "changedModelId": {
+ "type": "Number"
+ },
+ "changedModelValue": {
+ "type": "String"
+ },
+ "description": {
+ "type": "String"
+ }
+ },
+ "relations": {
+ "user": {
+ "type": "belongsTo",
+ "model": "Account",
+ "foreignKey": "userFk"
+ }
+ },
+ "scope": {
+ "order": ["creationDate DESC", "id DESC"]
+ }
+}
diff --git a/modules/worker/back/models/user-phone-type.json b/modules/worker/back/models/user-phone-type.json
new file mode 100644
index 0000000000..479f02d6fd
--- /dev/null
+++ b/modules/worker/back/models/user-phone-type.json
@@ -0,0 +1,18 @@
+{
+ "name": "UserPhoneType",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "userPhoneType"
+ }
+ },
+ "properties": {
+ "code": {
+ "id": true,
+ "type": "String"
+ },
+ "description": {
+ "type": "String"
+ }
+ }
+}
diff --git a/modules/worker/back/models/user-phone.json b/modules/worker/back/models/user-phone.json
new file mode 100644
index 0000000000..c869a808d0
--- /dev/null
+++ b/modules/worker/back/models/user-phone.json
@@ -0,0 +1,34 @@
+{
+ "name": "UserPhone",
+ "base": "Loggable",
+ "log": {
+ "model":"UserLog"
+ },
+ "options": {
+ "mysql": {
+ "table": "userPhone"
+ }
+ },
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "String"
+ },
+ "phone": {
+ "type": "Number",
+ "required": true
+ }
+ },
+ "relations": {
+ "user": {
+ "type": "belongsTo",
+ "model": "Account",
+ "foreignKey": "userFk"
+ },
+ "type": {
+ "type": "belongsTo",
+ "model": "UserPhoneType",
+ "foreignKey": "typeFk"
+ }
+ }
+}
diff --git a/modules/worker/front/time-control/index.js b/modules/worker/front/time-control/index.js
index a13a1d3845..9bb04ac038 100644
--- a/modules/worker/front/time-control/index.js
+++ b/modules/worker/front/time-control/index.js
@@ -235,9 +235,7 @@ class Controller {
if (response === 'ACCEPT') {
let data = {workerFk: this.worker.id, timed: this.newTime};
let query = `/api/WorkerTimeControls/addTime`;
- this.$http.post(query, data).then(() => {
- this.refresh();
- });
+ this.$http.post(query, data).then(() => this.refresh());
}
}
}
diff --git a/print/report/rpt-delivery-note/index.html b/print/report/rpt-delivery-note/index.html
index 4a994f8478..1aea41883c 100644
--- a/print/report/rpt-delivery-note/index.html
+++ b/print/report/rpt-delivery-note/index.html
@@ -105,7 +105,6 @@
-
|
diff --git a/print/report/rpt-delivery-note/index.js b/print/report/rpt-delivery-note/index.js
index 08e2e88274..be6bb83c5a 100755
--- a/print/report/rpt-delivery-note/index.js
+++ b/print/report/rpt-delivery-note/index.js
@@ -59,8 +59,8 @@ module.exports = {
percent(input) {
return new Intl.NumberFormat('es', {
style: 'percent',
- minimumFractionDigits: 0,
- maximumFractionDigits: 0
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2
}).format(parseFloat(input));
},
date(input) {
diff --git a/webpack.config.js b/webpack.config.js
index 79ea19e503..1efcf5f01b 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -55,7 +55,7 @@ let baseConfig = {
}, {
loader: 'sass-loader',
options: {
- // FIXME: Don't work in Firefox
+ // XXX: Don't work in Firefox
// https://github.com/webpack-contrib/style-loader/issues/303
// sourceMap: true,
includePaths: [