geer-builder 1.2.482 → 1.2.486

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GCodeVault.vue CHANGED
@@ -22,8 +22,15 @@
22
22
  <div class="label">Activation</div>
23
23
  <div class="value">{{ code.code }}</div>
24
24
 
25
- <div class="label">Membership</div>
26
- <div class="value">{{ code.membership.membership_name }}</div>
25
+ <div v-if="settings.hasOwnProperty('company_social') && settings.company_social">
26
+ <div class="label">Product</div>
27
+ <div class="value">{{ code.product.product_name ? code.product.product_name : code.product.sku }}</div>
28
+ </div>
29
+ <div v-else>
30
+ <div class="label">Membership</div>
31
+ <div class="value">{{ code.membership.membership_name }}</div>
32
+ </div>
33
+
27
34
  </div>
28
35
  <div class="group">
29
36
  <div class="label">Pin</div>
@@ -120,7 +127,8 @@ export default
120
127
  used_count: 0,
121
128
  unused_count: 0,
122
129
  filter_list : ['All','Subslot Kit','Membership Kit'],
123
- filter : 'All'
130
+ filter : 'All',
131
+ settings:{}
124
132
  }),
125
133
  props:
126
134
  {
@@ -129,7 +137,9 @@ export default
129
137
  async mounted()
130
138
  {
131
139
  this.loadCodes();
132
- await this.$_getSlotInfo()
140
+ await this.$_getSlotInfo();
141
+ this.settings = await this.$_getData('public_settings');
142
+
133
143
  },
134
144
  methods:
135
145
  {
package/GProductList.vue CHANGED
@@ -16,8 +16,8 @@
16
16
  <div class="product-list-detail" v-if="sort_by!='gc_price'">
17
17
  <div class="product-list-row">
18
18
  <!-- <div class="prod_price price" :class="field.user_discount>0 ? 'has-discount' : ''">{{main_currency}} {{$_formatNumber(field.original_price, { decimal: 2})}}{{field.user}}</div> -->
19
- <div class="prod_price price has-discount">{{main_currency}} {{$_formatNumber(field.original_price, { decimal: 2})}}{{field.user}}</div>
20
- <div class="prod_price discount" v-if="show_discount_price && field.user_discount>0">{{main_currency}} {{ $_formatNumber(field.selling_price * (field.user_discount / 100), { decimal: 2 }) }}</div>
19
+ <div class="prod_price price has-discount" v-if="!show_original_price">{{main_currency}} {{$_formatNumber(field.original_price, { decimal: 2})}}{{field.user}}</div>
20
+ <div class="prod_price discount" v-if="show_discount_price && field.user_discount>0">{{main_currency}} {{ $_formatNumber(field.selling_price - (field.selling_price * (field.user_discount / 100)), { decimal: 2 }) }}</div>
21
21
  <div class="prod_price discount" v-else>{{main_currency}} {{ $_formatNumber(field.selling_price, { decimal: 2 }) }}</div>
22
22
  </div>
23
23
  <template v-if="!show_only">
@@ -74,6 +74,7 @@ export default {
74
74
  cashback:Boolean,
75
75
  show_discount_price: Boolean,
76
76
  show_discount_badge: Boolean,
77
+ show_original_price:Boolean,
77
78
  },
78
79
  data: () =>
79
80
  ({
@@ -5,7 +5,9 @@ export default class ProductClass
5
5
  }
6
6
  getProductDiscount( membership_list, rank_list, slot_details, stockist_list, product_details)
7
7
  {
8
+ let sum_discount = false;
8
9
  let stockist_info={};
10
+
9
11
  if(slot_details.stockist)
10
12
  {
11
13
  stockist_info = slot_details.stockist_info;
@@ -57,6 +59,7 @@ export default class ProductClass
57
59
  })
58
60
  }
59
61
  }
62
+
60
63
  if(rank_discount>member_discount)
61
64
  {
62
65
  tot_discount = rank_discount;
@@ -65,7 +68,9 @@ export default class ProductClass
65
68
  {
66
69
  tot_discount = member_discount;
67
70
  }
68
- if(slot_details.stockist){
71
+
72
+ if(slot_details.stockist)
73
+ {
69
74
  if(stockist_discount>tot_discount)
70
75
  {
71
76
  tot_discount = stockist_discount;
@@ -80,14 +85,36 @@ export default class ProductClass
80
85
  {
81
86
  fixed_discount = member_discount_fixed;
82
87
  }
83
- if(slot_details.stockist){
88
+ if(slot_details.stockist)
89
+ {
84
90
  if(stockist_discount_fixed > fixed_discount)
85
91
  {
86
92
  fixed_discount = stockist_discount_fixed;
87
93
  }
88
94
  }
89
- converted_percent = product_details.selling_price * (Number(tot_discount)/100);
90
- let total_discount_percent = ((converted_percent+fixed_discount)/product_details.selling_price)*100;
95
+
96
+ let total_discount_percent = 0;
97
+ if(sum_discount)
98
+ {
99
+ converted_percent = product_details.selling_price * (Number(tot_discount)/100);
100
+ total_discount_percent = ((converted_percent+fixed_discount)/product_details.selling_price)*100;
101
+ }
102
+ else
103
+ {
104
+ converted_percent = product_details.selling_price * (Number(tot_discount)/100);
105
+ converted_percent = (converted_percent/product_details.selling_price)*100;
106
+ fixed_discount = (fixed_discount/product_details.selling_price)*100;
107
+
108
+ if(converted_percent> fixed_discount)
109
+ {
110
+ total_discount_percent = converted_percent;
111
+ }
112
+ else
113
+ {
114
+ total_discount_percent = fixed_discount;
115
+ }
116
+ }
117
+
91
118
  if(total_discount_percent > 100)
92
119
  {
93
120
  total_discount_percent = 100;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.482",
3
+ "version": "1.2.486",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {