Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: data portal #1033

Merged
merged 98 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
04bb869
scaffold modal
JoeKarow Jan 22, 2024
480cae1
chore: lint & format
InReach-svc Jan 22, 2024
b42c280
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 22, 2024
c7eb215
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 22, 2024
1b78c59
api routes / mock data
JoeKarow Jan 22, 2024
7073bc4
fix (re-)build time
JoeKarow Jan 22, 2024
e59c5c2
redo api routes
JoeKarow Jan 22, 2024
bb7899a
layout options
JoeKarow Jan 22, 2024
12f820d
create api route for badge edits
JoeKarow Jan 23, 2024
26b3ca6
add form/api handling to modal
JoeKarow Jan 23, 2024
e3c9351
implement BadgeEdit modal
JoeKarow Jan 23, 2024
ac4315c
location card link for edit mode
JoeKarow Jan 23, 2024
2acc736
add "add new" options for ContactInfo
JoeKarow Jan 23, 2024
e6c4824
link HoursDrawer to Visit Card
JoeKarow Jan 23, 2024
dc04187
update location page layout
JoeKarow Jan 23, 2024
bab719e
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 24, 2024
a9e1e23
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 24, 2024
df89a99
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 24, 2024
a7c162e
cannot return undefined, return null instead
JoeKarow Jan 24, 2024
f96aeb9
alter config
JoeKarow Jan 24, 2024
33115d2
fix types
JoeKarow Jan 24, 2024
cd87fff
fix infinite render loop for "add new" item
JoeKarow Jan 24, 2024
7c82273
memoize Icon component
JoeKarow Jan 24, 2024
8e23fec
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 25, 2024
534cef2
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 25, 2024
fe82b08
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 25, 2024
4c4dba9
create page shell for service edit
JoeKarow Jan 25, 2024
bd2d084
fix leader badge section format/style
JoeKarow Jan 25, 2024
24e3925
associate address drawer, fix styling
JoeKarow Jan 25, 2024
ffee157
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 25, 2024
3839d97
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 25, 2024
ed6fcee
create location variant
JoeKarow Jan 25, 2024
3131851
loc page api route
JoeKarow Jan 25, 2024
b73970d
location page edits
JoeKarow Jan 25, 2024
415fb64
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 26, 2024
b716cd6
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 26, 2024
d20af22
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 26, 2024
f78018e
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 26, 2024
752886d
create hook-form variant
JoeKarow Jan 26, 2024
6df495b
remove devtool
JoeKarow Jan 26, 2024
994c8d4
tRPC handler import... handler
JoeKarow Jan 26, 2024
f2fcf9e
service associate dropdown
JoeKarow Jan 26, 2024
cbb5d28
create new routers: page & component
JoeKarow Jan 26, 2024
5b107f1
start separating badges
JoeKarow Jan 26, 2024
bce9d54
service page work
JoeKarow Jan 26, 2024
f02f036
chore: lint & format
InReach-svc Jan 26, 2024
f619cf6
update eslint & sb conf
JoeKarow Jan 29, 2024
1bce0ab
Break out badges
JoeKarow Jan 29, 2024
338a2e9
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 29, 2024
57c66d6
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 29, 2024
02a4c2c
move to dir
JoeKarow Jan 29, 2024
2041bed
update badging
JoeKarow Jan 29, 2024
badfd2e
create formatters, update api route
JoeKarow Jan 29, 2024
ecc4db5
start prisma extension for json
JoeKarow Jan 29, 2024
fbe78e5
create section components
JoeKarow Jan 29, 2024
c2fbfeb
section
JoeKarow Jan 29, 2024
ff87328
reduce zIndex
JoeKarow Jan 30, 2024
855dfbf
add banner text
JoeKarow Jan 30, 2024
b71212b
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 30, 2024
1ed0c9f
api route
JoeKarow Jan 30, 2024
16d75ac
service tag selection
JoeKarow Jan 30, 2024
3cc3a2c
disable in local dev
JoeKarow Jan 30, 2024
4d71e31
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 31, 2024
d855ab4
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Jan 31, 2024
f81823f
add dep, update prettier ignore
JoeKarow Jan 31, 2024
8f06dad
reduce data sent
JoeKarow Jan 31, 2024
896ef95
fix middleware
JoeKarow Jan 31, 2024
16ed67e
data migrations
JoeKarow Jan 31, 2024
c153bbb
add/update api route
JoeKarow Jan 31, 2024
7a09f8f
update migration
JoeKarow Jan 31, 2024
97c14d9
generated data
JoeKarow Feb 1, 2024
fb8fd5a
start attribs
JoeKarow Feb 1, 2024
e81cc67
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 1, 2024
f5ac938
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 1, 2024
4c34b2b
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 2, 2024
58113bf
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 5, 2024
e866c17
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 5, 2024
d568cf6
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 5, 2024
fbf84dc
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 5, 2024
d3ce81b
Merge branch 'dev' into IN-831-edit-org-page-2
JoeKarow Feb 5, 2024
a0f15df
update routes
JoeKarow Feb 5, 2024
93f5929
disable sherif rule
JoeKarow Feb 5, 2024
b5aba84
restore modal
JoeKarow Feb 5, 2024
1d8e5e6
update for new schema
JoeKarow Feb 5, 2024
adab8a2
update api
JoeKarow Feb 5, 2024
ebf55e8
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 5, 2024
5065bc4
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 6, 2024
ae5589a
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 6, 2024
4cfb6c6
Merge branch 'dev' into IN-831-edit-org-page-2
kodiakhq[bot] Feb 6, 2024
9ab967b
how to handle attributes?!
JoeKarow Feb 5, 2024
a476026
add cache clean script
JoeKarow Feb 6, 2024
3b68cac
update/create api routes
JoeKarow Feb 6, 2024
a40b437
add dep: crud-object-diff
JoeKarow Feb 6, 2024
c8b7217
update hooks
JoeKarow Feb 6, 2024
06e1b38
update text keys
JoeKarow Feb 6, 2024
62b6c0f
wire up actions to buttons
JoeKarow Feb 6, 2024
55c7ddc
add save handling
JoeKarow Feb 6, 2024
f556af3
update location api
JoeKarow Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ pnpm-lock.yaml
*.hbs
.trace/*.json
packages/ui/mockData/json/*.json
packages/db/prisma/data-migrations/**/*.json
116 changes: 58 additions & 58 deletions InReach.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -16,165 +16,165 @@
"prisma.prisma",
"riccardoforina.storybook-helper",
"unifiedjs.vscode-mdx",
"yzhang.markdown-all-in-one"
]
"yzhang.markdown-all-in-one",
],
},
"folders": [
{
"name": "🚀 InReach App (@weareinreach/app)",
"path": "./apps/app"
"path": "./apps/app",
},
{
"name": "📦 Shared UI (@weareinreach/ui)",
"path": "./packages/ui"
"path": "./packages/ui",
},
{
"name": "📦 Centralized database (@weareinreach/db)",
"path": "./packages/db"
"path": "./packages/db",
},
{
"name": "📦 tRPC API (@weareinreach/api)",
"path": "./packages/api"
"path": "./packages/api",
},
{
"name": "🤷🏻 Analytics (@weareinreach/analytics)",
"path": "./packages/analytics"
"path": "./packages/analytics",
},
{
"name": "🔐 Authentication (@weareinreach/auth)",
"path": "./packages/auth"
"path": "./packages/auth",
},
{
"name": "🛠️ Utilities (@weareinreach/util)",
"path": "./packages/util"
"path": "./packages/util",
},
{
"name": "📦 Crowdin Client (@weareinreach/crowdin)",
"path": "./packages/crowdin"
"path": "./packages/crowdin",
},
{
"name": "⚙️ Environment Variables (@weareinreach/env)",
"path": "./packages/env"
"path": "./packages/env",
},
{
"name": "⚙️ Shared configs (@weareinreach/config)",
"path": "./packages/config"
"path": "./packages/config",
},
{
"name": "⚙️ ESLint Config (@weareinreach/eslint-config)",
"path": "./packages/eslint-config"
"path": "./packages/eslint-config",
},
{
"name": "🚀 InReach main site (@weareinreach/web)",
"path": "./apps/web"
"path": "./apps/web",
},
{
"name": "✨ InReach (root)",
"path": "./"
"path": "./",
},
{
"name": "🐑 AWS Lambdas",
"path": "./lambdas"
"path": "./lambdas",
},
{
"name": "🛠️ Patched packages",
"path": "./patches"
"path": "./patches",
},
{
"name": "📚 Documentation (@weareinreach/docs)",
"path": "./docs"
"path": "./docs",
},
{
"name": "🐳 Docker",
"path": "./docker"
}
"path": "./docker",
},
],
"settings": {
"[javascript]": {
"editor.autoClosingBrackets": "languageDefined",
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[javascriptreact]": {
"editor.autoClosingBrackets": "languageDefined",
"editor.autoClosingOvertype": "always",
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file"
"editor.formatOnSaveMode": "file",
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[typescriptreact]": {
"editor.autoClosingBrackets": "languageDefined",
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.detectIndentation": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.insertSpaces": true
"editor.insertSpaces": true,
},
"debug.javascript.terminalOptions": {
"skipFiles": ["<node_internals>/**/*", "**/node_modules/**/*@babel*/*"]
"skipFiles": ["<node_internals>/**/*", "**/node_modules/**/*@babel*/*"],
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.eslint": "explicit",
},
"editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.lintTask.enable": true,
"eslint.options": {
"cache": true
"cache": true,
},
"eslint.ignoreUntitled": true,
"eslint.nodeEnv": "development",
"eslint.rules.customizations": [
{
"rule": "import/order",
"severity": "off"
"severity": "off",
},
{
"rule": "import/newline-after-import",
"severity": "off"
"severity": "off",
},
{
"rule": "import/no-extraneous-dependencies",
"severity": "off"
"severity": "off",
},
{
"rule": "@typescript-eslint/consistent-type-imports",
"severity": "off"
"severity": "off",
},
{
"rule": "@typescript-eslint/no-unused-vars",
"severity": "info"
"severity": "info",
},
{ "rule": "sort-imports", "severity": "off" }
{ "rule": "sort-imports", "severity": "off" },
],
"eslint.useESLintClass": true,
"explorer.decorations.badges": true,
"explorer.expandSingleFolderWorkspaces": false,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"*.tsx": "${capture}.ts, ${capture}.stories.tsx",
"*.tsx": "${capture}.ts, ${capture}.stories.tsx, ${capture}.styles.ts, ${capture}.styles.tsx",
"*.ts": "${capture}.ts, ${capture}.stories.tsx",
"*eslintrc.js": ".eslintignore, .eslintcache",
"package.json": "pnpm-lock*.yaml, pnpm-workspace.yaml, .nvmrc",
"*prettierrc.js": ".prettierignore, .prettiercache, .editorconfig",
"vercel.json": ".vercelignore",
"README.md": "LICENSE.md"
"README.md": "LICENSE.md",
},
"files.exclude": {
".next/": true,
Expand All @@ -192,7 +192,7 @@
"packages/": true,
"patches/": true,
"storybook-static/": true,
"lambdas/": true
"lambdas/": true,
},
"files.watcherExclude": {
"**/.git/objects/**": true,
Expand All @@ -205,12 +205,12 @@
"**/storybook-static/**": true,
"**/zod-schemas/**": true,
"**/.turbo/**": true,
"**/generated/**": true
"**/generated/**": true,
},
"search.exclude": {
"**/node_modules": true,
"**/*.code-search": true,
"pnpm-lock.yaml": true
"pnpm-lock.yaml": true,
},
"i18n-ally.annotationInPlace": false,
"i18n-ally.defaultNamespace": "common",
Expand All @@ -220,11 +220,11 @@
"i18n-ally.extract.ignored": [
"1px solid ${theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]}",
"${theme.spacing.md}px ${theme.spacing.md}px",
"0 ${theme.spacing.sm}px"
"0 ${theme.spacing.sm}px",
],
"i18n-ally.extract.ignoredByFiles": {
"../../packages/ui/.storybook/i18next.ts": ["*"],
"**/packages/db/**/*.ts": ["*"]
"**/packages/db/**/*.ts": ["*"],
},
"i18n-ally.extract.keygenStrategy": "slug",
"i18n-ally.extract.keygenStyle": "kebab-case",
Expand All @@ -245,18 +245,18 @@
"json.format.enable": true,
"json.validate.enable": true,
"markdownlint.config": {
"MD033": false
"MD033": false,
},
"prettier.resolveGlobalModules": false,
"sonarlint.connectedMode.project": {
"connectionId": "InReach",
"projectKey": "weareinreach_InReach"
"projectKey": "weareinreach_InReach",
},
"tms.stringsCompletionFileExtensions": "ts,tsx,json",
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.tsdk": "✨ InReach (root)/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.workspaceSymbols.scope": "allOpenProjects"
"typescript.workspaceSymbols.scope": "allOpenProjects",
},
"launch": {
"configurations": [
Expand All @@ -265,7 +265,7 @@
"request": "launch",
"type": "chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
"webRoot": "${workspaceFolder}",
},
{
"name": "Attach by Process ID",
Expand All @@ -274,7 +274,7 @@
"skipFiles": ["<node_internals>/**/*", "${workspaceFolder}/node_modules/**/*"],
"type": "node",
"autoAttachChildProcesses": true,
"restart": true
"restart": true,
},
{
"name": "Attach to :9229",
Expand All @@ -283,7 +283,7 @@
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**/*"],
"type": "node",
"autoAttachChildProcesses": true,
"restart": true
"restart": true,
},
{
"disableNetworkCache": true,
Expand All @@ -296,7 +296,7 @@
"url": "http://localhost:3000",
"userDataDir": true,
"webRoot": "${workspaceFolder}",
"sourceMaps": true
"sourceMaps": true,
},
{
"command": "pnpm dev",
Expand All @@ -305,11 +305,11 @@
"serverReadyAction": {
"action": "startDebugging",
"name": "Launch Brave",
"pattern": "http://localhost:([0-9]+)"
"pattern": "http://localhost:([0-9]+)",
},
"skipFiles": ["<node_internals>/**/*", "${workspaceFolder}/node_modules/**/*"],
"sourceMaps": true,
"type": "node-terminal"
"type": "node-terminal",
},
{
"command": "yarn dev",
Expand All @@ -318,11 +318,11 @@
"serverReadyAction": {
"action": "debugWithChrome",
"pattern": "(?:(.*?\bserver.*ready\b)|(.*?\bready.*server\b)).*(\bhttps?://.+\b)",
"uriFormat": "%s"
"uriFormat": "%s",
},
"sourceMaps": true,
"type": "node-terminal"
}
]
}
"type": "node-terminal",
},
],
},
}
12 changes: 8 additions & 4 deletions apps/app/lib/wdyr.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
/* eslint-disable node/no-process-env */
/// <reference types="@welldone-software/why-did-you-render" />
import React from 'react'

// eslint-disable-next-line node/no-process-env
if (process.env.NODE_ENV === 'development' && !!process.env.WDYR) {
if (
process.env.NODE_ENV === 'development' &&
(!!process.env.WDYR || process.env.NEXT_PUBLIC_WDYR === 'true')
) {
if (typeof window !== 'undefined') {
const loadWdyr = async () => {
console.info('[WDYR] Loading plugin...')
const { default: whyDidYouRender } = await import('@welldone-software/why-did-you-render')
whyDidYouRender(React, {
trackAllPureComponents: true,
trackAllPureComponents: false,
include: [/.*/],
exclude: [/.*mantine.*/i],
exclude: [/.*(?:mantine|ReactQueryDevtoolsPanel).*/i],
logOnDifferentValues: false,
logOwnerReasons: true,
collapseGroups: true,
Expand Down
1 change: 1 addition & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@weareinreach/ui": "workspace:*",
"@weareinreach/util": "workspace:*",
"cookies-next": "4.1.1",
"crud-object-diff": "2.3.6",
"dayjs": "1.11.10",
"embla-carousel-autoplay": "7.1.0",
"embla-carousel-react": "7.1.0",
Expand Down
Loading
Loading