From 73ed4d0d198cc681235fad19966910333df7e70c Mon Sep 17 00:00:00 2001 From: gerard Date: Tue, 24 Jul 2018 12:55:10 +0200 Subject: [PATCH] Tarea #406 order.volumen --- client/order/routes.json | 12 ++++++ client/order/src/card/index.js | 6 ++- client/order/src/index.js | 1 + client/order/src/volume/index.html | 34 ++++++++------- client/order/src/volume/index.js | 68 ++++++++++++++++++++++++++++++ client/order/src/volume/style.scss | 6 +++ 6 files changed, 109 insertions(+), 18 deletions(-) create mode 100644 client/order/src/volume/index.js create mode 100644 client/order/src/volume/style.scss diff --git a/client/order/routes.json b/client/order/routes.json index bdcf68aed..cabc84979 100644 --- a/client/order/routes.json +++ b/client/order/routes.json @@ -42,6 +42,18 @@ "icon": "shopping_cart" } }, + { + "url": "/volume", + "state": "order.card.volume", + "component": "vn-order-volume", + "params": { + "order": "$ctrl.order" + }, + "menu": { + "description": "Volume", + "icon": "icon-volume" + } + }, { "url": "/create", "state": "order.create", diff --git a/client/order/src/card/index.js b/client/order/src/card/index.js index 6ffdd1e31..bb19ca686 100644 --- a/client/order/src/card/index.js +++ b/client/order/src/card/index.js @@ -31,16 +31,18 @@ class Controller { this.$http.get(query).then(res => { if (res.data) this.order = res.data; + this.getTotal(); }); + } - query = `/order/api/Orders/${this.$state.params.id}/getTotal`; + getTotal() { + let query = `/order/api/Orders/${this.$state.params.id}/getTotal`; this.$http.get(query).then(res => { if (res.data) { this.order.total = res.data.total; } }); } - $onInit() { this.getOrder(); } diff --git a/client/order/src/index.js b/client/order/src/index.js index 801f07cf0..a182e6392 100644 --- a/client/order/src/index.js +++ b/client/order/src/index.js @@ -7,3 +7,4 @@ import './index/'; import './summary'; import './catalogue'; import './catalogue/product'; +import './volume'; diff --git a/client/order/src/volume/index.html b/client/order/src/volume/index.html index 345e38d32..957b9e77c 100644 --- a/client/order/src/volume/index.html +++ b/client/order/src/volume/index.html @@ -1,42 +1,44 @@ + data="rows" on-data-change="$ctrl.onDataChange()"> - + - Volume - + + Volume +
- +
+
- Item - Description + Item + Description Quantity m³ per quantity - + - {{::sale.itemFk}} + ng-click="$ctrl.showDescriptor($event, row.itemFk)"> + {{::row.itemFk}} - - {{::sale.quantity}} - {{::sale.volume.m3 | number:3}} + + {{::row.quantity}} + {{::row.volume | number:3}} @@ -50,5 +52,5 @@
- +