This commit is contained in:
Juan Ferrer Toribio 2018-02-09 09:12:22 +01:00
commit 6af6ca9c34
4 changed files with 70 additions and 35 deletions

View File

@ -3,6 +3,7 @@
url="/client/api/ClientObservations"
id-field="id"
data="$ctrl.note"
save="post"
form="form">
</vn-watcher>
<form name="form" ng-submit="watcher.submitGo('clientCard.notes.list')" pad-medium>

View File

@ -3,20 +3,20 @@
<vn-vertical pad-large>
<vn-title vn-one margin-large-bottom>Item history</vn-title>
<vn-grid-header on-order="$ctrl.onOrder(field, order)">
<vn-column-header vn-one pad-medium-h field="userFk" text="Changed by"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="action" text="Action"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="creationDate" text="Date" default-order="ASC"></vn-column-header>
<vn-column-header vn-two pad-medium-h field="description" text="Description"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="action" text="Action"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="userFk" text="Changed by"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="creationDate" text="Date" default-order="ASC"></vn-column-header>
</vn-grid-header>
<vn-one class="list list-content">
<vn-horizontal
class="list list-element text-center"
pad-small-bottom
ng-repeat="itemLog in index.model.instances track by itemLog.id">
<vn-one pad-medium-h>{{::itemLog.user.name}}</vn-one>
<vn-one pad-medium-h>{{::itemLog.action}}</vn-one>
<vn-one pad-medium-h>{{::itemLog.creationDate | date:'dd/MM/yyyy HH:mm'}}</vn-one>
<vn-two pad-medium-h>{{::itemLog.description}}</vn-two>
<vn-one pad-medium-h>{{::itemLog.action}}</vn-one>
<vn-one pad-medium-h>{{::itemLog.user.name}}</vn-one>
<vn-one pad-medium-h>{{::itemLog.creationDate | date:'dd/MM/yyyy HH:mm'}}</vn-one>
</vn-horizontal>
</vn-one>
<vn-horizontal vn-one class="list list-footer text-center">

16
package-lock.json generated
View File

@ -121,7 +121,7 @@
"angular": {
"version": "1.6.8",
"resolved": "https://registry.npmjs.org/angular/-/angular-1.6.8.tgz",
"integrity": "sha1-W+N4pYvpGlSJ54tZxFGM2f0nP/s="
"integrity": "sha512-9WErZIOw1Cu1V5Yxdvxz/6YpND8ntdP71fdPpufPFJvZodZXqCjQBYrHqEoMZreO5i84O3D/Jw/vepoFt68Azw=="
},
"angular-cookies": {
"version": "1.6.4",
@ -1365,7 +1365,7 @@
"bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==",
"dev": true
},
"bn.js": {
@ -10647,7 +10647,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"
@ -10795,7 +10795,7 @@
"karma": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz",
"integrity": "sha1-hcwI6eCiLXzpzKN8ShvoJPaisa4=",
"integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==",
"dev": true,
"requires": {
"bluebird": "3.5.1",
@ -10847,7 +10847,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.1",
@ -10857,7 +10857,7 @@
"karma-firefox-launcher": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.1.0.tgz",
"integrity": "sha1-LEcDBFLwRTHrfRPU/HZpYwu5Mzk=",
"integrity": "sha512-LbZ5/XlIXLeQ3cqnCbYLn+rOVhuMIK9aZwlP6eOLGzWdo1UVp7t6CN3DP4SafiRLjexKwHeKHDm0c38Mtd3VxA==",
"dev": true
},
"karma-jasmine": {
@ -10878,7 +10878,7 @@
"karma-webpack": {
"version": "2.0.9",
"resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-2.0.9.tgz",
"integrity": "sha1-YciAkffdkQY1E0wDKyZqRlr/tX8=",
"integrity": "sha512-F1j3IG/XhiMzcunAXbWXH95uizjzr3WdTzmVWlta8xqxcCtAu9FByCb4sccIMxaVFAefpgnUW9KlCo0oLvIX6A==",
"dev": true,
"requires": {
"async": "0.9.2",
@ -15943,7 +15943,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.1",

View File

@ -390,24 +390,52 @@ INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `isDefaultAddress`, `clientFk`, `agencyFk`, `longitude`, `latitude`, `isEqualizated`)
VALUES
(101, 'Bruce Wayne', 'The Bat cave', 'Silla', 46460, 1, NULL, NULL, 1, 1, 1, 2, NULL, NULL, 0),
(102, 'Petter Parker', 'NY roofs', 'Silla', 46460, 1, NULL, NULL, 1, 1, 2, 2, NULL, NULL, 0),
(103, 'Clark Kenn', 'The phone box', 'Silla', 46460, 1, NULL, NULL, 1, 1, 3, 2, NULL, NULL, 0),
(104, 'Tony Stark', 'Stark tower', 'Silla', 46460, 1, NULL, NULL, 1, 1, 4, 2, NULL, NULL, 0),
(105, 'Max Eisenhardt', 'The plastic cell', 'Silla', 46460, 1, NULL, NULL, 1, 1, 5, 2, NULL, NULL, 0),
(106, 'David Charles Haller', 'Many places', 'Silla', 46460, 1, NULL, NULL, 1, 1, 6, 2, NULL, NULL, 0),
(107, 'Hank Pym', 'Your pocket', 'Silla', 46460, 1, NULL, NULL, 1, 1, 7, 2, NULL, NULL, 0),
(108, 'Charles Xavier', 'Cerebro', 'Silla', 46460, 1, NULL, NULL, 1, 1, 8, 2, NULL, NULL, 0),
(109, 'Bruce Banner', 'Somewhere in Thailand', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(110, 'Jessica Jones', 'Luke Cages Bar', 'Silla', 46460, 1, NULL, NULL, 1, 1, 10, 2, NULL, NULL, 0);
(101, 'Bruce Banner', 'Somewhere in Thailand', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(102, 'Bruce Banner', 'Somewhere in New York', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(103, 'Bruce Banner', 'Somewhere in Japan', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(104, 'Bruce Banner', 'Somewhere in Spain', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(105, 'Bruce Banner', 'Somewhere in Potugal', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(106, 'Bruce Banner', 'Somewhere in UK', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(107, 'Bruce Banner', 'Somewhere in Valencia', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(108, 'Bruce Banner', 'Somewhere in Silla', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(109, 'Bruce Banner', 'Somewhere in London', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(110, 'Bruce Banner', 'Somewhere in Algemesi', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(111, 'Bruce Banner', 'Somewhere in Carlet', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(112, 'Bruce Banner', 'Somewhere in Campanar', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(113, 'Bruce Banner', 'Somewhere in Malilla', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(114, 'Bruce Banner', 'Somewhere in France', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(115, 'Bruce Banner', 'Somewhere in Birmingham', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(116, 'Bruce Banner', 'Somewhere in Scotland', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(117, 'Bruce Banner', 'Somewhere in nowhere', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(118, 'Bruce Banner', 'Somewhere over the rainbow', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(119, 'Bruce Banner', 'Somewhere in Alberic', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(120, 'Bruce Banner', 'Somewhere in Montortal', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(121, 'Petter Parker', 'NY roofs', 'Silla', 46460, 1, NULL, NULL, 1, 1, 2, 2, NULL, NULL, 0),
(122, 'Clark Kenn', 'The phone box', 'Silla', 46460, 1, NULL, NULL, 1, 1, 3, 2, NULL, NULL, 0),
(123, 'Tony Stark', 'Stark tower', 'Silla', 46460, 1, NULL, NULL, 1, 1, 4, 2, NULL, NULL, 0),
(124, 'Max Eisenhardt', 'The plastic cell', 'Silla', 46460, 1, NULL, NULL, 1, 1, 5, 2, NULL, NULL, 0),
(125, 'David Charles Haller', 'Many places', 'Silla', 46460, 1, NULL, NULL, 1, 1, 6, 2, NULL, NULL, 0),
(126, 'Hank Pym', 'Your pocket', 'Silla', 46460, 1, NULL, NULL, 1, 1, 7, 2, NULL, NULL, 0),
(127, 'Charles Xavier', 'Cerebro', 'Silla', 46460, 1, NULL, NULL, 1, 1, 8, 2, NULL, NULL, 0),
(128, 'Jessica Jones', 'Luke Cages Bar', 'Silla', 46460, 1, NULL, NULL, 1, 1, 10, 2, NULL, NULL, 0);
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
VALUES
(1, 1, 1, 1200, CURDATE()),
(2, 2, 2, 800, CURDATE()),
(3, 3, 3, 200, CURDATE()),
(4, 4, 4, 90, CURDATE()),
(5, 5, 5, 90, CURDATE());
(1, 1, 1, 1000, DATE_ADD(CURDATE(), INTERVAL 1 MONTH)),
(2, 1, 2, 900, DATE_ADD(CURDATE(), INTERVAL 2 MONTH)),
(3, 1, 3, 800, DATE_ADD(CURDATE(), INTERVAL 3 MONTH)),
(4, 1, 4, 700, DATE_ADD(CURDATE(), INTERVAL 4 MONTH)),
(5, 1, 5, 600, DATE_ADD(CURDATE(), INTERVAL 5 MONTH)),
(6, 1, 1, 500, DATE_ADD(CURDATE(), INTERVAL 6 MONTH)),
(7, 1, 2, 400, DATE_ADD(CURDATE(), INTERVAL 7 MONTH)),
(8, 1, 3, 300, DATE_ADD(CURDATE(), INTERVAL 8 MONTH)),
(9, 1, 4, 200, DATE_ADD(CURDATE(), INTERVAL 9 MONTH)),
(10, 1, 5, 100, DATE_ADD(CURDATE(), INTERVAL 10 MONTH)),
(11, 1, 1, 50, DATE_ADD(CURDATE(), INTERVAL 11 MONTH)),
(12, 2, 2, 800, CURDATE()),
(13, 3, 3, 200, CURDATE()),
(14, 4, 4, 90, CURDATE()),
(15, 5, 5, 90, CURDATE());
INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
VALUES
@ -523,12 +551,18 @@ INSERT INTO `vn`.`greugeType`(`id`, `name`)
INSERT INTO `vn`.`greuge`(`id`, `clientFk`, `description`, `amount`, `shipped`, `created`, `greugeTypeFk`, `ticketFk`)
VALUES
(1, 1, 'some diff charges', 1000, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
(2, 1, 'some recovery charges', 1000, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
(3, 1, 'some manna charges', 1000, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
(4, 1, 'some claim charges', 1000, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
(5, 1, 'some heritage charges', 1000, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
(6, 1, 'some miscellaneous charges', 1000, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1);
(1, 1, 'some diff charges', -19.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
(2, 1, 'more diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
(3, 1, 'even more! diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
(4, 1, 'insane diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
(5, 1, 'gargantuous diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
(6, 1, 'diff charges', 88.30, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1),
(7, 1, 'unaffordable diff charges', -39.12, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
(8, 1, 'some recovery charges', 29.35, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
(9, 1, 'some manna charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
(10, 1, 'some claim charges', 13.13, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
(11, 1, 'some heritage charges', -15.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
(12, 1, 'some miscellaneous charges', 58.00, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1);
INSERT INTO `vn`.`mandateType`(`id`, `name`)
VALUES