payment link
This commit is contained in:
@@ -133,7 +133,7 @@ export default {
|
|||||||
return this.queryParams.get('stripe_session_id')
|
return this.queryParams.get('stripe_session_id')
|
||||||
},
|
},
|
||||||
defaultName () {
|
defaultName () {
|
||||||
if (this.field.preferences?.price_id) {
|
if (this.field.preferences?.price_id || this.field.preferences?.payment_link_id) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const en = {
|
const en = {
|
||||||
|
payment_link: 'Payment link',
|
||||||
strikeout: 'Strikeout',
|
strikeout: 'Strikeout',
|
||||||
draw_strikethrough_the_document: 'Draw strikethrough the document',
|
draw_strikethrough_the_document: 'Draw strikethrough the document',
|
||||||
quantity: 'Quantity',
|
quantity: 'Quantity',
|
||||||
@@ -179,6 +180,7 @@ const en = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const es = {
|
const es = {
|
||||||
|
payment_link: 'Enlace de pago',
|
||||||
strikeout: 'Tachar',
|
strikeout: 'Tachar',
|
||||||
draw_strikethrough_the_document: 'Dibujar una línea de tachado en el documento',
|
draw_strikethrough_the_document: 'Dibujar una línea de tachado en el documento',
|
||||||
quantity: 'Cantidad',
|
quantity: 'Cantidad',
|
||||||
@@ -359,6 +361,7 @@ const es = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const it = {
|
const it = {
|
||||||
|
payment_link: 'Link di pagamento',
|
||||||
strikeout: 'Barrato',
|
strikeout: 'Barrato',
|
||||||
draw_strikethrough_the_document: 'Disegna una linea barrata sul documento',
|
draw_strikethrough_the_document: 'Disegna una linea barrata sul documento',
|
||||||
quantity: 'Quantità',
|
quantity: 'Quantità',
|
||||||
@@ -539,6 +542,7 @@ const it = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const pt = {
|
const pt = {
|
||||||
|
payment_link: 'Link de pagamento',
|
||||||
strikeout: 'Tachado',
|
strikeout: 'Tachado',
|
||||||
draw_strikethrough_the_document: 'Desenhe uma linha de tachado no documento',
|
draw_strikethrough_the_document: 'Desenhe uma linha de tachado no documento',
|
||||||
quantity: 'Quantidade',
|
quantity: 'Quantidade',
|
||||||
@@ -719,6 +723,7 @@ const pt = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fr = {
|
const fr = {
|
||||||
|
payment_link: 'Lien de paiement',
|
||||||
strikeout: 'Barrer',
|
strikeout: 'Barrer',
|
||||||
draw_strikethrough_the_document: 'Tracer une ligne de suppression sur le document',
|
draw_strikethrough_the_document: 'Tracer une ligne de suppression sur le document',
|
||||||
quantity: 'Quantité',
|
quantity: 'Quantité',
|
||||||
@@ -899,6 +904,7 @@ const fr = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const de = {
|
const de = {
|
||||||
|
payment_link: 'Zahlungslink',
|
||||||
strikeout: 'Streichung',
|
strikeout: 'Streichung',
|
||||||
draw_strikethrough_the_document: 'Ziehe eine Streichung auf das Dokument',
|
draw_strikethrough_the_document: 'Ziehe eine Streichung auf das Dokument',
|
||||||
quantity: 'Menge',
|
quantity: 'Menge',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<span
|
<span
|
||||||
class="dropdown dropdown-end field-settings-dropdown"
|
class="dropdown dropdown-end field-settings-dropdown"
|
||||||
:class="{ 'dropdown-open': ((!field.preferences?.price && !field.preferences?.formula) || !isConnected) && !isLoading }"
|
:class="{ 'dropdown-open': ((!field.preferences?.price && !field.preferences?.formula && !field.preferences?.price_id && !field.preferences?.payment_link_id) || !isConnected) && !isLoading }"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
@click="closeDropdown"
|
@click="closeDropdown"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="!('price_id' in field.preferences)"
|
v-if="!('price_id' in field.preferences) && !('payment_link_id' in field.preferences)"
|
||||||
class="py-1.5 px-1 relative"
|
class="py-1.5 px-1 relative"
|
||||||
@click.stop
|
@click.stop
|
||||||
>
|
>
|
||||||
@@ -52,7 +52,14 @@
|
|||||||
@click.stop
|
@click.stop
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
v-if="'price_id' in field.preferences"
|
v-if="'payment_link_id' in field.preferences"
|
||||||
|
v-model="field.preferences.payment_link_id"
|
||||||
|
placeholder="plink_XXXXX"
|
||||||
|
class="input input-bordered input-xs w-full max-w-xs h-7 !outline-0"
|
||||||
|
@blur="save"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
v-else-if="'price_id' in field.preferences"
|
||||||
v-model="field.preferences.price_id"
|
v-model="field.preferences.price_id"
|
||||||
placeholder="Price ID: price_XXXXX"
|
placeholder="Price ID: price_XXXXX"
|
||||||
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"
|
||||||
@@ -75,29 +82,41 @@
|
|||||||
@blur="save"
|
@blur="save"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
v-if="(field.preferences.price || field.preferences.price_id) && (!field.preferences.formula || ('price_id' in field.preferences))"
|
v-if="(field.preferences.price || field.preferences.price_id || field.preferences.payment_link_id) && (!field.preferences.formula || ('price_id' in field.preferences) || ('payment_link_id' in field.preferences))"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
{{ t('price') }}
|
{{ 'payment_link_id' in field.preferences ? t('payment_link') : t('price') }}
|
||||||
</label>
|
</label>
|
||||||
<div class="flex items-center justify-center">
|
<div class="flex items-center justify-center">
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
class="hover:underline"
|
class="hover:underline"
|
||||||
style="font-size: 11px"
|
style="font-size: 11px"
|
||||||
:class="{'underline': !('price_id' in field.preferences)}"
|
:class="{'underline': !('payment_link_id' in field.preferences)}"
|
||||||
@click="delete field.preferences.price_id"
|
@click="[delete field.preferences.price_id, delete field.preferences.payment_link_id]"
|
||||||
>{{ t('one_off') }}</a>
|
>{{ t('one_off') }}</a>
|
||||||
<span class="h-2.5 border-l border-base-content mx-1" />
|
<span class="h-2.5 border-l border-base-content mx-1" />
|
||||||
|
<template
|
||||||
|
v-if="field.preferences.price_id"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
class="hover:underline"
|
||||||
|
style="font-size: 11px"
|
||||||
|
:class="{'underline': ('price_id' in field.preferences)}"
|
||||||
|
@click="field.preferences.payment_link_id ??= ''"
|
||||||
|
>{{ t('recurrent') }}</a>
|
||||||
|
<span class="h-2.5 border-l border-base-content mx-1" />
|
||||||
|
</template>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
class="hover:underline"
|
class="hover:underline"
|
||||||
style="font-size: 11px"
|
style="font-size: 11px"
|
||||||
:class="{'underline': ('price_id' in field.preferences)}"
|
:class="{'underline': ('payment_link_id' in field.preferences)}"
|
||||||
@click="field.preferences.price_id ??= ''"
|
@click="[delete field.preferences.price_id, field.preferences.payment_link_id ??= '']"
|
||||||
>{{ t('recurrent') }}</a>
|
>{{ t('payment_link') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -194,7 +213,7 @@
|
|||||||
width="18"
|
width="18"
|
||||||
/>
|
/>
|
||||||
<span class="text-sm">
|
<span class="text-sm">
|
||||||
{{ 'price_id' in field.preferences ? t('quantity') : t('formula') }}
|
{{ 'payment_link_id' in field.preferences ? t('quantity') : t('formula') }}
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user