wallet fix 2

This commit is contained in:
2026-06-26 17:41:52 +03:30
parent edffc5df76
commit d7ca6706fb
11 changed files with 529 additions and 12 deletions
+36
View File
@@ -0,0 +1,36 @@
import useAxios from '@core/utils/useAxios'
import type { TableInput } from '@core/type/baseTable'
export interface TahesabRecord {
id: number
customer_id?: number
amount?: number
desc?: string
type?: string
sync_status?: 'pending' | 'success' | 'failed'
sync_log?: string | null
tahesab_id?: string | null
data?: string | null
res?: string | null
created_at?: string
customer?: {
id?: number
name?: string
mobile?: string
moshtari_code?: string | number | null
}
}
export const getTahesabTable = async (params: TableInput) =>
await useAxios.post<TahesabRecord[]>('/admin/tahesab/table', params)
export const getTahesabDetail = async (id: number) =>
await useAxios.get<TahesabRecord>(`/admin/tahesab/${id}`)
export const retryTahesabSanad = async (id: number) =>
await useAxios.post<{ ok: boolean; message: string; tahesab?: TahesabRecord }>(`/admin/tahesab/${id}/retry`)
export const registerCustomerInTahesab = async (customerId: number) =>
await useAxios.post<{ ok: boolean; message: string; moshtari_code?: string | number }>(
`/admin/customer/${customerId}/tahesab/register`
)