- Add customers table (021) and sales/sale_items tables (022) migrations
- Add customer CRUD, sale CRUD (transactional with auto inventory decrement/restore),
and analytics API endpoints (overview, top sellers, revenue chart, inventory alerts)
- Add sales page with NewSaleModal (customer autocomplete, multi-item form,
color-based pricing, stock validation) and SaleDetailModal
- Add customers page with search, inline editing, and purchase history
- Add analytics dashboard with recharts (revenue line chart, top sellers bar,
refill vs spulna pie chart, inventory alerts table with stockout estimates)
- Add customerService, saleService, analyticsService to frontend API layer
- Update sidebar navigation on all admin pages
- Dashboard now accessible at /dashboard instead of /upadaj/dashboard
- Updated all navigation links to use new /dashboard route
- Login page still at /upadaj, redirects to /dashboard on success
- Colors and requests remain under /upadaj prefix
- Updated test files to reference new dashboard path
- Fix FilamentForm to preserve prices when updating quantities
- Add isInitialLoad flag to prevent price override on form load
- Only update prices when color is actively changed, not on initial render
- Add bulk filament price editor to dashboard
- Filter by material and finish
- Set refill and/or spool prices for multiple filaments
- Preview changes before applying
- Update all filtered filaments at once
- Add bulk color price editor to colors page
- Edit prices for all colors in one interface
- Global price application with search filtering
- Individual price editing with change tracking
- Add auto-kill script for dev server
- Kill existing processes on ports 3000/3001 before starting
- Prevent "port already in use" errors
- Clean start every time npm run dev is executed
- Replace router.push with window.location.href for reliable redirects
- Fix auth check to wait for component mount before accessing localStorage
- Ensure proper redirect after successful login
- Fix redirect behavior on all admin pages (dashboard, colors, requests)
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>
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>
- 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