From d414db73de1f43768519b3256f9e6516a6bc7140 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Tue, 30 Jun 2020 08:32:04 +0200 Subject: [PATCH] order index add buton and columns --- loopback/locale/es.json | 3 ++- modules/order/front/index/index.html | 20 ++++++++++++-------- modules/order/front/index/index.js | 15 +++++++++++++++ modules/order/front/locale/es.yml | 4 +++- modules/order/front/summary/index.html | 11 ++++++++++- modules/order/front/summary/index.js | 9 +++++++++ modules/order/front/summary/style.scss | 15 +++++++++++++++ 7 files changed, 66 insertions(+), 11 deletions(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index e58d55da07..9951df4a53 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -133,5 +133,6 @@ "Distance must be lesser than 1000": "La distancia debe ser inferior a 1000", "This ticket is deleted": "Este ticket está eliminado", "A travel with this data already exists": "Ya existe un travel con estos datos", - "This thermograph id already exists": "La id del termógrafo ya existe" + "This thermograph id already exists": "La id del termógrafo ya existe", + "ORDER_ALREADY_CONFIRMED": "ORDER_ALREADY_CONFIRMED" } \ No newline at end of file diff --git a/modules/order/front/index/index.html b/modules/order/front/index/index.html index a28979646e..0d299a5b1c 100644 --- a/modules/order/front/index/index.html +++ b/modules/order/front/index/index.html @@ -10,8 +10,8 @@ Id - Client Sales person + Client Confirmed Created Landed @@ -26,16 +26,16 @@ {{::order.id}} - {{::order.clientName}} + vn-click-stop="workerDescriptor.show($event, order.salesPersonFk)" + class="link" > + {{::order.name | dashIfEmpty}} - {{::order.name | dashIfEmpty}} + vn-click-stop="clientDescriptor.show($event, order.clientFk)" + class="link"> + {{::order.clientName}} @@ -45,7 +45,11 @@ {{::order.created | date: 'dd/MM/yyyy HH:mm'}} - {{::order.landed | date:'dd/MM/yyyy'}} + + + {{::order.landed | date:'dd/MM/yyyy'}} + + {{::order.total | currency: 'EUR': 2 | dashIfEmpty}} -
{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} - {{$ctrl.summary.client.salesPerson.id}}
+
{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} - {{$ctrl.summary.client.salesPerson.id}} + + +
{ + this.vnApp.showSuccess(this.$t('Order confirmed')); + this.$state.go(`ticket.index`, { + q: JSON.stringify({clientFk: this.order.clientFk}) + }); + }); + } } ngModule.component('vnOrderSummary', { diff --git a/modules/order/front/summary/style.scss b/modules/order/front/summary/style.scss index a0ed56d426..d0f7a3d03e 100644 --- a/modules/order/front/summary/style.scss +++ b/modules/order/front/summary/style.scss @@ -3,6 +3,21 @@ vn-order-summary .summary{ max-width: $width-lg; + h5 { + display: flex; + justify-content: space-between; + align-items: center; + align-content: center; + + + span { + flex: 1; + } + + vn-button { + flex: none + } + } & > div > vn-horizontal > vn-one { min-width: 160px !important;