Recent searches
No recent searches

Emmanuelle Garel-Galais
Joined Apr 15, 2021
·
Last activity Dec 07, 2021
Following
0
Followers
0
Total activity
6
Votes
0
Subscriptions
2
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by Emmanuelle Garel-Galais
Emmanuelle Garel-Galais commented,
Thank you both, I've made it!
Thanks!
View comment · Posted May 27, 2021 · Emmanuelle Garel-Galais
0
Followers
0
Votes
0
Comments
Emmanuelle Garel-Galais commented,
Morning @...!
Thank you very much for your follow-up! Nevertheless, none of your suggestions is working here :
var remove_360001704540 = true;
var remove_360001714479 = true;
for (var c in HelpCenter.user.organizations) {
if (["X", "Y", "Z"].includesconsole.log(HelpCenter.user.organizations[c].name)){
remove_360001704540 = false;
}
if console.log(HelpCenter.user.organizations[c].name == "A"){
remove_360001714479 = false;
}
}
if console.log(remove_360001704540) {
$("#360001704540").remove();
}
if console.log(remove_360001714479) {
$("#360001714479").remove();
}
When I add the console.log, I loose my possibility to log out again...
I thought it was easy to do but in fact no haha!
View comment · Posted May 27, 2021 · Emmanuelle Garel-Galais
0
Followers
0
Votes
0
Comments
Emmanuelle Garel-Galais commented,
Hello @...!
Thank you so much for your quick answer!
I have thus replaced my previous code by this one as you suggested but it still doesn't work (I have the log out back, this is already one good thing though!), I still have both forms for both users linked to those organizations... :
var remove_form1 = true;
var remove_form2 = true;
for (var c in HelpCenter.user.organizations) {
if (["X", "Y", "Z"].includes(HelpCenter.user.organizations[c].name)){
remove_form1 = false;
}
if (HelpCenter.user.organizations[c].name == "A"){
remove_form2 = false;
}
}
if (remove_form1) {
$(360001704540).remove();
}
if (remove_form2) {
$(360001714479).remove();
}
Still don't understand why :-(
View comment · Posted May 26, 2021 · Emmanuelle Garel-Galais
0
Followers
0
Votes
0
Comments
Emmanuelle Garel-Galais commented,
Hi there!
After having been reading over almost all comments, I didn't get the feeling I found the answer I needed, so here is my issue : I have 4 organizations and I want 3 of them (X, Y & Z) to see only one ticket form and the last one (A) to see another ticket form. When I tested it with only one organization it worked perfectly (after having added a Jquery in document_head.hbs). Now, here is my script for the 4 organizations and unfortunately all organizations see now both ticket forms... :
$(window).on('load', function() {
var i = 0;
var checkExist = setInterval(function() {
i++;
if ($("a.nesty-input").length){
clearInterval(checkExist);
$("a.nesty-input").each(function() {
$(this).bind( "click", function() {
for (var c in HelpCenter.user.organizations) {
if (HelpCenter.user.organizations[c].name !== "X"){
$("#360001704540").remove();
}
if (HelpCenter.user.organizations[c].name !== "Y"){
$("#360001704540").remove();
}
if (HelpCenter.user.organizations[c].name !== "Z"){
$("#360001704540").remove();
}
if (HelpCenter.user.organizations[c].name !== "A"){
$("#360001714479").remove();
}
});
});
}
if (i > 10){
clearInterval(checkExist);
}
}, 100);
});
What am I doing wrong please? :-(
View comment · Posted May 26, 2021 · Emmanuelle Garel-Galais
0
Followers
0
Votes
0
Comments