Skip to content

Commit e33cd87

Browse files
authored
feat(#9598): add training materials page (#9592)
1 parent 51da792 commit e33cd87

File tree

55 files changed

+2514
-837
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2514
-837
lines changed

api/resources/translations/messages-en.properties

+10-7
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ configuration.sms = SMS
437437
configuration.sms.forms = SMS forms
438438
configuration.sms.forms.title = You need to choose both an XML file and a Meta file before clicking the upload button. You may only upload one app form file at a time and any existing forms will be overwritten.
439439
configuration.sms.settings = Basic settings
440-
configuration.sms.test.description = Use this page to send a test message to the production application without going through the SMS Gateway. Be sure to use a phone number registered to a CHWs profile to mimic a report coming from him or her about a particular patient.
440+
configuration.sms.test.description = Use this page to send a test message to the production application without going through the SMS Gateway. Be sure to use a phone number registered to a CHW?s profile to mimic a report coming from him or her about a particular patient.
441441
configuration.sms.test.from.number = From phone number
442442
configuration.sms.test.message.description = Limit of 144 characters
443443
configuration.sms.test.number.validation.description = Please enter a valid phone number without dashes or punctuation.
@@ -454,7 +454,7 @@ confirm.destructive.navigation.submit = Exit
454454
confirm.destructive.navigation.title = Exit form?
455455
confirm.logout = You will need an internet connection to log back in.
456456
password.updated = Your password has been successfully updated.
457-
confirm.verification = This report will be verified as correct. This cannot be changed later.
457+
confirm.verification = This report will be verified as ?correct?. This cannot be changed later.
458458
confirm.verification.submit = Verify as correct
459459
confirm.verification.title = Verify report
460460
contact.age = Age
@@ -654,8 +654,8 @@ enketo.geopicker.altitude = altitude (m)
654654
enketo.geopicker.closepolygon = close polygon
655655
enketo.geopicker.kmlcoords = KML coordinates
656656
enketo.geopicker.kmlpaste = paste KML coordinates here
657-
enketo.geopicker.latitude = latitude (x.y °)
658-
enketo.geopicker.longitude = longitude (x.y °)
657+
enketo.geopicker.latitude = latitude (x.y °)
658+
enketo.geopicker.longitude = longitude (x.y °)
659659
enketo.geopicker.points = points
660660
enketo.geopicker.searchPlaceholder = search for place or address
661661
enketo.geopicker.removePoint = This will completely remove the current geopoint from the list of geopoints and cannot be undone. Are you sure you want to do this?
@@ -686,7 +686,7 @@ export.dhis.place.all = All Places
686686
export.dhis.place.description = Filter exported data to include data associated with contacts under this place in the hierarchy.
687687
export.dhis.place.label = Filter by place
688688
export.dhis.unconfigured = DHIS2 integration is not configured.
689-
export.feedback.description = Download a log of detected errors and user feedback submitted via the Report bug feature in CSV format. The table below shows the most recently submitted reports.
689+
export.feedback.description = Download a log of detected errors and user feedback submitted via the ?Report bug? feature in CSV format. The table below shows the most recently submitted reports.
690690
export.messages.description = Download all messages that have ever been sent or received in CSV format.
691691
export.people.description = Download all contacts registered in the system in JSON format.
692692
export.reports.description = Download a summary of all the reports that have ever been submitted in CSV format.
@@ -1215,7 +1215,7 @@ sync.last_success = Last sync
12151215
sync.now = Sync now
12161216
sync.retry = Retry
12171217
sync.feedback.failure.unknown = Sync failed. Unable to connect.
1218-
sync.status.in_progress = Currently syncing
1218+
sync.status.in_progress = Currently syncing?
12191219
sync.status.not_required = All reports synced
12201220
sync.status.required = Reports to sync
12211221
sync.status.unknown = Unable to connect
@@ -1264,7 +1264,10 @@ training_cards.confirm.title = Leave training?
12641264
training_cards.error.loading = Error loading training. Please contact your supervisor.
12651265
training_cards.error.save = Error saving training.
12661266
training_cards.form.saved = Training completed.
1267-
training_cards.modal.title = Important changes
1267+
training_materials.page.no_more_trainings = No more trainings
1268+
training_materials.page.no_selected = No training material selected
1269+
training_materials.page.no_trainings = No trainings found
1270+
training_materials.page.title = Training materials
12681271
translation.add = Add new translation key
12691272
translation.key = Translation key
12701273
unique.id = Unique ID

api/resources/translations/messages-es.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,10 @@ training_cards.confirm.title = \¿Salir del entrenamiento\?
12641264
training_cards.error.loading = Hubo un error al cargar el entrenamiento. Por favor contacte a su supervisor.
12651265
training_cards.error.save = Hubo un error al guardar el entrenamiento.
12661266
training_cards.form.saved = Entrenamiento completado.
1267-
training_cards.modal.title = Cambios importantes
1267+
training_materials.page.no_more_trainings = No hay más entrenamientos
1268+
training_materials.page.no_selected = Ningún material de entrenamiento seleccionado
1269+
training_materials.page.no_trainings = No se encontraron entrenamientos
1270+
training_materials.page.title = Materiales de entrenamiento
12681271
translation.add = Agregar Traducción
12691272
translation.key = Clave de traducción
12701273
unique.id = Identificación única

api/resources/translations/messages-fr.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,10 @@ training_cards.confirm.title = Quitter l'entraînement?
12641264
training_cards.error.loading = Erreur lors du chargement de la formation. Veuillez contacter votre superviseur.
12651265
training_cards.error.save = Erreur lors de l'enregistrement de la formation.
12661266
training_cards.form.saved = Formation terminée.
1267-
training_cards.modal.title = Changements importants
1267+
training_materials.page.no_more_trainings = Aucune formation restante
1268+
training_materials.page.no_selected = Aucun matériel de formation sélectionné
1269+
training_materials.page.no_trainings = Aucune formation trouvée
1270+
training_materials.page.title = Matériel de formation
12681271
translation.add = Ajouter une traduction
12691272
translation.key = Clé de traduction
12701273
unique.id = ID unique

api/resources/translations/messages-hi.properties

+4
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,10 @@ training_cards.confirm.exit = यह प्रशिक्षण समाप्
11681168
training_cards.confirm.button.no = रद्द करें
11691169
training_cards.confirm.button.yes = बाहर निकलें
11701170
training_cards.confirm.title = प्रशिक्षण छोड़ें?
1171+
training_materials.page.no_more_trainings = अब और कोई प्रशिक्षण नहीं है
1172+
training_materials.page.no_selected = कोई प्रशिक्षण दस्तावेज़ नहीं चुना गया
1173+
training_materials.page.no_trainings = कोई प्रशिक्षण नहीं मिला
1174+
training_materials.page.title = प्रशिक्षण दस्तावेज़
11711175
translation.add = अनुवाद दर्ज करें
11721176
translation.key = अनुवाद का गाइड
11731177
unique.id =

api/resources/translations/messages-id.properties

+4
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,10 @@ training_cards.confirm.exit = Pelatihan ini belum selesai. Jika Anda keluar seka
11751175
training_cards.confirm.button.no = Batalkan
11761176
training_cards.confirm.button.yes = Keluar
11771177
training_cards.confirm.title = Keluar dari pelatihan?
1178+
training_materials.page.no_more_trainings = Tidak ada lagi pelatihan
1179+
training_materials.page.no_selected = Tidak ada materi pelatihan yang dipilih
1180+
training_materials.page.no_trainings = Tidak ditemukan pelatihan
1181+
training_materials.page.title = Materi pelatihan
11781182
translation.add = Tambah terjemahan
11791183
translation.key = Kunci terjemahan
11801184
unique.id =

api/resources/translations/messages-ne.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,10 @@ training_cards.confirm.title = तालिम छोड्ने हो?
12641264
training_cards.error.loading = तालिम लोड गर्दा त्रुटि भयो। तपाइँको सुपरभाइजरलाई सम्पर्क गर्नुहोस्।
12651265
training_cards.error.save = तालिम सेभ गर्न त्रुटि।
12661266
training_cards.form.saved = तालिम सम्पन्न भयो।
1267-
training_cards.modal.title = महत्वपुर्ण परिवर्तनहरु
1267+
training_materials.page.no_more_trainings = थप तालिम छैन
1268+
training_materials.page.no_selected = कुनै तालिम सामग्री छनोट गरिएको छैन।
1269+
training_materials.page.no_trainings = तालिम फेला परेन
1270+
training_materials.page.title = तालिम शीर्षक
12681271
translation.add = नयाँ अनुवाद कुञ्जी थप्नुहोस्
12691272
translation.key = अनुवाद कुञ्जी
12701273
unique.id = आईडी

api/resources/translations/messages-sw.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,10 @@ training_cards.confirm.title = Ungependa kuondoka kwenye mafunzo?
12641264
training_cards.error.loading = Hitilafu katika kupakia mafunzo. Tafadhali wasiliana na msimamizi wako.
12651265
training_cards.error.save = Hitilafu katika kuhifadhi mafunzo.
12661266
training_cards.form.saved = Mafunzo yamekamilika.
1267-
training_cards.modal.title = Mabadiliko muhimu
1267+
training_materials.page.no_more_trainings = Hakuna mafunzo mengine
1268+
training_materials.page.no_selected = Hakuna nyenzo za mafunzo zilizochaguliwa
1269+
training_materials.page.no_trainings = Hakuna mafunzo yaliyopatikana
1270+
training_materials.page.title = Vifaa vya mafunzo
12681271
translation.add = Ongeza tafsiri
12691272
translation.key = Ufunguo wa tafsiri
12701273
unique.id = Kitambulisho cha kipekee

tests/e2e/default/enketo/training-cards.wdio-spec.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const commonPage = require('@page-objects/default/common/common.wdio.page');
44
const trainingCardsPage = require('@page-objects/default/enketo/training-cards.wdio.page');
55
const placeFactory = require('@factories/cht/contacts/place');
66
const userFactory = require('@factories/cht/users/users');
7-
const personFactory = require('@factories/cht/contacts/person');
87
const reportsPage = require('@page-objects/default/reports/reports.wdio.page');
98
const privacyPolicyFactory = require('@factories/cht/settings/privacy-policy');
109
const privacyPage = require('@page-objects/default/privacy-policy/privacy-policy.wdio.page');
@@ -26,7 +25,6 @@ describe('Training Cards', () => {
2625
before(async () => {
2726
const parent = placeFactory.place().build({ _id: 'dist1', type: 'district_hospital' });
2827
const user = userFactory.build({ roles: [ 'nurse', 'chw' ] });
29-
const patient = personFactory.build({ parent: { _id: user.place._id, parent: { _id: parent._id } } });
3028
const formDoc = commonPage.createFormDoc(`${__dirname}/forms/training-cards-text-only`);
3129
formDoc._id = `form:${formDocId}`;
3230
formDoc.internalId = formDocId;
@@ -36,8 +34,7 @@ describe('Training Cards', () => {
3634
duration: 5,
3735
};
3836

39-
await utils.saveDocs([ parent, patient ]);
40-
await utils.saveDoc(formDoc);
37+
await utils.saveDocs([ parent, formDoc ]);
4138
await utils.createUsers([ user ]);
4239
await loginPage.login(user);
4340
await commonPage.waitForPageLoaded();

tests/e2e/default/service-worker/service-worker.wdio-spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ describe('Service worker cache', () => {
120120
'/img/icon-pregnant-selected.svg',
121121
'/img/icon-pregnant.svg',
122122
'/img/icon-filter.svg',
123+
'/img/icon-check.svg',
123124
'/img/icon.png',
124125
'/img/icon-back.svg',
125126
'/img/layers.png',

tests/e2e/default/suites.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const SUITES = {
66
'./more-options-menu/**/*.wdio-spec.js',
77
'./users/**/*.wdio-spec.js',
88
'./about/**/*.wdio-spec.js',
9+
'./training-materials/**/*.wdio-spec.js',
910
'./navigation/**/*.wdio-spec.js',
1011
'./old-navigation/**/*.wdio-spec.js',
1112
'./privacy-policy/**/*.wdio-spec.js',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0"?>
2+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms">
3+
<h:head>
4+
<h:title>First Training</h:title>
5+
<model>
6+
<itext>
7+
<translation lang="en">
8+
<text id="/expired_training/action_icons/action_icons_aligment/action_icons_image_1:label">
9+
<value>**Old feature**</value>
10+
</text>
11+
<text id="/expired_training/action_icons/action_icons_aligment/action_icons_image_2:label">
12+
<value>**New feature**</value>
13+
</text>
14+
<text id="/expired_training/action_icons/action_icons_note_1:label">
15+
<value>The "New Action" icon at the bottom of your app has also changed.</value>
16+
</text>
17+
<text id="/expired_training/ending/ending_note_1:label">
18+
<value>If you do not understand these changes, please contact your supervisor.</value>
19+
</text>
20+
<text id="/expired_training/ending/ending_note_2:label">
21+
<value>When you're ready, go ahead and start using your app.</value>
22+
</text>
23+
<text id="/expired_training/intro/intro_note_1:label">
24+
<value>There have been some changes to icons in your app. The next few screens will show you the difference.</value>
25+
</text>
26+
<text id="/expired_training/intro/intro_note_2:label">
27+
<value>Read each screen carefully and tap "Next" if you understand. If you need extra support, please contact your supervisor.</value>
28+
</text>
29+
</translation>
30+
</itext>
31+
<instance>
32+
<expired_training id="expired_training" prefix="J1!expired_training!" delimiter="#" version="2022-06-07 10:17:10">
33+
<intro tag="hidden">
34+
<intro_note_1 tag="hidden"/>
35+
<intro_note_2 tag="hidden"/>
36+
</intro>
37+
<action_icons tag="hidden">
38+
<action_icons_note_1 tag="hidden"/>
39+
<action_icons_aligment>
40+
<action_icons_image_1 tag="hidden"/>
41+
<action_icons_image_2 tag="hidden"/>
42+
</action_icons_aligment>
43+
</action_icons>
44+
<ending tag="hidden">
45+
<ending_note_1 tag="hidden"/>
46+
<ending_note_2 tag="hidden"/>
47+
</ending>
48+
<meta tag="hidden">
49+
<instanceID/>
50+
</meta>
51+
</expired_training>
52+
</instance>
53+
<instance id="contact-summary"/>
54+
<bind nodeset="/expired_training/intro/intro_note_1" readonly="true()" type="string"/>
55+
<bind nodeset="/expired_training/intro/intro_note_2" readonly="true()" type="string"/>
56+
<bind nodeset="/expired_training/action_icons/action_icons_note_1" readonly="true()" type="string"/>
57+
<bind nodeset="/expired_training/action_icons/action_icons_aligment/action_icons_image_1" readonly="true()" type="string"/>
58+
<bind nodeset="/expired_training/action_icons/action_icons_aligment/action_icons_image_2" readonly="true()" type="string"/>
59+
<bind nodeset="/expired_training/ending/ending_note_1" readonly="true()" type="string"/>
60+
<bind nodeset="/expired_training/ending/ending_note_2" readonly="true()" type="string"/>
61+
<bind nodeset="/expired_training/meta/instanceID" type="string" readonly="true()" calculate="concat('uuid:', uuid())"/>
62+
</model>
63+
</h:head>
64+
<h:body class="pages">
65+
<group appearance="field-list" ref="/expired_training/intro">
66+
<input ref="/expired_training/intro/intro_note_1">
67+
<label ref="jr:itext('/expired_training/intro/intro_note_1:label')"/>
68+
</input>
69+
<input ref="/expired_training/intro/intro_note_2">
70+
<label ref="jr:itext('/expired_training/intro/intro_note_2:label')"/>
71+
</input>
72+
</group>
73+
<group appearance="field-list" ref="/expired_training/action_icons">
74+
<input ref="/expired_training/action_icons/action_icons_note_1">
75+
<label ref="jr:itext('/expired_training/action_icons/action_icons_note_1:label')"/>
76+
</input>
77+
<group ref="/expired_training/action_icons/action_icons_aligment">
78+
<input ref="/expired_training/action_icons/action_icons_aligment/action_icons_image_1">
79+
<label ref="jr:itext('/expired_training/action_icons/action_icons_aligment/action_icons_image_1:label')"/>
80+
</input>
81+
<input ref="/expired_training/action_icons/action_icons_aligment/action_icons_image_2">
82+
<label ref="jr:itext('/expired_training/action_icons/action_icons_aligment/action_icons_image_2:label')"/>
83+
</input>
84+
</group>
85+
</group>
86+
<group appearance="field-list" ref="/expired_training/ending">
87+
<input ref="/expired_training/ending/ending_note_1">
88+
<label ref="jr:itext('/expired_training/ending/ending_note_1:label')"/>
89+
</input>
90+
<input ref="/expired_training/ending/ending_note_2">
91+
<label ref="jr:itext('/expired_training/ending/ending_note_2:label')"/>
92+
</input>
93+
</group>
94+
</h:body>
95+
</h:html>

0 commit comments

Comments
 (0)