From 3c9800a7a3aa9c7c1c980d730089103346e63bf2 Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 20 May 2022 12:33:12 +0200 Subject: [PATCH] refactor: pull request changes --- db/changes/10460-motherDay/00-aclItemType.sql | 11 ++++------- modules/item/back/models/item-type.json | 6 ------ modules/item/front/item-type/card/index.spec.js | 6 ++++-- modules/item/front/item-type/descriptor/index.html | 8 +------- modules/item/front/item-type/descriptor/locale/es.yml | 2 -- modules/item/front/item-type/search-panel/index.html | 3 ++- 6 files changed, 11 insertions(+), 25 deletions(-) delete mode 100644 modules/item/front/item-type/descriptor/locale/es.yml diff --git a/db/changes/10460-motherDay/00-aclItemType.sql b/db/changes/10460-motherDay/00-aclItemType.sql index 67dc652e5b..836a69dfd2 100644 --- a/db/changes/10460-motherDay/00-aclItemType.sql +++ b/db/changes/10460-motherDay/00-aclItemType.sql @@ -1,7 +1,4 @@ -INSERT INTO `salix`.`ACL` -(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) -VALUES('ItemType', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); - -INSERT INTO `salix`.`ACL` -(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) -VALUES('ItemType', '*', 'WRITE', 'ALLOW', 'ROLE', 'buyer'); \ No newline at end of file +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES + ('ItemType', '*', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('ItemType', '*', 'WRITE', 'ALLOW', 'ROLE', 'buyer'); \ No newline at end of file diff --git a/modules/item/back/models/item-type.json b/modules/item/back/models/item-type.json index 64061a9b3d..407b4d15a3 100644 --- a/modules/item/back/models/item-type.json +++ b/modules/item/back/models/item-type.json @@ -18,12 +18,6 @@ "name": { "type": "string" }, - "workerFk": { - "type": "number" - }, - "categoryFk": { - "type": "number" - }, "temperatureFk": { "type": "string" }, diff --git a/modules/item/front/item-type/card/index.spec.js b/modules/item/front/item-type/card/index.spec.js index 179f652743..ab2314bb91 100644 --- a/modules/item/front/item-type/card/index.spec.js +++ b/modules/item/front/item-type/card/index.spec.js @@ -15,11 +15,13 @@ describe('component vnItemTypeCard', () => { it('should reload the controller data', () => { controller.$params.id = 1; - $httpBackend.expectGET('ItemTypes/1').respond('foo'); + const itemType = {id: 1}; + + $httpBackend.expectGET('ItemTypes/1').respond(itemType); controller.reload(); $httpBackend.flush(); - expect(controller.itemType).toBe('foo'); + expect(controller.itemType).toEqual(itemType); }); }); }); diff --git a/modules/item/front/item-type/descriptor/index.html b/modules/item/front/item-type/descriptor/index.html index ac86b2189c..5a0e8ed490 100644 --- a/modules/item/front/item-type/descriptor/index.html +++ b/modules/item/front/item-type/descriptor/index.html @@ -22,10 +22,4 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/modules/item/front/item-type/descriptor/locale/es.yml b/modules/item/front/item-type/descriptor/locale/es.yml deleted file mode 100644 index 1ca512e4f9..0000000000 --- a/modules/item/front/item-type/descriptor/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Role will be removed: El rol va a ser eliminado -Role removed: Rol eliminado \ No newline at end of file diff --git a/modules/item/front/item-type/search-panel/index.html b/modules/item/front/item-type/search-panel/index.html index 2e373fda5a..4aa7629006 100644 --- a/modules/item/front/item-type/search-panel/index.html +++ b/modules/item/front/item-type/search-panel/index.html @@ -4,7 +4,8 @@ + ng-model="filter.name" + vn-focus>