Skip to content

Commit 87dcdfa

Browse files
authored
Merge pull request #1048 from opencrvs/ocrvs-10578
Simplify conditionals
2 parents 228f7f7 + ef1f1e7 commit 87dcdfa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/form/v2/birth/forms/pages/father.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export const father = defineFormPage({
360360
{
361361
type: ConditionalType.SHOW,
362362
conditional: and(
363-
not(field('mother.detailsNotAvailable').isEqualTo(true)),
363+
field('mother.detailsNotAvailable').isFalsy(),
364364
field('father.detailsNotAvailable').isFalsy()
365365
)
366366
},
@@ -385,10 +385,7 @@ export const father = defineFormPage({
385385
type: ConditionalType.SHOW,
386386
conditional: and(
387387
requireFatherDetails,
388-
or(
389-
field('mother.detailsNotAvailable').isEqualTo(true),
390-
field('father.addressSameAs').isEqualTo(YesNoTypes.NO)
391-
)
388+
not(field('father.addressSameAs').isEqualTo(YesNoTypes.YES))
392389
)
393390
}
394391
],

0 commit comments

Comments
 (0)