feat(customer-search): enhance cart customer search bar#308
Open
NotAbdelrahmanelsayed wants to merge 2 commits into
Open
feat(customer-search): enhance cart customer search bar#308NotAbdelrahmanelsayed wants to merge 2 commits into
NotAbdelrahmanelsayed wants to merge 2 commits into
Conversation
Improve the in-cart customer search with faster, more forgiving lookup and clearer results: - Clear-search (X) button to reset the query in one tap - Arabic-insensitive tokenized matching with highlighted match segments (normalizes alef/ya/ta-marbuta variants, diacritics, and Arabic-Indic digits via new POS/src/utils/searchText.js) - Top-customers-by-frequency suggestions on focus, tracked in localStorage (pos_customer_counts) - "Show All Customers in Search" POS setting to show the full customer list instead of capping at the first 10-20 matches - Keyboard navigation with auto-scroll of the highlighted result into view and preselection of the top-ranked match Adds a unit test for the topCustomers ranking and Arabic translations for the new strings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…arch-enhancements # Conflicts: # POS/src/components/sale/InvoiceCart.vue # POS/src/stores/customerSearch.js # POS/src/stores/posSettings.js # pos_next/translations/ar.csv
|
This pull request has been automatically marked as stale because it has not had recent activity for 21 days. To keep this PR open, please:
If no further activity occurs within the next 14 days, this PR will be automatically closed. |
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.
Summary
Enhances the in-cart customer search with faster, more forgiving lookup and clearer results.
What's included
POS/src/utils/searchText.js). Typingأحمدmatchesاحمدand vice-versa.localStorageunderpos_customer_counts).customer_search_show_all) to show the full customer list instead of capping at the first 10–20 matches.Tests & i18n
customerSearch.topCustomers.test.js(5 cases) covering the frequency ranking and tie-break.ar.csv) entries for every new user-facing string.Verification
npm run test:run— all tests pass.npm run build— compiles cleanly.🤖 Generated with Claude Code