Skip to content

Commit

Permalink
Fix ECU postal code selection to use cities.
Browse files Browse the repository at this point in the history
Fix ECU postal code selection to use cities.
  • Loading branch information
kaio-donadelli authored Sep 12, 2023
2 parents 69d6fca + c6db183 commit 5685437
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Ecuador postal code settings to be more granular and show the cities list during check-out.

## [3.34.6] - 2023-08-24

## [3.34.5] - 2023-08-24
Expand Down
10 changes: 5 additions & 5 deletions react/country/ECU.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ONE_LEVEL } from '../constants'
import { firstLevelPostalCodes } from '../transforms/postalCodes'
import { TWO_LEVELS } from '../constants'
import { secondLevelPostalCodes } from '../transforms/postalCodes'
import { getOneLevel, getTwoLevels } from '../transforms/addressFieldsOptions'
import type { PostalCodeRules } from '../types/rules'

Expand Down Expand Up @@ -1278,9 +1278,9 @@ const countryData = {
const rules: PostalCodeRules = {
country: 'ECU',
abbr: 'EC',
postalCodeFrom: ONE_LEVEL,
postalCodeLevels: ['state'],
firstLevelPostalCodes: firstLevelPostalCodes(countryData),
postalCodeFrom: TWO_LEVELS,
postalCodeLevels: ['state', 'city'],
secondLevelPostalCodes: secondLevelPostalCodes(countryData),
fields: [
{
hidden: true,
Expand Down

0 comments on commit 5685437

Please sign in to comment.