Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
2b56408
fix profileLinks issue
aatbip Feb 9, 2024
6aa7903
Merge pull request #1 from copilot-platforms/bug-fixes-1
aatbip Feb 9, 2024
22260bc
fix profileLinks issue
aatbip Feb 9, 2024
3770305
fix: order custom fields according to order key
rrojan Feb 16, 2024
e9e4dd1
feat: default to fallbackColor when iconImageUrl is not provided
rrojan Feb 20, 2024
03cd738
fix: form doesn't allow to save empty fields
rrojan Feb 20, 2024
800f7e0
fix: display empty when field is cleared
rrojan Feb 20, 2024
28f0499
feat: limit update history to 4 items
rrojan Feb 20, 2024
944da50
fix: implement limit on backend
rrojan Feb 21, 2024
8a6e70c
chore!: bump copilot-node-sdk to 1.2.0
rrojan Feb 21, 2024
9a1d98a
revert: unset <empty> on empty field input
rrojan Feb 21, 2024
c48675a
fix: sort custom fields based on recently created
rrojan Feb 21, 2024
0e7f3a2
fix: show empty if field was updated from previously empty value
rrojan Feb 21, 2024
375c374
chore: log to stderr instead of stdout
rrojan Feb 21, 2024
883b17f
fix: implement singleton pattern in db util properly (prevent multipl…
rrojan Feb 21, 2024
63f503a
docs: remove unnecessary comment
rrojan Feb 21, 2024
b504a45
fix: render company column only if isCompaniesEnabled
rrojan Feb 21, 2024
a529d63
fix: OUT-78 | fix columns appearing in random order
rrojan Feb 22, 2024
0077e22
fix: OUT-79 | fix form fields appearing in random order
rrojan Feb 22, 2024
0fc7538
OUT-66 | Profile Manager Fixes (#2)
rrojan Feb 22, 2024
855af56
fix: merge conficts
rrojan Feb 23, 2024
212c0a4
feat: implement dynamic slicing for main columns
rrojan Feb 23, 2024
74dfa16
fix: fetch settings directly
rrojan Feb 23, 2024
386f8b4
Merge pull request #3 from copilot-platforms/OUT-45
rrojan Feb 23, 2024
4e1f982
feat: add usable button component
rrojan Feb 26, 2024
4cf8548
feat: implement profile & payment urls in manage
rrojan Feb 26, 2024
3e218b1
chore: add object to track usable client portal links
rrojan Feb 26, 2024
f89ba69
fix: use latest node 18 version in workflow
rrojan Feb 26, 2024
a37bea4
chore: match patch version for 1.2.x > 1.2.2
rrojan Feb 26, 2024
2105ed4
fix: minor fixes
rrojan Feb 26, 2024
8a86c1f
refactor: clean up code
rrojan Feb 26, 2024
4c1d747
refactor: make portal links type safe
rrojan Feb 26, 2024
e0adc92
fix: export portal routes
rrojan Feb 26, 2024
548c999
refactor: clean up code
rrojan Feb 26, 2024
7cd775a
fix: use portal id from workspace instead of search params
rrojan Feb 27, 2024
975fa5a
fix: type issue on initial app state
rrojan Feb 27, 2024
6c6a1d5
fix: zod issue on customFields crashing both pages
rrojan Feb 27, 2024
4ef4b5f
fix: zod issue on customFields crashing both pages
rrojan Feb 27, 2024
4d30c61
refactor: remove commented code
rrojan Feb 27, 2024
fcd476e
Merge pull request #5 from copilot-platforms/OUT-101
rrojan Feb 28, 2024
ca418c2
fix: minor issues
rrojan Feb 28, 2024
2437f23
fix: make button route pushing semantic
rrojan Feb 28, 2024
dc48fea
Merge branch 'main' of github.com:copilot-platforms/profile-manager i…
rrojan Feb 29, 2024
2d76e07
chore: upgrade to copilot-node-sdk 1.2.2
rrojan Feb 29, 2024
bdbee3c
refactor: clean up redirecting button components
rrojan Feb 29, 2024
ccf4838
refactor: omit undefined default value
rrojan Feb 29, 2024
1c5e338
Merge pull request #8 from copilot-platforms/OUT-107-re
rrojan Feb 29, 2024
b5758df
Merge pull request #4 from copilot-platforms/OUT-100
rrojan Mar 1, 2024
edcc71a
fix: merge conflicts
rrojan Mar 1, 2024
c1f5eb8
Merge pull request #6 from copilot-platforms/OUT-105-re
rrojan Mar 1, 2024
41548a4
OUT-137 | clientID and companyId are hardcoded, extract them from tok…
rrojan Mar 1, 2024
134f2a7
fix: string parsing on object type
rrojan Mar 5, 2024
b0a1890
Merge pull request #10 from copilot-platforms/OUT-152
rrojan Mar 5, 2024
e7aa46a
fix: safe parse token and don't throw error when token isn't provided
rrojan Mar 6, 2024
3ea8749
hotfix: show InvalidToken instead of raising error
rrojan Mar 6, 2024
61895b3
hotfix: show InvalidToken instead of raising error
rrojan Mar 6, 2024
387c250
chore: fix the crash when company does not exist
foleyatwork Mar 6, 2024
6f49d67
chore: cleanup
foleyatwork Mar 6, 2024
dca1b63
Merge pull request #11 from copilot-platforms/iu-crash-fix
foleyatwork Mar 6, 2024
134f9a1
chore: add env keys for postgres
rrojan Mar 11, 2024
4ababd1
Merge branch 'main' of github.com:copilot-platforms/profile-manager
rrojan Mar 11, 2024
1c0239e
chore: add env keys for postgres (#12)
rrojan Mar 11, 2024
2b64cef
chore: fix redirect paths
foleyatwork Mar 11, 2024
40a022f
Merge pull request #13 from copilot-platforms/fix-redirect-routes
rrojan Mar 12, 2024
e44bb13
Merge branch 'main' of github.com:copilot-platforms/profile-manager i…
rrojan Mar 12, 2024
2dc92fe
fix: tricky issue with copilot api not saving empty string custom fie…
rrojan Mar 12, 2024
04ece83
fix: profile manager crashing when multi field is set empty
rrojan Mar 12, 2024
e5302ca
fix: use a thumbnail in case of no client pic
rrojan Mar 12, 2024
0ef626b
fix: dont show company avatar if no company
rrojan Mar 12, 2024
d688822
change profile link
Mar 12, 2024
9eb23e2
Merge pull request #15 from copilot-platforms/potluck-update-profile-…
Mar 12, 2024
9a30fe5
add default text for IU
Mar 12, 2024
ffc166f
Merge pull request #16 from copilot-platforms/potluck-add-default-text
Mar 12, 2024
f724b22
fix: add fields changed by IU to history as well
rrojan Mar 13, 2024
cc0415e
chore: add support for IU created column in udpates
rrojan Mar 13, 2024
1a495db
fix: use the wasUpdatedByIU key to filter out IU -> client profile ch…
rrojan Mar 13, 2024
cac5db4
refactor: remove unused code
rrojan Mar 13, 2024
ad86ffe
hotfix: fix build issue in main
rrojan Mar 13, 2024
b90fdcc
Merge pull request #14 from copilot-platforms/OUT-160
rrojan Mar 13, 2024
5a4e206
Merge pull request #17 from copilot-platforms/OUT-161
rrojan Mar 13, 2024
7a7a61c
fix: update history overflow
rrojan Mar 15, 2024
af2c707
fix: manage title showing even when no fields are present
rrojan Mar 15, 2024
2189e05
chore: add missing icons
rrojan Mar 15, 2024
f8d72e5
fix: field icons
rrojan Mar 15, 2024
10c232b
fix: stray 0 appears in IU sometimes
rrojan Mar 15, 2024
4f2bef9
feat: integrate sentry for error monitoring
rrojan Mar 17, 2024
09d2587
feat: modify next config to support sentry
rrojan Mar 17, 2024
8000753
refactor: remove console.log
rrojan Mar 18, 2024
f3888b9
feat: add loader
rrojan Mar 19, 2024
82d5e98
hotfix: app crashing on fallbackColor not present
rrojan Mar 19, 2024
fe6001f
Merge pull request #19 from copilot-platforms/OUT-169
rrojan Mar 19, 2024
3d6d528
hotfix: iconImageUrl key causing crash
rrojan Mar 19, 2024
06a9ad5
Merge branch 'main' of github.com:copilot-platforms/profile-manager
rrojan Mar 19, 2024
096af79
refactor: strictly type field
rrojan Mar 19, 2024
54a099c
Merge pull request #18 from copilot-platforms/OUT-162
rrojan Mar 19, 2024
eb6dd55
fix: add case for undefined or empty string lastHistory mismatch
rrojan Mar 21, 2024
97ca07f
refactor: clean up logic so code is maintainable
rrojan Mar 21, 2024
779529a
fix: getObjectDifference doesn't consider comparison by reference for…
rrojan Mar 21, 2024
54c62dd
refactor: minor cleanup
rrojan Mar 21, 2024
2208a76
fix: handle future null edge case
rrojan Mar 21, 2024
490b29b
docs: document confusing code
rrojan Mar 21, 2024
a44733e
Merge pull request #21 from copilot-platforms/OUT-184
rrojan Mar 21, 2024
0ea981d
hotfix: zod validation issue for customField
rrojan Mar 22, 2024
357f00e
revert: hotfix
rrojan Mar 22, 2024
0389ee3
hotfix: custom field value
rrojan Mar 22, 2024
7254966
hotfix: zod validation issue
rrojan Mar 22, 2024
9cf76f4
hotfix: fix nullable validation
rrojan Mar 22, 2024
7fd3a98
hotfix: fix nullable validation
rrojan Mar 22, 2024
caebc0b
hotfix: build issue
rrojan Mar 22, 2024
c41b876
Merge pull request #20 from copilot-platforms/OUT-168
rrojan Mar 25, 2024
6ce0db3
hotfix: multi field issues in client & IU
rrojan Mar 25, 2024
f462454
chore: add clients icon
rrojan Mar 25, 2024
4bac9a9
feat: add empty state for profile updates list
rrojan Mar 25, 2024
7afcc56
Merge pull request #22 from copilot-platforms/OUT-214
rrojan Mar 25, 2024
8ffb632
hotfix: favor noRowsOverlayComponent in AG Grid
rrojan Mar 25, 2024
9bf03b9
Merge branch 'OUT-214' of github.com:copilot-platforms/profile-manager
rrojan Mar 25, 2024
659f9cf
undo using noRowsOverlayComponent because it doesn't support links na…
Mar 25, 2024
7c50f2f
Merge pull request #23 from copilot-platforms/potluck-undo-no-rows-ov…
Mar 25, 2024
9942844
open link in new tab
Mar 25, 2024
b76e923
hotfix: link issue with AG Grid
rrojan Mar 26, 2024
506d924
fix: edge case with null phone numbers
rrojan Mar 26, 2024
3bc152b
fix: extraneous Empty in log
rrojan Mar 26, 2024
7a7a6de
refactor: remove log
rrojan Mar 26, 2024
36fc76b
Merge pull request #24 from copilot-platforms/OUT-218
rrojan Mar 26, 2024
665e5df
fix nullpointer when custom fields is null
Mar 26, 2024
1cc1d8f
Merge pull request #26 from copilot-platforms/OUT-225-fix-nullpointer
Mar 26, 2024
a4de9b1
copy update in sidebar
Mar 26, 2024
beffe41
chore: add SWR
rrojan Mar 27, 2024
6f6e6cf
chore: add fetcher util to help with SWR fetch fn
rrojan Mar 27, 2024
abf8900
chore: implement SWR and initial client side fetch loader
rrojan Mar 27, 2024
eeb977e
fix: fix horrible load times
rrojan Mar 27, 2024
0aabd78
Merge pull request #27 from copilot-platforms/OUT-229
rrojan Mar 28, 2024
14fad80
Merge pull request #25 from copilot-platforms/OUT-206
rrojan Mar 28, 2024
5fcca5f
chore!: bump copilot-node-sdk to 2.0.0
rrojan Apr 8, 2024
609d7fa
fix!: deprecate all uses of me()
rrojan Apr 8, 2024
f1fe04a
fix: change all CopilotAPI methods to use new sdk
rrojan Apr 8, 2024
3ef40c9
fix: ApiError no longer exported from SDK
rrojan Apr 8, 2024
07cc2ce
refactor: remove CopilotApiError
rrojan Apr 8, 2024
9e4b849
fix: make type check stricter
rrojan Apr 8, 2024
4eebe64
refactor: clean typing
rrojan Apr 11, 2024
9643bc8
chore: turn off exhaustive deps for hooks
rrojan Apr 15, 2024
d189d6c
chore: turn off exhaustive deps for hooks
rrojan Apr 15, 2024
0c7096d
Merge pull request #28 from copilot-platforms/OUT-263
rrojan Apr 22, 2024
227459a
hotfix!: bump up connection limit in hacky way
rrojan May 6, 2024
21b0d5c
Implement Sentry sourcemaps (#29)
sajxraj Sep 9, 2024
492d65f
Debug update history issue (#30)
sajxraj Sep 9, 2024
e79eab5
test: 1
aatbip Sep 24, 2024
0ba02bd
Merge pull request #31 from copilot-platforms/OUT-841
aatbip Sep 24, 2024
1660e1b
test: 2
aatbip Sep 24, 2024
c745957
Merge pull request #32 from copilot-platforms/re1/OUT-841
aatbip Sep 24, 2024
edfd42b
test: 3
aatbip Sep 24, 2024
b5e6b48
test: 4
aatbip Sep 24, 2024
0ed7e38
Merge pull request #33 from copilot-platforms/re3/OUT-841
aatbip Sep 24, 2024
f3c7ad7
fix: getClientDetails optional undefined return
aatbip Sep 24, 2024
a920f16
test: 5
aatbip Sep 24, 2024
bb3f26d
test: 6
aatbip Sep 24, 2024
ef89930
Merge pull request #34 from copilot-platforms/re5/OUT-841
aatbip Sep 24, 2024
ee70e74
fix: optional chaining and strict check
aatbip Sep 24, 2024
809915b
Merge pull request #35 from copilot-platforms/re6/OUT-841
rrojan Sep 25, 2024
534da9a
fix: adds optional chaining
aatbip Sep 26, 2024
5e65e0e
Merge pull request #36 from copilot-platforms/OUT-844
aatbip Sep 26, 2024
239b60b
fix: triage issue - undefined reading 0
aatbip Oct 1, 2024
08f0aa5
Merge pull request #37 from copilot-platforms/OUT-860
aatbip Oct 2, 2024
7c1ac66
fix(OUT-1034): root cause of couldn't find id of undefined - client d…
rrojan Nov 14, 2024
4e420f5
Merge pull request #39 from copilot-platforms/OUT-1034
rrojan Nov 14, 2024
dcb61c3
fix(OUT-983): fix rgbaColor being initially set as undefined
rrojan Dec 12, 2024
d9f46fb
Merge pull request #40 from copilot-platforms/OUT-983
rrojan Dec 12, 2024
bdfb717
fix(OUT-1157): fix extracting `type` from null
rrojan Dec 16, 2024
2927dd6
hotfix(OUT-1153): raise maximum duration of serverless function to pr…
rrojan Dec 16, 2024
a017f88
hotfix(OUT-1157): fix 500 Internal Server Error on client side due to…
rrojan Dec 16, 2024
f30f33a
feat(OUT-1157): make companyId field nullable
rrojan Dec 16, 2024
699c1b6
fix(OUT-1157): make companyId optional for ManagePageContainer
rrojan Dec 16, 2024
ba2c641
feat(OUT-1214): show a helpful warning that preview mode is not suppo…
rrojan Dec 31, 2024
91bb75e
feat(OUT-1214): add support for NoPreviewSupport
rrojan Dec 31, 2024
a5ac078
fix: accomodate new address schema for customFields
rrojan Jan 16, 2025
bcb0c6c
feat: hack together address support for IU & client
rrojan Jan 16, 2025
bbe5642
fix: better type safety
rrojan Jan 16, 2025
bcf85dc
refactor: remove console.log
rrojan Jan 16, 2025
95fb41d
fix(OUT-1301): fix address value showing up as [object Object]
rrojan Jan 17, 2025
f95e015
fix(OUT-1302): account for address being object type for tracking cha…
rrojan Jan 21, 2025
952884f
fix: verbosely stop revalidation when inactive / offline
rrojan Jan 21, 2025
9d0b370
chore(hotfix): remove portalId from searchParams
rrojan Feb 20, 2025
1c93752
chore(hotfix): remove portalId from searchParams
rrojan Feb 20, 2025
1445ad6
chore(OUT-1493): bump copilot-node-sdk to 3.5.1 (use copilot.app)
rrojan Mar 4, 2025
a620e75
chore(OUT-1493): bump COPILOT_API_URL to use new "app" domain instead…
rrojan Mar 4, 2025
61931e4
chore(OUT-1493): change link for profile manager app page
rrojan Mar 4, 2025
0926093
fix(OUT-1809) : history renderer's popover element overflowing to the…
arpandhakal Jun 9, 2025
33a99ef
fix(OUT-1809) : used appropriate type for tableRef prop in HistoryCel…
arpandhakal Jun 9, 2025
119f51b
fix(OUT-1763): fix timeouts and max_file_descriptor limit issues (#49)
rrojan Jun 10, 2025
44e067e
feat(OUT-2227): added support for custom client/company labels in tab…
arpandhakal Aug 20, 2025
d024412
fix(OUT-2227): response key in workspace schema changed from label to…
arpandhakal Aug 22, 2025
af6aa41
fix(OUT-2227): cleanup getWorkspaceLabel util
arpandhakal Aug 25, 2025
4589daf
fix(label-fix): custom label used in filter bar
arpandhakal Aug 27, 2025
b4d8899
chore(OUT-2395): change branding from Copilot to Assembly
rrojan Sep 22, 2025
2ffb992
chore(OUT-2147): bump CI node-version to 20
rrojan Aug 11, 2025
a5b0f98
Merge branch 'main' into OUT-2395
rrojan Sep 23, 2025
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
28 changes: 19 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
COPILOT_API_KEY="b4fa0b79be594f91a2c72c63216d45ec.6463d9dc556351b6"
# --- Copilot
#
# Generate an API key from the copilot dashboard that is usable in profile manager
COPILOT_API_KEY=
COPILOT_API_URL="https://api.copilot.app"
# Set as local to work on test tokens, and production to work on valid IU / client tokens
COPILOT_ENV="local"

# Vercel Database
POSTGRES_PRISMA_URL="postgres://default:2tCAVY7Npmyc@ep-morning-mountain-74331247-pooler.us-east-1.postgres.vercel-storage.com/verceldb?pgbouncer=true&connect_timeout=15"
POSTGRES_URL_NON_POOLING="postgres://default:2tCAVY7Npmyc@ep-morning-mountain-74331247.us-east-1.postgres.vercel-storage.com/verceldb"
# --- Database hosts and credentials
#
POSTGRES_URL=
POSTGRES_PRISMA_URL=
POSTGRES_URL_NO_SSL=
POSTGRES_URL_NON_POOLING=
POSTGRES_USER=
POSTGRES_HOST=
POSTGRES_PASSWORD=
POSTGRES_DATABASE=

# Local Database
; POSTGRES_PRISMA_URL="postgresql://db:db@127.0.0.1:59004/db?schema=public"
; POSTGRES_URL_NON_POOLING="postgresql://db:db@127.0.0.1:59004/db?schema=public"

COPILOT_API_URL="https://api-beta.copilot.com"
COPILOT_ENV="local"
# --- Vercel hosts and credentials
#
VERCEL_URL="localhost:3000"
VERCEL_ENV="development"
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"rules": {
"react-hooks/exhaustive-deps": "off"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.17.0
node-version: 20
cache: yarn
cache-dependency-path: './yarn.lock'

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ next-env.d.ts
.idea

.ddev

# Sentry Config File
.sentryclirc

# Sentry Config File
.env.sentry-build-plugin
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## Copilot profile manager
## Assembly profile manager
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
postgres:
image: postgres:15-alpine
ports:
- $DATABASE_PORT:5432
environment:
POSTGRES_USER: $DATABASE_USER
POSTGRES_PASSWORD: $DATABASE_PASSWORD
POSTGRES_DB: $DATABASE_NAME
volumes:
- postgres_data:/var/lib/postgresql/data

volumes:
postgres_data:
47 changes: 47 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,50 @@ const nextConfig = {
};

module.exports = nextConfig;

// Injected content via Sentry wizard below

const { withSentryConfig } = require('@sentry/nextjs');

module.exports = withSentryConfig(module.exports, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

org: 'copilot-platforms',
project: 'profile-manager',

// Only print logs for uploading source maps in CI
silent: !process.env.CI,

// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: true,

// Automatically annotate React components to show their full name in breadcrumbs and session replay
reactComponentAnnotation: {
enabled: true,
},

// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
tunnelRoute: '/monitoring',

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
});
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
"@mui/icons-material": "^5.14.5",
"@mui/material": "^5.15.4",
"@prisma/client": "^5.7.1",
"@sentry/nextjs": "^8",
"@vercel/postgres": "^0.5.1",
"copilot-node-sdk": "^0.0.45",
"ag-grid-react": "^31.0.2",
"next": "14.1.0",
"copilot-node-sdk": "^3.5.1",
"next": "^14.1.0",
"prisma": "^5.7.1",
"react": "^18",
"react-dom": "^18",
"swr": "^2.2.5",
"zod": "^3.22.4"
},
"devDependencies": {
Expand All @@ -52,5 +54,6 @@
"yarn lint:fix",
"yarn prettier:fix"
]
}
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "ClientProfileUpdates" ADD COLUMN "wasUpdatedByIU" BOOLEAN NOT NULL DEFAULT false;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "ClientProfileUpdates" ALTER COLUMN "companyId" DROP NOT NULL;
37 changes: 21 additions & 16 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ generator client {
}

datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL")
directUrl = env("POSTGRES_URL_NON_POOLING")
provider = "postgresql"
// Vercel won't let us change the POSTGRES_* config so update it with a connection_limit key using a custom env var like
// POSTGRES_PRISMA_URL_HIGHER_CONNECTION_LIMIT="$POSTGRES_PRISMA_URL&connection_limit=20"
url = env("POSTGRES_PRISMA_URL_HIGHER_CONNECTION_LIMIT")
directUrl = env("POSTGRES_URL_NON_POOLING")
// Emulates relationships in Prisma client itself. Better for serverless databases like neon or planetscale
relationMode = "prisma"
}

enum Permission {
Expand All @@ -26,20 +30,21 @@ model CustomFieldAccess {
}

model ClientProfileUpdates {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
clientId String @db.Uuid
companyId String @db.Uuid
portalId String
customFields Json @db.JsonB
changedFields Json @db.JsonB
createdAt DateTime @default(now()) @db.Timestamptz()
updatedAt DateTime @updatedAt @ignore @db.Timestamptz()
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
clientId String @db.Uuid
companyId String? @db.Uuid
portalId String
customFields Json @db.JsonB
changedFields Json @db.JsonB
createdAt DateTime @default(now()) @db.Timestamptz()
wasUpdatedByIU Boolean @default(false)
updatedAt DateTime @updatedAt @ignore @db.Timestamptz()
}

model Setting {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
portalId String
data Json @db.JsonB
createdAt DateTime @default(now()) @db.Timestamptz()
updatedAt DateTime @updatedAt @ignore @db.Timestamptz()
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
portalId String
data Json @db.JsonB
createdAt DateTime @default(now()) @db.Timestamptz()
updatedAt DateTime @updatedAt @ignore @db.Timestamptz()
}
36 changes: 36 additions & 0 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// This file configures the initialization of Sentry on the client.
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from '@sentry/nextjs';

const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN;

if (dsn) {
Sentry.init({
dsn,

// Add optional integrations for additional features
integrations: [
Sentry.replayIntegration({
// Additional Replay configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
}),
],

// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 1,

// Define how likely Replay events are sampled.
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,

// Define how likely Replay events are sampled when an error occurs.
replaysOnErrorSampleRate: 1.0,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
}
20 changes: 20 additions & 0 deletions sentry.edge.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).
// The config you add here will be used whenever one of the edge features is loaded.
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from '@sentry/nextjs';

const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN;

if (dsn) {
Sentry.init({
dsn,

// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 1,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
}
19 changes: 19 additions & 0 deletions sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from '@sentry/nextjs';

const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN;

if (dsn) {
Sentry.init({
dsn,

// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 1,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
}
15 changes: 15 additions & 0 deletions src/app/NoPreviewSupport.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Box } from '@mui/material';
import AnnouncementIcon from '@mui/icons-material/Announcement';

export const NoPreviewSupport = () => {
return (
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100vh', fontSize: '24px' }}>
<Box sx={{ display: 'flex', alignItems: 'center', gap: '4px', opacity: '0.8' }}>
<Box sx={{ display: 'flex' }}>
<AnnouncementIcon />
</Box>
<div>CRM preview is currently not supported for Profile Manager</div>{' '}
</Box>
</Box>
);
};
Loading