Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to the invite cohort #1297

Open
wants to merge 34 commits into
base: development
Choose a base branch
from
Open
Changes from 10 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
85aaf3c
Changes to the invite cohort
Mbeweg Jul 25, 2024
9914f5e
Merge branch 'development' into BCI1
bledsoef Sep 6, 2024
d3dcc50
bonner cohort remain checked
doucoureb Sep 17, 2024
08aab57
Merge branch 'BCI1' of github.com:BCStudentSoftwareDevTeam/celts into…
doucoureb Sep 17, 2024
100f0cc
improved code
doucoureb Sep 20, 2024
5e10bdd
Merge branch 'development' into BCI1
doucoureb Oct 2, 2024
651a9c5
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/cel…
bledsoef Oct 3, 2024
3b62689
Merge branch 'BCI1' of github.com:BCStudentSoftwareDevTeam/celts into…
bledsoef Oct 3, 2024
616aa8c
Bonner Cohort checkbox fixed + merge conflict
doucoureb Oct 4, 2024
0842823
pr modifications
doucoureb Oct 9, 2024
d4078be
Ready for PR
Oct 18, 2024
d0a825b
invitation cohort attempt
doucoureb Oct 29, 2024
6ef35d2
pr test
doucoureb Oct 31, 2024
06c6d26
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/cel…
bledsoef Oct 31, 2024
f42411e
pr test
doucoureb Nov 4, 2024
1cd75cd
pr test 1
doucoureb Nov 8, 2024
231a773
Merge branch 'BCI1' of github.com:BCStudentSoftwareDevTeam/celts into…
bledsoef Nov 8, 2024
8c6e1d1
Merge branch 'development' into BCI1
bledsoef Nov 11, 2024
b42ce9a
Merge branch 'BCI1' of github.com:BCStudentSoftwareDevTeam/celts into…
bledsoef Nov 12, 2024
2646217
Merge branch 'BCI1' of github.com:BCStudentSoftwareDevTeam/celts into…
bledsoef Nov 12, 2024
a88b114
test pr 2
doucoureb Nov 12, 2024
d64297f
Merge branch 'BCI1' of github.com:BCStudentSoftwareDevTeam/celts into…
doucoureb Nov 12, 2024
cc12edb
PR test 3: I haven't moved the function inviteCohortsToEvent to the e…
doucoureb Nov 22, 2024
350f1aa
Merge branch 'BCI1' of github.com:BCStudentSoftwareDevTeam/celts into…
bledsoef Dec 3, 2024
401682c
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/cel…
bledsoef Dec 3, 2024
e179c8f
Change variables from snake_case to camelCasee
stevensonmichel Dec 26, 2024
a6a4f7d
Fixed checkbox for event cohort
stevensonmichel Dec 26, 2024
c022d6a
Merge branch 'development' into BCI1
stevensonmichel Dec 26, 2024
c28fd89
removed unnecessary codes and moved functions to logic
stevensonmichel Dec 27, 2024
a6e42dc
Finished test for inviteCohorts and updateCohorts to events functions
stevensonmichel Dec 30, 2024
0f55362
resolved many of the comments from print statements and removing cohorts
WackyWeaver Jan 14, 2025
6c3312a
Wrote tests for addBonnerCohortToRsvpLog logic
stevensonmichel Jan 20, 2025
ff1446e
Fixed duplicate rsvp logs when adding cohort in bonner scholar event
stevensonmichel Jan 24, 2025
20fefad
Merge branch 'development' into BCI1
stevensonmichel Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions app/static/js/createEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,3 +484,43 @@ $(".startDatePicker, .endDatePicker").change(function () {

setCharacterLimit($("#inputCharacters"), "#remainingCharacters");
});

function saveSelectedCohorts() {
const selectedCohorts = [];
$("input[name='cohorts[]']:checked").each(function () {
selectedCohorts.push($(this).val());
});
sessionStorage.setItem("selectedCohorts", JSON.stringify(selectedCohorts));
}

function loadSelectedCohorts() {
const selectedCohorts = JSON.parse(sessionStorage.getItem("selectedCohorts")) || [];
selectedCohorts.forEach(function (cohort) {
$("input[name='cohorts[]'][value='" + cohort + "']").prop("checked", true);
});
}

function clearSelectedCohorts() {
sessionStorage.removeItem("selectedCohorts");
$("input[name='cohorts[]']").prop("checked", false);
}

$(document).ready(function () {
if (window.location.pathname.includes('/eventTemplates')) {
$('.list-group-item').on('click', function(e) {
e.preventDefault();
clearSelectedCohorts();
window.location.href = $(this).attr('href');
});
} else if (window.location.pathname.includes('/event/create')) {
clearSelectedCohorts();
} else {
loadSelectedCohorts();
}

$(document).on("change", "input[name='cohorts[]']", saveSelectedCohorts);

$("#createNewEventButton").on("click", function () {
clearSelectedCohorts();
});
});
Loading