[MWPW-194613] : Unify RSVP and custom attributes config UI#201
Open
sharmeebuilds wants to merge 17 commits into
Open
[MWPW-194613] : Unify RSVP and custom attributes config UI#201sharmeebuilds wants to merge 17 commits into
sharmeebuilds wants to merge 17 commits into
Conversation
- CustomAttributeConfig is now treated as a single attribute per scope (not multiple rows from values[]); table shows one row with name, label, inputType, enabled, and values count - Remove checkbox inputType — BE only supports text, single-select, multi-select - handleSaveAttr now PUTs the full CustomAttributeConfig (name, label, inputType, enabled, values[]) instead of appending to values[] - Delete removes the whole customAttributes slice via deleteSlice - Drop drag-and-drop reorder infrastructure (no longer applicable) - Remove dead boolean inputType guard in publishGuard.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- inferFieldType: replace multi-select (not a valid RsvpFieldType) with checkbox so legacy configs map to a real RSVP field type - isSelectableField: align with checkbox instead of multi-select - Remove rules and displayAs from mapped fields; neither is in RsvpFormField Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace ResourceDashboardLayout (RSVP) and flex-div layout (custom attributes) with plain <table> elements using the same border/padding/ header styling as the locale mapping table. Removes expandable rows, inline option editing, search, and sort — these were features of the shared component not needed for a simple config table. Per-row edit/ delete actions are preserved in a trailing column. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Re-add expandedFieldKeys state and a chevron toggle in the Field Name cell. For select and checkbox field types, clicking the chevron renders a detail <tr> showing the options as Badge pills (locale-aware). No inline editing — options are edited via the per-row Edit dialog. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
customAttributes on the scope config is now an array; updated types, guards, save/delete logic, and the EventForm loader accordingly. Custom attribute table rows with single-select or multi-select input type now show a collapsible values panel matching the RSVP table style. valueIds are generated on save to prevent duplicate-key React warnings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Select/multi-select attributes send { attributeId, valueId }; text types
have no valueId and must send { attributeId, value } instead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… endpoint
Replace cachedApi.getConfig(scopeId) with cachedApi.getEventConfigs(eventId)
in EventInfoComponent, RegistrationFieldsComponent, and CustomAttributesComponent
so config data is resolved via the full scope hierarchy through
GET /v1/events/{eventId}/configs instead of the flat scope-level endpoint.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bute IDs ESP now auto-generates attributeId and valueId on the server when not provided (fix/MWPW-199308-scopeconfig-uuid-generation). Update EMC to omit these IDs for new attributes/values and only send existing IDs on updates. Make attributeId and valueId optional in CustomAttributeConfig and CustomAttributeValue types to match the new server-side behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New custom attributes are always created enabled. The toggle was removed from the create/edit form; the enabled field still defaults to true in the save payload. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of removing the attribute from the array on delete, mark it as enabled: false. Both the config management table and the event form custom attributes component filter out disabled attributes from display, so they become invisible without being permanently lost. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… dialog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Attributes that have a server-assigned attributeId have already been persisted and can only be soft-deleted (enabled: false). Attributes without an attributeId have not yet reached the server and can be removed outright, so the delete button remains enabled for those. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All listed attributes are already persisted on the server, so the delete button (which soft-deletes via enabled: false) would always be disabled. Users can disable an attribute via the edit form's enabled toggle instead. The delete dialog and soft-delete logic are retained for future use. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…abled ones Disabled attributes are hidden in the event form but remain visible in the config management table so users can re-enable them via the edit form. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Field names must now be camelCase and unique among sibling fields, enforced inline in both the field list and the per-field edit dialog with save disabled until fixed. Also moved the "Add Field" affordance to the bottom of the field list (dashed outline button) instead of the top, and left-aligned the "Default Value" description text. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…red, visible}
ESP's RSVPFormFields schema (events-service-platform openapi.json) only ever
defined { required, visible, optionOrders? } — the { fields } shape from the
old PR #903 migration plan never shipped and isn't needed. Removes the
dual-shape retry/read logic and always builds/reads the legacy shape.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
enabled: falseinstead of removing them; restore enabled/disabled toggle in the form and remove the delete button for persisted attributesTest plan
npm run check)🤖 Generated with Claude Code