diff --git a/client/client/src/descriptor/index.html b/client/client/src/descriptor/index.html index 691565b58..1a35d36cd 100644 --- a/client/client/src/descriptor/index.html +++ b/client/client/src/descriptor/index.html @@ -53,7 +53,7 @@ ng-class="{bright: $ctrl.client.isTaxDataChecked == false}"> - + - - - - - - - {{$ctrl.grade ? ' / ' + $ctrl.grade : ' / - '}} - - + + + + diff --git a/client/client/src/summary/style.scss b/client/client/src/summary/style.scss index bb59bc444..071e0a5e6 100644 --- a/client/client/src/summary/style.scss +++ b/client/client/src/summary/style.scss @@ -1,3 +1,4 @@ vn-dialog vn-one { - min-width: 15em + min-width: 15em; + } \ No newline at end of file diff --git a/client/core/src/components/dialog/style.scss b/client/core/src/components/dialog/style.scss index 1a7404546..a9b1ceb95 100644 --- a/client/core/src/components/dialog/style.scss +++ b/client/core/src/components/dialog/style.scss @@ -67,4 +67,50 @@ } } } + + &.dialog-summary { + + vn-card { + border: none; + box-shadow: none; + padding: 0; + + & > div > vn-vertical { + padding: 0; + margin: 0 + } + } + + & > div > button.close > vn-icon { + color: $main-01; + } + + & > div { + padding: 0 + } + + tpl-body { + width:auto; + background-color: transparent; + padding: 0 2em + } + + .body { + overflow: auto; + margin-top: 2em; + max-height: 700px; + } + + form { + min-width: 680px; + } + + .buttons { + margin-top: 2em + } + + vn-check label span { + font-size: .9em + } + } } diff --git a/client/salix/src/styles/summary.scss b/client/salix/src/styles/summary.scss index 37698f90a..0b302ec2c 100644 --- a/client/salix/src/styles/summary.scss +++ b/client/salix/src/styles/summary.scss @@ -23,47 +23,4 @@ vn-label-value > section { margin-bottom: .3em } -} - -.vn-dialog.dialog-summary { - vn-card { - border: none; - box-shadow: none; - } - - vn-vertical { - padding: 0 !important - } - - & > div > button.close > vn-icon { - color: $main-01; - } - - & > div { - padding: 0 - } - - tpl-body { - width:auto; - background-color: transparent; - padding: 0 2em - } - - .body { - overflow: auto; - margin-top: 2em; - max-height: 700px; - } - - form { - min-width: 680px; - } - - .buttons { - margin-top: 2em - } - - vn-check label span { - font-size: .9em - } } \ No newline at end of file diff --git a/services/client/common/methods/greuge/filter.js b/services/client/common/methods/greuge/filter.js deleted file mode 100644 index 30ec55591..000000000 --- a/services/client/common/methods/greuge/filter.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = Self => { - Self.installMethod('filter', filterParams); - - function filterParams(params) { - return { - where: { - clientFk: params.clientFk - }, - skip: (params.page - 1) * parseInt(params.size), - limit: parseInt(params.size), - order: (params.order || 'shipped DESC') + ', id ASC', - include: { - relation: "greugeType", - scope: { - fields: ["id", "name"] - } - } - }; - } -}; diff --git a/services/client/common/methods/invoice-out/filter.js b/services/client/common/methods/invoice-out/filter.js deleted file mode 100644 index 88263d79b..000000000 --- a/services/client/common/methods/invoice-out/filter.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = Self => { - Self.installMethod('filter', filterParams); - - function filterParams(params) { - return { - where: { - clientFk: params.clientFk - }, - skip: (params.page - 1) * params.size, - limit: params.size, - order: params.order - }; - } -}; diff --git a/services/client/common/methods/mandate/filter.js b/services/client/common/methods/mandate/filter.js deleted file mode 100644 index 03482cd72..000000000 --- a/services/client/common/methods/mandate/filter.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = Self => { - Self.installMethod('filter', filterParams); - - function filterParams(params) { - return { - where: { - clientFk: params.clientFk - }, - skip: (params.page - 1) * params.size, - limit: params.size, - order: params.order || 'created DESC', - include: [ - { - relation: "mandateType", - scope: { - fields: ["id", "name"] - } - }, - { - relation: "company", - scope: { - fields: ["id", "code"] - } - } - ] - }; - } -}; diff --git a/services/client/common/methods/recovery/filter.js b/services/client/common/methods/recovery/filter.js deleted file mode 100644 index 88263d79b..000000000 --- a/services/client/common/methods/recovery/filter.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = Self => { - Self.installMethod('filter', filterParams); - - function filterParams(params) { - return { - where: { - clientFk: params.clientFk - }, - skip: (params.page - 1) * params.size, - limit: params.size, - order: params.order - }; - } -}; diff --git a/services/client/common/models/greuge.js b/services/client/common/models/greuge.js index 8cf72ea85..6432b0913 100644 --- a/services/client/common/models/greuge.js +++ b/services/client/common/models/greuge.js @@ -1,5 +1,4 @@ module.exports = function(Self) { - require('../methods/greuge/filter')(Self); require('../methods/greuge/sumAmount')(Self); Self.validatesLengthOf('description', { diff --git a/services/client/common/models/invoice-out.js b/services/client/common/models/invoice-out.js deleted file mode 100644 index 46d84c35f..000000000 --- a/services/client/common/models/invoice-out.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(Self) { - require('../methods/invoice-out/filter')(Self); -}; diff --git a/services/client/common/models/mandate.js b/services/client/common/models/mandate.js deleted file mode 100644 index 099971c57..000000000 --- a/services/client/common/models/mandate.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(Self) { - require('../methods/mandate/filter')(Self); -}; diff --git a/services/client/common/models/recovery.js b/services/client/common/models/recovery.js index c456cb9a4..61e86edfc 100644 --- a/services/client/common/models/recovery.js +++ b/services/client/common/models/recovery.js @@ -1,5 +1,4 @@ module.exports = function(Self) { - require('../methods/recovery/filter')(Self); require('../methods/recovery/hasActiveRecovery')(Self); Self.validatesPresenceOf('period', {message: 'Period cannot be blank'}); diff --git a/services/item/common/methods/item-log/getLog.js b/services/item/common/methods/item-log/getLog.js deleted file mode 100644 index a61dd0f8e..000000000 --- a/services/item/common/methods/item-log/getLog.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = Self => { - Self.installMethod('getLog', filterParams); - - function filterParams(params) { - return { - where: { - originFk: params.itemFk - }, - skip: (params.page - 1) * params.size, - limit: params.size, - include: [{ - relation: "item" - }, - { - relation: "user", - scope: { - fields: ["name"] - } - }] - }; - } -}; diff --git a/services/item/common/models/item-log.js b/services/item/common/models/item-log.js deleted file mode 100644 index d8227f964..000000000 --- a/services/item/common/models/item-log.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = Self => { - require('../methods/item-log/getLog')(Self); -}; diff --git a/services/loopback/common/methods/client/listAddresses.js b/services/loopback/common/methods/client/listAddresses.js deleted file mode 100644 index e350b56f3..000000000 --- a/services/loopback/common/methods/client/listAddresses.js +++ /dev/null @@ -1,70 +0,0 @@ -module.exports = function(Client) { - Client.remoteMethod('listAddresses', { - description: 'List items using a filter', - accessType: 'READ', - accepts: [ - { - arg: 'id', - type: 'string', - required: true, - description: 'Model id', - http: {source: 'path'} - }, - { - arg: 'filter', - type: 'object', - required: true, - description: 'Filter defining where', - http: function(ctx) { - return ctx.req.query; - } - } - ], - returns: { - arg: 'data', - type: ['Address'], - root: true - }, - http: { - path: `/:id/listAddresses`, - verb: 'GET' - } - }); - - Client.listAddresses = function(id, params, callback) { - let filter = { - where: { - clientFk: id - }, - skip: (params.page - 1) * params.size, - limit: params.size, - order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'], - include: {observations: 'observationType'} - }; - - let total = null; - let items = null; - - function response(type, value) { - if (type === 'total') { - total = value; - } else { - items = value; - } - - if (total !== null && items !== null) { - callback(null, {total: total, items: items}); - } - } - - Client.app.models.Address.find(filter, function(err, instances) { - if (err) return callback(err); - response('find', instances); - }); - - Client.app.models.Address.count(filter.where, function(err, total) { - if (err) return callback(err); - response('total', total); - }); - }; -}; diff --git a/services/loopback/common/methods/client/specs/listAddresses.spec.js b/services/loopback/common/methods/client/specs/listAddresses.spec.js deleted file mode 100644 index d4a5503d0..000000000 --- a/services/loopback/common/methods/client/specs/listAddresses.spec.js +++ /dev/null @@ -1,20 +0,0 @@ -const app = require('../../../../../client/server/server'); -const catchErrors = require('../../../../../../services/utils/jasmineHelpers').catchErrors; - -describe('Client addresses', () => { - it('should call the listAddresses method and receive total results and items', done => { - let id = 1; - let params = { - page: 1, - size: 1 - }; - - let callback = (error, result) => { - if (error) return catchErrors(done)(error); - - expect(Object.keys(result)).toEqual(['total', 'items']); - done(); - }; - app.models.Client.listAddresses(id, params, callback); - }); -}); diff --git a/services/loopback/common/models/client.js b/services/loopback/common/models/client.js index 2aa0d39a8..c9c7cec00 100644 --- a/services/loopback/common/models/client.js +++ b/services/loopback/common/models/client.js @@ -4,9 +4,7 @@ var isMultiple = require('../helpers').isMultiple; module.exports = Self => { // Methods - require('../methods/client/activate')(Self); - require('../methods/client/listAddresses')(Self); require('../methods/client/card')(Self); require('../methods/client/createWithUser')(Self); require('../methods/client/listWorkers')(Self); diff --git a/services/ticket/common/methods/expedition/filter.js b/services/ticket/common/methods/expedition/filter.js deleted file mode 100644 index c728c8703..000000000 --- a/services/ticket/common/methods/expedition/filter.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = Self => { - Self.installMethod('filter', filterParams); - - function filterParams(params) { - return { - where: { - ticketFk: params.ticketFk - }, - skip: (params.page - 1) * params.size, - limit: params.size, - order: params.order || 'created DESC', - include: [{ - relation: 'item', - scope: {fields: ['name']} - }, - { - relation: 'worker', - scope: {fields: ['firstName', 'name']} - }] - }; - } -}; diff --git a/services/ticket/common/methods/ticket-tracking/filter.js b/services/ticket/common/methods/ticket-tracking/filter.js deleted file mode 100644 index 90e8ca607..000000000 --- a/services/ticket/common/methods/ticket-tracking/filter.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = Self => { - Self.installMethod('filter', filterParams); - - function filterParams(params) { - return { - where: { - ticketFk: params.ticketFk - }, - skip: (params.page - 1) * params.size, - limit: params.size, - order: params.order || 'created DESC', - include: [ - { - relation: "worker", - scope: { - fields: ["firstName", "name"] - } - }, - { - relation: "state", - scope: { - fields: ["name"] - } - } - ] - }; - } -}; diff --git a/services/ticket/common/models/expedition.js b/services/ticket/common/models/expedition.js deleted file mode 100644 index 391359a3a..000000000 --- a/services/ticket/common/models/expedition.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(Self) { - require('../methods/expedition/filter.js')(Self); -}; diff --git a/services/ticket/common/models/ticket-tracking.js b/services/ticket/common/models/ticket-tracking.js index b5712cdb9..5875a7816 100644 --- a/services/ticket/common/models/ticket-tracking.js +++ b/services/ticket/common/models/ticket-tracking.js @@ -1,5 +1,4 @@ module.exports = function(Self) { - require('../methods/ticket-tracking/filter')(Self); require('../methods/ticket-tracking/changeState')(Self); Self.validatesPresenceOf('stateFk', {message: 'State cannot be blank'});