Skip to content

Commit

Permalink
[DX Adoption Fixes] Prevent Topics and Tags submissions without data (#…
Browse files Browse the repository at this point in the history
…362)

* fixing lana.log typo errors

* DX adoption ECC changes (#283)

* event format update prototyped

* Update event-format-component-controller.js

* topic tags design update

* format topics interaction refined

* community links component updated

* wip

* New fields for reg details finished

* Toggle switch built for RSVP step

* event type changes

* Update registration-details-component-controller.js

* fixing topics tag

* fix format naming mistake

* topics finished

* Update event-format-component-controller.js

* Update event-format-component-controller.js

* small fixes

* Update event-format-component-controller.js

* venue and dup check fix

* fallback with all series when filtering returned 0

* fix rsvp configs layout

* more tooltips

* Update event-format-component-controller.js

* Decoupling done

* new action button icons

* fix import paths

* linting

* remove legacy divider code

* fixing topics

* DX-adoption fixes

* send tag instead of name for industry tags

* update login requirement language

* Small refactor

* removing extra populate series call

* wip

* step lock and topic population working

* remove console log

* Update controller.js

* wip

* wip

* creativeCloud working without the correct topics list

* DX to Experience Cloud update

* Update allowGuestRegistration input

* Update cmc.js

* Update controller.js

* Update controller.js

* Remove Template ID interfacing from Event level API calls (#355)

* Remove Template ID interfacing from Event level API calls

* Update ecc-dashboard.js

* Update series-templates-component.css

* Prevent submission without data
  • Loading branch information
qiyundai authored Feb 10, 2025
1 parent 7e49573 commit e86019f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ecc/blocks/event-topics-component/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export function onSubmit(component, props) {
const { payload } = props;
payload.pendingTopics = { ...payload.topics, [topicType]: pendingTopics };
const existingTags = payload.tags ? payload.tags.split(',') : [];
payload.tags = [...new Set([...existingTags, ...tags.map((tag) => tag.caasId)])].join(',');
const tagsToSubmit = [...new Set([...existingTags, ...tags.map((tag) => tag.caasId)])].join(',');
if (tagsToSubmit) payload.tags = tagsToSubmit;
props.payload = payload;
}

Expand Down
3 changes: 2 additions & 1 deletion ecc/blocks/form-handler/data-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export function setPayloadCache(payload) {

const { pendingTopics } = payload;
if (pendingTopics) {
payloadCache.topics = Object.values(pendingTopics).reduce((acc, val) => acc.concat(val), []);
const jointTopics = Object.values(pendingTopics).reduce((acc, val) => acc.concat(val), []);
if (jointTopics.length) payloadCache.topics = jointTopics;
}
}

Expand Down

0 comments on commit e86019f

Please sign in to comment.