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>
This commit is contained in:
@@ -13,12 +13,12 @@ describe('UI Features Tests', () => {
|
||||
});
|
||||
|
||||
it('should display color hex in frontend table', () => {
|
||||
const filamentTablePath = join(process.cwd(), 'src', 'components', 'FilamentTable.tsx');
|
||||
const filamentTablePath = join(process.cwd(), 'src', 'components', 'FilamentTableV2.tsx');
|
||||
const tableContent = readFileSync(filamentTablePath, 'utf-8');
|
||||
|
||||
// Check for color hex display
|
||||
expect(tableContent).toContain('filament.bojaHex');
|
||||
expect(tableContent).toContain('backgroundColor: filament.bojaHex');
|
||||
// Check for color display
|
||||
expect(tableContent).toContain('ColorSwatch');
|
||||
expect(tableContent).toContain('color.hex');
|
||||
});
|
||||
|
||||
it('should have checkboxes for boolean fields', () => {
|
||||
@@ -41,28 +41,25 @@ describe('UI Features Tests', () => {
|
||||
expect(adminContent).toContain('step="1"');
|
||||
});
|
||||
|
||||
it('should have predefined brand options', () => {
|
||||
it('should have predefined material options', () => {
|
||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
||||
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||
|
||||
// Check for brand select dropdown
|
||||
expect(adminContent).toContain('<option value="Bambu Lab">Bambu Lab</option>');
|
||||
expect(adminContent).toContain('<option value="PolyMaker">PolyMaker</option>');
|
||||
expect(adminContent).toContain('<option value="Prusament">Prusament</option>');
|
||||
// Check for material select dropdown
|
||||
expect(adminContent).toContain('<option value="PLA">PLA</option>');
|
||||
expect(adminContent).toContain('<option value="PETG">PETG</option>');
|
||||
expect(adminContent).toContain('<option value="ABS">ABS</option>');
|
||||
});
|
||||
|
||||
it('should have sidebar navigation in admin', () => {
|
||||
it('should have admin header with navigation', () => {
|
||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
||||
const colorsPagePath = join(process.cwd(), 'app', 'upadaj', 'colors', 'page.tsx');
|
||||
|
||||
const dashboardContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||
const colorsContent = readFileSync(colorsPagePath, 'utf-8');
|
||||
|
||||
// Check for sidebar
|
||||
expect(dashboardContent).toContain('href="/upadaj/dashboard"');
|
||||
expect(dashboardContent).toContain('href="/upadaj/colors"');
|
||||
expect(colorsContent).toContain('href="/upadaj/dashboard"');
|
||||
expect(colorsContent).toContain('href="/upadaj/colors"');
|
||||
// Check for admin header
|
||||
expect(dashboardContent).toContain('Admin Dashboard');
|
||||
expect(dashboardContent).toContain('Nazad na sajt');
|
||||
expect(dashboardContent).toContain('Odjava');
|
||||
});
|
||||
|
||||
it('should have Safari-specific select styling', () => {
|
||||
|
||||
Reference in New Issue
Block a user