diff --git a/db/changes/10440-fallas/00-claimConfig.sql b/db/changes/10440-fallas/00-claimConfig.sql index 905dea484..89208dabd 100644 --- a/db/changes/10440-fallas/00-claimConfig.sql +++ b/db/changes/10440-fallas/00-claimConfig.sql @@ -4,5 +4,5 @@ CREATE TABLE `vn`.`claimConfig` ( PRIMARY KEY (`id`) ); -INSERT INTO vn.claimConfig (id, pickupContact) +INSERT INTO `vn`.`claimConfig` (id, pickupContact) VALUES(1, 'Email: cmorenoa@logista.com Telf: 961594250 Extensión: 206'); \ No newline at end of file diff --git a/db/changes/10440-fallas/00-claim_packages.sql b/db/changes/10440-fallas/00-claim_packages.sql index 54e8ff326..1ec11a855 100644 --- a/db/changes/10440-fallas/00-claim_packages.sql +++ b/db/changes/10440-fallas/00-claim_packages.sql @@ -1 +1 @@ -ALTER TABLE vn.claim ADD packages smallint(10) unsigned DEFAULT 0 NULL COMMENT 'packages received by the client'; \ No newline at end of file +ALTER TABLE `vn`.`claim` ADD `packages` smallint(10) unsigned DEFAULT 0 NULL COMMENT 'packages received by the client'; \ No newline at end of file diff --git a/db/changes/10450-april/00-ClientUnpaid.sql b/db/changes/10450-april/00-ClientUnpaid.sql new file mode 100644 index 000000000..d84fe494a --- /dev/null +++ b/db/changes/10450-april/00-ClientUnpaid.sql @@ -0,0 +1,10 @@ +CREATE TABLE `vn`.`clientUnpaid` ( + `clientFk` int(11) NOT NULL, + `dated` date NOT NULL, + `amount` double DEFAULT 0, + PRIMARY KEY (`clientFk`), + CONSTRAINT `clientUnpaid_clientFk` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE +); + +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES('ClientUnpaid', '*', '*', 'ALLOW', 'ROLE', 'administrative'); \ No newline at end of file diff --git a/db/changes/10450-april/delete.keep b/db/changes/10450-april/delete.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 9310ae436..52917fd9e 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -224,5 +224,6 @@ "The agency is already assigned to another autonomous": "La agencia ya está asignada a otro autónomo", "date in the future": "Fecha en el futuro", "reference duplicated": "Referencia duplicada", - "This ticket is already a refund": "Este ticket ya es un abono" + "This ticket is already a refund": "Este ticket ya es un abono", + "can't be set": "can't be set" } \ No newline at end of file diff --git a/modules/client/back/model-config.json b/modules/client/back/model-config.json index 38f5c9427..b6bf715b1 100644 --- a/modules/client/back/model-config.json +++ b/modules/client/back/model-config.json @@ -44,6 +44,9 @@ "ClientType": { "dataSource": "vn" }, + "ClientUnpaid": { + "dataSource": "vn" + }, "Defaulter": { "dataSource": "vn" }, diff --git a/modules/client/back/models/client-unpaid.json b/modules/client/back/models/client-unpaid.json new file mode 100644 index 000000000..a3d1a684c --- /dev/null +++ b/modules/client/back/models/client-unpaid.json @@ -0,0 +1,28 @@ +{ + "name": "ClientUnpaid", + "base": "VnModel", + "options": { + "mysql": { + "table": "clientUnpaid" + } + }, + "properties": { + "clientFk": { + "type": "number", + "id": true + }, + "dated": { + "type": "date" + }, + "amount": { + "type": "Number" + } + }, + "relations": { + "client": { + "type": "belongsTo", + "model": "Client", + "foreignKey": "clientFk" + } + } +} \ 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/routes.json b/modules/client/front/routes.json index 8398a8745..6b5b03b35 100644 --- a/modules/client/front/routes.json +++ b/modules/client/front/routes.json @@ -32,7 +32,8 @@ {"state": "client.card.creditInsurance.index", "icon": "icon-solunion"}, {"state": "client.card.contact", "icon": "contact_phone"}, {"state": "client.card.webPayment", "icon": "icon-onlinepayment"}, - {"state": "client.card.dms.index", "icon": "cloud_upload"} + {"state": "client.card.dms.index", "icon": "cloud_upload"}, + {"state": "client.card.unpaid", "icon": "contact_support"} ] } ] @@ -374,6 +375,12 @@ "state": "client.notification", "component": "vn-client-notification", "description": "Notifications" + }, { + "url": "/unpaid", + "state": "client.card.unpaid", + "component": "vn-client-unpaid", + "acl": ["administrative"], + "description": "Unpaid" } ] } diff --git a/modules/client/front/unpaid/index.html b/modules/client/front/unpaid/index.html new file mode 100644 index 000000000..5f6edfe10 --- /dev/null +++ b/modules/client/front/unpaid/index.html @@ -0,0 +1,51 @@ +