Commit Graph

235 Commits

Author SHA1 Message Date
g
0fba981bca optimization 2026-01-11 07:35:52 +00:00
g
027cc49430 asdasd 2026-01-11 07:25:27 +00:00
g
24c752d52b Update PredictionsChart.tsx 2026-01-10 02:59:04 +00:00
g
437aec110c asdasd 2026-01-10 02:18:56 +00:00
g
6c90ba90c3 better stuffs 2026-01-10 02:07:03 +00:00
g
c69367e6da Add predictions and forecasting analytics
Introduces a new PredictionsChart component and integrates it into the AnalyticsDashboard with a new tab for AI-powered sales, demand, and stock forecasting. Expands analytics-service with types and service functions for predictions, enabling comprehensive future insights for revenue, demand, and inventory.
2026-01-10 01:47:38 +00:00
g
8a43477aa8 Update GrowthAnalyticsChart.tsx 2026-01-07 13:09:12 +00:00
g
f78eaaff57 Update GrowthAnalyticsChart.tsx 2026-01-07 13:07:05 +00:00
g
ed229c5dd6 Parallelize vendor and store fetch in NewChatForm
Updated the data fetching logic to retrieve vendor profile and store information concurrently using Promise.all, improving performance and reducing wait time in the NewChatForm component.
2026-01-07 13:02:12 +00:00
g
f17d623570 Revamp growth analytics to show all-time cumulative data
Refactors GrowthAnalyticsChart to display all-time growth since first sale, removes period selection, and introduces tabbed charts for daily, monthly, and customer segment analytics. Updates the GrowthAnalytics interface and service to return cumulative and segmented data, and simplifies API usage to always fetch all-time analytics. Improves customer segment breakdown and chart visualizations.
2026-01-07 12:58:52 +00:00
g
3e27a4b1f2 Update GrowthAnalyticsChart.tsx 2026-01-07 12:52:20 +00:00
g
ce1d2d3fe8 Add growth analytics chart and service integration
Introduces a new GrowthAnalyticsChart component and integrates growth analytics data into the dashboard. Updates analytics-service to support growth analytics API, adds types, and exposes helper functions for fetching growth analytics with store context. The dashboard UI now includes a 'Growth' tab for visualizing store growth metrics and trends.
2026-01-07 03:57:31 +00:00
g
8862aecc61 Update AdminAnalytics.tsx 2026-01-06 17:59:30 +00:00
g
2cd6de3b4a Add platform growth analytics tab with charts
Introduces a new 'Growth Since Launch' tab to the admin analytics page, displaying cumulative stats, monthly revenue and orders, customer segment breakdowns, profit trends, and a detailed monthly growth table. Fetches and visualizes growth data since platform launch using various Recharts components.
2026-01-06 00:00:26 +00:00
g
2994de2fe2 Refactor NewChatForm for improved readability
Reformatted code in NewChatForm.tsx for better readability and maintainability, including consistent spacing, line breaks, and minor style adjustments. No functional changes were made.
2026-01-05 23:01:58 +00:00
g
b1e486c049 Show best month analytics for more date ranges
Updated AdminAnalytics to display the 'Best Month' card for YTD, full year, and previous years, not just YTD. Also removed the obsolete UPGRADE_NEXT16.md guide.
2026-01-05 21:58:38 +00:00
g
c704ceed1d Add year selection to admin analytics and split product table
AdminAnalytics now supports selecting historical years and updates available years dynamically from the API. The product table is refactored to display enabled and disabled products in separate tables, improving clarity. Minor formatting and code style improvements are also included.
2026-01-05 21:55:55 +00:00
g
37a8cfed82 Lazy load notification and keep-online providers
Introduced NotificationProviderWrapper to dynamically load the notification context only on dashboard pages, reducing initial bundle size. KeepOnline component is now also lazy-loaded. Updated app layout to use the new wrapper.
2025-12-31 07:11:10 +00:00
g
66e95438fe Refactor admin vendors page to use client-side fetching and pagination
Migrates the admin vendors page to use client-side data fetching with pagination, search, and improved loading states. Updates the vendor table to show last login, status, and admin badges. Also, optimizes the broadcast dialog by lazy-loading the ReactMarkdown component for preview rendering.
2025-12-31 06:54:37 +00:00
g
5f1e294091 Add pagination to admin user, vendor, and ban lists
Introduces pagination controls and server-side paginated fetching for blocked users, users, and vendors in the admin dashboard. Improves error handling in server API responses and validates order ID in OrderDetailsModal. Updates git-info.json with latest commit metadata.
2025-12-31 05:46:24 +00:00
g
96638f968f Update notification sound to notification.mp3
Replaces all references to hohoho.mp3 with notification.mp3 for notification sounds across the app. Moves AudioPreloader to layout component and removes duplicate usage. Adds a guard in BroadcastDialog to prevent duplicate sends.
2025-12-28 19:21:02 +00:00
g
07fa34d831 Disable Christmas theme and improve layout skeleton
Christmas decorations and theme logic have been disabled throughout the app, including the isDecember utility, layout, and related imports. Layout now shows a skeleton UI while mounting to prevent layout shift. Minor improvements to RevenueChart tooltip colors and ChatDetail request headers for better consistency.
2025-12-27 21:12:43 +00:00
g
c9c3f766a6 Improve admin ban UX, add product cloning, and enhance auth handling
Refines the admin ban page with better dialog state management and feedback during ban/unban actions. Adds a product cloning feature to the products dashboard and updates the product table to support cloning. Improves error handling in ChatDetail for authentication errors, and enhances middleware to handle auth check timeouts and network errors more gracefully. Also updates BanUserCard to validate user ID and ensure correct request formatting.
2025-12-27 20:58:08 +00:00
g
2db13cc9b7 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.
2025-12-17 23:38:17 +00:00
g
f697181d00 fix 2025-12-15 18:09:38 +00:00
g
0176f89cb7 Add CSV export for orders and update UI symbols
Introduces an exportOrdersToCSV function in lib/api-client.ts to allow exporting orders by status as a CSV file. Updates various UI components to use the '•' (bullet) symbol instead of '·' (middle dot) and replaces some emoji/unicode characters for improved consistency and compatibility. Also normalizes the 'use client' directive to include a BOM in many files.
2025-12-15 17:57:18 +00:00
g
07dcaf55c0 Refactor API calls to use apiRequest instead of clientFetch
Replaces all usages of clientFetch with the new apiRequest utility across dashboard pages, modal components, and the profit analytics service. This standardizes API interaction and improves consistency in request handling.
2025-12-12 20:05:26 +00:00
g
fd5440c4da Replace apiRequest with clientFetch across app
Refactored all API calls to use the new clientFetch utility instead of apiRequest in dashboard pages, modal components, and profit analytics service. This improves consistency and aligns with updated API handling patterns.
2025-12-11 19:52:43 +00:00
g
adb01009eb Handle play() and load() promises for audio elements
Updated audio playback and preloading logic to check for and handle returned promises from play() and load() methods. This prevents uncaught promise rejections in browsers where these methods may return undefined, improving reliability and error handling for notification sounds.
2025-12-09 22:17:20 +00:00
g
e10ad2835e Preload notification audio and add AudioPreloader component
Added an AudioPreloader React component to preload the /hohoho.mp3 audio file for notifications, and included it in the app layout. Also updated _document.tsx to add a preload link for the audio file. Added yt-dlp.exe binary to the repository.
2025-12-09 17:48:55 +00:00
g
54cfc62e35 Switch notification sound to hohoho.mp3 and add download script
Replaced all references to notification.mp3 with hohoho.mp3 in notification-related components and context. Added hohoho.mp3 to the public directory. Introduced a script (download-notification-sound.js) for downloading notification sounds from YouTube using @distube/ytdl-core, which was added as a devDependency. Also added yt-dlp.exe for alternative audio downloading.
2025-12-08 18:42:11 +00:00
g
e7fcfd63a2 Add Christmas theme and snow effects for December
Introduces a Christmas theme that activates in December, including themed colors, subtle background patterns, and snowflake effects on loading screens. Adds a reusable SnowLoader component and utility for December detection. Updates layout and loading components to conditionally apply decorations and styles only during December.
2025-12-08 00:47:57 +00:00
g
224342c410 Add Christmas decorations and theme styles
Introduced a ChristmasDecorations component with animated snowflakes, twinkling stars, and festive emojis. Updated global CSS and Tailwind config to include Christmas-themed animations, colors, and effects. Integrated the decorations into the main layout for a seasonal appearance.
2025-12-08 00:13:40 +00:00
g
884574ccce Add average order value to analytics chart
Enhanced the AdminAnalytics component to display average order value (AOV) alongside revenue and orders in the analytics chart. Updated data structures and chart rendering to support and visualize AOV, providing more detailed business insights.
2025-12-03 18:03:01 +00:00
g
98f14304b7 Add returning customers stat to admin users page
Introduces a new 'Returning Customers' card to the admin users dashboard, showing the count and percentage of users with more than one order. Also updates the grid layout to accommodate the new card and imports the necessary icon.
2025-12-01 13:28:04 +00:00
g
93214ce9d6 Show day of week in analytics date formatting
Updated AdminAnalytics to include the day of the week in formatted dates, improving clarity in analytics displays. Dates now appear as 'Mon, Nov 21' instead of just 'Nov 21'.
2025-11-30 20:15:32 +00:00
g
bb3dcaaca2 Improve admin analytics and user management UI
Refactored admin users page to use client-side fetching, loading states, and search functionality. Enhanced AdminAnalytics with a best month (YTD) card and removed debug logging. Improved SystemStatusCard formatting and removed console logs. Fixed profit chart period selection logic. Minor formatting fix in nav-item component.
2025-11-30 15:59:05 +00:00
g
4ef0fd1a68 Improve nav active state detection logic
Refined the active state logic in NavItem to ensure /dashboard and /dashboard/admin only match exactly, preventing sub-paths from being incorrectly marked as active.
2025-11-30 00:29:57 +00:00
g
3548cc3f2b Add loading spinner to analytics charts
Displays a loading spinner when analytics data is being fetched or refreshed, improving user feedback for orders, revenue, and vendor growth charts in the admin analytics component.
2025-11-28 19:50:30 +00:00
g
5562a88d4a Update AdminAnalytics.tsx 2025-11-28 19:49:01 +00:00
g
3f8826cbc4 Enhance admin dashboard analytics and system status
Added 'Year to Date' and 'Last Year' filters to analytics, and improved summary cards to show total revenue and orders for the selected period. Refactored SystemStatusCard to include a debug view with detailed system metrics and raw JSON response. Updated nav-item active state detection for more precision and improved navigation handling. Removed redundant recent activity card from admin status page.
2025-11-28 19:22:14 +00:00
g
4b0bd2cf8c Revamp admin dashboard analytics and UI
Refactored the admin dashboard to use tabbed navigation for analytics and management. Enhanced AdminAnalytics with Recharts visualizations, added top vendors by revenue, and improved chart tooltips. Removed unused columns from vendor table. Updated layout and notification context to exclude admin pages from dashboard-specific UI and notifications. Minor debug logging added to SystemStatusCard.
2025-11-28 19:08:40 +00:00
g
f212859bda Improve nav item click handling and sidebar menu close
Enhanced NavItem to prevent double-clicks, handle active state, and optimize mobile menu closing. Sidebar now uses a dedicated callback for closing the mobile menu, reducing unnecessary re-renders and improving user experience.
2025-11-28 18:36:54 +00:00
g
4e5fc1901c Update date-picker.tsx 2025-11-28 18:33:23 +00:00
g
b10b2f2701 Add custom date range support to profit analytics
Introduces a date range picker to the profit analytics dashboard, allowing users to select custom date ranges for profit calculations. Updates ProfitAnalyticsChart and profit-analytics-service to handle both period and date range queries, improving flexibility and user experience.
2025-11-28 18:32:38 +00:00
NotII
fcba1a853d Adjust chat UI padding for safe area insets
Updated padding calculations in ChatDetail to account for device safe area insets, improving layout on devices with notches or rounded corners. This affects both the chat scroll container and the input area at the bottom.
2025-10-28 11:07:07 +00:00
NotII
130ecac208 Add Chromebook compatibility fixes and optimizations
Implemented comprehensive Chromebook-specific fixes including viewport adjustments, enhanced touch and keyboard detection, improved scrolling and keyboard navigation hooks, and extensive CSS optimizations for better usability. Updated chat and dashboard interfaces for larger touch targets, better focus management, and responsive layouts. Added documentation in docs/CHROMEBOOK-FIXES.md and new hooks for Chromebook scroll and keyboard handling.
2025-10-26 18:29:23 +00:00
NotII
1fc29e6cbf Improve accessibility and touch support in dashboard
Enhances accessibility and usability for touch devices and Chromebooks by updating global styles, adding ARIA attributes, and optimizing component layouts. Introduces a new useIsTouchDevice hook, improves focus states, and increases viewport scalability. ChatDetail now supports better keyboard navigation and larger touch targets.
2025-10-22 17:53:30 +01:00
NotII
bfc60012cf Add admin dashboard pages and restructure admin route
Introduces new admin dashboard pages for alerts, bans, invites, orders, settings, status, and vendors under app/dashboard/admin/. Moves the main admin page to the new dashboard structure and adds a shared admin layout. Updates sidebar configuration and adds supporting components and hooks for admin features.
2025-10-18 15:19:10 +01:00
NotII
03a2e37502 Ensure stable identity for pricing tiers in forms
Adds a tempId to new pricing tiers for stable mapping before backend _id assignment. Updates mapping logic in pricing-tiers form to use tempId or _id for reliable event handling and rendering.
2025-10-16 12:12:22 +01:00