feat: No-Barcode Products & Manual Barcode Input#9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b80c2e07c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| final barcode = _noBarcodeMode | ||
| ? (_isEditingExistingNoBarcode | ||
| ? _barcodeController.text | ||
| : await DatabaseHelper.instance.getNextNoBarcodeId()) | ||
| : _barcodeController.text.trim(); |
There was a problem hiding this comment.
Preserve generated NB- barcode across retry attempts*
When no-barcode mode is enabled, each call to _saveProduct regenerates a new NB-* ID (getNextNoBarcodeId) before persisting the product. If the kiosk sync fails and the user retries from the same screen, the previous attempt has already inserted a product locally, so the next call generates a different barcode and creates a second product, leaving the first unsynced entry behind. This only happens when a sync failure occurs and the user retries in no-barcode mode, but it can silently duplicate products in the manager DB and on the kiosk.
Useful? React with 👍 / 👎.
Features
Manager App
NB-1,NB-2).Kiosk App
NB-*).Technical Details
searchProducts(query)to KioskDatabaseHelper(partial matching).ManualBarcodeDialogandNoBarcodeProductsDialogwidgets.