@@ -490,7 +464,7 @@
+ ng-click="$ctrl.showEditDiscountPopover($event, sale)">
Update discount
{
return sale.discount != newDiscount;
});
-
if (newDiscount != null && hasChanges)
this.updateDiscount(sales);
- this.$.editDiscountDialog.hide();
+ this.$.editDiscount.hide();
}
updateDiscount(sales) {
@@ -303,7 +297,7 @@ class Controller extends Section {
}
getNewPrice() {
- if (this.edit) {
+ if (this.edit.sale) {
const sale = this.edit.sale;
let newDiscount = sale.discount;
let newPrice = this.edit.price || sale.price;
@@ -505,7 +499,8 @@ class Controller extends Section {
}
save() {
- this.changeDiscount();
+ if (this.edit.sale) this.changeDiscount();
+ if (this.edit.sales) this.changeMultipleDiscount();
}
cancel() {
diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js
index 28d8749328..a59eb3865c 100644
--- a/modules/ticket/front/sale/index.spec.js
+++ b/modules/ticket/front/sale/index.spec.js
@@ -393,7 +393,7 @@ describe('Ticket', () => {
secondSelectedSale.checked = true;
const expectedSales = [firstSelectedSale, secondSelectedSale];
- controller.$.editDiscountDialog = {hide: jest.fn()};
+ controller.$.editDiscount = {hide: jest.fn()};
controller.edit = {
discount: 10,
sales: expectedSales
@@ -402,7 +402,7 @@ describe('Ticket', () => {
controller.changeMultipleDiscount();
expect(controller.updateDiscount).toHaveBeenCalledWith(expectedSales);
- expect(controller.$.editDiscountDialog.hide).toHaveBeenCalledWith();
+ expect(controller.$.editDiscount.hide).toHaveBeenCalledWith();
});
it('should not call to the updateDiscount() method and then to the editDiscountDialog hide() method', () => {
@@ -417,7 +417,7 @@ describe('Ticket', () => {
secondSelectedSale.discount = 10;
const expectedSales = [firstSelectedSale, secondSelectedSale];
- controller.$.editDiscountDialog = {hide: jest.fn()};
+ controller.$.editDiscount = {hide: jest.fn()};
controller.edit = {
discount: 10,
sales: expectedSales
@@ -426,7 +426,7 @@ describe('Ticket', () => {
controller.changeMultipleDiscount();
expect(controller.updateDiscount).not.toHaveBeenCalledWith(expectedSales);
- expect(controller.$.editDiscountDialog.hide).toHaveBeenCalledWith();
+ expect(controller.$.editDiscount.hide).toHaveBeenCalledWith();
});
});
diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json
index c155e331de..8c11c0d717 100644
--- a/modules/worker/back/model-config.json
+++ b/modules/worker/back/model-config.json
@@ -64,6 +64,9 @@
},
"WorkerTimeControlMail": {
"dataSource": "vn"
+ },
+ "WorkerDisableExcluded": {
+ "dataSource": "vn"
}
}
diff --git a/modules/worker/back/models/workerDisableExcluded.json b/modules/worker/back/models/workerDisableExcluded.json
new file mode 100644
index 0000000000..48083748d2
--- /dev/null
+++ b/modules/worker/back/models/workerDisableExcluded.json
@@ -0,0 +1,26 @@
+{
+ "name": "WorkerDisableExcluded",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "workerDisableExcluded"
+ }
+ },
+ "properties": {
+ "workerFk": {
+ "id": true,
+ "type": "number"
+ },
+ "dated": {
+ "type": "date"
+ }
+ },
+ "acls": [
+ {
+ "accessType": "READ",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "ALLOW"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html
index 01681ebb80..58ac3d9e6e 100644
--- a/modules/worker/front/descriptor/index.html
+++ b/modules/worker/front/descriptor/index.html
@@ -14,6 +14,20 @@
+
+
+ Click to exclude the user from getting disabled
+
+
+ Click to allow the user to be disabled
+
+
+
+
+
+
{
+ this.excluded = data.data.exists;
+ });
+ }
+
+ handleExcluded() {
+ if (this.excluded) {
+ this.$http.delete(`workerDisableExcludeds/${this.entity.id}`);
+ this.excluded = false;
+ } else {
+ this.$http.post(`workerDisableExcludeds`, {workerFk: this.entity.id, dated: new Date});
+ this.excluded = true;
+ }
}
loadData() {
diff --git a/modules/worker/front/locale/es.yml b/modules/worker/front/locale/es.yml
index 1414d089bc..672f4c52f9 100644
--- a/modules/worker/front/locale/es.yml
+++ b/modules/worker/front/locale/es.yml
@@ -20,4 +20,7 @@ View worker: Ver trabajador
Worker id: Id trabajador
Workers: Trabajadores
worker: trabajador
-Go to the worker: Ir al trabajador
\ No newline at end of file
+Go to the worker: Ir al trabajador
+Click to exclude the user from getting disabled: Marcar para no deshabilitar
+Click to allow the user to be disabled: Marcar para deshabilitar
+This user can't be disabled: Fijado para no deshabilitar
\ No newline at end of file
diff --git a/package.json b/package.json
index 26c164832a..ae4817ab0a 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"bcrypt": "^5.0.1",
"bmp-js": "^0.1.0",
"compression": "^1.7.3",
+ "form-data": "^4.0.0",
"fs-extra": "^5.0.0",
"ftps": "^1.2.0",
"got": "^10.7.0",
@@ -38,7 +39,7 @@
"node-ssh": "^11.0.0",
"object-diff": "0.0.4",
"object.pick": "^1.3.0",
- "puppeteer": "^18.0.5",
+ "puppeteer": "^19.0.0",
"read-chunk": "^3.2.0",
"require-yaml": "0.0.1",
"sharp": "^0.31.0",
diff --git a/print/templates/email/campaign-metrics/campaign-metrics.js b/print/templates/email/campaign-metrics/campaign-metrics.js
index 0c3a01991d..c3ff4a5cac 100755
--- a/print/templates/email/campaign-metrics/campaign-metrics.js
+++ b/print/templates/email/campaign-metrics/campaign-metrics.js
@@ -21,7 +21,7 @@ module.exports = {
},
props: {
id: {
- type: [Number, String],
+ type: Number,
required: true
},
from: {
diff --git a/print/templates/email/claim-pickup-order/claim-pickup-order.html b/print/templates/email/claim-pickup-order/claim-pickup-order.html
index f674dcee8b..32606bd7b4 100644
--- a/print/templates/email/claim-pickup-order/claim-pickup-order.html
+++ b/print/templates/email/claim-pickup-order/claim-pickup-order.html
@@ -23,9 +23,10 @@
-
{{ $t('title') }}
-
{{$t('description.dear')}},
-
{{$t('description.instructions')}}
+
{{ $t('title', [id]) }}
+
{{ $t('description.dear') }},
+
+
{{ $t('description.conclusion') }}
@@ -43,4 +44,4 @@