refactor(events): Centralize editable fields for event objects

- Implemented a whitelist for editable fields for the 'event' object type to prevent sending read-only fields in POST/PATCH requests.
- Created a new file  to define the editable fields.
- Modified  and  to use this whitelist.
- Removed the temporary cleaning logic from the event settings page.
- Corrected Svelte 5  to  in event settings components.
- Updated Dexie interfaces for badge, badge_template, and device to use string IDs.
This commit is contained in:
Scott Idem
2025-11-19 12:12:29 -05:00
parent 2e70ce312b
commit d99e9ee1b0
9 changed files with 115 additions and 49 deletions

View File

@@ -0,0 +1,50 @@
export const editable_fields = [
'code',
'conference',
'type',
'name',
'summary',
'description',
'start_datetime',
'end_datetime',
'timezone',
'location_address_json',
'location_text',
'attend_json',
'attend_text',
'status',
'mod_abstracts_json',
'mod_badges_json',
'mod_exhibits_json',
'mod_meetings_json',
'mod_pres_mgmt_json',
'cfg_json',
'enable',
'hide',
'priority',
'sort',
'group',
'notes',
'contact_li_json',
'external_person_id',
'physical',
'virtual',
'recurring',
'recurring_pattern',
'recurring_start_time',
'recurring_end_time',
'recurring_text',
'weekday_sunday',
'weekday_monday',
'weekday_tuesday',
'weekday_wednesday',
'weekday_thursday',
'weekday_friday',
'weekday_saturday',
'attend_url',
'attend_url_text',
'attend_url_code',
'attend_url_passcode',
'attend_phone',
'attend_phone_passcode'
];