diff --git a/Dockerfile b/Dockerfile index 79831cf06..35f9d58bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,4 +33,5 @@ COPY \ README.md \ ./ +ENV DEBUG=strong-remoting:shared-method CMD ["pm2-docker", "./loopback/server/server.js"] diff --git a/e2e/paths/02-client-module/14_risk.spec.js b/e2e/paths/02-client-module/14_risk.spec.js index 7c35eddfb..ec80713aa 100644 --- a/e2e/paths/02-client-module/14_risk.spec.js +++ b/e2e/paths/02-client-module/14_risk.spec.js @@ -87,11 +87,11 @@ xdescribe('Client balance path', () => { expect(result).toContain('Data saved!'); }); - it('should check balance is now 100', async() => { + it('should check balance is now -100', async() => { let result = await nightmare .waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText'); - expect(result).toContain('100.00'); + expect(result).toContain('-€100.00'); }); it('should again click the new payment button', async() => { @@ -107,18 +107,17 @@ xdescribe('Client balance path', () => { let result = await nightmare .clearInput(selectors.clientBalance.newPaymentAmountInput) .write(selectors.clientBalance.newPaymentAmountInput, '-150') - .wait(1999) .waitToClick(selectors.clientBalance.saveButton) .waitForLastSnackbar(); expect(result).toContain('Data saved!'); }); - it('should check balance is now -50', async() => { + it('should check balance is now 50', async() => { let result = await nightmare .waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText'); - expect(result).toContain('€50.00'); + expect(result).toContain('50'); }); it('should now click on the Clients button of the top bar menu', async() => { diff --git a/front/core/components/input-number/index.js b/front/core/components/input-number/index.js index 19c28a63d..6c32ebb98 100644 --- a/front/core/components/input-number/index.js +++ b/front/core/components/input-number/index.js @@ -46,7 +46,7 @@ export default class InputNumber extends Input { set value(value) { this.hasValue = !(value === null || value === undefined || value === ''); - if (!this.hasOwnProperty('_value') && this.hasValue) + if (!this.hasOwnProperty('_value') && this.hasValue || value === '') this.input.value = value; this._value = value; diff --git a/front/core/components/treeview/style.scss b/front/core/components/treeview/style.scss index a4e6f5658..ac50c7a19 100644 --- a/front/core/components/treeview/style.scss +++ b/front/core/components/treeview/style.scss @@ -16,6 +16,7 @@ vn-treeview { .actions { min-width: 24px; + margin-right: 10px } .description { diff --git a/loopback/server/middleware.development.json b/loopback/server/middleware.development.json index 071c11a30..9cb38a275 100644 --- a/loopback/server/middleware.development.json +++ b/loopback/server/middleware.development.json @@ -3,7 +3,7 @@ "strong-error-handler": { "params": { "debug": true, - "log": true + "log": false } } } diff --git a/loopback/server/middleware.json b/loopback/server/middleware.json index 5945458c7..7fbd27250 100644 --- a/loopback/server/middleware.json +++ b/loopback/server/middleware.json @@ -49,6 +49,10 @@ }, "final:after": { "./middleware/error-handler": {}, - "strong-error-handler": {} + "strong-error-handler": { + "params": { + "log": false + } + } } } diff --git a/loopback/server/middleware/error-handler.js b/loopback/server/middleware/error-handler.js index 2ac11f608..8772220de 100644 --- a/loopback/server/middleware/error-handler.js +++ b/loopback/server/middleware/error-handler.js @@ -1,4 +1,5 @@ const UserError = require('../../util/user-error'); +const logToConsole = require('strong-error-handler/lib/logger'); module.exports = function() { return function(err, req, res, next) { @@ -23,6 +24,9 @@ module.exports = function() { if (err.sqlState == '45000') return next(new UserError(req.__(err.sqlMessage))); + if (!err.statusCode || err.statusCode >= 500) + logToConsole(req, err); + next(err); }; }; diff --git a/modules/agency/back/methods/agency/getAgenciesWithWarehouse.js b/modules/agency/back/methods/agency/getAgenciesWithWarehouse.js index f1b3dbdb2..2abe30abf 100644 --- a/modules/agency/back/methods/agency/getAgenciesWithWarehouse.js +++ b/modules/agency/back/methods/agency/getAgenciesWithWarehouse.js @@ -1,7 +1,6 @@ module.exports = Self => { Self.remoteMethod('getAgenciesWithWarehouse', { description: 'Returns a list of agencies that can land a shipment on a day for an address and a warehouse', - accessType: '', accepts: [{ arg: 'filter', type: 'object', diff --git a/modules/agency/back/methods/agency/getFirstShipped.js b/modules/agency/back/methods/agency/getFirstShipped.js index 018670983..e73182106 100644 --- a/modules/agency/back/methods/agency/getFirstShipped.js +++ b/modules/agency/back/methods/agency/getFirstShipped.js @@ -1,7 +1,6 @@ module.exports = Self => { Self.remoteMethod('getFirstShipped', { description: 'Returns the first shipped and landed possible for params', - accessType: '', accepts: [{ arg: 'params', type: 'object', diff --git a/modules/agency/back/methods/agency/landsThatDay.js b/modules/agency/back/methods/agency/landsThatDay.js index bead97ad7..a17d1dbed 100644 --- a/modules/agency/back/methods/agency/landsThatDay.js +++ b/modules/agency/back/methods/agency/landsThatDay.js @@ -1,7 +1,6 @@ module.exports = Self => { Self.remoteMethod('landsThatDay', { description: 'Returns a list of agencies that can land a shipment on a day for an address', - accessType: '', accepts: [{ arg: 'filter', type: 'object', diff --git a/modules/agency/back/methods/zone-calendar/removeByDate.js b/modules/agency/back/methods/zone-calendar/removeByDate.js index c4e78a716..f7871502e 100644 --- a/modules/agency/back/methods/zone-calendar/removeByDate.js +++ b/modules/agency/back/methods/zone-calendar/removeByDate.js @@ -1,7 +1,7 @@ module.exports = Self => { Self.remoteMethod('removeByDate', { description: 'Removes one or more delivery dates for a zone', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'zoneFk', type: 'Number', diff --git a/modules/agency/back/methods/zone-geo/getLeaves.js b/modules/agency/back/methods/zone-geo/getLeaves.js index 0e2ebcdc0..4f21aea41 100644 --- a/modules/agency/back/methods/zone-geo/getLeaves.js +++ b/modules/agency/back/methods/zone-geo/getLeaves.js @@ -4,7 +4,6 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; module.exports = Self => { Self.remoteMethod('getLeaves', { description: 'Returns the first shipped and landed possible for params', - accessType: '', accepts: [{ arg: 'zoneFk', type: 'Number', diff --git a/modules/agency/back/methods/zone-included/toggleIsIncluded.js b/modules/agency/back/methods/zone-included/toggleIsIncluded.js index 0b15a7171..ed4605296 100644 --- a/modules/agency/back/methods/zone-included/toggleIsIncluded.js +++ b/modules/agency/back/methods/zone-included/toggleIsIncluded.js @@ -1,7 +1,6 @@ module.exports = Self => { Self.remoteMethod('toggleIsIncluded', { description: 'Toggle include to delivery', - accessType: '', accepts: [{ arg: 'zoneFk', type: 'Number', diff --git a/modules/claim/back/methods/claim/createFromSales.js b/modules/claim/back/methods/claim/createFromSales.js index 4b658ab33..f3f4171af 100644 --- a/modules/claim/back/methods/claim/createFromSales.js +++ b/modules/claim/back/methods/claim/createFromSales.js @@ -1,7 +1,6 @@ module.exports = Self => { Self.remoteMethodCtx('createFromSales', { description: 'Create a claim', - accessType: '', accepts: [{ arg: 'claim', type: 'object', diff --git a/modules/claim/front/action/index.html b/modules/claim/front/action/index.html index 44f9bb68c..4aa8909b9 100644 --- a/modules/claim/front/action/index.html +++ b/modules/claim/front/action/index.html @@ -186,8 +186,7 @@ + vn-id="descriptor"> diff --git a/modules/claim/front/action/index.js b/modules/claim/front/action/index.js index 0b12a54d0..2d74a2aff 100644 --- a/modules/claim/front/action/index.js +++ b/modules/claim/front/action/index.js @@ -161,15 +161,6 @@ class Controller { } // Item Descriptor showDescriptor(event, itemFk) { - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk} - })`, - tooltip: 'Item diary' - } - }; this.$.descriptor.itemFk = itemFk; this.$.descriptor.parent = event.target; this.$.descriptor.show(); diff --git a/modules/claim/front/basic-data/index.js b/modules/claim/front/basic-data/index.js index fa3306429..bc616dd5c 100644 --- a/modules/claim/front/basic-data/index.js +++ b/modules/claim/front/basic-data/index.js @@ -10,11 +10,10 @@ class Controller { } onSubmit() { - if (this.aclService.hasAny(['salesAssistant'])) { - this.$scope.watcher.submit().then(() => { + this.$scope.watcher.submit().then(() => { + if (this.aclService.hasAny(['salesAssistant'])) this.$state.go('claim.card.detail'); - }); - } + }); } } diff --git a/modules/claim/front/detail/index.html b/modules/claim/front/detail/index.html index fde90835d..5c6de8466 100644 --- a/modules/claim/front/detail/index.html +++ b/modules/claim/front/detail/index.html @@ -110,6 +110,5 @@ + vn-id="descriptor"> \ No newline at end of file diff --git a/modules/claim/front/detail/index.js b/modules/claim/front/detail/index.js index aeca8946e..f859316a8 100644 --- a/modules/claim/front/detail/index.js +++ b/modules/claim/front/detail/index.js @@ -103,15 +103,6 @@ class Controller { // Item Descriptor showDescriptor(event, itemFk) { - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk} - })`, - tooltip: 'Item diary' - } - }; this.$scope.descriptor.itemFk = itemFk; this.$scope.descriptor.parent = event.target; this.$scope.descriptor.show(); diff --git a/modules/claim/front/summary/index.html b/modules/claim/front/summary/index.html index 0e4b62a09..2d58364af 100644 --- a/modules/claim/front/summary/index.html +++ b/modules/claim/front/summary/index.html @@ -151,8 +151,7 @@ + vn-id="itemDescriptor"> { i.id, TRUE, i.issued, + NULL, c.code, i.created, i.ref, @@ -62,7 +63,6 @@ module.exports = Self => { NULL, NULL, NULL, - NULL, i.clientFk, i.pdf, TRUE isInvoice diff --git a/modules/client/back/methods/sms/send.js b/modules/client/back/methods/sms/send.js index d11b722f5..2446fb95d 100644 --- a/modules/client/back/methods/sms/send.js +++ b/modules/client/back/methods/sms/send.js @@ -5,6 +5,7 @@ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('send', { description: 'Sends SMS to a destination phone', + accessType: 'WRITE', accepts: [{ arg: 'destinationFk', type: 'Integer' diff --git a/modules/client/front/balance/index/index.js b/modules/client/front/balance/index/index.js index 2f1676771..5611e9460 100644 --- a/modules/client/front/balance/index/index.js +++ b/modules/client/front/balance/index/index.js @@ -32,6 +32,7 @@ class Controller { setOrder(value) { this.params.params.companyFk = value; this.filter.where.companyFk = value; + this.refresh(); } refresh() { diff --git a/modules/client/front/descriptor-popover/index.js b/modules/client/front/descriptor-popover/index.js index 1bfa781c8..58da89d0b 100644 --- a/modules/client/front/descriptor-popover/index.js +++ b/modules/client/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.client = null; + this._quicklinks = {}; } set clientFk(id) { @@ -28,14 +29,16 @@ class Controller extends Component { return this._client; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/client/front/greuge/index/index.html b/modules/client/front/greuge/index/index.html index a9d06cfa3..537e67602 100644 --- a/modules/client/front/greuge/index/index.html +++ b/modules/client/front/greuge/index/index.html @@ -4,7 +4,7 @@ filter="::$ctrl.filter" link="{clientFk: $ctrl.$stateParams.id}" limit="20" - data="greuges" auto-load="false"> + data="greuges" auto-load="true"> - + Date Comment - Amount + Amount Type diff --git a/modules/client/front/greuge/index/index.js b/modules/client/front/greuge/index/index.js index 3dd5c9eaf..b89b01d7e 100644 --- a/modules/client/front/greuge/index/index.js +++ b/modules/client/front/greuge/index/index.js @@ -6,12 +6,13 @@ class Controller { this.filter = { include: [ { - relation: "greugeType", + relation: 'greugeType', scope: { - fields: ["id", "name"] + fields: ['id', 'name'] } } - ] + ], + order: 'shipped DESC, amount' }; } } diff --git a/modules/invoiceOut/front/descriptor-popover/index.js b/modules/invoiceOut/front/descriptor-popover/index.js index c6f52e1a6..c47632e33 100644 --- a/modules/invoiceOut/front/descriptor-popover/index.js +++ b/modules/invoiceOut/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.worker = null; + this._quicklinks = {}; } set invoiceOutId(id) { @@ -23,14 +24,16 @@ class Controller extends Component { return this._invoiceOutId; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/item/back/methods/item/clone.js b/modules/item/back/methods/item/clone.js index b8c1727cd..d2f887354 100644 --- a/modules/item/back/methods/item/clone.js +++ b/modules/item/back/methods/item/clone.js @@ -1,3 +1,5 @@ +let UserError = require('vn-loopback/util/user-error'); + module.exports = Self => { Self.remoteMethod('clone', { description: 'clone item', @@ -10,8 +12,9 @@ module.exports = Self => { http: {source: 'path'} }], returns: { - arg: 'id', - description: 'new cloned itemId' + type: 'Object', + description: 'new cloned itemId', + root: true, }, http: { path: `/:id/clone`, @@ -20,76 +23,106 @@ module.exports = Self => { }); Self.clone = async itemId => { - let $ = Self.app.models; let transaction = await Self.beginTransaction({}); - let filter = { - where: { - id: itemId - }, - include: [ - {relation: 'tags', scope: {order: 'priority ASC', include: {relation: 'tag'}}} - ] - }; + let options = {transaction}; try { - let origin = await Self.findOne(filter); - let copy = JSON.parse(JSON.stringify(origin)); + const origin = await Self.findById(itemId, options); + if (!origin) + throw new UserError(`That item doesn't exists`); - delete copy.id; - delete copy.itemTag; - delete copy.description; - delete copy.image; - delete copy.comment; + origin.itemTag = undefined; + origin.description = undefined; + origin.image = undefined; + origin.comment = undefined; + origin.size = undefined; - let newItem = await Self.create(copy); + const newItem = await Self.create(origin, options); - let botanical = await $.ItemBotanical.findOne({ - where: {itemFk: origin.id}, - fields: ['botanical', 'genusFk', 'specieFk'] - }, {options: transaction}); + let promises = []; - if (botanical) { - botanical.itemFk = newItem.id; - await $.ItemBotanical.create(botanical); - } - - - let copyTags = await $.ItemTag.find({ - where: { - itemFk: origin.id - }, - fields: ['tagFk', 'value', 'priority'] - }, {options: transaction}); - - for (let i = 0; i < copyTags.length; i++) { - copyTags[i].itemFk = newItem.id; - await $.ItemTag.upsert(copyTags[i], {options: transaction}); - } - - let copyTaxes = await Self.app.models.ItemTaxCountry.find({ - where: {itemFk: origin.id}, - fields: ['botanical', 'countryFk', 'taxClassFk'] - }, {options: transaction}); - - for (let i = 0; i < copyTaxes.length; i++) { - let tax = copyTaxes[i]; - tax.itemFk = newItem.id; - await Self.app.models.ItemTaxCountry.upsertWithWhere( - { - itemFk: tax.itemFk, - countryFk: tax.countryFk, - taxClassFk: tax.taxClassFk, - }, - tax, - {options: transaction} - ); - } + await cloneTaxes(origin.id, newItem.id, promises, options); + await cloneBotanical(origin.id, newItem.id, promises, options); + await cloneTags(origin.id, newItem.id, promises, options); + await Promise.all(promises); await transaction.commit(); - return newItem.id; + + return newItem; } catch (e) { await transaction.rollback(); throw e; } }; + + /** + * Clone original taxes to new item + * @param {Integer} originalId - Original item id + * @param {Integer} newId - New item id + * @param {Array} promises - Array of promises + * @param {Object} options - Transaction options + */ + async function cloneTaxes(originalId, newId, promises, options) { + const models = Self.app.models; + const originalTaxes = await models.ItemTaxCountry.find({ + where: {itemFk: originalId}, + fields: ['botanical', 'countryFk', 'taxClassFk'] + }, options); + + originalTaxes.forEach(tax => { + tax.itemFk = newId; + + const newItemTax = models.ItemTaxCountry.upsertWithWhere({ + itemFk: newId, + countryFk: tax.countryFk, + }, tax, options); + + promises.push(newItemTax); + }); + } + + /** + * Clone original botanical to new item + * @param {Integer} originalId - Original item id + * @param {Integer} newId - New item id + * @param {Array} promises - Array of promises + * @param {Object} options - Transaction options + */ + async function cloneBotanical(originalId, newId, promises, options) { + const models = Self.app.models; + const botanical = await models.ItemBotanical.findOne({ + where: {itemFk: originalId}, + fields: ['botanical', 'genusFk', 'specieFk'] + }, options); + + if (botanical) { + botanical.itemFk = newId; + const newBotanical = models.ItemBotanical.create(botanical, options); + promises.push(newBotanical); + } + } + + /** + * Clone original item tags to new item + * @param {Integer} originalId - Original item id + * @param {Integer} newId - New item id + * @param {Array} promises - Array of promises + * @param {Object} options - Transaction options + */ + async function cloneTags(originalId, newId, promises, options) { + const models = Self.app.models; + const originalTags = await models.ItemTag.find({ + where: { + itemFk: originalId + }, + fields: ['tagFk', 'value', 'priority'] + }, options); + + originalTags.forEach(tag => { + tag.itemFk = newId; + + const newTag = models.ItemTag.create(tag, options); + promises.push(newTag); + }); + } }; diff --git a/modules/item/back/methods/item/getVisibleAvailable.js b/modules/item/back/methods/item/getVisibleAvailable.js index dd60a069e..b35ca5fb7 100644 --- a/modules/item/back/methods/item/getVisibleAvailable.js +++ b/modules/item/back/methods/item/getVisibleAvailable.js @@ -1,7 +1,6 @@ module.exports = Self => { Self.remoteMethod('getVisibleAvailable', { description: 'Returns visible and available for params', - accessType: '', accepts: [ { arg: 'id', diff --git a/modules/item/back/methods/item/specs/clone.spec.js b/modules/item/back/methods/item/specs/clone.spec.js index 8bae14133..a1bd0f6c8 100644 --- a/modules/item/back/methods/item/specs/clone.spec.js +++ b/modules/item/back/methods/item/specs/clone.spec.js @@ -1,6 +1,6 @@ const app = require('vn-loopback/server/server'); -describe('item clone()', () => { +fdescribe('item clone()', () => { let nextItemId; beforeEach(async() => { @@ -16,7 +16,11 @@ describe('item clone()', () => { let itemFk = 1; let result = await app.models.Item.clone(itemFk); - expect(result).toEqual(nextItemId); + expect(result.id).toEqual(nextItemId); + expect(result.image).toBeUndefined(); + expect(result.itemTag).toBeUndefined(); + expect(result.comment).toBeUndefined(); + expect(result.description).toBeUndefined(); }); it('should attempt to clone the given item but give an error as it doesnt exist', async() => { @@ -24,7 +28,7 @@ describe('item clone()', () => { let itemFk = 999; await app.models.Item.clone(itemFk) .catch(e => { - expect(e.message).toContain('Cannot convert undefined or null to object'); + expect(e.message).toContain(`That item doesn't exists`); error = e; }); diff --git a/modules/item/front/descriptor-popover/index.js b/modules/item/front/descriptor-popover/index.js index ed0cc01d0..1fada5838 100644 --- a/modules/item/front/descriptor-popover/index.js +++ b/modules/item/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.item = null; + this._quicklinks = {}; } set itemFk(id) { @@ -16,6 +17,15 @@ class Controller extends Component { this._itemFk = id; this.item = null; + this._quicklinks = { + btnThree: { + icon: 'icon-transaction', + state: `item.card.diary({ + id: ${id}, + })`, + tooltip: 'Item diary' + } + }; this.getCard(); } @@ -28,14 +38,16 @@ class Controller extends Component { return this._item; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html index 6054c7bb7..fcdbb6c9d 100644 --- a/modules/item/front/index/index.html +++ b/modules/item/front/index/index.html @@ -139,8 +139,7 @@ question="Do you want to clone this item?" message="All it's properties will be copied"> - - + diff --git a/modules/item/front/index/index.js b/modules/item/front/index/index.js index aa8150cc3..d53e2998b 100644 --- a/modules/item/front/index/index.js +++ b/modules/item/front/index/index.js @@ -53,15 +53,6 @@ class Controller { event.preventDefault(); event.stopPropagation(); - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk}, - })`, - tooltip: 'Item diary' - } - }; this.$.itemDescriptor.itemFk = itemFk; this.$.itemDescriptor.parent = event.target; this.$.itemDescriptor.show(); diff --git a/modules/order/back/methods/order-row/removes.js b/modules/order/back/methods/order-row/removes.js index 1b66a4c33..86f0e70d7 100644 --- a/modules/order/back/methods/order-row/removes.js +++ b/modules/order/back/methods/order-row/removes.js @@ -3,7 +3,7 @@ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('removes', { description: 'Delete an Order Row', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'params', type: 'object', diff --git a/modules/order/front/summary/index.html b/modules/order/front/summary/index.html index 90f22b758..66cc6ec65 100644 --- a/modules/order/front/summary/index.html +++ b/modules/order/front/summary/index.html @@ -86,6 +86,5 @@ + vn-id="descriptor"> diff --git a/modules/order/front/summary/index.js b/modules/order/front/summary/index.js index 8b32415c8..19323e4bb 100644 --- a/modules/order/front/summary/index.js +++ b/modules/order/front/summary/index.js @@ -31,15 +31,6 @@ class Controller { } showDescriptor(event, itemFk) { - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${itemFk}, - })`, - tooltip: 'Item diary' - } - }; this.$scope.descriptor.itemFk = itemFk; this.$scope.descriptor.parent = event.target; this.$scope.descriptor.show(); diff --git a/modules/ticket/back/methods/sale/removes.js b/modules/ticket/back/methods/sale/removes.js index 71768af4b..ecf1e2e1c 100644 --- a/modules/ticket/back/methods/sale/removes.js +++ b/modules/ticket/back/methods/sale/removes.js @@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('removes', { description: 'Change the state of a ticket', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'params', type: 'object', diff --git a/modules/ticket/back/methods/sale/reserve.js b/modules/ticket/back/methods/sale/reserve.js index 69cd54224..7114bffc1 100644 --- a/modules/ticket/back/methods/sale/reserve.js +++ b/modules/ticket/back/methods/sale/reserve.js @@ -4,7 +4,7 @@ let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('reserve', { description: 'Change the state of a ticket', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'params', type: 'object', diff --git a/modules/ticket/back/methods/sale/updateDiscount.js b/modules/ticket/back/methods/sale/updateDiscount.js index 6eaf2cb12..641182076 100644 --- a/modules/ticket/back/methods/sale/updateDiscount.js +++ b/modules/ticket/back/methods/sale/updateDiscount.js @@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('updateDiscount', { description: 'Changes the discount of a sale', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'params', type: 'object', diff --git a/modules/ticket/back/methods/sale/updatePrice.js b/modules/ticket/back/methods/sale/updatePrice.js index a49d194e4..aa4df9d28 100644 --- a/modules/ticket/back/methods/sale/updatePrice.js +++ b/modules/ticket/back/methods/sale/updatePrice.js @@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('updatePrice', { description: 'Changes the discount of a sale', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'params', type: 'object', diff --git a/modules/ticket/back/methods/sale/updateQuantity.js b/modules/ticket/back/methods/sale/updateQuantity.js index 8553c7ae7..c25aa9007 100644 --- a/modules/ticket/back/methods/sale/updateQuantity.js +++ b/modules/ticket/back/methods/sale/updateQuantity.js @@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('updateQuantity', { description: 'Changes the quantity of a sale', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'id', type: 'number', diff --git a/modules/ticket/back/methods/ticket/deleted.js b/modules/ticket/back/methods/ticket/deleted.js index 0736be90a..a7fa29a50 100644 --- a/modules/ticket/back/methods/ticket/deleted.js +++ b/modules/ticket/back/methods/ticket/deleted.js @@ -3,7 +3,7 @@ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('deleted', { description: 'Sets the isDeleted value of a ticket to 1', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'ticketFk', type: 'Object', diff --git a/modules/ticket/back/methods/ticket/threeLastActive.js b/modules/ticket/back/methods/ticket/threeLastActive.js index 3539efb4f..2966514a4 100644 --- a/modules/ticket/back/methods/ticket/threeLastActive.js +++ b/modules/ticket/back/methods/ticket/threeLastActive.js @@ -1,7 +1,7 @@ module.exports = Self => { Self.remoteMethod('threeLastActive', { description: 'Returns the last three tickets of a client that have the alertLevel at 0 and the shiped day is gt today', - accessType: '', + accessType: 'READ', accepts: [{ arg: 'filter', type: 'object', diff --git a/modules/ticket/front/descriptor-popover/index.js b/modules/ticket/front/descriptor-popover/index.js index e552fde16..1c8b997a7 100644 --- a/modules/ticket/front/descriptor-popover/index.js +++ b/modules/ticket/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.ticket = null; + this._quicklinks = {}; } set ticketFk(id) { @@ -28,14 +29,16 @@ class Controller extends Component { return this._ticket; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/modules/ticket/front/index/index.js b/modules/ticket/front/index/index.js index c616120df..4b58d9bd8 100644 --- a/modules/ticket/front/index/index.js +++ b/modules/ticket/front/index/index.js @@ -27,7 +27,7 @@ export default class Controller { this.$http.get(`/api/TicketConfigs/findOne`).then(res => { if (res.data) { this.filter = { - scopeDays: res.data.scopeDays + scopeDays: parseInt(res.data.scopeDays) }; } }); @@ -64,6 +64,7 @@ export default class Controller { onSearch(params) { if (params) { if (params.scopeDays) { + params.scopeDays = parseInt(params.scopeDays); this.scopeDays = params.scopeDays; this.buildFilterDates(); params = Object.assign(params, {from: this.today, to: this.daysOnward}); diff --git a/modules/ticket/front/search-panel/index.html b/modules/ticket/front/search-panel/index.html index 7e3267f45..70fa24e63 100644 --- a/modules/ticket/front/search-panel/index.html +++ b/modules/ticket/front/search-panel/index.html @@ -37,8 +37,7 @@ label="To" model="filter.to"> - { Self.remoteMethod('getLeaves', { description: 'Returns the first shipped and landed possible for params', - accessType: '', accepts: [{ arg: 'parentFk', type: 'Number', diff --git a/modules/worker/back/methods/department/nodeAdd.js b/modules/worker/back/methods/department/nodeAdd.js index 58c50f0bd..93a6f81c0 100644 --- a/modules/worker/back/methods/department/nodeAdd.js +++ b/modules/worker/back/methods/department/nodeAdd.js @@ -4,7 +4,7 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; module.exports = Self => { Self.remoteMethod('nodeAdd', { description: 'Returns the first shipped and landed possible for params', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'parentFk', type: 'Number', diff --git a/modules/worker/back/methods/department/nodeDelete.js b/modules/worker/back/methods/department/nodeDelete.js index 22cf5312c..92b354ee5 100644 --- a/modules/worker/back/methods/department/nodeDelete.js +++ b/modules/worker/back/methods/department/nodeDelete.js @@ -4,7 +4,7 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; module.exports = Self => { Self.remoteMethod('nodeDelete', { description: 'Returns the first shipped and landed possible for params', - accessType: '', + accessType: 'WRITE', accepts: [{ arg: 'parentFk', type: 'Number', diff --git a/modules/worker/back/methods/holiday/getByWarehouse.js b/modules/worker/back/methods/holiday/getByWarehouse.js index 3ebb5f5b2..a56b5166e 100644 --- a/modules/worker/back/methods/holiday/getByWarehouse.js +++ b/modules/worker/back/methods/holiday/getByWarehouse.js @@ -1,7 +1,6 @@ module.exports = Self => { Self.remoteMethod('getByWarehouse', { description: 'Returns an array of labour holidays from an specified warehouse', - accessType: '', accepts: [{ arg: 'warehouseFk', type: 'Number', diff --git a/modules/worker/back/methods/worker-calendar/absences.js b/modules/worker/back/methods/worker-calendar/absences.js index b6eae8a13..7c1a74084 100644 --- a/modules/worker/back/methods/worker-calendar/absences.js +++ b/modules/worker/back/methods/worker-calendar/absences.js @@ -1,11 +1,8 @@ - -const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('absences', { description: 'Returns an array of absences from an specified worker', - accessType: '', accepts: [{ arg: 'workerFk', type: 'Number', diff --git a/modules/worker/front/descriptor-popover/index.js b/modules/worker/front/descriptor-popover/index.js index 168b2f423..fd3d85cb7 100644 --- a/modules/worker/front/descriptor-popover/index.js +++ b/modules/worker/front/descriptor-popover/index.js @@ -9,6 +9,7 @@ class Controller extends Component { this.$http = $http; this.$q = $q; this.worker = null; + this._quicklinks = {}; } set workerFk(workerFk) { @@ -23,14 +24,16 @@ class Controller extends Component { return this._workerFk; } - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - get quicklinks() { return this._quicklinks; } + set quicklinks(value = {}) { + Object.keys(value).forEach(key => { + this._quicklinks[key] = value[key]; + }); + } + show() { this.$.popover.parent = this.parent; this.$.popover.show(); diff --git a/package-lock.json b/package-lock.json index e9fa98538..2f4f27153 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1505,7 +1505,7 @@ }, "util": { "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -1543,15 +1543,23 @@ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-done": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz", - "integrity": "sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.2", - "process-nextick-args": "^1.0.7", + "process-nextick-args": "^2.0.0", "stream-exhaust": "^1.0.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + } } }, "async-each": { @@ -1733,7 +1741,7 @@ "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { "cache-base": "^1.0.1", @@ -2321,7 +2329,7 @@ "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -2496,7 +2504,7 @@ "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -2656,7 +2664,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -3194,13 +3202,13 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, "regexpu-core": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "dev": true, "requires": { @@ -3211,13 +3219,13 @@ }, "regjsgen": { "version": "0.2.0", - "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", "dev": true }, "regjsparser": { "version": "0.1.5", - "resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { @@ -3687,7 +3695,7 @@ "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { "is-obj": "^1.0.0" @@ -3847,7 +3855,7 @@ "dependencies": { "fs-extra": { "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { @@ -3860,7 +3868,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "dev": true, "requires": { @@ -4151,14 +4159,14 @@ } }, "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", "dev": true, "requires": { "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.1" } }, @@ -4844,7 +4852,7 @@ }, "file-loader": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "dev": true, "requires": { @@ -4937,9 +4945,9 @@ } }, "fined": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.1.tgz", - "integrity": "sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, "requires": { "expand-tilde": "^2.0.2", @@ -5710,9 +5718,9 @@ } }, "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -5866,9 +5874,9 @@ }, "dependencies": { "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -5907,7 +5915,7 @@ "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { "global-prefix": "^1.0.1", @@ -6012,21 +6020,21 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "gulp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.0.tgz", - "integrity": "sha1-lXZsYB2t5Kd+0+eyttwDiBtZY2Y=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", "dev": true, "requires": { - "glob-watcher": "^5.0.0", - "gulp-cli": "^2.0.0", - "undertaker": "^1.0.0", + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", "vinyl-fs": "^3.0.0" }, "dependencies": { "gulp-cli": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.0.1.tgz", - "integrity": "sha512-RxujJJdN8/O6IW2nPugl7YazhmrIEjmiVfPKrWt68r71UCaLKS71Hp0gpKT+F6qOUFtr7KqtifDKaAJPRVvMYQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", + "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", "dev": true, "requires": { "ansi-colors": "^1.0.1", @@ -6039,7 +6047,7 @@ "gulplog": "^1.0.0", "interpret": "^1.1.0", "isobject": "^3.0.1", - "liftoff": "^2.5.0", + "liftoff": "^3.1.0", "matchdep": "^2.0.0", "mute-stdout": "^1.0.0", "pretty-hrtime": "^1.0.0", @@ -6259,7 +6267,7 @@ }, "kind-of": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "dev": true }, @@ -6443,7 +6451,7 @@ "dependencies": { "es6-promise": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", "dev": true }, @@ -7458,7 +7466,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -7628,7 +7636,7 @@ }, "jasmine-core": { "version": "2.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "resolved": "http://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", "dev": true }, @@ -7645,7 +7653,7 @@ "jasmine-spec-reporter": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha1-HWMq7ANBZwrTJPkrqEtLMrNeniI=", + "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", "dev": true, "requires": { "colors": "1.1.2" @@ -7880,7 +7888,7 @@ "karma-chrome-launcher": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha1-zxudBxNswY/iOTJ9JGVMPbw2is8=", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "dev": true, "requires": { "fs-access": "^1.0.0", @@ -8053,19 +8061,42 @@ } }, "liftoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", - "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", "dev": true, "requires": { "extend": "^3.0.0", - "findup-sync": "^2.0.0", + "findup-sync": "^3.0.0", "fined": "^1.0.1", "flagged-respawn": "^1.0.0", "is-plain-object": "^2.0.4", "object.map": "^1.0.0", "rechoir": "^0.6.2", "resolve": "^1.1.7" + }, + "dependencies": { + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } } }, "load-json-file": { @@ -9690,7 +9721,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minstache": { @@ -9704,7 +9735,7 @@ "dependencies": { "commander": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz", "integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=", "dev": true, "requires": { @@ -10162,7 +10193,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -10792,7 +10823,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -10820,6 +10852,7 @@ "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -10834,7 +10867,8 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", @@ -10845,7 +10879,8 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -10962,7 +10997,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -10974,6 +11010,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -10988,6 +11025,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -10995,12 +11033,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -11019,6 +11059,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -11099,7 +11140,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -11111,6 +11153,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -11196,7 +11239,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -11232,6 +11276,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -11251,6 +11296,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -11294,12 +11340,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -11356,9 +11404,9 @@ } }, "now-and-later": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.0.tgz", - "integrity": "sha1-vGHLtFbXnLMiB85HygUTb/Ln1u4=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", "dev": true, "requires": { "once": "^1.3.2" @@ -11598,7 +11646,7 @@ "dependencies": { "minimist": { "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, @@ -12154,7 +12202,7 @@ }, "pretty-bytes": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { @@ -12225,7 +12273,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -12237,13 +12285,13 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "through2": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", "dev": true, "requires": { @@ -13134,7 +13182,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -13259,7 +13307,7 @@ "dependencies": { "source-map": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { @@ -13399,7 +13447,7 @@ "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -13510,7 +13558,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { @@ -13586,7 +13634,7 @@ "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { "define-property": "^1.0.0", @@ -13637,7 +13685,7 @@ "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { "kind-of": "^3.2.0" @@ -13993,7 +14041,7 @@ "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { "extend-shallow": "^3.0.0" @@ -14177,7 +14225,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -14708,13 +14756,13 @@ "dev": true }, "tar": { - "version": "2.2.1", - "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", "dev": true, "requires": { "block-stream": "*", - "fstream": "^1.0.2", + "fstream": "^1.0.12", "inherits": "2" } }, @@ -15062,7 +15110,7 @@ "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "dev": true, "requires": { "nopt": "~1.0.10" @@ -15276,9 +15324,9 @@ } }, "undertaker": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.0.tgz", - "integrity": "sha1-M52kZGJS0ILcN45wgGcpl1DhG0k=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", + "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", "dev": true, "requires": { "arr-flatten": "^1.0.1", @@ -15548,7 +15596,7 @@ "useragent": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", - "integrity": "sha1-IX+UOtVAyyEoZYqyP8lg9qiMmXI=", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "dev": true, "requires": { "lru-cache": "4.1.x", @@ -15613,9 +15661,9 @@ "dev": true }, "v8flags": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.2.tgz", - "integrity": "sha512-MtivA7GF24yMPte9Rp/BWGCYQNaUj86zeYxV/x2RRJMKagImbbv3u8iJC57lNhWLPcGLJmHcHmFWkNsplbbLWw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", "dev": true, "requires": { "homedir-polyfill": "^1.0.1" @@ -16285,7 +16333,7 @@ }, "globby": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { @@ -16298,7 +16346,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } diff --git a/package.json b/package.json index fa63013f7..016053bd5 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "eslint-plugin-jasmine": "^2.10.1", "fancy-log": "^1.3.2", "file-loader": "^1.1.11", - "gulp": "^4.0.0", + "gulp": "^4.0.2", "gulp-concat": "^2.6.1", "gulp-env": "^0.4.0", "gulp-file": "^0.4.0", diff --git a/print/report/printer-setup/assets/files/model.ezp b/print/report/printer-setup/assets/files/model.ezp old mode 100755 new mode 100644 index 297df3d21..98e3302bc Binary files a/print/report/printer-setup/assets/files/model.ezp and b/print/report/printer-setup/assets/files/model.ezp differ