From a672dff48ec0a48cc5a2b9757992b7abcefc919e Mon Sep 17 00:00:00 2001
From: Andre Pestana <andre.pestana@aot-technologies.com>
Date: Wed, 15 Jan 2025 14:55:01 -0800
Subject: [PATCH 1/4] initial commit

---
 .../src/form-definitions/sfaa2025-26.json     | 378 +++++-------------
 1 file changed, 108 insertions(+), 270 deletions(-)

diff --git a/sources/packages/forms/src/form-definitions/sfaa2025-26.json b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
index 1eb6e4b3f0..6ba4095c85 100644
--- a/sources/packages/forms/src/form-definitions/sfaa2025-26.json
+++ b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
@@ -5663,7 +5663,7 @@
           "tags": [],
           "properties": {},
           "conditional": {
-            "show": null,
+            "show": "",
             "when": null,
             "eq": "",
             "json": ""
@@ -8974,6 +8974,89 @@
               "id": "ep2gj8",
               "defaultValue": "",
               "lockKey": true
+            },
+            {
+              "label": "In the time since you left high school to your first day of classes, have you spent two periods of 12 consecutive months each, in the full time labour force?",
+              "optionsLabelPosition": "right",
+              "inline": false,
+              "tableView": false,
+              "values": [
+                {
+                  "label": "Yes",
+                  "value": "yes",
+                  "shortcut": ""
+                },
+                {
+                  "label": "No",
+                  "value": "no",
+                  "shortcut": ""
+                }
+              ],
+              "validate": {
+                "required": true,
+                "onlyAvailableItems": true,
+                "custom": "",
+                "customPrivate": false,
+                "strictDateValidation": false,
+                "multiple": false,
+                "unique": false
+              },
+              "key": "fulltimelabourForce",
+              "type": "radio",
+              "input": true,
+              "placeholder": "",
+              "prefix": "",
+              "customClass": "",
+              "suffix": "",
+              "multiple": false,
+              "defaultValue": null,
+              "protected": false,
+              "unique": false,
+              "persistent": true,
+              "hidden": false,
+              "clearOnHide": true,
+              "refreshOn": "",
+              "redrawOn": "",
+              "modalEdit": false,
+              "dataGridLabel": false,
+              "labelPosition": "top",
+              "description": "",
+              "errorLabel": "",
+              "tooltip": "",
+              "tabindex": "",
+              "disabled": false,
+              "autofocus": false,
+              "dbIndex": false,
+              "customDefaultValue": "",
+              "calculateValue": "",
+              "calculateServer": false,
+              "widget": null,
+              "attributes": {},
+              "validateOn": "change",
+              "conditional": {
+                "show": "true",
+                "when": "howWillYouBeAttendingTheProgram",
+                "eq": "Full Time"
+              },
+              "overlay": {
+                "style": "",
+                "left": "",
+                "top": "",
+                "width": "",
+                "height": ""
+              },
+              "allowCalculateOverride": false,
+              "encrypted": false,
+              "showCharCount": false,
+              "showWordCount": false,
+              "properties": {},
+              "allowMultipleMasks": false,
+              "inputType": "radio",
+              "fieldSet": false,
+              "id": "eqf8qus",
+              "addons": [],
+              "tags": [],
+              "lockKey": true
             }
           ],
           "id": "etmjo4"
@@ -8982,7 +9065,7 @@
           "clearOnHide": false,
           "key": "dependantInformationPanel",
           "input": false,
-          "title": "Dependant information panel",
+          "title": "Family information panel",
           "theme": "default",
           "tableView": false,
           "components": [
@@ -8998,7 +9081,7 @@
                 }
               ],
               "className": "category-header-medium primary-color",
-              "content": "Dependant information",
+              "content": "Family information",
               "type": "htmlelement",
               "hideLabel": true,
               "tags": [],
@@ -9381,252 +9464,6 @@
           "hideLabel": true,
           "lockKey": true
         },
