Add a PocketBase migration and store snapshot_items on purchase order creation so POs keep item details even if stock items change or are deleted. Wire snapshot_items through the UI: PurchaseOrders list prefers snapshot data when present; EditPurchaseOrderDialog supports snapshot fallback, SKU, entryMode (stock/manual), add/remove rows, and updates stock item GBP prices for stock-mode items. BookOutForm now deducts stock quantities on booking out and surfaces precise errors. Minor UI and behavior tweaks: low-stock report filters only actual stock items, columns typing includes snapshotItems, and edit action/menu is always available with an Edit dialog integrated into the PurchaseOrders page.
Apply broad UI and UX polish across the app: replace hardcoded color classes with theme tokens (background/foreground), improve card hover/spacing, and standardize form/button styles and responsive wrappers. Enhance charts with custom tooltips, gradients, empty state, legend styling, and improved axes/cursor behavior. Tidy table and data-grid styles (compact spacing, hover states, nowrap), add status badges, and wire DataTable/Customer table meta to support onDelete actions. Fix PurchaseOrder PDF generation by wrapping creation in try/catch and adjust dialog sizing; other form fixes include replacing useFieldArray update calls with form.setValue in BookOutForm. Add Playwright page snapshots and multiple PNG assets (visuals/screenshots) for testing/documentation.
Introduce a Quotes area and add comprehensive attachment support for Purchase Orders. Adds new Quote components/pages (QuoteColumns, QuoteDataTable, Quotes page) and registers the /quotes route and sidebar link. Implements AttachmentUpload and AttachmentList components, an AttachmentDialog and integrates attachments into PurchaseOrderForm and EditPurchaseOrderDialog (files uploaded to PocketBase, attachments auto-set status to "Ordered"). Enhances PO form to support manual item entry (creates stock items on-the-fly), improves PDF generation (returns blob, supports regenerate+save), and provides attachment management in the PO data table. Also includes UI/truncation fixes, stock search popover sizing, new screenshots, and several skill/metadata files.
Add new LowStockReport component with data fetching and table display functionality. Includes threshold filtering and refresh capability. Update Reports page to include the new low stock section and modify the description text.
- Implement EditPurchaseOrderDialog for modifying existing orders
- Enhance form validation with better number handling and error messages
- Add subtotal calculation to purchase order forms
- Improve PDF generation with logo support and better layout
- Update column definitions to include edit action
- Add className prop to StockItemSearch for better styling control
Updated BookOutForm, StockItemCombobox, PurchaseOrderForm, and StockItemSearch to use stock item IDs instead of names for selection and form state management. Improved search robustness and matching logic, normalized cost price values, and enhanced field array updates for better React Hook Form integration. Added a dialog description to the purchase order modal for improved user guidance.
Introduces a new 'cost_price_gbp' field to the stock items schema and database migration. Updates stock item forms to support both ZAR and GBP cost prices. Purchase order forms and PDF generation now use GBP pricing, with enhanced supplier and order metadata. Adds a searchable stock item selector for purchase orders and improves type definitions and UI labels for clarity.
Replaced usage of getList with getFullList for fetching records in BookOutForm, PurchaseOrderForm, AddItemForm, and EditItemForm. This change simplifies data retrieval and ensures all records are fetched without pagination.
Updated PurchaseOrderForm to use useFieldArray for managing items, simplifying add/remove logic and improving reactivity. Adjusted stock columns to conditionally render cells based on screen size for better responsive design, and fixed currency code casing in sellingPrice column.
- Introduced `generate-icons.mjs` script to automate the creation of PWA icons and favicons from the provided SVG logo.
- Generated icons include:
- PWA icons: 192x192 and 512x512
- Maskable icon with 12% padding: 512x512
- Favicons: 32x32, 16x16
- Apple-touch icon: 180x180
- Added a new PNG file for the maskable icon.