fix(options): массовое назначение опций категориям#187
Merged
Conversation
- Call Option\\Assign instead of non-existent Delivery\\Assign when mass-assigning options to categories. - After context-menu "select all", expand subtree fully then cascade-check nodes and run checkchange once so hidden category ids match selection. Fixes #184
- Fix assign branch: compare method before ucfirst (Assign !== assign). - Run assign before empty(ids) early return; extract processAssign(). - Propagate ProcessorResponse errors from nested runProcessor (Vendor pattern). - DRY tree context menu: bulkToggleChecks for select/clear all (symmetric lazy subtree). Fixes #184
- Validate json_decode results as arrays; cast assign ids to int. - failureFromProcessorResponse: guard non-ProcessorResponse from runProcessor. - bulkToggleChecks: no-op if root missing or expand unavailable. Refs #184
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.
Описание
Исправлено массовое назначение опций категориям товаров: вызывался несуществующий процессор
Delivery\\AssignвместоOption\\Assign. Дополнительно исправлена логика веткиassign(сравнение метода доucfirst), обработка ответов вложенных процессоров, валидация массивов из JSON и симметричное «Выбрать всё» / «Снять всё» в дереве категорий с полным раскрытием поддерева.Тип изменений
Связанные Issues
Closes #184
Как это было протестировано?
Сценарий из issue: несколько опций → «Назначить» → контекстное меню «Выбрать всё» на родительских категориях → сохранить; проверить связи опция–категория. Автотесты в PR не запускались.
Конфигурация тестирования:
Скриншоты (если применимо)
Чеклист
Дополнительные заметки
Option\\Assign(_err_ae) — это поведение вложенного процессора; при необходимости идемпотентность можно обсудить отдельно.bulkToggleChecksзащищён от отсутствияroot.expand.