feat: add withdraw request functionality and UI components

This commit is contained in:
2026-08-27 02:39:57 +03:30
parent aeef95339d
commit 4ce663c669
115 changed files with 4064 additions and 315 deletions
@@ -0,0 +1,46 @@
import { modalityTitle } from './fastRequestOptions'
import { convertEnglishToPersian, formatPrice } from '../utils/numberUtils'
export const invoiceColumns = [
{
title: 'شماره فاکتور',
key: 'number',
render: (row) => convertEnglishToPersian(row.number)
},
{
title: 'شماره پرونده',
key: 'document',
render: (row) => row.document?.code ?? '-'
},
{
title: 'نوع درخواست',
key: 'modality',
render: (row) => row.document ? modalityTitle(row.document.modality) : '-'
},
{
title: 'مبلغ',
key: 'amount',
render: (row) => `${formatPrice(row.amount)} تومان`
},
{
title: 'وضعیت',
key: 'status'
},
{
title: 'روش پرداخت',
key: 'payment_method',
render: (row) => row.payment_method ?? '-'
},
{
title: 'تاریخ ثبت',
key: 'created_at',
render: (row) => row.created_at ? convertEnglishToPersian(new Date(row.created_at).toLocaleDateString('fa-IR')) : '-'
},
{
title: '',
key: 'actions',
width: 100,
style: 'grid grid-cols-1',
slot: true,
}
]
@@ -0,0 +1,36 @@
import { modalityTitle } from './fastRequestOptions'
import { convertEnglishToPersian } from '../utils/numberUtils'
export const reportColumns = [
{
title: 'شماره پرونده',
key: 'code',
render: (row) => row.document?.code || '-'
},
{
title: 'نوع درخواست',
key: 'modality',
render: (row) => row.document ? modalityTitle(row.document.modality) : '-'
},
{
title: 'وضعیت گزارش',
key: 'status'
},
{
title: 'پزشک',
key: 'doctor',
render: (row) => row.doctor || '-'
},
{
title: 'تاریخ ثبت گزارش',
key: 'submitted_at',
render: (row) => row.submitted_at ? convertEnglishToPersian(row.submitted_at) : '-'
},
{
title: '',
key: 'actions',
width: 80,
style: 'grid grid-cols-1',
slot: true,
}
]
@@ -0,0 +1,38 @@
import { convertEnglishToPersian, formatPrice } from '../utils/numberUtils'
export const walletTransactionColumns = [
{
title: 'نوع',
key: 'type',
slot: true,
},
{
title: 'بابت',
key: 'reason'
},
{
title: 'مبلغ',
key: 'amount',
render: (row) => `${formatPrice(row.amount)} تومان`
},
{
title: 'روش',
key: 'via_gateway',
render: (row) => row.via_gateway ? 'درگاه پرداخت' : 'کیف پول'
},
{
title: 'شماره فاکتور',
key: 'invoice_number',
render: (row) => row.invoice_number ? convertEnglishToPersian(row.invoice_number) : '-'
},
{
title: 'موجودی پس از تراکنش',
key: 'balance_after',
render: (row) => `${formatPrice(row.balance_after)} تومان`
},
{
title: 'تاریخ',
key: 'created_at',
render: (row) => row.created_at ? convertEnglishToPersian(row.created_at) : '-'
}
]
@@ -0,0 +1,34 @@
import { convertEnglishToPersian, formatPrice } from '../utils/numberUtils'
export const withdrawRequestColumns = [
{
title: 'مبلغ',
key: 'amount',
render: (row) => `${formatPrice(row.amount)} تومان`
},
{
title: 'کارت مقصد',
key: 'bank_card',
slot: true,
},
{
title: 'وضعیت',
key: 'status',
slot: true,
},
{
title: 'تاریخ درخواست',
key: 'created_at',
render: (row) => convertEnglishToPersian(row.created_at)
},
{
title: 'تاریخ بررسی',
key: 'reviewed_at',
render: (row) => row.reviewed_at ? convertEnglishToPersian(row.reviewed_at) : '-'
},
{
title: 'توضیح',
key: 'admin_note',
render: (row) => row.admin_note || '-'
},
]