diff --git a/hrm-form-definitions/form-definitions/tz/v1/CaseStatus.json b/hrm-form-definitions/form-definitions/tz/v1/CaseStatus.json index 46ff888d59..93a48b0980 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/CaseStatus.json +++ b/hrm-form-definitions/form-definitions/tz/v1/CaseStatus.json @@ -1,7 +1,7 @@ { "open": { - "value": "open", - "label": "Open", + "value": "ongoing", + "label": "Ongoing", "color": "green", "transitions": [ "closed" @@ -12,7 +12,7 @@ "label": "Closed", "color": "red", "transitions": [ - "open" + "ongoing" ] } } \ No newline at end of file diff --git a/hrm-form-definitions/form-definitions/tz/v1/PrepopulateKeys.json b/hrm-form-definitions/form-definitions/tz/v1/PrepopulateKeys.json index 6348698fec..30a7268487 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/PrepopulateKeys.json +++ b/hrm-form-definitions/form-definitions/tz/v1/PrepopulateKeys.json @@ -4,7 +4,7 @@ "CallerInformationTab":[] }, "preEngagement":{ - "ChildInformationTab":["age", "gender", "firstName"], + "ChildInformationTab":["age", "gender", "firstName", "location"], "CallerInformationTab":[], "CaseInformationTab":[] } diff --git a/hrm-form-definitions/form-definitions/tz/v1/caseForms/HouseholdForm.json b/hrm-form-definitions/form-definitions/tz/v1/caseForms/HouseholdForm.json index 4bef3c6ef7..56b77f4275 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/caseForms/HouseholdForm.json +++ b/hrm-form-definitions/form-definitions/tz/v1/caseForms/HouseholdForm.json @@ -119,10 +119,10 @@ "name": "age", "label": "Age", "type": "select", - "unknownOption": "Unknown", + "unknownOption": "", "options": [ { - "value": "Unknown", + "value": "", "label": "" }, { @@ -198,10 +198,42 @@ "label": "18" }, { - "value": ">18", - "label": ">18" + "value": "19", + "label": "19" + }, + { + "value": "20", + "label": "20" + }, + { + "value": "21", + "label": "21" + }, + { + "value": "22", + "label": "22" + }, + { + "value": "23", + "label": "23" + }, + { + "value": "24", + "label": "24" + }, + { + "value": "25", + "label": "25" + }, + { + "value": ">25", + "label": ">25" } - ] + ], + "required": { + "value": true, + "message": "RequiredFieldError" + } }, { "name": "language", diff --git a/hrm-form-definitions/form-definitions/tz/v1/caseForms/PerpetratorForm.json b/hrm-form-definitions/form-definitions/tz/v1/caseForms/PerpetratorForm.json index c69e6a194e..d83c0cbc93 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/caseForms/PerpetratorForm.json +++ b/hrm-form-definitions/form-definitions/tz/v1/caseForms/PerpetratorForm.json @@ -127,10 +127,10 @@ "name": "age", "label": "Age", "type": "select", - "unknownOption": "Unknown", + "unknownOption": "", "options": [ { - "value": "Unknown", + "value": "", "label": "" }, { @@ -206,10 +206,42 @@ "label": "18" }, { - "value": ">18", - "label": ">18" + "value": "19", + "label": "19" + }, + { + "value": "20", + "label": "20" + }, + { + "value": "21", + "label": "21" + }, + { + "value": "22", + "label": "22" + }, + { + "value": "23", + "label": "23" + }, + { + "value": "24", + "label": "24" + }, + { + "value": "25", + "label": "25" + }, + { + "value": ">25", + "label": ">25" } - ] + ], + "required": { + "value": true, + "message": "RequiredFieldError" + } }, { "name": "language", diff --git a/hrm-form-definitions/form-definitions/tz/v1/caseForms/ReferralForm.json b/hrm-form-definitions/form-definitions/tz/v1/caseForms/ReferralForm.json index 27bbdd1b50..f5323dc90a 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/caseForms/ReferralForm.json +++ b/hrm-form-definitions/form-definitions/tz/v1/caseForms/ReferralForm.json @@ -38,8 +38,24 @@ "label": "Religious leader" }, { - "value": "Other", - "label": "Other" + "value": "Local Government Authorities", + "label": "Local Government Authorities" + }, + { + "value": "Gender Desk", + "label": "Gender Desk" + }, + { + "value": "One-Stop Center (OSC)", + "label": "One-Stop Center (OSC)" + }, + { + "value": "Women & Children Coordinator (WCC)", + "label": "Women & Children Coordinator (WCC)" + }, + { + "value": "Sheha", + "label": "Sheha" } ], "required": { diff --git a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CallerInformationTab.json b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CallerInformationTab.json index df6bfe7124..be730218f8 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CallerInformationTab.json +++ b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CallerInformationTab.json @@ -131,10 +131,10 @@ "name": "age", "label": "Age", "type": "select", - "unknownOption": "Unknown", + "unknownOption": "", "options": [ { - "value": "Unknown", + "value": "", "label": "" }, { @@ -210,10 +210,42 @@ "label": "18" }, { - "value": ">18", - "label": ">18" + "value": "19", + "label": "19" + }, + { + "value": "20", + "label": "20" + }, + { + "value": "21", + "label": "21" + }, + { + "value": "22", + "label": "22" + }, + { + "value": "23", + "label": "23" + }, + { + "value": "24", + "label": "24" + }, + { + "value": "25", + "label": "25" + }, + { + "value": ">25", + "label": ">25" } - ] + ], + "required": { + "value": true, + "message": "RequiredFieldError" + } }, { "name": "language", diff --git a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CaseInformationTab.json b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CaseInformationTab.json index 5123b3ff4c..2f988669aa 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CaseInformationTab.json +++ b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/CaseInformationTab.json @@ -9,37 +9,77 @@ } }, { - "name": "repeatCaller", - "label": "Repeat Caller?", - "type": "mixed-checkbox" + "name": "signPosting", + "label": "Signposting", + "type": "select", + "options": [ + { + "value": "Clinic", + "label": "Clinic" + }, + { + "value": "Hospital", + "label": "Hospital" + }, + { + "value": "Social Welfare", + "label": "Social Welfare" + }, + { + "value": "Police", + "label": "Police" + }, + { + "value": "Religious leader", + "label": "Religious leader" + }, + { + "value": "Local Government Authorities", + "label": "Local Government Authorities" + }, + { + "value": "Gender Desk", + "label": "Gender Desk" + }, + { + "value": "One-Stop Center (OSC)", + "label": "One-Stop Center (OSC)" + }, + { + "value": "Women & Children Coordinator (WCC)", + "label": "Women & Children Coordinator (WCC)" + }, + { + "value": "Sheha", + "label": "Sheha" + } + ] }, { - "name": "actionTaken", - "label": "Action Taken", + "name": "urgencyLevel", + "label": "Level of Urgency", "type": "select", "options": [ { - "value": "Unknown", - "label": " " + "value": "", + "label": "" }, { - "value": "Action taken", - "label": "Action taken" + "value": "Level 1", + "label": "Level 1" }, { - "value": "Other", - "label": "Other" + "value": "Level 2", + "label": "Level 2" + }, + { + "value": "Level 3", + "label": "Level 3" } - ] - }, - { - "name": "okForCaseWorkerToCall", - "label": "Ok for case worker to call?", - "type": "mixed-checkbox" - }, - { - "name": "didYouDiscussRightsWithTheChild", - "label": "Did you discuss rights with the child?", - "type": "mixed-checkbox" + ], + "required": { + "value": true, + "message": "RequiredFieldError" + } } ] \ No newline at end of file diff --git a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/ChildInformationTab.json b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/ChildInformationTab.json index 554081a1c9..ec4d67e23c 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/ChildInformationTab.json +++ b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/ChildInformationTab.json @@ -120,8 +120,36 @@ "label": "18" }, { - "value": ">18", - "label": ">18" + "value": "19", + "label": "19" + }, + { + "value": "20", + "label": "20" + }, + { + "value": "21", + "label": "21" + }, + { + "value": "22", + "label": "22" + }, + { + "value": "23", + "label": "23" + }, + { + "value": "24", + "label": "24" + }, + { + "value": "25", + "label": "25" + }, + { + "value": ">25", + "label": ">25" } ], "required": { @@ -129,6 +157,26 @@ "message": "RequiredFieldError" } }, + { + "name": "location", + "label": "Location", + "type": "select", + "unknownOption": "Unknown", + "options": [ + { + "value": "Unknown", + "label": "" + }, + { + "value": "tanzania", + "label": "Tanzania - Main land" + }, + { + "value": "zanzibar", + "label": "Zanzibar & Pemba" + } + ] + }, { "name": "region", "label": "Region", @@ -182,33 +230,104 @@ "name": "gradeLevel", "label": "Grade Level", "type": "select", - "unknownOption": "Unknown", + "defaultOption": { + "value": "Unknown", + "label": "" + }, "options": [ { "value": "Unknown", "label": "" }, { - "value": "01", - "label": "1" - }, - { - "value": "02", - "label": "2" - }, - { - "value": "03", - "label": "3" - }, - { - "value": "04", - "label": "4" + "value": "Primary", + "label": "Primary" }, { - "value": "05", - "label": "5" + "value": "Secondary", + "label": "Secondary" } - ] + ], + "required": { + "value": true, + "message": "RequiredFieldError" + } + }, + { + "name": "district", + "label": "District", + "type": "dependent-select", + "dependsOn": "province", + "defaultOption": { + "value": "Unknown", + "label": "" + }, + "options": { + "Primary": [ + { + "value": "Unknown", + "label": "" + }, + { + "value": "Standard 1", + "label": "Standard 1" + }, + { + "value": "Standard 2", + "label": "Standard 2" + }, + { + "value": "Standard 3", + "label": "Standard 3" + }, + { + "value": "Standard 4", + "label": "Standard 4" + }, + { + "value": "Standard 5", + "label": "Standard 5" + }, + { + "value": "Standard 6", + "label": "Standard 6" + }, + { + "value": "Standard 7", + "label": "Standard 7" + } + ], + "Secondary": [ + { + "value": "Unknown", + "label": "" + }, + { + "value": "Form 1", + "label": "Form 1" + }, + { + "value": "Form 2", + "label": "Form 2" + }, + { + "value": "Form 3", + "label": "Form 3" + }, + { + "value": "Form 4", + "label": "Form 4" + }, + { + "value": "Form 5", + "label": "Form 5" + }, + { + "value": "Form 6", + "label": "Form 6" + } + ] + } }, { "name": "livingSituation", @@ -257,6 +376,7 @@ { "name": "vulnerableGroups", "label": "Vulnerable Groups", + "unknownOption": "Unknown", "type": "listbox-multiselect", "options": [ { diff --git a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/IssueCategorizationTab.json b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/IssueCategorizationTab.json index b9e521e15b..e4c16eb6cc 100644 --- a/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/IssueCategorizationTab.json +++ b/hrm-form-definitions/form-definitions/tz/v1/tabbedForms/IssueCategorizationTab.json @@ -12,6 +12,9 @@ { "label": "Runaway" }, + { + "label": "Child trafficking" + }, { "label": "Unspecified/Other" } @@ -175,9 +178,6 @@ { "label": "Gender" }, - { - "label": "Gender identity or expression and sexual orientation" - }, { "label": "Health" }, @@ -243,20 +243,6 @@ } ] }, - "Sexuality": { - "color": "#506BA5", - "subcategories": [ - { - "label": "Sexual orientation and gender identity" - }, - { - "label": "Sexual behaviours" - }, - { - "label": "Unspecified/Other" - } - ] - }, "Non-Counselling contacts": { "color": "#767777", "subcategories": [ diff --git a/plugin-hrm-form/src/permissions/tz.json b/plugin-hrm-form/src/permissions/tz.json index 55395bdabb..e8284525bd 100644 --- a/plugin-hrm-form/src/permissions/tz.json +++ b/plugin-hrm-form/src/permissions/tz.json @@ -1,5 +1,5 @@ { - "viewCase": [["isSupervisor"], ["isCreator"]], + "viewCase": [["everyone"]], "closeCase": [["isSupervisor"], ["isCreator", "isCaseOpen"]], "reopenCase": [["isSupervisor"]], "caseStatusTransition": [["isSupervisor"], ["isCreator", "isCaseOpen"]], @@ -17,7 +17,7 @@ "removeContactFromCase": [["isSupervisor"], ["isOwner"]], "viewProfile": [["everyone"]], - "flagProfile": [["isSupervisor"]], + "flagProfile": [["everyone"]], "unflagProfile": [["isSupervisor"]], "viewProfileSection": [["everyone", { "sectionType": "summary" }], ["isSupervisor"]], "createProfileSection": [["isSupervisor"]], diff --git a/twilio-iac/helplines/tz/templates/workflows/master.tftpl b/twilio-iac/helplines/tz/templates/workflows/master.tftpl new file mode 100644 index 0000000000..bc34bb64df --- /dev/null +++ b/twilio-iac/helplines/tz/templates/workflows/master.tftpl @@ -0,0 +1,26 @@ +{ + "task_routing": { + "filters": [ + { + "filter_friendly_name": "${helpline}", + "expression": "${task_routing_filter_expression}", + "targets": [ + { + "expression": "(worker.waitingOfflineContact != true AND ((task.channelType == 'voice' AND worker.channel.chat.assigned_tasks == 0) OR (task.channelType != 'voice' AND worker.channel.voice.assigned_tasks == 0 AND (task.preEngagementData.language != 'sw_TZ' OR (worker.routing.skills HAS \"Swahili\" AND task.preEngagementData.language == 'sw_TZ')))) AND ((task.transferTargetType == 'worker' AND task.targetSid == worker.sid) OR (task.transferTargetType != 'worker' AND worker.sid != task.ignoreAgent))) OR (worker.waitingOfflineContact == true AND task.targetSid == worker.sid AND task.isContactlessTask == true)", + "queue": "${task_queues.master}" + } + ] + }, + { + "filter_friendly_name": "E2E Test", + "expression": "channelType=='web' AND e2eTestMode=='true'", + "targets": [ + { + "expression": "(worker.waitingOfflineContact != true AND ((task.channelType == 'voice' AND worker.channel.chat.assigned_tasks == 0) OR (task.channelType != 'voice' AND worker.channel.voice.assigned_tasks == 0)) AND ((task.transferTargetType == 'worker' AND task.targetSid == worker.sid) OR (task.transferTargetType != 'worker' AND worker.sid != task.ignoreAgent))) OR (worker.waitingOfflineContact == true AND task.targetSid == worker.sid AND task.isContactlessTask == true)", + "queue": "${task_queues.e2e_test}" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/webchat/configurations/tz-staging.ts b/webchat/configurations/tz-staging.ts index b234a41e9e..a8019f7ef0 100644 --- a/webchat/configurations/tz-staging.ts +++ b/webchat/configurations/tz-staging.ts @@ -54,21 +54,6 @@ const preEngagementConfig: PreEngagementFormDefinition = { description: 'PreEngagementDescription', submitLabel: 'StartChat', fields: [ - { - type: 'select', - name: 'language', - label: 'Select Language/Chagua lugha', - defaultValue: '', - required: true, - options: [ - { - value: '', - label: '' - }, - { value: 'en-US', label: '1. English' }, - { value: 'sw_TZ', label: '2. Kiswahili' }, - ], - }, { type: 'input-text', name: 'friendlyName', @@ -77,113 +62,27 @@ const preEngagementConfig: PreEngagementFormDefinition = { required: true, }, { - label: 'Age/Umri', type: 'select', - name: 'age', - required: true, + name: 'language', + label: 'Select Language/Chagua lugha', defaultValue: '', + required: true, options: [ - { - value: "", - label: "" - }, - { - value: "01", - label: "1" - }, - { - value: "02", - label: "2" - }, - { - value: "03", - label: "3" - }, - { - value: "04", - label: "4" - }, - { - value: "05", - label: "5" - }, - { - value: "06", - label: "6" - }, - { - value: "07", - label: "7" - }, - { - value: "08", - label: "8" - }, - { - value: "09", - label: "9" - }, - { - value: "10", - label: "10" - }, - { - value: "11", - label: "11" - }, - { - value: "12", - label: "12" - }, - { - value: "13", - label: "13" - }, - { - value: "14", - label: "14" - }, - { - value: "15", - label: "15" - }, - { - value: "16", - label: "16" - }, - { - value: "17", - label: "17" - }, - { - value: "18", - label: "18" - }, - { - value: ">18", - label: ">18" - } + { value: '', label: '' }, + { value: 'en-US', label: '1. English' }, + { value: 'sw_TZ', label: '2. Kiswahili' }, ], - }, - { + }, { type: 'select', - name: 'gender', - label: 'Gender/Jinsi', + name: 'location', + label: 'Select Location/Chagua maeneo', + placeholder: 'Select your location/Chagua maeneo yako', defaultValue: '', required: true, options: [ - { - value: "", - label: "" - }, - { - value: "Male", - label: "Male/ME" - }, - { - value: "Female", - label: "Female/KE" - } + { value: '', label: '' }, + { value: 'tanzania', label: 'Tanzania - Main Land' }, + { value: 'zanzibar', label: 'Zanzibar or Pemba' }, ], }, {