fix: ( fayda ) reject a second booking for the same identity on one departure

This commit is contained in:
Abubeker Yasin
2026-08-19 15:28:10 +03:00
parent 1f38b5a3c6
commit 014b1a6d47
7 changed files with 321 additions and 11 deletions

View File

@@ -363,6 +363,9 @@ const adultPassengerCount = searchCriteria?.adultCount ?? passengers.filter(p =>
dateOfBirth: p.dateOfBirth,
idDocumentType: isEthiopian ? 'NATIONAL_ID' : 'PASSPORT',
idDocumentNumber: isEthiopian ? (p.nationalId || '') : '',
// Verified Fayda identity for this traveller. The backend stores it on the booking seat and
// refuses a second seat for the same identity on the same departure.
...(p.faydaSub ? { faydaSub: p.faydaSub } : {}),
passportNumber: !isEthiopian ? (p.passportNumber || '') : '',
passportCountry: !isEthiopian ? (p.passportCountry || '') : '',
nationality: p.nationality,
@@ -417,6 +420,9 @@ const adultPassengerCount = searchCriteria?.adultCount ?? passengers.filter(p =>
dateOfBirth: p.dateOfBirth,
idDocumentType: isEthiopian ? 'NATIONAL_ID' : 'PASSPORT',
idDocumentNumber: isEthiopian ? (p.nationalId || '') : '',
// Verified Fayda identity for this traveller. The backend stores it on the booking seat and
// refuses a second seat for the same identity on the same departure.
...(p.faydaSub ? { faydaSub: p.faydaSub } : {}),
passportNumber: !isEthiopian ? (p.passportNumber || '') : '',
passportCountry: !isEthiopian ? (p.passportCountry || '') : '',
nationality: p.nationality,