@lancom/shared 0.0.159 → 0.0.161
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.
|
@@ -185,23 +185,6 @@
|
|
|
185
185
|
{{ errors[0] }}
|
|
186
186
|
</span>
|
|
187
187
|
</validation-provider>
|
|
188
|
-
<validation-provider
|
|
189
|
-
ref="addressProvider"
|
|
190
|
-
v-slot="{ errors }"
|
|
191
|
-
tag="div"
|
|
192
|
-
name="Full Address"
|
|
193
|
-
class="form-row"
|
|
194
|
-
:rules="{ max: 45 }">
|
|
195
|
-
<input
|
|
196
|
-
v-model="fullAddress"
|
|
197
|
-
name="fullAddress"
|
|
198
|
-
type="hidden" />
|
|
199
|
-
<span
|
|
200
|
-
v-if="errors.length"
|
|
201
|
-
class="form-help is-danger">
|
|
202
|
-
Full Address max length is 45
|
|
203
|
-
</span>
|
|
204
|
-
</validation-provider>
|
|
205
188
|
<div class="form-row--cols">
|
|
206
189
|
<postcode-select
|
|
207
190
|
class="form-col col-half"
|
|
@@ -287,16 +270,7 @@ export default {
|
|
|
287
270
|
]),
|
|
288
271
|
...mapGetters('auth', [
|
|
289
272
|
'user'
|
|
290
|
-
])
|
|
291
|
-
fullAddress: {
|
|
292
|
-
get() {
|
|
293
|
-
return [
|
|
294
|
-
(this.address.addressLine1 || ''),
|
|
295
|
-
(this.address.addressLine2 || '')
|
|
296
|
-
].filter(a => !!a).join(', ');
|
|
297
|
-
},
|
|
298
|
-
set() {}
|
|
299
|
-
}
|
|
273
|
+
])
|
|
300
274
|
},
|
|
301
275
|
created() {
|
|
302
276
|
if (!this.address.suburb && !this.suburb && this.user?.suburb) {
|
package/package.json
CHANGED
package/plugins/vue-recaptcha.js
CHANGED
package/store/cart.js
CHANGED
|
@@ -122,8 +122,9 @@ export const actions = {
|
|
|
122
122
|
await api.saveCart(payload, shop._id);
|
|
123
123
|
commit('setEntities', entities);
|
|
124
124
|
},
|
|
125
|
-
async calculateCartPrice({ state: { suburb, entities, coupon }, commit }, { shop }) {
|
|
126
|
-
const
|
|
125
|
+
async calculateCartPrice({ state: { suburb, entities, coupon, cartPricing }, commit }, { shop }) {
|
|
126
|
+
const selectedSuppliersWithRates = cartPricing?.shipping?.suppliersWithRates;
|
|
127
|
+
const payload = generateCalculatePriceData(entities, suburb, null, coupon, selectedSuppliersWithRates);
|
|
127
128
|
try {
|
|
128
129
|
const response = await api.calculateProductPrice(payload, shop._id);
|
|
129
130
|
commit('setCartPricing', response);
|
|
@@ -209,7 +210,7 @@ export const mutations = {
|
|
|
209
210
|
}
|
|
210
211
|
};
|
|
211
212
|
|
|
212
|
-
function generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon) {
|
|
213
|
+
function generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon, selectedSuppliersWithRates) {
|
|
213
214
|
const getSimpleObj = i => i && ({ _id: i._id, name: i.name });
|
|
214
215
|
return {
|
|
215
216
|
entities: entities.map(({ _id, guid, prints, simpleProducts, product }) => ({
|
|
@@ -241,6 +242,7 @@ function generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon
|
|
|
241
242
|
postcode: suburb && suburb.postcode,
|
|
242
243
|
address: suburb ? [suburb.locality, suburb.state, suburb.postcode].filter(i => !!i).join(', ') : null,
|
|
243
244
|
coupon,
|
|
244
|
-
suppliersWithRates
|
|
245
|
+
suppliersWithRates,
|
|
246
|
+
selectedSuppliersWithRates
|
|
245
247
|
};
|
|
246
248
|
}
|