Commit Graph

212 Commits

Author SHA1 Message Date
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
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
785509fed9 Refactor admin ban page to use API and improve UX
Replaced mock data in the admin ban page with real API calls for fetching, banning, and unbanning users. Improved form validation, loading states, and search functionality. Updated banned users table to show live data and added confirmation dialogs for ban/unban actions. Enhanced user status display in the admin users page with tooltips for blocked reasons.
2025-11-28 20:14:17 +00:00
g
1001911691 Add Telegram Users admin page and sidebar link
Introduces a new admin page for managing Telegram users, displaying user statistics and allowing user actions. Updates the admin sidebar to include a link to the new Telegram Users page. Also updates git-info.json with the latest build metadata.
2025-11-28 20:04:57 +00:00
g
e8670ba763 Remove admin alerts and settings pages
Deleted the admin alerts and settings pages and removed their links and icons from the admin sidebar configuration. This streamlines the admin dashboard by eliminating unused or deprecated sections.
2025-11-28 19:49:10 +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
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
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
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
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
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
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
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
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
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
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
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
NotII
3cef1076d0 Add promotion details and modal to orders and promotions
Introduces promotion-related fields to the Order interface and displays promotion discounts in both the order details and order table. Adds a PromotionDetailsModal component for viewing detailed promotion analytics and eligibility, and integrates it into the PromotionsList with a new 'view details' action.
2025-08-07 17:16:49 +01:00
NotII
2c48ecd2b4 Add product applicability controls to promotion forms
Introduces product selection and exclusion controls to both new and edit promotion forms, allowing promotions to target all, specific, or all-but-specific products. Adds a reusable ProductSelector component, updates promotion types to support new fields, and adjusts cookie max-age for authentication. Also adds two new business quotes.
2025-08-07 16:05:31 +01:00
NotII
db1ebcb19d Refactor KeepOnline logic and add useKeepOnline hook
Moved dashboard path check from KeepOnline to a new KeepOnlineWrapper component for cleaner separation of concerns. Introduced a reusable useKeepOnline hook to encapsulate the online status update logic. Updated layout to use KeepOnlineWrapper and simplified KeepOnline. Minor cleanup in broadcast-dialog.tsx.
2025-08-01 15:27:52 +01:00
NotII
1b51f29c24 Add flexible date pickers and export options to stock dashboard
Introduces a reusable date picker component with support for single date, date range, and month selection. Updates the stock management page to allow exporting reports by daily, weekly, monthly, or custom date ranges using the new pickers. Refactors promotion form to use the new date picker for start and end dates. Adds more business quotes to the quotes config.
2025-07-30 00:38:25 +02:00
NotII
48cfd45fb1 Add notification context and privacy toggle for analytics
Introduces a NotificationProvider context to centralize notification logic and state, refactoring UnifiedNotifications to use this context. Adds a privacy toggle to AnalyticsDashboard and RevenueChart to allow hiding sensitive numbers. Updates layout to wrap the app with NotificationProvider.
2025-07-28 22:50:55 +02:00
NotII
f1e7583219 Add paidAt field and display to order details and table
Introduces the optional 'paidAt' field to the Order interface and updates both the order details page and the order table to display the payment date. Also adds sorting by 'paidAt' in the order table and improves date formatting for both order and payment dates.
2025-07-26 22:32:47 +02:00
NotII
639277dc2b Update page.tsx 2025-07-26 21:36:12 +02:00
NotII
0e99952b72 Update page.tsx 2025-07-26 15:10:35 +02:00
NotII
707f7e359f Update page.tsx 2025-07-25 20:56:22 +01:00
NotII
cb1335b8fd ficks 2025-07-22 02:40:36 +01:00
NotII
b329c8422d oh 2025-07-20 23:34:42 +01:00
NotII
0fa33df2ad hmm 2025-07-17 16:07:07 +01:00
NotII
57e130a247 i need a shit 2025-07-17 11:06:58 +01:00
NotII
18e87721e2 fix 2025-07-01 01:49:49 +01:00
NotII
401873b8bb fix up 2025-06-30 18:38:51 +01:00
NotII
ad108298a6 Update loading.tsx 2025-06-30 13:52:58 +01:00
NotII
236a676ac5 holy fkn airball 2025-06-29 04:13:50 +01:00
NotII
e9b943a00a Create loading.tsx 2025-06-29 03:10:54 +01:00