Add admin order details modal and improve admin UI

Introduces an admin-only OrderDetailsModal component for viewing and managing order details, including status updates and transaction info. Updates OrdersTable to support the modal, and enhances the admin dashboard page with lazy loading and skeletons for better UX. Also fixes API client base URL handling for /api prefix.
This commit is contained in:
g
2025-12-17 23:38:17 +00:00
parent 93ec3d3642
commit 2db13cc9b7
5 changed files with 667 additions and 21 deletions

View File

@@ -282,7 +282,9 @@ export async function fetchClient<T>(
}
} else {
// For direct API calls, construct full URL
url = `${apiUrl}${normalizedEndpoint}`;
// Ensure /api prefix is included if apiUrl doesn't already have it
const baseUrl = apiUrl.endsWith('/api') ? apiUrl : `${apiUrl}/api`;
url = `${baseUrl}${normalizedEndpoint}`;
}
// Get auth token from cookies