This commit is contained in:
estifanos
2026-08-08 08:57:43 +00:00
parent afaea36ce2
commit acca2eb097

View File

@@ -39,13 +39,9 @@ export function toAddressPayload(values: AddressValues): AddressPayload {
idNumber: values.idNumber.trim(),
// Form holds the alpha-2 code (CountrySelect); API stores the full name.
nationality: getCountryName(values.nationality),
regionId,
cityId,
// `subCityId` is the profile field. The address endpoint has accepted
// the older lower-case spelling too, so submit the same selected id under
// both names until its DTO is fully aligned.
subCityId,
subcityId: subCityId,
regionId: clean(values.regionId),
cityId: clean(values.cityId),
subCityId: clean(values.subcityId),
woredaId: clean(values.woredaId),
kebeleId: clean(values.woredaId), // no separate Kebele field — mirrors woredaId
streetAddress: clean(values.streetAddress),