diff --git a/README.md b/README.md index d01b981..6f1a279 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,10 @@ Requirements: 1. Create a PostgreSQL user and database (the user should own the database). For example: `create user pronouns with password 'password'; create database pronouns with owner pronouns;` 2. Copy `.env.example` in the repository root to a new file named `.env` and fill out the required options. -3. Run `go run -v . database migrate` to initialize the database, then optionally `go run -v . database seed` to insert a test user. -4. Run `pnpm dev`. Alternatively, if you don't want the backend to live reload, run `go run -v . web`, +3. Copy `./frontend/.env.example` to `./frontend/env` and fill out the required options (`PUBLIC_BASE_URL`), + instead of using `localhost` use `127.0.0.1`. +4. Run `go run -v . database migrate` to initialize the database, then optionally `go run -v . database seed` to insert a test user. +5. Run `pnpm dev`. Alternatively, if you don't want the backend to live reload, run `go run -v . web`, then change to the `frontend/` directory and run `pnpm dev`. See [`docs/production.md`](/docs/production.md#configuration) for more information about keys in the backend and frontend `.env` files. diff --git a/backend/db/field.go b/backend/db/field.go index 285d5d4..d2d9f0b 100644 --- a/backend/db/field.go +++ b/backend/db/field.go @@ -43,7 +43,10 @@ func (f Field) Validate(custom CustomPreferences) string { } if !entry.Status.Valid(custom) { - return fmt.Sprintf("entries.%d: status is invalid", i) + if entry.Status == "missing" { + return fmt.Sprintf("didn't select a status for entries.%d. make sure to select it to the right of the field", i) + } + return fmt.Sprintf("entries.%d status: '%s' is invalid", i, entry.Status) } } diff --git a/frontend/src/lib/api/entities.ts b/frontend/src/lib/api/entities.ts index 8129ef7..e245522 100644 --- a/frontend/src/lib/api/entities.ts +++ b/frontend/src/lib/api/entities.ts @@ -69,7 +69,7 @@ export interface Settings { } export interface Field { - name: string; + name: string | null; entries: FieldEntry[]; } diff --git a/frontend/src/lib/components/edit/EditableField.svelte b/frontend/src/lib/components/edit/EditableField.svelte index 1c3f229..7778312 100644 --- a/frontend/src/lib/components/edit/EditableField.svelte +++ b/frontend/src/lib/components/edit/EditableField.svelte @@ -36,7 +36,7 @@