Skip to content

Commit 0e9fa01

Browse files
authored
Merge pull request #324 from digital-gov-mg/fix/revert-toamasina-conditions
Fix/revert toamasina conditions
2 parents cbb10df + 6c112f7 commit 0e9fa01

File tree

2 files changed

+30
-57
lines changed

2 files changed

+30
-57
lines changed

public/helpers.js

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,12 @@ function eventStatement() {
255255
? 'fokontany ' + this.birthChildFokontanyCustomAddress + ','
256256
: '',
257257

258-
this.birthChildFokontanyCustomAddress
259-
.toLowerCase()
260-
.includes('toamasina')
261-
? ''
262-
: 'kaominina' +
263-
' ' +
258+
'kaominina',
264259
(definitionOffice(
265260
replaceByUppercase(placeOfBirthDistrict)
266261
) || '-') +
267262
',' +
268-
'district' +
269-
' ' +
263+
'district ' +
270264
definitionDistrict(placeOfBirthState) || '-'
271265
]
272266
: [
@@ -416,10 +410,7 @@ function fatherDetails(fatherPrimaryDistrict) {
416410
(this.birthFatherFokontanyCustomAddress ||
417411
this.birthMotherFokontanyCustomAddress ||
418412
'-') + ',',
419-
fatherPrimaryDistrict?.toLowerCase().includes('cu toamasina')
420-
? // && (this.birthFatherFokontanyCustomAddress?.toLowerCase().includes('toamasina') || this.birthMotherFokontanyCustomAddress?.toLowerCase().includes('toamasina'))
421-
''
422-
: 'kaominina' +
413+
'kaominina' +
423414
' ' +
424415
(definitionOffice(
425416
replaceByUppercase(fatherPrimaryDistrict)
@@ -671,16 +662,12 @@ function motherDetails(motherPrimaryDistrict) {
671662
? [
672663
'amin’ny fokontany',
673664
(this.birthMotherFokontanyCustomAddress || '-') + ',',
674-
675-
motherPrimaryDistrict?.toLowerCase().includes('cu toamasina')
676-
? // && this.birthMotherFokontanyCustomAddress.toLowerCase().includes('toamasina')
677-
''
678-
: 'kaominina' +
679-
' ' +
680-
(definitionOffice(
681-
replaceByUppercase(motherPrimaryDistrict)
682-
) || '-') +
683-
','
665+
'kaominina' +
666+
' ' +
667+
(definitionOffice(
668+
replaceByUppercase(motherPrimaryDistrict)
669+
) || '-') +
670+
','
684671
]
685672
: [
686673
([

src/form/common/certificate/handlebars/helpers.ts

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export function eventStatement(): Handlebars.HelperDelegate {
216216
motherPrimaryDistrict: string
217217
) {
218218
return joinValuesWith([
219-
"--Tamin'ny",
219+
'--Tamin’ny',
220220
customizeDateInCertificateContent(this.eventDate) + ',',
221221
'tamin’ny',
222222
convertTimeToMdgCustomWords(this.birthChildBirthTime),
@@ -233,19 +233,12 @@ export function eventStatement(): Handlebars.HelperDelegate {
233233
? 'fokontany ' + this.birthChildFokontanyCustomAddress + ','
234234
: '',
235235

236-
this.birthChildFokontanyCustomAddress
237-
?.toLowerCase()
238-
.includes('toamasina') ||
239-
this.placeOfBirthFacility?.toLowerCase().includes('toamasina')
240-
? ''
241-
: 'kaominina' +
242-
' ' +
243-
(definitionOffice(replaceByUppercase(placeOfBirthDistrict)) ||
244-
'-') +
245-
', ' +
246-
'district' +
247-
' ' +
248-
definitionDistrict(placeOfBirthState) || '-'
236+
'kaominina',
237+
(definitionOffice(replaceByUppercase(placeOfBirthDistrict)) ||
238+
'-') +
239+
', ' +
240+
'district ' +
241+
(definitionDistrict(placeOfBirthState) || '-')
249242
]
250243
: [
251244
'no teraka tao',
@@ -315,15 +308,10 @@ function fatherDetails(
315308
(this.birthFatherFokontanyCustomAddress ||
316309
this.birthMotherFokontanyCustomAddress ||
317310
'-') + ',',
318-
fatherPrimaryDistrict?.toLowerCase().includes('cu toamasina')
319-
? // && (this.birthFatherFokontanyCustomAddress?.toLowerCase().includes('toamasina') || this.birthMotherFokontanyCustomAddress?.toLowerCase().includes('toamasina'))
320-
''
321-
: 'kaominina' +
322-
' ' +
323-
(definitionOffice(
324-
replaceByUppercase(fatherPrimaryDistrict)
325-
) || '- ') +
326-
','
311+
'kaominina ' +
312+
(definitionOffice(replaceByUppercase(fatherPrimaryDistrict)) ||
313+
'- ') +
314+
','
327315
]
328316
: [
329317
([
@@ -373,14 +361,10 @@ function motherDetails(
373361
'amin’ny fokontany',
374362
(this.birthMotherFokontanyCustomAddress || '-') + ',',
375363

376-
motherPrimaryDistrict?.toLowerCase().includes('cu toamasina')
377-
? // && this.birthMotherFokontanyCustomAddress?.toLowerCase().includes('toamasina')
378-
''
379-
: 'kaominina' +
380-
' ' +
381-
(definitionOffice(replaceByUppercase(motherPrimaryDistrict)) ||
382-
'-') +
383-
','
364+
'kaominina ' +
365+
(definitionOffice(replaceByUppercase(motherPrimaryDistrict)) ||
366+
'-') +
367+
','
384368
]
385369
: [
386370
([
@@ -499,9 +483,11 @@ export function registrationStatement(): Handlebars.HelperDelegate {
499483
'monina ao',
500484
...(this.countryPrimaryInformant == 'Madagascar'
501485
? [
502-
`amin'ny`,
486+
`aminny`,
503487
this.birthInformantFokontanyCustomAddress
504-
? `fokontany ${this.birthInformantFokontanyCustomAddress},`
488+
? `fokontany ${
489+
this.birthInformantFokontanyCustomAddress || '-'
490+
},`
505491
: '',
506492
'kaominina',
507493
(definitionOffice(
@@ -1163,12 +1149,12 @@ function getRecognitionMentionValues(this: Record<string, string>, i: number) {
11631149
return [
11641150
`Nozanahan'i ${this['birthMentionChildFamilyName__' + i] || '-'} ${
11651151
this['birthMentionChildFirstName__' + i] || '-'
1166-
} tamin'ny ${
1152+
} taminny ${
11671153
this['birthMentionRecognitionDate__' + i]
11681154
?.split('-')
11691155
?.reverse()
11701156
?.join('/') || '-'
1171-
} tao amin'ny kaominina ${
1157+
} tao aminny kaominina ${
11721158
this['birthMentionRecognitionPlace__' + i] || '-'
11731159
} soratra faha ${this['birthMentionRecognitionActNumber__' + i] || '-'}.`
11741160
]

0 commit comments

Comments
 (0)