This commit is contained in:
@@ -83,11 +83,17 @@ export default {
|
||||
//clear any local errors
|
||||
vm.clearErrors();
|
||||
//if the search entry is in the results list then it's a drop down selection not a typed search so bail
|
||||
console.log(
|
||||
"watch searchentry checking if search or selection for entry:",
|
||||
val
|
||||
);
|
||||
for (let i = 0; i < vm.searchResults.length; i++) {
|
||||
if (vm.searchResults[i].name == val) {
|
||||
console.log("Yes, match, bail no search");
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log("past entry check, maybe search?");
|
||||
if (!val || vm.fetching || !vm.initialized) {
|
||||
if (!vm.initialized) {
|
||||
vm.$nextTick(() => {
|
||||
@@ -96,7 +102,8 @@ export default {
|
||||
}
|
||||
return;
|
||||
}
|
||||
//console.log("watch::searchentry - calling do search:");
|
||||
console.log("watch::searchentry - calling do search on :", val);
|
||||
|
||||
this.doSearch();
|
||||
},
|
||||
errors(val) {
|
||||
@@ -267,6 +274,7 @@ export default {
|
||||
//NOTE debounce with a watcher is a bit different, currently it has to be done exactly this way, nothing else will work properly
|
||||
//https://vuejs.org/v2/guide/migration.html#debounce-Param-Attribute-for-v-model-removed
|
||||
//-----------------
|
||||
console.log("doSearch top, search for:", vm.searchEntry);
|
||||
let vm = this;
|
||||
let isATwoTermQuery = false;
|
||||
let queryTerms = [];
|
||||
@@ -282,6 +290,7 @@ export default {
|
||||
if (val.includes(" ")) {
|
||||
queryTerms = val.split(" ");
|
||||
if (queryTerms.length > 2) {
|
||||
console.log("Query invalid 1");
|
||||
vm.errors.push(vm.$ay.t("ErrorPickListQueryInvalid"));
|
||||
return;
|
||||
}
|
||||
@@ -317,6 +326,7 @@ export default {
|
||||
window.$gz._.startsWith(queryTerms[0], "..") &&
|
||||
window.$gz._.startsWith(queryTerms[1], "..")
|
||||
) {
|
||||
console.log("Query invalid 2");
|
||||
vm.errors.push(vm.$ay.t("ErrorPickListQueryInvalid"));
|
||||
return;
|
||||
}
|
||||
@@ -326,6 +336,7 @@ export default {
|
||||
!window.$gz._.startsWith(queryTerms[0], "..") &&
|
||||
!window.$gz._.startsWith(queryTerms[1], "..")
|
||||
) {
|
||||
console.log("Query invalid 3");
|
||||
vm.errors.push(vm.$ay.t("ErrorPickListQueryInvalid"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,13 +21,19 @@ describe("PICK LIST TEMPLATE", () => {
|
||||
cy.get("[data-cy=SelectTemplate]").type("3{enter}", { force: true });
|
||||
|
||||
//hide tags field
|
||||
cy.get("[data-cy=useremployeenumberInclude]").uncheck({ force: true });
|
||||
cy.get("[data-cy=usertagsInclude]").uncheck({ force: true });
|
||||
// cy.get(
|
||||
// '[data-cy="adm-global-select-templates:save"] > .v-btn__content > .v-icon'
|
||||
// ).click();
|
||||
cy.get(
|
||||
'[data-cy="adm-global-select-templates:save"] > .v-btn__content > .v-icon'
|
||||
).click();
|
||||
).click({ force: true });
|
||||
cy.visit("/widgets/0");
|
||||
cy.url().should("include", "/widgets/0");
|
||||
cy.get("[data-cy=userid] > .v-input").type("a ..zone");
|
||||
//select a user with a zone set
|
||||
cy.get("[data-cy=userid] > .v-input").type(
|
||||
"..zone{downarrow}{downarrow}{enter}"
|
||||
);
|
||||
//tags is off so there shouldn't be any "zones" visible in there
|
||||
//-----------------
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user