Allow bulk creation of SCE events using CSV files - #2181
Conversation
| if (!file) return; | ||
|
|
||
| if (file.size > maxFileSize) { | ||
| alert('File size exceeds the 10MB limit.'); |
There was a problem hiding this comment.
can we use
also in the message, include how many bytes the file is like
file is size 1234567, this exceeds the 10MB upload limit
|
|
||
| async function handleFileCreateEvent() { | ||
| for (const row of values) { | ||
| const waitlistValue = Number(row[6]); |
There was a problem hiding this comment.
could we be 100% sure that the row has at least 7 elements? like a small if statement,
and small comment for what each column means like
date,title,description,...
otherwise this happens
a = []
a[4] // undefinedca08f66 to
f303f37
Compare
evanugarte
left a comment
There was a problem hiding this comment.
lets also add some screenshots for what the confirm/error modals look like
tysm for this
| } | ||
| let missingElements = []; | ||
| for (let i = 0; i < row.length; i++) { | ||
| if (i !== 9 && row[i] === '') { |
There was a problem hiding this comment.
could we leave a comment here on why index 9 is treated differently?
| setFileData([]); | ||
| setHeadersArray([]); | ||
| setValues([]); | ||
| const actualHeaders = (headersArray[0] || []).map((h) => h.trim()); | ||
| const missingHeaders = EXPECTED_HEADERS.filter((h) => !actualHeaders.includes(h)); | ||
| setModalWarningMessage(`Missing required columns: ${missingHeaders.join(', ')}`); | ||
| setConfirmModal(true); | ||
| isFileUpload.current = false; | ||
| return; |
There was a problem hiding this comment.
could this be its own function
that clears the data and shows the modal, this helper function could take th emodal warning message a parameter, lmk if this makes sense
its cause we have the same reset logic below for emptyValueCounter > 0
I am confused by exactly what modals you want screenshots of besides the ones I already posted. Is there supposed to be another modal I need to add elsewhere? |


Recording.2026-08-12.151451.mp4
Features: Adds import CSV option to create SCE events page. Displays table for data upon file upload. Click create events to publish all events in CSV file. Currently no support for adding registration questions or adding other event admins.
Image is example of a CSV file to create SCE events. Must include headers and each row is a single event. Date and time must be in the same format shown and publish status + visibility must be lowercase. To disable waitlist, put -1 as value. Publish date can be left empty if N/A.