feat: implement F4/F8/F9 keyboard shortcuts#230
Open
NotAbdelrahmanelsayed wants to merge 1 commit intoBrainWise-DEV:developfrom
Open
feat: implement F4/F8/F9 keyboard shortcuts#230NotAbdelrahmanelsayed wants to merge 1 commit intoBrainWise-DEV:developfrom
NotAbdelrahmanelsayed wants to merge 1 commit intoBrainWise-DEV:developfrom
Conversation
Add global keydown listener in POSSale.vue to wire up the keyboard shortcuts that were documented in the README but never implemented: - F4: focus item search (ItemsSelector) - F8: focus customer search (InvoiceCart) - F9: proceed to checkout (handleProceedToPayment) Expose focusCustomerSearch() from InvoiceCart via defineExpose so the parent can programmatically focus the customer search input. Shortcuts are blocked when a dialog is open or when focus is already inside an input/textarea to avoid conflicting with user typing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
#166 We will consildate both in one branch to make it better Feature. |
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
ItemsSelector.focusSearchInput, already exposed)InvoiceCart.focusCustomerSearchviadefineExpose)handleProceedToPayment, includes existing cart/customer validation)These shortcuts were listed in the README but had zero implementation in the codebase.
Changes
POSSale.vue: addsref="invoiceCartRef"on<InvoiceCart>, declaresinvoiceCartRef, and registers a globalwindow.keydownlistener (cleaned up on unmount) that dispatches F4/F8/F9InvoiceCart.vue: addsref="customerSearchInputRef"on the native search<input>, declares the ref, and exposesfocusCustomerSearch()viadefineExposeGuards
uiStore.isAnyDialogOpenis truedocument.activeElementis anINPUTorTEXTAREATest plan
🤖 Generated with Claude Code