Add modular dashboard widgets and layout editor
Some checks failed
Build Frontend / build (push) Failing after 7s

Introduces a modular dashboard system with draggable, configurable widgets including revenue, low stock, recent customers, and pending chats. Adds a dashboard editor for layout customization, widget visibility, and settings. Refactors dashboard content to use the new widget system and improves UI consistency and interactivity.
This commit is contained in:
g
2026-01-12 10:39:50 +00:00
parent a6b7286b45
commit 318927cd0c
23 changed files with 2435 additions and 317 deletions

View File

@@ -190,10 +190,12 @@ export const getCustomerInsights = async (
storeId?: string,
page: number = 1,
limit: number = 10,
sortBy: string = "spent",
): Promise<CustomerInsights> => {
const params = new URLSearchParams({
page: page.toString(),
limit: limit.toString(),
sort: sortBy,
});
if (storeId) params.append("storeId", storeId);
@@ -272,9 +274,10 @@ export const getProductPerformanceWithStore = async (): Promise<
export const getCustomerInsightsWithStore = async (
page: number = 1,
limit: number = 10,
sortBy: string = "spent",
): Promise<CustomerInsights> => {
const storeId = getStoreIdForUser();
return getCustomerInsights(storeId, page, limit);
return getCustomerInsights(storeId, page, limit, sortBy);
};
export const getOrderAnalyticsWithStore = async (