You've already forked AstralRinth
forked from didirus/AstralRinth
feat: bank acct owner (#4993)
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="selectedRail?.type === 'fiat'" class="flex flex-col gap-2.5">
|
||||
<div v-if="selectedRail?.type === 'fiat' && !isBusinessEntity" class="flex flex-col gap-2.5">
|
||||
<label>
|
||||
<span class="text-md font-semibold text-contrast">
|
||||
{{ formatMessage(messages.accountOwner) }}
|
||||
@@ -46,6 +46,36 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="selectedRail?.type === 'fiat' && isBusinessEntity" class="flex flex-col gap-2">
|
||||
<span class="text-md font-semibold text-contrast">
|
||||
{{ formatMessage(messages.bankAccountOwner) }}
|
||||
<span class="text-red">*</span>
|
||||
</span>
|
||||
<span class="text-sm leading-tight text-primary">
|
||||
{{ formatMessage(messages.bankAccountOwnerDescription) }}
|
||||
</span>
|
||||
<div class="flex flex-col gap-3 sm:flex-row sm:gap-4">
|
||||
<div class="flex flex-1 flex-col gap-2.5">
|
||||
<input
|
||||
v-model="formData.bankAccountOwnerFirstName"
|
||||
type="text"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.firstNamePlaceholder)"
|
||||
autocomplete="given-name"
|
||||
class="w-full rounded-[14px] bg-surface-4 px-4 py-3 text-contrast placeholder:text-secondary sm:py-2.5"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-1 flex-col gap-2.5">
|
||||
<input
|
||||
v-model="formData.bankAccountOwnerLastName"
|
||||
type="text"
|
||||
:placeholder="formatMessage(formFieldPlaceholders.lastNamePlaceholder)"
|
||||
autocomplete="family-name"
|
||||
class="w-full rounded-[14px] bg-surface-4 px-4 py-3 text-contrast placeholder:text-secondary sm:py-2.5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="selectedRail?.requiresBankName" class="flex flex-col gap-2.5">
|
||||
<label>
|
||||
<span class="text-md font-semibold text-contrast">
|
||||
@@ -279,6 +309,8 @@ const existingAmount = withdrawData.value.calculation.amount
|
||||
const formData = ref<Record<string, any>>({
|
||||
amount: existingAmount || undefined,
|
||||
bankName: existingAccountDetails?.bankName ?? '',
|
||||
bankAccountOwnerFirstName: existingAccountDetails?.bankAccountOwnerFirstName ?? '',
|
||||
bankAccountOwnerLastName: existingAccountDetails?.bankAccountOwnerLastName ?? '',
|
||||
...existingAccountDetails,
|
||||
})
|
||||
|
||||
@@ -363,6 +395,12 @@ const accountOwnerAddress = computed(() => {
|
||||
return parts.join(', ')
|
||||
})
|
||||
|
||||
const isBusinessEntity = computed(() => {
|
||||
const providerDataValue = withdrawData.value.providerData
|
||||
if (providerDataValue.type !== 'muralpay') return false
|
||||
return providerDataValue.kycData?.type === 'business'
|
||||
})
|
||||
|
||||
const allRequiredFieldsFilled = computed(() => {
|
||||
const rail = selectedRail.value
|
||||
if (!rail) return false
|
||||
@@ -511,5 +549,14 @@ const messages = defineMessages({
|
||||
id: 'dashboard.creator-withdraw-modal.muralpay-details.document-number-tax-id-placeholder',
|
||||
defaultMessage: 'Enter tax ID number',
|
||||
},
|
||||
bankAccountOwner: {
|
||||
id: 'dashboard.creator-withdraw-modal.muralpay-details.bank-account-owner',
|
||||
defaultMessage: 'Bank account owner',
|
||||
},
|
||||
bankAccountOwnerDescription: {
|
||||
id: 'dashboard.creator-withdraw-modal.muralpay-details.bank-account-owner-description',
|
||||
defaultMessage:
|
||||
'Enter the name of the person authorized to operate this bank account on behalf of the business.',
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user