From c971d3ee01ae5a4b4bd992dd65ea19a31f12a788 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Wed, 22 Sep 2021 15:13:29 +0200 Subject: [PATCH 1/5] refactor(consumption): client consuption now shows item.subName --- modules/client/front/consumption/index.html | 10 ++++++---- modules/client/front/consumption/index.js | 1 + modules/client/front/consumption/style.scss | 22 +++++++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 modules/client/front/consumption/style.scss diff --git a/modules/client/front/consumption/index.html b/modules/client/front/consumption/index.html index 146565954..510960457 100644 --- a/modules/client/front/consumption/index.html +++ b/modules/client/front/consumption/index.html @@ -65,10 +65,12 @@ {{::sale.shipped | date: 'dd/MM/yyyy'}} - {{::sale.concept}} - -

{{::sale.subName}}

-
+
+ {{::sale.concept}} + +

{{::sale.subName}}

+
+
Date: Wed, 22 Sep 2021 15:14:29 +0200 Subject: [PATCH 2/5] refactor(sales): ticket sales now shows item.subName --- .../ticket/back/methods/ticket/getSales.js | 1 + modules/ticket/front/sale/index.html | 14 ++++++---- modules/ticket/front/sale/style.scss | 28 +++++++++---------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/modules/ticket/back/methods/ticket/getSales.js b/modules/ticket/back/methods/ticket/getSales.js index c3c7fd860..6dfee5dfa 100644 --- a/modules/ticket/back/methods/ticket/getSales.js +++ b/modules/ticket/back/methods/ticket/getSales.js @@ -35,6 +35,7 @@ module.exports = Self => { fields: [ 'id', 'name', + 'subName', 'itemPackingTypeFk', 'tag5', 'value5', diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index f0fc3aaf3..31d68c8db 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -157,12 +157,16 @@ - + - {{sale.concept}} - -

{{::sale.subName}}

-
+
+ {{sale.concept}} + +

{{::sale.item.subName}}

+
+
Date: Wed, 22 Sep 2021 15:15:52 +0200 Subject: [PATCH 3/5] refactor(buys): entry buys now show item.subName --- modules/entry/back/methods/entry/getBuys.js | 1 + modules/entry/front/buy/index/index.html | 7 ++++++- modules/entry/front/buy/index/style.scss | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/modules/entry/back/methods/entry/getBuys.js b/modules/entry/back/methods/entry/getBuys.js index 0f09f06d5..8adcc950d 100644 --- a/modules/entry/back/methods/entry/getBuys.js +++ b/modules/entry/back/methods/entry/getBuys.js @@ -56,6 +56,7 @@ module.exports = Self => { 'id', 'typeFk', 'name', + 'subName', 'size', 'minPrice', 'tag5', diff --git a/modules/entry/front/buy/index/index.html b/modules/entry/front/buy/index/index.html index 1e1a7ecd2..dbe43c467 100644 --- a/modules/entry/front/buy/index/index.html +++ b/modules/entry/front/buy/index/index.html @@ -172,7 +172,12 @@ - {{::buy.item.name}} +
+ {{::buy.item.name}} + +

{{::buy.item.subName}}

+
+
Date: Wed, 22 Sep 2021 15:16:45 +0200 Subject: [PATCH 4/5] test(tags): moved code used on a single test to the correct place --- modules/item/front/tags/index.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/front/tags/index.spec.js b/modules/item/front/tags/index.spec.js index 34a9ce143..8b4b8596b 100644 --- a/modules/item/front/tags/index.spec.js +++ b/modules/item/front/tags/index.spec.js @@ -11,13 +11,13 @@ describe('Item', () => { beforeEach(inject(($componentController, $rootScope) => { $scope = $rootScope.$new(); $scope.model = crudModel; - $scope.model.data = [{priority: 1}, {priority: 2}, {priority: 1}]; const $element = angular.element(''); controller = $componentController('vnItemTags', {$element, $scope}); })); describe('getHighestPriority', () => { it('should return the highest priority value + 1 from the array', () => { + $scope.model.data = [{priority: 1}, {priority: 2}, {priority: 1}]; let result = controller.getHighestPriority(); expect(result).toEqual(3); From 368f54b872aed2cd935ebfd169df09a5cf553694 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Thu, 23 Sep 2021 17:19:47 +0200 Subject: [PATCH 5/5] refactor(tags): unified the style rules for tags under fetched-tags component and all display subName if present --- front/core/components/table/style.scss | 18 ------------- modules/client/front/consumption/index.js | 1 - modules/client/front/consumption/style.scss | 22 ---------------- modules/entry/front/buy/index/style.scss | 19 -------------- modules/entry/front/latest-buys/index.html | 10 +++++--- modules/entry/front/summary/index.html | 7 +++++- modules/item/front/fetched-tags/style.scss | 25 +++++++++++++++++++ modules/item/front/fixed-price/index.html | 10 +++++--- modules/item/front/index/index.html | 10 +++++--- modules/order/front/line/index.html | 10 +++++--- modules/order/front/summary/index.html | 12 +++++---- modules/order/front/volume/index.html | 12 +++++---- modules/supplier/front/consumption/index.html | 12 +++++---- .../front/basic-data/step-two/index.html | 12 +++++---- modules/ticket/front/component/index.html | 10 +++++--- modules/ticket/front/sale-checked/index.html | 10 +++++--- modules/ticket/front/sale-tracking/index.html | 12 +++++---- modules/ticket/front/sale/style.scss | 17 ------------- modules/ticket/front/summary/index.html | 24 ++++++++++-------- modules/ticket/front/volume/index.html | 10 +++++--- 20 files changed, 121 insertions(+), 142 deletions(-) delete mode 100644 modules/client/front/consumption/style.scss diff --git a/front/core/components/table/style.scss b/front/core/components/table/style.scss index c3aaca1b1..2864ea8a1 100644 --- a/front/core/components/table/style.scss +++ b/front/core/components/table/style.scss @@ -96,24 +96,6 @@ vn-table { max-width: 400px; min-width: 0; } - &[vn-fetched-tags] { - min-width: 155px; - & > vn-one { - overflow: hidden; - text-overflow: ellipsis; - font-size: 1rem; - } - - & > vn-one:nth-child(2) h3 { - color: $color-font-secondary; - text-transform: uppercase; - line-height: initial; - font-size: 0.75rem - } - } - &[vn-fetched-tags][wide] { - width: 430px; - } vn-icon.bright, i.bright { color: #f7931e; } diff --git a/modules/client/front/consumption/index.js b/modules/client/front/consumption/index.js index a8897d915..7017fed41 100644 --- a/modules/client/front/consumption/index.js +++ b/modules/client/front/consumption/index.js @@ -1,6 +1,5 @@ import ngModule from '../module'; import Section from 'salix/components/section'; -import './style.scss'; class Controller extends Section { constructor($element, $, vnReport, vnEmail) { diff --git a/modules/client/front/consumption/style.scss b/modules/client/front/consumption/style.scss deleted file mode 100644 index 02a5dfff4..000000000 --- a/modules/client/front/consumption/style.scss +++ /dev/null @@ -1,22 +0,0 @@ -@import "variables"; - -vn-client-consumption { - vn-td[vn-fetched-tags] { - & div { - display: flex; - flex-wrap: wrap; - - & vn-one { - min-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - } - & vn-one h3 { - color: $color-font-secondary; - text-transform: uppercase; - line-height: initial; - font-size: 0.75rem - } - } - } -} diff --git a/modules/entry/front/buy/index/style.scss b/modules/entry/front/buy/index/style.scss index 942dba0fc..55df72f1c 100644 --- a/modules/entry/front/buy/index/style.scss +++ b/modules/entry/front/buy/index/style.scss @@ -38,25 +38,6 @@ vn-entry-buy-index vn-card { tr { margin-bottom: 10px; } - - td[vn-fetched-tags] { - & div { - display: flex; - flex-wrap: wrap; - - & vn-one { - min-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - } - & vn-one h3 { - color: $color-font-secondary; - text-transform: uppercase; - line-height: initial; - font-size: 0.75rem - } - } - } } $color-font-link-medium: lighten($color-font-link, 20%) \ No newline at end of file diff --git a/modules/entry/front/latest-buys/index.html b/modules/entry/front/latest-buys/index.html index 055756876..9281c1b79 100644 --- a/modules/entry/front/latest-buys/index.html +++ b/modules/entry/front/latest-buys/index.html @@ -100,10 +100,12 @@
{{::buy.size}} - {{::buy.name}} - -

{{::buy.subName}}

-
+
+ {{::buy.name}} + +

{{::buy.subName}}

+
+
- {{::line.item.name}} +
+ {{::line.item.name}} + +

{{::line.item.subName}}

+
+
vn-horizontal { align-items: center; diff --git a/modules/item/front/fixed-price/index.html b/modules/item/front/fixed-price/index.html index f7819de37..34e792626 100644 --- a/modules/item/front/fixed-price/index.html +++ b/modules/item/front/fixed-price/index.html @@ -65,10 +65,12 @@
- {{price.name}} - -

{{price.subName}}

-
+
+ {{price.name}} + +

{{price.subName}}

+
+
{{::item.grouping | dashIfEmpty}}
{{::item.packing | dashIfEmpty}} - {{::item.name}} - -

{{::item.subName}}

-
+
+ {{::item.name}} + +

{{::item.subName}}

+
+
- {{::row.item.name}} - -

{{::row.item.subName}}

-
+
+ {{::row.item.name}} + +

{{::row.item.subName}}

+
+
- - {{::row.item.name}} - -

{{::row.item.subName}}

-
+ +
+ {{::row.item.name}} + +

{{::row.item.subName}}

+
+
- - {{::row.item.name}} - -

{{::row.item.subName}}

-
+ +
+ {{::row.item.name}} + +

{{::row.item.subName}}

+
+
- - - -

{{::buy.subName}}

-
+ +
+ + +

{{::buy.subName}}

+
+
{{("000000"+sale.itemFk).slice(-6)}} - - {{::sale.item.name}} - -

{{::sale.item.subName}}

-
+ +
+ {{::sale.item.name}} + +

{{::sale.item.subName}}

+
+
- {{::sale.item.name}} - -

{{::sale.item.subName}}

-
+
+ {{::sale.item.name}} + +

{{::sale.item.subName}}

+
+
- {{::sale.item.name}} - -

{{::sale.item.subName}}

-
+
+ {{::sale.item.name}} + +

{{::sale.item.subName}}

+
+
- - {{::sale.item.name}} - -

{{::sale.item.subName}}

-
+ +
+ {{::sale.item.name}} + +

{{::sale.item.subName}}

+
+
Available Quantity Description - Price - Discount - Amount + Price + Discount + Amount Packing
@@ -191,20 +191,22 @@
{{::sale.quantity}} - - {{::sale.item.name}} - -

{{::sale.item.subName}}

-
+ +
+ {{::sale.item.name}} + +

{{::sale.item.subName}}

+
+
- {{::sale.price | currency: 'EUR':2}} - {{::sale.discount}} % - {{::sale.quantity * sale.price * ((100 - sale.discount) / 100) | currency: 'EUR':2}} + {{::sale.price | currency: 'EUR':2}} + {{::sale.discount}} % + {{::sale.quantity * sale.price * ((100 - sale.discount) / 100) | currency: 'EUR':2}} {{::sale.item.itemPackingTypeFk | dashIfEmpty}} diff --git a/modules/ticket/front/volume/index.html b/modules/ticket/front/volume/index.html index 8e2bc4bb6..70bd4f5fb 100644 --- a/modules/ticket/front/volume/index.html +++ b/modules/ticket/front/volume/index.html @@ -43,10 +43,12 @@
- {{::sale.item.name}} - -

{{::sale.item.subName}}

-
+
+ {{::sale.item.name}} + +

{{::sale.item.subName}}

+
+