diff --git a/src/api/shayegan.ts b/src/api/shayegan.ts index e37c316..71e369a 100644 --- a/src/api/shayegan.ts +++ b/src/api/shayegan.ts @@ -1,4 +1,5 @@ import useAxios from '@core/utils/useAxios' +import type { TableInput, TableOutput } from '@core/type/baseTable' export interface ShayeganRecord { id?: number | null @@ -25,13 +26,8 @@ export const shayeganHealth = async () => body?: unknown }>('/admin/shayegan/health') -export const shayeganTable = async (params: Record) => - await useAxios.post<{ - data: ShayeganRecord[] - total: number - current_page?: number - per_page?: number - }>('/admin/shayegan/table', params) +export const shayeganTable = async (params: TableInput) => + await useAxios.post>('/admin/shayegan/table', params) export const shayeganShow = async (id: number | string) => await useAxios.get(`/admin/shayegan/${id}`) diff --git a/src/pages/menuPages/accounting/components/shayeganTable.vue b/src/pages/menuPages/accounting/components/shayeganTable.vue index ae5bd3e..e1e298f 100644 --- a/src/pages/menuPages/accounting/components/shayeganTable.vue +++ b/src/pages/menuPages/accounting/components/shayeganTable.vue @@ -1,110 +1,182 @@