Skip to content

Commit

Permalink
adjust payment step
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Jul 7, 2024
1 parent b90c67b commit ceb64a3
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
13 changes: 13 additions & 0 deletions app/javascript/submission_form/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const en = {
date: 'Date',
number: 'Number',
image: 'Image',
pay: 'Pay',
take_photo: 'Take photo',
number_phone_is_invalid: '{number} phone is invalid',
file: 'File',
Expand Down Expand Up @@ -79,6 +80,7 @@ const es = {
minimize: 'Minimizar',
text: 'Texto',
signature: 'Firma',
pay: 'Pagar',
initials: 'Iniciales',
date: 'Fecha',
number: 'Número',
Expand Down Expand Up @@ -154,6 +156,7 @@ const it = {
date: 'Data',
number: 'Numero',
image: 'Immagine',
pay: 'Pagamento',
file: 'File',
select: 'Seleziona',
checkbox: 'Casella di controllo',
Expand Down Expand Up @@ -225,6 +228,7 @@ const de = {
date: 'Datum',
number: 'Nummer',
image: 'Bild',
pay: 'Bezahlen',
file: 'Datei',
select: 'Auswählen',
checkbox: 'Checkbox',
Expand Down Expand Up @@ -293,6 +297,7 @@ const fr = {
text: 'Texte',
signature: 'Signature',
initials: 'Initiales',
pay: 'Payer',
date: 'Date',
number: 'Numéro',
image: 'Image',
Expand Down Expand Up @@ -368,6 +373,7 @@ const pl = {
number: 'Numer',
image: 'Obraz',
file: 'Plik',
pay: 'Zapłać',
select: 'Wybierz',
checkbox: 'Pole wyboru',
multiple: 'Wielokrotne',
Expand Down Expand Up @@ -438,6 +444,7 @@ const uk = {
date: 'Дата',
number: 'Число',
image: 'Зображення',
pay: 'Оплата',
file: 'Файл',
select: 'Вибрати',
checkbox: 'Прапорець',
Expand Down Expand Up @@ -509,6 +516,7 @@ const cs = {
date: 'Datum',
number: 'Číslo',
image: 'Obrázek',
pay: 'Zaplatit',
file: 'Soubor',
select: 'Vybrat',
checkbox: 'Zaškrtávací políčko',
Expand Down Expand Up @@ -580,6 +588,7 @@ const pt = {
date: 'Data',
number: 'Número',
image: 'Imagem',
pay: 'Pagar',
file: 'Arquivo',
select: 'Selecionar',
checkbox: 'Caixa',
Expand Down Expand Up @@ -652,6 +661,7 @@ const he = {
number: 'מספר',
image: 'תמונה',
file: 'קובץ',
pay: 'תשלום',
select: 'בחר',
checkbox: 'תיק בחירה',
multiple: 'רב ערכים',
Expand Down Expand Up @@ -728,6 +738,7 @@ const nl = {
select: 'Selecteer',
checkbox: 'Aankruisvakje',
multiple: 'Meerdere',
pay: 'Betaal',
radio: 'Radio',
cells: 'Cellen',
stamp: 'Stempel',
Expand Down Expand Up @@ -795,6 +806,7 @@ const ar = {
number: 'رقم',
image: 'صورة',
take_photo: 'التقاط صورة',
pay: 'دفع',
file: 'ملف',
select: 'اختيار',
checkbox: 'خانة اختيار',
Expand Down Expand Up @@ -865,6 +877,7 @@ const ko = {
initials: '이니셜',
date: '날짜',
number: '숫자',
pay: '급여',
image: '이미지',
take_photo: '사진 찍기',
file: '파일',
Expand Down
18 changes: 16 additions & 2 deletions app/javascript/submission_form/payment_step.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@
v-if="!modelValue && !sessionId"
:for="field.uuid"
class="label text-2xl mb-2"
>{{ field.name || defaultName }}
>
<MarkdownContent
v-if="field.title"
:string="field.title"
/>
<template v-else>{{ field.name || defaultName }}</template>
</label>
<div
v-if="field.description"
dir="auto"
class="mb-4 px-1"
>
<MarkdownContent :string="field.description" />
</div>
<div>
<input
type="text"
Expand Down Expand Up @@ -60,11 +72,13 @@

<script>
import { IconBrandStripe, IconInnerShadowTop, IconLoader } from '@tabler/icons-vue'
import MarkdownContent from './markdown_content'
export default {
name: 'PaymentStep',
components: {
IconBrandStripe,
MarkdownContent,
IconInnerShadowTop,
IconLoader
},
Expand Down Expand Up @@ -105,7 +119,7 @@ export default {
currency
}).format(price)
return `Pay ${formattedPrice}`
return this.t('pay') + ' ' + formattedPrice
}
},
mounted () {
Expand Down
1 change: 1 addition & 0 deletions app/javascript/template_builder/field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
v-if="field.type === 'payment'"
:field="field"
@click-condition="isShowConditionsModal = true"
@click-description="isShowDescriptionModal = true"
/>
<span
v-else
Expand Down
18 changes: 16 additions & 2 deletions app/javascript/template_builder/payment_settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@
>Learn more</a>
</div>
<hr>
<li class="mt-1">
<label
class="label-text cursor-pointer text-center w-full flex items-center"
@click="$emit('click-description')"
>
<IconInfoCircle
width="18"
/>
<span class="text-sm">
{{ t('description') }}
</span>
</label>
</li>
<li class="mt-1">
<label
class="label-text cursor-pointer text-center w-full flex items-center"
Expand All @@ -168,7 +181,7 @@
</template>
<script>
import { IconSettings, IconCircleCheck, IconBrandStripe, IconInnerShadowTop, IconRouteAltLeft } from '@tabler/icons-vue'
import { IconSettings, IconCircleCheck, IconInfoCircle, IconBrandStripe, IconInnerShadowTop, IconRouteAltLeft } from '@tabler/icons-vue'
import { ref } from 'vue'
const isConnected = ref(false)
Expand All @@ -179,6 +192,7 @@ export default {
IconSettings,
IconCircleCheck,
IconRouteAltLeft,
IconInfoCircle,
IconInnerShadowTop,
IconBrandStripe
},
Expand All @@ -189,7 +203,7 @@ export default {
required: true
}
},
emits: ['click-condition'],
emits: ['click-condition', 'click-description'],
data () {
return {
isLoading: false
Expand Down

0 comments on commit ceb64a3

Please sign in to comment.