1404/11/04- first

This commit is contained in:
2026-01-24 17:45:54 +03:30
commit edf1824229
554 changed files with 59581 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import useAxios from '@core/utils/useAxios'
import type { AddId, Customer } from '@/model/customer'
import type { TableInput } from '@core/type/baseTable'
export const createCustomer = async (obj: Customer) =>
await useAxios.post<AddId>(`/admin/customer`, obj)
export const deleteCustomer = async (id: number) => await useAxios.delete(`/admin/customer/${id}`)
export const updateCustomer = async (id: number, obj: Customer) =>
await useAxios.put<AddId>(`/admin/customer/${id}`, obj)
export const getCustomerTable = async (params: TableInput) =>
await useAxios.post<Array<Customer>>('/admin/customer/table', params)
export const getCustomersList = async () => await useAxios.get<Customer[]>(`/admin/customer/list`)
export const changeCustomerActivation = async (id: number) =>
await useAxios.get(`/admin/customer/active/${id}`)
export const changeCustomerOrderActivation = async (id: number) =>
await useAxios.get(`/admin/customer/trade/${id}`)
export const changeCustomerArchive = async (id: number) =>
await useAxios.get(`/admin/customer/archive/${id}`)
export const confirmUser = async (id: number) =>
await useAxios.get(`/admin/customer/is_valid/${id}`)
export const getCustomerArchiveTable = async (params: TableInput) =>
await useAxios.post<Array<Customer>>('/admin/customer/archive/table', params)
export const getSingleTable = async (params: TableInput) =>
await useAxios.post<Array<Customer>>('/admin/customer/single/table', params)
export const getSingleArchiveTable = async (params: TableInput) =>
await useAxios.post<Array<Customer>>('/admin/customer/single/archive/table', params)