Repository navigation
Conversation
…nd companies, and a step that drops events.location
…kind of event on tickets, and no old free-text location
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Events, team, guests and companies can all be exported and imported as CSV, using the v2 columns, and each import saves all of it or none of it. The old free-text
events.locationis no longer read anywhere, and tickets show the kind of event.Closes #295
Closes #296
Closes #298
Part of #328
Type of change
What changed
supabase/v2/18_csv_imports.sql):v2.import_events,import_team,import_guestsandimport_companies. Each saves the new rows, then the changed ones, in one transaction, so a refused row, a missing id or a bad value saves nothing. They run as the caller, so RLS still decides who can write, and only signed-in users can call them. Posters, photos and logos are never touched.7:30PMor19:30. An end time before the start is an error./guests/importand/guests/companies/import, with Export and Import buttons on both lists. All four import pages share one page shell (CsvImportPage) for loading and errors.lib/csv/, and they all reuse the form schemas (the company sheet's schema moved tolib/form/company-form.ts).locationremoved from the admin's event type, form and CSV, the site's place reading, and03_populate.sql.19_drop_event_location.sqldrops the column; it stops if an in-person event still has only the old text.lib/ui/accents.ts.⚙️ Backend / admin only: data changes
No Supabase changes
Supabase schema changed (tables/columns listed below, with a migration or SQL included)
RLS policies added or changed (only signed-in execs can write; public can only read)
New environment variables (added to
.env.exampleand noted below)18_csv_imports.sql(step 19): four import functions, security invoker, execute forauthenticatedonly. Already applied on the live project, after a dry run where an insert, an id that doesn't exist and a bad category all rolled back cleanly.19_drop_event_location.sql(step 20): dropsevents.location. Not applied yet. Run it only after this PR is merged and deployed, because the admin and site before it still read the column. No event depends onlocationtoday (0 of 28).How to test
pnpm i && pnpm devinapps/adminMeet the Pros), add a row with an empty id, then import. Check the print order, then press Import.partyand import. The order comes back "Sent back" and nothing is saved.google, then import. Try a company that doesn't exist and check the error.Checklist
pnpm lintandpnpm buildpass locally.envfiles committed (anon key only on the client, never the service role key)