Skip to content

Commit

Permalink
[chore] Remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhanus3133 committed Aug 20, 2024
1 parent ef19db3 commit c16b203
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,29 +251,6 @@ if (typeof gettext === 'undefined') {
});
}

function updateIndividualSetting(settingId, isWebChecked, isEmailChecked) {
const userId = $('.settings-container').data('user-id');
const data = {
web: isWebChecked,
email: isEmailChecked
};
$.ajax({
type: 'PATCH',
url: '/api/v1/notifications/user/' + userId + '/user-setting/' + settingId + '/',
headers: { 'X-CSRFToken': $('input[name="csrfmiddlewaretoken"]').val() },
contentType: 'application/json',
data: JSON.stringify(data),
success: function () {
showToast('success', gettext('Settings updated successfully.'));
},
error: function () {
showToast('error', gettext('Something went wrong. Please try again.'));
$(`.web-checkbox[data-pk="${settingId}"]`).prop('checked', !isWebChecked);
$(`.email-checkbox[data-pk="${settingId}"]`).prop('checked', !isEmailChecked);
}
});
}

function updateOrgLevelCheckboxes(organizationId) {
const webCheckboxes = $('.web-checkbox[data-organization-id="' + organizationId + '"]');
const emailCheckboxes = $('.email-checkbox[data-organization-id="' + organizationId + '"]');
Expand Down

0 comments on commit c16b203

Please sign in to comment.