added comments and removed commented out code

This commit is contained in:
David Kennedy 2025-03-13 22:02:36 -04:00
parent b5ab09db82
commit 08d6b70cfe
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B

View file

@ -105,8 +105,8 @@ export function initApprovedDomain() {
return; return;
} }
const statusToCheck = "approved"; const statusToCheck = "approved"; // when checking against a select
const readonlyStatusToCheck = "Approved"; const readonlyStatusToCheck = "Approved"; // when checking against a readonly div display value
const statusSelect = document.getElementById("id_status"); const statusSelect = document.getElementById("id_status");
const statusField = document.querySelector("field-status"); const statusField = document.querySelector("field-status");
const sessionVariableName = "showApprovedDomain"; const sessionVariableName = "showApprovedDomain";
@ -122,6 +122,8 @@ export function initApprovedDomain() {
// Handle showing/hiding the related fields on page load. // Handle showing/hiding the related fields on page load.
function initializeFormGroups() { function initializeFormGroups() {
// Status is either in a select or in a readonly div. Both
// cases are handled below.
let isStatus = false; let isStatus = false;
if (statusSelect) { if (statusSelect) {
isStatus = statusSelect.value == statusToCheck; isStatus = statusSelect.value == statusToCheck;
@ -605,12 +607,6 @@ export function initActionNeededEmail() {
// Initialize UI // Initialize UI
const customEmail = new customActionNeededEmail(); const customEmail = new customActionNeededEmail();
// // Check that every variable was setup correctly
// const nullItems = Object.entries(customEmail.config).filter(([key, value]) => value === null).map(([key]) => key);
// if (nullItems.length > 0) {
// console.error(`Failed to load customActionNeededEmail(). Some variables were null: ${nullItems.join(", ")}`)
// return;
// }
customEmail.loadActionNeededEmail() customEmail.loadActionNeededEmail()
}); });
} }