Commit Graph

81 Commits

Author SHA1 Message Date
hossein taromi ce622057d4 Merge branch 'main' of https://github.com/mazane-front/backoffice 2025-09-20 11:30:25 +03:30
hossein taromi cc12101dbe feat(discount-codes): update DiscountCodeFormPage to include formatted number handling 2025-09-20 11:29:42 +03:30
hosseintaromi e52ea39e60 feat(shipping-methods): add full CRUD scaffolding (list + form), API routes, query keys and React Query hooks; improve dropdown selected contrast; numeric inputs with thousand separators and no default zeros 2025-09-01 01:21:29 +03:30
hossein taromi 9544517fc9 feat(users-admin): implement user management features including list, detail, and form pages 2025-08-31 11:48:14 +03:30
hossein taromi 014b3d3f48 feat(discount-codes): enhance discount code form with accessibility attributes and data-testid 2025-08-31 10:33:39 +03:30
hossein taromi d216a886d0 feat(orders): implement orders pages, update routes, and add order-related API constants 2025-08-30 17:38:19 +03:30
hossein taromi d8b6f2a54f feat(discount-codes): add discount codes pages, routes, and API constants 2025-08-30 17:17:04 +03:30
hossein taromi 8b685c8668 refactor uploader 2025-08-12 13:48:49 +03:30
hossein taromi 9bf5d63d1b feat(products-list): add pagination to products list and update filter handling 2025-08-11 13:55:41 +03:30
hossein taromi e601a2cc5a feat(product-options): add image preview and delete functionality in ProductOptionFormPage 2025-08-11 13:37:59 +03:30
hossein taromi 88ee42e434 feat(products): fix image preview by using public file URL and normalizing edit data 2025-08-11 12:53:05 +03:30
hosseintaromi 2915f4ea10 feat: enhance HeroSliderPage with image preview and improved file handling 2025-08-09 17:31:25 +03:30
hosseintaromi 93b116673e fix: update image handling in ProductOptionFormPage to store file URL instead of internal ID 2025-08-02 21:03:47 +03:30
hosseintaromi 025d9de1d7 feat: add landing hero page and related routes in App, Sidebar, and API constants 2025-08-01 20:06:31 +03:30
hosseintaromi d10b52924c fix: update product variant model to include variant_attribute_name and remove product_option_id 2025-08-01 14:38:46 +03:30
hosseintaromi f63dd99e89 fix: بهبود منطق بارگذاری و استخراج نام ویژگی variant
- اصلاح تبدیل variant images از API response
- افزودن منطق استخراج نام ویژگی از variant_attributes
- بهبود fallback برای نمایش صحیح تصاویر variant در حالت ویرایش
- رفع مشکل خالی بودن فیلد نام ویژگی Variant
2025-08-01 14:38:27 +03:30
hosseintaromi 5bf157219e fix: رفع مشکلات نمایش جزئیات محصول
- اصلاح نمایش دسته‌بندی‌ها با fallback به product_categories
- رفع خطای React hooks order با جابجایی useState
- حل مشکلات TypeScript و نمایش صحیح تمام اطلاعات محصول
2025-08-01 14:38:16 +03:30
hosseintaromi 25429f9745 fix: نمایش صحیح تصاویر هنگام ویرایش variant
- اصلاح منطق بارگذاری تصاویر variant در حالت ویرایش
- افزودن fallback به فیلد files در صورت خالی بودن file_ids
- رفع مشکل نمایش فقط یک تصویر از چندین تصویر آپلود شده
2025-08-01 14:38:04 +03:30
hossein taromi afab715b56 feat: add image preview functionality and improve product detail layout in ProductDetailPage 2025-07-30 17:18:22 +03:30
hossein taromi a851fc4a50 refactor: streamline image and variant handling in ProductDetailPage and ProductsListPage 2025-07-30 17:11:07 +03:30
hossein taromi b97f72aeae fix: improve file_ids handling in VariantManager and ProductFormPage 2025-07-30 14:23:37 +03:30
hossein taromi a228605ba0 refactor: replace images with file_ids in product management components 2025-07-30 14:10:28 +03:30
hosseintaromi 4f4ef51ccc feat: enhance input handling and product management features
- Added numeric input handling in Input component with Persian to English conversion
- Updated MultiSelectAutocomplete styles for dark mode compatibility
- Enhanced VariantManager to support product options and improved variant data handling
- Updated ProductDetailPage and ProductFormPage to display and manage product options
- Improved ProductsListPage to handle numeric filters with Persian number conversion
2025-07-30 08:29:19 +03:30
hosseintaromi e00eb4a160 chore: add dist folder to .gitignore
- Remove dist/ from version control
- Build artifacts should not be tracked in repository
- Developers can generate fresh builds locally
2025-07-29 09:59:52 +03:30
hosseintaromi a6e59b7c85 perf: optimize bundle size with code splitting and lazy loading
Bundle Size Optimization:
- Add lazy loading for all page components
- Implement Suspense wrapper with loading fallbacks
- Configure manual chunks for vendor libraries
- Separate chart library (recharts) into vendor-charts chunk

