From 9c3997438093e17d68de5b0b14bf5261e221902f Mon Sep 17 00:00:00 2001
From: Carlos Jimenez <=>
Date: Tue, 6 Feb 2018 09:07:40 +0100
Subject: [PATCH 1/4] added expenses to create item form
---
client/item/src/create/item-create.html | 12 +++++++-----
client/production/src/index/index.spec.js | 2 +-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/client/item/src/create/item-create.html b/client/item/src/create/item-create.html
index 1a489057d..d57806715 100644
--- a/client/item/src/create/item-create.html
+++ b/client/item/src/create/item-create.html
@@ -31,12 +31,10 @@
order="description ASC"
filter-search="{where: {description: {regexp: 'search'}} }"
>
- {{$parent.$parent.item.description}}
+ {{$parent.$parent.item.description}}
-
-
-
+
-
diff --git a/client/production/src/index/index.spec.js b/client/production/src/index/index.spec.js
index deb9eedaf..dc9f0d89b 100644
--- a/client/production/src/index/index.spec.js
+++ b/client/production/src/index/index.spec.js
@@ -26,7 +26,7 @@ describe('Production', () => {
it('should request to update the ticket state', () => {
let ids = [1, 2, 3, 4];
let stateId = 1;
- let stateName = 'the state!';
+ let stateName = 'state';
let index = [];
controller.tickets = ['ticketVal'];
$httpBackend.whenPUT('/production/api/TicketStates/1/changeState', {tickets: ids}).respond({data: 'ticketVal'});
From 335847358fb5442c92ec6fb1c86c91fcd5707dc5 Mon Sep 17 00:00:00 2001
From: Carlos Jimenez <=>
Date: Tue, 6 Feb 2018 14:03:09 +0100
Subject: [PATCH 2/4] fixtures addition plus item en.yml created
---
client/item/src/create/item-create.spec.js | 6 ------
client/item/src/locale/en.yml | 1 +
services/db/01-titemLog.sql | 17 +++++++++++++++++
services/db/02-fixtures.sql | 4 ++++
4 files changed, 22 insertions(+), 6 deletions(-)
create mode 100644 client/item/src/locale/en.yml
create mode 100644 services/db/01-titemLog.sql
diff --git a/client/item/src/create/item-create.spec.js b/client/item/src/create/item-create.spec.js
index bff09cad5..e63265ee7 100644
--- a/client/item/src/create/item-create.spec.js
+++ b/client/item/src/create/item-create.spec.js
@@ -27,12 +27,6 @@ describe('Item', () => {
controller = $componentController('vnItemCreate', {$scope: $scope});
}));
- it('should define and set scope, state and item properties', () => {
- expect(controller.$).toEqual($scope);
- expect(controller.$state).toEqual($state);
- expect(controller.item).toEqual({relevancy: 0});
- });
-
describe('onSubmit()', () => {
it(`should call submit() on the watcher then expect a callback`, () => {
spyOn($state, 'go');
diff --git a/client/item/src/locale/en.yml b/client/item/src/locale/en.yml
new file mode 100644
index 000000000..03f1b1f7f
--- /dev/null
+++ b/client/item/src/locale/en.yml
@@ -0,0 +1 @@
+Artículo: Items
\ No newline at end of file
diff --git a/services/db/01-titemLog.sql b/services/db/01-titemLog.sql
new file mode 100644
index 000000000..cab6c3d19
--- /dev/null
+++ b/services/db/01-titemLog.sql
@@ -0,0 +1,17 @@
+CREATE TABLE vn.itemLog
+ SELECT * FROM vn.entryLog LIMIT 0;
+
+ALTER TABLE `vn`.`itemLog`
+ADD INDEX `itemLogItemFk_idx` (`originFk` ASC),
+ADD INDEX `itemLogUserFk_idx` (`userFk` ASC);
+ALTER TABLE `vn`.`itemLog`
+ADD CONSTRAINT `itemLogItemFk`
+ FOREIGN KEY (`originFk`)
+ REFERENCES `vn2008`.`Articles` (`Id_Article`)
+ ON DELETE NO ACTION
+ ON UPDATE CASCADE,
+ADD CONSTRAINT `itemLogUserFk`
+ FOREIGN KEY (`userFk`)
+ REFERENCES `account`.`user` (`id`)
+ ON DELETE NO ACTION
+ ON UPDATE CASCADE;
diff --git a/services/db/02-fixtures.sql b/services/db/02-fixtures.sql
index 7721c6313..ad22fa67b 100644
--- a/services/db/02-fixtures.sql
+++ b/services/db/02-fixtures.sql
@@ -619,3 +619,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
(3, 1, 3, 'round', 3),
(4, 1, 4, 'Gamoras hideout', 2),
(5, 1, 5, 'Gamora', 1);
+
+INSERT INTO `vn`.`clientLog` (`id`, `originFk`, `userFk`, `action`, `description`)
+ VALUES
+ ('1', '1', '1', 'insert', 'We made an change!');
\ No newline at end of file
From 8de88aa046f93b427c00cba31269e5dc1fb1c533 Mon Sep 17 00:00:00 2001
From: Carlos Jimenez <=>
Date: Wed, 7 Feb 2018 08:47:04 +0100
Subject: [PATCH 3/4] small refactor on greuge list and fixtures
---
client/client/src/greuge-list/greuge-list.html | 14 ++++++--------
services/db/02-fixtures.sql | 2 +-
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/client/client/src/greuge-list/greuge-list.html b/client/client/src/greuge-list/greuge-list.html
index a361dfbcf..22566ec66 100644
--- a/client/client/src/greuge-list/greuge-list.html
+++ b/client/client/src/greuge-list/greuge-list.html
@@ -9,20 +9,17 @@
-
- {{::greuge.shipped | date:'dd/MM/yyyy HH:mm' }}
- {{::greuge.description}}
- {{::greuge.amount | number:2}} €
- {{::greuge.greugeType.name}}
+ ng-repeat="greuge in index.model.instances track by greuge.id">
+ {{::greuge.shipped | date:'dd/MM/yyyy HH:mm' }}
+ {{::greuge.description}}
+ {{::greuge.amount | number:2}} €
+ {{::greuge.greugeType.name}}
-
No results