@@ -44,7 +44,7 @@ export class GlobalSearchComponent implements OnInit, OnDestroy {
4444 ngOnInit ( ) : void {
4545 // Setup search debouncing
4646 this . searchSubject
47- . pipe ( debounceTime ( 300 ) , distinctUntilChanged ( ) , takeUntil ( this . destroy$ ) )
47+ . pipe ( debounceTime ( 700 ) , distinctUntilChanged ( ) , takeUntil ( this . destroy$ ) )
4848 . subscribe ( ( query ) => {
4949 this . performSearch ( query ) ;
5050 } ) ;
@@ -141,7 +141,7 @@ export class GlobalSearchComponent implements OnInit, OnDestroy {
141141 const isSaleNumber = / ^ S A L E ( - | \/ | ' ) [ 0 - 9 A - F ] { 8 } $ / i. test ( trimmedQuery ) ;
142142
143143 if ( isSaleNumber ) {
144- // Navigate to sales page and set the search query
144+ // Open sales page and set the search query, if it is on pos page, open returns modal
145145 this . router . navigate ( [ "/sales" ] ) . then ( ( ) => {
146146 this . searchStateService . setSearchQuery ( trimmedQuery ) ;
147147 } ) ;
@@ -150,7 +150,7 @@ export class GlobalSearchComponent implements OnInit, OnDestroy {
150150 }
151151
152152 // Check if it looks like a provider code (e.g., PROV-0000)
153- const isProviderCode = / ^ P R O V ( - | \/ ) [ 0 - 9 A - F ] { 4 } $ / i. test ( trimmedQuery ) ;
153+ const isProviderCode = / ^ P R O V ( - | \/ | ' ) [ 0 - 9 A - F ] { 4 } $ / i. test ( trimmedQuery ) ;
154154
155155 if ( isProviderCode ) {
156156 // Navigate to providers page and set the search query
@@ -205,9 +205,8 @@ export class GlobalSearchComponent implements OnInit, OnDestroy {
205205 const now = Date . now ( ) ;
206206 if (
207207 query . trim ( ) === this . lastEnterSearchQuery &&
208- now - this . lastEnterSearchTime < 500
208+ now - this . lastEnterSearchTime < 900
209209 ) {
210- console . log ( "Debounced search skipped - already handled by Enter key" ) ;
211210 return ;
212211 }
213212
0 commit comments