Results:
- Split single 950KB bundle into multiple optimized chunks
- Main vendor chunks: React (162KB), Forms (65KB), Charts (402KB)
- Each page loads independently with lazy loading
- Improved initial load time and caching efficiency
- Install terser for better minification

Chunks created:
- vendor-react: React dependencies
- vendor-forms: Form validation libraries
- vendor-query: React Query
- vendor-toast: Toast notifications
- vendor-charts: Chart library (lazy loaded)

This resolves the bundle size warning and improves performance
2025-07-29 09:58:41 +03:30
hosseintaromi 4a0507c09c feat: add AdminUserDetailPage for detailed admin user view
- Implemented AdminUserDetailPage to display user information
- Added loading and error handling states
- Included user roles and permissions display
- Integrated date formatting and status badge components
2025-07-29 09:51:46 +03:30
hosseintaromi 91c2333fb9 build: update production build files
- Update compiled assets after TypeScript error fixes
- Clean and optimized build ready for production
2025-07-29 09:50:26 +03:30
hosseintaromi b287eaa320 chore: update remaining configuration files
- Update routes configuration
- Update roles module hooks, models, and requests
- Ensure all modified files are properly committed
2025-07-29 09:50:23 +03:30
hosseintaromi 0082da5928 fix: resolve remaining TypeScript errors
- Fix toast context usage in CategoryFormPage
- Add null checks for optional properties (product.price, product.status)
- Fix undefined checks for product_id parameters
- Add type assertion for PRODUCT_TYPE_LABELS indexing
- Fix number/string type conversions in ProductFilters
- Add proper type handling for form validation

All TypeScript compilation errors are now resolved
2025-07-29 09:50:08 +03:30
hosseintaromi e0156658a2 fix: update component interfaces and props
Input Component:
- Add icon prop to support icon display

Typography Component:
- Add actions prop to FormHeader for flexible action buttons

Modal Usage:
- Add required title prop to Modal components in Users pages

UserForm Component:
- Add missing props: initialData, onCancel, loading, isEdit
- Support both defaultValues and initialData patterns

These changes resolve TS2741 and TS2322 type errors
2025-07-29 09:49:58 +03:30
hosseintaromi 57287c866c feat: update type definitions and models
Product Model:
- Add sku, price, status, category properties
- Add status to ProductFilters interface

Category Model:
- Add parent_id property for hierarchical categories

ProductOption Model:
- Add name property for better identification