-        {
-          "title": "Emplyment information panel",
-          "labelWidth": "",
-          "labelMargin": "",
-          "theme": "default",
-          "tooltip": "",
-          "customClass": "",
-          "collapsible": false,
-          "hidden": false,
-          "hideLabel": true,
-          "disabled": false,
-          "modalEdit": false,
-          "key": "emplymentInformationPanel",
-          "tags": [],
-          "properties": {},
-          "customConditional": "",
-          "conditional": {
-            "json": "",
-            "show": "true",
-            "when": "howWillYouBeAttendingTheProgram",
-            "eq": "Full Time"
-          },
-          "logic": [],
-          "attributes": {},
-          "overlay": {
-            "style": "",
-            "page": "",
-            "left": "",
-            "top": "",
-            "width": "",
-            "height": ""
-          },
-          "type": "panel",
-          "label": "Panel",
-          "breadcrumb": "default",
-          "tabindex": "",
-          "input": false,
-          "placeholder": "",
-          "prefix": "",
-          "suffix": "",
-          "multiple": false,
-          "defaultValue": null,
-          "protected": false,
-          "unique": false,
-          "persistent": false,
-          "clearOnHide": false,
-          "refreshOn": "",
-          "redrawOn": "",
-          "tableView": false,
-          "dataGridLabel": false,
-          "labelPosition": "top",
-          "description": "",
-          "errorLabel": "",
-          "autofocus": false,
-          "dbIndex": false,
-          "customDefaultValue": "",
-          "calculateValue": "",
-          "calculateServer": false,
-          "widget": null,
-          "validateOn": "change",
-          "validate": {
-            "required": false,
-            "custom": "",
-            "customPrivate": false,
-            "strictDateValidation": false,
-            "multiple": false,
-            "unique": false
-          },
-          "allowCalculateOverride": false,
-          "encrypted": false,
-          "showCharCount": false,
-          "showWordCount": false,
-          "allowMultipleMasks": false,
-          "addons": [],
-          "tree": false,
-          "lazyLoad": false,
-          "components": [
-            {
-              "label": "HTML",
-              "labelWidth": "",
-              "labelMargin": "",
-              "tag": "h3",
-              "className": "category-header-medium primary-color",
-              "attrs": [
-                {
-                  "attr": "",
-                  "value": ""
-                }
-              ],
-              "content": "Employment information",
-              "refreshOnChange": false,
-              "customClass": "",
-              "hidden": false,
-              "modalEdit": false,
-              "key": "html54",
-              "tags": [],
-              "properties": {},
-              "conditional": {
-                "show": null,
-                "when": null,
-                "eq": "",
-                "json": ""
-              },
-              "customConditional": "",
-              "logic": [],
-              "attributes": {},
-              "overlay": {
-                "style": "",
-                "page": "",
-                "left": "",
-                "top": "",
-                "width": "",
-                "height": ""
-              },
-              "type": "htmlelement",
-              "input": false,
-              "tableView": false,
-              "placeholder": "",
-              "prefix": "",
-              "suffix": "",
-              "multiple": false,
-              "defaultValue": null,
-              "protected": false,
-              "unique": false,
-              "persistent": false,
-              "clearOnHide": true,
-              "refreshOn": "",
-              "redrawOn": "",
-              "dataGridLabel": false,
-              "labelPosition": "top",
-              "description": "",
-              "errorLabel": "",
-              "tooltip": "",
-              "hideLabel": false,
-              "tabindex": "",
-              "disabled": false,
-              "autofocus": false,
-              "dbIndex": false,
-              "customDefaultValue": "",
-              "calculateValue": "",
-              "calculateServer": false,
-              "widget": null,
-              "validateOn": "change",
-              "validate": {
-                "required": false,
-                "custom": "",
-                "customPrivate": false,
-                "strictDateValidation": false,
-                "multiple": false,
-                "unique": false
-              },
-              "allowCalculateOverride": false,
-              "encrypted": false,
-              "showCharCount": false,
-              "showWordCount": false,
-              "allowMultipleMasks": false,
-              "addons": [],
-              "id": "e7vkza"
-            },
-            {
-              "label": "In the time since you left high school to your first day of classes, have you spent two periods of 12 consecutive months each, in the full time labour force?",
-              "optionsLabelPosition": "right",
-              "inline": false,
-              "tableView": false,
-              "values": [
-                {
-                  "label": "Yes",
-                  "value": "yes",
-                  "shortcut": ""
-                },
-                {
-                  "label": "No",
-                  "value": "no",
-                  "shortcut": ""
-                }
-              ],
-              "validate": {
-                "required": true,
-                "onlyAvailableItems": true,
-                "custom": "",
-                "customPrivate": false,
-                "strictDateValidation": false,
-                "multiple": false,
-                "unique": false
-              },
-              "key": "fulltimelabourForce",
-              "type": "radio",
-              "input": true,
-              "placeholder": "",
-              "prefix": "",
-              "customClass": "",
-              "suffix": "",
-              "multiple": false,
-              "defaultValue": null,
-              "protected": false,
-              "unique": false,
-              "persistent": true,
-              "hidden": false,
-              "clearOnHide": true,
-              "refreshOn": "",
-              "redrawOn": "",
-              "modalEdit": false,
-              "dataGridLabel": false,
-              "labelPosition": "top",
-              "description": "",
-              "errorLabel": "",
-              "tooltip": "",
-              "hideLabel": false,
-              "tabindex": "",
-              "disabled": false,
-              "autofocus": false,
-              "dbIndex": false,
-              "customDefaultValue": "",
-              "calculateValue": "",
-              "calculateServer": false,
-              "widget": null,
-              "attributes": {},
-              "validateOn": "change",
-              "conditional": {
-                "show": "",
-                "when": "",
-                "eq": ""
-              },
-              "overlay": {
-                "style": "",
-                "left": "",
-                "top": "",
-                "width": "",
-                "height": ""
-              },
-              "allowCalculateOverride": false,
-              "encrypted": false,
-              "showCharCount": false,
-              "showWordCount": false,
-              "properties": {},
-              "allowMultipleMasks": false,
-              "inputType": "radio",
-              "fieldSet": false,
-              "id": "eqf8qus",
-              "addons": [],
-              "tags": [],
-              "lockKey": true
-            }
-          ],
-          "id": "erpkbb"
-        },
         {
           "clearOnHide": false,
           "key": "residencyInformationPanel",
@@ -11080,7 +10917,8 @@
             "eq": ""
           },
           "properties": {},
