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>
This commit is contained in:
@@ -21,14 +21,17 @@ describe('UI Features Tests', () => {
|
||||
expect(tableContent).toContain('color.hex');
|
||||
});
|
||||
|
||||
it('should have checkboxes for boolean fields', () => {
|
||||
it('should have number inputs for quantity fields', () => {
|
||||
const adminDashboardPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
||||
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||
|
||||
// Check for checkbox inputs
|
||||
expect(adminContent).toMatch(/type="checkbox"[\s\S]*?name="refill"/);
|
||||
expect(adminContent).toMatch(/type="checkbox"[\s\S]*?name="vakum"/);
|
||||
expect(adminContent).toMatch(/type="checkbox"[\s\S]*?name="otvoreno"/);
|
||||
// Check for number inputs for quantities
|
||||
expect(adminContent).toMatch(/type="number"[\s\S]*?name="refill"/);
|
||||
expect(adminContent).toMatch(/type="number"[\s\S]*?name="vakum"/);
|
||||
expect(adminContent).toMatch(/type="number"[\s\S]*?name="otvoreno"/);
|
||||
expect(adminContent).toContain('Refill količina');
|
||||
expect(adminContent).toContain('Vakuum količina');
|
||||
expect(adminContent).toContain('Otvoreno količina');
|
||||
});
|
||||
|
||||
it('should have number input for quantity', () => {
|
||||
|
||||
Reference in New Issue
Block a user