From 00d85cd00ddd797bd3a932f99d580e9f46d154c7 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Thu, 8 Jan 2026 18:03:30 -0400 Subject: [PATCH 01/15] Added schema for temporary teacher application --- schemas/temporary-teacher-application.json | 643 +++++++++++++++++++++ 1 file changed, 643 insertions(+) create mode 100644 schemas/temporary-teacher-application.json diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json new file mode 100644 index 0000000..533269b --- /dev/null +++ b/schemas/temporary-teacher-application.json @@ -0,0 +1,643 @@ +{ + "id": "temporary-teacher-application", + "name": "Temporary Teacher Application", + "description": "Apply to be a temporary teacher", + "fields": [ + { + "name": "applicant", + "type": "object", + "required": true, + "fields": [ + { + "name": "firstName", + "type": "string", + "label": "First Name", + "required": true, + "validations": { + "min": 2, + "max": 50 + } + }, + { + "name": "middleName", + "type": "string", + "label": "Middle name(s)", + "required": false, + "validations": { + "min": 2, + "max": 50 + } + }, + { + "name": "lastName", + "type": "string", + "label": "Last Name", + "required": true, + "validations": { + "min": 2, + "max": 50 + } + }, + { + "name": "dateOfBirth", + "type": "date", + "label": "Date of Birth", + "required": true, + "validations": { + "regex": "^\\d{4}-\\d{2}-\\d{2}$", + "message": "Date must be in YYYY-MM-DD format" + } + }, + { + "name": "placeOfBirth", + "type": "string", + "label": "Place of birth", + "required": true + }, + { + "name": "nationality", + "type": "array", + "label": "Nationality", + "required": true, + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + }, + { + "name": "sex", + "type": "select", + "label": "Sex", + "required": true, + "options": [ + { + "label": "Male", + "value": "male" + }, + { + "label": "Female", + "value": "female" + } + ], + "validations": { + "regex": "^(male|female)$", + "message": "Must select a valid sex" + } + }, + { + "name": "martialStatus", + "type": "select", + "label": "Martial status", + "required": true, + "options": [ + { + "label": "Single", + "value": "single" + }, + { + "label": "Married", + "value": "married" + }, + { + "label": "Divorced", + "value": "divorced" + } + ], + "validations": { + "regex": "^(male|female)$", + "message": "Must select a valid sex" + } + }, + { + "name": "nationalIdNumber", + "type": "string", + "label": "National Identification (ID) number", + "required": false, + "validations": { + "regex": "^[0-9]{6}-[0-9]{4}$", + "message": "Invalid ID number." + } + }, + { + "name": "passportNumber", + "type": "string", + "label": "Passport Number (#)", + "required": false + }, + { + "name": "nationalInsuranceNumber", + "type": "string", + "label": "National Insurance number (NIS)", + "required": false + } + ] + }, + { + "name": "barbadosResidencyDuration", + "label": "How long have you lived in Barbados?", + "type": "string", + "required": true, + "validations": { + "min": 2, + "max": 20 + } + }, + { + "name": "contactDetails", + "type": "object", + "required": true, + "fields": [ + { + "name": "addressLine1", + "type": "string", + "label": "Address Line 1", + "required": true + }, + { + "name": "addressLine2", + "type": "string", + "label": "Address Line 2", + "required": false + }, + { + "name": "country", + "type": "select", + "label": "Country", + "required": true, + "options": [ + { + "label": "Barbados", + "value": "barbados" + } + ] + }, + { + "name": "parish", + "type": "select", + "label": "Parish", + "required": true, + "options": [ + { + "value": "christ-church", + "label": "Christ Church" + }, + { + "value": "st-andrew", + "label": "St Andrew" + }, + { + "value": "st-george", + "label": "St George" + }, + { + "value": "st-james", + "label": "St James" + }, + { + "value": "st-john", + "label": "St John" + }, + { + "value": "st-joseph", + "label": "St Joseph" + }, + { + "value": "st-lucy", + "label": "St Lucy" + }, + { + "value": "st-michael", + "label": "St Michael" + }, + { + "value": "st-peter", + "label": "St Peter" + }, + { + "value": "st-philip", + "label": "St Philip" + }, + { + "value": "st-thomas", + "label": "St Question, so for boolean Thomas" + } + ] + }, + { + "name": "postcode", + "type": "string", + "label": "Postcode", + "required": false + }, + { + "name": "emailAddress", + "type": "email", + "label": "Email address", + "required": true + }, + { + "name": "telephoneNumber", + "type": "string", + "label": "Telephone Number", + "required": true, + "validations": { + "regex": "^\\+?[0-9]{10,15}$", + "message": "Telephone number must be 10-15 digits" + } + } + ] + }, + { + "name": "applicant-education", + "type": "object", + "required": true, + "fields": [ + { + "name": "nameOfInstitution", + "type": "string", + "label": "Name of Institution", + "required": true + }, + { + "name": "country", + "type": "string", + "label": "Country", + "required": false + }, + { + "name": "startYear", + "label": "Start Year", + "type": "number", + "required": true, + "validations": { + "min": 1950 + } + }, + { + "name": "endYear", + "label": "End Year", + "type": "number", + "required": true, + "validations": { + "min": 1950 + } + }, + { + "name": "anotherEducation", + "label": "Do you want to add another education experience?", + "type": "boolean", + "required": true, + "options": [ + { + "label": "Yes", + "value": "yes" + }, + { + "label": "No", + "value": "no" + } + ] + } + ] + }, + { + "name": "applicantQualification", + "type": "object", + "required": true, + "fields": [ + { + "name": "subject", + "label": "Subject", + "type": "string", + "required": true + }, + { + "name": "examiningBody", + "label": "Examining Body", + "type": "string", + "required": true + }, + { + "name": "year", + "label": "Year", + "type": "number", + "required": true, + "validations": { + "min": 1950 + } + }, + { + "name": "levelGrade", + "label": "Level / Grade Obtained", + "type": "string", + "required": true + }, + { + "name": "anotherQualification", + "label": "Do you want to add another qualification", + "type": "boolean", + "required": true, + "options": [ + "Yes", + "No" + ] + } + ] + }, + { + "name": "applicantWorkExperience", + "required": true, + "type": "object", + "fields": [ + { + "name": "employerName", + "label": "Name of employer or organization", + "type": "string", + "required": true + }, + { + "name": "positionHeld", + "label": "Position held", + "type": "string", + "required": true + }, + { + "name": "fromYear", + "label": "From (year)", + "type": "number", + "required": true, + "validations": { + "min": 1950 + } + }, + { + "name": "toYear", + "label": "To (year)", + "type": "number", + "required": false, + "validations": { + "min": 1950 + } + }, + { + "name": "currentlyWorking", + "label": "I am currently working here", + "type": "boolean", + "required": false + }, + { + "name": "tasks", + "label": "Your main tasks", + "required": true, + "type": "string" + }, + { + "name": "anotherExperience", + "required": true, + "type": "boolean", + "label": "Do you want to add another experience?", + "options": [ + "Yes", + "No" + ] + } + ] + }, + { + "name": "skillsAndExperience", + "type": "object", + "required": true, + "fields": [ + { + "name": "athleticsGamesCraftSkills", + "label": "Athletics, games, or craft skills", + "type": "string", + "required": false + }, + { + "name": "youthCommunityVolunteerGroups", + "label": "Experience in youth, community, or volunteer groups", + "type": "string", + "required": false + }, + { + "name": "responsibilityPositions", + "label": "Positions of responsibility held", + "type": "string", + "required": false + }, + { + "name": "extraDetails", + "label": "Anything else relevant to your application?", + "type": "string", + "required": false + } + ] + }, + { + "name": "reference", + "required": true, + "type": "object", + "fields": [ + { + "name": "title", + "label": "Title", + "required": true, + "type": "select", + "options": [ + { + "label": "Mr", + "value": "mr" + }, + { + "label": "Mrs", + "value": "mrs" + }, + { + "label": "Miss", + "value": "miss" + } + ] + }, + { + "name": "firstName", + "type": "string", + "label": "First Name", + "required": true, + "validations": { + "min": 2, + "max": 50 + } + }, + { + "name": "lastName", + "type": "string", + "label": "Last Name", + "required": true, + "validations": { + "min": 2, + "max": 50 + } + }, + { + "name": "addressLine1", + "type": "string", + "label": "Address Line 1", + "required": true + }, + { + "name": "addressLine2", + "type": "string", + "label": "Address Line 2", + "required": false + }, + { + "name": "country", + "type": "select", + "label": "Country", + "required": true, + "options": [ + { + "label": "Barbados", + "value": "barbados" + } + ] + }, + { + "name": "parish", + "type": "select", + "label": "Parish", + "required": true, + "options": [ + { + "value": "christ-church", + "label": "Christ Church" + }, + { + "value": "st-andrew", + "label": "St Andrew" + }, + { + "value": "st-george", + "label": "St George" + }, + { + "value": "st-james", + "label": "St James" + }, + { + "value": "st-john", + "label": "St John" + }, + { + "value": "st-joseph", + "label": "St Joseph" + }, + { + "value": "st-lucy", + "label": "St Lucy" + }, + { + "value": "st-michael", + "label": "St Michael" + }, + { + "value": "st-peter", + "label": "St Peter" + }, + { + "value": "st-philip", + "label": "St Philip" + }, + { + "value": "st-thomas", + "label": "St Question, so for boolean Thomas" + } + ] + }, + { + "name": "postcode", + "type": "string", + "label": "Postcode", + "required": false + }, + { + "name": "occupation", + "label": "Occupation", + "required": true, + "type": "string" + }, + { + "name": "emailAddress", + "type": "email", + "label": "Email address", + "required": true + }, + { + "name": "telephoneNumber", + "type": "string", + "label": "Telephone Number", + "required": true, + "validations": { + "regex": "^\\+?[0-9]{10,15}$", + "message": "Telephone number must be 10-15 digits" + } + }, + { + "name": "anotherReference", + "required": true, + "type": "boolean", + "label": "Do you want to add another reference?", + "options": [ + "Yes", + "No" + ] + } + ] + }, + { + "name": "documents", + "type": "object", + "required": true, + "fields": [ + { + "name": "certificateDiplomaTranscript", + "label": "Upload your certificates, diplomas, and transcripts", + "required": true, + "type": "object" + }, + { + "name": "testimonials", + "label": "Upload your two testimonials", + "required": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "file1": { + "type": "file" + }, + "file2": { + "type": "file" + } + } + } + } + ] + } + ], + "processors": [ + { + "type": "email", + "config": { + "to": "{{db:temporary-teacher-application:admin_email}}", + "subject": "New Temporary Teacher Application - {{formData.firstName}} {{formData.lastName}}", + "template": "temporary-teacher-application" + } + } + ] +} From 0ae0fc2594966b249586c4e0ce996e42a68cab76 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 12 Jan 2026 09:16:33 -0400 Subject: [PATCH 02/15] Updated incorrect error for martial status --- schemas/temporary-teacher-application.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index 533269b..ee47eac 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -108,8 +108,8 @@ } ], "validations": { - "regex": "^(male|female)$", - "message": "Must select a valid sex" + "regex": "^(single|married|divorced)$", + "message": "Must select a martial status" } }, { From aef87f7f1503cd8760391a6e4f6212b342402652 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 12 Jan 2026 10:51:39 -0400 Subject: [PATCH 03/15] Created an email template for Apply to be a temp teacher --- .../temporary-teacher-application.hbs | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 src/email/templates/temporary-teacher-application.hbs diff --git a/src/email/templates/temporary-teacher-application.hbs b/src/email/templates/temporary-teacher-application.hbs new file mode 100644 index 0000000..41271b0 --- /dev/null +++ b/src/email/templates/temporary-teacher-application.hbs @@ -0,0 +1,122 @@ + + + + + + +
+

Application Submitted: Temporary Teacher

+
+
+
+

+ Dear applicant, +
+ Your application to be a temporary teacher has been submitted. +
+ Your application reference number is {{ referenceNumber }}. +

+

+ We will review your application. +
+ If we need more information or supporting documents, we will contact you using the details you provided. +

+
+
+ + + From 6dc6cbdafafd00d87def7b0a111f9856c4c4988b Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 12 Jan 2026 18:40:51 -0400 Subject: [PATCH 04/15] Nationality is now a free form field --- schemas/temporary-teacher-application.json | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index ee47eac..758a415 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -56,17 +56,9 @@ }, { "name": "nationality", - "type": "array", + "type": "string", "label": "Nationality", - "required": true, - "items": { - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - } + "required": true }, { "name": "sex", @@ -274,7 +266,7 @@ "type": "number", "required": true, "validations": { - "min": 1950 + "min": 1930 } }, { @@ -283,7 +275,7 @@ "type": "number", "required": true, "validations": { - "min": 1950 + "min": 1930 } }, { @@ -327,7 +319,7 @@ "type": "number", "required": true, "validations": { - "min": 1950 + "min": 1930 } }, { @@ -371,7 +363,7 @@ "type": "number", "required": true, "validations": { - "min": 1950 + "min": 1930 } }, { @@ -380,7 +372,7 @@ "type": "number", "required": false, "validations": { - "min": 1950 + "min": 1930 } }, { From 20d585f0206b8eb7b749359777fde2696aed5186 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 12 Jan 2026 20:19:46 -0400 Subject: [PATCH 05/15] Made residency duration its own proper page --- schemas/temporary-teacher-application.json | 21 ++++++++++++++------- src/email/templates/.djlintrc | 8 ++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 src/email/templates/.djlintrc diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index 758a415..340a599 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -130,13 +130,20 @@ }, { "name": "barbadosResidencyDuration", - "label": "How long have you lived in Barbados?", - "type": "string", - "required": true, - "validations": { - "min": 2, - "max": 20 - } + "type": "object", + "required": false, + "fields": [ + { + "name": "residencyDuration", + "label": "How long have you lived in Barbados?", + "type": "number", + "required": true, + "validations": { + "min": 2, + "max": 20 + } + } + ] }, { "name": "contactDetails", diff --git a/src/email/templates/.djlintrc b/src/email/templates/.djlintrc new file mode 100644 index 0000000..ec297a7 --- /dev/null +++ b/src/email/templates/.djlintrc @@ -0,0 +1,8 @@ +{ + "extension": "html.hbs", + "indent": "2", + "format_css": true, + "css": { + "indent_size": 4 + } +} From 52cf6bc7a93c426645a045084cfb294449a4e741 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Thu, 15 Jan 2026 16:37:20 -0400 Subject: [PATCH 06/15] Will now consistently use camel case for name fields --- schemas/temporary-teacher-application.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index 340a599..598035c 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -251,7 +251,7 @@ ] }, { - "name": "applicant-education", + "name": "applicantEducation", "type": "object", "required": true, "fields": [ From 0daf86f94a6e2c890f50215f29f218727e4b1544 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 19 Jan 2026 12:08:57 -0400 Subject: [PATCH 07/15] Removed my linting configuration --- .gitignore | 3 ++- src/email/templates/.djlintrc | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 src/email/templates/.djlintrc diff --git a/.gitignore b/.gitignore index ea48d65..00d593e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ lerna-debug.log* !.vscode/launch.json !.vscode/extensions.json -.env \ No newline at end of file +.env +.djlintrc diff --git a/src/email/templates/.djlintrc b/src/email/templates/.djlintrc deleted file mode 100644 index ec297a7..0000000 --- a/src/email/templates/.djlintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extension": "html.hbs", - "indent": "2", - "format_css": true, - "css": { - "indent_size": 4 - } -} From 4ebe2e39a217d30665c1b5196f410fd74181007a Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 19 Jan 2026 13:17:18 -0400 Subject: [PATCH 08/15] Updated schema for Backend Validation --- schemas/temporary-teacher-application.json | 272 +++++---------------- 1 file changed, 67 insertions(+), 205 deletions(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index 598035c..a260986 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -62,19 +62,9 @@ }, { "name": "sex", - "type": "select", + "type": "string", "label": "Sex", "required": true, - "options": [ - { - "label": "Male", - "value": "male" - }, - { - "label": "Female", - "value": "female" - } - ], "validations": { "regex": "^(male|female)$", "message": "Must select a valid sex" @@ -82,23 +72,9 @@ }, { "name": "martialStatus", - "type": "select", + "type": "string", "label": "Martial status", "required": true, - "options": [ - { - "label": "Single", - "value": "single" - }, - { - "label": "Married", - "value": "married" - }, - { - "label": "Divorced", - "value": "divorced" - } - ], "validations": { "regex": "^(single|married|divorced)$", "message": "Must select a martial status" @@ -167,70 +143,29 @@ "type": "select", "label": "Country", "required": true, - "options": [ - { - "label": "Barbados", - "value": "barbados" - } - ] + "validations": { + "regex": "^barbados$" + } }, { "name": "parish", - "type": "select", + "type": "string", "label": "Parish", "required": true, - "options": [ - { - "value": "christ-church", - "label": "Christ Church" - }, - { - "value": "st-andrew", - "label": "St Andrew" - }, - { - "value": "st-george", - "label": "St George" - }, - { - "value": "st-james", - "label": "St James" - }, - { - "value": "st-john", - "label": "St John" - }, - { - "value": "st-joseph", - "label": "St Joseph" - }, - { - "value": "st-lucy", - "label": "St Lucy" - }, - { - "value": "st-michael", - "label": "St Michael" - }, - { - "value": "st-peter", - "label": "St Peter" - }, - { - "value": "st-philip", - "label": "St Philip" - }, - { - "value": "st-thomas", - "label": "St Question, so for boolean Thomas" - } - ] - }, - { - "name": "postcode", - "type": "string", - "label": "Postcode", - "required": false + "validations": { + "regex": "^(christ-church|st-andrew|st-george|st-james|st-john|st-joseph|st-lucy|st-michael|st-peter|st-philip|st-thomas)$", + "message": "Must select a valid parish" + } + }, + { + "name": "postalCode", + "type": "string", + "label": "Postal Code", + "required": false, + "validations": { + "regex": "^BB\\d{5}$", + "message": "Enter a valid postal code (e.g., BB17004)" + } }, { "name": "emailAddress", @@ -242,11 +177,7 @@ "name": "telephoneNumber", "type": "string", "label": "Telephone Number", - "required": true, - "validations": { - "regex": "^\\+?[0-9]{10,15}$", - "message": "Telephone number must be 10-15 digits" - } + "required": true } ] }, @@ -288,18 +219,12 @@ { "name": "anotherEducation", "label": "Do you want to add another education experience?", - "type": "boolean", + "type": "string", "required": true, - "options": [ - { - "label": "Yes", - "value": "yes" - }, - { - "label": "No", - "value": "no" - } - ] + "validations": { + "regex": "^(yes|no)$", + "message": "Must select an option" + } } ] }, @@ -338,12 +263,11 @@ { "name": "anotherQualification", "label": "Do you want to add another qualification", - "type": "boolean", + "type": "string", "required": true, - "options": [ - "Yes", - "No" - ] + "validations": { + "regex": "^(yes|no)$" + } } ] }, @@ -397,12 +321,12 @@ { "name": "anotherExperience", "required": true, - "type": "boolean", + "type": "string", "label": "Do you want to add another experience?", - "options": [ - "Yes", - "No" - ] + "validations": { + "regex": "^(yes|no)$", + "message": "Must select an option" + } } ] }, @@ -446,21 +370,11 @@ "name": "title", "label": "Title", "required": true, - "type": "select", - "options": [ - { - "label": "Mr", - "value": "mr" - }, - { - "label": "Mrs", - "value": "mrs" - }, - { - "label": "Miss", - "value": "miss" - } - ] + "type": "string", + "validations": { + "regex": "^(mr|ms|mrs)$", + "message": "Must select a valid title" + } }, { "name": "firstName", @@ -496,73 +410,33 @@ }, { "name": "country", - "type": "select", + "type": "string", "label": "Country", "required": true, - "options": [ - { - "label": "Barbados", - "value": "barbados" - } - ] + "validations": { + "regex": "^(barbados)$", + "message": "Must select an option" + } }, { "name": "parish", "type": "select", "label": "Parish", "required": true, - "options": [ - { - "value": "christ-church", - "label": "Christ Church" - }, - { - "value": "st-andrew", - "label": "St Andrew" - }, - { - "value": "st-george", - "label": "St George" - }, - { - "value": "st-james", - "label": "St James" - }, - { - "value": "st-john", - "label": "St John" - }, - { - "value": "st-joseph", - "label": "St Joseph" - }, - { - "value": "st-lucy", - "label": "St Lucy" - }, - { - "value": "st-michael", - "label": "St Michael" - }, - { - "value": "st-peter", - "label": "St Peter" - }, - { - "value": "st-philip", - "label": "St Philip" - }, - { - "value": "st-thomas", - "label": "St Question, so for boolean Thomas" - } - ] - }, - { - "name": "postcode", - "type": "string", - "label": "Postcode", - "required": false + "validations": { + "regex": "^(christ-church|st-andrew|st-george|st-james|st-john|st-joseph|st-lucy|st-michael|st-peter|st-philip|st-thomas)$", + "message": "Must select a valid parish" + } + }, + { + "name": "postalCode", + "type": "string", + "label": "Postal code", + "required": false, + "validations": { + "regex": "^BB\\d{5}$", + "message": "Enter a valid postal code (e.g., BB17004)" + } }, { "name": "occupation", @@ -580,21 +454,17 @@ "name": "telephoneNumber", "type": "string", "label": "Telephone Number", - "required": true, - "validations": { - "regex": "^\\+?[0-9]{10,15}$", - "message": "Telephone number must be 10-15 digits" - } + "required": true }, { "name": "anotherReference", "required": true, - "type": "boolean", + "type": "string", "label": "Do you want to add another reference?", - "options": [ - "Yes", - "No" - ] + "validations": { + "regex": "^(yes|no)$", + "message": "Must select a valid option" + } } ] }, @@ -607,7 +477,7 @@ "name": "certificateDiplomaTranscript", "label": "Upload your certificates, diplomas, and transcripts", "required": true, - "type": "object" + "type": "string" }, { "name": "testimonials", @@ -615,15 +485,7 @@ "required": true, "type": "array", "items": { - "type": "object", - "properties": { - "file1": { - "type": "file" - }, - "file2": { - "type": "file" - } - } + "type": "string" } } ] From 8b980f5d4b84c391b17726e5149277055867c1d9 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 19 Jan 2026 15:34:56 -0400 Subject: [PATCH 09/15] Added support for receipt email --- schemas/temporary-teacher-application.json | 18 ++- .../temporary-teacher-application-receipt.hbs | 122 ++++++++++++++++++ 2 files changed, 135 insertions(+), 5 deletions(-) create mode 100644 src/email/templates/temporary-teacher-application-receipt.hbs diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index a260986..c706389 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -71,13 +71,13 @@ } }, { - "name": "martialStatus", + "name": "maritalStatus", "type": "string", - "label": "Martial status", + "label": "Marital status", "required": true, "validations": { "regex": "^(single|married|divorced)$", - "message": "Must select a martial status" + "message": "Must select a marital status" } }, { @@ -122,7 +122,7 @@ ] }, { - "name": "contactDetails", + "name": "contact", "type": "object", "required": true, "fields": [ @@ -496,9 +496,17 @@ "type": "email", "config": { "to": "{{db:temporary-teacher-application:admin_email}}", - "subject": "New Temporary Teacher Application - {{formData.firstName}} {{formData.lastName}}", + "subject": "New Temporary Teacher Application - {{formData.applicant.firstName}} {{formData.applicant.lastName}}", "template": "temporary-teacher-application" } + }, + { + "type": "email", + "config": { + "to": "{{formData.contact.emailAddress}}", + "subject": "Application Received - Government of Barbados", + "template": "temporary-teacher-application-receipt" + } } ] } diff --git a/src/email/templates/temporary-teacher-application-receipt.hbs b/src/email/templates/temporary-teacher-application-receipt.hbs new file mode 100644 index 0000000..41271b0 --- /dev/null +++ b/src/email/templates/temporary-teacher-application-receipt.hbs @@ -0,0 +1,122 @@ + + + + + + +
+

Application Submitted: Temporary Teacher

+
+
+
+

+ Dear applicant, +
+ Your application to be a temporary teacher has been submitted. +
+ Your application reference number is {{ referenceNumber }}. +

+

+ We will review your application. +
+ If we need more information or supporting documents, we will contact you using the details you provided. +

+
+
+ + + From e13926dbacb77b1d1018566925c6bcf1a4c37628 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Mon, 19 Jan 2026 19:52:20 -0400 Subject: [PATCH 10/15] Started development on Added Admin Email Template --- .../temporary-teacher-application.hbs | 377 +++++++++++++----- 1 file changed, 270 insertions(+), 107 deletions(-) diff --git a/src/email/templates/temporary-teacher-application.hbs b/src/email/templates/temporary-teacher-application.hbs index 41271b0..990043b 100644 --- a/src/email/templates/temporary-teacher-application.hbs +++ b/src/email/templates/temporary-teacher-application.hbs @@ -1,122 +1,285 @@ -
-

Application Submitted: Temporary Teacher

+

Temporary Teacher Application

+

A new Temporary Teacher Application has been submitted.

+
Applicant
+
+ Name: + {{ applicant.firstName }} + {{#if applicant.middleName}} + {{ applicant.middleName }} + {{/if}} + {{ applicant.lastName }} +
+
+ Date of Birth: + {{ applicant.dateOfBirth }} +
+
+ Place of birth: + {{ applicant.placeOfBirth }} +
+
+ Nationality: + {{ applicant.nationality }} +
+
+ Sex: + {{ applicant.sex }} +
+
+ Marital Status: + {{ applicant.maritalStatus }} +
+ {{#if applicant.nationalIdNumber}} +
+ National Identification (ID) Number: + {{ applicant.nationalIdNumber }} +
+ {{/if}} + {{#if applicant.passportNumber}} +
+ Passport Number (#): + {{ applicant.passportNumber }} +
+ {{/if}} + {{#if applicant.nationalInsuranceNumber}} +
+ National Insurance Number (NIS): + {{ applicant.nationalInsuranceNumber }} +
+ {{/if}} +
+
+
Barbados Residency Duration
+
+ How long have you lived in Barbados?: + {{ barbadosResidencyDuration.residencyDuration }} +
+
+
+
Contact
+
+ Address: + {{ contact.addressLine1 }} + {{#if contact.addressLine2}} + {{ contact.addressLine2 }} + {{/if}} + +
+
+ Country: + {{ contact.country }} +
+
+ Parish: + {{ contact.parish }} +
+ {{#if contact.postalCode}} +
+ Postal Code: + {{ contact.postalCode }} +
+ {{/if}} +
+ Email address: + {{ contact.emailAddress }} +
+
+ Telephone Number: + {{ contact.telephoneNumber }} +
+
+
+
Applicant Education
+
+ Name of Institution: + {{ applicantEducation.nameOfInstitution }} +
+ {{#if applicantEducation.country}} +
+ Country: + {{ applicantEducation.country }} +
+ {{/if}} +
+ Start Year: + {{ applicantEducation.startYear }} +
+
+ End Year: + {{ applicantEducation.endYear }} +
+
+ Do you want to add another education experience?: + {{ applicantEducation.anotherEducation }} +
+
+
+
Applicant Qualification
+
+ Subject: + {{ applicantQualification.subject }} +
+
+ Examining Body: + {{ applicantQualification.examiningBody }} +
+
+ Year: + {{ applicantQualification.year }} +
+
+ Level / Grade Obtained: + {{ applicantQualification.levelGrade }} +
+
+ Do you want to add another qualification: + {{ applicantQualification.anotherQualification }} +
+
+
+
Applicant Work Experience
+
+ Name of employer or organization: + {{ applicantWorkExperience.employerName }} +
+
+ Position held: + {{ applicantWorkExperience.positionHeld }} +
+
+ From (year): + {{ applicantWorkExperience.fromYear }} +
+ {{#if applicantWorkExperience.toYear}} +
+ To (year): + {{ applicantWorkExperience.toYear }} +
+ {{/if}} + {{#if applicantWorkExperience.currentlyWorking}} +
+ I am currently working here: + {{ applicantWorkExperience.currentlyWorking }} +
+ {{/if}} +
+ Your main tasks: + {{ applicantWorkExperience.tasks }} +
+
+ Do you want to add another experience?: + {{ applicantWorkExperience.anotherExperience }} +
+
+
+
Skills And Experience
+ {{#if skillsAndExperience.athleticsGamesCraftSkills}} +
+ Athletics, games, or craft skills: + {{ skillsAndExperience.athleticsGamesCraftSkills }} +
+ {{/if}} + {{#if skillsAndExperience.youthCommunityVolunteerGroups}} +
+ Experience in youth, community, or volunteer groups: + {{ skillsAndExperience.youthCommunityVolunteerGroups }} +
+ {{/if}} + {{#if skillsAndExperience.responsibilityPositions}} +
+ Positions of responsibility held: + {{ skillsAndExperience.responsibilityPositions }} +
+ {{/if}} + {{#if skillsAndExperience.extraDetails}} +
+ Anything else relevant to your application?: + {{ skillsAndExperience.extraDetails }} +
+ {{/if}} +
+
+
Reference
+
+ Title: + {{ reference.title }} +
+
+ First Name: + {{ reference.firstName }} +
+
+ Last Name: + {{ reference.lastName }} +
+
+ Address Line 1: + {{ reference.addressLine1 }} +
+ {{#if reference.addressLine2}} +
+ Address Line 2: + {{ reference.addressLine2 }} +
+ {{/if}} +
+ Country: + {{ reference.country }} +
+
+ Parish: + {{ reference.parish }} +
+ {{#if reference.postalCode}} +
+ Postal code: + {{ reference.postalCode }} +
+ {{/if}} +
+ Occupation: + {{ reference.occupation }} +
+
+ Email address: + {{ reference.emailAddress }} +
+
+ Telephone Number: + {{ reference.telephoneNumber }} +
+
+ Do you want to add another reference?: + {{ reference.anotherReference }} +
+
+
+
Documents
+
+ Upload your certificates, diplomas, and transcripts: + {{ documents.certificateDiplomaTranscript }} +
+
+ Upload your two testimonials: + {{ documents.testimonials }} +
+
+
- From 364705c89d5fbdc3882a859ac6bb67cd52e7ed1b Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Tue, 20 Jan 2026 14:36:47 -0400 Subject: [PATCH 11/15] Will now handle repeatable fields properly --- schemas/temporary-teacher-application.json | 232 +++++++-------------- 1 file changed, 74 insertions(+), 158 deletions(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index c706389..4b56b28 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -183,152 +183,99 @@ }, { "name": "applicantEducation", - "type": "object", + "type": "array", + "label": "Applicant Information", "required": true, - "fields": [ - { - "name": "nameOfInstitution", - "type": "string", - "label": "Name of Institution", - "required": true - }, - { - "name": "country", - "type": "string", - "label": "Country", - "required": false - }, - { - "name": "startYear", - "label": "Start Year", - "type": "number", - "required": true, - "validations": { - "min": 1930 - } - }, - { - "name": "endYear", - "label": "End Year", - "type": "number", - "required": true, - "validations": { - "min": 1930 - } - }, - { - "name": "anotherEducation", - "label": "Do you want to add another education experience?", - "type": "string", - "required": true, - "validations": { - "regex": "^(yes|no)$", - "message": "Must select an option" + "items": { + "type": "object", + "properties": { + "nameOfInstitution": { + "type": "string" + }, + "country": { + "type": "string", + "required": false + }, + "startYear": { + "type": "number", + "validations": { + "min": 1930 + } + }, + "endYear": { + "type": "number", + "validations": { + "min": 1930 + } } } - ] + } }, { - "name": "applicantQualification", - "type": "object", + "name": "qualifications", + "type": "array", + "label": "Applicant Qualifications", "required": true, - "fields": [ - { - "name": "subject", - "label": "Subject", - "type": "string", - "required": true - }, - { - "name": "examiningBody", - "label": "Examining Body", - "type": "string", - "required": true - }, - { - "name": "year", - "label": "Year", - "type": "number", - "required": true, - "validations": { - "min": 1930 - } - }, - { - "name": "levelGrade", - "label": "Level / Grade Obtained", - "type": "string", - "required": true - }, - { - "name": "anotherQualification", - "label": "Do you want to add another qualification", - "type": "string", - "required": true, - "validations": { - "regex": "^(yes|no)$" + "items": { + "type": "object", + "properties": { + "subject": { + "type": "string" + }, + "examiningBody": { + "type": "string", + "required": true + }, + "year": { + "type": "number", + "validations": { + "min": 1930 + } + }, + "levelGrade": { + "type": "string", + "required": true } } - ] + } }, { - "name": "applicantWorkExperience", + "name": "workExperiences", "required": true, - "type": "object", - "fields": [ - { - "name": "employerName", - "label": "Name of employer or organization", + "type": "array", + "label": "Applicant Work Experience", + "items": { + "employerName": { "type": "string", "required": true }, - { - "name": "positionHeld", - "label": "Position held", + "positionHeld": { "type": "string", "required": true }, - { - "name": "fromYear", - "label": "From (year)", + "fromYear": { "type": "number", "required": true, "validations": { "min": 1930 } }, - { - "name": "toYear", - "label": "To (year)", + "toYear": { "type": "number", "required": false, "validations": { "min": 1930 } }, - { - "name": "currentlyWorking", - "label": "I am currently working here", + "currentlyWorking": { "type": "boolean", "required": false }, - { - "name": "tasks", - "label": "Your main tasks", + "tasks": { "required": true, "type": "string" - }, - { - "name": "anotherExperience", - "required": true, - "type": "string", - "label": "Do you want to add another experience?", - "validations": { - "regex": "^(yes|no)$", - "message": "Must select an option" - } } - ] + } }, { "name": "skillsAndExperience", @@ -362,13 +309,12 @@ ] }, { - "name": "reference", + "name": "references", "required": true, - "type": "object", - "fields": [ - { - "name": "title", - "label": "Title", + "type": "array", + "label": "Tell us about your reference", + "items": { + "title": { "required": true, "type": "string", "validations": { @@ -376,97 +322,67 @@ "message": "Must select a valid title" } }, - { - "name": "firstName", + "firstName": { "type": "string", - "label": "First Name", "required": true, "validations": { "min": 2, "max": 50 } }, - { - "name": "lastName", + "lastName": { "type": "string", - "label": "Last Name", "required": true, "validations": { "min": 2, "max": 50 } }, - { - "name": "addressLine1", + "addressLine1": { "type": "string", - "label": "Address Line 1", "required": true }, - { - "name": "addressLine2", + "addressLine2": { "type": "string", - "label": "Address Line 2", "required": false }, - { - "name": "country", + "country": { "type": "string", - "label": "Country", "required": true, "validations": { "regex": "^(barbados)$", "message": "Must select an option" } }, - { - "name": "parish", + "parish": { "type": "select", - "label": "Parish", "required": true, "validations": { "regex": "^(christ-church|st-andrew|st-george|st-james|st-john|st-joseph|st-lucy|st-michael|st-peter|st-philip|st-thomas)$", "message": "Must select a valid parish" } }, - { - "name": "postalCode", + "postalCode": { "type": "string", - "label": "Postal code", "required": false, "validations": { "regex": "^BB\\d{5}$", "message": "Enter a valid postal code (e.g., BB17004)" } }, - { - "name": "occupation", - "label": "Occupation", + "occupation": { "required": true, "type": "string" }, - { - "name": "emailAddress", + "emailAddress": { "type": "email", - "label": "Email address", "required": true }, - { - "name": "telephoneNumber", + "telephoneNumber": { "type": "string", - "label": "Telephone Number", "required": true - }, - { - "name": "anotherReference", - "required": true, - "type": "string", - "label": "Do you want to add another reference?", - "validations": { - "regex": "^(yes|no)$", - "message": "Must select a valid option" - } } - ] + } }, { "name": "documents", From 127a49e6b414555d212afde7ce857913a238c5fd Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Tue, 20 Jan 2026 18:01:46 -0400 Subject: [PATCH 12/15] Updated HBS to match array fields --- .../temporary-teacher-application.hbs | 610 ++++++++++-------- 1 file changed, 329 insertions(+), 281 deletions(-) diff --git a/src/email/templates/temporary-teacher-application.hbs b/src/email/templates/temporary-teacher-application.hbs index 990043b..4c3e6ad 100644 --- a/src/email/templates/temporary-teacher-application.hbs +++ b/src/email/templates/temporary-teacher-application.hbs @@ -1,285 +1,333 @@ - - - - -
-

Temporary Teacher Application

-
-
-

A new Temporary Teacher Application has been submitted.

-
-
Applicant
-
- Name: - {{ applicant.firstName }} - {{#if applicant.middleName}} - {{ applicant.middleName }} + + + + +
+

Temporary Teacher Application

+
+
+

A new Temporary Teacher Application has been submitted.

+
+
Applicant
+
+ Name: + {{ applicant.firstName }} + {{#if applicant.middleName}} + {{ applicant.middleName }} + {{/if}} + {{ applicant.lastName }} +
+
+ Date of Birth: + {{ applicant.dateOfBirth }} +
+
+ Place of birth: + {{ applicant.placeOfBirth }} +
+
+ Nationality: + {{ applicant.nationality }} +
+
+ Sex: + {{ applicant.sex }} +
+
+ Marital Status: + {{ applicant.maritalStatus }} +
+ {{#if applicant.nationalIdNumber}} +
+ National Identification (ID) Number: + {{ applicant.nationalIdNumber }} +
+ {{/if}} + {{#if applicant.passportNumber}} +
+ Passport Number (#): + {{ applicant.passportNumber }} +
+ {{/if}} + {{#if applicant.nationalInsuranceNumber}} +
+ National Insurance Number (NIS): + {{ applicant.nationalInsuranceNumber }} +
+ {{/if}} +
+
+
Barbados Residency Duration
+
+ How long have you lived in Barbados?: + {{ barbadosResidencyDuration.residencyDuration }} +
+
+
+
Contact
+
+ Address: + {{ contact.addressLine1 }} + {{#if contact.addressLine2}} + {{ contact.addressLine2 }} + {{/if}} + +
+
+ Country: + {{ contact.country }} +
+
+ Parish: + {{ contact.parish }} +
+ {{#if contact.postalCode}} +
+ Postal Code: + {{ contact.postalCode }} +
+ {{/if}} +
+ Email address: + {{ contact.emailAddress }} +
+
+ Telephone Number: + {{ contact.telephoneNumber }} +
+
+ {{#if applicantEducation }} +
+
Applicant Education
+ {{#each applicantEducation}} +
+ {{#if this.nameOfInstitution}} +
+ Name of Institution: + {{ this.nameOfInstitution }} +
+ {{/if}} + {{#if this.country}} +
+ Country: + {{ this.country }} +
+ {{/if}} + {{#if this.startYear}} +
+ Start Year: + {{ this.startYear }} +
+ {{/if}} + {{#if this.endYear}} +
+ End Year: + {{ this.endYear }} +
+ {{/if}} +
+ {{/each}} +
{{/if}} - {{ applicant.lastName }} -
-
- Date of Birth: - {{ applicant.dateOfBirth }} -
-
- Place of birth: - {{ applicant.placeOfBirth }} -
-
- Nationality: - {{ applicant.nationality }} -
-
- Sex: - {{ applicant.sex }} -
-
- Marital Status: - {{ applicant.maritalStatus }} -
- {{#if applicant.nationalIdNumber}} -
- National Identification (ID) Number: - {{ applicant.nationalIdNumber }} -
- {{/if}} - {{#if applicant.passportNumber}} -
- Passport Number (#): - {{ applicant.passportNumber }} -
- {{/if}} - {{#if applicant.nationalInsuranceNumber}} -
- National Insurance Number (NIS): - {{ applicant.nationalInsuranceNumber }} -
- {{/if}} -
-
-
Barbados Residency Duration
-
- How long have you lived in Barbados?: - {{ barbadosResidencyDuration.residencyDuration }} -
-
-
-
Contact
-
- Address: - {{ contact.addressLine1 }} - {{#if contact.addressLine2}} - {{ contact.addressLine2 }} + {{#if qualifcations}} +
+
Applicant Qualification
+ {{#each qualifications}} +
+ {{#if this.subject}} +
+ Subject: + {{ this.subject }} +
+ {{/if}} + {{#if this.examiningBody}} +
+ Examining Body: + {{ this.examiningBody }} +
+ {{/if}} + {{#if this.year}} +
+ Year: + {{ this.year }} +
+ {{/if}} + {{#if this.levelGrade}} +
+ Level / Grade Obtained: + {{ this.levelGrade }} +
+ {{/if}} +
+ {{/each}} +
{{/if}} -
-
-
- Country: - {{ contact.country }} -
-
- Parish: - {{ contact.parish }} -
- {{#if contact.postalCode}} -
- Postal Code: - {{ contact.postalCode }} -
- {{/if}} -
- Email address: - {{ contact.emailAddress }} -
-
- Telephone Number: - {{ contact.telephoneNumber }} -
-
-
-
Applicant Education
-
- Name of Institution: - {{ applicantEducation.nameOfInstitution }} -
- {{#if applicantEducation.country}} -
- Country: - {{ applicantEducation.country }} -
- {{/if}} -
- Start Year: - {{ applicantEducation.startYear }} -
-
- End Year: - {{ applicantEducation.endYear }} -
-
- Do you want to add another education experience?: - {{ applicantEducation.anotherEducation }} -
-
-
-
Applicant Qualification
-
- Subject: - {{ applicantQualification.subject }} -
-
- Examining Body: - {{ applicantQualification.examiningBody }} -
-
- Year: - {{ applicantQualification.year }} -
-
- Level / Grade Obtained: - {{ applicantQualification.levelGrade }} -
-
- Do you want to add another qualification: - {{ applicantQualification.anotherQualification }} -
-
-
-
Applicant Work Experience
-
- Name of employer or organization: - {{ applicantWorkExperience.employerName }} -
-
- Position held: - {{ applicantWorkExperience.positionHeld }} -
-
- From (year): - {{ applicantWorkExperience.fromYear }} -
- {{#if applicantWorkExperience.toYear}} -
- To (year): - {{ applicantWorkExperience.toYear }} -
- {{/if}} - {{#if applicantWorkExperience.currentlyWorking}} -
- I am currently working here: - {{ applicantWorkExperience.currentlyWorking }} -
- {{/if}} -
- Your main tasks: - {{ applicantWorkExperience.tasks }} -
-
- Do you want to add another experience?: - {{ applicantWorkExperience.anotherExperience }} -
-
-
-
Skills And Experience
- {{#if skillsAndExperience.athleticsGamesCraftSkills}} -
- Athletics, games, or craft skills: - {{ skillsAndExperience.athleticsGamesCraftSkills }} -
- {{/if}} - {{#if skillsAndExperience.youthCommunityVolunteerGroups}} -
- Experience in youth, community, or volunteer groups: - {{ skillsAndExperience.youthCommunityVolunteerGroups }} -
- {{/if}} - {{#if skillsAndExperience.responsibilityPositions}} -
- Positions of responsibility held: - {{ skillsAndExperience.responsibilityPositions }} -
- {{/if}} - {{#if skillsAndExperience.extraDetails}} -
- Anything else relevant to your application?: - {{ skillsAndExperience.extraDetails }} -
- {{/if}} -
-
-
Reference
-
- Title: - {{ reference.title }} -
-
- First Name: - {{ reference.firstName }} -
-
- Last Name: - {{ reference.lastName }} -
-
- Address Line 1: - {{ reference.addressLine1 }} -
- {{#if reference.addressLine2}} -
- Address Line 2: - {{ reference.addressLine2 }} -
- {{/if}} -
- Country: - {{ reference.country }} -
-
- Parish: - {{ reference.parish }} -
- {{#if reference.postalCode}} -
- Postal code: - {{ reference.postalCode }} -
- {{/if}} -
- Occupation: - {{ reference.occupation }} -
-
- Email address: - {{ reference.emailAddress }} -
-
- Telephone Number: - {{ reference.telephoneNumber }} -
-
- Do you want to add another reference?: - {{ reference.anotherReference }} -
-
-
-
Documents
-
- Upload your certificates, diplomas, and transcripts: - {{ documents.certificateDiplomaTranscript }} -
-
- Upload your two testimonials: - {{ documents.testimonials }} -
-
- -
- + {{#if workExperiences}} +
+
Applicant Work Experience
+ {{#each workExperiences}} +
+ {{#if this.employerName}} +
+ Name of employer or organization: + {{ this.employerName }} +
+ {{/if}} + {{#if this.positionHeld}} +
+ Position held: + {{ this.positionHeld }} +
+ {{/if}} + {{#if this.fromYear}} +
+ From (year): + {{ this.fromYear }} +
+ {{/if}} + {{#if this.toYear}} +
+ To (year): + {{ this.toYear }} +
+ {{/if}} + {{#if this.currentlyWorking}} +
+ I am currently working here: + {{ this.currentlyWorking }} +
+ {{/if}} + {{#if this.tasks}} +
+ Your main tasks: + {{ this.tasks }} +
+ {{/if}} +
+ {{/each}} +
+ {{/if}} +
+
Skills And Experience
+ {{#if skillsAndExperience.athleticsGamesCraftSkills}} +
+ Athletics, games, or craft skills: + {{ skillsAndExperience.athleticsGamesCraftSkills }} +
+ {{/if}} + {{#if skillsAndExperience.youthCommunityVolunteerGroups}} +
+ Experience in youth, community, or volunteer groups: + {{ skillsAndExperience.youthCommunityVolunteerGroups }} +
+ {{/if}} + {{#if skillsAndExperience.responsibilityPositions}} +
+ Positions of responsibility held: + {{ skillsAndExperience.responsibilityPositions }} +
+ {{/if}} + {{#if skillsAndExperience.extraDetails}} +
+ Anything else relevant to your application?: + {{ skillsAndExperience.extraDetails }} +
+ {{/if}} +
+ {{#if references}} +
+
References
+ {{#each references}} +
+ {{#if this.title}} +
+ Title: + {{ this.title }} +
+ {{/if}} + {{#if this.firstName}} +
+ First Name: + {{ this.firstName }} +
+ {{/if}} + {{#if this.lastName}} +
+ Last Name: + {{ this.lastName }} +
+ {{/if}} + {{#if this.addressLine1}} +
+ Address Line 1: + {{ this.addressLine1 }} +
+ {{/if}} + {{#if this.addressLine2}} +
+ Address Line 2: + {{ this.addressLine2 }} +
+ {{/if}} + {{#if this.country}} +
+ Country: + {{ this.country }} +
+ {{/if}} + {{#if this.parish}} +
+ Parish: + {{ this.parish }} +
+ {{/if}} + {{#if this.postalCode}} +
+ Postal code: + {{ this.postalCode }} +
+ {{/if}} + {{#if this.occupation}} +
+ Occupation: + {{ this.occupation }} +
+ {{/if}} + {{#if this.emailAddress}} +
+ Email address: + {{ this.emailAddress }} +
+ {{/if}} + {{#if this.telephoneNumber}} +
+ Telephone Number: + {{ this.telephoneNumber }} +
+ {{/if}} +
+ {{/each}} +
+ {{/if}} +
+
Documents
+
+ Upload your certificates, diplomas, and transcripts: + {{ documents.certificateDiplomaTranscript }} +
+
+ Upload your two testimonials: + {{ documents.testimonials }} +
+
+ +
+ From 5f78305f3b62988d8e8e2bdd476f7f3d8616fbc6 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Thu, 22 Jan 2026 11:11:14 -0400 Subject: [PATCH 13/15] Fixed validation errors --- schemas/temporary-teacher-application.json | 43 ++++++++++------------ 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index 4b56b28..acdd914 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -24,7 +24,6 @@ "label": "Middle name(s)", "required": false, "validations": { - "min": 2, "max": 50 } }, @@ -112,11 +111,12 @@ { "name": "residencyDuration", "label": "How long have you lived in Barbados?", - "type": "number", + "type": "string", "required": true, "validations": { "min": 2, - "max": 20 + "max": 20, + "message": "Input must be between 2 and 20 characters" } } ] @@ -140,7 +140,7 @@ }, { "name": "country", - "type": "select", + "type": "string", "label": "Country", "required": true, "validations": { @@ -158,9 +158,9 @@ } }, { - "name": "postalCode", + "name": "postcode", "type": "string", - "label": "Postal Code", + "label": "Postcode", "required": false, "validations": { "regex": "^BB\\d{5}$", @@ -197,15 +197,15 @@ "required": false }, "startYear": { - "type": "number", + "type": "string", "validations": { - "min": 1930 + "regex": "^[0-9]{4}$" } }, "endYear": { - "type": "number", + "type": "string", "validations": { - "min": 1930 + "regex": "^[0-9]{4}$" } } } @@ -227,9 +227,9 @@ "required": true }, "year": { - "type": "number", + "type": "string", "validations": { - "min": 1930 + "regex": "^[0-9]{4}$" } }, "levelGrade": { @@ -254,17 +254,17 @@ "required": true }, "fromYear": { - "type": "number", + "type": "string", "required": true, "validations": { - "min": 1930 + "regex": "^[0-9]{4}$" } }, "toYear": { - "type": "number", + "type": "string", "required": false, "validations": { - "min": 1930 + "regex": "^[0-9]{4}$" } }, "currentlyWorking": { @@ -355,7 +355,7 @@ } }, "parish": { - "type": "select", + "type": "string", "required": true, "validations": { "regex": "^(christ-church|st-andrew|st-george|st-james|st-john|st-joseph|st-lucy|st-michael|st-peter|st-philip|st-thomas)$", @@ -392,17 +392,14 @@ { "name": "certificateDiplomaTranscript", "label": "Upload your certificates, diplomas, and transcripts", - "required": true, + "required": false, "type": "string" }, { "name": "testimonials", "label": "Upload your two testimonials", - "required": true, - "type": "array", - "items": { - "type": "string" - } + "required": false, + "type": "string" } ] } From 47469fbeae57cc01ca1696d0fc25134970ef6d04 Mon Sep 17 00:00:00 2001 From: IsaiahSama Date: Thu, 22 Jan 2026 11:31:14 -0400 Subject: [PATCH 14/15] Fixed postalCode -> postcode --- schemas/temporary-teacher-application.json | 2 +- src/email/templates/temporary-teacher-application.hbs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index acdd914..ddb0673 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -362,7 +362,7 @@ "message": "Must select a valid parish" } }, - "postalCode": { + "postcode": { "type": "string", "required": false, "validations": { diff --git a/src/email/templates/temporary-teacher-application.hbs b/src/email/templates/temporary-teacher-application.hbs index 4c3e6ad..8093058 100644 --- a/src/email/templates/temporary-teacher-application.hbs +++ b/src/email/templates/temporary-teacher-application.hbs @@ -82,10 +82,10 @@ Parish: {{ contact.parish }} - {{#if contact.postalCode}} + {{#if contact.postcode}}
Postal Code: - {{ contact.postalCode }} + {{ contact.postcode }}
{{/if}}
@@ -282,10 +282,10 @@ {{ this.parish }}
{{/if}} - {{#if this.postalCode}} + {{#if this.postcode}}
Postal code: - {{ this.postalCode }} + {{ this.postcode }}
{{/if}} {{#if this.occupation}} From 97529757a7f8a16d26d2185a84cbf96879acf4e1 Mon Sep 17 00:00:00 2001 From: Shannon Clarke Date: Sat, 24 Jan 2026 11:37:19 -0400 Subject: [PATCH 15/15] fix: update the field labels used for file uploads --- schemas/temporary-teacher-application.json | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/schemas/temporary-teacher-application.json b/schemas/temporary-teacher-application.json index ddb0673..2a01d8c 100644 --- a/schemas/temporary-teacher-application.json +++ b/schemas/temporary-teacher-application.json @@ -142,16 +142,13 @@ "name": "country", "type": "string", "label": "Country", - "required": true, - "validations": { - "regex": "^barbados$" - } + "required": true }, { "name": "parish", "type": "string", "label": "Parish", - "required": true, + "required": false, "validations": { "regex": "^(christ-church|st-andrew|st-george|st-james|st-john|st-joseph|st-lucy|st-michael|st-peter|st-philip|st-thomas)$", "message": "Must select a valid parish" @@ -390,13 +387,13 @@ "required": true, "fields": [ { - "name": "certificateDiplomaTranscript", + "name": "certificateDiplomaTranscriptUrls", "label": "Upload your certificates, diplomas, and transcripts", "required": false, "type": "string" }, { - "name": "testimonials", + "name": "testimonialsUrls", "label": "Upload your two testimonials", "required": false, "type": "string"