diff --git a/back/models/province.json b/back/models/province.json index 49a971b65..2e2ace5ed 100644 --- a/back/models/province.json +++ b/back/models/province.json @@ -1,46 +1,53 @@ { - "name": "Province", - "description": "Provinces of every country", - "base": "VnModel", - "options": { - "mysql": { - "table": "province" - } - }, - "properties": { - "id": { - "type": "Number", - "id": true, - "description": "Identifier" + "name": "Province", + "description": "Provinces of every country", + "base": "VnModel", + "options": { + "mysql": { + "table": "province" + } }, - "name": { - "type": "string", - "required": true - } - }, - "relations": { - "country": { - "type": "belongsTo", - "model": "Country", - "foreignKey": "countryFk" + "properties": { + "id": { + "type": "Number", + "id": true, + "description": "Identifier" + }, + "name": { + "type": "string", + "required": true + } }, - "warehouse": { - "type": "belongsTo", - "model": "Warehouse", - "foreignKey": "warehouseFk" + "relations": { + "country": { + "type": "belongsTo", + "model": "Country", + "foreignKey": "countryFk" + }, + "warehouse": { + "type": "belongsTo", + "model": "Warehouse", + "foreignKey": "warehouseFk" + }, + "zone": { + "type": "belongsTo", + "model": "Zone", + "foreignKey": "zoneFk" + } }, - "zone": { - "type": "belongsTo", - "model": "Zone", - "foreignKey": "zoneFk" - } - }, - "acls": [ - { - "accessType": "READ", - "principalType": "ROLE", - "principalId": "$everyone", - "permission": "ALLOW" - } - ] + "scopes": { + "location": { + "include": { + "relation": "country" + } + } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ] } \ No newline at end of file diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 1f34738e0..3f7b14431 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -197,14 +197,16 @@ INSERT INTO `vn`.`town`(`id`, `name`, `provinceFk`) (1, 'Valencia', 1), (2, 'Silla', 1), (3, 'Algemesi', 1), - (4, 'Alzira', 1); + (4, 'Alzira', 1), + (5, 'Quito', 5); INSERT INTO `vn`.`postCode`(`code`, `townFk`, `geoFk`) VALUES ('46000', 1, 6), ('46460', 2, 6), ('46680', 3, 6), - ('46600', 4, 7); + ('46600', 4, 7), + ('EC170150', 5, 8); INSERT INTO `vn`.`clientType`(`id`, `code`, `type`) VALUES diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 0bf363a0c..284945241 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -44,8 +44,8 @@ export default { taxNumber: 'vn-client-create vn-textfield[ng-model="$ctrl.client.fi"]', socialName: 'vn-client-create vn-textfield[ng-model="$ctrl.client.socialName"]', street: 'vn-client-create vn-textfield[ng-model="$ctrl.client.street"]', - postcode: 'vn-client-create vn-textfield[ng-model="$ctrl.client.postcode"]', - city: 'vn-client-create vn-textfield[ng-model="$ctrl.client.city"]', + postcode: 'vn-client-create vn-datalist[ng-model="$ctrl.client.postcode"]', + city: 'vn-client-create vn-datalist[ng-model="$ctrl.client.city"]', province: 'vn-client-create vn-autocomplete[ng-model="$ctrl.client.provinceFk"]', country: 'vn-client-create vn-autocomplete[ng-model="$ctrl.client.countryFk"]', userName: 'vn-client-create vn-textfield[ng-model="$ctrl.client.userName"]', @@ -76,8 +76,8 @@ export default { equalizationTaxCheckbox: 'vn-client-fiscal-data vn-check[ng-model="$ctrl.client.isEqualizated"]', acceptPropagationButton: '.vn-confirm.shown button[response=accept]', address: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.street"]', - postcode: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.postcode"]', - city: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.city"]', + postcode: 'vn-client-fiscal-data vn-datalist[ng-model="$ctrl.client.postcode"]', + city: 'vn-client-fiscal-data vn-datalist[ng-model="$ctrl.client.city"]', province: 'vn-client-fiscal-data vn-autocomplete[ng-model="$ctrl.client.provinceFk"]', country: 'vn-client-fiscal-data vn-autocomplete[ng-model="$ctrl.client.countryFk"]', activeCheckbox: 'vn-client-fiscal-data vn-check[label="Active"]', @@ -114,8 +114,8 @@ export default { defaultCheckbox: 'vn-check[label="Default"]', consignee: 'vn-textfield[ng-model="$ctrl.address.nickname"]', streetAddress: 'vn-textfield[ng-model="$ctrl.address.street"]', - postcode: 'vn-textfield[ng-model="$ctrl.address.postalCode"]', - city: 'vn-textfield[ng-model="$ctrl.address.city"]', + postcode: 'vn-datalist[ng-model="$ctrl.address.postalCode"]', + city: 'vn-datalist[ng-model="$ctrl.address.city"]', province: 'vn-autocomplete[ng-model="$ctrl.address.provinceId"]', agency: 'vn-autocomplete[ng-model="$ctrl.address.agencyModeId"]', phone: 'vn-textfield[ng-model="$ctrl.address.phone"]', diff --git a/e2e/paths/02-client/01_create_client.spec.js b/e2e/paths/02-client/01_create_client.spec.js index 27ed5049a..65db9e7c6 100644 --- a/e2e/paths/02-client/01_create_client.spec.js +++ b/e2e/paths/02-client/01_create_client.spec.js @@ -87,7 +87,7 @@ describe('Client create path', async() => { .waitToGetProperty(selectors.createClientView.country, 'value'); expect(clientCity).toEqual('Valencia'); - expect(clientProvince).toEqual('Province one'); + expect(clientProvince).toContain('Province one'); expect(clientCountry).toEqual('EspaƱa'); }); diff --git a/e2e/paths/02-client/03_edit_fiscal_data.spec.js b/e2e/paths/02-client/03_edit_fiscal_data.spec.js index f7d6cbe92..4cd54b87d 100644 --- a/e2e/paths/02-client/03_edit_fiscal_data.spec.js +++ b/e2e/paths/02-client/03_edit_fiscal_data.spec.js @@ -198,11 +198,10 @@ describe('Client Edit fiscalData path', () => { expect(result).toEqual('Valencia'); }); - it(`should confirm the province have been autocompleted`, async() => { const result = await page.waitToGetProperty(selectors.clientFiscalData.province, 'value'); - expect(result).toEqual('Province one'); + expect(result).toContain('Province one'); }); it('should confirm the country have been autocompleted', async() => { diff --git a/e2e/paths/02-client/05_add_address.spec.js b/e2e/paths/02-client/05_add_address.spec.js index 737d6b05b..c9228e1cf 100644 --- a/e2e/paths/02-client/05_add_address.spec.js +++ b/e2e/paths/02-client/05_add_address.spec.js @@ -25,9 +25,7 @@ describe('Client Add address path', () => { it('should receive an error after clicking save button as consignee, street and town fields are empty', async() => { await page.waitToClick(selectors.clientAddresses.defaultCheckbox); - await page.autocompleteSearch(selectors.clientAddresses.province, 'Province five'); - await page.write(selectors.clientAddresses.city, 'Valencia'); - await page.write(selectors.clientAddresses.postcode, '46000'); + await page.write(selectors.clientAddresses.postcode, 'EC170150'); await page.autocompleteSearch(selectors.clientAddresses.agency, 'Entanglement'); await page.write(selectors.clientAddresses.phone, '999887744'); await page.write(selectors.clientAddresses.mobileInput, '999887744'); @@ -37,6 +35,16 @@ describe('Client Add address path', () => { expect(result).toEqual('Some fields are invalid'); }); + it('should confirm that the city and province are propertly filled', async() => { + const city = await page + .waitToGetProperty(selectors.clientAddresses.city, 'value'); + + const province = await page + .waitToGetProperty(selectors.clientAddresses.province, 'value'); + + expect(city).toEqual('Quito'); + expect(province).toContain('Province five'); + }); it(`should receive an error after clicking save button as consignee, incoterms and customsAgent are empty`, async() => { await page.write(selectors.clientAddresses.consignee, 'Bruce Bunner'); diff --git a/front/core/components/datalist/index.js b/front/core/components/datalist/index.js index bf3cab9a1..d52e6ca23 100644 --- a/front/core/components/datalist/index.js +++ b/front/core/components/datalist/index.js @@ -27,7 +27,7 @@ export default class Datalist extends Textfield { value = value == '' || value == null ? null : value; oldValue = oldValue == '' || oldValue == null ? null : oldValue; - this.refreshSelection(); + if (oldValue === undefined) this.refreshSelection(); if (!value || value === oldValue && this.modelData != null) return; @@ -52,7 +52,14 @@ export default class Datalist extends Textfield { validSelection(selection) { return this.modelData && this.modelData.find(item => { - return item[this.valueField] == selection; + let dataValue = item[this.valueField]; + if (typeof(dataValue) === 'string') + dataValue = dataValue.toLowerCase(); + + if (typeof(selection) === 'string') + selection = selection.toLowerCase(); + + return dataValue == selection; }); } diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 49cd0f171..b8c31020b 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -64,5 +64,6 @@ "Sent units from ticket": "I sent *{{quantity}}* units of [{{concept}} (#{{itemId}})]({{{itemUrl}}}) to *\"{{nickname}}\"* coming from ticket id [#{{ticketId}}]({{{ticketUrl}}})", "Customs agent is required for a non UEE member": "Customs agent is required for a non UEE member", "Incoterms is required for a non UEE member": "Incoterms is required for a non UEE member", - "Client checked as validated despite of duplication": "Client checked as validated despite of duplication from client id {{clientId}}" + "Client checked as validated despite of duplication": "Client checked as validated despite of duplication from client id {{clientId}}", + "Landing cannot be lesser than shipment": "Landing cannot be lesser than shipment" } \ No newline at end of file diff --git a/modules/client/front/address/create/index.html b/modules/client/front/address/create/index.html index 1c70a1cbd..519638d48 100644 --- a/modules/client/front/address/create/index.html +++ b/modules/client/front/address/create/index.html @@ -39,61 +39,53 @@ - - - - - - - - + + {{code}} - {{town.name}} ({{town.province.name}}, + {{town.province.country.country}}) + + + + + + + + + {{name}}, {{province.name}} + ({{province.country.country}}) + + + + {{name}} ({{country.country}}) + { if (this.address.isDefaultAddress) @@ -51,6 +31,46 @@ export default class Controller extends Component { return this.$http.post(`CustomsAgents`, this.newCustomsAgent) .then(res => this.address.customsAgentFk = res.data.id); } + + get town() { + return this._town; + } + + // Town auto complete + set town(selection) { + this._town = selection; + + if (!selection) return; + + const province = selection.province; + const postcodes = selection.postcodes; + + this.address.provinceId = province.id; + + if (postcodes.length === 1) + this.address.postalCode = postcodes[0].code; + } + + get postcode() { + return this._postcode; + } + + // Postcode auto complete + set postcode(selection) { + this._postcode = selection; + + if (!selection) return; + + const town = selection.town; + const province = town.province; + + this.address.city = town.name; + this.address.provinceId = province.id; + } + + onResponse(response) { + this.address.postalCode = response.code; + } } Controller.$inject = ['$element', '$scope']; diff --git a/modules/client/front/address/create/index.spec.js b/modules/client/front/address/create/index.spec.js index 289e0572d..fb6567dce 100644 --- a/modules/client/front/address/create/index.spec.js +++ b/modules/client/front/address/create/index.spec.js @@ -53,9 +53,48 @@ describe('Client', () => { }); }); - describe('postcodeSelection() setter', () => { - it(`should set the town, province and contry properties`, () => { - controller.postcodeSelection = { + describe('town() setter', () => { + it(`should set provinceId property`, () => { + controller.town = { + provinceFk: 1, + code: 46001, + province: { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }, + postcodes: [] + }; + + expect(controller.address.provinceId).toEqual(1); + }); + + it(`should set provinceId property and fill the postalCode if there's just one`, () => { + controller.town = { + provinceFk: 1, + code: 46001, + province: { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }, + postcodes: [{code: '46001'}] + }; + + expect(controller.address.provinceId).toEqual(1); + expect(controller.address.postalCode).toEqual('46001'); + }); + }); + + describe('postcode() setter', () => { + it(`should set the town and province properties`, () => { + controller.postcode = { townFk: 1, code: 46001, town: { @@ -73,7 +112,7 @@ describe('Client', () => { }; expect(controller.address.city).toEqual('New York'); - expect(controller.address.provinceFk).toEqual(1); + expect(controller.address.provinceId).toEqual(1); }); }); diff --git a/modules/client/front/address/edit/index.html b/modules/client/front/address/edit/index.html index 035608120..70b3523c5 100644 --- a/modules/client/front/address/edit/index.html +++ b/modules/client/front/address/edit/index.html @@ -56,58 +56,53 @@ - - - - - - - - - + + {{code}} - {{town.name}} ({{town.province.name}}, + {{town.province.country.country}}) + + + + + + + + + {{name}}, {{province.name}} + ({{province.country.country}}) + + + + {{name}} ({{country.country}}) + this.$.model.save(true)) @@ -39,6 +35,48 @@ export default class Controller extends Component { return this.$http.post(`CustomsAgents`, this.newCustomsAgent) .then(res => this.address.customsAgentFk = res.data.id); } + + get town() { + return this._town; + } + + // Town auto complete + set town(selection) { + const oldValue = this._town; + this._town = selection; + + if (!oldValue) return; + + const province = selection.province; + const postcodes = selection.postcodes; + + this.address.provinceFk = province.id; + + if (postcodes.length === 1) + this.address.postalCode = postcodes[0].code; + } + + get postcode() { + return this._postcode; + } + + // Postcode auto complete + set postcode(selection) { + const oldValue = this._postcode; + this._postcode = selection; + + if (!oldValue) return; + + const town = selection.town; + const province = town.province; + + this.address.city = town.name; + this.address.provinceFk = province.id; + } + + onResponse(response) { + this.address.postalCode = response.code; + } } ngModule.component('vnClientAddressEdit', { diff --git a/modules/client/front/create/index.html b/modules/client/front/create/index.html index ce4b7d4ed..b2ef42beb 100644 --- a/modules/client/front/create/index.html +++ b/modules/client/front/create/index.html @@ -49,76 +49,63 @@ - + + {{code}} - {{town.name}} ({{town.province.name}}, + {{town.province.country.country}}) + + + + + + + + + {{name}}, {{province.name}} + ({{province.country.country}}) + + + + + + {{name}} ({{country.country}}) + + - - - - - - - - - - this.$state.go('client.card.basicData', {id: json.data.id}) + ); } - set postcodeSelection(selection) { - this._postcodeSelection = selection; + get province() { + return this._province; + } + + // Province auto complete + set province(selection) { + this._province = selection; + + if (!selection) return; + + const country = selection.country; + + this.client.countryFk = country.id; + } + + get town() { + return this._town; + } + + // Town auto complete + set town(selection) { + this._town = selection; + + if (!selection) return; + + const province = selection.province; + const country = province.country; + const postcodes = selection.postcodes; + + this.client.provinceFk = province.id; + this.client.countryFk = country.id; + + if (postcodes.length === 1) + this.client.postcode = postcodes[0].code; + } + + get postcode() { + return this._postcode; + } + + // Postcode auto complete + set postcode(selection) { + this._postcode = selection; if (!selection) return; @@ -33,13 +76,8 @@ export default class Controller { onResponse(response) { this.client.postcode = response.code; } - - onSubmit() { - return this.$.watcher.submit().then( - json => this.$state.go('client.card.basicData', {id: json.data.id}) - ); - } } + Controller.$inject = ['$scope', '$state', '$http', '$translate', 'vnApp']; ngModule.component('vnClientCreate', { diff --git a/modules/client/front/create/index.spec.js b/modules/client/front/create/index.spec.js index 656392e3d..c297b0545 100644 --- a/modules/client/front/create/index.spec.js +++ b/modules/client/front/create/index.spec.js @@ -40,9 +40,63 @@ describe('Client', () => { }); }); - describe('postcodeSelection() setter', () => { - it(`should set the town, province and contry properties`, () => { - controller.postcodeSelection = { + describe('province() setter', () => { + it(`should set countryFk property`, () => { + controller.province = { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }; + + expect(controller.client.countryFk).toEqual(2); + }); + }); + + describe('town() setter', () => { + it(`should set provinceFk property`, () => { + controller.town = { + provinceFk: 1, + code: 46001, + province: { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }, + postcodes: [] + }; + + expect(controller.client.provinceFk).toEqual(1); + }); + + it(`should set provinceFk property and fill the postalCode if there's just one`, () => { + controller.town = { + provinceFk: 1, + code: 46001, + province: { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }, + postcodes: [{code: '46001'}] + }; + + expect(controller.client.provinceFk).toEqual(1); + expect(controller.client.postcode).toEqual('46001'); + }); + }); + + describe('postcode() setter', () => { + it(`should set the town, provinceFk and contryFk properties`, () => { + controller.postcode = { townFk: 1, code: 46001, town: { diff --git a/modules/client/front/fiscal-data/index.html b/modules/client/front/fiscal-data/index.html index 3bbc48630..0339090a2 100644 --- a/modules/client/front/fiscal-data/index.html +++ b/modules/client/front/fiscal-data/index.html @@ -33,9 +33,57 @@ - + + {{code}} - {{town.name}} ({{town.province.name}}, + {{town.province.country.country}}) + + + + + + + + + {{name}}, {{province.name}} + ({{province.country.country}}) + + + + + + {{name}} ({{country.country}}) + + - - - - - - - - - + + + \ No newline at end of file diff --git a/modules/client/front/fiscal-data/index.js b/modules/client/front/fiscal-data/index.js index f8e93ab9f..ec918fc66 100644 --- a/modules/client/front/fiscal-data/index.js +++ b/modules/client/front/fiscal-data/index.js @@ -90,6 +90,68 @@ export default class Controller extends Component { this.$.$apply(); } + + get province() { + return this._province; + } + + // Province auto complete + set province(selection) { + const oldValue = this._province; + this._province = selection; + + if (!oldValue) return; + + const country = selection.country; + + this.client.countryFk = country.id; + } + + get town() { + return this._town; + } + + // Town auto complete + set town(selection) { + const oldValue = this._town; + this._town = selection; + + if (!oldValue) return; + + const province = selection.province; + const country = province.country; + const postcodes = selection.postcodes; + + this.client.provinceFk = province.id; + this.client.countryFk = country.id; + + if (postcodes.length === 1) + this.client.postcode = postcodes[0].code; + } + + get postcode() { + return this._postcode; + } + + // Postcode auto complete + set postcode(selection) { + const oldValue = this._postcode; + this._postcode = selection; + + if (!oldValue) return; + + const town = selection.town; + const province = town.province; + const country = province.country; + + this.client.city = town.name; + this.client.provinceFk = province.id; + this.client.countryFk = country.id; + } + + onResponse(response) { + this.client.postcode = response.code; + } } ngModule.component('vnClientFiscalData', { diff --git a/modules/client/front/fiscal-data/index.spec.js b/modules/client/front/fiscal-data/index.spec.js index 7b92fb308..30ff80d04 100644 --- a/modules/client/front/fiscal-data/index.spec.js +++ b/modules/client/front/fiscal-data/index.spec.js @@ -25,6 +25,10 @@ describe('Client', () => { isEqualizated: false, isTaxDataChecked: false }; + + controller.province = {}; + controller.town = {}; + controller.postcode = {}; })); describe('onSubmit()', () => { @@ -129,5 +133,84 @@ describe('Client', () => { $httpBackend.flush(); }); }); + + describe('province() setter', () => { + it(`should set countryFk property`, () => { + controller.province = { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }; + + expect(controller.client.countryFk).toEqual(2); + }); + }); + + describe('town() setter', () => { + it(`should set provinceFk property`, () => { + controller.town = { + provinceFk: 1, + code: 46001, + province: { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }, + postcodes: [] + }; + + expect(controller.client.provinceFk).toEqual(1); + }); + + it(`should set provinceFk property and fill the postalCode if there's just one`, () => { + controller.town = { + provinceFk: 1, + code: 46001, + province: { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + }, + postcodes: [{code: '46001'}] + }; + + expect(controller.client.provinceFk).toEqual(1); + expect(controller.client.postcode).toEqual('46001'); + }); + }); + + describe('postcode() setter', () => { + it(`should set the town, provinceFk and contryFk properties`, () => { + controller.postcode = { + townFk: 1, + code: 46001, + town: { + id: 1, + name: 'New York', + province: { + id: 1, + name: 'New york', + country: { + id: 2, + name: 'USA' + } + } + } + }; + + expect(controller.client.city).toEqual('New York'); + expect(controller.client.provinceFk).toEqual(1); + expect(controller.client.countryFk).toEqual(2); + }); + }); }); }); diff --git a/modules/client/front/postcode/index.html b/modules/client/front/postcode/index.html index 55990281c..fd81534ed 100644 --- a/modules/client/front/postcode/index.html +++ b/modules/client/front/postcode/index.html @@ -1,7 +1,7 @@ + on-accept="$ctrl.onAccept()">
New postcode

Please, ensure you put the correct data!

diff --git a/modules/client/front/postcode/index.js b/modules/client/front/postcode/index.js index bbf0b1953..836ea9a81 100644 --- a/modules/client/front/postcode/index.js +++ b/modules/client/front/postcode/index.js @@ -35,25 +35,20 @@ class Controller extends Component { this.$.postcode.focus(); } - onResponse(response) { - if (response == 'accept') { - try { - if (!this.data.code) - throw new Error(`The postcode can't be empty`); - if (!this.data.townFk) - throw new Error(`The town can't be empty`); + onAccept() { + try { + if (!this.data.code) + throw new Error(`The postcode can't be empty`); + if (!this.data.townFk) + throw new Error(`The town can't be empty`); - this.$http.patch(`postcodes`, this.data).then(response => { - if (response.data) { - this.vnApp.showMessage(this.$translate.instant('The postcode has been saved')); - - this.emit('response', {response: response.data}); - } - }); - } catch (e) { - this.vnApp.showError(this.$translate.instant(e.message)); - return false; - } + this.$http.patch(`postcodes`, this.data).then(res => { + this.vnApp.showMessage(this.$translate.instant('The postcode has been saved')); + this.emit('response', {$response: res.data}); + }); + } catch (e) { + this.vnApp.showError(this.$translate.instant(e.message)); + return false; } return true; } diff --git a/modules/client/front/postcode/index.spec.js b/modules/client/front/postcode/index.spec.js index 04f1a8924..a5e5db9d5 100644 --- a/modules/client/front/postcode/index.spec.js +++ b/modules/client/front/postcode/index.spec.js @@ -15,7 +15,7 @@ describe('Client', () => { controller.client = {id: 101}; })); - describe('onResponse()', () => { + describe('onAccept()', () => { it('should perform a POST query and show a success snackbar', () => { let params = {townFk: 1, provinceFk: 1, countryFk: 1, code: '46460'}; controller.data = {townFk: 1, provinceFk: 1, countryFk: 1, code: '46460'}; @@ -24,7 +24,7 @@ describe('Client', () => { $httpBackend.when('PATCH', `postcodes`, params).respond(200, params); $httpBackend.expect('PATCH', `postcodes`, params).respond(params); - controller.onResponse('accept'); + controller.onAccept(); $httpBackend.flush(); expect(controller.vnApp.showMessage).toHaveBeenCalledWith('The postcode has been saved'); diff --git a/modules/travel/back/methods/travel/createThermograph.js b/modules/travel/back/methods/travel/createThermograph.js index d5388295a..974b67923 100644 --- a/modules/travel/back/methods/travel/createThermograph.js +++ b/modules/travel/back/methods/travel/createThermograph.js @@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('createThermograph', { - description: 'Upload and attach a document', + description: 'Creates a new travel thermograph', accessType: 'WRITE', accepts: [{ arg: 'id', diff --git a/modules/travel/back/methods/travel/updateThermograph.js b/modules/travel/back/methods/travel/updateThermograph.js index efad606eb..d89725920 100644 --- a/modules/travel/back/methods/travel/updateThermograph.js +++ b/modules/travel/back/methods/travel/updateThermograph.js @@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('updateThermograph', { - description: 'updates a file properties or file', + description: 'Updates a travel thermograph', accessType: 'WRITE', accepts: [{ arg: 'id',