fix move out , if usage count reached max usage count
fix gui: card number will be loaded only if form is empty
This commit is contained in:
@@ -40,12 +40,17 @@ function addDocumentKeypressedListener(){
|
||||
$( document ).on( "wordtyped", function( event, data ) {
|
||||
var word;
|
||||
word = data.word;
|
||||
console.info("word typed",word);
|
||||
console.info("isWordTypedListenerAllowedOnlyForEmptyCustomer",isWordTypedListenerAllowedOnlyForEmptyCustomer);
|
||||
if ( word && word.length > 0){
|
||||
var redirectAllowed = true;
|
||||
if ( isWordTypedListenerAllowedOnlyForEmptyCustomer ){
|
||||
if ( location.href !== reception_card_url ){
|
||||
let params = new URLSearchParams(location.search)
|
||||
let cardNumber = params.get("number");
|
||||
|
||||
if ( cardNumber && cardNumber.length > 0){
|
||||
redirectAllowed = false;
|
||||
console.info("disalbling customer redirect. reason: isWordTypedListenerAllowedOnlyForEmptyCustomer = true")
|
||||
console.info("redirect disabled! number param exists", word, cardNumber );
|
||||
}
|
||||
}
|
||||
if ( redirectAllowed){
|
||||
|
||||
Reference in New Issue
Block a user