Skip to content

Commit

Permalink
feat: contact section (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Mar 8, 2023
2 parents c5c5124 + 323227f commit e347f36
Show file tree
Hide file tree
Showing 53 changed files with 1,395 additions and 925 deletions.
7 changes: 7 additions & 0 deletions apps/app/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* eslint-disable node/no-process-env */
// import { env } from './src/env/server.mjs'
import bundleAnalyze from '@next/bundle-analyzer'
import { PrismaPlugin } from '@prisma/nextjs-monorepo-workaround-plugin'
import withRoutes from 'nextjs-routes/config'

import path from 'path'
Expand Down Expand Up @@ -55,6 +56,12 @@ const nextConfig = {
typescript: {
ignoreBuildErrors: isVercelActiveDev,
},
webpack: (config, { isServer }) => {
if (isServer) {
config.plugins = [...config.plugins, new PrismaPlugin()]
}
return config
},
}

/**
Expand Down
1 change: 1 addition & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
},
"devDependencies": {
"@playwright/test": "1.31.2",
"@prisma/nextjs-monorepo-workaround-plugin": "4.11.0",
"@tanstack/react-query-devtools": "4.26.1",
"@total-typescript/ts-reset": "0.3.7",
"@types/eslint": "8.21.1",
Expand Down
4 changes: 4 additions & 0 deletions apps/app/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"claimed": "Claimed",
"clear": "Clear",
"close": "Close",
"contact": "Contact",
"contact-us": "Contact Us",
"country-select": "Choose a country",
"create-new-list": "Create new list",
Expand Down Expand Up @@ -52,6 +53,7 @@
"none-apply": "None of these apply to me",
"other-specify": "Other (please specify)",
"password": "Password",
"phone": "Phone",
"photos": "Photos",
"powered-by-vercel": "Powered by Vercel",
"prefer-not-to-say": "Prefer not to say",
Expand Down Expand Up @@ -82,6 +84,7 @@
"show-less": "Show less",
"show-more": "Show more",
"sign-up": "Sign up for free",
"social": "Social",
"submit": "Submit",
"submit-review": "Submit review",
"subscribe-to-newsletter": "Subscribe to Newsletter",
Expand All @@ -97,6 +100,7 @@
"view-list": "View list",
"view-x-result_one": "View {{count}} result",
"view-x-result_other": "View {{count}} results",
"website": "Website",
"your-comments": "Your Comments",
"youtube": "YouTube"
}
18 changes: 9 additions & 9 deletions packages/api/generated/attributeCategory.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export const attributeCategory = [
{ id: 'attc_01GTJ0VWEN6ZV6SVZFRWKDJX47', tag: 'additional-information', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VWGD7NE1H1RC67Y0WKV3', tag: 'community', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VWW4F6JC0HZPKBWEPXD8', tag: 'cost', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VWWTJSTGQ7FN4YV7M9A5', tag: 'eligibility-requirements', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VWZ1M4FKJY79P0CTMP8Q', tag: 'languages', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VWZYCK97RAFENVQCVKJC', tag: 'system', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VX0BRSHSR9PM0ECTENYA', tag: 'service-access-instructions', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VX20EPC5Y32PV7F6T9TT', tag: 'organization-leadership', icon: null, ns: 'attribute' },
{ id: 'attc_01GTJ0VX33HMFYDJ49BPXS8A2E', tag: 'service-focus', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNK2D5FJAGGQCB11EK0X', tag: 'additional-information', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNK3VDSED9CTP47SDATJ', tag: 'community', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNKBDKA8AX3K7E9AF0EJ', tag: 'cost', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNKCKQMKDW68CNH60D48', tag: 'eligibility-requirements', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNKDS1ARTEDNE1D4DWJZ', tag: 'languages', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNKEW2JSBHGKWWZTAT5T', tag: 'system', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNKEA4T08FH0TP6EZ5D9', tag: 'service-access-instructions', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNKFD37Q5Z1XWHNE77KV', tag: 'organization-leadership', icon: null, ns: 'attribute' },
{ id: 'attc_01GV0TJNKGZ5E02D7KRRPVDZFH', tag: 'service-focus', icon: null, ns: 'attribute' },
] as const

export type AtttributeCategory = (typeof attributeCategory)[number]
4 changes: 2 additions & 2 deletions packages/api/generated/languages.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export const translatedLangs = [
{ nativeName: 'اللغة العربية', localeCode: 'ar', languageName: 'Arabic' },
{ nativeName: 'English', localeCode: 'en', languageName: 'English' },
{ nativeName: 'español', localeCode: 'es', languageName: 'Spanish' },
{ nativeName: 'اللغة العربية', localeCode: 'ar', languageName: 'Arabic' },
{ nativeName: 'français', localeCode: 'fr', languageName: 'French' },
{ nativeName: 'Русский', localeCode: 'ru', languageName: 'Russian' },
] as const
export const locales = ['en', 'es', 'ar', 'fr', 'ru'] as const
export const locales = ['ar', 'en', 'es', 'fr', 'ru'] as const

export type TranslatedLangs = typeof translatedLangs
export type LocaleCodes = (typeof locales)[number]
4 changes: 2 additions & 2 deletions packages/api/generated/locales.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/** @type {['en', 'es', 'ar', 'fr', 'ru']} */
export const locales = ['en', 'es', 'ar', 'fr', 'ru']
/** @type {['ar', 'en', 'es', 'fr', 'ru']} */
export const locales = ['ar', 'en', 'es', 'fr', 'ru']
28 changes: 14 additions & 14 deletions packages/api/generated/serviceCategory.ts
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
export const serviceCategory = [
{
id: 'svct_01GTJ0VVVQTE8HGCJ7RWATDFF5',
id: 'svct_01GV0TJNGMDKYQA0MGKARWG4SQ',
category: 'Abortion Care',
tsKey: 'abortion-care.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VVWX5VFB732C0566K3DD',
id: 'svct_01GV0TJNGN9CW9DQWQ9VN21780',
category: 'Community Support',
tsKey: 'community-support.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VVXY3AXPQMASJB9M4QHH',
id: 'svct_01GV0TJNGP1Y513YY0DY7P2DQA',
category: 'Computers and Internet',
tsKey: 'computers-and-internet.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VVY808CZKQ69B5VD8T68',
id: 'svct_01GV0TJNGPQ05J2GX94SG95YG5',
category: 'Education and Employment',
tsKey: 'education-and-employment.CATEGORYNAME',
tsNs: 'services',
},
{ id: 'svct_01GTJ0VVZR181201F6SN8DE2Z4', category: 'Food', tsKey: 'food.CATEGORYNAME', tsNs: 'services' },
{ id: 'svct_01GV0TJNGQPZ2VYRTY0MSYNDX6', category: 'Food', tsKey: 'food.CATEGORYNAME', tsNs: 'services' },
{
id: 'svct_01GTJ0VW07PBZ7F2JYF696TNW8',
id: 'svct_01GV0TJNGQSB2N07SM3DJYFP60',
category: 'Housing',
tsKey: 'housing.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VW1B2HSQ29YWBAG2BBV5',
id: 'svct_01GV0TJNGRBDQ7J8XVZBFC5H1D',
category: 'Hygiene and Clothing',
tsKey: 'hygiene-and-clothing.CATEGORYNAME',
tsNs: 'services',
},
{ id: 'svct_01GTJ0VW2DHAZNK220KG5P7REX', category: 'Legal', tsKey: 'legal.CATEGORYNAME', tsNs: 'services' },
{ id: 'svct_01GTJ0VWBMZYWGZC9YFTTY0VXC', category: 'Mail', tsKey: 'mail.CATEGORYNAME', tsNs: 'services' },
{ id: 'svct_01GV0TJNGS92F6XKDVEKFD71Y1', category: 'Legal', tsKey: 'legal.CATEGORYNAME', tsNs: 'services' },
{
id: 'svct_01GTJ0VW5CGEZRT16ACEV9Y3TR',
id: 'svct_01GV0TJNGVP4GS12JNQ93W7A91',
category: 'Medical',
tsKey: 'medical.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VW7Z4PQAF0XBJJXNT7G0',
id: 'svct_01GV0TJNGWCY4C7JEFASTZWCKR',
category: 'Mental Health',
tsKey: 'mental-health.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VWA1AV9P87G2FH64CBF2',
id: 'svct_01GV0TJNGXX49YD78VYGGF9WNF',
category: 'Sports and Entertainment',
tsKey: 'sports-and-entertainment.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VWACTERATYSD4G5V9EE1',
id: 'svct_01GV0TJNGXMYBD3932VYWNZ67P',
category: 'Translation and Interpretation',
tsKey: 'translation-and-interpretation.CATEGORYNAME',
tsNs: 'services',
},
{
id: 'svct_01GTJ0VWB3GZ9SJSVVSESX7A6Z',
id: 'svct_01GV0TJNGYTCC8SMJ2SX6R980W',
category: 'Transportation',
tsKey: 'transportation.CATEGORYNAME',
tsNs: 'services',
},
{ id: 'svct_01GV0TJNGYCM8MVKZ0H8RSK842', category: 'Mail', tsKey: 'mail.CATEGORYNAME', tsNs: 'services' },
] as const

export type ServiceCategory = (typeof serviceCategory)[number]
14 changes: 7 additions & 7 deletions packages/api/generated/userRole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export const userRoles = [
] as const

export const userRolesWithId = [
{ id: 'urle_0000000000KSHT8AJ7DNYZRDB7', tag: 'resource-seeker' },
{ id: 'urle_0000000000HC4NPK2W1FKPCBHR', tag: 'service-provider' },
{ id: 'urle_0000000000W1CHFQSMDZSXVCQP', tag: 'local-community-reviewer' },
{ id: 'urle_0000000000BSGXZ0KQPTKAXDTC', tag: 'data-manager' },
{ id: 'urle_0000000000SFQMF4XKF0CMF2S5', tag: 'data-administrator' },
{ id: 'urle_00000000000RYT706Z5R9GXPA7', tag: 'system-administrator' },
{ id: 'urle_0000000000EBNJTT8V6Y3SGMYA', tag: 'system-user' },
{ id: 'urle_0000000000CH93X2VK2KH60MF2', tag: 'resource-seeker' },
{ id: 'urle_0000000000Q44MVGT3KYRPM7R2', tag: 'service-provider' },
{ id: 'urle_00000000001BQ88ZD9YQ5W22K9', tag: 'local-community-reviewer' },
{ id: 'urle_0000000000V246HW0XCJG1321P', tag: 'data-manager' },
{ id: 'urle_0000000000M26XWGRACKFE1M3C', tag: 'data-administrator' },
{ id: 'urle_00000000006Q5J82TGS6736WPN', tag: 'system-administrator' },
{ id: 'urle_00000000003QBSHYHSNXKV6MGV', tag: 'system-user' },
] as const

export type UserRoleTags = (typeof userRoles)[number]
Expand Down
14 changes: 7 additions & 7 deletions packages/api/generated/userType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export const userTypes = [
] as const

export const userTypesWithId = [
{ id: 'utyp_0000000000WCRHHZHYYVB0XDHN', type: 'seeker' },
{ id: 'utyp_0000000000KN5XHGMDJVN2KXWV', type: 'provider' },
{ id: 'utyp_0000000000TJTM1HV814JNB68V', type: 'lcr' },
{ id: 'utyp_0000000000967F8SGY6DG9P1C4', type: 'dataManager' },
{ id: 'utyp_0000000000N8J7CCN9JK41W0BW', type: 'dataAdmin' },
{ id: 'utyp_0000000000973TS42B5K9CKGWW', type: 'sysadmin' },
{ id: 'utyp_000000000011WW9HJJ23FS2S1J', type: 'system' },
{ id: 'utyp_00000000008XS7VB7W3GWCNZDA', type: 'seeker' },
{ id: 'utyp_0000000000JFBZ38PZYF60XYPQ', type: 'provider' },
{ id: 'utyp_00000000009M0WY6JD5HZRHCYX', type: 'lcr' },
{ id: 'utyp_00000000007N2K4S9KSM21Q5J2', type: 'dataManager' },
{ id: 'utyp_0000000000MGQHAWJP8Z481TEM', type: 'dataAdmin' },
{ id: 'utyp_00000000004B5DRNJ84TYWV5B7', type: 'sysadmin' },
{ id: 'utyp_0000000000DPCMEBJD7YJM2KVP', type: 'system' },
] as const

export type UserTypeTags = (typeof userTypes)[number]
Expand Down
105 changes: 44 additions & 61 deletions packages/api/schemas/selects/org.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,38 +66,51 @@ export const hoursSelect = {
},
} satisfies Prisma.Organization$hoursArgs | Prisma.OrgLocation$hoursArgs
export const orgEmailInclude = {
where: isPublic,
where: { email: isPublic },
select: {
title: {
email: {
select: {
tsKey: true,
tsNs: true,
title: {
select: {
tsKey: true,
tsNs: true,
},
},
firstName: true,
lastName: true,
email: true,
legacyDesc: true,
description: freeText,
primary: true,
},
},
firstName: true,
lastName: true,
email: true,
legacyDesc: true,
description: freeText,
},
} satisfies Prisma.OrgService$emailsArgs | Prisma.Organization$emailsArgs | Prisma.OrgLocation$emailsArgs

export const orgPhoneInclude = {
where: {
phone: isPublic,
},

select: {
country: {
phone: {
select: {
flag: true,
dialCode: true,
cca2: true,
tsKey: true,
tsNs: true,
country: {
select: {
flag: true,
dialCode: true,
cca2: true,
tsKey: true,
tsNs: true,
},
},
phoneType: true,
number: true,
ext: true,
primary: true,
locationOnly: true,
},
},
phoneType: true,
number: true,
ext: true,
primary: true,
locationOnly: true,
},
} satisfies Prisma.Organization$phonesArgs | Prisma.OrgLocation$phonesArgs

Expand Down Expand Up @@ -127,8 +140,13 @@ export const languageSelect = {

export const orgWebsiteInclude = {
select: {
id: true,
description: freeText,
languages: { select: { language: languageSelect } },
url: true,
isPrimary: true,
orgLocationId: true,
orgLocationOnly: true,
},
} satisfies Prisma.Organization$websitesArgs

Expand Down Expand Up @@ -213,21 +231,6 @@ const reviewIds = {
select: { id: true },
} satisfies Prisma.Organization$reviewsArgs | Prisma.OrgLocation$reviewsArgs | Prisma.OrgService$reviewsArgs

const orgServicePhoneInclude = {
where: {
phone: isPublic,
},
select: { phone: orgPhoneInclude },
} satisfies Prisma.OrgService$phonesArgs
const orgServiceEmailInclude = {
where: {
email: isPublic,
},
select: {
email: { select: orgEmailInclude.select },
},
} satisfies Prisma.OrgService$emailsArgs

export const orgServiceInclude = {
where: isPublic,
select: {
Expand All @@ -238,25 +241,11 @@ export const orgServiceInclude = {
services: orgServiceTagInclude,
accessDetails: serviceAccessInclude,
reviews: reviewIds,
phones: orgServicePhoneInclude,
emails: orgServiceEmailInclude,
phones: orgPhoneInclude,
emails: orgEmailInclude,
},
} satisfies Prisma.Organization$servicesArgs

const orgLocationEmailInclude = {
where: {
email: isPublic,
},
select: {
email: { select: orgEmailInclude.select },
},
} satisfies Prisma.OrgLocation$emailsArgs
const orgLocationPhoneInclude = {
where: {
phone: isPublic,
},
select: { phone: orgPhoneInclude },
} satisfies Prisma.OrgLocation$phonesArgs
const orgLocationServiceInclude = {
where: {
service: isPublic,
Expand All @@ -278,9 +267,9 @@ export const orgLocationInclude = {
govDist: govDistInclude,
country: countryInclude,
attributes: attributeInclude,
emails: orgLocationEmailInclude,
emails: orgEmailInclude,
websites: orgWebsiteInclude,
phones: orgLocationPhoneInclude,
phones: orgPhoneInclude,
photos: photoSelect,
reviews: reviewIds,
services: orgLocationServiceInclude,
Expand All @@ -301,14 +290,8 @@ export const organizationInclude = {
select: {
description: freeText,
emails: orgEmailInclude,
locations: {
where: isPublic,
...orgLocationInclude,
},
phones: {
where: isPublic,
...orgPhoneInclude,
},
locations: orgLocationInclude,
phones: orgPhoneInclude,
photos: photoSelect,
services: orgServiceInclude,
socialMedia: orgSocialMediaInclude,
Expand Down

0 comments on commit e347f36

Please sign in to comment.