Commit Graph

406 Commits

Author SHA1 Message Date
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
NotII
dad54c4df3 Update PromotionDetailsModal.tsx 2025-08-07 17:31:48 +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
5b78e4f86c Improve broadcast dialog and product selector UI
Enhanced the broadcast dialog with better product selection UX, including a 'Done' button and improved selected products display. Updated the product selector to show more concise product descriptions, adjusted scroll area height, and improved price styling for clarity.
2025-07-30 16:05:46 +02:00
NotII
4d1c37de92 hmm 2025-07-30 12:25:46 +02: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
2452a3c5f6 Sort pricing tiers by minQuantity in UI
Pricing tiers are now displayed sorted by minQuantity, improving clarity for users. Event handlers are updated to use the original index to ensure correct tier manipulation after sorting.
2025-07-27 00:24:57 +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
0617ea5289 clean up 2025-07-17 16:28:59 +01:00
NotII
d30a966442 weewoo 2025-07-17 16:24:23 +01:00
NotII
bd3f29ae4b Update products.ts 2025-07-17 16:11:49 +01:00
NotII
0fa33df2ad hmm 2025-07-17 16:07:07 +01:00
NotII
e65d6d3fee Bump version
Bump version
2025-07-17 11:35:34 +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
20ae136e37 Create ANALYTICS.md 2025-06-30 18:38:55 +01:00