Fix: Settings UI, Validation, and Tax Integrations#123
Merged
Conversation
- Sync saveLoyalty and saveDiscount state on success - Add tax_registered to backend wildcard, shapes, and frontend form - Add phone validation regex for saveBusinessInfo - Sync savingCloud with discard/save button disabled logic - Remove showPrinterForm from isDirty check - Restore KDS setup hint paragraph - Update POS Settings toasts for product images and customer mandatory - Add missing English and Spanish translation keys - Fix unused imports (cn, formatDate)
- Fixed the loyalty logic bug where earning was incorrectly scaling 1:1 with currency but redemption demanded 100 points per unit. Cashback is now multiplied by LOYALTY_REDEMPTION_RATE (100) when credited. - Updated all integration tests (redemption, earning, global rate) to expect the corrected point balances. - Ensured 'Tax ID / Registration Number' UI in settings conditionally renders based on 'Tax Registered' boolean. Tested: - Backend: 'npm test' suite fully passes - Frontend: 'npm run lint' and 'npm run build' fully pass
- Database JSON export was failing with 401 because the native fetch() was missing the Authorization header. Swapped to api.get() to leverage existing interceptors. - Temporarily appended the backup file path to the success toast while full history UI (Issue #120) is pending.
Contributor
Author
🚀 Phase 2 Fixes & Discoveries (Post-Initial Audit)During thorough testing, several additional edge cases were caught and fixed on this branch:
|
- Inserted an empty placeholder div to maintain the 2-column grid layout when the Tax ID field is dynamically hidden, preventing subsequent fields from shifting upward.
khaira777
marked this pull request as ready for review
July 18, 2026 22:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Plan
1. Settings Phone Number Validation
Swap out the raw
<input>used for the Business Phone with the existingPhoneInputcomponent (or apply its E.164 validation logic) so it behaves identically to the Customer creation form.2. Tax ID & Missing
/taxEndpointGET/PUT /api/settings/taxbackend endpoints. This will finally allow savingtax_registered,tax_scheme, andstate_code.3. Unicode Printer Toggle UI
Fix the flexbox utility classes on the "Printer supports Unicode" row. Wrap the label text and the toggle component in a proper
flex items-center justify-betweencontainer so it aligns perfectly with the rest of the form.4. POS Local Settings (Images & Mandatory Customer)
These are local device settings (saved instantly to
localStoragevia Zustand). To improve UX, add an immediatetoast.success('Local POS setting saved')popup that fires the moment they are toggled, providing instant feedback.5. KDS URL Clarification
In the KDS settings tab, add clear helper text below the standalone button: "The Kitchen Display System is hosted locally on port 3002. Devices on your Wi-Fi can connect by visiting http://[YOUR-LOCAL-IP]:3002".
6. Loyalty
isDirtyPopup BugThe unsaved changes warning isn't clearing because the component's internal saved state isn't syncing up after a successful API call. Add a state update inside the
saveLoyalty()success block to clear the dirty flag.