|
|
|
@ -1,7 +1,7 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
class="dropdown dropdown-end"
|
|
|
|
class="dropdown dropdown-end"
|
|
|
|
:class="{ 'dropdown-open': (!field.preferences?.price || !isConnected) && !isLoading }"
|
|
|
|
:class="{ 'dropdown-open': ((!field.preferences?.price && !field.preferences?.formula) || !isConnected) && !isLoading }"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
tabindex="0"
|
|
|
|
tabindex="0"
|
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<select
|
|
|
|
<select
|
|
|
|
v-model="field.preferences.currency"
|
|
|
|
v-model="field.preferences.currency"
|
|
|
|
placeholder="Price"
|
|
|
|
:placeholder="t('price')"
|
|
|
|
class="select select-bordered select-xs font-normal w-full max-w-xs !h-7 !outline-0"
|
|
|
|
class="select select-bordered select-xs font-normal w-full max-w-xs !h-7 !outline-0"
|
|
|
|
@change="save"
|
|
|
|
@change="save"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
@ -51,14 +51,23 @@
|
|
|
|
@click.stop
|
|
|
|
@click.stop
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
<input
|
|
|
|
|
|
|
|
v-if="field.preferences.formula"
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
:placeholder="t('price')"
|
|
|
|
|
|
|
|
disabled="true"
|
|
|
|
|
|
|
|
class="input input-bordered input-xs w-full max-w-xs h-7 !outline-0"
|
|
|
|
|
|
|
|
@blur="save"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<input
|
|
|
|
|
|
|
|
v-else
|
|
|
|
v-model="field.preferences.price"
|
|
|
|
v-model="field.preferences.price"
|
|
|
|
type="number"
|
|
|
|
type="number"
|
|
|
|
placeholder="Price"
|
|
|
|
:placeholder="t('price')"
|
|
|
|
class="input input-bordered input-xs w-full max-w-xs h-7 !outline-0"
|
|
|
|
class="input input-bordered input-xs w-full max-w-xs h-7 !outline-0"
|
|
|
|
@blur="save"
|
|
|
|
@blur="save"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
v-if="field.preferences.price"
|
|
|
|
v-if="field.preferences.price && !field.preferences.formula"
|
|
|
|
:style="{ backgroundColor: backgroundColor }"
|
|
|
|
:style="{ backgroundColor: backgroundColor }"
|
|
|
|
class="absolute -top-1 left-2.5 px-1 h-4"
|
|
|
|
class="absolute -top-1 left-2.5 px-1 h-4"
|
|
|
|
style="font-size: 8px"
|
|
|
|
style="font-size: 8px"
|
|
|
|
@ -149,8 +158,21 @@
|
|
|
|
data-turbo="false"
|
|
|
|
data-turbo="false"
|
|
|
|
>Learn more</a>
|
|
|
|
>Learn more</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<li class="mb-1">
|
|
|
|
|
|
|
|
<label
|
|
|
|
|
|
|
|
class="label-text cursor-pointer text-center w-full flex items-center"
|
|
|
|
|
|
|
|
@click="$emit('click-formula')"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<IconMathFunction
|
|
|
|
|
|
|
|
width="18"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<span class="text-sm">
|
|
|
|
|
|
|
|
{{ t('formula') }}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<hr>
|
|
|
|
<hr>
|
|
|
|
<li class="mt-1">
|
|
|
|
<li>
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
class="label-text cursor-pointer text-center w-full flex items-center"
|
|
|
|
class="label-text cursor-pointer text-center w-full flex items-center"
|
|
|
|
@click="$emit('click-description')"
|
|
|
|
@click="$emit('click-description')"
|
|
|
|
@ -181,7 +203,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { IconSettings, IconCircleCheck, IconInfoCircle, IconBrandStripe, IconInnerShadowTop, IconRouteAltLeft } from '@tabler/icons-vue'
|
|
|
|
import { IconMathFunction, IconSettings, IconCircleCheck, IconInfoCircle, IconBrandStripe, IconInnerShadowTop, IconRouteAltLeft } from '@tabler/icons-vue'
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
|
|
|
|
const isConnected = ref(false)
|
|
|
|
const isConnected = ref(false)
|
|
|
|
@ -193,6 +215,7 @@ export default {
|
|
|
|
IconCircleCheck,
|
|
|
|
IconCircleCheck,
|
|
|
|
IconRouteAltLeft,
|
|
|
|
IconRouteAltLeft,
|
|
|
|
IconInfoCircle,
|
|
|
|
IconInfoCircle,
|
|
|
|
|
|
|
|
IconMathFunction,
|
|
|
|
IconInnerShadowTop,
|
|
|
|
IconInnerShadowTop,
|
|
|
|
IconBrandStripe
|
|
|
|
IconBrandStripe
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -203,7 +226,7 @@ export default {
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
emits: ['click-condition', 'click-description'],
|
|
|
|
emits: ['click-condition', 'click-description', 'click-formula'],
|
|
|
|
data () {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
isLoading: false
|
|
|
|
isLoading: false
|
|
|
|
|