Commit graph

162 commits

Author SHA1 Message Date
SJCoetz
d4be480ecb Add PO snapshot_items and edit/order handling
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.
2026-05-24 00:11:37 +02:00
SJCoetz
6db980b4ca UI: style polish, charts, tables, forms, PDF fix
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.
2026-05-16 00:07:52 +02:00
SJCoetz
7196449e19 Add quotes feature and PO attachments
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.
2026-05-15 07:11:07 +02:00
davidels1
05c8981513 feat(reports): add low stock report component and integration
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.
2026-01-14 09:04:38 +02:00
davidels1
315a9c7759 feat(purchase-orders): add edit functionality and improve form validation
- 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
2026-01-14 09:01:49 +02:00
davidels1
e304a0a283 Merge branch 'main' of https://github.com/CyberTechDroid/JEI_STOCK_APP 2026-01-13 10:28:27 +02:00
davidels1
c253820bbc ci(vite): add allowedHosts to preview config
Configure preview server to only allow requests from jeistock.apphub.co.za domain
2026-01-13 10:28:14 +02:00
davidels1
a638ac31f0 Update nixpacks.json 2025-12-29 14:15:05 +02:00
davidels1
9f50719bef Create nixpacks.json 2025-12-29 14:12:29 +02:00
davidels1
6f12859c71 Refactor item selection to use stock item IDs
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.
2025-11-24 11:33:12 +02:00
davidels1
f7b46986c5 Add GBP cost price to stock and purchase orders
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.
2025-11-05 14:55:42 +02:00
davidels1
1030dad876 Refactor data fetching to use getFullList in forms
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.
2025-09-29 09:17:39 +02:00
davidels1
75bb145241 Refactor PurchaseOrderForm to align item submission structure with PocketBase requirements 2025-09-25 23:44:06 +02:00
davidels1
8647d3dd3e Refactor purchase order form and stock columns
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.
2025-09-25 23:29:58 +02:00
davidels1
54d029cf14 Enhance responsiveness of PurchaseOrderForm and enable horizontal scrolling in Stock page 2025-09-25 23:18:24 +02:00
davidels1
6c4ec2c423 fixedproblems 2025-09-25 10:40:43 +02:00
davidels1
39a48e3b4b Refactor layout and styling across multiple components for improved responsiveness and consistency 2025-09-25 02:04:50 +02:00
davidels1
9f79dae941 Refactor authentication checks in useDashboardData and add collection auth rules for authenticated users 2025-09-25 01:50:01 +02:00
davidels1
7133409c04 Update PocketBase URL handling and environment type definitions 2025-09-25 01:37:21 +02:00
davidels1
bbb079f8fc Delete pnpm-lock.yaml 2025-09-25 01:13:28 +02:00
davidels1
796bac47b4 Add icon generation script and new icons for PWA and favicons
- 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.
2025-09-25 00:50:36 +02:00
davidels1
9ee0905d9f Chaned header and db link 2025-09-25 00:27:25 +02:00
davidels1
23198d9094 Fixed login 2025-09-25 00:15:35 +02:00
davidels1
2dc385cbdc Create 1757376600_created_logs.js 2025-09-24 23:21:13 +02:00
[dyad]
a7ef17d9bf [dyad] Enhanced stock search to filter by partial name, SKU, and category - wrote 2 file(s) + extra files edited outside of Dyad 2025-09-23 16:34:26 +02:00
[dyad]
19ae6a9f6c [dyad] Updated low stock alerts threshold to less than 3 - wrote 2 file(s) + extra files edited outside of Dyad 2025-09-23 16:32:40 +02:00
[dyad]
b4f8ac7fb4 [dyad] Fixed dashboard stats (unique items count, book out as orders) and updated chart colors - wrote 3 file(s) + extra files edited outside of Dyad 2025-09-23 16:26:56 +02:00
[dyad]
bf096abfc8 [dyad] Updated dashboard to fetch and display actual data from PocketBase collections - wrote 3 file(s) + extra files edited outside of Dyad 2025-09-23 16:24:23 +02:00
[dyad]
961604be6c [dyad] Fixed total customers calculation and added debugging logs - wrote 1 file(s) + extra files edited outside of Dyad 2025-09-23 16:19:55 +02:00
[dyad]
dbe224d67e [dyad] Fixing dashboard data fetching to display actual values - wrote 2 file(s) + extra files edited outside of Dyad 2025-09-23 16:15:30 +02:00
[dyad]
07a46da8e3 [dyad] Ensuring correct field names are used in useDashboardData hook - wrote 2 file(s) + extra files edited outside of Dyad 2025-09-23 16:14:36 +02:00
[dyad]
177c0c6af4 [dyad] Removing item limit on Stock Management screen - wrote 1 file(s) + extra files edited outside of Dyad 2025-09-23 16:10:25 +02:00
[dyad]
a57db8f58c [dyad] Improving mobile responsiveness of Reports view - wrote 2 file(s) 2025-09-21 22:06:27 +02:00
[dyad]
c289676f94 [dyad] Moving Toggle Columns button above the table - wrote 1 file(s) 2025-09-21 21:20:24 +02:00
[dyad]
21a79ca525 [dyad] Improving mobile responsiveness of Book Out Items screen - wrote 2 file(s) 2025-09-21 21:17:41 +02:00
[dyad]
36bfc1c599 [dyad] Preventing horizontal scrolling in BookOutForm on small screens - wrote 1 file(s) 2025-09-21 21:15:23 +02:00
[dyad]
7aa992fe81 [dyad] Removing Products and Orders links and improving BookOutForm responsiveness - wrote 2 file(s) + extra files edited outside of Dyad 2025-09-21 21:14:00 +02:00
[dyad]
c4545285a6 Updated src/lib/pocketbase.ts 2025-09-21 19:32:39 +02:00
[dyad]
ae24415f5a Updated AI_RULES.md 2025-09-19 12:19:47 +02:00
[dyad]
ad018e75d8 [dyad] Restoring sidebar links and including new pages - wrote 1 file(s) 2025-09-19 11:51:46 +02:00
[dyad]
77c926ea54 [dyad] Fixing sidebar layout on smaller screens - wrote 2 file(s) 2025-09-19 11:49:41 +02:00
[dyad]
195ed1582e [dyad] Fixed quantity saving by creating separate book out records per item - wrote 1 file(s) 2025-09-12 16:36:26 +02:00
[dyad]
91106aef39 [dyad] Fixed quantity input to save numeric values correctly - wrote 1 file(s) 2025-09-12 16:32:33 +02:00
[dyad]
82ddaf6c97 [dyad] Fixed quantity display to show total quantity in BookOutDataTable - wrote 1 file(s) 2025-09-12 16:30:50 +02:00
[dyad]
271de15056 [dyad] Fixed BookOut form submission to save relations and quantities correctly - wrote 1 file(s) 2025-09-12 16:28:32 +02:00
[dyad]
2def045906 [dyad] Fixed BookOut data mapping for item name, SKU, and date formatting - wrote 1 file(s) 2025-09-12 16:24:15 +02:00
[dyad]
66263fd137 [dyad] Fixed data fetching and mapping for Book Out records - wrote 1 file(s) 2025-09-12 16:22:21 +02:00
[dyad]
d629c5a3df [dyad] Corrected customer name mapping in BookOutForm - wrote 1 file(s) 2025-09-12 16:21:30 +02:00
[dyad]
92fbe35906 [dyad] Corrected customer name mapping in BookOutForm - wrote 1 file(s) 2025-09-12 16:19:37 +02:00
[dyad]
b86d694e29 [dyad] Corrected customer name mapping in BookOutForm - wrote 1 file(s) 2025-09-12 16:17:45 +02:00