Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bcgov/EDUC-CAPS
Browse files Browse the repository at this point in the history
  • Loading branch information
ITKDeanna committed Jul 4, 2024
2 parents 39c4ba2 + a39826d commit ae0e163
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
28 changes: 7 additions & 21 deletions CAPS/WebResources/Scripts/FormHandler/caps_ProjectTracker.Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,25 +134,20 @@ CAPS.ProjectTracker.ShowHideFacilities = function (executionContext) {
else if (formContext.getAttribute("caps_submissioncategorycode").getValue() === "AFG") {
formContext.getAttribute("caps_facility").controls.forEach(control => control.setVisible(false));
}
else if (formContext.getAttribute("caps_submissioncategorycode").getValue() === "Major_CC_New_Spaces" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_MAJOR_NEW_SPACES_INTEGRATED" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_CONVERSION" ||
else if (formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_CONVERSION" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_CONVERSION_MINOR" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_UPGRADE" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_UPGRADE_MINOR") {
formContext.getAttribute("caps_proposedfacility").controls.forEach(control => control.setVisible(false));
formContext.getAttribute("caps_facility").controls.forEach(control => control.setVisible(true));

}
else if (formContext.getAttribute("caps_submissioncategorycode").getValue() === "Major_CC_New_Spaces" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_MAJOR_NEW_SPACES_INTEGRATED") {
formContext.getAttribute("caps_proposedfacility").controls.forEach(control => control.setVisible(true));
formContext.getAttribute("caps_facility").controls.forEach(control => control.setVisible(true));
}
else if (formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_CONVERSION" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_CONVERSION_MINOR" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_UPGRADE" ||
formContext.getAttribute("caps_submissioncategorycode").getValue() === "CC_UPGRADE_MINOR") {
formContext.getAttribute("caps_proposedfacility").controls.forEach(control => control.setVisible(false));
}

else {

var id = formContext.data.entity.getId().replace("{", "").replace("}", "");
Expand Down Expand Up @@ -484,12 +479,6 @@ CAPS.ProjectTracker.showHideCategoryRelevantSections = function (formContext) {
formContext.ui.tabs.get("tab_general").sections.get("sec_other_funding").setVisible(false);
formContext.ui.tabs.get("tab_general").sections.get("sec_budget_breakdown").setVisible(false);


//formContext.getControl("caps_approvedreserve").setVisible(false);
//formContext.getControl("caps_totalapproved").setVisible(false);
//formContext.getControl("caps_unapprovedreserve").setVisible(false);
//formContext.getControl("caps_totalprovincialbudget").setVisible(false);

if (formContext.getControl("caps_totalagencyprojected") !== null) {
formContext.getControl("caps_totalagencyprojected").setVisible(false);
}
Expand Down Expand Up @@ -574,7 +563,6 @@ CAPS.ProjectTracker.showHideCategoryRelevantSections = function (formContext) {
categoryCode === 'CC_CONVERSION' || categoryCode === 'CC_CONVERSION_MINOR') {
formContext.getAttribute("caps_childcarefacility").controls.forEach(control => control.setVisible(true));
formContext.getAttribute("caps_proposedchildcarefacility").controls.forEach(control => control.setVisible(true));
//formContext.getAttribute("caps_proposedfacility").controls.forEach(control => control.setVisible(true));
formContext.getAttribute("caps_facility").controls.forEach(control => control.setVisible(true));
}

Expand All @@ -586,24 +574,22 @@ CAPS.ProjectTracker.showHideCategoryRelevantSections = function (formContext) {
}
if (categoryCode === 'CC_CONVERSION_MINOR') {

formContext.getAttribute("caps_childcareconstructiontype").controls.forEach(control => control.setVisible(false));
formContext.getAttribute("caps_childcareconstructiontype").controls.forEach(control => control.setVisible(false));
formContext.ui.tabs.get("tab_child_care").sections.get("tab_10_section_1").setVisible(false);

}
if (categoryCode === 'CC_UPGRADE') {
formContext.getAttribute("caps_childcarefacility").controls.forEach(control => control.setVisible(true));
formContext.getAttribute("caps_proposedchildcarefacility").controls.forEach(control => control.setVisible(false));
//formContext.getAttribute("caps_proposedfacility").controls.forEach(control => control.setVisible(false));
//formContext.getAttribute("caps_facility").controls.forEach(control => control.setVisible(false));
formContext.getAttribute("caps_childcareconstructiontype").controls.forEach(control => control.setVisible(true));
formContext.getAttribute("caps_healthauthority").controls.forEach(control => control.setVisible(false));
}
if (categoryCode === 'CC_UPGRADE_MINOR') {
formContext.getAttribute("caps_childcarefacility").controls.forEach(control => control.setVisible(true));
formContext.getAttribute("caps_proposedchildcarefacility").controls.forEach(control => control.setVisible(false));
//formContext.getAttribute("caps_proposedfacility").controls.forEach(control => control.setVisible(false));
//formContext.getAttribute("caps_facility").controls.forEach(control => control.setVisible(false));
formContext.getAttribute("caps_childcareconstructiontype").controls.forEach(control => control.setVisible(false));
formContext.getAttribute("caps_healthauthority").controls.forEach(control => control.setVisible(false));
formContext.ui.tabs.get("tab_child_care").sections.get("tab_10_section_1").setVisible(false);
}


Expand Down
2 changes: 1 addition & 1 deletion CAPS/WebResources/Scripts/Ribbon/caps_Submission.Submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ CAPS.Submission.CheckBoardResolution = function (formContext) {
if (boardResolutionRequired === true && submissionBoardResolutionAttached === false) {
return new CAPS.Submission.ValidationResult(false, "Board Resolution Validation Failed.");
}
else if ((boardResolutionRequired === true && submissionBoardResolutionAttached === true) || (boardResolutionRequired === false && submissionBoardResolutionAttached === false)) {
else if ((boardResolutionRequired === true && submissionBoardResolutionAttached === true) || (boardResolutionRequired === false)) {
return new CAPS.Submission.ValidationResult(true, "Board Resolution Validation Succeeded.");
}
},
Expand Down

0 comments on commit ae0e163

Please sign in to comment.