@wikala/spmkt 2.20.3 → 2.21.0

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.
@@ -162,7 +162,7 @@ export default {
162
162
  },
163
163
 
164
164
  methods: {
165
- ...mapMutations(['setActiveStep', 'setCreditCard', 'setCardToken', 'setBillingAddress', 'setRecaptchaToken', 'setIdempotencyKey', 'setPaymentMethod']),
165
+ ...mapMutations(['setActiveStep', 'setCreditCard', 'setCardToken', 'setBillingAddress', 'setRecaptchaToken', 'setIdempotencyKey', 'setPaymentMethod', 'setAffiliate']),
166
166
 
167
167
  ...mapActions(['getAddresses']),
168
168
 
@@ -215,10 +215,19 @@ export default {
215
215
  //return true
216
216
  },
217
217
 
218
+ setAffiliateData() {
219
+ let affiliateData = null
220
+ try {
221
+ affiliateData = JSON.parse(localStorage.getItem('__ref__'))
222
+ this.setAffiliate(affiliateData)
223
+ } catch(e) {}
224
+ },
225
+
218
226
  async submitPayment() {
219
227
  this.isLoading = true
220
228
  const cqLoading = this.$buefy.loading.open()
221
229
 
230
+ this.setAffiliateData()
222
231
  await this.paymentGetRecaptchaToken()
223
232
  if(!this.recaptchaToken) {
224
233
  this.$buefy.dialog.alert({
@@ -161,6 +161,10 @@ export default {
161
161
 
162
162
  setDeliveryMethodId(state, deliveryMethodId) {
163
163
  state.checkoutRequestData.delivery_method_id = deliveryMethodId
164
+ },
165
+
166
+ setAffiliate(state, affiliateData) {
167
+ state.checkoutRequestData.affiliate = affiliateData
164
168
  }
165
169
 
166
170
  }
@@ -73,7 +73,8 @@ export default () => ({
73
73
  date_of_birth: '',
74
74
  idempotency_key: shortid.generate(),
75
75
  reservation_slot: '',
76
- note: ''
76
+ note: '',
77
+ affiliate: {}
77
78
  }
78
79
 
79
80
  })
@@ -47,7 +47,6 @@
47
47
  <script>
48
48
  import _ from 'underscore'
49
49
  import Photo from './Photo'
50
- import { getSizesAttribute } from '../../utils/responsive-images.js'
51
50
 
52
51
  export default {
53
52
  name: 'ProductImages',
@@ -113,8 +112,6 @@ export default {
113
112
  return srcset.join(', ')
114
113
  },
115
114
 
116
- getSizesAttribute,
117
-
118
115
  switchGallery(value) {
119
116
  if (this.$mq === 'mobile') {
120
117
  this.gallery = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikala/spmkt",
3
- "version": "2.20.3",
3
+ "version": "2.21.0",
4
4
  "private": false,
5
5
  "description": "supermarket",
6
6
  "scripts": {