- {{sale.saleFk}}
{{sale.landed | dateTime: 'dd/MM/yyyy'}}
{{sale.quantity}}
- {{sale.concept}}
+
+
+ {{sale.concept}}
+
+
{{sale.price | currency: 'EUR':2}}
{{sale.discount}} %
diff --git a/modules/claim/front/detail/index.js b/modules/claim/front/detail/index.js
index 137ad4d70..1c2cb9e97 100644
--- a/modules/claim/front/detail/index.js
+++ b/modules/claim/front/detail/index.js
@@ -111,8 +111,8 @@ class Controller {
return total;
}
- // Item Descriptor
- showDescriptor(event, itemFk) {
+ showItemDescriptor(event, itemFk) {
+ event.stopImmediatePropagation();
this.$.descriptor.itemFk = itemFk;
this.$.descriptor.parent = event.target;
this.$.descriptor.show();
diff --git a/modules/claim/front/detail/index.spec.js b/modules/claim/front/detail/index.spec.js
index c25d6fe43..bb3866b4c 100644
--- a/modules/claim/front/detail/index.spec.js
+++ b/modules/claim/front/detail/index.spec.js
@@ -3,6 +3,7 @@ import crudModel from 'core/mocks/crud-model';
describe('claim', () => {
describe('Component vnClaimDetail', () => {
+ let $scope;
let controller;
let $httpBackend;
let $state;
@@ -12,12 +13,16 @@ describe('claim', () => {
$translateProvider.translations('en', {});
}));
- beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, $rootScope) => {
+ $scope = $rootScope.$new();
+ $scope.descriptor = {
+ show: () => {}
+ };
$httpBackend = _$httpBackend_;
$httpBackend.when('GET', 'claim/api/Claims/ClaimBeginnings').respond({});
$state = _$state_;
aclService = {hasAny: () => true};
- controller = $componentController('vnClaimDetail', {$state, aclService});
+ controller = $componentController('vnClaimDetail', {$state, aclService, $scope});
controller.salesToClaim = [{saleFk: 1}, {saleFk: 2}];
controller.salesClaimed = [{id: 1, sale: {}}];
controller.claim = {ticketFk: 1};
@@ -119,5 +124,24 @@ describe('claim', () => {
expect(controller.$.model.refresh).toHaveBeenCalledWith();
});
});
+
+ describe('showItemDescriptor()', () => {
+ it('should configure the descriptor then show it', () => {
+ const itemId = 500;
+ const event = {
+ stopImmediatePropagation: () => {},
+ target: 'the target element'
+ };
+ spyOn(event, 'stopImmediatePropagation');
+ spyOn(controller.$.descriptor, 'show');
+
+ controller.showItemDescriptor(event, itemId);
+
+ expect(event.stopImmediatePropagation).toHaveBeenCalledWith();
+ expect(controller.$.descriptor.itemFk).toEqual(itemId);
+ expect(controller.$.descriptor.parent).toEqual(event.target);
+ expect(controller.$.descriptor.show).toHaveBeenCalledWith();
+ });
+ });
});
});
diff --git a/modules/claim/front/dms/index/index.html b/modules/claim/front/dms/index/index.html
index 91dad4e1e..9b24c65ca 100644
--- a/modules/claim/front/dms/index/index.html
+++ b/modules/claim/front/dms/index/index.html
@@ -6,9 +6,8 @@
-
-
diff --git a/modules/claim/front/dms/index/style.scss b/modules/claim/front/dms/index/style.scss
index 067a7c95c..d02798940 100644
--- a/modules/claim/front/dms/index/style.scss
+++ b/modules/claim/front/dms/index/style.scss
@@ -10,6 +10,7 @@ vn-claim-dms-index {
.photo {
width: 32em;
+ height: 18em;
}
}
diff --git a/modules/claim/front/summary/index.html b/modules/claim/front/summary/index.html
index 7877987d1..65d08777b 100644
--- a/modules/claim/front/summary/index.html
+++ b/modules/claim/front/summary/index.html
@@ -83,9 +83,8 @@
Photos
-
-
diff --git a/modules/claim/front/summary/style.scss b/modules/claim/front/summary/style.scss
index 280e519c2..38136f24a 100644
--- a/modules/claim/front/summary/style.scss
+++ b/modules/claim/front/summary/style.scss
@@ -1,36 +1,12 @@
@import "./variables";
-.photo-list {
- justify-content: center;
- align-items: flex-start;
- align-content: flex-start;
- flex-wrap: wrap;
-
+vn-claim-summary {
.photo {
- box-sizing: border-box;
- padding: $pad-small;
- position: relative;
- opacity: 0.7;
- transition: all 0.5s;
- width: 28em;
-
- .image {
- border: 2px solid $color-bg-dark;
- border-radius: 0.2em;
- overflow: hidden;
-
- img, video {
- max-width: 100%
- }
- }
- .actions {
- position: absolute;
- right: 1em;
- top: 1em
- }
+ height: 15.5em;
}
-
- .photo:hover {
- opacity: 1
+ .photo .image {
+ border: 2px solid $color-bg-dark;
+ border-radius: 0.2em;
}
+
}
\ No newline at end of file
diff --git a/modules/client/front/index/index.spec.js b/modules/client/front/index/index.spec.js
index 9a881ed4b..b7319667d 100644
--- a/modules/client/front/index/index.spec.js
+++ b/modules/client/front/index/index.spec.js
@@ -13,8 +13,8 @@ describe('Client index', () => {
controller = $componentController('vnClientIndex', {$scope, $state});
}));
- describe('x()', () => {
- it('should request to patch the propagation of tax status', () => {
+ describe('filterTickets()', () => {
+ it('should navigate to the ticket index using params as filter', () => {
const client = {id: 101};
const event = {preventDefault: () => {}};
spyOn(event, 'preventDefault');
diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html
index 5c12ccb0a..8b2060e42 100644
--- a/modules/ticket/front/index/index.html
+++ b/modules/ticket/front/index/index.html
@@ -50,7 +50,7 @@
Agency
Warehouse
Invoice
- Closure
+ Closure
Total
diff --git a/modules/ticket/front/index/index.js b/modules/ticket/front/index/index.js
index d2e9646a1..2a2f3a238 100644
--- a/modules/ticket/front/index/index.js
+++ b/modules/ticket/front/index/index.js
@@ -103,7 +103,8 @@ export default class Controller {
}
totalPriceColor(ticket) {
- if (parseInt(ticket.total) < 50)
+ const total = parseInt(ticket.total);
+ if (total > 0 && total < 50)
return 'warning';
}
diff --git a/modules/worker/front/log/index.html b/modules/worker/front/log/index.html
index 8ba6b285b..1a4ac0a5f 100644
--- a/modules/worker/front/log/index.html
+++ b/modules/worker/front/log/index.html
@@ -31,10 +31,9 @@
Changed by:
{{::log.user.name | dashIfEmpty}}
+ translate>{{::log.user.name | dashIfEmpty}}
@@ -53,10 +52,9 @@
{{::log.user.name | dashIfEmpty}}
+ translate>{{::log.user.name | dashIfEmpty}}
diff --git a/modules/worker/front/log/index.js b/modules/worker/front/log/index.js
index cd85833ab..4a577658b 100644
--- a/modules/worker/front/log/index.js
+++ b/modules/worker/front/log/index.js
@@ -43,6 +43,7 @@ export default class Controller {
showWorkerDescriptor(event, workerFk) {
if (event.defaultPrevented) return;
+ if (!workerFk) return;
event.preventDefault();
event.stopPropagation();