added sse and description for withdraw
This commit is contained in:
@@ -41,6 +41,7 @@ export interface WalletPageContext {
|
||||
infoVisible: Ref<boolean>
|
||||
refOtpInput: Ref<InstanceType<typeof OtpInput> | null>
|
||||
form: Ref<Transaction>
|
||||
extraNote: Ref<string>
|
||||
cardForm: Ref<Card>
|
||||
disableButton: ReturnType<typeof computed<boolean>>
|
||||
cardItems: typeof walletCardItems
|
||||
@@ -106,6 +107,8 @@ export function useWalletPage() {
|
||||
buildDepositSmsUrl(supportMessengerSettings.value.depositSmsSupportNumber),
|
||||
)
|
||||
|
||||
const extraNote = ref('')
|
||||
|
||||
const form = ref<Transaction>({
|
||||
value: undefined,
|
||||
percentWallet: 0,
|
||||
@@ -146,6 +149,7 @@ export function useWalletPage() {
|
||||
function resetData() {
|
||||
form.value.value = undefined
|
||||
form.value.percentWallet = 0
|
||||
extraNote.value = ''
|
||||
}
|
||||
|
||||
async function addCard() {
|
||||
@@ -217,7 +221,11 @@ export function useWalletPage() {
|
||||
try {
|
||||
infoVisible.value = true
|
||||
showConfirmCode.value = false
|
||||
await withdraw({ ...form.value, otp: value })
|
||||
await withdraw({
|
||||
...form.value,
|
||||
otp: value,
|
||||
extra_note: extraNote.value.trim() || undefined,
|
||||
})
|
||||
await walletStore.getMyWallet()
|
||||
await message.success('عملیات با موفقیت انجام شد')
|
||||
withdrawInfModal.value = true
|
||||
@@ -264,6 +272,7 @@ export function useWalletPage() {
|
||||
infoVisible,
|
||||
refOtpInput,
|
||||
form,
|
||||
extraNote,
|
||||
cardForm,
|
||||
disableButton,
|
||||
cardItems: walletCardItems,
|
||||
|
||||
@@ -55,6 +55,15 @@
|
||||
@on-complete="handleOnComplete"
|
||||
/>
|
||||
</div>
|
||||
<div class="px-5 pb-2 mt-4">
|
||||
<a-textarea
|
||||
v-model:value="extraNote"
|
||||
:maxlength="500"
|
||||
:rows="3"
|
||||
placeholder="توضیحات اضافی"
|
||||
show-count
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #button>
|
||||
@@ -136,6 +145,7 @@ const {
|
||||
withdrawInfModal,
|
||||
infoVisible,
|
||||
refOtpInput,
|
||||
extraNote,
|
||||
supportMessengerText,
|
||||
depositGuideSupportLink,
|
||||
depositSmsSupportLink,
|
||||
|
||||
Reference in New Issue
Block a user