feat: group thousands in inventory item price input

Show the قیمت (تومان) field with thousand separators as the user types
(e.g. 1200000 → 1,200,000). Stored value stays digit-only, so the
Toman→Rial conversion on submit is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-15 14:09:49 +03:30
co-authored by Claude Opus 4.8
parent 7ea2cb4ab2
commit defa0db023
2 changed files with 8 additions and 1 deletions
@@ -62,6 +62,11 @@ describe('InventoryPage', () => {
expect(await screen.findByText('افزودن کالای جدید')).toBeInTheDocument();
// the source's distinctive "هشدار اتمام" field is present
expect(screen.getByText('هشدار اتمام')).toBeInTheDocument();
// price input groups thousands as the user types
const price = screen.getByPlaceholderText('قیمت') as HTMLInputElement;
fireEvent.change(price, { target: { value: '1200000' } });
expect(price.value).toBe('1,200,000');
});
it('switches to the packages tab and lists a package with its price', async () => {