Forward person when a programming group is created with them

Further, we remove the "check invitation" button and extract some methods to our new ProgrammingGroups object in JavaScript.

Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
This commit is contained in:
Kira Grammel
2023-09-19 22:14:33 +02:00
committed by GitHub
parent 9848c900c3
commit 8a5dc7abc0
9 changed files with 90 additions and 27 deletions

View File

@ -1,4 +1,6 @@
var ProgrammingGroups = {
const ProgrammingGroups = {
session_id: null,
getStoredViewedPPInfo: function () {
return localStorage.getItem('viewed_pp_info')
},
@ -7,10 +9,17 @@ var ProgrammingGroups = {
localStorage.setItem('viewed_pp_info', 'true')
},
initializeEventHandler: function () {
$('#dont_show_info_pp_modal_again').on('click', this.setStoredViewedPPInfo.bind(this));
}
},
is_other_user: function (user) {
return !_.isEqual(current_user, user);
},
is_other_session: function (other_session_id) {
return this.session_id !== other_session_id;
},
};
$(document).on('turbolinks:load', function () {