Add: shared skeleton, dark toggle bg, fixed: multi select patching issue

This commit is contained in:
AmirReza Jamali
2025-09-20 19:35:58 +03:30
parent 0ea2ff635b
commit 4a7a1c66f7
14 changed files with 48 additions and 216 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export const customersService = {
const response = await api.get(API_ENDPOINTS.CUSTOMERS.READ_ALL, {
params,
});
return CustomerListResponseSchema.parse(response.data);
return response.data
} catch (error) {
console.error("ERROR caught in Customers Services Read all:", error);
throw error;
+4 -5
View File
@@ -1,7 +1,6 @@
import api from "../axios";
import { API_ENDPOINTS } from "../endpoints";
import {
AdminListResponseSchema,
ApiResponse,
IAdminListResponse,
ICreateAdminCredentials,
@@ -14,7 +13,7 @@ import {
export const userService = {
login: async (
credentials: ILoginCredentials
credentials: ILoginCredentials,
): Promise<ApiResponse<ILoginResponse>> => {
try {
const response = await api.post(API_ENDPOINTS.USER.LOGIN, credentials);
@@ -35,11 +34,11 @@ export const userService = {
}
},
adminsList: async (
params?: Record<string, any>
params?: Record<string, any>,
): Promise<ApiResponse<IAdminListResponse>> => {
try {
const response = await api.get(API_ENDPOINTS.USER.ADMINS, { params });
return AdminListResponseSchema.parse(response.data);
return response.data;
} catch (error) {
console.error("ERROR caught in User Service User List", error);
throw error;
@@ -79,7 +78,7 @@ export const userService = {
}
},
deleteAdmin: async (
id: string
id: string,
): Promise<ApiResponse<{ message: string }>> => {
try {
return await api.delete(`${API_ENDPOINTS.USER.ADMINS}/${id}`);