Use city name without type for delivery and keep settlement in address - #522
Open
ekateluv wants to merge 1 commit into
Open
Use city name without type for delivery and keep settlement in address#522ekateluv wants to merge 1 commit into
ekateluv wants to merge 1 commit into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
CDEK resolves the delivery destination by postal code, but when the code is missing from its base (new developments), it falls back to the locality name, and city names with type prefixes such as 'г Мытищи' fail to resolve, so the checkout rejected such addresses with a delivery error. Bare city names from dadata resolve correctly. A settlement inside an urban district (поселок Нагорное in Мытищи) was previously dropped from the address entirely; now it is prepended to the street line. A settlement-only address (no city, e.g. пгт Лесной) keeps the typed settlement name as the locality so the type is not lost and nothing is written twice.
ekateluv
force-pushed
the
fix/order-address-city-settlement
branch
from
August 14, 2026 15:17
96372bd to
2e4cb38
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Стек поверх #521 (общий файл
AddressAutocomplete.vue);Что происходит; кому и зачем нужно:
СДЭК определяет город доставки по индексу, а когда индекса нет в его базе (новостройки) — по названию, и названия с типом («г Мытищи») не резолвятся: выпадает ошибка «Доставка по данному адресу невозможна» (пример: Мытищи, пос. Нагорное, ул Полковника Романова 11, индекс 141095). Кроме того, посёлок внутри городского округа терялся из адреса целиком — в накладную ушла бы улица без посёлка.
Что поменялось для пользователей:
Город из dadata пишется именем («Мытищи»), а посёлок при заполненном городе дописывается в начало строки улицы («поселок Нагорное, ул Полковника Романова») - если индекса нет то сдек найдет по названию города.
Как проверял/а:
на тестовом
Чеклист ревью:
Перед мержем не забудь проверить:
Опционально (но важно для изменений в инфраструктуру):