Skip to content

[MWPW-194613] : Unify RSVP and custom attributes config UI#201

Open
sharmeebuilds wants to merge 17 commits into
devfrom
rsvp-configs-new
Open

[MWPW-194613] : Unify RSVP and custom attributes config UI#201
sharmeebuilds wants to merge 17 commits into
devfrom
rsvp-configs-new

Conversation

@sharmeebuilds

Copy link
Copy Markdown
Collaborator

Summary

  • Unify RSVP and custom attributes tables to match the locale table style, with expandable rows for select/checkbox fields
  • Align custom attributes UI and payload with the BE array schema, including text-type attribute support
  • Switch config fetch from scope-based to event configs endpoint
  • Soft-delete custom attributes via enabled: false instead of removing them; restore enabled/disabled toggle in the form and remove the delete button for persisted attributes
  • Show all custom attributes in the config list, including disabled ones
  • Remove client-side UUID generation for custom attribute IDs
  • Fix RSVP legacy field mapping for checkbox fields and remove dead fields
  • Restore "cannot be undone" messaging on the attribute delete dialog

Test plan

  • Verify custom attributes list shows enabled and disabled attributes
  • Verify enabled/disabled toggle persists correctly and delete is disabled for persisted attributes
  • Verify RSVP and custom attribute tables render/expand correctly for select/checkbox fields
  • Lint + type-check pass (npm run check)

🤖 Generated with Claude Code

sharmeebuilds and others added 15 commits June 16, 2026 20:49
- 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>
@sharmeebuilds sharmeebuilds changed the title Unify RSVP and custom attributes config UI [MWPW-194613] : Unify RSVP and custom attributes config UI Jul 1, 2026
sharmeebuilds and others added 2 commits July 6, 2026 14:22
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant