Commit Graph

14 Commits

Author SHA1 Message Date
DaX
0df9d5d294 Add sale management feature for admin panel
- Add database migration for sale fields (percentage, active, dates)
- Update API to handle sale operations and bulk updates
- Create SaleManager component for admin interface
- Update FilamentTableV2 to display sale prices on frontend
- Add sale column in admin dashboard
- Implement sale price calculations with strikethrough styling
2025-07-05 14:48:31 +02:00
DaX
c0682e1969 Improve mobile responsiveness and add scroll-to-top functionality
- Fix header layout to stack vertically on mobile and prevent text overflow
- Reduce table padding on mobile screens for better space utilization
- Make color swatches and text smaller on mobile devices
- Hide bullet separator on mobile for cleaner layout
- Add scroll-to-top when editing or adding filaments in admin
- Ensure all UI elements fit properly on iPhone screens
2025-06-30 23:42:58 +02:00
DaX
3bd907eaf2 Add admin sorting options and prevent zero quantity filament creation
- Add sorting dropdown with Serbian labels (alphabetical, date-based, quantity)
- Fix Safari dropdown styling with custom-select class
- Add validation to prevent adding filaments with 0 quantity
- Improve sort dropdown layout and error handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: DaX <noreply@anthropic.com>
2025-06-30 23:29:25 +02:00
DaX
a2ec640ecc Add Matomo analytics tracking with Suspense fix
- Created MatomoAnalytics component with page view and event tracking
- Fixed Next.js build issue by wrapping useSearchParams in Suspense
- Added tracking for user interactions:
  - Search functionality
  - Table sorting
  - Filter changes (material, finish, color)
  - Dark mode toggles
  - Admin login success/failure
  - Admin filament create/update actions
- Updated Amplify environment variables via AWS CLI
- Analytics URL: https://analytics.demirix.dev (Site ID: 7)
- Only loads when environment variables are set

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-30 23:01:01 +02:00
DaX
12e91d4c3e Remove refresh icon and fix Safari/WebKit runtime errors
- Removed manual refresh button from frontend (kept auto-refresh functionality)
- Fixed WebKit 'object cannot be found' error by replacing absolute positioning with flexbox
- Added lazy loading to images to prevent preload warnings
- Cleaned up unused imports and variables:
  - Removed unused useRef import
  - Removed unused colors state variable and colorService
  - Removed unused ColorSwatch import from FilamentTableV2
  - Removed unused getModifierIcon function from MaterialBadge
- Updated tests to match current implementation
- Improved layout stability for better cross-browser compatibility
- Removed temporary migration scripts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-30 22:37:30 +02:00
DaX
5babb9e062 test: Add comprehensive tests with automatic cleanup
- Add API integration tests with proper cleanup
- Add color management tests that clean up test data
- Add data consistency tests for admin/db/frontend sync
- Fix all tests to pass (35/35 tests passing)
- Set up pre-commit hook to run tests before commit
- Clean up temporary scripts and terraform state files
- Update .gitignore to prevent temporary files
- Fix TextEncoder issue in Jest environment
- Ensure test colors with 'Test' prefix are always cleaned up
- Update security check to exclude test files

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 20:07:21 +02:00
DaX
06025623ff Update quantity field to show sum of all inventory types
- Remove "količina" from Refill, Vakuum, and Otvoreno labels
- Move Količina field to end of form as "Ukupna količina" (Total quantity)
- Make Količina field read-only and calculate sum of all inventory types
- Update form submission to calculate total quantity automatically
- Update tests to reflect new label changes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: DaX <noreply@anthropic.com>
2025-06-27 01:42:11 +02:00
DaX
fa59df4c3d Implement quantity-based inventory tracking
- Replace checkboxes with quantity inputs for refill, vakuum, and otvoreno
- Display actual quantities in admin table instead of checkmarks
- Auto-parse existing data formats (e.g., "3 vakuum", "Da") to numbers
- Maintain backwards compatibility with existing data
- Update price auto-fill logic to work with quantity values
- Update tests to reflect new quantity inputs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: DaX <noreply@anthropic.com>
2025-06-27 01:40:18 +02:00
DaX
e8f9a6c6e3 Remove brand functionality and update Bambu Lab colors
- Remove brand field from entire codebase (frontend, backend, database)
- Update Bambu Lab colors to official list with correct hex values
- Clean up unused code and type definitions
- Add database migration to drop brand column
- Update search and filters to exclude brand references
- Ensure data persistence across all application layers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: DaX <noreply@anthropic.com>
2025-06-23 22:54:47 +02:00
DaX
808ca077fa Major frontend and admin improvements
Frontend changes:
- Removed brand filter and column from table
- Removed inventory summary grid
- Removed stanje (state) and težina (weight) columns
- Reorganized filters: Material → Finish → Color
- Updated EnhancedFilters component with new filter structure
- Removed legend section for storage conditions

Admin dashboard changes:
- Removed sidebar navigation (Boje option)
- Made dashboard full screen
- Removed brand column from table
- Removed brand field from add/edit form
- Updated all boolean columns to use checkmark/X icons
- Made color tiles 40% bigger
- Added sortable columns functionality
- Auto-fill price: 3499 for refill, 3999 for regular

Other improvements:
- Added BackToTop button component on all pages
- Fixed Next.js dialog backdrop CSS error
- Updated tests to match new UI structure
- Removed obsolete FilamentTable.tsx component
- Ensured proper synchronization between admin and frontend

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 22:27:43 +02:00
DaX
791195eba1 Fix color synchronization between admin panel and frontend
Fixed field name mismatch causing colors to display incorrectly:
- Frontend uses 'bojaHex' while backend expects 'boja_hex'
- Added bidirectional field transformation in API service layer
- Ensures hex color codes are properly saved and retrieved
- Also prevents editing of Bambu Lab predefined color hex codes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 21:45:20 +02:00
DaX
1eec8c8b4a Add Bambu Lab predefined colors and finishes
- Parse Bambu Lab PDF to extract all official colors and finishes
- Add 77 predefined Bambu Lab colors with accurate hex codes
- Update finish dropdown to show only Bambu Lab finishes
- Make color selection dynamic based on brand and finish
- Show Bambu Lab colors only when BambuLab brand is selected
- Auto-fill hex codes for Bambu Lab colors
- Allow custom colors for other brands
- Add database migrations for finish types and colors
- Import all Bambu Lab colors to database
2025-06-23 19:33:15 +02:00
DaX
82c476430f Fix API connectivity and import filament data from PDF
- Update all environment files to use new PostgreSQL API endpoint
- Fix CORS configuration in API server
- Import 35 filaments and 29 colors from PDF data
- Fix TypeScript type error in dashboard
- Add back emoji icons for dark mode toggle
- Remove debugging code and test buttons
- Clean up error handling
2025-06-20 15:40:40 +02:00
DaX
62a4891112 Remove decorative icons and update CORS configuration 2025-06-20 13:05:36 +02:00