-
\ No newline at end of file
+
+
+
+
diff --git a/modules/client/front/index.js b/modules/client/front/index.js
index d9f3a8a17..ea732beea 100644
--- a/modules/client/front/index.js
+++ b/modules/client/front/index.js
@@ -46,3 +46,4 @@ import './consumption';
import './consumption-search-panel';
import './defaulter';
import './notification';
+import './unpaid';
diff --git a/modules/client/front/locale/es.yml b/modules/client/front/locale/es.yml
index 107931377..4eb99318c 100644
--- a/modules/client/front/locale/es.yml
+++ b/modules/client/front/locale/es.yml
@@ -61,4 +61,5 @@ Log: Historial
Consumption: Consumo
Compensation Account: Cuenta para compensar
Amount to return: Cantidad a devolver
-Delivered amount: Cantidad entregada
\ No newline at end of file
+Delivered amount: Cantidad entregada
+Unpaid: Impagado
\ No newline at end of file
diff --git a/modules/client/front/main/index.js b/modules/client/front/main/index.js
index 61cde8b22..1069d3487 100644
--- a/modules/client/front/main/index.js
+++ b/modules/client/front/main/index.js
@@ -23,6 +23,7 @@ export default class Client extends ModuleMain {
case 'id':
case 'fi':
case 'postcode':
+ case 'provinceFk':
case 'salesPersonFk':
return {[param]: value};
}
diff --git a/modules/client/front/notification/index.html b/modules/client/front/notification/index.html
index f503c95c8..49e4e3c3f 100644
--- a/modules/client/front/notification/index.html
+++ b/modules/client/front/notification/index.html
@@ -67,7 +67,7 @@
{{::client.id}}
@@ -83,7 +83,9 @@
-
+
+
\ No newline at end of file
diff --git a/modules/client/front/unpaid/index.js b/modules/client/front/unpaid/index.js
new file mode 100644
index 000000000..a8ff64386
--- /dev/null
+++ b/modules/client/front/unpaid/index.js
@@ -0,0 +1,14 @@
+import ngModule from '../module';
+import Section from 'salix/components/section';
+
+export default class Controller extends Section {
+ setDefaultDate(hasData) {
+ if (hasData && !this.clientUnpaid.dated)
+ this.clientUnpaid.dated = new Date();
+ }
+}
+
+ngModule.vnComponent('vnClientUnpaid', {
+ template: require('./index.html'),
+ controller: Controller
+});
diff --git a/modules/client/front/unpaid/index.spec.js b/modules/client/front/unpaid/index.spec.js
new file mode 100644
index 000000000..bfeb7df19
--- /dev/null
+++ b/modules/client/front/unpaid/index.spec.js
@@ -0,0 +1,38 @@
+import './index';
+
+describe('client unpaid', () => {
+ describe('Component vnClientUnpaid', () => {
+ let controller;
+
+ beforeEach(ngModule('client'));
+
+ beforeEach(inject($componentController => {
+ const $element = angular.element('');
+ controller = $componentController('vnClientUnpaid', {$element});
+ }));
+
+ describe('setDefaultDate()', () => {
+ it(`should not set today date if has dated`, () => {
+ const hasData = true;
+ const yesterday = new Date();
+ yesterday.setDate(yesterday.getDate() - 1);
+
+ controller.clientUnpaid = {
+ dated: yesterday
+ };
+ controller.setDefaultDate(hasData);
+
+ expect(controller.clientUnpaid.dated).toEqual(yesterday);
+ });
+
+ it(`should set today if not has dated`, () => {
+ const hasData = true;
+
+ controller.clientUnpaid = {};
+ controller.setDefaultDate(hasData);
+
+ expect(controller.clientUnpaid.dated).toBeDefined();
+ });
+ });
+ });
+});
diff --git a/modules/client/front/unpaid/locale/es.yml b/modules/client/front/unpaid/locale/es.yml
new file mode 100644
index 000000000..d88764407
--- /dev/null
+++ b/modules/client/front/unpaid/locale/es.yml
@@ -0,0 +1 @@
+Unpaid client: Cliente impagado
\ No newline at end of file
diff --git a/modules/entry/front/descriptor/index.html b/modules/entry/front/descriptor/index.html
index 04bef0024..f0e2439bb 100644
--- a/modules/entry/front/descriptor/index.html
+++ b/modules/entry/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.entry.supplier.nickname"
+ summary="$ctrl.$.summary">
+
+
+
\ No newline at end of file
diff --git a/modules/invoiceIn/back/methods/invoice-in/summary.js b/modules/invoiceIn/back/methods/invoice-in/summary.js
index acabe29d9..0e55eeaac 100644
--- a/modules/invoiceIn/back/methods/invoice-in/summary.js
+++ b/modules/invoiceIn/back/methods/invoice-in/summary.js
@@ -64,6 +64,34 @@ module.exports = Self => {
}]
}
},
+ {
+ relation: 'invoiceInIntrastat',
+ scope: {
+ fields: [
+ 'id',
+ 'invoiceInFk',
+ 'net',
+ 'intrastatFk',
+ 'amount',
+ 'stems',
+ 'countryFk',
+ 'statisticalValue'],
+ include: [{
+ relation: 'intrastat',
+ scope: {
+ fields: [
+ 'id',
+ 'description']
+ }
+ },
+ {
+ relation: 'country',
+ scope: {
+ fields: ['code']
+ }
+ }]
+ }
+ },
{
relation: 'invoiceInTax',
scope: {
diff --git a/modules/invoiceIn/back/model-config.json b/modules/invoiceIn/back/model-config.json
index f0745f53b..6765ae81c 100644
--- a/modules/invoiceIn/back/model-config.json
+++ b/modules/invoiceIn/back/model-config.json
@@ -8,6 +8,9 @@
"InvoiceInDueDay": {
"dataSource": "vn"
},
+ "InvoiceInIntrastat": {
+ "dataSource": "vn"
+ },
"InvoiceInLog": {
"dataSource": "vn"
}
diff --git a/modules/invoiceIn/back/models/invoice-in-intrastat.json b/modules/invoiceIn/back/models/invoice-in-intrastat.json
new file mode 100644
index 000000000..65ab1f36a
--- /dev/null
+++ b/modules/invoiceIn/back/models/invoice-in-intrastat.json
@@ -0,0 +1,50 @@
+{
+ "name": "InvoiceInIntrastat",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "invoiceInIntrastat"
+ }
+ },
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "number",
+ "description": "Identifier"
+ },
+ "invoiceInFk": {
+ "type": "number"
+ },
+ "net": {
+ "type": "number"
+ },
+ "intrastatFk": {
+ "type": "number"
+ },
+ "amount": {
+ "type": "number"
+ },
+ "stems": {
+ "type": "number"
+ },
+ "countryFk": {
+ "type": "number"
+ },
+ "statisticalValue": {
+ "type": "number"
+ }
+ },
+ "relations": {
+ "intrastat": {
+ "type": "belongsTo",
+ "model": "Intrastat",
+ "foreignKey": "intrastatFk"
+ },
+ "country": {
+ "type": "belongsTo",
+ "model": "Country",
+ "foreignKey": "countryFk"
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/modules/invoiceIn/back/models/invoice-in.json b/modules/invoiceIn/back/models/invoice-in.json
index feb2d9aec..c6a736b06 100644
--- a/modules/invoiceIn/back/models/invoice-in.json
+++ b/modules/invoiceIn/back/models/invoice-in.json
@@ -64,6 +64,11 @@
"model": "InvoiceInDueDay",
"foreignKey": "invoiceInFk"
},
+ "invoiceInIntrastat": {
+ "type": "hasMany",
+ "model": "InvoiceInIntrastat",
+ "foreignKey": "invoiceInFk"
+ },
"invoiceInTax": {
"type": "hasMany",
"model": "InvoiceInTax",
diff --git a/modules/invoiceIn/front/descriptor/index.html b/modules/invoiceIn/front/descriptor/index.html
index a51743091..33f9ee8c6 100644
--- a/modules/invoiceIn/front/descriptor/index.html
+++ b/modules/invoiceIn/front/descriptor/index.html
@@ -1,4 +1,7 @@
-
+
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/modules/invoiceIn/front/index.js b/modules/invoiceIn/front/index.js
index 18e9d73c2..7b6d6a77c 100644
--- a/modules/invoiceIn/front/index.js
+++ b/modules/invoiceIn/front/index.js
@@ -10,5 +10,6 @@ import './summary';
import './basic-data';
import './tax';
import './dueDay';
+import './intrastat';
import './create';
import './log';
diff --git a/modules/invoiceIn/front/intrastat/index.html b/modules/invoiceIn/front/intrastat/index.html
new file mode 100644
index 000000000..cb447132d
--- /dev/null
+++ b/modules/invoiceIn/front/intrastat/index.html
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/invoiceIn/front/intrastat/index.js b/modules/invoiceIn/front/intrastat/index.js
new file mode 100644
index 000000000..659929513
--- /dev/null
+++ b/modules/invoiceIn/front/intrastat/index.js
@@ -0,0 +1,60 @@
+import ngModule from '../module';
+import Section from 'salix/components/section';
+
+class Controller extends Section {
+ set invoceInIntrastat(value) {
+ this._invoceInIntrastat = value;
+
+ if (value) this.calculateTotals();
+ }
+
+ get invoceInIntrastat() {
+ return this._invoceInIntrastat;
+ }
+
+ calculateTotals() {
+ this.amountTotal = 0.0;
+ this.netTotal = 0.0;
+ this.stemsTotal = 0.0;
+ if (!this.invoceInIntrastat) return;
+
+ this.invoceInIntrastat.forEach(intrastat => {
+ this.amountTotal += intrastat.amount;
+ this.netTotal += intrastat.net;
+ this.stemsTotal += intrastat.stems;
+ });
+ }
+
+ add() {
+ this.$.model.insert({});
+ }
+
+ deleteIntrastat($index) {
+ this.$.model.remove($index);
+ this.$.model.save().then(() => {
+ this.vnApp.showSuccess(this.$t('Data saved!'));
+ this.calculateTotals();
+ });
+ }
+
+ onSubmit() {
+ this.$.watcher.check();
+ this.$.model.save().then(() => {
+ this.$.watcher.notifySaved();
+ this.$.watcher.updateOriginalData();
+ this.calculateTotals();
+ this.card.reload();
+ });
+ }
+}
+
+ngModule.vnComponent('vnInvoiceInIntrastat', {
+ template: require('./index.html'),
+ controller: Controller,
+ require: {
+ card: '^vnInvoiceInCard'
+ },
+ bindings: {
+ invoiceIn: '<'
+ }
+});
diff --git a/modules/invoiceIn/front/intrastat/index.spec.js b/modules/invoiceIn/front/intrastat/index.spec.js
new file mode 100644
index 000000000..d7d50ac5b
--- /dev/null
+++ b/modules/invoiceIn/front/intrastat/index.spec.js
@@ -0,0 +1,85 @@
+import './index.js';
+import watcher from 'core/mocks/watcher';
+import crudModel from 'core/mocks/crud-model';
+
+describe('InvoiceIn', () => {
+ describe('Component intrastat', () => {
+ let controller;
+ let $scope;
+ let vnApp;
+
+ beforeEach(ngModule('invoiceIn'));
+
+ beforeEach(inject(($componentController, $rootScope, _vnApp_) => {
+ vnApp = _vnApp_;
+ jest.spyOn(vnApp, 'showError');
+ $scope = $rootScope.$new();
+ $scope.model = crudModel;
+ $scope.watcher = watcher;
+
+ const $element = angular.element('');
+ controller = $componentController('vnInvoiceInIntrastat', {$element, $scope});
+ controller.invoiceIn = {id: 1};
+ }));
+
+ describe('calculateTotals()', () => {
+ it('should set amountTotal, netTotal and stemsTotal to 0 if salesClaimed has no data', () => {
+ controller.invoceInIntrastat = [];
+ controller.calculateTotals();
+
+ expect(controller.amountTotal).toEqual(0);
+ expect(controller.netTotal).toEqual(0);
+ expect(controller.stemsTotal).toEqual(0);
+ });
+
+ it('should set amountTotal, netTotal and stemsTotal', () => {
+ controller.invoceInIntrastat = [
+ {
+ id: 1,
+ invoiceInFk: 1,
+ net: 30.5,
+ intrastatFk: 5080000,
+ amount: 10,
+ stems: 162,
+ countryFk: 5,
+ statisticalValue: 0
+ },
+ {
+ id: 2,
+ invoiceInFk: 1,
+ net: 10,
+ intrastatFk: 6021010,
+ amount: 20,
+ stems: 205,
+ countryFk: 5,
+ statisticalValue: 0
+ }
+ ];
+ controller.calculateTotals();
+
+ expect(controller.amountTotal).toEqual(30);
+ expect(controller.netTotal).toEqual(40.5);
+ expect(controller.stemsTotal).toEqual(367);
+ });
+ });
+
+ describe('onSubmit()', () => {
+ it('should make HTTP POST request to save intrastat values', () => {
+ controller.card = {reload: () => {}};
+ jest.spyOn($scope.watcher, 'check');
+ jest.spyOn($scope.watcher, 'notifySaved');
+ jest.spyOn($scope.watcher, 'updateOriginalData');
+ jest.spyOn(controller.card, 'reload');
+ jest.spyOn($scope.model, 'save');
+
+ controller.onSubmit();
+
+ expect($scope.model.save).toHaveBeenCalledWith();
+ expect($scope.watcher.updateOriginalData).toHaveBeenCalledWith();
+ expect($scope.watcher.check).toHaveBeenCalledWith();
+ expect($scope.watcher.notifySaved).toHaveBeenCalledWith();
+ expect(controller.card.reload).toHaveBeenCalledWith();
+ });
+ });
+ });
+});
diff --git a/modules/invoiceIn/front/locale/es.yml b/modules/invoiceIn/front/locale/es.yml
index 1ebfa8fe2..4f36b33fa 100644
--- a/modules/invoiceIn/front/locale/es.yml
+++ b/modules/invoiceIn/front/locale/es.yml
@@ -9,10 +9,13 @@ InvoiceIn cloned: Factura clonada
InvoiceIn deleted: Factura eliminada
Invoice list: Listado de facturas recibidas
InvoiceIn booked: Factura contabilizada
+Net: Neto
Remove tax: Quitar iva
Remove due day: Quitar vencimiento
Sage tax: Sage iva
Sage transaction: Sage transaccion
Search invoices in by reference: Buscar facturas recibidas por referencia
To book: Contabilizar
-
+Total amount: Total importe
+Total net: Total neto
+Total stems: Total tallos
diff --git a/modules/invoiceIn/front/routes.json b/modules/invoiceIn/front/routes.json
index 0eb6258d3..4867b7db9 100644
--- a/modules/invoiceIn/front/routes.json
+++ b/modules/invoiceIn/front/routes.json
@@ -27,6 +27,10 @@
"state": "invoiceIn.card.dueDay",
"icon": "icon-calendar"
},
+ {
+ "state": "invoiceIn.card.intrastat",
+ "icon": "icon-lines"
+ },
{
"state": "invoiceIn.card.log",
"icon": "history"
@@ -109,6 +113,16 @@
},
"acl": ["administrative"]
},
+ {
+ "url": "/intrastat",
+ "state": "invoiceIn.card.intrastat",
+ "component": "vn-invoice-in-intrastat",
+ "description": "Intrastat",
+ "params": {
+ "invoice-in": "$ctrl.invoiceIn"
+ },
+ "acl": ["administrative"]
+ },
{
"url": "/log",
"state": "invoiceIn.card.log",
diff --git a/modules/invoiceIn/front/summary/index.html b/modules/invoiceIn/front/summary/index.html
index ae6d985f8..3a826eeb7 100644
--- a/modules/invoiceIn/front/summary/index.html
+++ b/modules/invoiceIn/front/summary/index.html
@@ -120,6 +120,37 @@
+
+
+
+
+
+
+ Code
+ Amount
+ Net
+ Stems
+ Country
+
+
+
+
+ {{::intrastat.intrastatFk | zeroFill:8}}: {{::intrastat.intrastat.description}}
+ {{::intrastat.amount | currency: 'EUR':2}}
+ {{::intrastat.net}}
+ {{::intrastat.stems}}
+ {{::intrastat.country.code}}
+
+
+
+
+
diff --git a/modules/invoiceOut/front/descriptor/index.html b/modules/invoiceOut/front/descriptor/index.html
index 135eae0e1..92f0b9de5 100644
--- a/modules/invoiceOut/front/descriptor/index.html
+++ b/modules/invoiceOut/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.invoiceOut.ref"
+ summary="$ctrl.$.summary">
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/modules/item/back/model-config.json b/modules/item/back/model-config.json
index d134d9283..004aeb4b9 100644
--- a/modules/item/back/model-config.json
+++ b/modules/item/back/model-config.json
@@ -29,6 +29,9 @@
"ItemLog": {
"dataSource": "vn"
},
+ "ItemPackingType": {
+ "dataSource": "vn"
+ },
"ItemPlacement": {
"dataSource": "vn"
},
diff --git a/modules/item/back/models/item.json b/modules/item/back/models/item.json
index 9b78264f7..efde2690f 100644
--- a/modules/item/back/models/item.json
+++ b/modules/item/back/models/item.json
@@ -112,9 +112,6 @@
"itemPackingTypeFk": {
"type": "string"
},
- "compression": {
- "type": "number"
- },
"hasKgPrice": {
"type": "boolean",
"description": "Price per Kg"
diff --git a/modules/item/front/basic-data/index.html b/modules/item/front/basic-data/index.html
index b7db41094..22fd33a07 100644
--- a/modules/item/front/basic-data/index.html
+++ b/modules/item/front/basic-data/index.html
@@ -129,14 +129,6 @@
ng-model="$ctrl.item.density"
rule>
-
-
+ description="$ctrl.item.name"
+ summary="$ctrl.$.summary">
+
+
+
-
-
diff --git a/modules/item/front/locale/es.yml b/modules/item/front/locale/es.yml
index 27348d41c..12a729ef4 100644
--- a/modules/item/front/locale/es.yml
+++ b/modules/item/front/locale/es.yml
@@ -40,7 +40,6 @@ Create: Crear
Client card: Ficha del cliente
Shipped: F. envío
stems: Tallos
-Compression: Compresión
Density: Densidad
Search items by id, name or barcode: Buscar articulos por identificador, nombre o codigo de barras
SalesPerson: Comercial
diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html
index b5ea79efb..dfc0b6e01 100644
--- a/modules/item/front/summary/index.html
+++ b/modules/item/front/summary/index.html
@@ -94,9 +94,6 @@
-
-
diff --git a/modules/order/front/descriptor/index.html b/modules/order/front/descriptor/index.html
index a96da252b..538789027 100644
--- a/modules/order/front/descriptor/index.html
+++ b/modules/order/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.order.client.name"
+ summary="$ctrl.$.summary">
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/modules/route/front/descriptor/index.html b/modules/route/front/descriptor/index.html
index bda46952a..fc1d3419c 100644
--- a/modules/route/front/descriptor/index.html
+++ b/modules/route/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.route.name"
+ summary="$ctrl.$.summary">
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/modules/route/front/routes.json b/modules/route/front/routes.json
index 0d66a5697..f5e7d9ae8 100644
--- a/modules/route/front/routes.json
+++ b/modules/route/front/routes.json
@@ -7,7 +7,7 @@
"menus": {
"main": [
{"state": "route.index", "icon": "icon-delivery"},
- {"state": "route.agencyTerm.index", "icon": "contact_support"}
+ {"state": "route.agencyTerm.index", "icon": "icon-agency-term"}
],
"card": [
{"state": "route.card.basicData", "icon": "settings"},
diff --git a/modules/supplier/front/descriptor/index.html b/modules/supplier/front/descriptor/index.html
index dcc065eff..4691bfe9b 100644
--- a/modules/supplier/front/descriptor/index.html
+++ b/modules/supplier/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.supplier.name"
+ summary="$ctrl.$.summary">
+
+
+
\ No newline at end of file
diff --git a/modules/supplier/front/routes.json b/modules/supplier/front/routes.json
index 35519b89a..86bfba40c 100644
--- a/modules/supplier/front/routes.json
+++ b/modules/supplier/front/routes.json
@@ -15,7 +15,7 @@
{"state": "supplier.card.address.index", "icon": "icon-delivery"},
{"state": "supplier.card.account", "icon": "icon-account"},
{"state": "supplier.card.contact", "icon": "contact_phone"},
- {"state": "supplier.card.agencyTerm.index", "icon": "contact_support"},
+ {"state": "supplier.card.agencyTerm.index", "icon": "icon-agency-term"},
{"state": "supplier.card.log", "icon": "history"},
{"state": "supplier.card.consumption", "icon": "show_chart"}
]
diff --git a/modules/ticket/back/methods/sale/payBack.js b/modules/ticket/back/methods/sale/refund.js
similarity index 77%
rename from modules/ticket/back/methods/sale/payBack.js
rename to modules/ticket/back/methods/sale/refund.js
index 098da4d5a..9c87f23d3 100644
--- a/modules/ticket/back/methods/sale/payBack.js
+++ b/modules/ticket/back/methods/sale/refund.js
@@ -1,7 +1,7 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
- Self.remoteMethodCtx('payBack', {
+ Self.remoteMethodCtx('refund', {
description: 'Create ticket with the selected lines changing the sign to the quantites',
accessType: 'WRITE',
accepts: [{
@@ -21,12 +21,12 @@ module.exports = Self => {
root: true
},
http: {
- path: `/payBack`,
+ path: `/refund`,
verb: 'post'
}
});
- Self.payBack = async(ctx, sales, ticketId, options) => {
+ Self.refund = async(ctx, sales, ticketId, options) => {
const myOptions = {};
let tx;
@@ -47,21 +47,35 @@ module.exports = Self => {
const hasValidRole = isClaimManager || isSalesAssistant;
if (!hasValidRole)
- throw new UserError(`You don't have privileges to create pay back`);
+ throw new UserError(`You don't have privileges to create refund`);
for (let sale of sales)
salesIds.push(sale.id);
const query = `
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticketService;
+
CREATE TEMPORARY TABLE tmp.sale
SELECT s.id, s.itemFk, - s.quantity, s.concept, s.price, s.discount
FROM sale s
WHERE s.id IN (?);
+
+ CREATE TEMPORARY TABLE tmp.ticketService(
+ description VARCHAR(50),
+ quantity DECIMAL (10,2),
+ price DECIMAL (10,2),
+ taxClassFk INT,
+ ticketServiceTypeFk INT
+ );
+
CALL vn.ticket_doRefund(?, @newTicket);
- DROP TEMPORARY TABLE tmp.sale;`;
+
+ DROP TEMPORARY TABLE tmp.sale;
+ DROP TEMPORARY TABLE tmp.ticketService;`;
await Self.rawSql(query, [salesIds, ticketId], myOptions);
+
const [newTicket] = await Self.rawSql('SELECT @newTicket id', null, myOptions);
ticketId = newTicket.id;
diff --git a/modules/ticket/back/methods/sale/refundAll.js b/modules/ticket/back/methods/sale/refundAll.js
new file mode 100644
index 000000000..6fcd27f0a
--- /dev/null
+++ b/modules/ticket/back/methods/sale/refundAll.js
@@ -0,0 +1,78 @@
+const UserError = require('vn-loopback/util/user-error');
+
+module.exports = Self => {
+ Self.remoteMethodCtx('refundAll', {
+ description: 'Create ticket with all lines and services changing the sign to the quantites',
+ accessType: 'WRITE',
+ accepts: [{
+ arg: 'ticketId',
+ type: 'number',
+ required: true,
+ description: 'The ticket id'
+ }],
+ returns: {
+ type: 'number',
+ root: true
+ },
+ http: {
+ path: `/refundAll`,
+ verb: 'post'
+ }
+ });
+
+ Self.refundAll = async(ctx, ticketId, options) => {
+ const myOptions = {};
+ let tx;
+
+ if (typeof options == 'object')
+ Object.assign(myOptions, options);
+
+ if (!myOptions.transaction) {
+ tx = await Self.beginTransaction({});
+ myOptions.transaction = tx;
+ }
+
+ try {
+ const userId = ctx.req.accessToken.userId;
+
+ const isClaimManager = await Self.app.models.Account.hasRole(userId, 'claimManager');
+ const isSalesAssistant = await Self.app.models.Account.hasRole(userId, 'salesAssistant');
+ const hasValidRole = isClaimManager || isSalesAssistant;
+
+ if (!hasValidRole)
+ throw new UserError(`You don't have privileges to create refund`);
+
+ const query = `
+ DROP TEMPORARY TABLE IF EXISTS tmp.sale;
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticketService;
+
+ CREATE TEMPORARY TABLE tmp.sale
+ SELECT s.id, s.itemFk, - s.quantity, s.concept, s.price, s.discount
+ FROM sale s
+ JOIN ticket t ON t.id = s.ticketFk
+ WHERE t.id IN (?);
+
+ CREATE TEMPORARY TABLE tmp.ticketService
+ SELECT ts.description, - ts.quantity, ts.price, ts.taxClassFk, ts.ticketServiceTypeFk
+ FROM ticketService ts
+ WHERE ts.ticketFk IN (?);
+
+ CALL vn.ticket_doRefund(?, @newTicket);
+
+ DROP TEMPORARY TABLE tmp.sale;
+ DROP TEMPORARY TABLE tmp.ticketService;`;
+
+ await Self.rawSql(query, [ticketId, ticketId, ticketId], myOptions);
+
+ const [newTicket] = await Self.rawSql('SELECT @newTicket id', null, myOptions);
+ ticketId = newTicket.id;
+
+ if (tx) await tx.commit();
+
+ return ticketId;
+ } catch (e) {
+ if (tx) await tx.rollback();
+ throw e;
+ }
+ };
+};
diff --git a/modules/ticket/back/methods/sale/specs/payBack.spec.js b/modules/ticket/back/methods/sale/specs/refund.spec.js
similarity index 84%
rename from modules/ticket/back/methods/sale/specs/payBack.spec.js
rename to modules/ticket/back/methods/sale/specs/refund.spec.js
index ffcf96456..40fd6c17e 100644
--- a/modules/ticket/back/methods/sale/specs/payBack.spec.js
+++ b/modules/ticket/back/methods/sale/specs/refund.spec.js
@@ -1,6 +1,6 @@
const models = require('vn-loopback/server/server').models;
-describe('sale payBack()', () => {
+describe('sale refund()', () => {
it('should create ticket with the selected lines changing the sign to the quantites', async() => {
const tx = await models.Sale.beginTransaction({});
const ctx = {req: {accessToken: {userId: 9}}};
@@ -14,7 +14,7 @@ describe('sale payBack()', () => {
try {
const options = {transaction: tx};
- const response = await models.Sale.payBack(ctx, sales, ticketId, options);
+ const response = await models.Sale.refund(ctx, sales, ticketId, options);
const [newTicketId] = await models.Sale.rawSql('SELECT MAX(t.id) id FROM vn.ticket t;', null, options);
expect(response).toEqual(newTicketId.id);
@@ -26,7 +26,7 @@ describe('sale payBack()', () => {
}
});
- it(`should throw an error if the user doesn't have privileges to create a pay back`, async() => {
+ it(`should throw an error if the user doesn't have privileges to create a refund`, async() => {
const tx = await models.Sale.beginTransaction({});
const ctx = {req: {accessToken: {userId: 1}}};
@@ -40,7 +40,7 @@ describe('sale payBack()', () => {
try {
const options = {transaction: tx};
- await models.Sale.payBack(ctx, sales, ticketId, options);
+ await models.Sale.refund(ctx, sales, ticketId, options);
await tx.rollback();
} catch (e) {
@@ -49,6 +49,6 @@ describe('sale payBack()', () => {
}
expect(error).toBeDefined();
- expect(error.message).toEqual(`You don't have privileges to create pay back`);
+ expect(error.message).toEqual(`You don't have privileges to create refund`);
});
});
diff --git a/modules/ticket/back/methods/ticket/specs/sendSms.spec.js b/modules/ticket/back/methods/ticket/specs/sendSms.spec.js
index 8ec4ca487..f50253b10 100644
--- a/modules/ticket/back/methods/ticket/specs/sendSms.spec.js
+++ b/modules/ticket/back/methods/ticket/specs/sendSms.spec.js
@@ -1,5 +1,4 @@
const models = require('vn-loopback/server/server').models;
-const soap = require('soap');
describe('ticket sendSms()', () => {
it('should send a message and log it', async() => {
@@ -8,7 +7,6 @@ describe('ticket sendSms()', () => {
try {
const options = {transaction: tx};
- spyOn(soap, 'createClientAsync').and.returnValue('a so fake client');
const ctx = {req: {accessToken: {userId: 9}}};
const id = 11;
const destination = 222222222;
diff --git a/modules/ticket/back/methods/ticket/specs/updateDiscount.spec.js b/modules/ticket/back/methods/ticket/specs/updateDiscount.spec.js
index ae79185e4..1873207aa 100644
--- a/modules/ticket/back/methods/ticket/specs/updateDiscount.spec.js
+++ b/modules/ticket/back/methods/ticket/specs/updateDiscount.spec.js
@@ -90,7 +90,7 @@ describe('sale updateDiscount()', () => {
expect(error.message).toEqual(`The sales of this ticket can't be modified`);
});
- it('should update the discount if the salesPerson has mana', async() => {
+ it('should update the discount if the salesPerson has mana and manaCode = "mana"', async() => {
const tx = await models.Ticket.beginTransaction({});
try {
@@ -108,8 +108,49 @@ describe('sale updateDiscount()', () => {
const newDiscount = 100;
const manaDiscount = await models.Component.findOne({where: {code: 'mana'}}, options);
const componentId = manaDiscount.id;
+ const manaCode = 'mana';
- await models.Ticket.updateDiscount(ctx, ticketId, sales, newDiscount, options);
+ await models.Ticket.updateDiscount(ctx, ticketId, sales, newDiscount, manaCode, options);
+
+ const updatedSale = await models.Sale.findById(originalSaleId, null, options);
+ const createdSaleComponent = await models.SaleComponent.findOne({
+ where: {
+ componentFk: componentId,
+ saleFk: originalSaleId
+ }
+ }, options);
+
+ expect(createdSaleComponent.componentFk).toEqual(componentId);
+ expect(updatedSale.discount).toEqual(100);
+
+ await tx.rollback();
+ } catch (e) {
+ await tx.rollback();
+ throw e;
+ }
+ });
+
+ it('should update the discount if the salesPerson has mana and manaCode = "manaClaim"', async() => {
+ const tx = await models.Ticket.beginTransaction({});
+
+ try {
+ const options = {transaction: tx};
+
+ const ctx = {
+ req: {
+ accessToken: {userId: 18},
+ headers: {origin: 'localhost:5000'},
+ __: () => {}
+ }
+ };
+ const ticketId = 11;
+ const sales = [originalSaleId];
+ const newDiscount = 100;
+ const manaDiscount = await models.Component.findOne({where: {code: 'manaClaim'}}, options);
+ const componentId = manaDiscount.id;
+ const manaCode = 'manaClaim';
+
+ await models.Ticket.updateDiscount(ctx, ticketId, sales, newDiscount, manaCode, options);
const updatedSale = await models.Sale.findById(originalSaleId, null, options);
const createdSaleComponent = await models.SaleComponent.findOne({
diff --git a/modules/ticket/back/methods/ticket/updateDiscount.js b/modules/ticket/back/methods/ticket/updateDiscount.js
index cf217348a..b1291a45b 100644
--- a/modules/ticket/back/methods/ticket/updateDiscount.js
+++ b/modules/ticket/back/methods/ticket/updateDiscount.js
@@ -23,6 +23,12 @@ module.exports = Self => {
description: 'The new discount',
type: 'number',
required: true
+ },
+ {
+ arg: 'manaCode',
+ description: 'The type of mana',
+ type: 'string',
+ required: false
}
],
returns: {
@@ -35,7 +41,7 @@ module.exports = Self => {
}
});
- Self.updateDiscount = async(ctx, id, salesIds, newDiscount, options) => {
+ Self.updateDiscount = async(ctx, id, salesIds, newDiscount, manaCode, options) => {
const $t = ctx.req.__; // $translate
const models = Self.app.models;
const myOptions = {};
@@ -98,7 +104,7 @@ module.exports = Self => {
},
fields: 'amount'}, myOptions);
- const componentCode = usesMana ? 'mana' : 'buyerDiscount';
+ const componentCode = usesMana ? manaCode : 'buyerDiscount';
const discountComponent = await models.Component.findOne({
where: {code: componentCode}}, myOptions);
diff --git a/modules/ticket/back/models/sale.js b/modules/ticket/back/models/sale.js
index 9efd66057..2652aded2 100644
--- a/modules/ticket/back/models/sale.js
+++ b/modules/ticket/back/models/sale.js
@@ -6,7 +6,8 @@ module.exports = Self => {
require('../methods/sale/updateQuantity')(Self);
require('../methods/sale/updateConcept')(Self);
require('../methods/sale/recalculatePrice')(Self);
- require('../methods/sale/payBack')(Self);
+ require('../methods/sale/refund')(Self);
+ require('../methods/sale/refundAll')(Self);
require('../methods/sale/canEdit')(Self);
Self.validatesPresenceOf('concept', {
diff --git a/modules/ticket/front/descriptor-menu/index.html b/modules/ticket/front/descriptor-menu/index.html
index 88ed4b46b..c99575d42 100644
--- a/modules/ticket/front/descriptor-menu/index.html
+++ b/modules/ticket/front/descriptor-menu/index.html
@@ -139,6 +139,11 @@
translate>
Recalculate components
+
+ Refund all
+
@@ -292,4 +297,12 @@
on-accept="$ctrl.recalculateComponents()"
question="Are you sure you want to recalculate the components?"
message="Recalculate components">
+
+
+
+
\ No newline at end of file
diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js
index 6465c43ac..1c80a6f9d 100644
--- a/modules/ticket/front/descriptor-menu/index.js
+++ b/modules/ticket/front/descriptor-menu/index.js
@@ -272,6 +272,14 @@ class Controller extends Section {
.then(() => this.reload())
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
}
+
+ refundAll() {
+ const params = {ticketId: this.id};
+ const query = `Sales/refundAll`;
+ return this.$http.post(query, params).then(res => {
+ this.$state.go('ticket.card.sale', {id: res.data});
+ });
+ }
}
Controller.$inject = ['$element', '$scope', 'vnReport', 'vnEmail'];
diff --git a/modules/ticket/front/descriptor-menu/index.spec.js b/modules/ticket/front/descriptor-menu/index.spec.js
index faf45504e..75f3522ae 100644
--- a/modules/ticket/front/descriptor-menu/index.spec.js
+++ b/modules/ticket/front/descriptor-menu/index.spec.js
@@ -262,6 +262,19 @@ describe('Ticket Component vnTicketDescriptorMenu', () => {
});
});
+ describe('refundAll()', () => {
+ it('should make a query and go to ticket.card.sale', () => {
+ jest.spyOn(controller.$state, 'go').mockReturnValue();
+ const expectedParams = {ticketId: ticket.id};
+
+ $httpBackend.expect('POST', `Sales/refundAll`, expectedParams).respond({ticketId: 16});
+ controller.refundAll();
+ $httpBackend.flush();
+
+ expect(controller.$state.go).toHaveBeenCalledWith('ticket.card.sale', {id: {ticketId: ticket.id}});
+ });
+ });
+
describe('showSMSDialog()', () => {
it('should set the destionationFk and destination properties and then call the sms open() method', () => {
controller.$.sms = {open: () => {}};
diff --git a/modules/ticket/front/descriptor-menu/locale/es.yml b/modules/ticket/front/descriptor-menu/locale/es.yml
index 761687e74..060d03154 100644
--- a/modules/ticket/front/descriptor-menu/locale/es.yml
+++ b/modules/ticket/front/descriptor-menu/locale/es.yml
@@ -7,4 +7,5 @@ Send PDF: Enviar PDF
Send CSV: Enviar CSV
Send CSV Delivery Note: Enviar albarán en CSV
Send PDF Delivery Note: Enviar albarán en PDF
-Show Proforma: Ver proforma
\ No newline at end of file
+Show Proforma: Ver proforma
+Refund all: Abonar todo
\ No newline at end of file
diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html
index 8d7688826..2c27b19cd 100644
--- a/modules/ticket/front/descriptor/index.html
+++ b/modules/ticket/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.ticket.client.name"
+ summary="$ctrl.$.summary">
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/modules/ticket/front/descriptor/locale/es.yml b/modules/ticket/front/descriptor/locale/es.yml
index f56f29f92..2a7bf360f 100644
--- a/modules/ticket/front/descriptor/locale/es.yml
+++ b/modules/ticket/front/descriptor/locale/es.yml
@@ -29,4 +29,5 @@ SMS Minimum import: 'SMS Importe minimo'
SMS Pending payment: 'SMS Pago pendiente'
Restore ticket: Restaurar ticket
You are going to restore this ticket: Vas a restaurar este ticket
-Are you sure you want to restore this ticket?: ¿Seguro que quieres restaurar el ticket?
\ No newline at end of file
+Are you sure you want to restore this ticket?: ¿Seguro que quieres restaurar el ticket?
+Are you sure you want to refund all?: ¿Seguro que quieres abonar todo?
\ No newline at end of file
diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html
index 5dc3c9428..836fadb9b 100644
--- a/modules/ticket/front/sale/index.html
+++ b/modules/ticket/front/sale/index.html
@@ -285,10 +285,21 @@
vn-focus
label="Discount"
ng-model="$ctrl.edit.discount"
- on-change="$ctrl.changeDiscount()"
clear-disabled="true"
suffix="%">
+
+
+
+
+
+
New price
@@ -297,6 +308,16 @@
+
+
+
+
+
+
@@ -491,10 +512,10 @@
Unmark as reserved
- Pay Back
+ Refund
\ No newline at end of file
diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js
index 54167ce96..bb8a81bc4 100644
--- a/modules/ticket/front/sale/index.js
+++ b/modules/ticket/front/sale/index.js
@@ -6,6 +6,15 @@ class Controller extends Section {
constructor($element, $) {
super($element, $);
this._sales = [];
+ this.manaCode = 'mana';
+ }
+
+ get manaCode() {
+ return this._manaCode;
+ }
+
+ set manaCode(value) {
+ this._manaCode = value;
}
get ticket() {
@@ -66,6 +75,14 @@ class Controller extends Section {
this.$.editPricePopover.relocate();
});
});
+ this.getCurrentWorkerMana();
+ }
+
+ getCurrentWorkerMana() {
+ this.$http.get(`WorkerManas/getCurrentWorkerMana`)
+ .then(res => {
+ this.currentWorkerMana = res.data;
+ });
}
/**
@@ -273,7 +290,7 @@ class Controller extends Section {
return sale.id;
});
- const params = {salesIds: saleIds, newDiscount: this.edit.discount};
+ const params = {salesIds: saleIds, newDiscount: this.edit.discount, manaCode: this.manaCode};
const query = `Tickets/${this.$params.id}/updateDiscount`;
this.$http.post(query, params).then(() => {
this.vnApp.showSuccess(this.$t('Data saved!'));
@@ -462,12 +479,12 @@ class Controller extends Section {
});
}
- createPayBack() {
+ createRefund() {
const sales = this.selectedValidSales();
if (!sales) return;
const params = {sales: sales, ticketId: this.ticket.id};
- const query = `Sales/payBack`;
+ const query = `Sales/refund`;
this.resetChanges();
this.$http.post(query, params).then(res => {
this.$state.go('ticket.card.sale', {id: res.data});
@@ -479,6 +496,14 @@ class Controller extends Section {
? {id: $search}
: {name: {like: '%' + $search + '%'}};
}
+
+ save() {
+ this.changeDiscount();
+ }
+
+ cancel() {
+ this.$.editDiscount.hide();
+ }
}
ngModule.vnComponent('vnTicketSale', {
diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js
index 15ce1798b..a8ac2f3de 100644
--- a/modules/ticket/front/sale/index.spec.js
+++ b/modules/ticket/front/sale/index.spec.js
@@ -43,7 +43,7 @@ describe('Ticket', () => {
$scope.sms = {open: () => {}};
$scope.ticket = ticket;
$scope.model = crudModel;
- $scope.editDiscount = {relocate: () => {}};
+ $scope.editDiscount = {relocate: () => {}, hide: () => {}};
$scope.editPricePopover = {relocate: () => {}};
$httpBackend = _$httpBackend_;
Object.defineProperties($state.params, {
@@ -115,10 +115,12 @@ describe('Ticket', () => {
const expectedAmount = 250;
$httpBackend.expect('GET', 'Tickets/1/getSalesPersonMana').respond(200, expectedAmount);
+ $httpBackend.expect('GET', 'WorkerManas/getCurrentWorkerMana').respond(200, expectedAmount);
controller.getMana();
$httpBackend.flush();
expect(controller.edit.mana).toEqual(expectedAmount);
+ expect(controller.currentWorkerMana).toEqual(expectedAmount);
});
});
@@ -446,7 +448,7 @@ describe('Ticket', () => {
const expectedSales = [firstSelectedSale, secondSelectedSale];
const expectedSaleIds = [firstSelectedSale.id, secondSelectedSale.id];
- const expectedParams = {salesIds: expectedSaleIds, newDiscount: expectedDiscount};
+ const expectedParams = {salesIds: expectedSaleIds, newDiscount: expectedDiscount, manaCode: 'mana'};
$httpBackend.expect('POST', `Tickets/1/updateDiscount`, expectedParams).respond(200, {discount: 10});
controller.updateDiscount(expectedSales);
$httpBackend.flush();
@@ -701,15 +703,15 @@ describe('Ticket', () => {
});
});
- describe('createPayBack()', () => {
+ describe('createRefund()', () => {
it('should make an HTTP POST query and then call to the $state go() method', () => {
jest.spyOn(controller, 'selectedValidSales').mockReturnValue(controller.sales);
jest.spyOn(controller, 'resetChanges');
jest.spyOn(controller.$state, 'go');
const expectedId = 9999;
- $httpBackend.expect('POST', `Sales/payBack`).respond(200, expectedId);
- controller.createPayBack();
+ $httpBackend.expect('POST', `Sales/refund`).respond(200, expectedId);
+ controller.createRefund();
$httpBackend.flush();
expect(controller.resetChanges).toHaveBeenCalledWith();
@@ -732,5 +734,14 @@ describe('Ticket', () => {
expect(result).toEqual({name: {like: '%' + itemName + '%'}});
});
});
+
+ describe('cancel()', () => {
+ it('should call hide()', () => {
+ jest.spyOn(controller.$.editDiscount, 'hide').mockReturnThis();
+ controller.cancel();
+
+ expect(controller.$.editDiscount.hide).toHaveBeenCalledWith();
+ });
+ });
});
});
diff --git a/modules/ticket/front/sale/locale/es.yml b/modules/ticket/front/sale/locale/es.yml
index e4152600f..aab8ff493 100644
--- a/modules/ticket/front/sale/locale/es.yml
+++ b/modules/ticket/front/sale/locale/es.yml
@@ -36,4 +36,6 @@ Warehouse: Almacen
Agency: Agencia
Shipped: F. envio
Packaging: Encajado
-Pay Back: Abono
\ No newline at end of file
+Refund: Abono
+Promotion mana: Maná promoción
+Claim mana: Maná reclamación
diff --git a/modules/travel/back/models/travel-thermograph.json b/modules/travel/back/models/travel-thermograph.json
index 1e6dd1905..754df1c3e 100644
--- a/modules/travel/back/models/travel-thermograph.json
+++ b/modules/travel/back/models/travel-thermograph.json
@@ -20,9 +20,6 @@
"created": {
"type": "date"
},
- "temperature": {
- "type": "string"
- },
"temperatureFk": {
"type": "string",
"required": true
diff --git a/modules/travel/front/descriptor/index.html b/modules/travel/front/descriptor/index.html
index 28e908d18..bbf5721fd 100644
--- a/modules/travel/front/descriptor/index.html
+++ b/modules/travel/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.travel.ref"
+ summary="$ctrl.$.summary">
@@ -42,3 +43,6 @@
+
+
+
\ No newline at end of file
diff --git a/modules/travel/front/summary/index.html b/modules/travel/front/summary/index.html
index e74682fb9..bd9d6c9cb 100644
--- a/modules/travel/front/summary/index.html
+++ b/modules/travel/front/summary/index.html
@@ -158,7 +158,7 @@
{{thermograph.thermographFk}}
- {{thermograph.temperature}}
+ {{thermograph.temperatureFk}}
{{thermograph.result}}
{{thermograph.warehouse.name}}
{{thermograph.created | date: 'dd/MM/yyyy'}}
diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json
index e35e39721..c155e331d 100644
--- a/modules/worker/back/model-config.json
+++ b/modules/worker/back/model-config.json
@@ -17,6 +17,9 @@
"Department": {
"dataSource": "vn"
},
+ "EducationLevel": {
+ "dataSource": "vn"
+ },
"WorkCenter": {
"dataSource": "vn"
},
diff --git a/modules/worker/back/models/education-level.json b/modules/worker/back/models/education-level.json
new file mode 100644
index 000000000..4ae2376c4
--- /dev/null
+++ b/modules/worker/back/models/education-level.json
@@ -0,0 +1,18 @@
+{
+ "name": "EducationLevel",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "educationLevel"
+ }
+ },
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json
index cad38ac3b..c8054caff 100644
--- a/modules/worker/back/models/worker.json
+++ b/modules/worker/back/models/worker.json
@@ -13,7 +13,7 @@
},
"properties": {
"id": {
- "type": "Number",
+ "type": "number",
"id": true,
"description": "Identifier"
},
@@ -26,14 +26,26 @@
"required": true
},
"phone": {
- "type" : "String"
+ "type" : "string"
},
"userFk": {
- "type" : "Number",
+ "type" : "number",
"required": true
},
"bossFk": {
- "type" : "Number"
+ "type" : "number"
+ },
+ "maritalStatus": {
+ "type" : "string"
+ },
+ "originCountryFk": {
+ "type" : "number"
+ },
+ "educationLevelFk": {
+ "type" : "number"
+ },
+ "SSN": {
+ "type" : "string"
}
},
"relations": {
diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html
index b61a4cf94..cbe683185 100644
--- a/modules/worker/front/basic-data/index.html
+++ b/modules/worker/front/basic-data/index.html
@@ -30,7 +30,6 @@
rule>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/worker/front/basic-data/index.js b/modules/worker/front/basic-data/index.js
index d2c7f5b70..ea75d7b97 100644
--- a/modules/worker/front/basic-data/index.js
+++ b/modules/worker/front/basic-data/index.js
@@ -2,6 +2,13 @@ import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
+ constructor($element, $) {
+ super($element, $);
+ this.maritalStatus = [
+ {code: 'M', name: this.$t('Married')},
+ {code: 'S', name: this.$t('Single')}
+ ];
+ }
onSubmit() {
return this.$.watcher.submit()
.then(() => this.card.reload());
diff --git a/modules/worker/front/basic-data/locale/es.yml b/modules/worker/front/basic-data/locale/es.yml
new file mode 100644
index 000000000..278335265
--- /dev/null
+++ b/modules/worker/front/basic-data/locale/es.yml
@@ -0,0 +1,6 @@
+Marital status: Estado civil
+Origin country: País origen
+Education level: Nivel educación
+SSN: NSS
+Married: Casado/a
+Single: Soltero/a
\ No newline at end of file
diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html
index 036b70eab..01681ebb8 100644
--- a/modules/worker/front/descriptor/index.html
+++ b/modules/worker/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.worker.firstName +' '+ $ctrl.worker.lastName"
+ summary="$ctrl.$.summary">
+
+
+
{{::zone.id}}
{{::zone.name}}
- {{::zone.agencyMode.name}}
+ {{::zone.agencyModeName}}
{{::zone.hour | date: 'HH:mm'}}
{{::zone.price | currency: 'EUR':2}}
diff --git a/modules/zone/front/descriptor/index.html b/modules/zone/front/descriptor/index.html
index 355028c98..a3432a99d 100644
--- a/modules/zone/front/descriptor/index.html
+++ b/modules/zone/front/descriptor/index.html
@@ -1,6 +1,7 @@
+ description="$ctrl.zone.name"
+ summary="$ctrl.$.summary">
+
+
+
+
=14"
},
"dependencies": {
+ "adm-zip": "^0.5.9",
"axios": "^0.25.0",
"bmp-js": "^0.1.0",
"compression": "^1.7.3",
"fs-extra": "^5.0.0",
+ "ftps": "^1.2.0",
"got": "^10.7.0",
"helmet": "^3.21.2",
"i18n": "^0.8.4",
@@ -39,7 +41,6 @@
"require-yaml": "0.0.1",
"sharp": "^0.27.1",
"smbhash": "0.0.1",
- "soap": "^0.35.0",
"strong-error-handler": "^2.3.2",
"uuid": "^3.3.3",
"vn-loopback": "file:./loopback",
@@ -104,7 +105,7 @@
"test": "jest --watch",
"back": "nodemon --inspect -w modules ./node_modules/gulp/bin/gulp.js back",
"lint": "eslint ./ --cache --ignore-pattern .gitignore",
- "docker": "docker build -t salix-db ./db"
+ "docker": "docker build --progress=plain -t salix-db ./db"
},
"jest": {
"projects": [
| |