diff --git a/backend/email/emails/functions/mock.ts b/backend/email/emails/functions/mock.ts index d5528a1..7616992 100644 --- a/backend/email/emails/functions/mock.ts +++ b/backend/email/emails/functions/mock.ts @@ -36,6 +36,7 @@ export const sinclairProfile: ProfileRow = { pref_gender: ['female', 'trans-female'], pref_age_min: 18, pref_age_max: 21, + religion: [], pref_relation_styles: ['friendship'], pref_romantic_styles: ['poly', 'open', 'mono'], wants_kids_strength: 3, @@ -137,6 +138,7 @@ export const jamesProfile: ProfileRow = { pref_gender: ['female'], pref_age_min: 22, pref_age_max: 32, + religion: [], pref_relation_styles: ['friendship'], pref_romantic_styles: ['poly', 'open', 'mono'], wants_kids_strength: 4, diff --git a/backend/supabase/profiles.sql b/backend/supabase/profiles.sql index 3098d6f..3ac9211 100644 --- a/backend/supabase/profiles.sql +++ b/backend/supabase/profiles.sql @@ -45,6 +45,7 @@ CREATE TABLE IF NOT EXISTS profiles ( region_code TEXT, religious_belief_strength INTEGER, religious_beliefs TEXT, + religion TEXT[], twitter TEXT, university TEXT, user_id TEXT NOT NULL, diff --git a/common/src/supabase/schema.ts b/common/src/supabase/schema.ts index bd3a687..05bf5cb 100644 --- a/common/src/supabase/schema.ts +++ b/common/src/supabase/schema.ts @@ -565,6 +565,7 @@ export type Database = { pref_romantic_styles: string[] | null referred_by_username: string | null region_code: string | null + religion: string[] | null religious_belief_strength: number | null religious_beliefs: string | null twitter: string | null @@ -613,6 +614,7 @@ export type Database = { pref_romantic_styles?: string[] | null referred_by_username?: string | null region_code?: string | null + religion?: string[] | null religious_belief_strength?: number | null religious_beliefs?: string | null twitter?: string | null @@ -661,6 +663,7 @@ export type Database = { pref_romantic_styles?: string[] | null referred_by_username?: string | null region_code?: string | null + religion?: string[] | null religious_belief_strength?: number | null religious_beliefs?: string | null twitter?: string | null diff --git a/web/components/filters/choices.tsx b/web/components/filters/choices.tsx index 0dd83da..f597564 100644 --- a/web/components/filters/choices.tsx +++ b/web/components/filters/choices.tsx @@ -45,6 +45,24 @@ export const EDUCATION_CHOICES = { PhD: 'doctorate', } +export const RELIGION_CHOICES = { + 'Atheist': 'atheist', + 'Agnostic': 'agnostic', + 'Spiritual': 'spiritual', + 'Christian': 'christian', + 'Muslim': 'muslim', + 'Jewish': 'jewish', + 'Hindu': 'hindu', + 'Buddhist': 'buddhist', + 'Sikh': 'sikh', + 'Taoist': 'taoist', + 'Jain': 'jain', + 'Shinto': 'shinto', + 'Zoroastrian': 'zoroastrian', + 'Unitarian Universalist': 'unitarian_universalist', + 'Other': 'other', +} + export const REVERTED_RELATIONSHIP_CHOICES = Object.fromEntries( Object.entries(RELATIONSHIP_CHOICES).map(([key, value]) => [value, key]) ); @@ -63,4 +81,8 @@ export const REVERTED_DIET_CHOICES = Object.fromEntries( export const REVERTED_EDUCATION_CHOICES = Object.fromEntries( Object.entries(EDUCATION_CHOICES).map(([key, value]) => [value, key]) +); + +export const REVERTED_RELIGION_CHOICES = Object.fromEntries( + Object.entries(RELIGION_CHOICES).map(([key, value]) => [value, key]) ); \ No newline at end of file diff --git a/web/components/optional-profile-form.tsx b/web/components/optional-profile-form.tsx index ae2a545..6131492 100644 --- a/web/components/optional-profile-form.tsx +++ b/web/components/optional-profile-form.tsx @@ -32,7 +32,7 @@ import { DIET_CHOICES, EDUCATION_CHOICES, POLITICAL_CHOICES, - RELATIONSHIP_CHOICES, + RELATIONSHIP_CHOICES, RELIGION_CHOICES, ROMANTIC_CHOICES } from "web/components/filters/choices"; import toast from "react-hot-toast"; @@ -407,6 +407,11 @@ export const OptionalProfileUserForm = (props: {