These changes resolve TS2339 property errors throughout the application
2025-07-29 09:49:48 +03:30
hosseintaromi 81d9f0fdd2 config: disable unused variables warnings in tsconfig
- Set noUnusedLocals to false
- Set noUnusedParameters to false
- Prevent TypeScript from flagging unused variables as errors
2025-07-29 09:49:38 +03:30
hosseintaromi 83a400687e fix: remove unused imports to resolve TS6133 errors
- Remove unused React imports from components
- Remove unused icon imports (User, Mail, Phone, Search, etc.)
- Remove unused component imports (Button, LoadingSpinner, etc.)
- Remove unused type imports (LoginRequest)
- Clean up import statements across all pages and components
2025-07-29 09:49:27 +03:30
hossein taromi 88958ee63a feat: add remaining UI improvements and new features
- Add cypress test configuration and e2e tests
- Update various components styling and functionality
- Add product detail page and other new features
- General codebase improvements and fixes
2025-07-28 13:22:44 +03:30
hossein taromi c2f938bda8 fix: improve category form functionality
- Fix loading button state in category form (use Button loading prop instead of manual spinner)
- Fix redirect after successful category create/update (move navigation to mutation callbacks)
- Remove duplicate toast messages
- Ensure proper navigation only after successful API calls
2025-07-28 13:22:30 +03:30
hossein taromi e9473f7a49 fix: resolve roles management issues
- Fix missing icon imports in RoleDetailPage (Edit, Calendar, FileText)
- Fix role title display in roles list (change from role.name to role.title)
- Fix role data fetching with proper API response structure
- Add RoleResponse interface for better API handling
- Improve error handling in getRole function
2025-07-28 13:22:15 +03:30
hossein taromi e436bc546b fix: improve select components styling and readability
- Fix selected option colors in MultiSelectAutocomplete and TagInput
- Use gray colors for better contrast and readability
- Add proper dark mode support for selected items
- Fix unreadable text in selected options
2025-07-28 13:21:59 +03:30
hosseintaromi b3c3a8afd0 fix(product-options): update API routes and enhance product option models 2025-07-28 09:11:08 +03:30
hossein taromi 58ecd2e94a chore: update swagger configuration 2025-07-27 14:46:37 +03:30
hossein taromi 09c008396e docs: add comprehensive API field mapping documentation
- Document exact mapping between form fields and API structure
- Include complete examples of product and variant data
- Detail product types and their use cases
- List UI-specific fields vs API fields
- Provide migration notes for removed fields
- Include file change summary and implementation details
2025-07-27 14:46:25 +03:30
hossein taromi 8c896c1855 feat(navigation): integrate product management into app navigation
- Add product management section to sidebar with nested menu items
- Include routes for products, categories, and product-options
- Update API routes constants with all new endpoints
- Add corresponding query keys for React Query caching
- Organize navigation with proper icons and hierarchy
2025-07-27 14:46:11 +03:30
hossein taromi 87213732a2 feat(products): implement comprehensive product management system
- Add complete product models matching API structure exactly
- Implement products list page with advanced filtering and search
- Add comprehensive product form with all API fields:
  * Basic info (name, description, design_style, type, enabled)
  * Multi-category selection with search
  * Product options integration
  * Custom attributes management
  * Image upload with preview
  * Variants management with full specification
- Include PRODUCT_TYPES constants and labels
- Support for simple, variable, grouped and external products
2025-07-27 14:45:57 +03:30
hossein taromi 5dbe901ac7 feat(categories): implement product categories management system
- Add categories models, requests and hooks with full CRUD support
- Implement categories list page with search, filtering and pagination
- Add category form page for creating and editing categories
- Include responsive design for mobile and desktop views
- Add real-time preview and validation for better user experience
2025-07-27 14:45:43 +03:30
hossein taromi b17c8bb408 feat(product-options): implement product options management system
- Add product options models, requests and hooks
- Implement product options list page with search and CRUD operations
- Add product option form page with TagInput for values management
- Include real-time preview and help sections for better UX
- Support for color, size, material and other product variations
2025-07-27 14:45:31 +03:30
hossein taromi 6bcdf72512 feat(ui): add reusable UI components for product management
- Add MultiSelectAutocomplete for multi-selection with search
- Add TagInput for managing array of string values
- Add FileUploader with drag & drop and progress tracking
- Add VariantManager for comprehensive product variant management
- Add useFileUpload hooks for file upload/delete operations
2025-07-27 14:45:17 +03:30
hossein taromi dce0f918ef feat(admin-users): enhance admin user management with permissions and roles
- Add permissions and roles multi-select to admin user form
- Update admin user models to include permissions and roles arrays
- Make permissions list page read-only by removing CRUD actions
- Integrate MultiSelectAutocomplete for better UX
2025-07-27 14:45:01 +03:30
hosseintaromi 2e9fa5460e admin-users: add skeleton loading component and improve error handling 2025-07-22 09:02:00 +03:30
hosseintaromi 5862bd97a1 ui: update navigation and routing
- Add routes for admin users, roles, and permissions management
- Update sidebar with System Management section
- Remove undeveloped menu items for cleaner demo
- Add proper route protection and loading states
- Export new permission management types
2025-07-22 08:48:52 +03:30
hosseintaromi 30969723fa permissions: implement complete permissions management
- Add permissions CRUD operations (list, create, edit, delete)
- Implement proper API request/response handling
- Create hooks and request functions following established pattern
- Add TypeScript interfaces and form validation
- Include proper error handling and user feedback
2025-07-22 08:48:44 +03:30
hosseintaromi 3f4aefb112 admin-users: implement complete admin users management
- Add admin users CRUD operations (list, create, edit, delete)
- Implement proper API response structure handling (admin_user vs user)
- Add form validation with conditional password requirement (optional in edit mode)
- Create reusable hooks and request functions following established pattern
- Add TypeScript interfaces and proper error handling
- Include debug logging for API responses
2025-07-22 08:48:36 +03:30