@wikala/spmkt 2.27.2 → 2.28.1
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.
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
<script>
|
|
35
35
|
import _ from 'underscore'
|
|
36
36
|
import { formatMoney } from '../../utils/filters'
|
|
37
|
+
import formatDate from 'intl-dateformat'
|
|
37
38
|
|
|
38
39
|
const Pass = {
|
|
39
40
|
name: 'Pass',
|
|
@@ -230,6 +231,22 @@ export default {
|
|
|
230
231
|
}
|
|
231
232
|
},
|
|
232
233
|
|
|
234
|
+
updateOverridePriceNotification() {
|
|
235
|
+
let opActiveContainer = document.querySelector('.override-price-active')
|
|
236
|
+
if(!opActiveContainer) {
|
|
237
|
+
return
|
|
238
|
+
}
|
|
239
|
+
opActiveContainer.textContent = ''
|
|
240
|
+
|
|
241
|
+
if(!this.selectedVariant) {
|
|
242
|
+
return
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if(this.selectedVariant.override_price_active) {
|
|
246
|
+
opActiveContainer.textContent = 'Trajanje akcije od ' + formatDate(new Date(this.selectedVariant.override_start_at), 'DD.MM.YYYY HH:mm') + ' do ' + formatDate(new Date(this.selectedVariant.override_stop_at), 'DD.MM.YYYY HH:mm')
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
|
|
233
250
|
getVariantByOption(optionId, optionValue) {
|
|
234
251
|
if (this.productVariantOptions.length !== 1) {
|
|
235
252
|
return {}
|
|
@@ -311,6 +328,7 @@ export default {
|
|
|
311
328
|
this.$bus.$emit('updatePrice', this.selectedVariant.price, this.selectedVariant.compare_price)
|
|
312
329
|
this.$bus.$emit('changePhoto', this.selectedVariant.default_image_id)
|
|
313
330
|
this.$bus.$emit('updateSKU', this.selectedVariant.sku || this.selectedVariant.id)
|
|
331
|
+
this.updateOverridePriceNotification()
|
|
314
332
|
}
|
|
315
333
|
},
|
|
316
334
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div style="
|
|
3
|
-
<select class="select" v-if="showSelect" @change="qtySelectChange($event)" v-model="qty">
|
|
2
|
+
<div style="display: flex; justify-content: flex-end; flex-direction: column;">
|
|
3
|
+
<select class="select" v-if="showSelect" @change="qtySelectChange($event)" v-model="qty" style="text-align:center;">
|
|
4
4
|
<option v-for="qty in selectRange" :value="qty" :key="qty">{{ qty }}</option>
|
|
5
5
|
<option value="smp">{{ selectMax + 1 }}+</option>
|
|
6
6
|
</select>
|
|
7
|
-
<form @submit.prevent="qtyUpdate">
|
|
8
|
-
<input ref="textInput" v-if="!showSelect" class="input"
|
|
9
|
-
<button v-if="showUpdateButton" class="button is-small"
|
|
7
|
+
<form @submit.prevent="qtyUpdate" style="display:flex; flex-direction: column;">
|
|
8
|
+
<input ref="textInput" v-if="!showSelect" class="input" @input="qtyInput" :value="qty" style="text-align:center; border:unset" />
|
|
9
|
+
<button v-if="showUpdateButton" class="button is-small">{{ $t('global.update') }}</button>
|
|
10
10
|
</form>
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|