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 b92d1ee
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 5 deletions.
25 changes: 25 additions & 0 deletions app/javascript/submission_form/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const en = {
scan_the_qr_code_with_the_camera_app_to_open_the_form_on_mobile_and_draw_your_signature: 'Scan the QR code with the camera app to open the form on mobile and draw your signature',
date: 'Date',
number: 'Number',
already_paid: 'Already paid',
image: 'Image',
pay: 'Pay',
take_photo: 'Take photo',
number_phone_is_invalid: '{number} phone is invalid',
file: 'File',
Expand Down Expand Up @@ -76,9 +78,11 @@ const es = {
by_clicking_you_agree_to_the: 'Al hacer clic en "{button}", usted acepta el',
electronic_signature_disclosure: 'Divulgación de Firma Electrónica',
esignature_disclosure: 'Divulgación de eFirma',
already_paid: 'Ya pagado',
minimize: 'Minimizar',
text: 'Texto',
signature: 'Firma',
pay: 'Pagar',
initials: 'Iniciales',
date: 'Fecha',
number: 'Número',
Expand Down Expand Up @@ -148,12 +152,14 @@ const it = {
electronic_signature_disclosure: 'Divulgazione della Firma Elettronica',
esignature_disclosure: 'Divulgazione della eFirma',
minimize: 'Minimizza',
already_paid: 'Pagato',
text: 'Testo',
signature: 'Firma',
initials: 'Iniziali',
date: 'Data',
number: 'Numero',
image: 'Immagine',
pay: 'Pagamento',
file: 'File',
select: 'Seleziona',
checkbox: 'Casella di controllo',
Expand Down Expand Up @@ -218,13 +224,15 @@ const de = {
by_clicking_you_agree_to_the: 'Durch Klicken auf "{button}" stimmen Sie zu, dass Sie die',
electronic_signature_disclosure: 'Elektronische Unterschriftenoffenlegung',
esignature_disclosure: 'eSignatur Offenlegung',
already_paid: 'Bereits bezahlt',
minimize: 'Minimieren',
text: 'Text',
signature: 'Unterschrift',
initials: 'Initialen',
date: 'Datum',
number: 'Nummer',
image: 'Bild',
pay: 'Bezahlen',
file: 'Datei',
select: 'Auswählen',
checkbox: 'Checkbox',
Expand Down Expand Up @@ -291,8 +299,10 @@ const fr = {
esignature_disclosure: 'Divulgation de la eSignature',
minimize: 'Réduire',
text: 'Texte',
already_paid: 'Déjà payé',
signature: 'Signature',
initials: 'Initiales',
pay: 'Payer',
date: 'Date',
number: 'Numéro',
image: 'Image',
Expand Down Expand Up @@ -362,12 +372,14 @@ const pl = {
esignature_disclosure: 'Ujawnienie ePodpisu',
minimize: 'Zminimalizuj',
text: 'Tekst',
already_paid: 'Już zapłacono',
signature: 'Podpis',
initials: 'Inicjały',
date: 'Data',
number: 'Numer',
image: 'Obraz',
file: 'Plik',
pay: 'Zapłać',
select: 'Wybierz',
checkbox: 'Pole wyboru',
multiple: 'Wielokrotne',
Expand Down Expand Up @@ -433,11 +445,13 @@ const uk = {
esignature_disclosure: 'Розголошення еПідпису',
minimize: 'Зменшити',
text: 'Текст',
already_paid: 'Вже оплачено',
signature: 'Підпис',
initials: 'Ініціали',
date: 'Дата',
number: 'Число',
image: 'Зображення',
pay: 'Оплатити',
file: 'Файл',
select: 'Вибрати',
checkbox: 'Прапорець',
Expand Down Expand Up @@ -502,13 +516,15 @@ const cs = {
by_clicking_you_agree_to_the: 'Kliknutím na "{button}" souhlasíte s',
electronic_signature_disclosure: 'Zveřejněním Elektronického Podpisu',
esignature_disclosure: 'Zveřejnění ePodpisu',
already_paid: 'Už zaplaceno',
minimize: 'Minimalizovat',
text: 'Text',
signature: 'Podpis',
initials: 'Iniciály',
date: 'Datum',
number: 'Číslo',
image: 'Obrázek',
pay: 'Zaplatit',
file: 'Soubor',
select: 'Vybrat',
checkbox: 'Zaškrtávací políčko',
Expand Down Expand Up @@ -573,13 +589,15 @@ const pt = {
by_clicking_you_agree_to_the: 'Ao clicar em "{button}", você concorda com o',
electronic_signature_disclosure: 'Divulgação de Assinatura Eletrônica',
esignature_disclosure: 'Divulgação da eAssinatura',
already_paid: 'Já pago',
minimize: 'Minimizar',
text: 'Texto',
signature: 'Assinatura',
initials: 'Iniciais',
date: 'Data',
number: 'Número',
image: 'Imagem',
pay: 'Pagar',
file: 'Arquivo',
select: 'Selecionar',
checkbox: 'Caixa',
Expand Down Expand Up @@ -646,12 +664,14 @@ const he = {
esignature_disclosure: 'חשיפת ה-eחתימה',
minimize: 'לקטן',
text: 'טקסט',
already_paid: 'כבר שולם',
signature: 'חתימה',
initials: 'ראשי תיבות',
date: 'תאריך',
number: 'מספר',
image: 'תמונה',
file: 'קובץ',
pay: 'תשלום',
select: 'בחר',
checkbox: 'תיק בחירה',
multiple: 'רב ערכים',
Expand Down Expand Up @@ -718,6 +738,7 @@ const nl = {
esignature_disclosure: 'Openbaarmaking van eHandtekening',
minimize: 'Minimaliseren',
text: 'Tekst',
already_paid: 'Al betaald',
signature: 'Handtekening',
initials: 'Initialen',
date: 'Datum',
Expand All @@ -728,6 +749,7 @@ const nl = {
select: 'Selecteer',
checkbox: 'Aankruisvakje',
multiple: 'Meerdere',
pay: 'Betaal',
radio: 'Radio',
cells: 'Cellen',
stamp: 'Stempel',
Expand Down Expand Up @@ -795,6 +817,7 @@ const ar = {
number: 'رقم',
image: 'صورة',
take_photo: 'التقاط صورة',
pay: 'دفع',
file: 'ملف',
select: 'اختيار',
checkbox: 'خانة اختيار',
Expand Down Expand Up @@ -860,11 +883,13 @@ const ko = {
by_clicking_you_agree_to_the: '"{button}"를 클릭함으로써, 다음에 동의하게 됩니다',
electronic_signature_disclosure: '전자 서명 공개',
esignature_disclosure: '전자 서명 공개',
already_paid: '이미 지불됨',
text: '텍스트',
signature: '서명',
initials: '이니셜',
date: '날짜',
number: '숫자',
pay: '급여',
image: '이미지',
take_photo: '사진 찍기',
file: '파일',
Expand Down
20 changes: 17 additions & 3 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 All @@ -17,7 +29,7 @@
v-if="modelValue && !sessionId"
class=" text-2xl mb-2"
>
Already paid
{{ t('already_paid') }}
</div>
<div v-else>
<button
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 b92d1ee

Please sign in to comment.