-          "lockKey": true
+          "lockKey": true,
+          "customConditional": "show = data.howWillYouBeAttendingTheProgram === \"Full Time\" && \n    data.dependantStatus === \"independant\";"
         },
         {
           "title": "Share information with trusted contact",
@@ -12490,6 +12328,26 @@
           "calculateValue": "if (\r\n  data.hasDependents === \"no\" &&\r\n  data.relationshipStatus === \"single\" &&\r\n  data.outOfHighSchoolFor4Years === \"no\" &&\r\n  data.howWillYouBeAttendingTheProgram === \"Full Time\" &&\r\n  data.custodyOfChildWelfare !== \"yes\"\r\n) {\r\n  instance.setValue(true);\r\n} else {\r\n  instance.setValue(false);\r\n}\r\n",
           "calculateServer": true,
           "lockKey": true
+        },
+        {
+          "input": true,
+          "tableView": false,
+          "key": "dependantStatus",
+          "label": "Dependant Status",
+          "protected": false,
+          "unique": false,
+          "persistent": true,
+          "type": "hidden",
+          "tags": [],
+          "conditional": {
+            "show": "",
+            "when": null,
+            "eq": ""
+          },
+          "properties": {},
+          "calculateServer": true,
+          "calculateValue": "/**\r\n * When parent information is entered if student selects\r\n * both the parents passed away \r\n * or estranged from both of my parents then consider the\r\n * student as not dependant.\r\n */\r\nconst isDependant =\r\n  data.showParentInformation &&\r\n  (data.parentbcResident === \"yes\" || data.parentbcResident === \"no\");\r\n\r\nvalue = isDependant ? \"dependant\" : \"independant\";",
+          "lockKey": true
         }
       ],
       "input": false,
@@ -31744,26 +31602,6 @@
           ],
           "id": "emvzoox",
           "lockKey": true
-        },
-        {
-          "input": true,
-          "tableView": false,
-          "key": "dependantstatus",
-          "label": "Dependant Status",
-          "protected": false,
-          "unique": false,
-          "persistent": true,
-          "type": "hidden",
-          "tags": [],
-          "conditional": {
-            "show": "",
-            "when": null,
-            "eq": ""
-          },
-          "properties": {},
-          "calculateServer": true,
-          "calculateValue": "/**\r\n * When parent information is entered if student selects\r\n * both the parents passed away \r\n * or estranged from both of my parents then consider the\r\n * student as not dependant.\r\n */\r\nconst isDependant =\r\n  data.showParentInformation &&\r\n  (data.parentbcResident === \"yes\" || data.parentbcResident === \"no\");\r\n\r\nvalue = isDependant ? \"dependant\" : \"independant\";",
-          "lockKey": true
         }
       ],
       "input": false,

From cbf5e30666b0f41158bfbd8846b98c42d1500b63 Mon Sep 17 00:00:00 2001
From: Andre Pestana <andre.pestana@aot-technologies.com>
Date: Wed, 15 Jan 2025 15:15:59 -0800
Subject: [PATCH 2/4] fixed condition

---
 sources/packages/forms/src/form-definitions/sfaa2025-26.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sources/packages/forms/src/form-definitions/sfaa2025-26.json b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
index 6ba4095c85..0bfe2e8e71 100644
--- a/sources/packages/forms/src/form-definitions/sfaa2025-26.json
+++ b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
@@ -10918,7 +10918,7 @@
           },
           "properties": {},
           "lockKey": true,
