added sse and description for withdraw

This commit is contained in:
2026-06-18 19:09:50 +03:30
parent 3e74699f7e
commit f3aaf9d7c0
10 changed files with 921 additions and 73 deletions
@@ -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,