Commit Graph

429 Commits

Author SHA1 Message Date
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
28e292abb3 Add balance page and sidebar link for dashboard
Introduces a new balance page displaying cryptocurrency balances and withdrawal functionality. Updates the sidebar configuration to include a link to the balance page with a wallet icon.
2025-10-31 00:09:34 +00:00
NotII
928d94cecd Update server-api.ts 2025-10-30 23:35:21 +00:00
NotII
f0d18a9e67 Add dashboard navigation and request timeouts
Added 'Back to Dashboard' buttons to all admin dashboard pages for improved navigation. Introduced AbortSignal timeouts to API client and middleware requests to prevent hanging network calls. Also enabled messaging customers from the order details page if Telegram info is available.
2025-10-30 18:35:09 +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
NotII
577c93d62b Update page.tsx 2025-10-16 00:52:47 +01:00
NotII
7c9d83859f Update page.tsx 2025-10-16 00:43:09 +01:00
NotII
1d7b378cd3 Update middleware.ts 2025-10-16 00:41:51 +01:00
NotII
8517f4c153 Add reset password page and update VendorsCard
Introduces a new password reset page with token validation and form handling. Removes the optional email field from the Vendor interface and its display in the VendorsCard component.
2025-10-16 00:34:50 +01:00
NotII
2800f03335 Add VendorsCard to admin dashboard
Introduces a new VendorsCard component for managing vendor accounts in the admin dashboard. The card displays vendor details, allows password reset token generation, and handles loading and error states.
2025-10-16 00:29:32 +01:00
NotII
66c95fdffe Update RecentOrdersCard.tsx 2025-10-15 18:11:00 +01:00
NotII
36a8bd2bc0 Update RecentOrdersCard.tsx 2025-10-15 18:09:43 +01:00
NotII
2808ce6919 Add delete action to invitations and UI improvements
Introduces a delete button for unused invitations in InvitationsListCard, allowing admins to remove invites. Also improves layout and spacing in the invitations card, formats order totals with currency in RecentOrdersCard, and hides several unused cards in the admin page as requested.
2025-10-15 17:53:01 +01:00
NotII
e7c06e4352 Add system status and invitations cards to admin page
Introduces SystemStatusCard and InvitationsListCard components to the admin dashboard for displaying system metrics and active invitations. Refactors InviteVendorCard to generate and display invitation codes, and updates card layouts for consistent sizing. Improves admin page structure and enhances visibility of system and invitation data.
2025-10-15 17:40:54 +01:00
NotII
4fb6d3f740 Add admin dashboard and middleware protection
Introduces an admin dashboard page with cards for inviting vendors, banning users, and viewing recent orders. Adds middleware logic to restrict /admin routes to the 'admin1' user and updates route matching. Also updates git-info.json with latest commit metadata.
2025-10-15 17:17:43 +01:00
NotII
72821e586c Change tracking number addition order in shipping flow
Tracking number is now added after marking the order as shipped instead of before. This ensures the order status is updated prior to associating a tracking number.
2025-10-10 14:28:55 +01:00
NotII
d3deb58ad6 Remove shipping dialog from order details page
Replaces the shipping dialog with an inline tracking number input for marking orders as shipped. Simplifies the user flow and removes related state and dialog components.
2025-10-10 14:01:53 +01:00
NotII
864e1e9804 Improve pricing tier input handling and precision
Refactored PricingTiers component to better handle empty, null, and undefined values, prevent formatting issues, and add error handling for tier changes. Updated ProductModal to use parseFloat for price values to improve precision. Minor robustness improvements to event handling and sorting.
2025-10-09 21:05:13 +01:00
NotII
32bf9d790f Refactor pricing tiers form UI and logic
Simplifies the pricing tiers form by removing help text, card layout, and validation logic. Switches to a compact grid-based UI, adds editable total price field, and streamlines event handling for tier changes. Improves user experience and code maintainability.
2025-10-09 20:54:33 +01:00
NotII
051d33df33 Improve pricing tier validation logic
Validation now only checks for duplicate quantities when both minQuantity and pricePerUnit are set and positive. Error messages and input styling are updated to reflect more accurate validation states, and the placeholder for minQuantity is changed to 'e.g. 29'.
2025-10-09 20:49:25 +01:00
NotII
a912967fd4 Revamp pricing tiers form UI and validation
Improves the pricing tiers form with enhanced UI using Card and Label components, adds help text, and introduces validation for quantity, price, and duplicate tiers. The form now displays errors inline and sorts tiers by quantity for better usability.
2025-10-09 20:43:44 +01:00
NotII
d1f3e6b214 Bulk update category order and improve number formatting
Category order is now updated via a bulk API endpoint instead of individual requests, improving efficiency. Number formatting in pricing tiers form now avoids cursor jumping by only formatting decimals when necessary.
2025-10-02 04:17:27 +01:00
NotII
be952509a1 Improve ProductSelector response handling and UI
Enhanced the ProductSelector to robustly handle different response shapes from the products API, preventing runtime errors. Also adjusted dropdown and scroll area sizing for better UI consistency.
2025-09-23 22:41:27 +01:00
NotII
74b7aa4877 Add shipping dialog with tracking number to order page
Introduces a shipping dialog to the order details page, allowing users to optionally enter a tracking number when marking an order as shipped. Updates API client logic to better handle HTTP-only authentication cookies. Improves broadcast dialog validation and message handling.
2025-09-22 00:45:29 +01:00
NotII
8554481282 Update Dockerfile 2025-09-01 16:49:28 +01:00
NotII
5ce716d2ab Refactor docs structure and update API env config
Moved documentation files into a new docs/ directory and added a documentation index (docs/README.md). Updated the main README with improved project and documentation details. Set explicit API environment variables in Dockerfile for production. Enhanced next.config.mjs with improved API_BASE_URL handling and logging for better deployment clarity.
2025-09-01 16:48:42 +01:00
NotII
57c2fbdf50 Add CapRover deployment fix and improve env var handling
Added CAPROVER-DEPLOYMENT-FIX.md with instructions for required environment variables to prevent 500 errors. Improved validation and fallback logic for SERVER_API_URL and API_BASE_URL in server-api.ts, route.ts, and next.config.mjs to handle missing or invalid values gracefully and log warnings instead of crashing.
2025-09-01 16:31:12 +01:00
NotII
29ec1be68c Refactor API URLs and add environment config example
Replaces hardcoded production API URLs with localhost defaults for local development in both server and client code. Updates Dockerfile to require API URLs via deployment environment variables. Improves ChatTable to use a batch endpoint for chats and unread counts, with backward compatibility. Adds an env.example file to document required environment variables. Updates next.config.mjs to use environment variables for backend API rewrites and image domains.
2025-09-01 15:35:10 +01:00
NotII
3528ca45cc Update page.tsx 2025-08-31 21:28:32 +01:00
NotII
8e591a3d88 Refactor and relocate customer insights in order details
Moved the customer insights section from a separate card to the customer history area within the order details page. Simplified the display and removed unused icon imports for a cleaner UI.
2025-08-31 18:56:52 +01:00
NotII
a10b9e0094 Add customer insights to order details page
Introduces a customer insights panel on the order details page, displaying metrics such as total orders, total spent, payment success rate, and customer tenure. Removes customer insights logic and display from the order table component for a more focused and relevant presentation.
2025-08-31 18:30:54 +01:00
NotII
9cf226526f Add customer insights dashboard to order table
Introduced a CustomerInsightsDisplay component to show key metrics such as total orders, revenue, success rates, and recent activity above the order table. Updated data fetching and types to support customer insights from the API.
2025-08-30 22:53:47 +01:00
NotII
fabc8f2d71 Add pagination to Customer Insights top customers list
Implemented pagination controls and page size selection for the top customers section in CustomerInsightsChart. Updated analytics-service to support paginated customer insights API calls and handle pagination metadata. Improves usability for stores with large customer bases.
2025-08-30 21:07:00 +01:00
NotII
57502d09bc Create loaderio-4f43d28a66724ee6c044221219487237.txt 2025-08-28 16:42:33 +01:00
NotII
de268a9d77 Update package.json 2025-08-27 13:13:21 +01:00
NotII
50d0100056 Improve profit analytics chart and modal data handling
Enhanced ProfitAnalyticsChart to display more robust skeleton loaders and improved summary card logic with fallbacks for missing data. Updated the chart to distinguish between tracked and total revenue, and improved cost data coverage display. In the profit analysis modal, profit margin tiers are now sorted by minimum quantity. Updated the ProfitOverview interface to include revenueFromTrackedProducts.
2025-08-26 21:36:08 +01:00
NotII
6a2cd9aa79 Update profit-analysis-modal.tsx 2025-08-26 21:08:48 +01:00
NotII
f3fb067da7 Add profit analytics chart and service
Introduces a new ProfitAnalyticsChart component to display profit-related metrics, including total revenue, cost, profit, and top profitable products. Updates the AnalyticsDashboard to include a Profit tab and adds a profit-analytics-service for fetching profit data from the backend.
2025-08-26 21:03:05 +01:00
NotII
be746664c5 Add profit analysis modal and cost tracking for products
Introduces a Profit Analysis modal for products, allowing users to view profit, margin, and markup calculations based on cost per unit and pricing tiers. Adds cost per unit input to the product modal, updates product types, and integrates the analysis modal into the products page and product table. This enhances product management with profit tracking and analysis features.
2025-08-26 20:52:38 +01:00
NotII
4e155a378e remove comments 2025-08-23 15:35:52 +01:00
NotII
e2db2d5027 Optimize form loading and update product selection UI
Dynamically import ChatDetail, NewChatForm, and ProductSelector components with skeleton loading states for improved performance. Refine product selection logic in promotion forms to show blacklist selector only for 'all' mode and clarify labels and descriptions for better user understanding.
2025-08-08 16:14:41 +01:00
NotII
f19ddc415c eeeee 2025-08-07 23:24:51 +01:00