-          "customConditional": "show = data.howWillYouBeAttendingTheProgram === \"Full Time\" && \n    data.dependantStatus === \"independant\";"
+          "customConditional": "show = data.dependantStatus === \"independant\";"
         },
         {
           "title": "Share information with trusted contact",

From 1c9a452037631f3ed4e04b4adfa12e7888e6819c Mon Sep 17 00:00:00 2001
From: Andre Pestana <andre.pestana@aot-technologies.com>
Date: Thu, 16 Jan 2025 12:42:22 -0800
Subject: [PATCH 3/4] changed logic to only show BC residency to either
 part-time or full-time when all the fields are populated and student
 considered independant

---
 sources/packages/forms/src/form-definitions/sfaa2025-26.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sources/packages/forms/src/form-definitions/sfaa2025-26.json b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
index 0bfe2e8e71..4e735d0fa2 100644
--- a/sources/packages/forms/src/form-definitions/sfaa2025-26.json
+++ b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
@@ -12346,7 +12346,7 @@
           },
           "properties": {},
           "calculateServer": true,
-          "calculateValue": "/**\r\n * When parent information is entered if student selects\r\n * both the parents passed away \r\n * or estranged from both of my parents then consider the\r\n * student as not dependant.\r\n */\r\nconst isDependant =\r\n  data.showParentInformation &&\r\n  (data.parentbcResident === \"yes\" || data.parentbcResident === \"no\");\r\n\r\nvalue = isDependant ? \"dependant\" : \"independant\";",
+          "calculateValue": "/**\r\n * Full-time student will only be considered independant if\r\n * parent information does not need to be entered (showParentInformation) or \r\n * if parent information does not need to be entered and student selects\r\n * both the parents passed away \r\n * or estranged from both of my parents. \r\n * Otherwise, student is considered dependant.\r\n */\r\nif (data.howWillYouBeAttendingTheProgram === \"Part Time\") {\r\n\tinstance.setValue(\"independant\");\r\n} else if (data.showParentInformation) {\r\n\tconst doesNotHaveParents = !!data.parentbcResident && (data.parentbcResident === \"bothOfMyHaveParentsHavePassedAwayAndIHaveNoLegalGuardian\" || data.parentbcResident === \"estranged\");\r\n\tinstance.setValue(doesNotHaveParents ? \"independant\" : \"dependant\");\r\n} else {\r\n\tinstance.setValue(\"independant\");\r\n}\r\n",
           "lockKey": true
         }
       ],

From 523cb9c6afdb1ea1cba68e2d7d3332afcc18b239 Mon Sep 17 00:00:00 2001
From: Andre Pestana <andre.pestana@aot-technologies.com>
Date: Thu, 16 Jan 2025 12:49:16 -0800
Subject: [PATCH 4/4] improved logic

---
 sources/packages/forms/src/form-definitions/sfaa2025-26.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sources/packages/forms/src/form-definitions/sfaa2025-26.json b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
index 4e735d0fa2..de30988d6c 100644
--- a/sources/packages/forms/src/form-definitions/sfaa2025-26.json
+++ b/sources/packages/forms/src/form-definitions/sfaa2025-26.json
@@ -12346,7 +12346,7 @@
           },
           "properties": {},
           "calculateServer": true,
-          "calculateValue": "/**\r\n * Full-time student will only be considered independant if\r\n * parent information does not need to be entered (showParentInformation) or \r\n * if parent information does not need to be entered and student selects\r\n * both the parents passed away \r\n * or estranged from both of my parents. \r\n * Otherwise, student is considered dependant.\r\n */\r\nif (data.howWillYouBeAttendingTheProgram === \"Part Time\") {\r\n\tinstance.setValue(\"independant\");\r\n} else if (data.showParentInformation) {\r\n\tconst doesNotHaveParents = !!data.parentbcResident && (data.parentbcResident === \"bothOfMyHaveParentsHavePassedAwayAndIHaveNoLegalGuardian\" || data.parentbcResident === \"estranged\");\r\n\tinstance.setValue(doesNotHaveParents ? \"independant\" : \"dependant\");\r\n} else {\r\n\tinstance.setValue(\"independant\");\r\n}\r\n",
+          "calculateValue": "/**\r\n * Full-time student will only be considered independant if\r\n * parent information does not need to be entered (showParentInformation) or \r\n * if parent information does not need to be entered and student selects\r\n * both the parents passed away \r\n * or estranged from both of my parents. \r\n * Otherwise, student is considered dependant.\r\n */\r\nif (data.howWillYouBeAttendingTheProgram === \"Part Time\") {\r\n\tinstance.setValue(\"independant\");\r\n} else if (data.showParentInformation) {\r\n\tconst doesNotHaveParents = (data.parentbcResident === \"bothOfMyHaveParentsHavePassedAwayAndIHaveNoLegalGuardian\" || data.parentbcResident === \"estranged\");\r\n\tinstance.setValue(doesNotHaveParents ? \"independant\" : \"dependant\");\r\n} else {\r\n\tinstance.setValue(\"independant\");\r\n}\r\n",
           "lockKey": true
         }
       ],