From 9de3db19612d0d0b093ca9aa8c0c5e4d6850ca5b Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 19 Nov 2021 08:43:30 +0100 Subject: [PATCH 1/6] fix(client_summary): show 10 tickets at least --- modules/client/front/summary/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 3c5a8d3e5..7f739ac6b 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -3,7 +3,7 @@ url="Tickets" link="{clientFk: $ctrl.client.id}" filter="::$ctrl.ticketFilter" - limit="5" + limit="10" data="tickets" order="shipped DESC, id"> @@ -287,7 +287,7 @@

Latest tickets

- + Id @@ -376,7 +376,7 @@ class="vn-pt-xs" scroll-selector="vn-table[model='ticketsModel']" scroll-offset="100"> - +
-- 2.40.1 From 98195bf7b05b16c5effb537ad4303d52b45f54f1 Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 19 Nov 2021 08:44:56 +0100 Subject: [PATCH 2/6] fix(route_tickets): dialog show the name of clients --- modules/route/front/tickets/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index 19450b4ac..68713de01 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -124,6 +124,10 @@ vn-id="possibleTicketsDialog" on-accept="$ctrl.setTicketsRoute()" message="Tickets to add"> + + + + @@ -154,7 +158,7 @@ {{::ticket.id}} - + {{::ticket.nickname}} @@ -168,10 +172,6 @@ - - - - Date: Mon, 22 Nov 2021 12:52:02 +0100 Subject: [PATCH 3/6] feat(routes_tickets): button up when add tickets --- modules/route/front/tickets/index.html | 18 ++++++++++-------- modules/route/front/tickets/index.js | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index 68713de01..4c3c2f113 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -121,15 +121,17 @@ data="$ctrl.possibleTickets"> - - - - + vn-id="possibleTicketsDialog"> + + + Tickets to add +
+ +
+
+
- + diff --git a/modules/route/front/tickets/index.js b/modules/route/front/tickets/index.js index efb3d1498..f78542395 100644 --- a/modules/route/front/tickets/index.js +++ b/modules/route/front/tickets/index.js @@ -132,6 +132,7 @@ class Controller extends Section { this.$.model.data = this.$.model.data.concat(tickets); this.vnApp.showSuccess(this.$t('Data saved!')); this.updateVolume(); + this.$.possibleTicketsDialog.hide(); }); } -- 2.40.1 From a5ba02e2ecec6e9f2d7b67b87632fb0ba2391f32 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 22 Nov 2021 13:28:12 +0100 Subject: [PATCH 4/6] feat(route_tickets): update frontTest --- modules/route/front/tickets/index.spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/route/front/tickets/index.spec.js b/modules/route/front/tickets/index.spec.js index 4fafc4750..fbbe94360 100644 --- a/modules/route/front/tickets/index.spec.js +++ b/modules/route/front/tickets/index.spec.js @@ -197,6 +197,9 @@ describe('Route', () => { describe('setTicketsRoute()', () => { it('should perform a POST query to add tickets to the route', () => { + controller.$.possibleTicketsDialog = {hide: () => {}}; + jest.spyOn(controller.$.possibleTicketsDialog, 'hide'); + controller.$params = {id: 1101}; controller.$.model.data = [{id: 1, checked: false}]; @@ -223,6 +226,7 @@ describe('Route', () => { $httpBackend.flush(); expect(controller.$.model.data).toEqual(expectedResult); + expect(controller.$.possibleTicketsDialog.hide).toHaveBeenCalledWith(); }); }); -- 2.40.1 From cb81ad3722ee3e919f68b541e60303d3e318eae2 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 22 Nov 2021 14:02:21 +0100 Subject: [PATCH 5/6] delete unnecessay space --- modules/client/front/summary/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 7f739ac6b..ed4b89ee4 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -376,7 +376,7 @@ class="vn-pt-xs" scroll-selector="vn-table[model='ticketsModel']" scroll-offset="100"> - + -- 2.40.1 From 74fbae65100c25a4816dce1311a13cd3ffb66a90 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 25 Nov 2021 15:15:51 +0100 Subject: [PATCH 6/6] refactor(route_ticket): add style in a style.scss --- modules/route/front/tickets/index.html | 2 +- modules/route/front/tickets/style.scss | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index 4c3c2f113..6329dbb1a 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -125,7 +125,7 @@ Tickets to add -
+
diff --git a/modules/route/front/tickets/style.scss b/modules/route/front/tickets/style.scss index 69120d436..9393a7d59 100644 --- a/modules/route/front/tickets/style.scss +++ b/modules/route/front/tickets/style.scss @@ -7,4 +7,10 @@ vn-route-tickets form{ .order-field { max-width: 30px; } +} + +.button-right{ + display: block; + padding-right: 50px; + text-align: right; } \ No newline at end of file -- 2.40.1