Failed to execute template. Cause: [Access denied when checking [script] access to [xwiki:Collaboratory.UX.HbpSkin.WebHome] for user [xwiki:XWiki.Admin]]. Click on this message for details.

Context Search - HBP Wiki

IAM21 instance, do not create collab nor modify a team, your changes will be lost


Changes for page Context Search

Last modified by bougault on 2023/02/20 16:29

From version 27.31
edited by bougault
on 2022/11/17 13:42
Change comment: There is no comment for this version
To version 27.26
edited by bougault
on 2022/11/17 13:37
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -45,14 +45,13 @@
45 45   this.results = [];
46 46   }
47 47   toggleRoleFilter(roleName) {
48 - console.log("toggleRoleFilter", roleName, this.rolesFilter, this.rolesFilter.indexOf(roleName));
49 - if(this.rolesFilter.indexOf(roleName) === -1) {
48 + if(this.rolesFilter.indexOf(roleName) == -1) {
50 50   this.rolesFilter.push(roleName);
51 51   } else {
52 52   this.rolesFilter.filter(role => role !== roleName);
53 53   }
54 - console.log(this.rolesFilter);
55 55   this[roleName] = !this[roleName];
54 + console.log(this.rolesFilter);
56 56   this.filterUrl.searchParams.set('roles', this.rolesFilter.join("+"));
57 57   this.handleSearch();
58 58   }
... ... @@ -60,22 +60,21 @@
60 60   this.searchText = e.target.value;
61 61   }
62 62   handleSearch() {
63 - console.log(this.rolesFilter)
64 64   if(this.searchText !== "") {
65 - if(this.searchText !== this.prevSearchText) {
66 - console.log(this.searchText, this.prevSearchText);
67 - this.prevSearchText = this.searchText;
68 - Promise.all([
69 - this.fetchWikiSearch(),
70 - this.fetchFilterSearch()
71 - ]).then(([wikiSearchResults, collabSearchResults]) => {
72 - this.results = wikiSearchResults;
73 - console.log(wikiSearchResults, collabSearchResults);
74 - });
75 - } else if (this.searchText === this.prevSearchText) {
76 - console.log("Only apply filter on results");
77 - this.fetchFilterSearch().then(this.filterResults)
78 - }
63 + if(this.searchText !== this.prevSearchText) {
64 + console.log(this.searchText, this.prevSearchText);
65 + this.prevSearchText = this.searchText;
66 + Promise.all([
67 + this.fetchWikiSearch(),
68 + this.fetchFilterSearch()
69 + ]).then(([wikiSearchResults, collabSearchResults]) => {
70 + this.results = wikiSearchResults;
71 + console.log(wikiSearchResults, collabSearchResults);
72 + });
73 + } else if (this.searchText === this.prevSearchText) {
74 + console.log("Only apply filter on results");
75 + this.fetchFilterSearch().then(this.filterResults)
76 + }
79 79   } else {
80 80   console.log("no search text, should return filter search results if any");
81 81   this.fetchFilterSearch().then(collabs => {