diff --git a/GNUmakefile b/GNUmakefile
index a11a82c39..6e4e04a5e 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -46,7 +46,7 @@ bin/probod: pkg/server/api/console/v1/schema/schema.go pkg/server/api/console/v1
.PHONY: @probo/console
@probo/console: NODE_ENV=production
@probo/console:
- $(NPM) --workspace $@ run typecheck
+ $(NPM) --workspace $@ run check
$(NPM) --workspace $@ run build
pkg/server/api/console/v1/schema/schema.go \
@@ -60,7 +60,7 @@ help: ## Show this help
.PHONY:dev
dev: ## Start the development server
- parallel -j 2 --line-buffer ::: "gow -r=false run cmd/probod/main.go" "cd apps/console2 && npm run dev"
+ parallel -j 2 --line-buffer ::: "gow -r=false run cmd/probod/main.go" "cd apps/console && npm run dev"
.PHONY: fmt
fmt: fmt-go ## Format Go code
@@ -90,4 +90,3 @@ stack-ps: ## List the docker stack containers
.PHONY: psql
psql: ## Open a psql shell to the postgres container
$(DOCKER_COMPOSE) exec postgres psql -U probod -d probod
-
diff --git a/apps/console2/.env b/apps/console/.env
similarity index 100%
rename from apps/console2/.env
rename to apps/console/.env
diff --git a/apps/console/.env.development b/apps/console/.env.development
deleted file mode 100644
index f5617f6a3..000000000
--- a/apps/console/.env.development
+++ /dev/null
@@ -1,8 +0,0 @@
-LIVE_RELOAD=true
-
-POSTHOG_HOST=
-POSTHOG_KEY=
-FARO_PUSH_URL=
-
-API_SERVER_HOST="http://localhost:8080"
-
diff --git a/apps/console/.env.example b/apps/console/.env.example
deleted file mode 100644
index 3a3c144b0..000000000
--- a/apps/console/.env.example
+++ /dev/null
@@ -1,7 +0,0 @@
-LIVE_RELOAD=
-
-POSTHOG_HOST=
-POSTHOG_KEY=
-FARO_PUSH_URL=
-
-HTTP_ENDPOINT="http://example.com"
diff --git a/apps/console/.env.production b/apps/console/.env.production
deleted file mode 100644
index 215594768..000000000
--- a/apps/console/.env.production
+++ /dev/null
@@ -1,6 +0,0 @@
-POSTHOG_HOST=
-POSTHOG_KEY=
-FARO_PUSH_URL=
-
-API_SERVER_HOST=
-
diff --git a/apps/console/.gitignore b/apps/console/.gitignore
index 109052e40..0e4727357 100644
--- a/apps/console/.gitignore
+++ b/apps/console/.gitignore
@@ -1,2 +1,25 @@
-!dist/.keep
-dist/
\ No newline at end of file
+# Logs
+old
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/apps/console2/README.md b/apps/console/README.md
similarity index 100%
rename from apps/console2/README.md
rename to apps/console/README.md
diff --git a/apps/console/components.json b/apps/console/components.json
deleted file mode 100644
index 0222518a0..000000000
--- a/apps/console/components.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema.json",
- "style": "new-york",
- "rsc": false,
- "tsx": true,
- "tailwind": {
- "config": "tailwind.config.ts",
- "css": "src/App.css",
- "baseColor": "zinc",
- "cssVariables": true,
- "prefix": ""
- },
- "aliases": {
- "components": "@/components",
- "utils": "@/lib/utils",
- "ui": "@/components/ui",
- "lib": "@/lib",
- "hooks": "@/hooks"
- },
- "iconLibrary": "lucide"
-}
diff --git a/apps/console/eslint.config.js b/apps/console/eslint.config.js
index 131ea07a1..092408a9f 100644
--- a/apps/console/eslint.config.js
+++ b/apps/console/eslint.config.js
@@ -1,32 +1,28 @@
-import globals from "globals";
-import pluginJs from "@eslint/js";
-import tseslint from "typescript-eslint";
-import pluginReact from "eslint-plugin-react";
+import js from '@eslint/js'
+import globals from 'globals'
+import reactHooks from 'eslint-plugin-react-hooks'
+import reactRefresh from 'eslint-plugin-react-refresh'
+import tseslint from 'typescript-eslint'
-/** @type {import('eslint').Linter.Config[]} */
-export default [
- { files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
+export default tseslint.config(
+ { ignores: ['dist'] },
{
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
+ files: ['**/*.{ts,tsx}'],
languageOptions: {
+ ecmaVersion: 2020,
globals: globals.browser,
- parserOptions: {
- ecmaFeatures: {
- jsx: true,
- },
- },
},
- },
- pluginJs.configs.recommended,
- ...tseslint.configs.recommended,
- pluginReact.configs.flat.recommended,
- {
- settings: {
- react: {
- version: "detect",
- },
+ plugins: {
+ 'react-hooks': reactHooks,
+ 'react-refresh': reactRefresh,
},
rules: {
- "react/react-in-jsx-scope": "off",
+ ...reactHooks.configs.recommended.rules,
+ 'react-refresh/only-export-components': [
+ 'warn',
+ { allowConstantExport: true },
+ ],
},
},
-];
+)
diff --git a/apps/console/index.html b/apps/console/index.html
index e591b5868..9d2709dad 100644
--- a/apps/console/index.html
+++ b/apps/console/index.html
@@ -1,47 +1,37 @@
-
+
-
-
-
- Probo - Console
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Probo Console
+
+
+
+
+
+
-
-
-
-
-
-
-
-
diff --git a/apps/console/package.json b/apps/console/package.json
index e50147923..51d8268f7 100644
--- a/apps/console/package.json
+++ b/apps/console/package.json
@@ -1,93 +1,61 @@
{
"name": "@probo/console",
- "version": "0.0.1",
+ "private": true,
+ "version": "0.0.0",
"type": "module",
"scripts": {
- "dev": "npx node --env-file .env.development scripts/esbuild.mjs watch",
- "build": "npx node --env-file .env.production scripts/esbuild.mjs",
- "relay": "npx relay-compiler --output quiet-with-errors",
- "relay:watch": "npx relay-compiler --output quiet-with-errors --watch",
- "lint": "eslint src --ext .ts,.tsx",
- "typecheck": "npx tsc --noEmit"
+ "dev": "vite",
+ "relay": "find src -type d -name \"__generated__\" -exec rm -rf {} + && npx relay-compiler ./relay.config.json",
+ "build": "tsc -b && vite build",
+ "lint": "eslint .",
+ "check": "tsc --noEmit -p tsconfig.app.json",
+ "preview": "vite preview"
},
"dependencies": {
+ "@hookform/resolvers": "^5.0.1",
+ "@probo/helpers": "1.0.0",
+ "@probo/hooks": "1.0.0",
+ "@probo/i18n": "1.0.0",
"@probo/react-lazy": "1.0.0",
- "@probo/vendors": "^0.0.1",
- "@radix-ui/colors": "^3.0.0",
- "@radix-ui/react-avatar": "^1.1.3",
- "@radix-ui/react-checkbox": "^1.0.4",
- "@radix-ui/react-collapsible": "^1.1.3",
- "@radix-ui/react-dialog": "^1.1.6",
- "@radix-ui/react-dropdown-menu": "^2.1.6",
- "@radix-ui/react-label": "^2.0.2",
- "@radix-ui/react-popover": "^1.1.6",
- "@radix-ui/react-progress": "^1.1.2",
- "@radix-ui/react-radio-group": "^1.1.3",
- "@radix-ui/react-select": "^2.0.0",
- "@radix-ui/react-separator": "^1.1.2",
- "@radix-ui/react-slot": "^1.1.2",
- "@radix-ui/react-switch": "^1.1.4",
- "@radix-ui/react-tabs": "^1.1.3",
- "@radix-ui/react-toast": "^1.2.6",
- "@radix-ui/react-tooltip": "^1.1.8",
- "@tailwindcss/typography": "^0.5.16",
- "class-variance-authority": "^0.7.1",
+ "@probo/ui": "1.0.0",
+ "@probo/vendors": "0.0.1",
+ "@radix-ui/react-dialog": "^1.1.14",
+ "@radix-ui/react-label": "^2.1.7",
+ "@radix-ui/react-select": "^2.2.5",
+ "@tanstack/react-query": "^5.76.1",
"clsx": "^2.1.1",
- "cmdk": "^1.0.4",
- "date-fns": "^4.1.0",
- "fuse.js": "^7.1.0",
- "lucide-react": "^0.475.0",
- "posthog-js": "^1.215.1",
- "react": "^18.3.1",
- "react-dom": "^18.3.1",
- "react-helmet-async": "^2.0.5",
- "react-markdown": "^10.1.0",
- "react-relay": "^18.2.0",
- "react-router": "^7.1.5",
- "rehype-raw": "^7.0.0",
- "relay-runtime": "^18.2.0",
- "remark-gfm": "^4.0.1",
- "tailwind-merge": "^3.0.2",
- "tailwindcss-animate": "^1.0.7"
+ "minisearch": "^7.1.2",
+ "react": "^19.1.0",
+ "react-dom": "^19.1.0",
+ "react-error-boundary": "^6.0.0",
+ "react-hook-form": "^7.56.4",
+ "react-relay": "^19.0.0",
+ "react-router": "^7.6.0",
+ "relay-runtime": "^19.0.0",
+ "use-debounce": "^10.0.5",
+ "usehooks-ts": "^3.1.1",
+ "zod": "^3.25.17"
},
"devDependencies": {
- "@babel/core": "^7.26.7",
- "@babel/preset-env": "^7.26.7",
- "@babel/preset-typescript": "^7.26.0",
- "@eslint/js": "^9.21.0",
- "@probo/esbuild-plugin-postcss": "^0.0.1",
- "@probo/tsconfig": "^0.0.1",
- "@tailwindcss/postcss": "^4.0.9",
- "@types/babel-core": "^6.25.10",
- "@types/node": "^22.13.0",
- "@types/react": "^18.3.18",
- "@types/react-dom": "^18.3.5",
- "@types/react-relay": "^18.2.0",
- "@types/relay-runtime": "^18.2.5",
- "autoprefixer": "^10.4.20",
- "babel-plugin-relay": "^18.2.0",
- "esbuild": "^0.25.0",
- "eslint": "^9.21.0",
- "eslint-plugin-react": "^7.37.4",
+ "@eslint/js": "^9.25.0",
+ "@tailwindcss/vite": "^4.1.7",
+ "@types/node": "^22.15.21",
+ "@types/react": "^19.1.2",
+ "@types/react-dom": "^19.1.2",
+ "@types/react-relay": "^18.2.1",
+ "@types/relay-runtime": "^19.0.1",
+ "@vitejs/plugin-react": "^4.4.1",
+ "babel-plugin-relay": "^19.0.0",
+ "eslint": "^9.25.0",
+ "eslint-plugin-react-hooks": "^5.2.0",
+ "eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
- "relay-compiler": "^18.2.0",
- "tailwindcss": "^4.0.9",
- "typescript": "^5.8.3",
- "typescript-eslint": "^8.25.0"
- },
- "relay": {
- "src": "src",
- "language": "typescript",
- "schema": "../../pkg/server/api/console/v1/schema.graphql",
- "noFutureProofEnums": true,
- "customScalarTypes": {
- "Datetime": "string",
- "CursorKey": "string"
- },
- "excludes": [
- "**/node_modules/**",
- "**/__mocks__/**",
- "**/__generated__/**"
- ]
+ "graphql": "^16.11.0",
+ "prettier": "^3.5.3",
+ "relay-compiler": "^19.0.0",
+ "tailwindcss": "^4.1.7",
+ "typescript": "~5.8.3",
+ "typescript-eslint": "^8.30.1",
+ "vite": "^6.3.5"
}
}
diff --git a/apps/console/public/assets/android-chrome-192x192.png b/apps/console/public/assets/android-chrome-192x192.png
deleted file mode 100644
index 6f1ced291..000000000
Binary files a/apps/console/public/assets/android-chrome-192x192.png and /dev/null differ
diff --git a/apps/console/public/assets/android-chrome-512x512.png b/apps/console/public/assets/android-chrome-512x512.png
deleted file mode 100644
index 420456241..000000000
Binary files a/apps/console/public/assets/android-chrome-512x512.png and /dev/null differ
diff --git a/apps/console/public/assets/apple-touch-icon.png b/apps/console/public/assets/apple-touch-icon.png
deleted file mode 100644
index 710ed96f0..000000000
Binary files a/apps/console/public/assets/apple-touch-icon.png and /dev/null differ
diff --git a/apps/console/public/assets/cross-icon.svg b/apps/console/public/assets/cross-icon.svg
deleted file mode 100644
index 6b6a8bb6e..000000000
--- a/apps/console/public/assets/cross-icon.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/apps/console/public/assets/favicon-16x16.png b/apps/console/public/assets/favicon-16x16.png
deleted file mode 100644
index 3ae0a9835..000000000
Binary files a/apps/console/public/assets/favicon-16x16.png and /dev/null differ
diff --git a/apps/console/public/assets/favicon-32x32.png b/apps/console/public/assets/favicon-32x32.png
deleted file mode 100644
index 7a80f7481..000000000
Binary files a/apps/console/public/assets/favicon-32x32.png and /dev/null differ
diff --git a/apps/console/public/assets/favicon-dark.svg b/apps/console/public/assets/favicon-dark.svg
deleted file mode 100644
index c81aad138..000000000
--- a/apps/console/public/assets/favicon-dark.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/apps/console/public/assets/favicon.ico b/apps/console/public/assets/favicon.ico
deleted file mode 100644
index aba5652f3..000000000
Binary files a/apps/console/public/assets/favicon.ico and /dev/null differ
diff --git a/apps/console/public/assets/favicon.svg b/apps/console/public/assets/favicon.svg
deleted file mode 100644
index c81aad138..000000000
--- a/apps/console/public/assets/favicon.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/apps/console2/public/document.png b/apps/console/public/document.png
similarity index 100%
rename from apps/console2/public/document.png
rename to apps/console/public/document.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-114x114.png b/apps/console/public/favicons/apple-touch-icon-114x114.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-114x114.png
rename to apps/console/public/favicons/apple-touch-icon-114x114.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-120x120.png b/apps/console/public/favicons/apple-touch-icon-120x120.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-120x120.png
rename to apps/console/public/favicons/apple-touch-icon-120x120.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-144x144.png b/apps/console/public/favicons/apple-touch-icon-144x144.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-144x144.png
rename to apps/console/public/favicons/apple-touch-icon-144x144.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-152x152.png b/apps/console/public/favicons/apple-touch-icon-152x152.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-152x152.png
rename to apps/console/public/favicons/apple-touch-icon-152x152.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-57x57.png b/apps/console/public/favicons/apple-touch-icon-57x57.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-57x57.png
rename to apps/console/public/favicons/apple-touch-icon-57x57.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-60x60.png b/apps/console/public/favicons/apple-touch-icon-60x60.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-60x60.png
rename to apps/console/public/favicons/apple-touch-icon-60x60.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-72x72.png b/apps/console/public/favicons/apple-touch-icon-72x72.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-72x72.png
rename to apps/console/public/favicons/apple-touch-icon-72x72.png
diff --git a/apps/console2/public/favicons/apple-touch-icon-76x76.png b/apps/console/public/favicons/apple-touch-icon-76x76.png
similarity index 100%
rename from apps/console2/public/favicons/apple-touch-icon-76x76.png
rename to apps/console/public/favicons/apple-touch-icon-76x76.png
diff --git a/apps/console2/public/favicons/favicon-128.png b/apps/console/public/favicons/favicon-128.png
similarity index 100%
rename from apps/console2/public/favicons/favicon-128.png
rename to apps/console/public/favicons/favicon-128.png
diff --git a/apps/console2/public/favicons/favicon-16x16.png b/apps/console/public/favicons/favicon-16x16.png
similarity index 100%
rename from apps/console2/public/favicons/favicon-16x16.png
rename to apps/console/public/favicons/favicon-16x16.png
diff --git a/apps/console2/public/favicons/favicon-196x196.png b/apps/console/public/favicons/favicon-196x196.png
similarity index 100%
rename from apps/console2/public/favicons/favicon-196x196.png
rename to apps/console/public/favicons/favicon-196x196.png
diff --git a/apps/console2/public/favicons/favicon-32x32.png b/apps/console/public/favicons/favicon-32x32.png
similarity index 100%
rename from apps/console2/public/favicons/favicon-32x32.png
rename to apps/console/public/favicons/favicon-32x32.png
diff --git a/apps/console2/public/favicons/favicon-96x96.png b/apps/console/public/favicons/favicon-96x96.png
similarity index 100%
rename from apps/console2/public/favicons/favicon-96x96.png
rename to apps/console/public/favicons/favicon-96x96.png
diff --git a/apps/console2/public/favicons/favicon.ico b/apps/console/public/favicons/favicon.ico
similarity index 100%
rename from apps/console2/public/favicons/favicon.ico
rename to apps/console/public/favicons/favicon.ico
diff --git a/apps/console2/public/favicons/mstile-144x144.png b/apps/console/public/favicons/mstile-144x144.png
similarity index 100%
rename from apps/console2/public/favicons/mstile-144x144.png
rename to apps/console/public/favicons/mstile-144x144.png
diff --git a/apps/console2/public/favicons/mstile-150x150.png b/apps/console/public/favicons/mstile-150x150.png
similarity index 100%
rename from apps/console2/public/favicons/mstile-150x150.png
rename to apps/console/public/favicons/mstile-150x150.png
diff --git a/apps/console2/public/favicons/mstile-310x150.png b/apps/console/public/favicons/mstile-310x150.png
similarity index 100%
rename from apps/console2/public/favicons/mstile-310x150.png
rename to apps/console/public/favicons/mstile-310x150.png
diff --git a/apps/console2/public/favicons/mstile-310x310.png b/apps/console/public/favicons/mstile-310x310.png
similarity index 100%
rename from apps/console2/public/favicons/mstile-310x310.png
rename to apps/console/public/favicons/mstile-310x310.png
diff --git a/apps/console2/public/favicons/mstile-70x70.png b/apps/console/public/favicons/mstile-70x70.png
similarity index 100%
rename from apps/console2/public/favicons/mstile-70x70.png
rename to apps/console/public/favicons/mstile-70x70.png
diff --git a/apps/console2/public/github.png b/apps/console/public/github.png
similarity index 100%
rename from apps/console2/public/github.png
rename to apps/console/public/github.png
diff --git a/apps/console/public/icons/arrow-inbox.svg b/apps/console/public/icons/arrow-inbox.svg
deleted file mode 100644
index d65d6d200..000000000
--- a/apps/console/public/icons/arrow-inbox.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/apps/console/public/icons/clock.svg b/apps/console/public/icons/clock.svg
deleted file mode 100644
index 4d4200ddd..000000000
--- a/apps/console/public/icons/clock.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/apps/console/public/icons/dot-grid-1x3-horizontal.svg b/apps/console/public/icons/dot-grid-1x3-horizontal.svg
deleted file mode 100644
index 8e9422bec..000000000
--- a/apps/console/public/icons/dot-grid-1x3-horizontal.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/apps/console/public/images/dot-grid-1x3-horizontal.svg b/apps/console/public/images/dot-grid-1x3-horizontal.svg
deleted file mode 100644
index 8e9422bec..000000000
--- a/apps/console/public/images/dot-grid-1x3-horizontal.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/apps/console/public/index.html b/apps/console/public/index.html
deleted file mode 100644
index 3b206be67..000000000
--- a/apps/console/public/index.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
- Probo - Console
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/console2/public/logos/gdpr.png b/apps/console/public/logos/gdpr.png
similarity index 100%
rename from apps/console2/public/logos/gdpr.png
rename to apps/console/public/logos/gdpr.png
diff --git a/apps/console2/public/logos/iso27001.png b/apps/console/public/logos/iso27001.png
similarity index 100%
rename from apps/console2/public/logos/iso27001.png
rename to apps/console/public/logos/iso27001.png
diff --git a/apps/console2/public/logos/soc2.png b/apps/console/public/logos/soc2.png
similarity index 100%
rename from apps/console2/public/logos/soc2.png
rename to apps/console/public/logos/soc2.png
diff --git a/apps/console2/public/logos/sox.png b/apps/console/public/logos/sox.png
similarity index 100%
rename from apps/console2/public/logos/sox.png
rename to apps/console/public/logos/sox.png
diff --git a/apps/console2/public/slack.png b/apps/console/public/slack.png
similarity index 100%
rename from apps/console2/public/slack.png
rename to apps/console/public/slack.png
diff --git a/apps/console2/public/vite.svg b/apps/console/public/vite.svg
similarity index 100%
rename from apps/console2/public/vite.svg
rename to apps/console/public/vite.svg
diff --git a/apps/console/relay.config.json b/apps/console/relay.config.json
index 89f9e7e73..6c55a8183 100644
--- a/apps/console/relay.config.json
+++ b/apps/console/relay.config.json
@@ -1,6 +1,7 @@
{
"src": "./src",
- "schema": "./schema.graphql",
+ "schema": "../../pkg/server/api/console/v1/schema.graphql",
"language": "typescript",
- "eagerEsModules": true
+ "eagerEsModules": true,
+ "noFutureProofEnums": true
}
diff --git a/apps/console/scripts/esbuild.mjs b/apps/console/scripts/esbuild.mjs
deleted file mode 100644
index ae065649a..000000000
--- a/apps/console/scripts/esbuild.mjs
+++ /dev/null
@@ -1,278 +0,0 @@
-import babel from "@babel/core";
-import postCssPlugin from "@probo/esbuild-plugin-postcss";
-import autoprefixer from "autoprefixer";
-import { execSync, spawn } from "child_process";
-import * as esbuild from "esbuild";
-import fs from "node:fs/promises";
-import http from "node:http";
-import path from "node:path";
-import process from "node:process";
-import tailwindcssPlugin from "@tailwindcss/postcss";
-
-async function copyRecursive(src, dest) {
- await fs.mkdir(dest, { recursive: true });
- const files = await fs.readdir(src);
-
- for (const file of files) {
- const srcPath = path.join(src, file);
- const destPath = path.join(dest, file);
-
- const fileInfo = await fs.lstat(srcPath);
-
- if (fileInfo.isDirectory()) {
- await copyRecursive(srcPath, destPath);
- } else {
- await fs.copyFile(srcPath, destPath);
- }
- }
-}
-
-function runRelayCompilerInWatchMode() {
- const relayProcess = spawn("npm", ["run", "relay:watch"]);
-
- relayProcess.stdout.on("data", (data) => {
- console.log(`[relay] ${data}`);
- });
-
- relayProcess.stderr.on("data", (data) => {
- console.error(`[relay] ${data}`);
- });
-
- relayProcess.on("error", (error) => {
- console.error("Failed to start Relay compiler:", error);
- });
-
- console.log("Relay compiler started in watch mode.");
-}
-
-const envVars = Object.fromEntries(
- Object.entries(process.env).map(([key, value]) => [
- `process.env.${key}`,
- JSON.stringify(value),
- ])
-);
-
-const hotReloading = {
- name: "hot-reloading",
- async setup(build) {
- if (!process.env.LIVE_RELOAD) {
- return;
- }
-
- build.initialOptions.banner = build.initialOptions.banner || {};
- build.initialOptions.banner.js = `
- ${build.initialOptions.banner.js || ""};
-
- if (!window.__esbuild_event_source__) {
- window.__esbuild_event_source__ = true;
- new EventSource('/esbuild').addEventListener('change', (e) => {
- const { added, removed, updated } = JSON.parse(e.data);
-
- if (!added.length && !removed.length && updated.length === 1) {
- for (const link of document.getElementsByTagName("link")) {
- const url = new URL(link.href);
-
- if (url.host === location.host && url.pathname === updated[0]) {
- const next = link.cloneNode();
- next.href = updated[0] + '?' + Math.random().toString(36).slice(2);
- next.onload = () => link.remove();
- link.parentNode.insertBefore(next, link.nextSibling);
- return;
- }
- }
- }
-
- location.reload();
- });
- }
- `;
- return;
- },
-};
-
-const relayPlugin = {
- name: "relay-compiler",
- setup(build) {
- build.initialOptions.loader = {
- ...build.initialOptions.loader,
- ".graphql": "text",
- };
-
- build.onLoad({ filter: /\.(ts|tsx)$/ }, async (args) => {
- const source = await fs.readFile(args.path, "utf8");
-
- const result = await babel.transformAsync(source, {
- filename: args.path,
- presets: [
- [
- "@babel/preset-env",
- {
- modules: false,
- },
- ],
- "@babel/preset-typescript",
- ],
- plugins: ["relay"],
- sourceMaps: true,
- });
-
- return {
- contents: result.code,
- loader: "default",
- };
- });
- },
-};
-
-const htmlPlugin = {
- name: 'html-plugin',
- setup(build) {
- build.onEnd(async (result) => {
- // do not run this in watch mode
- if (process.argv[2] === "watch") {
- return;
- }
-
- if (result.errors.length > 0) {
- return;
- }
-
- if (!result.metafile) {
- console.error('Metafile not available');
- return;
- }
-
- const outputs = Object.keys(result.metafile.outputs);
-
- const jsOutputs = outputs.filter(file => file.endsWith('.js') && file.includes('/App-'));
- const cssOutputs = outputs.filter(file => file.endsWith('.css') && file.includes('/App-'));
-
- if (jsOutputs.length === 0 || cssOutputs.length === 0) {
- console.error('Could not find entry point outputs');
- return;
- }
-
- const jsFile = path.basename(jsOutputs[0]);
- const cssFile = path.basename(cssOutputs[0]);
-
- console.log('Found JS file:', jsFile);
- console.log('Found CSS file:', cssFile);
-
- const htmlPath = path.join(process.cwd(), 'dist', 'index.html');
- let html = await fs.readFile(htmlPath, "utf8");
-
- html = html.replace('"/App.css"', `"/${cssFile}"`);
- html = html.replace('"/App.js"', `"/${jsFile}"`);
-
- await fs.writeFile(htmlPath, html);
- console.log("Successfully updated index.html with hashed filenames");
- });
- }
-};
-
-const defaultOptions = {
- logLevel: "info",
- entryPoints: ["src/App.tsx"],
- bundle: true,
- minify: true,
- publicPath: "/",
- outdir: "dist",
- assetNames: "assets/[name]-[hash]",
- chunkNames: "chunks/[name]-[hash]",
- entryNames: "[dir]/[name]-[hash]",
- splitting: true,
- format: "esm",
- sourcemap: "external",
- metafile: true,
- loader: {
- ".png": "file",
- ".jpg": "file",
- ".jpeg": "file",
- ".svg": "file",
- ".gif": "file",
- },
- plugins: [
- relayPlugin,
- hotReloading,
- htmlPlugin,
- postCssPlugin({
- plugins: [tailwindcssPlugin(), autoprefixer()],
- }),
- ],
- define: {
- ...envVars,
- },
-};
-
-await copyRecursive("public", "dist");
-
-const [, , command] = process.argv;
-
-if (command === "watch") {
- runRelayCompilerInWatchMode();
-
- const ctx = await esbuild.context({
- ...defaultOptions,
- minify: false,
- entryNames: "[dir]/[name]"
- });
- await ctx.watch();
- let { host, port } = await ctx.serve({ servedir: "dist" });
- http
- .createServer((req, res) => {
- const options = {
- hostname: host,
- port: port,
- path: req.url,
- method: req.method,
- headers: req.headers,
- };
-
- const urlObj = new URL(req.url, `http://${req.headers.host}`);
- const extensionPattern = /\.[^/]+$/;
-
- const proxyReq = http.request(options, (proxyRes) => {
- if (
- proxyRes.statusCode === 404 &&
- extensionPattern.test(urlObj.pathname)
- ) {
- res.writeHead(404, { "Content-Type": "text/plain" });
- res.end("404 - Not Found");
- return;
- }
-
- if (proxyRes.statusCode === 404) {
- const indexPath = path.join(
- import.meta.dirname,
- "../dist",
- "index.html"
- );
-
- fs.readFile(indexPath, "utf8")
- .then((data) => {
- res.writeHead(200, { "Content-Type": "text/html" });
- res.end(data);
- })
- .catch((err) => {
- console.error("Error reading index.html:", err);
- res.writeHead(500, { "Content-Type": "text/plain" });
- res.end("500 - Internal Server Error");
- });
-
- proxyRes.resume();
- return;
- }
-
- res.writeHead(proxyRes.statusCode, proxyRes.headers);
- proxyRes.pipe(res, { end: true });
- });
-
- req.pipe(proxyReq, { end: true });
- })
- .listen(3000, () => {
- console.log(`listening on http://localhost:3000`);
- });
-} else {
- execSync("npm run relay", { stdio: "inherit" });
- await esbuild.build(defaultOptions);
-}
diff --git a/apps/console/src/App.css b/apps/console/src/App.css
deleted file mode 100644
index a9c1514f5..000000000
--- a/apps/console/src/App.css
+++ /dev/null
@@ -1,323 +0,0 @@
-@import "tailwindcss";
-@import "@radix-ui/colors/blue.css";
-@import "@radix-ui/colors/blue-dark.css";
-@import "@radix-ui/colors/olive.css";
-@import "@radix-ui/colors/olive-alpha.css";
-@import "@radix-ui/colors/olive-dark.css";
-@import "@radix-ui/colors/olive-dark-alpha.css";
-@import "@radix-ui/colors/lime.css";
-@import "@radix-ui/colors/lime-dark.css";
-@import "@radix-ui/colors/red.css";
-@import "@radix-ui/colors/red-dark.css";
-@import "@radix-ui/colors/red-dark-alpha.css";
-@import "@radix-ui/colors/orange.css";
-@import "@radix-ui/colors/orange-dark.css";
-
-@import "./styles/document-content.css";
-
-@plugin 'tailwindcss-animate';
-@plugin "@tailwindcss/typography";
-
-@custom-variant dark (&:is(.dark *));
-
-@theme {
- /* Legacy */
- /* --color-border: hsl(var(--border)); -> solid-b
- --color-input: hsl(var(--input)); -> solid-b
- --color-ring: hsl(var(--ring)); -> active-b
- --color-background: hsl(var(--background)); -> level-0
- --color-foreground: hsl(var(--foreground)); -> primary
-
- --color-primary: hsl(var(--primary)); -> primary
- --color-primary-foreground: hsl(var(--primary-foreground)); -> invert
-
- --color-secondary: hsl(var(--secondary)); -> invert
- --color-secondary-foreground: hsl(var(--secondary-foreground)); -> secondary
-
- --color-destructive: hsl(var(--destructive)); -> danger-bg
- --color-destructive-foreground: hsl(var(--destructive-foreground)); -> danger
-
- --color-muted: hsl(var(--muted)); -> invert-bg
- --color-muted-foreground: hsl(var(--muted-foreground)); -> tertiary
-
- --color-accent: hsl(var(--accent)); -> accent-bg
- --color-accent-foreground: hsl(var(--accent-foreground)); -> accent
-
- --color-popover: hsl(var(--popover)); -> level-0
- --color-popover-foreground: hsl(var(--popover-foreground)); -> primary
-
- --color-card: hsl(var(--card)); -> level-0
- --color-card-foreground: hsl(var(--card-foreground)); -> primary
-
- --color-sidebar: hsl(var(--sidebar-background)); -> level-0
- --color-sidebar-foreground: hsl(var(--sidebar-foreground)); -> secondary
- --color-sidebar-primary: hsl(var(--sidebar-primary)); -> not used
- --color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
- --color-sidebar-accent: hsl(var(--sidebar-accent));
- --color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
- --color-sidebar-border: hsl(var(--sidebar-border)); -> solid-b
- --color-sidebar-ring: hsl(var(--sidebar-ring)); -> active-b */
-
- /* New */
- /* Surfaces */
- --color-level-0: var(--level-0);
- --color-level-1: var(--level-1);
- --color-level-2: var(--level-2);
- --color-level-3: var(--level-3);
-
- /* Text colors */
- --color-primary: var(--primary);
- --color-invert: var(--invert);
- --color-secondary: var(--secondary);
- --color-tertiary: var(--tertiary);
- --color-quaternary: var(--quaternary);
- --color-disabled: var(--disabled);
- --color-accent: var(--accent);
- --color-danger: var(--danger);
- --color-success: var(--success);
- --color-info: var(--info);
- --color-warning: var(--warning);
-
- /* Background colors */
- --color-primary-bg: var(--primary-bg);
- --color-invert-bg: var(--invert-bg);
- --color-secondary-bg: var(--secondary-bg);
- --color-tertiary-bg: var(--tertiary-bg);
- --color-subtle-bg: var(--subtle-bg);
- --color-highlight-bg: var(--highlight-bg);
- --color-accent-bg: var(--accent-bg);
- --color-active-bg: var(--active-bg);
- --color-danger-bg: var(--danger-bg);
- --color-danger-plain-bg: var(--danger-plain-bg);
- --color-success-bg: var(--success-bg);
- --color-info-bg: var(--info-bg);
- --color-warning-bg: var(--warning-bg);
- /* Hover */
- --color-h-primary-bg: var(--h-primary-bg);
- --color-h-invert-bg: var(--h-invert-bg);
- --color-h-secondary-bg: var(--h-secondary-bg);
- --color-h-tertiary-bg: var(--h-tertiary-bg);
- --color-h-subtle-bg: var(--h-subtle-bg);
- --color-h-highlight-bg: var(--h-highlight-bg);
- --color-h-accent-bg: var(--h-accent-bg);
- --color-h-active-bg: var(--h-active-bg);
- /* Pressed */
- --color-p-primary-bg: var(--p-primary-bg);
- --color-p-invert-bg: var(--p-invert-bg);
- --color-p-secondary-bg: var(--p-secondary-bg);
- --color-p-tertiary-bg: var(--p-tertiary-bg);
- --color-p-subtle-bg: var(--p-subtle-bg);
- --color-p-highlight-bg: var(--p-highlight-bg);
- --color-p-accent-bg: var(--p-accent-bg);
- --color-p-active-bg: var(--p-active-bg);
-
- /* Borders */
- --color-solid-b: var(--solid-b);
- --color-low-b: var(--low-b);
- --color-mid-b: var(--mid-b);
- --color-strong-b: var(--strong-b);
- --color-active-b: var(--active-b);
- --color-accent-b: var(--accent-b);
- --color-danger-b: var(--danger-b);
- --color-success-b: var(--success-b);
- --color-warning-b: var(--warning-b);
- --color-info-b: var(--info-b);
-}
-
-/*
- The default border color has changed to `currentColor` in Tailwind CSS v4,
- so we've added these compatibility styles to make sure everything still
- looks the same as it did with Tailwind CSS v3.
-
- If we ever want to remove these styles, we need to add an explicit border
- color utility to any element that depends on these defaults.
-*/
-@layer base {
- *,
- ::after,
- ::before,
- ::backdrop,
- ::file-selector-button {
- border-color: var(--color-mid-b, currentColor);
- }
-}
-
-@layer base {
- /* Legacy */
- /* :root {
- --background: 0 0% 100%;
- --foreground: 222.2 47.4% 11.2%;
- --muted: 210 40% 96.1%;
- --muted-foreground: 215.4 16.3% 46.9%;
- --popover: 0 0% 100%;
- --popover-foreground: 222.2 47.4% 11.2%;
- --border: 214.3 31.8% 91.4%;
- --input: 214.3 31.8% 91.4%;
- --card: 0 0% 100%;
- --card-foreground: 222.2 47.4% 11.2%;
- --primary: 222.2 47.4% 11.2%;
- --primary-foreground: 210 40% 98%;
- --secondary: 210 40% 96.1%;
- --secondary-foreground: 222.2 47.4% 11.2%;
- --accent: 210 40% 96.1%;
- --accent-foreground: 222.2 47.4% 11.2%;
- --destructive: 0 100% 50%;
- --destructive-foreground: 210 40% 98%;
- --ring: 215 20.2% 65.1%;
- --sidebar-background: 0 0% 98%;
- --sidebar-foreground: 240 5.3% 26.1%;
- --sidebar-primary: 240 5.9% 10%;
- --sidebar-primary-foreground: 0 0% 98%;
- --sidebar-accent: 240 4.8% 95.9%;
- --sidebar-accent-foreground: 240 5.9% 10%;
- --sidebar-border: 220 13% 91%;
- --sidebar-ring: 217.2 91.2% 59.8%;
- }
-
- .dark {
- --background: 224 71% 4%;
- --foreground: 213 31% 91%;
- --muted: 223 47% 11%;
- --muted-foreground: 215.4 16.3% 56.9%;
- --accent: 216 34% 17%;
- --accent-foreground: 210 40% 98%;
- --popover: 224 71% 4%;
- --popover-foreground: 215 20.2% 65.1%;
- --border: 216 34% 17%;
- --input: 216 34% 17%;
- --card: 224 71% 4%;
- --card-foreground: 213 31% 91%;
- --primary: 210 40% 98%;
- --primary-foreground: 222.2 47.4% 1.2%;
- --secondary: 222.2 47.4% 11.2%;
- --secondary-foreground: 210 40% 98%;
- --destructive: 0 63% 31%;
- --destructive-foreground: 210 40% 98%;
- --ring: 216 34% 17%;
- --sidebar-background: 240 5.9% 10%;
- --sidebar-foreground: 240 4.8% 95.9%;
- --sidebar-primary: 224.3 76.3% 48%;
- --sidebar-primary-foreground: 0 0% 100%;
- --sidebar-accent: 240 3.7% 15.9%;
- --sidebar-accent-foreground: 240 4.8% 95.9%;
- --sidebar-border: 240 3.7% 15.9%;
- --sidebar-ring: 217.2 91.2% 59.8%;
- } */
-
- /* New */
- :root {
- /* Surfaces */
- --level-0: #FAFAF5;
- --level-1: #FFFFFF;
- --level-2: #FFFFFF;
- --level-3: var(--olive-12);
-
- /* Text colors */
- --primary: var(--olive-12);
- --invert: var(--olive-1);
- --secondary: var(--olive-11);
- --tertiary: var(--olive-10);
- --quaternary: var(--olive-8);
- --disabled: var(--olive-7);
- --accent: var(--lime-10);
- --danger: var(--red-11);
- --success: var(--lime-11);
- --info: var(--blue-11);
- --warning: var(--orange-11);
-
- /* Background colors */
- --primary-bg: var(--olive-12);
- --invert-bg: #ffffff;
- --secondary-bg: var(--olive-1);
- --tertiary-bg: transparent;
- --subtle-bg: var(--olive-a2);
- --highlight-bg: var(--olive-a3);
- --accent-bg: var(--olive-12);
- --active-bg: var(--lime-4);
- --danger-bg: var(--red-3);
- --danger-plain-bg: var(--red-10);
- --success-bg: var(--lime-3);
- --info-bg: var(--blue-3);
- --warning-bg: var(--orange-3);
- /* Hover */
- --h-primary-bg: #273025;
- --h-invert-bg: var(--olive-2);
- --h-secondary-bg: var(--olive-2);
- --h-tertiary-bg: var(--olive-a2);
- --h-subtle-bg: var(--olive-a3);
- --h-highlight-bg: var(--olive-a4);
- --h-accent-bg: #1E2C1C;
- --h-active-bg: var(--lime-5);
- /* Pressed */
- --p-primary-bg: #30392E;
- --p-invert-bg: var(--olive-3);
- --p-secondary-bg: var(--olive-3);
- --p-tertiary-bg: var(--olive-a3);
- --p-subtle-bg: var(--olive-a4);
- --p-highlight-bg: var(--olive-a5);
- --p-accent-bg: #293A25;
- --p-active-bg: var(--lime-6);
-
- /* Borders */
- --solid-b: var(--olive-4);
- --low-b: var(--olive-a4);
- --mid-b: var(--olive-a7);
- --strong-b: var(--olive-a8);
- --active-b: var(--olive-12);
- --accent-b: var(--lime-11);
- --danger-b: var(--red-10);
- --success-b: var(--lime-10);
- --warning-b: var(--orange-10);
- --info-b: var(--blue-10);
- }
-
- .dark {
- /* Surfaces */
- --level-0: var(--olive-1);
- --level-1: var(--olive-2);
- --level-2: var(--olive-3);
- --level-3: var(--olive-7);
-
- /* Text colors */
- --success: var(--lime-a11);
-
- /* Background colors */
- --primary-bg: var(--lime-10);
- --invert-bg: var(--olive-1);
- --secondary-bg: var(--olive-a3);
- --active-bg: var(--olive-a4);
- --accent-bg: var(--lime-10);
- --danger-bg: var(--red-a3);
- --danger-plain-bg: var(--red-a10);
- --success-bg: var(--lime-a3);
- --info-bg: var(--blue-a3);
- --warning-bg: var(--orange-a3);
- /* Hover */
- --h-primary-bg: #C4F042E1;
- --h-secondary-bg: var(--olive-a3);
- --h-highlight-bg: var(--olive-a5);
- --h-accent-bg: var(--lime-a9);
- --h-active-bg: var(--olive-a5);
- /* Pressed */
- --p-primary-bg: #C4F042D7;
- --p-secondary-bg: var(--olive-a4);
- --p-highlight-bg: var(--olive-a6);
- --p-accent-bg: var(--lime-a10);
- --p-active-bg: var(--olive-a6);
-
- /* Borders */
- --solid-b: var(--olive-5);
- --mid-b: var(--olive-a5);
- --active-b: var(--olive-a12);
- --warning-b: var(--orange-a10);
- }
-}
-
-@layer base {
- * {
- @apply border-solid-b;
- }
- body {
- @apply font-sans antialiased bg-level-0 text-primary;
- }
-}
diff --git a/apps/console/src/App.tsx b/apps/console/src/App.tsx
index 78a5e630a..6efc4ed96 100644
--- a/apps/console/src/App.tsx
+++ b/apps/console/src/App.tsx
@@ -1,91 +1,12 @@
-import posthog from "posthog-js";
-import { PostHogProvider } from "posthog-js/react";
-import { lazy } from "@probo/react-lazy";
-import { StrictMode, Suspense } from "react";
-import { createRoot } from "react-dom/client";
-import { HelmetProvider } from "react-helmet-async";
-import { RelayEnvironmentProvider } from "react-relay";
-import { BrowserRouter, Route, Routes, useLocation } from "react-router";
-import "./App.css";
-import "./styles/document-content.css";
-import ErrorBoundary from "./components/ErrorBoundary";
-import AuthLayout from "./layouts/AuthLayout";
-import { RelayEnvironment } from "./RelayEnvironment";
-import { AuthenticationRoutes } from "./pages/authentication/Routes";
-import { OrganizationsRoutes } from "./pages/organizations/Routes";
-import SigningRequestsPage from "./pages/SigningRequestsPage";
+import { RouterProvider } from "react-router";
+import { router } from "./routes";
+import { Toasts } from "@probo/ui";
-posthog.init(process.env.POSTHOG_KEY!, {
- api_host: process.env.POSTHOG_HOST,
- session_recording: {
- maskAllInputs: true,
- },
- loaded: (posthog) => {
- if (!process.env.POSTHOG_KEY) posthog.debug();
- },
-});
-
-const OrganizationSelectionPage = lazy(
- () => import("./pages/OrganizationSelectionPage"),
-);
-
-function App() {
+export function App() {
return (
-
-
-
-
-
-
-
-
-
-
-
-
- }
- />
-
- }
- />
-
- }
- />
-
-
-
-
- }
- />
-
-
-
-
-
-
-
+ <>
+
+
+ >
);
}
-
-function ErrorBoundaryWithLocation({
- children,
-}: {
- children: React.ReactNode;
-}) {
- const location = useLocation();
- return {children};
-}
-
-const container = document.getElementById("root");
-const root = createRoot(container!);
-root.render();
diff --git a/apps/console/src/RelayEnvironment.ts b/apps/console/src/RelayEnvironment.ts
deleted file mode 100644
index aa9063173..000000000
--- a/apps/console/src/RelayEnvironment.ts
+++ /dev/null
@@ -1,123 +0,0 @@
-import {
- Environment,
- FetchFunction,
- Network,
- RecordSource,
- Store,
-} from "relay-runtime";
-import { buildEndpoint } from "./utils";
-import { GraphQLError } from "graphql";
-
-export class UnAuthenticatedError extends Error {
- constructor() {
- super("UNAUTHENTICATED");
- this.name = "UnAuthenticatedError";
- }
-}
-
-export class InternalServerError extends Error {
- constructor() {
- super("INTERNAL_SERVER_ERROR");
- this.name = "InternalServerError";
- }
-}
-
-const hasUnauthenticatedError = (error: GraphQLError) =>
- error.extensions?.code == "UNAUTHENTICATED";
-
-const fetchRelay: FetchFunction = async (
- request,
- variables,
- _,
- uploadables
-) => {
- const requestInit: RequestInit = {
- method: "POST",
- credentials: "include",
- headers: {},
- };
-
- if (uploadables) {
- const formData = new FormData();
- formData.append(
- "operations",
- JSON.stringify({
- operationName: request.name,
- query: request.text,
- variables: variables,
- })
- );
-
- const uploadableMap: {
- [key: string]: string[];
- } = {};
-
- Object.keys(uploadables).forEach((key, index) => {
- uploadableMap[index] = [`variables.${key}`];
- });
-
- formData.append("map", JSON.stringify(uploadableMap));
-
- Object.keys(uploadables).forEach((key, index) => {
- formData.append(index.toString(), uploadables[key]);
- });
-
- requestInit.body = formData;
- } else {
- requestInit.headers = {
- Accept:
- "application/graphql-response+json; charset=utf-8, application/json; charset=utf-8",
- "Content-Type": "application/json",
- };
-
- requestInit.body = JSON.stringify({
- operationName: request.name,
- query: request.text,
- variables,
- });
- }
-
- const response = await fetch(
- buildEndpoint("/api/console/v1/query"),
- requestInit
- );
-
- if (response.status === 500) {
- throw new InternalServerError();
- }
-
- const json = await response.json();
-
- if (json.errors) {
- const errors = json.errors as GraphQLError[];
-
- if (errors.find(hasUnauthenticatedError)) {
- throw new UnAuthenticatedError();
- }
-
- throw new Error(
- `Error fetching GraphQL query '${
- request.name
- }' with variables '${JSON.stringify(variables)}': ${JSON.stringify(
- json.errors
- )}`
- );
- }
-
- return json;
-};
-
-function createRelayEnvironment() {
- const source = new RecordSource();
- const store = new Store(source, {
- queryCacheExpirationTime: 1 * 60 * 1000,
- gcReleaseBufferSize: 20,
- });
-
- return new Environment({
- network: Network.create(fetchRelay),
- store,
- });
-}
-
-export const RelayEnvironment: Environment = createRelayEnvironment();
diff --git a/apps/console/src/components/AppSidebar.tsx b/apps/console/src/components/AppSidebar.tsx
deleted file mode 100644
index 0cddb0dd6..000000000
--- a/apps/console/src/components/AppSidebar.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import * as React from "react";
-import { Suspense, useEffect } from "react";
-import {
- graphql,
- PreloadedQuery,
- usePreloadedQuery,
- useQueryLoader,
-} from "react-relay";
-
-import { NavUser } from "@/components/NavUser";
-import { Sidebar } from "@/components/ui/sidebar";
-import type { AppSidebarQuery as AppSidebarQueryType } from "./__generated__/AppSidebarQuery.graphql";
-import { OrganizationSwitcher } from "@/components/OrganizationSwitcher";
-import { AppSidebarShell } from "./AppSidebarShell";
-import { AppSidebarSkeleton } from "./AppSidebarSkeleton";
-import { NavMain } from "./NavMain";
-
-const AppSidebarQuery = graphql`
- query AppSidebarQuery {
- viewer {
- id
- ...OrganizationSwitcher_organizations
- ...NavUser_viewer
- }
- }
-`;
-
-function AppSidebarContent({
- queryRef,
- ...props
-}: React.ComponentProps & {
- queryRef: PreloadedQuery;
-}) {
- const data = usePreloadedQuery(AppSidebarQuery, queryRef);
-
- return (
-
- }
- navMain={}
- navUser={}
- {...props}
- />
- );
-}
-
-export function AppSidebar(props: React.ComponentProps) {
- const [queryRef, loadQuery] =
- useQueryLoader(AppSidebarQuery);
-
- useEffect(() => {
- loadQuery({});
- }, [loadQuery]);
-
- if (!queryRef) {
- return ;
- }
-
- return (
- }>
-
-
- );
-}
diff --git a/apps/console/src/components/AppSidebarShell.tsx b/apps/console/src/components/AppSidebarShell.tsx
deleted file mode 100644
index a2297b549..000000000
--- a/apps/console/src/components/AppSidebarShell.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { NavSecondary } from "./NavSecondary";
-import {
- Sidebar,
- SidebarContent,
- SidebarFooter,
- SidebarHeader,
-} from "./ui/sidebar";
-import { ReactNode } from "react";
-
-interface AppSidebarShellProps extends React.ComponentProps {
- navUser: ReactNode;
- navMain: ReactNode;
- organizationSwitcher: ReactNode;
-}
-
-export function AppSidebarShell({
- navUser,
- navMain,
- organizationSwitcher,
- ...props
-}: AppSidebarShellProps) {
- return (
-
- {organizationSwitcher}
-
- {navMain}
-
-
- {navUser}
-
- );
-}
diff --git a/apps/console/src/components/AppSidebarSkeleton.tsx b/apps/console/src/components/AppSidebarSkeleton.tsx
deleted file mode 100644
index 9515cf532..000000000
--- a/apps/console/src/components/AppSidebarSkeleton.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { AppSidebarShell } from "./AppSidebarShell";
-import { NavMainSkeleton } from "./NavMainSkeleton";
-import { NavUserSkeleton } from "./NavUserSkeleton";
-import { OrganizationSwitcherSkeleton } from "./OrganizationSwitcherSkeleton";
-import { Sidebar } from "./ui/sidebar";
-
-export function AppSidebarSkeleton(
- props: React.ComponentProps,
-) {
- return (
- }
- navMain={}
- navUser={}
- {...props}
- />
- );
-}
diff --git a/apps/console/src/components/DocumentEditor.css b/apps/console/src/components/DocumentEditor.css
deleted file mode 100644
index 57e7b9069..000000000
--- a/apps/console/src/components/DocumentEditor.css
+++ /dev/null
@@ -1,284 +0,0 @@
-.document-editor-container {
- border-radius: 0.5rem;
- position: relative;
- line-height: 1.5;
- font-weight: 400;
- margin-top: 0.5rem;
- border: 1px solid var(--solid-b);
- display: block;
- width: 100%;
-}
-
-.document-editor {
- background: var(--bg-invert-bg);
- position: relative;
- border-radius: 0.5rem;
- display: flex;
- flex-direction: column;
- width: 100%;
-}
-
-.document-editor-inner {
- background: #fff;
- position: relative;
- border-radius: 0 0 0.5rem 0.5rem;
- flex: 1;
- min-height: 250px;
-}
-
-.document-editor-input {
- min-height: 250px;
- max-height: 500px;
- resize: none;
- font-size: 15px;
- position: relative;
- tab-size: 1;
- outline: 0;
- padding: 15px 10px;
- overflow-y: auto;
- width: 100%;
- display: block;
- color: #000;
-}
-
-.document-editor-placeholder {
- color: #999;
- overflow: hidden;
- position: absolute;
- text-overflow: ellipsis;
- top: 15px;
- left: 10px;
- font-size: 15px;
- user-select: none;
- display: inline-block;
- pointer-events: none;
-}
-
-.document-editor-paragraph {
- margin: 0 0 15px 0;
- position: relative;
-}
-
-.document-editor .toolbar {
- display: flex;
- flex-wrap: wrap;
- padding: 8px;
- border-bottom: 1px solid hsl(var(--solid-b));
- background-color: hsl(var(--invert-bg));
- border-radius: 0.5rem 0.5rem 0 0;
-}
-
-.document-editor .toolbar button {
- border: 0;
- display: flex;
- background: none;
- border-radius: 4px;
- padding: 8px;
- cursor: pointer;
- vertical-align: middle;
- align-items: center;
- justify-content: center;
-}
-
-.document-editor .toolbar button:hover {
- background-color: rgba(0, 0, 0, 0.05);
-}
-
-.document-editor .toolbar button.active {
- background-color: rgba(0, 0, 0, 0.1);
-}
-
-.document-editor .toolbar .divider {
- width: 1px;
- background-color: hsl(var(--solid-b));
- margin: 0 8px;
- height: 24px;
-}
-
-/* Typography */
-.editor-heading-h1 {
- font-size: 24px;
- font-weight: 700;
- margin: 0 0 12px 0;
-}
-
-.editor-heading-h2 {
- font-size: 20px;
- font-weight: 700;
- margin: 10px 0;
-}
-
-.editor-heading-h3 {
- font-size: 18px;
- font-weight: 600;
- margin: 8px 0;
-}
-
-.editor-heading-h4 {
- font-size: 16px;
- font-weight: 600;
- margin: 8px 0;
-}
-
-.editor-heading-h5 {
- font-size: 14px;
- font-weight: 600;
- margin: 8px 0;
-}
-
-.editor-quote {
- margin: 0;
- margin-left: 20px;
- padding-left: 16px;
- border-left: 4px solid hsl(var(--solid-b));
- color: hsl(var(--tertiary));
-}
-
-.editor-list-ol {
- padding: 0;
- margin: 0 0 0 16px;
- list-style-type: decimal;
- display: block;
- counter-reset: li;
-}
-
-.editor-list-ul {
- padding: 0;
- margin: 0 0 0 16px;
- list-style-type: disc;
- display: block;
-}
-
-.editor-listitem {
- margin: 8px 0 0 0;
- display: list-item;
- position: relative;
- padding-left: 8px;
-}
-
-/* Ensure list items display consistently across browsers */
-li.editor-listitem::marker {
- font-weight: normal;
- color: inherit;
-}
-
-/* Specifically for ordered lists */
-ol.editor-list-ol > .editor-listitem {
- list-style-type: decimal;
- list-style-position: outside;
-}
-
-/* For nested ordered lists */
-ol.editor-list-ol ol.editor-list-ol > .editor-listitem {
- list-style-type: lower-alpha;
-}
-
-.editor-listitem--checked,
-.editor-listitem--unchecked {
- position: relative;
- margin-left: 0;
- padding-left: 24px;
- list-style-type: none;
-}
-
-.editor-listitem--checked:before,
-.editor-listitem--unchecked:before {
- content: '';
- width: 16px;
- height: 16px;
- position: absolute;
- left: 0;
- top: 2px;
- background-size: 16px;
- background-position: center;
- background-repeat: no-repeat;
-}
-
-.editor-listitem--checked:before {
- background-image: url('data:image/svg+xml;utf8,');
-}
-
-.editor-listitem--unchecked:before {
- background-image: url('data:image/svg+xml;utf8,');
-}
-
-.editor-nested-listitem {
- list-style-type: none;
-}
-
-/* Text formatting */
-.editor-text-bold {
- font-weight: bold;
-}
-
-.editor-text-italic {
- font-style: italic;
-}
-
-.editor-text-underline {
- text-decoration: underline;
-}
-
-.editor-text-strikethrough {
- text-decoration: line-through;
-}
-
-.editor-text-underlineStrikethrough {
- text-decoration: underline line-through;
-}
-
-.editor-text-code {
- background-color: hsl(var(--invert-bg));
- padding: 1px 4px;
- border-radius: 4px;
- font-family: monospace;
-}
-
-.editor-link {
- color: hsl(var(--primary));
- text-decoration: underline;
-}
-
-.editor-code {
- background-color: hsl(var(--invert-bg));
- font-family: monospace;
- display: block;
- padding: 8px 16px;
- line-height: 1.6;
- font-size: 13px;
- border-radius: 0.5rem;
- margin: 8px 0;
-}
-
-/* Code highlight */
-.editor-tokenComment {
- color: slategray;
-}
-
-.editor-tokenPunctuation {
- color: #999;
-}
-
-.editor-tokenProperty {
- color: #905;
-}
-
-.editor-tokenSelector {
- color: #690;
-}
-
-.editor-tokenOperator {
- color: #9a6e3a;
-}
-
-.editor-tokenAttr {
- color: #07a;
-}
-
-.editor-tokenVariable {
- color: #e90;
-}
-
-.editor-tokenFunction {
- color: #dd4a68;
-}
diff --git a/apps/console/src/components/EditableField.tsx b/apps/console/src/components/EditableField.tsx
deleted file mode 100644
index f0045828f..000000000
--- a/apps/console/src/components/EditableField.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import { HelpCircle } from "lucide-react";
-import { Label } from "./ui/label";
-import { Textarea } from "./ui/textarea";
-import { Input } from "./ui/input";
-import { cn } from "@/lib/utils";
-
-export function EditableField({
- label,
- value,
- onChange,
- type = "text",
- helpText,
- required,
- multiline = false,
-}: {
- label: string;
- value: string;
- onChange: (value: string) => void;
- type?: string;
- helpText?: string;
- required?: boolean;
- multiline?: boolean;
-}) {
- return (
-
-
-
- {helpText && (
-
-
- {helpText}
-
- )}
-
- {multiline ? (
-
- );
-}
diff --git a/apps/console/src/components/ErrorBoundary.tsx b/apps/console/src/components/ErrorBoundary.tsx
deleted file mode 100644
index 094f3e378..000000000
--- a/apps/console/src/components/ErrorBoundary.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Component, ErrorInfo, ReactNode } from "react";
-import { ErrorPage } from "@/pages/ErrorPage";
-import { UnAuthenticatedError } from "@/RelayEnvironment";
-import { Navigate } from "react-router";
-
-interface ErrorBoundaryProps {
- children: ReactNode;
- fallback?: ReactNode;
-}
-
-interface ErrorBoundaryState {
- hasError: boolean;
- error?: Error;
- isUnAuthenticated: boolean;
-}
-
-class ErrorBoundary extends Component {
- constructor(props: ErrorBoundaryProps) {
- super(props);
- this.state = { hasError: false, isUnAuthenticated: false };
- }
-
- static getDerivedStateFromError(error: Error): ErrorBoundaryState {
- if (error instanceof UnAuthenticatedError) {
- return { hasError: true, error, isUnAuthenticated: true };
- }
- return { hasError: true, error, isUnAuthenticated: false };
- }
-
- componentDidCatch(error: Error, info: ErrorInfo): void {
- console.error("ErrorBoundary caught an error:", error);
- console.error("Error info:", info.componentStack);
- }
-
- render(): ReactNode {
- if (this.state.isUnAuthenticated) {
- return ;
- }
-
- if (this.state.hasError) {
- if (this.props.fallback) {
- return this.props.fallback;
- }
- return ;
- }
-
- return this.props.children;
- }
-}
-
-export default ErrorBoundary;
diff --git a/apps/console2/src/components/FrameworkLogo.tsx b/apps/console/src/components/FrameworkLogo.tsx
similarity index 100%
rename from apps/console2/src/components/FrameworkLogo.tsx
rename to apps/console/src/components/FrameworkLogo.tsx
diff --git a/apps/console/src/components/NavMain.tsx b/apps/console/src/components/NavMain.tsx
deleted file mode 100644
index e6916c498..000000000
--- a/apps/console/src/components/NavMain.tsx
+++ /dev/null
@@ -1,210 +0,0 @@
-"use client";
-
-import {
- ChevronRight,
- SquareCheck,
- Inbox,
- Store,
- type LucideIcon,
- Flame,
- BookOpen,
- FileText,
- Settings,
- Users,
- Box,
- Database
-} from "lucide-react";
-import { Link, useLocation, useParams } from "react-router";
-
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from "@/components/ui/collapsible";
-import {
- SidebarGroup,
- SidebarMenu,
- SidebarMenuAction,
- SidebarMenuButton,
- SidebarMenuItem,
- SidebarMenuSub,
- SidebarMenuSubButton,
- SidebarMenuSubItem,
-} from "@/components/ui/sidebar";
-
-interface NavItem {
- title: string;
- url?: string;
- icon: LucideIcon;
- isActive?: boolean;
- items?: {
- title: string;
- url: string;
- icon: LucideIcon;
- }[];
-}
-
-export function NavMain() {
- const location = useLocation();
- const { organizationId } = useParams();
- const items: NavItem[] = getNavItems(organizationId);
-
- if (!organizationId) {
- return null;
- }
-
- const isItemActive = (item: { url?: string; items?: { url: string }[] }) => {
- if (item.url && location.pathname.startsWith(item.url)) {
- return true;
- }
-
- if (item.items?.length) {
- return item.items.some((subItem) =>
- location.pathname.startsWith(subItem.url),
- );
- }
-
- return false;
- };
-
- return (
-
-
- {items.map((item) => {
- const active = isItemActive(item) || item.isActive;
-
- return (
-
-
-
-
-
- {item.title}
-
-
- {item.items?.length ? (
- <>
-
-
-
- Toggle
-
-
-
-
- {item.items?.map((subItem) => {
- const subItemActive = location.pathname.startsWith(
- subItem.url,
- );
-
- return (
-
-
-
-
-
- {subItem.title}
-
-
-
-
- );
- })}
-
-
- >
- ) : null}
-
-
- );
- })}
-
-
- );
-}
-
-function getNavItems(organizationId?: string): NavItem[] {
- return [
- {
- title: "Tasks",
- icon: Inbox,
- url: organizationId
- ? `/organizations/${organizationId}/tasks`
- : undefined,
- },
- {
- title: "Measures",
- icon: SquareCheck,
- url: organizationId
- ? `/organizations/${organizationId}/measures`
- : undefined,
- },
- {
- title: "Risks",
- icon: Flame,
- url: organizationId
- ? `/organizations/${organizationId}/risks`
- : undefined,
- },
- {
- title: "Frameworks",
- url: organizationId
- ? `/organizations/${organizationId}/frameworks`
- : undefined,
- icon: BookOpen,
- },
- {
- title: "People",
- url: `/organizations/${organizationId}/people`,
- icon: Users,
- },
- {
- title: "Vendors",
- url: `/organizations/${organizationId}/vendors`,
- icon: Store,
- },
- {
- title: "Documents",
- url: organizationId
- ? `/organizations/${organizationId}/documents`
- : undefined,
- icon: FileText,
- },
- {
- title: "Assets",
- url: organizationId
- ? `/organizations/${organizationId}/assets`
- : undefined,
- icon: Box,
- },
- {
- title: "Data",
- url: organizationId
- ? `/organizations/${organizationId}/data`
- : undefined,
- icon: Database,
- },
- {
- title: "Settings",
- url: organizationId
- ? `/organizations/${organizationId}/settings`
- : undefined,
- icon: Settings,
- },
- ];
-}
diff --git a/apps/console/src/components/NavMainSkeleton.tsx b/apps/console/src/components/NavMainSkeleton.tsx
deleted file mode 100644
index a813b64ca..000000000
--- a/apps/console/src/components/NavMainSkeleton.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-"use client";
-
-import {
- SidebarGroup,
- SidebarGroupLabel,
- SidebarMenu,
- SidebarMenuButton,
- SidebarMenuItem,
-} from "@/components/ui/sidebar";
-
-export function NavMainSkeleton() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console/src/components/NavSecondary.tsx b/apps/console/src/components/NavSecondary.tsx
deleted file mode 100644
index 82914a09a..000000000
--- a/apps/console/src/components/NavSecondary.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import * as React from "react";
-
-import { LifeBuoy, Send } from "lucide-react";
-import {
- SidebarGroup,
- SidebarGroupContent,
- SidebarMenu,
- SidebarMenuButton,
- SidebarMenuItem,
-} from "@/components/ui/sidebar";
-
-const navItems = [
- {
- title: "Support",
- url: "mailto:support@getprobo.com",
- icon: LifeBuoy,
- },
- {
- title: "Feedback",
- url: "#",
- icon: Send,
- },
-];
-
-export function NavSecondary(
- props: React.ComponentPropsWithoutRef,
-) {
- return (
-
-
-
- {navItems.map((item) => (
-
-
- {item.url !== "#" ? (
-
-
- {item.title}
-
- ) : (
- <>
-
- {item.title}
- >
- )}
-
-
- ))}
-
-
-
- );
-}
diff --git a/apps/console/src/components/NavUser.tsx b/apps/console/src/components/NavUser.tsx
deleted file mode 100644
index 22f964662..000000000
--- a/apps/console/src/components/NavUser.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-"use client";
-
-import { ChevronsUpDown, LogOut } from "lucide-react";
-import { graphql, useFragment } from "react-relay";
-
-import { Avatar, AvatarFallback } from "@/components/ui/avatar";
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import {
- SidebarMenu,
- SidebarMenuButton,
- SidebarMenuItem,
- useSidebar,
-} from "@/components/ui/sidebar";
-import { NavUser_viewer$key } from "./__generated__/NavUser_viewer.graphql";
-import { buildEndpoint } from "@/utils";
-
-export const navUserFragment = graphql`
- fragment NavUser_viewer on Viewer {
- user {
- id
- fullName
- email
- }
- }
-`;
-
-export function NavUser({ viewer }: { viewer: NavUser_viewer$key }) {
- const { isMobile } = useSidebar();
- const currentUser = useFragment(navUserFragment, viewer).user;
-
- const handleLogout = async () => {
- fetch(buildEndpoint("/api/console/v1/auth/logout"), {
- method: "DELETE",
- credentials: "include",
- }).then(() => {
- window.location.href = "https://www.getprobo.com";
- });
- };
-
- return (
-
-
-
-
-
-
-
- {currentUser.fullName.substring(0, 2).toUpperCase()}
-
-
-
-
- {currentUser.fullName}
-
-
- {currentUser.email}
-
-
-
-
-
-
-
-
-
-
- {currentUser.fullName.substring(0, 2).toUpperCase()}
-
-
-
-
- {currentUser.fullName}
-
- {currentUser.email}
-
-
-
-
-
-
- Log out
-
-
-
-
-
- );
-}
diff --git a/apps/console/src/components/NavUserSkeleton.tsx b/apps/console/src/components/NavUserSkeleton.tsx
deleted file mode 100644
index 2f0b64e52..000000000
--- a/apps/console/src/components/NavUserSkeleton.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-"use client";
-
-import {
- SidebarMenu,
- SidebarMenuButton,
- SidebarMenuItem,
-} from "@/components/ui/sidebar";
-
-export function NavUserSkeleton() {
- return (
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console/src/components/OrganizationSwitcher.tsx b/apps/console/src/components/OrganizationSwitcher.tsx
deleted file mode 100644
index 9e43d8903..000000000
--- a/apps/console/src/components/OrganizationSwitcher.tsx
+++ /dev/null
@@ -1,180 +0,0 @@
-"use client";
-
-import { useState, useEffect } from "react";
-import { ChevronsUpDown, Plus } from "lucide-react";
-import { graphql, useFragment } from "react-relay";
-import { Link, useNavigate, useParams } from "react-router";
-
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuShortcut,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import {
- SidebarMenu,
- SidebarMenuButton,
- SidebarMenuItem,
- useSidebar,
-} from "@/components/ui/sidebar";
-import {
- OrganizationSwitcher_organizations$key,
- OrganizationSwitcher_organizations$data,
-} from "./__generated__/OrganizationSwitcher_organizations.graphql";
-import { cn } from "@/lib/utils";
-
-export const organizationSwitcherFragment = graphql`
- fragment OrganizationSwitcher_organizations on Viewer {
- organizations(first: 25)
- @connection(key: "OrganizationSwitcher_organizations") {
- __id
- edges {
- node {
- id
- name
- logoUrl
- }
- }
- }
- }
-`;
-
-type Organization =
- OrganizationSwitcher_organizations$data["organizations"]["edges"][0]["node"];
-
-const LogoComponent = ({
- org,
- className,
-}: {
- org: Organization;
- className?: string;
-}) => {
- if (org.logoUrl) {
- return (
-
- );
- }
-
- return org.name.substring(0, 2).toUpperCase();
-};
-
-export function OrganizationSwitcher({
- organizations,
-}: {
- organizations: OrganizationSwitcher_organizations$key;
-}) {
- const { isMobile } = useSidebar();
- const data = useFragment(organizationSwitcherFragment, organizations);
- const navigate = useNavigate();
- const { organizationId } = useParams();
- const [currentOrganization, setCurrentOrganization] =
- useState(null);
- const hasOrganizations =
- data.organizations && data.organizations.edges.length > 0;
-
- useEffect(() => {
- if (hasOrganizations) {
- const org = data.organizations.edges.find(
- (edge) => edge.node.id === organizationId,
- );
- if (org) {
- setCurrentOrganization(org.node);
- }
- }
- }, [data.organizations, organizationId, hasOrganizations]);
-
- const handleOrganizationSwitch = (org: Organization) => {
- navigate(`/organizations/${org.id}`);
- };
-
- return (
-
-
-
-
-
-
- {currentOrganization ? (
-
- ) : (
-
- )}
-
-
- {currentOrganization ? (
- <>
-
- {currentOrganization.name}
-
- >
- ) : (
-
- Select Organization
-
- )}
-
-
-
-
-
-
- Organizations
-
- {hasOrganizations &&
- data.organizations.edges.map((edge, index) => (
- handleOrganizationSwitch(edge.node)}
- className={`gap-2 p-2 ${
- edge.node.id === organizationId ? "bg-subtle-bg" : ""
- }`}
- >
-
-
-
- {edge.node.name}
- ⌘{index + 1}
-
- ))}
-
-
-
-
-
- Add organization
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console/src/components/OrganizationSwitcherSkeleton.tsx b/apps/console/src/components/OrganizationSwitcherSkeleton.tsx
deleted file mode 100644
index 642192ae1..000000000
--- a/apps/console/src/components/OrganizationSwitcherSkeleton.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-"use client";
-
-import {
- SidebarMenu,
- SidebarMenuButton,
- SidebarMenuItem,
-} from "@/components/ui/sidebar";
-
-export function OrganizationSwitcherSkeleton() {
- return (
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console/src/components/PageContainer.tsx b/apps/console/src/components/PageContainer.tsx
deleted file mode 100644
index 0b98a420c..000000000
--- a/apps/console/src/components/PageContainer.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { FC, ReactNode } from "react";
-import { Helmet } from "react-helmet-async";
-
-export interface PageContainerProps {
- children: ReactNode;
- title: string;
-}
-
-export const PageContainer: FC = ({ children, title }) => {
- return (
- <>
- {`${title} - Probo Console`}
- {children}
- >
- );
-};
-
-export const PageContainerSkeleton: FC<{
- title?: string;
- children: ReactNode;
-}> = ({ children, title }) =>
- title ? (
- {children}
- ) : (
- {children}
- );
diff --git a/apps/console2/src/components/PageError.tsx b/apps/console/src/components/PageError.tsx
similarity index 100%
rename from apps/console2/src/components/PageError.tsx
rename to apps/console/src/components/PageError.tsx
diff --git a/apps/console/src/components/PageHeader.tsx b/apps/console/src/components/PageHeader.tsx
deleted file mode 100644
index 7aed24b1c..000000000
--- a/apps/console/src/components/PageHeader.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import { cn } from "@/lib/utils";
-import { FC, ReactNode } from "react";
-
-export interface PageHeaderProps {
- title: ReactNode;
- actions?: ReactNode;
- description?: ReactNode;
-}
-
-export function PageHeaderShell({
- className,
- title,
- actions,
- description,
-}: PageHeaderProps & { className?: string }) {
- return (
-
- {actions ? (
-
- {title}
- {actions}
-
- ) : (
- title
- )}
- {description}
-
- );
-}
-
-export function PageHeader({
- className,
- title,
- actions,
- description,
-}: PageHeaderProps & { className?: string }) {
- return (
- {title}}
- description={{description}}
- actions={actions}
- />
- );
-}
-
-export function PageHeading({
- children,
- className,
-}: {
- className?: string;
- children: ReactNode;
-}) {
- return {children}
;
-}
-
-const PageHeadingSkeleton: FC = () => {
- return (
-
- );
-};
-
-export function PageDescription({
- children,
- className,
-}: {
- className?: string;
- children: ReactNode;
-}) {
- return (
-
- {children}
-
- );
-}
-
-export function PageDescriptionSkeleton() {
- return (
-
- );
-}
-
-export const PageHeaderSkeleton: FC<{
- className?: string;
- title?: string;
- actions?: ReactNode;
- description?: ReactNode;
- withDescription?: boolean;
-}> = ({ className, title, actions, description, withDescription = false }) => {
- return (
- {title} :
- }
- description={
- description ? (
- {description}
- ) : withDescription ? (
-
- ) : null
- }
- actions={actions}
- />
- );
-};
diff --git a/apps/console/src/components/PageTemplate.tsx b/apps/console/src/components/PageTemplate.tsx
deleted file mode 100644
index 02445a636..000000000
--- a/apps/console/src/components/PageTemplate.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { FC, ReactNode } from "react";
-import {
- PageContainer,
- PageContainerProps,
- PageContainerSkeleton,
-} from "./PageContainer";
-import { PageHeader, PageHeaderProps, PageHeaderSkeleton } from "./PageHeader";
-
-export const PageTemplate: FC = ({
- actions,
- title,
- description,
- children,
-}) => {
- return (
-
-
- {children}
-
- );
-};
-
-export const PageTemplateSkeleton: FC<{
- title?: string;
- description?: ReactNode;
- withDescription?: boolean;
- actions?: ReactNode;
- children: ReactNode;
-}> = ({ actions, children, description, withDescription = false, title }) => {
- return (
-
-
- {children}
-
- );
-};
diff --git a/apps/console/src/components/PeopleSelector.tsx b/apps/console/src/components/PeopleSelector.tsx
deleted file mode 100644
index bc3482b89..000000000
--- a/apps/console/src/components/PeopleSelector.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import { useState, useEffect } from "react";
-import { graphql, useFragment } from "react-relay";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@/components/ui/select";
-import { PeopleSelector_organization$key } from "./__generated__/PeopleSelector_organization.graphql";
-
-const peopleSelectorFragment = graphql`
- fragment PeopleSelector_organization on Organization {
- id
- peoples(first: 100, orderBy: { direction: ASC, field: FULL_NAME })
- @connection(key: "PeopleSelector_organization_peoples") {
- edges {
- node {
- id
- fullName
- primaryEmailAddress
- }
- }
- }
- }
-`;
-
-interface PeopleSelectorProps {
- organizationRef: PeopleSelector_organization$key;
- selectedPersonId: string | null;
- onSelect: (personId: string) => void;
- placeholder?: string;
- required?: boolean;
-}
-
-export default function PeopleSelector({
- organizationRef,
- selectedPersonId,
- onSelect,
- placeholder = "Select a person",
- required = false,
-}: PeopleSelectorProps) {
- const organization = useFragment(peopleSelectorFragment, organizationRef);
- const [value, setValue] = useState(selectedPersonId || "");
-
- useEffect(() => {
- if (selectedPersonId) {
- setValue(selectedPersonId);
- }
- }, [selectedPersonId]);
-
- const handleValueChange = (newValue: string) => {
- setValue(newValue);
- onSelect(newValue);
- };
-
- return (
-
- );
-}
diff --git a/apps/console2/src/components/SortableTable.tsx b/apps/console/src/components/SortableTable.tsx
similarity index 100%
rename from apps/console2/src/components/SortableTable.tsx
rename to apps/console/src/components/SortableTable.tsx
diff --git a/apps/console/src/components/VisitorErrorBoundary.tsx b/apps/console/src/components/VisitorErrorBoundary.tsx
deleted file mode 100644
index f5ee8ea6d..000000000
--- a/apps/console/src/components/VisitorErrorBoundary.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Component, ErrorInfo, ReactNode } from "react";
-import { ErrorPage } from "@/pages/ErrorPage";
-import { UnAuthenticatedError } from "@/RelayEnvironment";
-
-interface ErrorBoundaryProps {
- children: ReactNode;
- fallback?: ReactNode;
-}
-
-interface ErrorBoundaryState {
- hasError: boolean;
- error?: Error;
-}
-
-class VisitorErrorBoundary extends Component<
- ErrorBoundaryProps,
- ErrorBoundaryState
-> {
- constructor(props: ErrorBoundaryProps) {
- super(props);
- this.state = { hasError: false };
- }
-
- static getDerivedStateFromError(error: Error): ErrorBoundaryState {
- if (error instanceof UnAuthenticatedError) {
- return { hasError: false, error: undefined };
- }
- return { hasError: true, error };
- }
-
- componentDidCatch(error: Error, info: ErrorInfo): void {
- console.error("ErrorBoundary caught an error:", error);
- console.error("Error info:", info.componentStack);
- }
-
- render(): ReactNode {
- if (this.state.hasError) {
- if (this.props.fallback) {
- return this.props.fallback;
- }
- return ;
- }
-
- return this.props.children;
- }
-}
-
-export default VisitorErrorBoundary;
diff --git a/apps/console/src/components/__generated__/AppSidebarQuery.graphql.ts b/apps/console/src/components/__generated__/AppSidebarQuery.graphql.ts
deleted file mode 100644
index 59553f74b..000000000
--- a/apps/console/src/components/__generated__/AppSidebarQuery.graphql.ts
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * @generated SignedSource<<72d01b98680bc82c2d5bdc8c2fa2d49d>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type AppSidebarQuery$variables = Record;
-export type AppSidebarQuery$data = {
- readonly viewer: {
- readonly id: string;
- readonly " $fragmentSpreads": FragmentRefs<"NavUser_viewer" | "OrganizationSwitcher_organizations">;
- };
-};
-export type AppSidebarQuery = {
- response: AppSidebarQuery$data;
- variables: AppSidebarQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v1 = [
- {
- "kind": "Literal",
- "name": "first",
- "value": 25
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": [],
- "kind": "Fragment",
- "metadata": null,
- "name": "AppSidebarQuery",
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Viewer",
- "kind": "LinkedField",
- "name": "viewer",
- "plural": false,
- "selections": [
- (v0/*: any*/),
- {
- "args": null,
- "kind": "FragmentSpread",
- "name": "OrganizationSwitcher_organizations"
- },
- {
- "args": null,
- "kind": "FragmentSpread",
- "name": "NavUser_viewer"
- }
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [],
- "kind": "Operation",
- "name": "AppSidebarQuery",
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Viewer",
- "kind": "LinkedField",
- "name": "viewer",
- "plural": false,
- "selections": [
- (v0/*: any*/),
- {
- "alias": null,
- "args": (v1/*: any*/),
- "concreteType": "OrganizationConnection",
- "kind": "LinkedField",
- "name": "organizations",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "OrganizationEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Organization",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v0/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "logoUrl",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "kind": "ClientExtension",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__id",
- "storageKey": null
- }
- ]
- }
- ],
- "storageKey": "organizations(first:25)"
- },
- {
- "alias": null,
- "args": (v1/*: any*/),
- "filters": null,
- "handle": "connection",
- "key": "OrganizationSwitcher_organizations",
- "kind": "LinkedHandle",
- "name": "organizations"
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "User",
- "kind": "LinkedField",
- "name": "user",
- "plural": false,
- "selections": [
- (v0/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "email",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "51c72d5d6b9e1d4e5e7f45e7280a0534",
- "id": null,
- "metadata": {},
- "name": "AppSidebarQuery",
- "operationKind": "query",
- "text": "query AppSidebarQuery {\n viewer {\n id\n ...OrganizationSwitcher_organizations\n ...NavUser_viewer\n }\n}\n\nfragment NavUser_viewer on Viewer {\n user {\n id\n fullName\n email\n }\n}\n\nfragment OrganizationSwitcher_organizations on Viewer {\n organizations(first: 25) {\n edges {\n node {\n id\n name\n logoUrl\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "ebe1f481a1454380e017fb976b8bb8a5";
-
-export default node;
diff --git a/apps/console/src/components/__generated__/NavUser_viewer.graphql.ts b/apps/console/src/components/__generated__/NavUser_viewer.graphql.ts
deleted file mode 100644
index a8d189d25..000000000
--- a/apps/console/src/components/__generated__/NavUser_viewer.graphql.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @generated SignedSource<<0d5ada0f912fcf3a8f2f3328b0943b28>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ReaderFragment } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type NavUser_viewer$data = {
- readonly user: {
- readonly email: string;
- readonly fullName: string;
- readonly id: string;
- };
- readonly " $fragmentType": "NavUser_viewer";
-};
-export type NavUser_viewer$key = {
- readonly " $data"?: NavUser_viewer$data;
- readonly " $fragmentSpreads": FragmentRefs<"NavUser_viewer">;
-};
-
-const node: ReaderFragment = {
- "argumentDefinitions": [],
- "kind": "Fragment",
- "metadata": null,
- "name": "NavUser_viewer",
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "User",
- "kind": "LinkedField",
- "name": "user",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "email",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "type": "Viewer",
- "abstractKey": null
-};
-
-(node as any).hash = "05e26e238976738b4cff26f37c5f29e7";
-
-export default node;
diff --git a/apps/console/src/components/__generated__/OrganizationSwitcher_organizations.graphql.ts b/apps/console/src/components/__generated__/OrganizationSwitcher_organizations.graphql.ts
deleted file mode 100644
index 13a143c2e..000000000
--- a/apps/console/src/components/__generated__/OrganizationSwitcher_organizations.graphql.ts
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * @generated SignedSource<<152991faff70c7ef6c4751fac48090be>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ReaderFragment } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type OrganizationSwitcher_organizations$data = {
- readonly organizations: {
- readonly __id: string;
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly logoUrl: string | null | undefined;
- readonly name: string;
- };
- }>;
- };
- readonly " $fragmentType": "OrganizationSwitcher_organizations";
-};
-export type OrganizationSwitcher_organizations$key = {
- readonly " $data"?: OrganizationSwitcher_organizations$data;
- readonly " $fragmentSpreads": FragmentRefs<"OrganizationSwitcher_organizations">;
-};
-
-const node: ReaderFragment = {
- "argumentDefinitions": [],
- "kind": "Fragment",
- "metadata": {
- "connection": [
- {
- "count": null,
- "cursor": null,
- "direction": "forward",
- "path": [
- "organizations"
- ]
- }
- ]
- },
- "name": "OrganizationSwitcher_organizations",
- "selections": [
- {
- "alias": "organizations",
- "args": null,
- "concreteType": "OrganizationConnection",
- "kind": "LinkedField",
- "name": "__OrganizationSwitcher_organizations_connection",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "OrganizationEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Organization",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "logoUrl",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "kind": "ClientExtension",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__id",
- "storageKey": null
- }
- ]
- }
- ],
- "storageKey": null
- }
- ],
- "type": "Viewer",
- "abstractKey": null
-};
-
-(node as any).hash = "4bc97175bc64a6c7554a6ec865d12850";
-
-export default node;
diff --git a/apps/console/src/components/__generated__/PeopleSelector_organization.graphql.ts b/apps/console/src/components/__generated__/PeopleSelector_organization.graphql.ts
deleted file mode 100644
index 10e9d2971..000000000
--- a/apps/console/src/components/__generated__/PeopleSelector_organization.graphql.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ReaderFragment } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type PeopleSelector_organization$data = {
- readonly id: string;
- readonly peoples: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly fullName: string;
- readonly id: string;
- readonly primaryEmailAddress: string;
- };
- }>;
- };
- readonly " $fragmentType": "PeopleSelector_organization";
-};
-export type PeopleSelector_organization$key = {
- readonly " $data"?: PeopleSelector_organization$data;
- readonly " $fragmentSpreads": FragmentRefs<"PeopleSelector_organization">;
-};
-
-const node: ReaderFragment = (function(){
-var v0 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-};
-return {
- "argumentDefinitions": [],
- "kind": "Fragment",
- "metadata": {
- "connection": [
- {
- "count": null,
- "cursor": null,
- "direction": "forward",
- "path": [
- "peoples"
- ]
- }
- ]
- },
- "name": "PeopleSelector_organization",
- "selections": [
- (v0/*: any*/),
- {
- "alias": "peoples",
- "args": [
- {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "FULL_NAME"
- }
- }
- ],
- "concreteType": "PeopleConnection",
- "kind": "LinkedField",
- "name": "__PeopleSelector_organization_peoples_connection",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "PeopleEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v0/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "primaryEmailAddress",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": "__PeopleSelector_organization_peoples_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
- }
- ],
- "type": "Organization",
- "abstractKey": null
-};
-})();
-
-(node as any).hash = "77094e387ff3e5dca822fc2360094744";
-
-export default node;
diff --git a/apps/console2/src/components/controls/LinkedControlsCard.tsx b/apps/console/src/components/controls/LinkedControlsCard.tsx
similarity index 100%
rename from apps/console2/src/components/controls/LinkedControlsCard.tsx
rename to apps/console/src/components/controls/LinkedControlsCard.tsx
diff --git a/apps/console2/src/components/controls/LinkedControlsDialog.tsx b/apps/console/src/components/controls/LinkedControlsDialog.tsx
similarity index 100%
rename from apps/console2/src/components/controls/LinkedControlsDialog.tsx
rename to apps/console/src/components/controls/LinkedControlsDialog.tsx
diff --git a/apps/console2/src/components/controls/__generated__/LinkedControlsCardFragment.graphql.ts b/apps/console/src/components/controls/__generated__/LinkedControlsCardFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/controls/__generated__/LinkedControlsCardFragment.graphql.ts
rename to apps/console/src/components/controls/__generated__/LinkedControlsCardFragment.graphql.ts
diff --git a/apps/console2/src/components/controls/__generated__/LinkedControlsDialogControlsQuery.graphql.ts b/apps/console/src/components/controls/__generated__/LinkedControlsDialogControlsQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/components/controls/__generated__/LinkedControlsDialogControlsQuery.graphql.ts
rename to apps/console/src/components/controls/__generated__/LinkedControlsDialogControlsQuery.graphql.ts
diff --git a/apps/console2/src/components/controls/__generated__/LinkedControlsDialogFragment.graphql.ts b/apps/console/src/components/controls/__generated__/LinkedControlsDialogFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/controls/__generated__/LinkedControlsDialogFragment.graphql.ts
rename to apps/console/src/components/controls/__generated__/LinkedControlsDialogFragment.graphql.ts
diff --git a/apps/console2/src/components/controls/__generated__/LinkedControlsDialogQuery.graphql.ts b/apps/console/src/components/controls/__generated__/LinkedControlsDialogQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/components/controls/__generated__/LinkedControlsDialogQuery.graphql.ts
rename to apps/console/src/components/controls/__generated__/LinkedControlsDialogQuery.graphql.ts
diff --git a/apps/console2/src/components/documentSigning/ProgressBar.tsx b/apps/console/src/components/documentSigning/ProgressBar.tsx
similarity index 100%
rename from apps/console2/src/components/documentSigning/ProgressBar.tsx
rename to apps/console/src/components/documentSigning/ProgressBar.tsx
diff --git a/apps/console2/src/components/documents/LinkedDocumentsCard.tsx b/apps/console/src/components/documents/LinkedDocumentsCard.tsx
similarity index 100%
rename from apps/console2/src/components/documents/LinkedDocumentsCard.tsx
rename to apps/console/src/components/documents/LinkedDocumentsCard.tsx
diff --git a/apps/console2/src/components/documents/LinkedDocumentsDialog.tsx b/apps/console/src/components/documents/LinkedDocumentsDialog.tsx
similarity index 100%
rename from apps/console2/src/components/documents/LinkedDocumentsDialog.tsx
rename to apps/console/src/components/documents/LinkedDocumentsDialog.tsx
diff --git a/apps/console2/src/components/documents/__generated__/LinkedDocumentsCardFragment.graphql.ts b/apps/console/src/components/documents/__generated__/LinkedDocumentsCardFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/documents/__generated__/LinkedDocumentsCardFragment.graphql.ts
rename to apps/console/src/components/documents/__generated__/LinkedDocumentsCardFragment.graphql.ts
diff --git a/apps/console2/src/components/documents/__generated__/LinkedDocumentsDialogFragment.graphql.ts b/apps/console/src/components/documents/__generated__/LinkedDocumentsDialogFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/documents/__generated__/LinkedDocumentsDialogFragment.graphql.ts
rename to apps/console/src/components/documents/__generated__/LinkedDocumentsDialogFragment.graphql.ts
diff --git a/apps/console2/src/components/documents/__generated__/LinkedDocumentsDialogQuery.graphql.ts b/apps/console/src/components/documents/__generated__/LinkedDocumentsDialogQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/components/documents/__generated__/LinkedDocumentsDialogQuery.graphql.ts
rename to apps/console/src/components/documents/__generated__/LinkedDocumentsDialogQuery.graphql.ts
diff --git a/apps/console2/src/components/documents/__generated__/LinkedDocumentsDialogQuery_fragment.graphql.ts b/apps/console/src/components/documents/__generated__/LinkedDocumentsDialogQuery_fragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/documents/__generated__/LinkedDocumentsDialogQuery_fragment.graphql.ts
rename to apps/console/src/components/documents/__generated__/LinkedDocumentsDialogQuery_fragment.graphql.ts
diff --git a/apps/console2/src/components/form/ControlledField.tsx b/apps/console/src/components/form/ControlledField.tsx
similarity index 100%
rename from apps/console2/src/components/form/ControlledField.tsx
rename to apps/console/src/components/form/ControlledField.tsx
diff --git a/apps/console2/src/components/form/EmailsField.tsx b/apps/console/src/components/form/EmailsField.tsx
similarity index 100%
rename from apps/console2/src/components/form/EmailsField.tsx
rename to apps/console/src/components/form/EmailsField.tsx
diff --git a/apps/console2/src/components/form/MeasureSelectField.tsx b/apps/console/src/components/form/MeasureSelectField.tsx
similarity index 100%
rename from apps/console2/src/components/form/MeasureSelectField.tsx
rename to apps/console/src/components/form/MeasureSelectField.tsx
diff --git a/apps/console2/src/components/form/PeopleSelectField.tsx b/apps/console/src/components/form/PeopleSelectField.tsx
similarity index 100%
rename from apps/console2/src/components/form/PeopleSelectField.tsx
rename to apps/console/src/components/form/PeopleSelectField.tsx
diff --git a/apps/console2/src/components/form/VendorsMultiSelectField.tsx b/apps/console/src/components/form/VendorsMultiSelectField.tsx
similarity index 100%
rename from apps/console2/src/components/form/VendorsMultiSelectField.tsx
rename to apps/console/src/components/form/VendorsMultiSelectField.tsx
diff --git a/apps/console2/src/components/measures/LinkedMeasuresCard.tsx b/apps/console/src/components/measures/LinkedMeasuresCard.tsx
similarity index 100%
rename from apps/console2/src/components/measures/LinkedMeasuresCard.tsx
rename to apps/console/src/components/measures/LinkedMeasuresCard.tsx
diff --git a/apps/console2/src/components/measures/LinkedMeasuresDialog.tsx b/apps/console/src/components/measures/LinkedMeasuresDialog.tsx
similarity index 100%
rename from apps/console2/src/components/measures/LinkedMeasuresDialog.tsx
rename to apps/console/src/components/measures/LinkedMeasuresDialog.tsx
diff --git a/apps/console2/src/components/measures/__generated__/LinkedMeasuresCardFragment.graphql.ts b/apps/console/src/components/measures/__generated__/LinkedMeasuresCardFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/measures/__generated__/LinkedMeasuresCardFragment.graphql.ts
rename to apps/console/src/components/measures/__generated__/LinkedMeasuresCardFragment.graphql.ts
diff --git a/apps/console2/src/components/organizations/InviteUserDialog.tsx b/apps/console/src/components/organizations/InviteUserDialog.tsx
similarity index 100%
rename from apps/console2/src/components/organizations/InviteUserDialog.tsx
rename to apps/console/src/components/organizations/InviteUserDialog.tsx
diff --git a/apps/console2/src/components/organizations/__generated__/InviteUserDialogMutation.graphql.ts b/apps/console/src/components/organizations/__generated__/InviteUserDialogMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/components/organizations/__generated__/InviteUserDialogMutation.graphql.ts
rename to apps/console/src/components/organizations/__generated__/InviteUserDialogMutation.graphql.ts
diff --git a/apps/console2/src/components/risks/LinkedRisksCard.tsx b/apps/console/src/components/risks/LinkedRisksCard.tsx
similarity index 100%
rename from apps/console2/src/components/risks/LinkedRisksCard.tsx
rename to apps/console/src/components/risks/LinkedRisksCard.tsx
diff --git a/apps/console2/src/components/risks/LinkedRisksDialog.tsx b/apps/console/src/components/risks/LinkedRisksDialog.tsx
similarity index 100%
rename from apps/console2/src/components/risks/LinkedRisksDialog.tsx
rename to apps/console/src/components/risks/LinkedRisksDialog.tsx
diff --git a/apps/console2/src/components/risks/__generated__/LinkedRisksCardFragment.graphql.ts b/apps/console/src/components/risks/__generated__/LinkedRisksCardFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/risks/__generated__/LinkedRisksCardFragment.graphql.ts
rename to apps/console/src/components/risks/__generated__/LinkedRisksCardFragment.graphql.ts
diff --git a/apps/console2/src/components/risks/__generated__/LinkedRisksDialogQuery.graphql.ts b/apps/console/src/components/risks/__generated__/LinkedRisksDialogQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/components/risks/__generated__/LinkedRisksDialogQuery.graphql.ts
rename to apps/console/src/components/risks/__generated__/LinkedRisksDialogQuery.graphql.ts
diff --git a/apps/console2/src/components/skeletons/PageSkeleton.tsx b/apps/console/src/components/skeletons/PageSkeleton.tsx
similarity index 100%
rename from apps/console2/src/components/skeletons/PageSkeleton.tsx
rename to apps/console/src/components/skeletons/PageSkeleton.tsx
diff --git a/apps/console2/src/components/skeletons/RisksPageSkeleton.tsx b/apps/console/src/components/skeletons/RisksPageSkeleton.tsx
similarity index 100%
rename from apps/console2/src/components/skeletons/RisksPageSkeleton.tsx
rename to apps/console/src/components/skeletons/RisksPageSkeleton.tsx
diff --git a/apps/console2/src/components/tasks/TaskFormDialog.tsx b/apps/console/src/components/tasks/TaskFormDialog.tsx
similarity index 100%
rename from apps/console2/src/components/tasks/TaskFormDialog.tsx
rename to apps/console/src/components/tasks/TaskFormDialog.tsx
diff --git a/apps/console2/src/components/tasks/TasksCard.tsx b/apps/console/src/components/tasks/TasksCard.tsx
similarity index 100%
rename from apps/console2/src/components/tasks/TasksCard.tsx
rename to apps/console/src/components/tasks/TasksCard.tsx
diff --git a/apps/console2/src/components/tasks/__generated__/TaskFormDialogCreateMutation.graphql.ts b/apps/console/src/components/tasks/__generated__/TaskFormDialogCreateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/components/tasks/__generated__/TaskFormDialogCreateMutation.graphql.ts
rename to apps/console/src/components/tasks/__generated__/TaskFormDialogCreateMutation.graphql.ts
diff --git a/apps/console2/src/components/tasks/__generated__/TaskFormDialogFragment.graphql.ts b/apps/console/src/components/tasks/__generated__/TaskFormDialogFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/components/tasks/__generated__/TaskFormDialogFragment.graphql.ts
rename to apps/console/src/components/tasks/__generated__/TaskFormDialogFragment.graphql.ts
diff --git a/apps/console2/src/components/tasks/__generated__/TaskFormDialogUpdateMutation.graphql.ts b/apps/console/src/components/tasks/__generated__/TaskFormDialogUpdateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/components/tasks/__generated__/TaskFormDialogUpdateMutation.graphql.ts
rename to apps/console/src/components/tasks/__generated__/TaskFormDialogUpdateMutation.graphql.ts
diff --git a/apps/console2/src/components/tasks/__generated__/TasksCardDeleteMutation.graphql.ts b/apps/console/src/components/tasks/__generated__/TasksCardDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/components/tasks/__generated__/TasksCardDeleteMutation.graphql.ts
rename to apps/console/src/components/tasks/__generated__/TasksCardDeleteMutation.graphql.ts
diff --git a/apps/console/src/components/ui/avatar.tsx b/apps/console/src/components/ui/avatar.tsx
deleted file mode 100644
index 92a931254..000000000
--- a/apps/console/src/components/ui/avatar.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import * as React from "react";
-import * as AvatarPrimitive from "@radix-ui/react-avatar";
-
-import { cn } from "@/lib/utils";
-
-const Avatar = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-Avatar.displayName = AvatarPrimitive.Root.displayName;
-
-const AvatarImage = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-AvatarImage.displayName = AvatarPrimitive.Image.displayName;
-
-const AvatarFallback = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
-
-export { Avatar, AvatarImage, AvatarFallback };
diff --git a/apps/console/src/components/ui/badge.tsx b/apps/console/src/components/ui/badge.tsx
deleted file mode 100644
index d8a5cf671..000000000
--- a/apps/console/src/components/ui/badge.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import * as React from "react";
-import { cva, type VariantProps } from "class-variance-authority";
-
-import { cn } from "@/lib/utils";
-
-const badgeVariants = cva(
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-active-b focus:ring-offset-2",
- {
- variants: {
- variant: {
- default: "bg-primary-bg text-invert",
- secondary: "bg-secondary-bg border border-low-b",
- info: "bg-info-bg text-info border-info-b",
- success: "bg-success-bg text-success border-success-b",
- warning: "bg-warning-bg text-warning border-warning-b",
- destructive: "bg-danger-bg text-danger border-danger-b",
- outline: "",
- },
- },
- defaultVariants: {
- variant: "default",
- },
- },
-);
-
-export interface BadgeProps
- extends React.HTMLAttributes,
- VariantProps {}
-
-function Badge({ className, variant, ...props }: BadgeProps) {
- return (
-
- );
-}
-
-export { Badge, badgeVariants };
diff --git a/apps/console/src/components/ui/breadcrumb.tsx b/apps/console/src/components/ui/breadcrumb.tsx
deleted file mode 100644
index eabecb7a6..000000000
--- a/apps/console/src/components/ui/breadcrumb.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import * as React from "react";
-import { Slot } from "@radix-ui/react-slot";
-import { MoreHorizontal } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-const Breadcrumb = React.forwardRef<
- HTMLElement,
- React.ComponentPropsWithoutRef<"nav"> & {
- separator?: React.ReactNode;
- }
->(({ ...props }, ref) => );
-Breadcrumb.displayName = "Breadcrumb";
-
-const BreadcrumbList = React.forwardRef<
- HTMLOListElement,
- React.ComponentPropsWithoutRef<"ol">
->(({ className, ...props }, ref) => (
-
-));
-BreadcrumbList.displayName = "BreadcrumbList";
-
-const BreadcrumbItem = React.forwardRef<
- HTMLLIElement,
- React.ComponentPropsWithoutRef<"li">
->(({ className, ...props }, ref) => (
-
-));
-BreadcrumbItem.displayName = "BreadcrumbItem";
-
-const BreadcrumbLink = React.forwardRef<
- HTMLAnchorElement,
- React.ComponentPropsWithoutRef<"a"> & {
- asChild?: boolean;
- }
->(({ asChild, className, ...props }, ref) => {
- const Comp = asChild ? Slot : "a";
-
- return (
-
- );
-});
-BreadcrumbLink.displayName = "BreadcrumbLink";
-
-const BreadcrumbPage = React.forwardRef<
- HTMLSpanElement,
- React.ComponentPropsWithoutRef<"span">
->(({ className, ...props }, ref) => (
-
-));
-BreadcrumbPage.displayName = "BreadcrumbPage";
-
-const BreadcrumbSeparator = ({
- children,
- className,
- ...props
-}: React.ComponentProps<"li">) => (
- svg]:w-3.5 [&>svg]:h-3.5 text-quaternary", className)}
- {...props}
- >
- {children ?? "/"}
-
-);
-BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
-
-const BreadcrumbEllipsis = ({
- className,
- ...props
-}: React.ComponentProps<"span">) => (
-
-
- More
-
-);
-BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
-
-export {
- Breadcrumb,
- BreadcrumbList,
- BreadcrumbItem,
- BreadcrumbLink,
- BreadcrumbPage,
- BreadcrumbSeparator,
- BreadcrumbEllipsis,
-};
diff --git a/apps/console/src/components/ui/button.tsx b/apps/console/src/components/ui/button.tsx
deleted file mode 100644
index 90a80802c..000000000
--- a/apps/console/src/components/ui/button.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import * as React from "react";
-import { Slot } from "@radix-ui/react-slot";
-import { cva, type VariantProps } from "class-variance-authority";
-
-import { cn } from "@/lib/utils";
-
-const buttonVariants = cva(
- "rounded-full cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-active-b disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
- {
- variants: {
- variant: {
- default: "bg-primary-bg text-invert shadow-sm hover:bg-h-primary-bg",
- destructive:
- "bg-danger-plain-bg text-invert shadow-xs hover:bg-danger-plain-bg/90",
- outline:
- "border border-low-b hover:bg-h-tertiary-bg active:bg-p-tertiary-bg focus:bg-tertiary-bg shadow-xs",
- secondary:
- "bg-secondary-bg border border-low-b shadow-sm hover:bg-h-secondary-bg",
- ghost:
- "hover:bg-h-tertiary-bg active:bg-p-tertiary-bg focus:bg-tertiary-bg",
- link: "text-primary underline-offset-4 hover:underline",
- },
- size: {
- default: "h-9 px-4 py-2",
- sm: "h-8 px-3 text-xs",
- lg: "h-10 px-8",
- icon: "h-9 w-9",
- },
- },
- defaultVariants: {
- variant: "default",
- size: "default",
- },
- },
-);
-
-export interface ButtonProps
- extends React.ButtonHTMLAttributes,
- VariantProps {
- asChild?: boolean;
-}
-
-const Button = React.forwardRef(
- ({ className, variant, size, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button";
- return (
-
- );
- },
-);
-Button.displayName = "Button";
-
-export { Button, buttonVariants };
diff --git a/apps/console/src/components/ui/card.tsx b/apps/console/src/components/ui/card.tsx
deleted file mode 100644
index b41b200b3..000000000
--- a/apps/console/src/components/ui/card.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import * as React from "react";
-
-import { cn } from "@/lib/utils";
-
-const Card = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-Card.displayName = "Card";
-
-const CardHeader = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-CardHeader.displayName = "CardHeader";
-
-const CardTitle = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-CardTitle.displayName = "CardTitle";
-
-const CardDescription = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-CardDescription.displayName = "CardDescription";
-
-const CardContent = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-CardContent.displayName = "CardContent";
-
-const CardFooter = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-CardFooter.displayName = "CardFooter";
-
-export {
- Card,
- CardHeader,
- CardFooter,
- CardTitle,
- CardDescription,
- CardContent,
-};
diff --git a/apps/console/src/components/ui/checkbox.tsx b/apps/console/src/components/ui/checkbox.tsx
deleted file mode 100644
index 1877e78cd..000000000
--- a/apps/console/src/components/ui/checkbox.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import * as React from "react";
-import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
-import { Check } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-const Checkbox = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-
-
-
-
-));
-Checkbox.displayName = CheckboxPrimitive.Root.displayName;
-
-export { Checkbox };
diff --git a/apps/console/src/components/ui/collapsible.tsx b/apps/console/src/components/ui/collapsible.tsx
deleted file mode 100644
index 5c28cbcc3..000000000
--- a/apps/console/src/components/ui/collapsible.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
-
-const Collapsible = CollapsiblePrimitive.Root;
-
-const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
-
-const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
-
-export { Collapsible, CollapsibleTrigger, CollapsibleContent };
diff --git a/apps/console/src/components/ui/command.tsx b/apps/console/src/components/ui/command.tsx
deleted file mode 100644
index 566eb04b0..000000000
--- a/apps/console/src/components/ui/command.tsx
+++ /dev/null
@@ -1,153 +0,0 @@
-import * as React from "react";
-import { DialogProps } from "@radix-ui/react-dialog";
-import { Command as CommandPrimitive } from "cmdk";
-import { Search } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-import { Dialog, DialogContent } from "@/components/ui/dialog";
-
-// Add the missing type definition
-type CommandDialogProps = DialogProps & {
- children?: React.ReactNode;
-};
-
-const Command = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-Command.displayName = CommandPrimitive.displayName;
-
-const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
- return (
-
- );
-};
-
-const CommandInput = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-
-
-
-));
-
-CommandInput.displayName = CommandPrimitive.Input.displayName;
-
-const CommandList = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-
-CommandList.displayName = CommandPrimitive.List.displayName;
-
-const CommandEmpty = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->((props, ref) => (
-
-));
-
-CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
-
-const CommandGroup = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-
-CommandGroup.displayName = CommandPrimitive.Group.displayName;
-
-const CommandSeparator = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
-
-const CommandItem = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-
-CommandItem.displayName = CommandPrimitive.Item.displayName;
-
-const CommandShortcut = ({
- className,
- ...props
-}: React.HTMLAttributes) => {
- return (
-
- );
-};
-CommandShortcut.displayName = "CommandShortcut";
-
-export {
- Command,
- CommandDialog,
- CommandInput,
- CommandList,
- CommandEmpty,
- CommandGroup,
- CommandItem,
- CommandShortcut,
- CommandSeparator,
-};
diff --git a/apps/console/src/components/ui/dialog.tsx b/apps/console/src/components/ui/dialog.tsx
deleted file mode 100644
index e42232b32..000000000
--- a/apps/console/src/components/ui/dialog.tsx
+++ /dev/null
@@ -1,119 +0,0 @@
-import * as React from "react";
-import * as DialogPrimitive from "@radix-ui/react-dialog";
-import { X } from "lucide-react";
-import { cn } from "@/lib/utils";
-
-const Dialog = DialogPrimitive.Root;
-
-const DialogTrigger = DialogPrimitive.Trigger;
-
-const DialogPortal = DialogPrimitive.Portal;
-
-const DialogClose = DialogPrimitive.Close;
-
-const DialogOverlay = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
-
-const DialogContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
-
-
- {children}
-
-
- Close
-
-
-
-));
-DialogContent.displayName = DialogPrimitive.Content.displayName;
-
-const DialogHeader = ({
- className,
- ...props
-}: React.HTMLAttributes) => (
-
-);
-DialogHeader.displayName = "DialogHeader";
-
-const DialogFooter = ({
- className,
- ...props
-}: React.HTMLAttributes) => (
-
-);
-DialogFooter.displayName = "DialogFooter";
-
-const DialogTitle = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-DialogTitle.displayName = DialogPrimitive.Title.displayName;
-
-const DialogDescription = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-DialogDescription.displayName = DialogPrimitive.Description.displayName;
-
-export {
- Dialog,
- DialogPortal,
- DialogOverlay,
- DialogClose,
- DialogTrigger,
- DialogContent,
- DialogHeader,
- DialogFooter,
- DialogTitle,
- DialogDescription,
-};
diff --git a/apps/console/src/components/ui/dropdown-menu.tsx b/apps/console/src/components/ui/dropdown-menu.tsx
deleted file mode 100644
index ba0fa0a71..000000000
--- a/apps/console/src/components/ui/dropdown-menu.tsx
+++ /dev/null
@@ -1,201 +0,0 @@
-"use client";
-
-import * as React from "react";
-import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
-import { Check, ChevronRight, Circle } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-const DropdownMenu = DropdownMenuPrimitive.Root;
-
-const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
-
-const DropdownMenuGroup = DropdownMenuPrimitive.Group;
-
-const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
-
-const DropdownMenuSub = DropdownMenuPrimitive.Sub;
-
-const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
-
-const DropdownMenuSubTrigger = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef & {
- inset?: boolean;
- }
->(({ className, inset, children, ...props }, ref) => (
-
- {children}
-
-
-));
-DropdownMenuSubTrigger.displayName =
- DropdownMenuPrimitive.SubTrigger.displayName;
-
-const DropdownMenuSubContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-DropdownMenuSubContent.displayName =
- DropdownMenuPrimitive.SubContent.displayName;
-
-const DropdownMenuContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, sideOffset = 4, ...props }, ref) => (
-
-
-
-));
-DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
-
-const DropdownMenuItem = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef & {
- inset?: boolean;
- }
->(({ className, inset, ...props }, ref) => (
- svg]:size-4 [&>svg]:shrink-0",
- inset && "pl-8",
- className,
- )}
- {...props}
- />
-));
-DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
-
-const DropdownMenuCheckboxItem = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, checked, ...props }, ref) => (
-
-
-
-
-
-
- {children}
-
-));
-DropdownMenuCheckboxItem.displayName =
- DropdownMenuPrimitive.CheckboxItem.displayName;
-
-const DropdownMenuRadioItem = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
-
-
-
-
-
- {children}
-
-));
-DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
-
-const DropdownMenuLabel = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef & {
- inset?: boolean;
- }
->(({ className, inset, ...props }, ref) => (
-
-));
-DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
-
-const DropdownMenuSeparator = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
-
-const DropdownMenuShortcut = ({
- className,
- ...props
-}: React.HTMLAttributes) => {
- return (
-
- );
-};
-DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
-
-export {
- DropdownMenu,
- DropdownMenuTrigger,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuCheckboxItem,
- DropdownMenuRadioItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuShortcut,
- DropdownMenuGroup,
- DropdownMenuPortal,
- DropdownMenuSub,
- DropdownMenuSubContent,
- DropdownMenuSubTrigger,
- DropdownMenuRadioGroup,
-};
diff --git a/apps/console/src/components/ui/input.tsx b/apps/console/src/components/ui/input.tsx
deleted file mode 100644
index b118d217c..000000000
--- a/apps/console/src/components/ui/input.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import * as React from "react";
-
-import { cn } from "@/lib/utils";
-
-const Input = React.forwardRef>(
- ({ className, type, ...props }, ref) => {
- return (
-
- );
- },
-);
-Input.displayName = "Input";
-
-export { Input };
diff --git a/apps/console/src/components/ui/label.tsx b/apps/console/src/components/ui/label.tsx
deleted file mode 100644
index 44912aff5..000000000
--- a/apps/console/src/components/ui/label.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as React from "react";
-import * as LabelPrimitive from "@radix-ui/react-label";
-import { cva, type VariantProps } from "class-variance-authority";
-
-import { cn } from "@/lib/utils";
-
-const labelVariants = cva(
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
-);
-
-const Label = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef &
- VariantProps
->(({ className, ...props }, ref) => (
-
-));
-Label.displayName = LabelPrimitive.Root.displayName;
-
-export { Label };
diff --git a/apps/console/src/components/ui/popover.tsx b/apps/console/src/components/ui/popover.tsx
deleted file mode 100644
index d817f427a..000000000
--- a/apps/console/src/components/ui/popover.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from "react";
-import * as PopoverPrimitive from "@radix-ui/react-popover";
-
-import { cn } from "@/lib/utils";
-
-const Popover = PopoverPrimitive.Root;
-
-const PopoverTrigger = PopoverPrimitive.Trigger;
-
-const PopoverContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
-
-
-
-));
-PopoverContent.displayName = PopoverPrimitive.Content.displayName;
-
-export { Popover, PopoverTrigger, PopoverContent };
diff --git a/apps/console/src/components/ui/progress.tsx b/apps/console/src/components/ui/progress.tsx
deleted file mode 100644
index 882affb83..000000000
--- a/apps/console/src/components/ui/progress.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import * as React from "react";
-import * as ProgressPrimitive from "@radix-ui/react-progress";
-
-import { cn } from "@/lib/utils";
-
-const Progress = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, value, ...props }, ref) => (
-
-
-
-));
-Progress.displayName = ProgressPrimitive.Root.displayName;
-
-export { Progress };
diff --git a/apps/console/src/components/ui/radio-group.tsx b/apps/console/src/components/ui/radio-group.tsx
deleted file mode 100644
index ed0e75595..000000000
--- a/apps/console/src/components/ui/radio-group.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import * as React from "react";
-import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
-import { Circle } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-const RadioGroup = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
-
-const RadioGroupItem = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => {
- return (
-
-
-
-
-
- );
-});
-RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
-
-export { RadioGroup, RadioGroupItem };
diff --git a/apps/console/src/components/ui/select.tsx b/apps/console/src/components/ui/select.tsx
deleted file mode 100644
index fa81a74eb..000000000
--- a/apps/console/src/components/ui/select.tsx
+++ /dev/null
@@ -1,91 +0,0 @@
-import * as React from "react";
-import * as SelectPrimitive from "@radix-ui/react-select";
-import { Check, ChevronDown } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-const Select = SelectPrimitive.Root;
-
-const SelectGroup = SelectPrimitive.Group;
-
-const SelectValue = SelectPrimitive.Value;
-
-const SelectTrigger = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
- {children}
-
-
-));
-SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
-
-const SelectContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, position = "popper", ...props }, ref) => (
-
-
-
- {children}
-
-
-
-));
-SelectContent.displayName = SelectPrimitive.Content.displayName;
-
-const SelectItem = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
-
-
-
-
-
-
- {children}
-
-));
-SelectItem.displayName = SelectPrimitive.Item.displayName;
-
-export {
- Select,
- SelectGroup,
- SelectValue,
- SelectTrigger,
- SelectContent,
- SelectItem,
-};
diff --git a/apps/console/src/components/ui/separator.tsx b/apps/console/src/components/ui/separator.tsx
deleted file mode 100644
index 551711554..000000000
--- a/apps/console/src/components/ui/separator.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from "react";
-import * as SeparatorPrimitive from "@radix-ui/react-separator";
-
-import { cn } from "@/lib/utils";
-
-const Separator = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(
- (
- { className, orientation = "horizontal", decorative = true, ...props },
- ref,
- ) => (
-
- ),
-);
-Separator.displayName = SeparatorPrimitive.Root.displayName;
-
-export { Separator };
diff --git a/apps/console/src/components/ui/sheet.tsx b/apps/console/src/components/ui/sheet.tsx
deleted file mode 100644
index b2529470b..000000000
--- a/apps/console/src/components/ui/sheet.tsx
+++ /dev/null
@@ -1,140 +0,0 @@
-"use client";
-
-import * as React from "react";
-import * as SheetPrimitive from "@radix-ui/react-dialog";
-import { cva, type VariantProps } from "class-variance-authority";
-import { X } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-const Sheet = SheetPrimitive.Root;
-
-const SheetTrigger = SheetPrimitive.Trigger;
-
-const SheetClose = SheetPrimitive.Close;
-
-const SheetPortal = SheetPrimitive.Portal;
-
-const SheetOverlay = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
-
-const sheetVariants = cva(
- "fixed z-50 gap-4 bg-level-0 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
- {
- variants: {
- side: {
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
- bottom:
- "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
- right:
- "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
- },
- },
- defaultVariants: {
- side: "right",
- },
- },
-);
-
-interface SheetContentProps
- extends React.ComponentPropsWithoutRef,
- VariantProps {}
-
-const SheetContent = React.forwardRef<
- React.ElementRef,
- SheetContentProps
->(({ side = "right", className, children, ...props }, ref) => (
-
-
-
-
-
- Close
-
- {children}
-
-
-));
-SheetContent.displayName = SheetPrimitive.Content.displayName;
-
-const SheetHeader = ({
- className,
- ...props
-}: React.HTMLAttributes) => (
-
-);
-SheetHeader.displayName = "SheetHeader";
-
-const SheetFooter = ({
- className,
- ...props
-}: React.HTMLAttributes) => (
-
-);
-SheetFooter.displayName = "SheetFooter";
-
-const SheetTitle = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-SheetTitle.displayName = SheetPrimitive.Title.displayName;
-
-const SheetDescription = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-SheetDescription.displayName = SheetPrimitive.Description.displayName;
-
-export {
- Sheet,
- SheetPortal,
- SheetOverlay,
- SheetTrigger,
- SheetClose,
- SheetContent,
- SheetHeader,
- SheetFooter,
- SheetTitle,
- SheetDescription,
-};
diff --git a/apps/console/src/components/ui/sidebar.tsx b/apps/console/src/components/ui/sidebar.tsx
deleted file mode 100644
index 3230b3593..000000000
--- a/apps/console/src/components/ui/sidebar.tsx
+++ /dev/null
@@ -1,772 +0,0 @@
-import * as React from "react";
-import { Slot } from "@radix-ui/react-slot";
-import { VariantProps, cva } from "class-variance-authority";
-import { PanelLeft } from "lucide-react";
-
-import { useIsMobile } from "@/hooks/use-mobile";
-import { cn } from "@/lib/utils";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Separator } from "@/components/ui/separator";
-import { Sheet, SheetContent } from "@/components/ui/sheet";
-import { Skeleton } from "@/components/ui/skeleton";
-import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
-
-const SIDEBAR_COOKIE_NAME = "sidebar_state";
-const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
-const SIDEBAR_WIDTH = "16rem";
-const SIDEBAR_WIDTH_MOBILE = "18rem";
-const SIDEBAR_WIDTH_ICON = "3rem";
-const SIDEBAR_KEYBOARD_SHORTCUT = "b";
-
-type SidebarContext = {
- state: "expanded" | "collapsed";
- open: boolean;
- setOpen: (open: boolean) => void;
- openMobile: boolean;
- setOpenMobile: (open: boolean) => void;
- isMobile: boolean;
- toggleSidebar: () => void;
-};
-
-const SidebarContext = React.createContext(null);
-
-function useSidebar() {
- const context = React.useContext(SidebarContext);
- if (!context) {
- throw new Error("useSidebar must be used within a SidebarProvider.");
- }
-
- return context;
-}
-
-const SidebarProvider = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div"> & {
- defaultOpen?: boolean;
- open?: boolean;
- onOpenChange?: (open: boolean) => void;
- }
->(
- (
- {
- defaultOpen = true,
- open: openProp,
- onOpenChange: setOpenProp,
- className,
- style,
- children,
- ...props
- },
- ref,
- ) => {
- const isMobile = useIsMobile();
- const [openMobile, setOpenMobile] = React.useState(false);
-
- // This is the internal state of the sidebar.
- // We use openProp and setOpenProp for measure from outside the component.
- const [_open, _setOpen] = React.useState(defaultOpen);
- const open = openProp ?? _open;
- const setOpen = React.useCallback(
- (value: boolean | ((value: boolean) => boolean)) => {
- const openState = typeof value === "function" ? value(open) : value;
- if (setOpenProp) {
- setOpenProp(openState);
- } else {
- _setOpen(openState);
- }
-
- // This sets the cookie to keep the sidebar state.
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
- },
- [setOpenProp, open],
- );
-
- // Helper to toggle the sidebar.
- const toggleSidebar = React.useCallback(() => {
- return isMobile
- ? setOpenMobile((open) => !open)
- : setOpen((open) => !open);
- }, [isMobile, setOpen, setOpenMobile]);
-
- // Adds a keyboard shortcut to toggle the sidebar.
- React.useEffect(() => {
- const handleKeyDown = (event: KeyboardEvent) => {
- if (
- event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
- (event.metaKey || event.ctrlKey)
- ) {
- event.preventDefault();
- toggleSidebar();
- }
- };
-
- window.addEventListener("keydown", handleKeyDown);
- return () => window.removeEventListener("keydown", handleKeyDown);
- }, [toggleSidebar]);
-
- // We add a state so that we can do data-state="expanded" or "collapsed".
- // This makes it easier to style the sidebar with Tailwind classes.
- const state = open ? "expanded" : "collapsed";
-
- const contextValue = React.useMemo(
- () => ({
- state,
- open,
- setOpen,
- isMobile,
- openMobile,
- setOpenMobile,
- toggleSidebar,
- }),
- [
- state,
- open,
- setOpen,
- isMobile,
- openMobile,
- setOpenMobile,
- toggleSidebar,
- ],
- );
-
- return (
-
-
-
- {children}
-
-
-
- );
- },
-);
-SidebarProvider.displayName = "SidebarProvider";
-
-const Sidebar = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div"> & {
- side?: "left" | "right";
- variant?: "sidebar" | "floating" | "inset";
- collapsible?: "offcanvas" | "icon" | "none";
- }
->(
- (
- {
- side = "left",
- variant = "sidebar",
- collapsible = "offcanvas",
- className,
- children,
- ...props
- },
- ref,
- ) => {
- const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
-
- if (collapsible === "none") {
- return (
-
- {children}
-
- );
- }
-
- if (isMobile) {
- return (
-
-
- {children}
-
-
- );
- }
-
- return (
-
- {/* This is what handles the sidebar gap on desktop */}
-
-
-
- );
- },
-);
-Sidebar.displayName = "Sidebar";
-
-const SidebarTrigger = React.forwardRef<
- React.ElementRef,
- React.ComponentProps
->(({ className, onClick, ...props }, ref) => {
- const { toggleSidebar } = useSidebar();
-
- return (
-
- );
-});
-SidebarTrigger.displayName = "SidebarTrigger";
-
-const SidebarRail = React.forwardRef<
- HTMLButtonElement,
- React.ComponentProps<"button">
->(({ className, ...props }, ref) => {
- const { toggleSidebar } = useSidebar();
-
- return (
-
- );
-});
-SidebarRail.displayName = "SidebarRail";
-
-const SidebarInset = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"main">
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-SidebarInset.displayName = "SidebarInset";
-
-const SidebarInput = React.forwardRef<
- React.ElementRef,
- React.ComponentProps
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-SidebarInput.displayName = "SidebarInput";
-
-const SidebarHeader = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div">
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-SidebarHeader.displayName = "SidebarHeader";
-
-const SidebarFooter = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div">
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-SidebarFooter.displayName = "SidebarFooter";
-
-const SidebarSeparator = React.forwardRef<
- React.ElementRef,
- React.ComponentProps
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-SidebarSeparator.displayName = "SidebarSeparator";
-
-const SidebarContent = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div">
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-SidebarContent.displayName = "SidebarContent";
-
-const SidebarGroup = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div">
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-SidebarGroup.displayName = "SidebarGroup";
-
-const SidebarGroupLabel = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div"> & { asChild?: boolean }
->(({ className, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "div";
-
- return (
- svg]:size-4 [&>svg]:shrink-0",
- "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
- className,
- )}
- {...props}
- />
- );
-});
-SidebarGroupLabel.displayName = "SidebarGroupLabel";
-
-const SidebarGroupAction = React.forwardRef<
- HTMLButtonElement,
- React.ComponentProps<"button"> & { asChild?: boolean }
->(({ className, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button";
-
- return (
- svg]:size-4 [&>svg]:shrink-0",
- // Increases the hit area of the button on mobile.
- "after:absolute after:-inset-2 md:after:hidden",
- "group-data-[collapsible=icon]:hidden",
- className,
- )}
- {...props}
- />
- );
-});
-SidebarGroupAction.displayName = "SidebarGroupAction";
-
-const SidebarGroupContent = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div">
->(({ className, ...props }, ref) => (
-
-));
-SidebarGroupContent.displayName = "SidebarGroupContent";
-
-const SidebarMenu = React.forwardRef<
- HTMLUListElement,
- React.ComponentProps<"ul">
->(({ className, ...props }, ref) => (
-
-));
-SidebarMenu.displayName = "SidebarMenu";
-
-const SidebarMenuItem = React.forwardRef<
- HTMLLIElement,
- React.ComponentProps<"li">
->(({ className, ...props }, ref) => (
-
-));
-SidebarMenuItem.displayName = "SidebarMenuItem";
-
-const sidebarMenuButtonVariants = cva(
- "rounded-full text-tertiary active:text-primary data-[active=true]:text-primary peer/menu-button flex w-full items-center gap-2 overflow-hidden p-2 text-left text-sm outline-hidden ring-active-b transition-[width,height,padding] focus-visible:ring disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 hover:cursor-pointer",
- {
- variants: {
- variant: {
- default:
- "hover:bg-h-active-bg data-[state=open]:bg-active-bg data-[state=open]:hover:bg-h-active-bg active:bg-active-bg data-[active=true]:bg-active-bg",
- outline:
- "border border-low-b shadow-[0_0_0_1px_hsl(var(--solid-b))] hover:bg-h-tertiary-bg data-[state=open]:hover:bg-h-tertiary-bg hover:shadow-[0_0_0_1px_hsl(var(--accent))] active:bg-tertiary-bg ata-[active=true]:bg-h-tertiary-bg",
- ghost:
- "shadow-[0_0_0_1px_hsl(var(--solid-b))] hover:bg-h-tertiary-bg data-[state=open]:hover:bg-h-tertiary-bg hover:shadow-[0_0_0_1px_hsl(var(--accent))] active:bg-tertiary-bg ata-[active=true]:bg-h-tertiary-bg",
- },
- size: {
- default: "h-10 py-2 px-3 gap-3",
- sm: "h-8 text-sm",
- lg: "h-12 py-2 px-3 gap-3 group-data-[collapsible=icon]:p-0!",
- },
- },
- defaultVariants: {
- variant: "default",
- size: "default",
- },
- },
-);
-
-const SidebarMenuButton = React.forwardRef<
- HTMLButtonElement,
- React.ComponentProps<"button"> & {
- asChild?: boolean;
- isActive?: boolean;
- tooltip?: string | React.ComponentProps;
- } & VariantProps
->(
- (
- {
- asChild = false,
- isActive = false,
- variant = "default",
- size = "default",
- tooltip,
- className,
- ...props
- },
- ref,
- ) => {
- const Comp = asChild ? Slot : "button";
- const { isMobile, state } = useSidebar();
-
- const button = (
-
- );
-
- if (!tooltip) {
- return button;
- }
-
- if (typeof tooltip === "string") {
- tooltip = {
- children: tooltip,
- };
- }
-
- return (
-
- {button}
-
-
- );
- },
-);
-SidebarMenuButton.displayName = "SidebarMenuButton";
-
-const SidebarMenuAction = React.forwardRef<
- HTMLButtonElement,
- React.ComponentProps<"button"> & {
- asChild?: boolean;
- showOnHover?: boolean;
- }
->(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button";
-
- return (
- svg]:size-4 [&>svg]:shrink-0 hover:cursor-pointer",
- // Increases the hit area of the button on mobile.
- "after:absolute after:-inset-2 md:after:hidden",
- "peer-data-[size=sm]/menu-button:top-1",
- "peer-data-[size=default]/menu-button:top-2 peer-data-[size=default]/menu-button:right-2",
- "peer-data-[size=lg]/menu-button:top-2.5",
- "group-data-[collapsible=icon]:hidden",
- showOnHover &&
- "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-accent md:opacity-0",
- className,
- )}
- {...props}
- />
- );
-});
-SidebarMenuAction.displayName = "SidebarMenuAction";
-
-const SidebarMenuBadge = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div">
->(({ className, ...props }, ref) => (
-
-));
-SidebarMenuBadge.displayName = "SidebarMenuBadge";
-
-const SidebarMenuSkeleton = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div"> & {
- showIcon?: boolean;
- }
->(({ className, showIcon = false, ...props }, ref) => {
- // Random width between 50 to 90%.
- const width = React.useMemo(() => {
- return `${Math.floor(Math.random() * 40) + 50}%`;
- }, []);
-
- return (
-
- {showIcon && (
-
- )}
-
-
- );
-});
-SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
-
-const SidebarMenuSub = React.forwardRef<
- HTMLUListElement,
- React.ComponentProps<"ul">
->(({ className, ...props }, ref) => (
-
-));
-SidebarMenuSub.displayName = "SidebarMenuSub";
-
-const SidebarMenuSubItem = React.forwardRef<
- HTMLLIElement,
- React.ComponentProps<"li">
->(({ ...props }, ref) => );
-SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
-
-const SidebarMenuSubButton = React.forwardRef<
- HTMLAnchorElement,
- React.ComponentProps<"a"> & {
- asChild?: boolean;
- size?: "sm" | "md";
- isActive?: boolean;
- }
->(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
- const Comp = asChild ? Slot : "a";
-
- return (
- span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
- "data-[active=true]:bg-accent-bg data-[active=true]:text-primary",
- size === "sm" && "text-xs",
- size === "md" && "text-sm",
- "group-data-[collapsible=icon]:hidden",
- className,
- )}
- {...props}
- />
- );
-});
-SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
-
-export {
- Sidebar,
- SidebarContent,
- SidebarFooter,
- SidebarGroup,
- SidebarGroupAction,
- SidebarGroupContent,
- SidebarGroupLabel,
- SidebarHeader,
- SidebarInput,
- SidebarInset,
- SidebarMenu,
- SidebarMenuAction,
- SidebarMenuBadge,
- SidebarMenuButton,
- SidebarMenuItem,
- SidebarMenuSkeleton,
- SidebarMenuSub,
- SidebarMenuSubButton,
- SidebarMenuSubItem,
- SidebarProvider,
- SidebarRail,
- SidebarSeparator,
- SidebarTrigger,
- useSidebar,
-};
diff --git a/apps/console/src/components/ui/skeleton.tsx b/apps/console/src/components/ui/skeleton.tsx
deleted file mode 100644
index c26c4ea9f..000000000
--- a/apps/console/src/components/ui/skeleton.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { cn } from "@/lib/utils";
-
-function Skeleton({
- className,
- ...props
-}: React.HTMLAttributes) {
- return (
-
- );
-}
-
-export { Skeleton };
diff --git a/apps/console/src/components/ui/switch.tsx b/apps/console/src/components/ui/switch.tsx
deleted file mode 100644
index a026a47c3..000000000
--- a/apps/console/src/components/ui/switch.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from "react";
-import * as SwitchPrimitive from "@radix-ui/react-switch";
-
-import { cn } from "@/lib/utils";
-
-function Switch({
- className,
- ...props
-}: React.ComponentProps) {
- return (
-
-
-
- );
-}
-
-export { Switch };
diff --git a/apps/console/src/components/ui/table.tsx b/apps/console/src/components/ui/table.tsx
deleted file mode 100644
index d570dfa52..000000000
--- a/apps/console/src/components/ui/table.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-import * as React from "react";
-
-import { cn } from "@/lib/utils";
-
-const Table = React.forwardRef<
- HTMLTableElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-Table.displayName = "Table";
-
-const TableHeader = React.forwardRef<
- HTMLTableSectionElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-TableHeader.displayName = "TableHeader";
-
-const TableBody = React.forwardRef<
- HTMLTableSectionElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-TableBody.displayName = "TableBody";
-
-const TableFooter = React.forwardRef<
- HTMLTableSectionElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-TableFooter.displayName = "TableFooter";
-
-const TableRow = React.forwardRef<
- HTMLTableRowElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-TableRow.displayName = "TableRow";
-
-const TableHead = React.forwardRef<
- HTMLTableCellElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
- |
-));
-TableHead.displayName = "TableHead";
-
-const TableCell = React.forwardRef<
- HTMLTableCellElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
- |
-));
-TableCell.displayName = "TableCell";
-
-const TableCaption = React.forwardRef<
- HTMLTableCaptionElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-));
-TableCaption.displayName = "TableCaption";
-
-export {
- Table,
- TableHeader,
- TableBody,
- TableFooter,
- TableHead,
- TableRow,
- TableCell,
- TableCaption,
-};
diff --git a/apps/console/src/components/ui/tabs.tsx b/apps/console/src/components/ui/tabs.tsx
deleted file mode 100644
index a577fb6de..000000000
--- a/apps/console/src/components/ui/tabs.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import * as React from "react";
-import * as TabsPrimitive from "@radix-ui/react-tabs";
-import { cn } from "@/lib/utils";
-
-const Tabs = TabsPrimitive.Root;
-
-const TabsList = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-TabsList.displayName = TabsPrimitive.List.displayName;
-
-const TabsTrigger = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
-
-const TabsContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-TabsContent.displayName = TabsPrimitive.Content.displayName;
-
-export { Tabs, TabsList, TabsTrigger, TabsContent };
diff --git a/apps/console/src/components/ui/textarea.tsx b/apps/console/src/components/ui/textarea.tsx
deleted file mode 100644
index a253698cd..000000000
--- a/apps/console/src/components/ui/textarea.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as React from "react";
-
-import { cn } from "@/lib/utils";
-
-const Textarea = React.forwardRef<
- HTMLTextAreaElement,
- React.TextareaHTMLAttributes & {
- className?: string;
- }
->(({ className, ...props }, ref) => {
- return (
-
- );
-});
-Textarea.displayName = "Textarea";
-
-export { Textarea };
diff --git a/apps/console/src/components/ui/toast.tsx b/apps/console/src/components/ui/toast.tsx
deleted file mode 100644
index 481d87740..000000000
--- a/apps/console/src/components/ui/toast.tsx
+++ /dev/null
@@ -1,127 +0,0 @@
-import * as React from "react";
-import * as ToastPrimitives from "@radix-ui/react-toast";
-import { cva, type VariantProps } from "class-variance-authority";
-import { X } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-const ToastProvider = ToastPrimitives.Provider;
-
-const ToastViewport = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
-
-const toastVariants = cva(
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all select-text data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",
- {
- variants: {
- variant: {
- default: "border bg-level-0 text-primary",
- destructive:
- "destructive group border-danger-b bg-danger-bg text-danger",
- },
- },
- defaultVariants: {
- variant: "default",
- },
- },
-);
-
-const Toast = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef &
- VariantProps
->(({ className, variant, ...props }, ref) => {
- return (
-
- );
-});
-Toast.displayName = ToastPrimitives.Root.displayName;
-
-const ToastAction = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-ToastAction.displayName = ToastPrimitives.Action.displayName;
-
-const ToastClose = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-
-
-));
-ToastClose.displayName = ToastPrimitives.Close.displayName;
-
-const ToastTitle = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-ToastTitle.displayName = ToastPrimitives.Title.displayName;
-
-const ToastDescription = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-ToastDescription.displayName = ToastPrimitives.Description.displayName;
-
-type ToastProps = React.ComponentPropsWithoutRef;
-
-type ToastActionElement = React.ReactElement;
-
-export {
- type ToastProps,
- type ToastActionElement,
- ToastProvider,
- ToastViewport,
- Toast,
- ToastTitle,
- ToastDescription,
- ToastClose,
- ToastAction,
-};
diff --git a/apps/console/src/components/ui/toaster.tsx b/apps/console/src/components/ui/toaster.tsx
deleted file mode 100644
index 5887f0804..000000000
--- a/apps/console/src/components/ui/toaster.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { useToast } from "@/hooks/use-toast";
-import {
- Toast,
- ToastClose,
- ToastDescription,
- ToastProvider,
- ToastTitle,
- ToastViewport,
-} from "@/components/ui/toast";
-
-export function Toaster() {
- const { toasts } = useToast();
-
- return (
-
- {toasts.map(function ({ id, title, description, action, ...props }) {
- return (
-
-
- {title && {title}}
- {description && (
- {description}
- )}
-
- {action}
-
-
- );
- })}
-
-
- );
-}
diff --git a/apps/console/src/components/ui/tooltip.tsx b/apps/console/src/components/ui/tooltip.tsx
deleted file mode 100644
index a1e259e7c..000000000
--- a/apps/console/src/components/ui/tooltip.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as React from "react";
-import * as TooltipPrimitive from "@radix-ui/react-tooltip";
-
-import { cn } from "@/lib/utils";
-
-const TooltipProvider = TooltipPrimitive.Provider;
-
-const Tooltip = TooltipPrimitive.Root;
-
-const TooltipTrigger = TooltipPrimitive.Trigger;
-
-const TooltipContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, sideOffset = 4, ...props }, ref) => (
-
-
-
-));
-TooltipContent.displayName = TooltipPrimitive.Content.displayName;
-
-export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
diff --git a/apps/console2/src/hooks/forms/__generated__/useRiskFormFragment.graphql.ts b/apps/console/src/hooks/forms/__generated__/useRiskFormFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/forms/__generated__/useRiskFormFragment.graphql.ts
rename to apps/console/src/hooks/forms/__generated__/useRiskFormFragment.graphql.ts
diff --git a/apps/console2/src/hooks/forms/__generated__/useVendorFormFragment.graphql.ts b/apps/console/src/hooks/forms/__generated__/useVendorFormFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/forms/__generated__/useVendorFormFragment.graphql.ts
rename to apps/console/src/hooks/forms/__generated__/useVendorFormFragment.graphql.ts
diff --git a/apps/console2/src/hooks/forms/__generated__/useVendorFormMutation.graphql.ts b/apps/console/src/hooks/forms/__generated__/useVendorFormMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/forms/__generated__/useVendorFormMutation.graphql.ts
rename to apps/console/src/hooks/forms/__generated__/useVendorFormMutation.graphql.ts
diff --git a/apps/console2/src/hooks/forms/useDocumentForm.tsx b/apps/console/src/hooks/forms/useDocumentForm.tsx
similarity index 100%
rename from apps/console2/src/hooks/forms/useDocumentForm.tsx
rename to apps/console/src/hooks/forms/useDocumentForm.tsx
diff --git a/apps/console2/src/hooks/forms/useRiskForm.tsx b/apps/console/src/hooks/forms/useRiskForm.tsx
similarity index 100%
rename from apps/console2/src/hooks/forms/useRiskForm.tsx
rename to apps/console/src/hooks/forms/useRiskForm.tsx
diff --git a/apps/console2/src/hooks/forms/useVendorForm.tsx b/apps/console/src/hooks/forms/useVendorForm.tsx
similarity index 100%
rename from apps/console2/src/hooks/forms/useVendorForm.tsx
rename to apps/console/src/hooks/forms/useVendorForm.tsx
diff --git a/apps/console2/src/hooks/graph/AssetGraph.ts b/apps/console/src/hooks/graph/AssetGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/AssetGraph.ts
rename to apps/console/src/hooks/graph/AssetGraph.ts
diff --git a/apps/console2/src/hooks/graph/DatumGraph.ts b/apps/console/src/hooks/graph/DatumGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/DatumGraph.ts
rename to apps/console/src/hooks/graph/DatumGraph.ts
diff --git a/apps/console2/src/hooks/graph/DocumentGraph.ts b/apps/console/src/hooks/graph/DocumentGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/DocumentGraph.ts
rename to apps/console/src/hooks/graph/DocumentGraph.ts
diff --git a/apps/console2/src/hooks/graph/FrameworkGraph.ts b/apps/console/src/hooks/graph/FrameworkGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/FrameworkGraph.ts
rename to apps/console/src/hooks/graph/FrameworkGraph.ts
diff --git a/apps/console2/src/hooks/graph/MeasureGraph.ts b/apps/console/src/hooks/graph/MeasureGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/MeasureGraph.ts
rename to apps/console/src/hooks/graph/MeasureGraph.ts
diff --git a/apps/console2/src/hooks/graph/OrganizationGraph.ts b/apps/console/src/hooks/graph/OrganizationGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/OrganizationGraph.ts
rename to apps/console/src/hooks/graph/OrganizationGraph.ts
diff --git a/apps/console2/src/hooks/graph/PeopleGraph.ts b/apps/console/src/hooks/graph/PeopleGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/PeopleGraph.ts
rename to apps/console/src/hooks/graph/PeopleGraph.ts
diff --git a/apps/console2/src/hooks/graph/RiskGraph.ts b/apps/console/src/hooks/graph/RiskGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/RiskGraph.ts
rename to apps/console/src/hooks/graph/RiskGraph.ts
diff --git a/apps/console2/src/hooks/graph/TaskGraph.ts b/apps/console/src/hooks/graph/TaskGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/TaskGraph.ts
rename to apps/console/src/hooks/graph/TaskGraph.ts
diff --git a/apps/console2/src/hooks/graph/VendorGraph.ts b/apps/console/src/hooks/graph/VendorGraph.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/VendorGraph.ts
rename to apps/console/src/hooks/graph/VendorGraph.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/AssetGraphCreateMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/AssetGraphCreateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/AssetGraphCreateMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/AssetGraphCreateMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/AssetGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/AssetGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/AssetGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/AssetGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/AssetGraphListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/AssetGraphListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/AssetGraphListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/AssetGraphListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/AssetGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/AssetGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/AssetGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/AssetGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/AssetGraphUpdateMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/AssetGraphUpdateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/AssetGraphUpdateMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/AssetGraphUpdateMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DatumGraphCreateMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/DatumGraphCreateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DatumGraphCreateMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DatumGraphCreateMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DatumGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/DatumGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DatumGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DatumGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DatumGraphListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/DatumGraphListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DatumGraphListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DatumGraphListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DatumGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/DatumGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DatumGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DatumGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DatumGraphUpdateMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/DatumGraphUpdateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DatumGraphUpdateMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DatumGraphUpdateMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DocumentGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/DocumentGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DocumentGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DocumentGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DocumentGraphListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/DocumentGraphListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DocumentGraphListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DocumentGraphListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DocumentGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/DocumentGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DocumentGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DocumentGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/DocumentGraphSendSigningNotificationsMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/DocumentGraphSendSigningNotificationsMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/DocumentGraphSendSigningNotificationsMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/DocumentGraphSendSigningNotificationsMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/FrameworkGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/FrameworkGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/FrameworkGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/FrameworkGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/FrameworkGraphListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/FrameworkGraphListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/FrameworkGraphListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/FrameworkGraphListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/FrameworkGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/FrameworkGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/FrameworkGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/FrameworkGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/MeasureGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/MeasureGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/MeasureGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/MeasureGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/MeasureGraphListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/MeasureGraphListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/MeasureGraphListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/MeasureGraphListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/MeasureGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/MeasureGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/MeasureGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/MeasureGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/MeasureGraphUpdateMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/MeasureGraphUpdateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/MeasureGraphUpdateMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/MeasureGraphUpdateMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/OrganizationGraph_ViewQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/OrganizationGraph_ViewQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/OrganizationGraph_ViewQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/OrganizationGraph_ViewQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/PeopleGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/PeopleGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/PeopleGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/PeopleGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/PeopleGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/PeopleGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/PeopleGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/PeopleGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/PeopleGraphPaginatedFragment.graphql.ts b/apps/console/src/hooks/graph/__generated__/PeopleGraphPaginatedFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/PeopleGraphPaginatedFragment.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/PeopleGraphPaginatedFragment.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/PeopleGraphPaginatedQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/PeopleGraphPaginatedQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/PeopleGraphPaginatedQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/PeopleGraphPaginatedQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/PeopleGraphQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/PeopleGraphQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/PeopleGraphQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/PeopleGraphQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/PeopleGraphUpdateMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/PeopleGraphUpdateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/PeopleGraphUpdateMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/PeopleGraphUpdateMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/PeopleListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/PeopleListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/PeopleListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/PeopleListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/RiskGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/RiskGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/RiskGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/RiskGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/RiskGraphFragment.graphql.ts b/apps/console/src/hooks/graph/__generated__/RiskGraphFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/RiskGraphFragment.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/RiskGraphFragment.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/RiskGraphListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/RiskGraphListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/RiskGraphListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/RiskGraphListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/RiskGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/RiskGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/RiskGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/RiskGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/RisksListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/RisksListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/RisksListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/RisksListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/TaskGraphQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/TaskGraphQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/TaskGraphQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/TaskGraphQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/VendorGraphCreateMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/VendorGraphCreateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/VendorGraphCreateMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/VendorGraphCreateMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/VendorGraphDeleteMutation.graphql.ts b/apps/console/src/hooks/graph/__generated__/VendorGraphDeleteMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/VendorGraphDeleteMutation.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/VendorGraphDeleteMutation.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/VendorGraphListQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/VendorGraphListQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/VendorGraphListQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/VendorGraphListQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/VendorGraphNodeQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/VendorGraphNodeQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/VendorGraphNodeQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/VendorGraphNodeQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/VendorGraphSelectQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/VendorGraphSelectQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/VendorGraphSelectQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/VendorGraphSelectQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/usePaginatedMeasuresFragment.graphql.ts b/apps/console/src/hooks/graph/__generated__/usePaginatedMeasuresFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/usePaginatedMeasuresFragment.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/usePaginatedMeasuresFragment.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/usePaginatedMeasuresQuery.graphql.ts b/apps/console/src/hooks/graph/__generated__/usePaginatedMeasuresQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/usePaginatedMeasuresQuery.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/usePaginatedMeasuresQuery.graphql.ts
diff --git a/apps/console2/src/hooks/graph/__generated__/usePaginatedMeasuresQuery_fragment.graphql.ts b/apps/console/src/hooks/graph/__generated__/usePaginatedMeasuresQuery_fragment.graphql.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/__generated__/usePaginatedMeasuresQuery_fragment.graphql.ts
rename to apps/console/src/hooks/graph/__generated__/usePaginatedMeasuresQuery_fragment.graphql.ts
diff --git a/apps/console2/src/hooks/graph/usePaginatedMeasures.ts b/apps/console/src/hooks/graph/usePaginatedMeasures.ts
similarity index 100%
rename from apps/console2/src/hooks/graph/usePaginatedMeasures.ts
rename to apps/console/src/hooks/graph/usePaginatedMeasures.ts
diff --git a/apps/console/src/hooks/use-mobile.tsx b/apps/console/src/hooks/use-mobile.tsx
deleted file mode 100644
index a93d58393..000000000
--- a/apps/console/src/hooks/use-mobile.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import * as React from "react";
-
-const MOBILE_BREAKPOINT = 768;
-
-export function useIsMobile() {
- const [isMobile, setIsMobile] = React.useState(
- undefined,
- );
-
- React.useEffect(() => {
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
- const onChange = () => {
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
- };
- mql.addEventListener("change", onChange);
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
- return () => mql.removeEventListener("change", onChange);
- }, []);
-
- return !!isMobile;
-}
diff --git a/apps/console/src/hooks/use-toast.ts b/apps/console/src/hooks/use-toast.ts
deleted file mode 100644
index 603772187..000000000
--- a/apps/console/src/hooks/use-toast.ts
+++ /dev/null
@@ -1,182 +0,0 @@
-"use client";
-
-// Inspired by react-hot-toast library
-import * as React from "react";
-
-import type { ToastActionElement, ToastProps } from "@/components/ui/toast";
-
-const TOAST_LIMIT = 1;
-const TOAST_REMOVE_DELAY = 1000000;
-
-type ToasterToast = ToastProps & {
- id: string;
- title?: React.ReactNode;
- description?: React.ReactNode;
- action?: ToastActionElement;
-};
-
-let count = 0;
-
-function genId() {
- count = (count + 1) % Number.MAX_SAFE_INTEGER;
- return count.toString();
-}
-
-type Action =
- | {
- type: "ADD_TOAST";
- toast: ToasterToast;
- }
- | {
- type: "UPDATE_TOAST";
- toast: Partial;
- }
- | {
- type: "DISMISS_TOAST";
- toastId?: ToasterToast["id"];
- }
- | {
- type: "REMOVE_TOAST";
- toastId?: ToasterToast["id"];
- };
-
-interface State {
- toasts: ToasterToast[];
-}
-
-const toastTimeouts = new Map>();
-
-const addToRemoveQueue = (toastId: string) => {
- if (toastTimeouts.has(toastId)) {
- return;
- }
-
- const timeout = setTimeout(() => {
- toastTimeouts.delete(toastId);
- dispatch({
- type: "REMOVE_TOAST",
- toastId: toastId,
- });
- }, TOAST_REMOVE_DELAY);
-
- toastTimeouts.set(toastId, timeout);
-};
-
-export const reducer = (state: State, action: Action): State => {
- switch (action.type) {
- case "ADD_TOAST":
- return {
- ...state,
- toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
- };
-
- case "UPDATE_TOAST":
- return {
- ...state,
- toasts: state.toasts.map((t) =>
- t.id === action.toast.id ? { ...t, ...action.toast } : t,
- ),
- };
-
- case "DISMISS_TOAST": {
- const { toastId } = action;
-
- // ! Side effects ! - This could be extracted into a dismissToast() action,
- // but I'll keep it here for simplicity
- if (toastId) {
- addToRemoveQueue(toastId);
- } else {
- state.toasts.forEach((toast) => {
- addToRemoveQueue(toast.id);
- });
- }
-
- return {
- ...state,
- toasts: state.toasts.map((t) =>
- t.id === toastId || toastId === undefined
- ? {
- ...t,
- open: false,
- }
- : t,
- ),
- };
- }
- case "REMOVE_TOAST":
- if (action.toastId === undefined) {
- return {
- ...state,
- toasts: [],
- };
- }
- return {
- ...state,
- toasts: state.toasts.filter((t) => t.id !== action.toastId),
- };
- }
-};
-
-const listeners: Array<(state: State) => void> = [];
-
-let memoryState: State = { toasts: [] };
-
-function dispatch(action: Action) {
- memoryState = reducer(memoryState, action);
- listeners.forEach((listener) => {
- listener(memoryState);
- });
-}
-
-type Toast = Omit;
-
-function toast({ ...props }: Toast) {
- const id = genId();
-
- const update = (props: ToasterToast) =>
- dispatch({
- type: "UPDATE_TOAST",
- toast: { ...props, id },
- });
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
-
- dispatch({
- type: "ADD_TOAST",
- toast: {
- ...props,
- id,
- open: true,
- onOpenChange: (open) => {
- if (!open) dismiss();
- },
- },
- });
-
- return {
- id: id,
- dismiss,
- update,
- };
-}
-
-function useToast() {
- const [state, setState] = React.useState(memoryState);
-
- React.useEffect(() => {
- listeners.push(setState);
- return () => {
- const index = listeners.indexOf(setState);
- if (index > -1) {
- listeners.splice(index, 1);
- }
- };
- }, [state]);
-
- return {
- ...state,
- toast,
- dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
- };
-}
-
-export { useToast, toast };
diff --git a/apps/console2/src/hooks/useDelayedEffect.ts b/apps/console/src/hooks/useDelayedEffect.ts
similarity index 100%
rename from apps/console2/src/hooks/useDelayedEffect.ts
rename to apps/console/src/hooks/useDelayedEffect.ts
diff --git a/apps/console2/src/hooks/useFetchQuery.ts b/apps/console/src/hooks/useFetchQuery.ts
similarity index 100%
rename from apps/console2/src/hooks/useFetchQuery.ts
rename to apps/console/src/hooks/useFetchQuery.ts
diff --git a/apps/console2/src/hooks/useFormWithSchema.ts b/apps/console/src/hooks/useFormWithSchema.ts
similarity index 100%
rename from apps/console2/src/hooks/useFormWithSchema.ts
rename to apps/console/src/hooks/useFormWithSchema.ts
diff --git a/apps/console2/src/hooks/useMutationWithToasts.ts b/apps/console/src/hooks/useMutationWithToasts.ts
similarity index 100%
rename from apps/console2/src/hooks/useMutationWithToasts.ts
rename to apps/console/src/hooks/useMutationWithToasts.ts
diff --git a/apps/console2/src/hooks/useOrganizationId.ts b/apps/console/src/hooks/useOrganizationId.ts
similarity index 100%
rename from apps/console2/src/hooks/useOrganizationId.ts
rename to apps/console/src/hooks/useOrganizationId.ts
diff --git a/apps/console2/src/hooks/useVendorSearch.ts b/apps/console/src/hooks/useVendorSearch.ts
similarity index 100%
rename from apps/console2/src/hooks/useVendorSearch.ts
rename to apps/console/src/hooks/useVendorSearch.ts
diff --git a/apps/console2/src/index.css b/apps/console/src/index.css
similarity index 100%
rename from apps/console2/src/index.css
rename to apps/console/src/index.css
diff --git a/apps/console/src/layouts/AuthLayout.tsx b/apps/console/src/layouts/AuthLayout.tsx
deleted file mode 100644
index d235f6c19..000000000
--- a/apps/console/src/layouts/AuthLayout.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Toaster } from "@/components/ui/toaster";
-import { ReactNode } from "react";
-
-export default function AuthLayout({ children }: { children: ReactNode }) {
- return (
-
-
-
-
-
-
-
-

-
-
-
- Navigate compliance with
-
- confidence thanks to{" "}
- probo
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console2/src/layouts/MainLayout.tsx b/apps/console/src/layouts/MainLayout.tsx
similarity index 100%
rename from apps/console2/src/layouts/MainLayout.tsx
rename to apps/console/src/layouts/MainLayout.tsx
diff --git a/apps/console2/src/layouts/__generated__/MainLayoutQuery.graphql.ts b/apps/console/src/layouts/__generated__/MainLayoutQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/layouts/__generated__/MainLayoutQuery.graphql.ts
rename to apps/console/src/layouts/__generated__/MainLayoutQuery.graphql.ts
diff --git a/apps/console/src/lib/utils.ts b/apps/console/src/lib/utils.ts
deleted file mode 100644
index a5ef19350..000000000
--- a/apps/console/src/lib/utils.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { clsx, type ClassValue } from "clsx";
-import { twMerge } from "tailwind-merge";
-
-export function cn(...inputs: ClassValue[]) {
- return twMerge(clsx(inputs));
-}
diff --git a/apps/console2/src/main.tsx b/apps/console/src/main.tsx
similarity index 100%
rename from apps/console2/src/main.tsx
rename to apps/console/src/main.tsx
diff --git a/apps/console2/src/pages/DocumentSigningRequestsPage.tsx b/apps/console/src/pages/DocumentSigningRequestsPage.tsx
similarity index 100%
rename from apps/console2/src/pages/DocumentSigningRequestsPage.tsx
rename to apps/console/src/pages/DocumentSigningRequestsPage.tsx
diff --git a/apps/console/src/pages/ErrorPage.tsx b/apps/console/src/pages/ErrorPage.tsx
deleted file mode 100644
index 66e8bee76..000000000
--- a/apps/console/src/pages/ErrorPage.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { AlertCircle } from "lucide-react";
-import { Link } from "react-router";
-
-export interface ErrorPageProps {
- error?: Error;
- title?: string;
- description?: string;
-}
-
-export function ErrorPage({
- error,
- title = "Something went wrong",
- description = "An unexpected error occurred. Please try again later.",
-}: ErrorPageProps) {
- return (
-
-
-
{title}
-
{description}
- {error?.message && (
-
- {error.message}
-
- )}
-
- Return Home
-
-
- );
-}
diff --git a/apps/console/src/pages/NotFoundPage.tsx b/apps/console/src/pages/NotFoundPage.tsx
deleted file mode 100644
index 0570137cf..000000000
--- a/apps/console/src/pages/NotFoundPage.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Link } from "react-router";
-import { Helmet } from "react-helmet-async";
-
-export default function NotFoundPage() {
- return (
- <>
-
- 404 - Probo Console
-
-
-
The page might have been moved, deleted, or never existed.
-
Return to Home
-
- >
- );
-}
diff --git a/apps/console/src/pages/OrganizationSelectionPage.tsx b/apps/console/src/pages/OrganizationSelectionPage.tsx
deleted file mode 100644
index 4fd29a417..000000000
--- a/apps/console/src/pages/OrganizationSelectionPage.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import { useEffect } from "react";
-import { useNavigate } from "react-router";
-import { graphql, useLazyLoadQuery } from "react-relay";
-import { Helmet } from "react-helmet-async";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardHeader,
- CardTitle,
- CardDescription,
- CardFooter,
-} from "@/components/ui/card";
-import { Plus } from "lucide-react";
-import { OrganizationSelectionPageQuery } from "./__generated__/OrganizationSelectionPageQuery.graphql";
-
-const organizationSelectionQuery = graphql`
- query OrganizationSelectionPageQuery {
- viewer {
- organizations(first: 25) {
- edges {
- node {
- id
- name
- logoUrl
- }
- }
- }
- }
- }
-`;
-
-export default function OrganizationSelectionPage() {
- const navigate = useNavigate();
- const data = useLazyLoadQuery(
- organizationSelectionQuery,
- {},
- );
-
- const organizations = data.viewer.organizations.edges.map(
- (edge) => edge.node,
- );
-
- useEffect(() => {
- if (organizations.length === 1) {
- navigate(`/organizations/${organizations[0].id}`);
- }
- }, [organizations, navigate]);
-
- if (organizations.length === 0) {
- return (
-
-
- Select Organization - Probo
-
-
-
-
- Welcome to Probo
-
- You don{"'"}t have any organizations yet. Create your first one
- to get started.
-
-
-
-
-
-
-
-
- );
- }
-
- return (
-
-
- Select Organization - Probo
-
-
-
Select an Organization
-
- {organizations.map((org) => (
-
-
- {org.logoUrl && (
-
-

-
- )}
-
- {org.name}
-
-
-
-
-
-
- ))}
-
-
- Create a New Organization
-
- Add a new organization to your account
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console2/src/pages/OrganizationsPage.tsx b/apps/console/src/pages/OrganizationsPage.tsx
similarity index 100%
rename from apps/console2/src/pages/OrganizationsPage.tsx
rename to apps/console/src/pages/OrganizationsPage.tsx
diff --git a/apps/console/src/pages/SigningRequestsPage.tsx b/apps/console/src/pages/SigningRequestsPage.tsx
deleted file mode 100644
index c77904a2e..000000000
--- a/apps/console/src/pages/SigningRequestsPage.tsx
+++ /dev/null
@@ -1,274 +0,0 @@
-import { useEffect, useState } from "react";
-import { useSearchParams } from "react-router";
-import { Helmet } from "react-helmet-async";
-import { buildEndpoint } from "../utils";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardFooter,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import { Progress } from "@/components/ui/progress";
-import ReactMarkdown from "react-markdown";
-import remarkGfm from "remark-gfm";
-import rehypeRaw from 'rehype-raw';
-
-type Document = {
- document_version_id: string;
- title: string;
- content: string;
- signed?: boolean;
-};
-
-type SigningResponse = {
- documents: Document[];
- requesterName: string;
- requesterOrganization: string;
-};
-
-export default function SigningRequestsPage() {
- const [searchParams] = useSearchParams();
- const token = searchParams.get("token");
-
- const [loading, setLoading] = useState(true);
- const [error, setError] = useState(null);
- const [signingData, setSigningData] = useState(null);
- const [currentDocIndex, setCurrentDocIndex] = useState(0);
-
- // Fetch documents to sign using the token
- useEffect(() => {
- if (!token) {
- setError("Missing signing token. Please check your URL and try again.");
- setLoading(false);
- return;
- }
-
- async function fetchDocuments() {
- try {
- const response = await fetch(
- buildEndpoint("/api/console/v1/documents/signing-requests"),
- {
- method: "GET",
- headers: {
- Authorization: `Bearer ${token}`,
- "Content-Type": "application/json",
- },
- },
- );
-
- if (!response.ok) {
- throw new Error("Failed to fetch signing documents");
- }
-
- const documents: Document[] = await response.json();
- // Transform the API response to match our internal structure
- const enhancedDocuments = documents.map((doc) => ({
- ...doc,
- signed: false,
- }));
-
- setSigningData({
- documents: enhancedDocuments,
- requesterName: "Requester", // Default values as they're not in the API response
- requesterOrganization: "Organization",
- });
- } catch (err) {
- setError(
- err instanceof Error ? err.message : "An unknown error occurred",
- );
- } finally {
- setLoading(false);
- }
- }
-
- fetchDocuments();
- }, [token]);
-
- // Handle document signing
- const handleSignDocument = async () => {
- if (!signingData || !token) return;
-
- const docToSign = signingData.documents[currentDocIndex];
-
- try {
- const response = await fetch(
- buildEndpoint(
- `/api/console/v1/documents/signing-requests/${docToSign.document_version_id}/sign`,
- ),
- {
- method: "POST",
- headers: {
- Authorization: `Bearer ${token}`,
- "Content-Type": "application/json",
- },
- },
- );
-
- if (!response.ok) {
- throw new Error("Failed to sign document");
- }
-
- // Update local state
- const updatedDocs = [...signingData.documents];
- updatedDocs[currentDocIndex] = {
- ...updatedDocs[currentDocIndex],
- signed: true,
- };
-
- setSigningData({
- ...signingData,
- documents: updatedDocs,
- });
-
- // Move to next document if available
- if (currentDocIndex < updatedDocs.length - 1) {
- setCurrentDocIndex(currentDocIndex + 1);
- }
- } catch (err) {
- setError(err instanceof Error ? err.message : "Failed to sign document");
- }
- };
-
- // Handle going to next document
- const handleNextDocument = () => {
- if (signingData && currentDocIndex < signingData.documents.length - 1) {
- setCurrentDocIndex(currentDocIndex + 1);
- }
- };
-
- // Calculate progress
- const getSignedCount = () => {
- if (!signingData) return 0;
- return signingData.documents.filter((doc) => doc.signed).length;
- };
-
- const getProgressPercentage = () => {
- if (!signingData || signingData.documents.length === 0) return 0;
- return (getSignedCount() / signingData.documents.length) * 100;
- };
-
- // Loading state
- if (loading) {
- return (
-
-
-
- Loading Signing Requests
-
- Please wait while we fetch your documents...
-
-
-
-
- );
- }
-
- // Error state
- if (error) {
- return (
-
-
-
- Error
- {error}
-
-
-
-
-
-
- );
- }
-
- // No documents or missing data
- if (!signingData || signingData.documents.length === 0) {
- return (
-
-
-
- No Documents to Sign
-
- There are no documents requiring your signature at this time.
-
-
-
-
- );
- }
-
- // Current document
- const currentDoc = signingData.documents[currentDocIndex];
- const isLastDocument = currentDocIndex === signingData.documents.length - 1;
- const allSigned = getSignedCount() === signingData.documents.length;
-
- return (
-
-
- Document Signing - Probo
-
-
-
-
Document Signing Request
-
- From {signingData.requesterName} at{" "}
- {signingData.requesterOrganization}
-
-
-
-
-
- {getSignedCount()} of {signingData.documents.length} documents
- signed
-
-
- {Math.round(getProgressPercentage())}%
-
-
-
-
-
-
-
-
- {currentDoc.title}
-
- Document {currentDocIndex + 1} of {signingData.documents.length}
-
-
-
-
-
-
-
- {currentDoc.content}
-
-
-
-
-
-
- {currentDoc.signed ? (
-
-
✓ Signed
- {!isLastDocument && (
-
- )}
-
- ) : (
-
- )}
-
- {allSigned && (
-
- All documents have been signed
-
- )}
-
-
-
- );
-}
diff --git a/apps/console/src/pages/__generated__/OrganizationSelectionPageQuery.graphql.ts b/apps/console/src/pages/__generated__/OrganizationSelectionPageQuery.graphql.ts
deleted file mode 100644
index d67cd011f..000000000
--- a/apps/console/src/pages/__generated__/OrganizationSelectionPageQuery.graphql.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * @generated SignedSource<<282a94b76fe5e17bd40b45ced6445ef3>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationSelectionPageQuery$variables = Record;
-export type OrganizationSelectionPageQuery$data = {
- readonly viewer: {
- readonly organizations: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly logoUrl: string | null | undefined;
- readonly name: string;
- };
- }>;
- };
- };
-};
-export type OrganizationSelectionPageQuery = {
- response: OrganizationSelectionPageQuery$data;
- variables: OrganizationSelectionPageQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v1 = {
- "alias": null,
- "args": [
- {
- "kind": "Literal",
- "name": "first",
- "value": 25
- }
- ],
- "concreteType": "OrganizationConnection",
- "kind": "LinkedField",
- "name": "organizations",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "OrganizationEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Organization",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v0/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "logoUrl",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": "organizations(first:25)"
-};
-return {
- "fragment": {
- "argumentDefinitions": [],
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationSelectionPageQuery",
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Viewer",
- "kind": "LinkedField",
- "name": "viewer",
- "plural": false,
- "selections": [
- (v1/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [],
- "kind": "Operation",
- "name": "OrganizationSelectionPageQuery",
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Viewer",
- "kind": "LinkedField",
- "name": "viewer",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- (v0/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "2938cb693a84c22366862de424a84d4b",
- "id": null,
- "metadata": {},
- "name": "OrganizationSelectionPageQuery",
- "operationKind": "query",
- "text": "query OrganizationSelectionPageQuery {\n viewer {\n organizations(first: 25) {\n edges {\n node {\n id\n name\n logoUrl\n }\n }\n }\n id\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "c41774fd198ab5f0f4b866d805099baf";
-
-export default node;
diff --git a/apps/console2/src/pages/__generated__/OrganizationsPageQuery.graphql.ts b/apps/console/src/pages/__generated__/OrganizationsPageQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/pages/__generated__/OrganizationsPageQuery.graphql.ts
rename to apps/console/src/pages/__generated__/OrganizationsPageQuery.graphql.ts
diff --git a/apps/console2/src/pages/auth/LoginPage.tsx b/apps/console/src/pages/auth/LoginPage.tsx
similarity index 100%
rename from apps/console2/src/pages/auth/LoginPage.tsx
rename to apps/console/src/pages/auth/LoginPage.tsx
diff --git a/apps/console/src/pages/authentication/ConfirmEmailPage.tsx b/apps/console/src/pages/authentication/ConfirmEmailPage.tsx
deleted file mode 100644
index 5e973efd8..000000000
--- a/apps/console/src/pages/authentication/ConfirmEmailPage.tsx
+++ /dev/null
@@ -1,170 +0,0 @@
-import { useState, useEffect } from "react";
-import { useLocation, useNavigate } from "react-router";
-import { Helmet } from "react-helmet-async";
-import { Button } from "@/components/ui/button";
-import { useToast } from "@/hooks/use-toast";
-import { Link } from "react-router";
-import { useMutation } from "react-relay";
-import { graphql } from "relay-runtime";
-import { PayloadError } from "relay-runtime";
-import { ConfirmEmailPageMutation } from "./__generated__/ConfirmEmailPageMutation.graphql";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import {
- Card,
- CardContent,
- CardDescription,
- CardFooter,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-
-const ConfirmEmailMutation = graphql`
- mutation ConfirmEmailPageMutation($input: ConfirmEmailInput!) {
- confirmEmail(input: $input) {
- success
- }
- }
-`;
-
-export default function ConfirmEmailPage() {
- const [isLoading, setIsLoading] = useState(false);
- const [isConfirmed, setIsConfirmed] = useState(false);
- const [error, setError] = useState(null);
- const [token, setToken] = useState("");
- const location = useLocation();
- const navigate = useNavigate();
- const { toast } = useToast();
- const [commitMutation] =
- useMutation(ConfirmEmailMutation);
-
- useEffect(() => {
- // Extract token from URL and prefill the form
- const searchParams = new URLSearchParams(location.search);
- const urlToken = searchParams.get("token");
-
- if (urlToken) {
- setToken(urlToken);
- }
- }, [location.search]);
-
- const handleSubmit = async (e: React.FormEvent) => {
- e.preventDefault();
- setIsLoading(true);
- setError(null);
-
- if (!token.trim()) {
- setError("Please enter a confirmation token");
- setIsLoading(false);
- return;
- }
-
- try {
- commitMutation({
- variables: {
- input: {
- token: token.trim(),
- },
- },
- onCompleted: (response, errors: PayloadError[] | null) => {
- if (errors) {
- throw new Error(errors[0]?.message || "Failed to confirm email");
- }
-
- setIsConfirmed(true);
- toast({
- title: "Success",
- description: "Your email has been confirmed successfully",
- });
-
- setIsLoading(false);
- },
- onError: (err) => {
- setError(err.message || "Failed to confirm email. Please try again.");
- setIsLoading(false);
- },
- });
- } catch (error) {
- setError(
- error instanceof Error
- ? error.message
- : "Failed to confirm email. Please try again.",
- );
- setIsLoading(false);
- }
- };
-
- return (
- <>
-
- Confirm Email - Probo
-
-
-
-
-
-
- Email Confirmation
-
-
- Confirm your email address to complete registration
-
-
-
-
- {isConfirmed ? (
-
-
- Your email has been confirmed successfully!
-
-
-
- ) : (
-
- )}
-
-
-
- {!isConfirmed && (
-
- Back to Login
-
- )}
-
-
-
- >
- );
-}
diff --git a/apps/console/src/pages/authentication/ConfirmInvitationPage.tsx b/apps/console/src/pages/authentication/ConfirmInvitationPage.tsx
deleted file mode 100644
index 1dab91b43..000000000
--- a/apps/console/src/pages/authentication/ConfirmInvitationPage.tsx
+++ /dev/null
@@ -1,209 +0,0 @@
-import { useState, useEffect } from "react";
-import { useLocation, useNavigate } from "react-router";
-import { Helmet } from "react-helmet-async";
-import { Button } from "@/components/ui/button";
-import { useToast } from "@/hooks/use-toast";
-import { Link } from "react-router";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { buildEndpoint } from "@/utils";
-import {
- Card,
- CardContent,
- CardDescription,
- CardFooter,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-
-export default function ConfirmInvitationPage() {
- const [isLoading, setIsLoading] = useState(false);
- const [isConfirmed, setIsConfirmed] = useState(false);
- const [error, setError] = useState(null);
- const [token, setToken] = useState("");
- const [password, setPassword] = useState("");
- const [confirmPassword, setConfirmPassword] = useState("");
- const location = useLocation();
- const navigate = useNavigate();
- const { toast } = useToast();
-
- useEffect(() => {
- // Extract token from URL and prefill the form
- const searchParams = new URLSearchParams(location.search);
- const urlToken = searchParams.get("token");
-
- if (urlToken) {
- setToken(urlToken);
- }
- }, [location.search]);
-
- const handleSubmit = async (e: React.FormEvent) => {
- e.preventDefault();
- setIsLoading(true);
- setError(null);
-
- if (!token.trim()) {
- setError("Please enter a confirmation token");
- setIsLoading(false);
- return;
- }
-
- if (!password) {
- setError("Please enter a password");
- setIsLoading(false);
- return;
- }
-
- if (password !== confirmPassword) {
- setError("Passwords do not match");
- setIsLoading(false);
- return;
- }
-
- if (password.length < 8) {
- setError("Password must be at least 8 characters long");
- setIsLoading(false);
- return;
- }
-
- try {
- const response = await fetch(
- buildEndpoint("/api/console/v1/auth/invitation"),
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- credentials: "include",
- body: JSON.stringify({
- token: token.trim(),
- password: password,
- }),
- },
- );
-
- const data = await response.json();
-
- if (!response.ok) {
- throw new Error(data.message || "Failed to confirm invitation");
- }
-
- setIsConfirmed(true);
- toast({
- title: "Success",
- description: "Your invitation has been confirmed successfully",
- });
- } catch (error) {
- setError(
- error instanceof Error
- ? error.message
- : "Failed to confirm invitation. Please try again.",
- );
- } finally {
- setIsLoading(false);
- }
- };
-
- return (
- <>
-
- Confirm Invitation - Probo
-
-
-
-
-
-
- Invitation Confirmation
-
-
- Complete your account setup to join the organization
-
-
-
-
- {isConfirmed ? (
-
-
- Your invitation has been confirmed successfully!
-
-
-
- ) : (
-
- )}
-
-
-
- {!isConfirmed && (
-
- Back to Login
-
- )}
-
-
-
- >
- );
-}
diff --git a/apps/console/src/pages/authentication/ErrorBoundary.tsx b/apps/console/src/pages/authentication/ErrorBoundary.tsx
deleted file mode 100644
index 83e539d1f..000000000
--- a/apps/console/src/pages/authentication/ErrorBoundary.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import VisitorErrorBoundary from "@/components/VisitorErrorBoundary";
-import { useLocation } from "react-router";
-
-export function VisitorErrorBoundaryWithLocation({
- children,
-}: {
- children: React.ReactNode;
-}) {
- const location = useLocation();
- return (
-
- {children}
-
- );
-}
diff --git a/apps/console/src/pages/authentication/ForgotPasswordPage.tsx b/apps/console/src/pages/authentication/ForgotPasswordPage.tsx
deleted file mode 100644
index d25547fe8..000000000
--- a/apps/console/src/pages/authentication/ForgotPasswordPage.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-import { useState } from "react";
-import { Link } from "react-router";
-import { Helmet } from "react-helmet-async";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { buildEndpoint } from "@/utils";
-import { useToast } from "@/hooks/use-toast";
-import {
- Card,
- CardContent,
- CardDescription,
- CardFooter,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-
-export default function ForgotPasswordPage() {
- const [email, setEmail] = useState("");
- const [isLoading, setIsLoading] = useState(false);
- const [isSubmitted, setIsSubmitted] = useState(false);
- const { toast } = useToast();
-
- const handleSubmit = async (e: React.FormEvent) => {
- e.preventDefault();
- setIsLoading(true);
-
- try {
- const response = await fetch(
- buildEndpoint("/api/console/v1/auth/forget-password"),
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({ email }),
- },
- );
-
- if (!response.ok) {
- const error = await response.json();
- throw new Error(error.message || "Failed to request password reset");
- }
-
- setIsSubmitted(true);
- toast({
- title: "Check your email",
- description: "If an account exists, you'll receive reset instructions",
- });
- } catch (error) {
- toast({
- title: "Error",
- description:
- error instanceof Error ? error.message : "An error occurred",
- variant: "destructive",
- });
- } finally {
- setIsLoading(false);
- }
- };
-
- return (
- <>
-
- Forgot Password - Probo
-
-
-
-
-
-
- Forgot Password
-
-
- Enter your email address and we{"'"}ll send you a link to reset
- your password
-
-
-
-
- {isSubmitted ? (
-
-
- Check your email for instructions to reset your password. If
- you don{"'"}t see it, check your spam folder.
-
-
-
- ) : (
-
- )}
-
-
-
-
- Back to Login
-
-
-
-
- >
- );
-}
diff --git a/apps/console/src/pages/authentication/LoginPage.tsx b/apps/console/src/pages/authentication/LoginPage.tsx
deleted file mode 100644
index 150d11026..000000000
--- a/apps/console/src/pages/authentication/LoginPage.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-import { useState, useEffect } from "react";
-import { Link, useLocation } from "react-router";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { buildEndpoint } from "@/utils";
-import { useToast } from "@/hooks/use-toast";
-
-export default function LoginPage() {
- const [email, setEmail] = useState("");
- const [password, setPassword] = useState("");
- const [isLoading, setIsLoading] = useState(false);
- const { toast } = useToast();
- const location = useLocation();
-
- useEffect(() => {
- if (location.state?.authRequired) {
- toast({
- title: "Authentication Required",
- description: "You need to log in to access this resource",
- variant: "destructive",
- });
- }
- }, [location, toast]);
-
- const handleSubmit = async (e: React.FormEvent) => {
- e.preventDefault();
- setIsLoading(true);
-
- try {
- const response = await fetch(
- buildEndpoint("/api/console/v1/auth/login"),
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- credentials: "include",
- body: JSON.stringify({ email, password }),
- },
- );
-
- if (!response.ok) {
- const error = await response.json();
- throw new Error(error.message || "Failed to login");
- }
-
- window.location.href = "/";
- } catch (error: unknown) {
- toast({
- title: "Error",
- description: error instanceof Error ? error.message : "Failed to login",
- variant: "destructive",
- });
- } finally {
- setIsLoading(false);
- }
- };
-
- return (
-
-
-
- Login to your account
-
-
- Enter your email below to login to your account
-
-
-
-
- Don't have an account?{" "}
-
- Register
-
-
-
- );
-}
diff --git a/apps/console/src/pages/authentication/RegisterPage.tsx b/apps/console/src/pages/authentication/RegisterPage.tsx
deleted file mode 100644
index 125a551f8..000000000
--- a/apps/console/src/pages/authentication/RegisterPage.tsx
+++ /dev/null
@@ -1,135 +0,0 @@
-import { useState } from "react";
-import { Link, useNavigate } from "react-router";
-import { Helmet } from "react-helmet-async";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { buildEndpoint } from "@/utils";
-import { useToast } from "@/hooks/use-toast";
-
-export default function RegisterPage() {
- const [email, setEmail] = useState("");
- const [password, setPassword] = useState("");
- const [fullName, setFullName] = useState("");
- const [isLoading, setIsLoading] = useState(false);
- const { toast } = useToast();
- const navigate = useNavigate();
-
- const handleSubmit = async (e: React.FormEvent) => {
- e.preventDefault();
-
- if (!email || !password || !fullName) {
- toast({
- title: "Error",
- description: "Full name, email, and password are required",
- variant: "destructive",
- });
- return;
- }
-
- setIsLoading(true);
-
- try {
- const response = await fetch(
- buildEndpoint("/api/console/v1/auth/register"),
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- credentials: "include",
- body: JSON.stringify({ email, password, fullName }),
- },
- );
-
- if (!response.ok) {
- const errorData = await response.json().catch(() => ({}));
- throw new Error(errorData.message || "Registration failed");
- }
-
- toast({
- title: "Success",
- description: "Account created successfully",
- });
-
- navigate("/", { replace: true });
- } catch (error) {
- toast({
- title: "Error",
- description:
- error instanceof Error ? error.message : "Registration failed",
- variant: "destructive",
- });
- } finally {
- setIsLoading(false);
- }
- };
-
- return (
- <>
-
- Sign up - Probo
-
-
-
-
-
Sign up
-
- Enter your information to create an account
-
-
-
-
-
-
-
- Already have an account?{" "}
-
- Log in here
-
-
-
-
- >
- );
-}
diff --git a/apps/console/src/pages/authentication/ResetPasswordPage.tsx b/apps/console/src/pages/authentication/ResetPasswordPage.tsx
deleted file mode 100644
index 96e000f8c..000000000
--- a/apps/console/src/pages/authentication/ResetPasswordPage.tsx
+++ /dev/null
@@ -1,208 +0,0 @@
-import { useState, useEffect } from "react";
-import { useLocation, useNavigate } from "react-router";
-import { Helmet } from "react-helmet-async";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { buildEndpoint } from "@/utils";
-import { useToast } from "@/hooks/use-toast";
-import { Link } from "react-router";
-import {
- Card,
- CardContent,
- CardDescription,
- CardFooter,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-
-export default function ResetPasswordPage() {
- const [isLoading, setIsLoading] = useState(false);
- const [isReset, setIsReset] = useState(false);
- const [error, setError] = useState(null);
- const [token, setToken] = useState("");
- const [password, setPassword] = useState("");
- const [confirmPassword, setConfirmPassword] = useState("");
- const location = useLocation();
- const navigate = useNavigate();
- const { toast } = useToast();
-
- useEffect(() => {
- // Extract token from URL and prefill the form
- const searchParams = new URLSearchParams(location.search);
- const urlToken = searchParams.get("token");
-
- if (urlToken) {
- setToken(urlToken);
- }
- }, [location.search]);
-
- const handleSubmit = async (e: React.FormEvent) => {
- e.preventDefault();
- setIsLoading(true);
- setError(null);
-
- if (!token.trim()) {
- setError("Please enter a reset token");
- setIsLoading(false);
- return;
- }
-
- if (!password) {
- setError("Please enter a password");
- setIsLoading(false);
- return;
- }
-
- if (password !== confirmPassword) {
- setError("Passwords do not match");
- setIsLoading(false);
- return;
- }
-
- if (password.length < 8) {
- setError("Password must be at least 8 characters long");
- setIsLoading(false);
- return;
- }
-
- try {
- const response = await fetch(
- buildEndpoint("/api/console/v1/auth/reset-password"),
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- token: token.trim(),
- password: password,
- }),
- },
- );
-
- const data = await response.json();
-
- if (!response.ok) {
- throw new Error(data.message || "Failed to reset password");
- }
-
- setIsReset(true);
- toast({
- title: "Success",
- description: "Your password has been reset successfully",
- });
- } catch (error) {
- setError(
- error instanceof Error
- ? error.message
- : "Failed to reset password. Please try again.",
- );
- } finally {
- setIsLoading(false);
- }
- };
-
- return (
- <>
-
- Reset Password - Probo
-
-
-
-
-
-
- Reset Password
-
-
- Enter your new password below
-
-
-
-
- {isReset ? (
-
-
- Your password has been reset successfully!
-
-
-
- ) : (
-
- )}
-
-
-
- {!isReset && (
-
- Back to Login
-
- )}
-
-
-
- >
- );
-}
diff --git a/apps/console/src/pages/authentication/Routes.tsx b/apps/console/src/pages/authentication/Routes.tsx
deleted file mode 100644
index bf1ab635e..000000000
--- a/apps/console/src/pages/authentication/Routes.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { Suspense } from "react";
-import { Route, Routes } from "react-router";
-import ConfirmEmailPage from "./ConfirmEmailPage";
-import ConfirmInvitationPage from "./ConfirmInvitationPage";
-import ForgotPasswordPage from "./ForgotPasswordPage";
-import LoginPage from "./LoginPage";
-import RegisterPage from "./RegisterPage";
-import ResetPasswordPage from "./ResetPasswordPage";
-import { VisitorErrorBoundaryWithLocation } from "./ErrorBoundary";
-import NotFoundPage from "../NotFoundPage";
-
-export function AuthenticationRoutes() {
- return (
-
-
-
-
-
-
- }
- />
-
-
-
-
-
- }
- />
-
-
-
-
-
- }
- />
-
-
-
-
-
- }
- />
-
-
-
-
-
- }
- />
-
-
-
-
-
- }
- />
- } />
-
- );
-}
diff --git a/apps/console/src/pages/authentication/__generated__/ConfirmEmailPageMutation.graphql.ts b/apps/console/src/pages/authentication/__generated__/ConfirmEmailPageMutation.graphql.ts
deleted file mode 100644
index 95108e081..000000000
--- a/apps/console/src/pages/authentication/__generated__/ConfirmEmailPageMutation.graphql.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @generated SignedSource<<3de8e69abff0cf5f1000d93dde7a3031>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type ConfirmEmailInput = {
- token: string;
-};
-export type ConfirmEmailPageMutation$variables = {
- input: ConfirmEmailInput;
-};
-export type ConfirmEmailPageMutation$data = {
- readonly confirmEmail: {
- readonly success: boolean;
- };
-};
-export type ConfirmEmailPageMutation = {
- response: ConfirmEmailPageMutation$data;
- variables: ConfirmEmailPageMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
- }
-],
-v1 = [
- {
- "alias": null,
- "args": [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
- ],
- "concreteType": "ConfirmEmailPayload",
- "kind": "LinkedField",
- "name": "confirmEmail",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "success",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "ConfirmEmailPageMutation",
- "selections": (v1/*: any*/),
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "ConfirmEmailPageMutation",
- "selections": (v1/*: any*/)
- },
- "params": {
- "cacheID": "b6bde3a559a4ecb70a519ffb7fa83330",
- "id": null,
- "metadata": {},
- "name": "ConfirmEmailPageMutation",
- "operationKind": "mutation",
- "text": "mutation ConfirmEmailPageMutation(\n $input: ConfirmEmailInput!\n) {\n confirmEmail(input: $input) {\n success\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "e7f442b5acc6d912bf272ca2f5dc1ef1";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/CreateOrganizationPage.tsx b/apps/console/src/pages/organizations/CreateOrganizationPage.tsx
deleted file mode 100644
index 4bbbad33d..000000000
--- a/apps/console/src/pages/organizations/CreateOrganizationPage.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { PageTemplateSkeleton } from "@/components/PageTemplate";
-import { Suspense } from "react";
-import { lazy } from "@probo/react-lazy";
-import { useLocation } from "react-router";
-import { ErrorBoundaryWithLocation } from "./ErrorBoundary";
-
-export function CreateOrganizationViewSkeleton() {
- return (
-
-
-
- );
-}
-
-const CreateOrganizationView = lazy(() => import("./CreateOrganizationView"));
-
-export function CreateOrganizationPage() {
- const location = useLocation();
-
- return (
- }
- >
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/CreateOrganizationView.tsx b/apps/console/src/pages/organizations/CreateOrganizationView.tsx
deleted file mode 100644
index 88c8770d2..000000000
--- a/apps/console/src/pages/organizations/CreateOrganizationView.tsx
+++ /dev/null
@@ -1,170 +0,0 @@
-import { useState } from "react";
-import { useNavigate } from "react-router";
-import {
- graphql,
- ConnectionHandler,
- useMutation,
- useLazyLoadQuery,
-} from "react-relay";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardHeader,
- CardTitle,
- CardDescription,
- CardContent,
-} from "@/components/ui/card";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { useToast } from "@/hooks/use-toast";
-import { HelpCircle } from "lucide-react";
-import { CreateOrganizationViewCreateOrganizationMutation } from "./__generated__/CreateOrganizationViewCreateOrganizationMutation.graphql";
-import { CreateOrganizationViewViewerQuery } from "./__generated__/CreateOrganizationViewViewerQuery.graphql";
-import { PageTemplate } from "@/components/PageTemplate";
-
-const createOrganizationMutation = graphql`
- mutation CreateOrganizationViewCreateOrganizationMutation(
- $input: CreateOrganizationInput!
- $connections: [ID!]!
- ) {
- createOrganization(input: $input) {
- organizationEdge @appendEdge(connections: $connections) {
- node {
- id
- name
- logoUrl
- }
- }
- }
- }
-`;
-
-const viewerQuery = graphql`
- query CreateOrganizationViewViewerQuery {
- viewer {
- id
- }
- }
-`;
-
-function EditableField({
- label,
- value,
- onChange,
- type = "text",
- helpText,
- required,
-}: {
- label: string;
- value: string;
- onChange: (value: string) => void;
- type?: string;
- helpText?: string;
- required?: boolean;
-}) {
- return (
-
-
-
-
-
-
-
onChange(e.target.value)}
- required={required}
- />
- {helpText &&
{helpText}
}
-
-
- );
-}
-
-export default function CreateOrganizationView() {
- const navigate = useNavigate();
- const { toast } = useToast();
- const data = useLazyLoadQuery(
- viewerQuery,
- {},
- );
- const [createOrganization] =
- useMutation(
- createOrganizationMutation,
- );
- const [formData, setFormData] = useState({
- name: "",
- });
-
- const handleFieldChange = (field: keyof typeof formData, value: string) => {
- setFormData((prev) => ({
- ...prev,
- [field]: value,
- }));
- };
-
- const handleSubmit = (e: React.FormEvent) => {
- e.preventDefault();
-
- createOrganization({
- variables: {
- input: {
- name: formData.name,
- },
- connections: [
- ConnectionHandler.getConnectionID(
- data.viewer.id,
- "OrganizationSwitcher_organizations",
- ),
- ],
- },
- onCompleted: (response) => {
- const newOrg = response.createOrganization.organizationEdge.node;
- toast({
- title: "Success",
- description: "Organization created successfully",
- variant: "default",
- });
- navigate(`/organizations/${newOrg.id}`);
- },
- onError: (error) => {
- toast({
- title: "Error",
- description: error.message || "Failed to create organization",
- variant: "destructive",
- });
- },
- });
- };
-
- return (
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/ErrorBoundary.tsx b/apps/console/src/pages/organizations/ErrorBoundary.tsx
deleted file mode 100644
index d3abcaef5..000000000
--- a/apps/console/src/pages/organizations/ErrorBoundary.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import ErrorBoundary from "@/components/ErrorBoundary";
-import { useLocation } from "react-router";
-
-export function ErrorBoundaryWithLocation({
- children,
-}: {
- children: React.ReactNode;
-}) {
- const location = useLocation();
- return {children};
-}
diff --git a/apps/console/src/pages/organizations/HomePage.tsx b/apps/console/src/pages/organizations/HomePage.tsx
deleted file mode 100644
index 177891872..000000000
--- a/apps/console/src/pages/organizations/HomePage.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import { Navigate, useParams } from "react-router";
-
-export default function HomePage() {
- const { organizationId } = useParams();
- return ;
-}
diff --git a/apps/console2/src/pages/organizations/NewOrganizationPage.tsx b/apps/console/src/pages/organizations/NewOrganizationPage.tsx
similarity index 100%
rename from apps/console2/src/pages/organizations/NewOrganizationPage.tsx
rename to apps/console/src/pages/organizations/NewOrganizationPage.tsx
diff --git a/apps/console/src/pages/organizations/NoOrganizationLayout.tsx b/apps/console/src/pages/organizations/NoOrganizationLayout.tsx
deleted file mode 100644
index 604b74dfc..000000000
--- a/apps/console/src/pages/organizations/NoOrganizationLayout.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import { NavLink, Outlet, Route, Routes, To } from "react-router";
-import { AppSidebar } from "@/components/AppSidebar";
-import { ReactNode, Suspense } from "react";
-import {
- Breadcrumb,
- BreadcrumbItem,
- BreadcrumbLink,
- BreadcrumbList,
- BreadcrumbPage,
- BreadcrumbSeparator,
-} from "@/components/ui/breadcrumb";
-import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
-import { Toaster } from "@/components/ui/toaster";
-import { cn } from "@/lib/utils";
-import ErrorBoundary from "@/components/ErrorBoundary";
-
-const BreadCrumbNavLink = ({
- to,
- children,
- className,
-}: {
- to: To;
- children?: ReactNode;
- className?: string;
-}) => {
- return (
-
-
- {({ isActive }) => (
-
- {children}
-
- )}
-
-
- );
-};
-
-function BreadcrumbHome() {
- return (
-
-
-
- Home
-
-
-
-
- );
-}
-
-export default function NoOrganizationLayout() {
- return (
-
-
-
-
-
-
-
-
-
-
- }>
-
-
-
- New Organization
-
- >
- }
- />
-
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/OrganizationBreadcrumb.tsx b/apps/console/src/pages/organizations/OrganizationBreadcrumb.tsx
deleted file mode 100644
index 904461e3a..000000000
--- a/apps/console/src/pages/organizations/OrganizationBreadcrumb.tsx
+++ /dev/null
@@ -1,725 +0,0 @@
-import {
- Breadcrumb,
- BreadcrumbItem,
- BreadcrumbLink,
- BreadcrumbList,
- BreadcrumbPage,
- BreadcrumbSeparator,
-} from "@/components/ui/breadcrumb";
-import { cn } from "@/lib/utils";
-import { ReactNode, Suspense } from "react";
-import { graphql, useLazyLoadQuery } from "react-relay";
-import { NavLink, Outlet, Route, Routes, To, useParams } from "react-router";
-
-import { OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbVendorOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbVendorOverviewQuery.graphql";
-import { OrganizationBreadcrumbOrganizationQuery } from "./__generated__/OrganizationBreadcrumbOrganizationQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbMeasureViewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbMeasureViewQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbControlQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbControlQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbRiskShowQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbRiskShowQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbAssetOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbAssetOverviewQuery.graphql";
-import { OrganizationBreadcrumbBreadcrumbDataOverviewQuery } from "./__generated__/OrganizationBreadcrumbBreadcrumbDataOverviewQuery.graphql";
-import ErrorBoundary from "@/components/ErrorBoundary";
-
-const New = () => {
- return (
- <>
-
-
- New
-
- >
- );
-};
-
-const Edit = () => {
- return (
- <>
-
-
- Edit
-
- >
- );
-};
-
-const BreadcrumbNavLink = ({
- to,
- children,
- className,
-}: {
- to: To;
- children?: ReactNode;
- className?: string;
-}) => {
- return (
-
-
- {({ isActive }) => (
-
- {children}
-
- )}
-
-
- );
-};
-
-function BreadcrumbHome() {
- return (
-
-
-
- Home
-
-
-
-
- );
-}
-
-function BreadCrumbOrganization() {
- const { organizationId } = useParams();
-
- const data = useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbOrganizationQuery($organizationId: ID!) {
- organization: node(id: $organizationId) {
- ... on Organization {
- name
- }
- }
- }
- `,
- { organizationId: organizationId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
-
-
-
-
- {data.organization?.name || "Home"}
-
-
-
-
-
- );
-}
-
-function BreadcrumbFrameworkList() {
- const { organizationId } = useParams();
- return (
- <>
-
-
-
- Frameworks
-
-
-
- >
- );
-}
-
-function BreadcrumbFrameworkOverview() {
- const { organizationId, frameworkId } = useParams();
- const data =
- useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery(
- $frameworkId: ID!
- ) {
- framework: node(id: $frameworkId) {
- id
- ... on Framework {
- name
- }
- }
- }
- `,
- { frameworkId: frameworkId! },
- );
-
- return (
- <>
-
-
-
- {data.framework?.name}
-
-
-
- >
- );
-}
-
-function BreadcrumbVendorList() {
- const { organizationId } = useParams();
- return (
- <>
-
-
-
- Vendors
-
-
-
- >
- );
-}
-
-function BreadcrumbVendorOverview() {
- const { organizationId, vendorId } = useParams();
- const data =
- useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbVendorOverviewQuery(
- $vendorId: ID!
- ) {
- vendor: node(id: $vendorId) {
- id
- ... on Vendor {
- name
- }
- }
- }
- `,
- { vendorId: vendorId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
- <>
-
-
-
- {data.vendor.name}
-
-
-
- >
- );
-}
-
-function BreadcrumbPeopleList() {
- const { organizationId } = useParams();
- return (
- <>
-
-
-
- People
-
-
-
- >
- );
-}
-
-function BreadcrumbPeopleOverview() {
- const { organizationId, peopleId } = useParams();
- const data =
- useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery(
- $peopleId: ID!
- ) {
- people: node(id: $peopleId) {
- id
- ... on People {
- fullName
- }
- }
- }
- `,
- { peopleId: peopleId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
- <>
-
-
-
- {data.people.fullName}
-
-
-
- >
- );
-}
-
-function BreadcrumbDocumentList() {
- const { organizationId } = useParams();
- return (
- <>
-
-
-
- Documents
-
-
-
- >
- );
-}
-
-function BreadcrumbDocumentOverview() {
- const { organizationId, documentId } = useParams();
- const data =
- useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery(
- $documentId: ID!
- ) {
- document: node(id: $documentId) {
- id
- ... on Document {
- title
- }
- }
- }
- `,
- { documentId: documentId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
- <>
-
-
-
- {data.document?.title}
-
-
-
- >
- );
-}
-
-function BreadcrumbMeasureList() {
- const { organizationId } = useParams();
-
- return (
- <>
-
-
-
- Measures
-
-
-
- >
- );
-}
-
-function BreadcrumbMeasureView() {
- const { organizationId, measureId } = useParams();
- const data =
- useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbMeasureViewQuery(
- $measureId: ID!
- ) {
- measure: node(id: $measureId) {
- id
- ... on Measure {
- name
- category
- }
- }
- }
- `,
- { measureId: measureId! },
- );
-
- return (
- <>
-
-
-
- {data.measure.category}
-
-
-
-
-
- {data.measure.name}
-
-
-
- >
- );
-}
-
-function BreadcrumbControlNew() {
- const { organizationId, frameworkId } = useParams();
- return (
- <>
-
-
-
- New Control
-
-
- >
- );
-}
-
-function BreadcrumbControlExisting() {
- const { organizationId, frameworkId, controlId } = useParams();
- const data = useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbControlQuery($controlId: ID!) {
- control: node(id: $controlId) {
- id
- ... on Control {
- sectionTitle
- }
- }
- }
- `,
- { controlId: controlId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
- <>
-
-
-
- {data.control?.sectionTitle}
-
-
- >
- );
-}
-
-function BreadcrumbControl() {
- const { controlId } = useParams();
-
- if (controlId === "new") {
- return ;
- }
-
- return (
-
-
-
- );
-}
-
-function BreadcrumbRiskList() {
- const { organizationId } = useParams();
- return (
- <>
-
-
-
- Risks
-
-
-
- >
- );
-}
-
-function BreadcrumbRiskShow() {
- const { organizationId, riskId } = useParams();
- const data = useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbRiskShowQuery($riskId: ID!) {
- risk: node(id: $riskId) {
- id
- ... on Risk {
- name
- }
- }
- }
- `,
- { riskId: riskId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
- <>
-
-
-
- {data.risk?.name}
-
-
-
- >
- );
-}
-
-function BreadcrumbAssetList() {
- const { organizationId } = useParams();
- return (
- <>
-
-
-
- Assets
-
-
-
- >
- );
-}
-
-function BreadcrumbAssetOverview() {
- const { organizationId, assetId } = useParams();
- const data = useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbAssetOverviewQuery($assetId: ID!) {
- asset: node(id: $assetId) {
- id
- ... on Asset {
- name
- }
- }
- }
- `,
- { assetId: assetId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
- <>
-
-
-
- {data.asset?.name}
-
-
-
- >
- );
-}
-
-function BreadcrumbDataList() {
- const { organizationId } = useParams();
- return (
- <>
-
-
-
- Data
-
-
-
- >
- );
-}
-
-function BreadcrumbDataOverview() {
- const { organizationId, datumId } = useParams();
- const data = useLazyLoadQuery(
- graphql`
- query OrganizationBreadcrumbBreadcrumbDataOverviewQuery($datumId: ID!) {
- datum: node(id: $datumId) {
- id
- ... on Datum {
- name
- }
- }
- }
- `,
- { datumId: datumId! },
- { fetchPolicy: "store-or-network" },
- );
-
- return (
- <>
-
-
-
- {data.datum?.name}
-
-
-
- >
- );
-}
-
-export function BreadCrumb() {
- return (
-
-
-
-
-
-
- }
- >
- }>
- } />
-
-
-
- }
- >
- } />
-
-
- }>
- } />
-
-
-
- }
- >
- } />
-
-
- }>
-
-
-
- }
- >
-
-
-
- }
- />
- } />
-
- } />
-
- }>
-
-
-
- }
- />
- } />
-
- }>
-
-
-
- }
- />
-
- }>
-
-
-
- }
- >
- } />
-
- } />
-
- }>
- } />
-
-
-
- }
- >
- } />
-
-
- }>
- } />
-
-
-
- }
- >
- } />
-
-
-
-
-
- Settings
-
- >
- }
- />
-
-
- }>
-
-
-
- Create Organization
-
- >
- }
- />
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/OrganizationLayout.tsx b/apps/console/src/pages/organizations/OrganizationLayout.tsx
deleted file mode 100644
index a2333199a..000000000
--- a/apps/console/src/pages/organizations/OrganizationLayout.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import { Outlet, useMatch } from "react-router";
-import { AppSidebar } from "@/components/AppSidebar";
-import { Suspense } from "react";
-import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
-import { Toaster } from "@/components/ui/toaster";
-import { BreadCrumb } from "./OrganizationBreadcrumb";
-import { cn } from "@/lib/utils";
-import ErrorBoundary from "@/components/ErrorBoundary";
-
-export default function OrganizationLayout() {
- const controlMatch = useMatch(
- "organizations/:organizationId/frameworks/:frameworkId/controls/*",
- );
- const frameworkMatch = useMatch(
- "organizations/:organizationId/frameworks/:frameworkId",
- );
-
- return (
-
-
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/Routes.tsx b/apps/console/src/pages/organizations/Routes.tsx
deleted file mode 100644
index 6f1ee55d3..000000000
--- a/apps/console/src/pages/organizations/Routes.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import { Route, Routes } from "react-router";
-import NotFoundPage from "../NotFoundPage";
-import { CreateOrganizationPage } from "./CreateOrganizationPage";
-import HomePage from "./HomePage";
-import NoOrganizationLayout from "./NoOrganizationLayout";
-import OrganizationLayout from "./OrganizationLayout";
-import { SettingsPage } from "./SettingsPage";
-import { EditFrameworkPage } from "./frameworks/EditFrameworkPage";
-import { FrameworkLayout } from "./frameworks/FrameworkLayout";
-import { FrameworkListPage } from "./frameworks/FrameworkListPage";
-import { FrameworkPage } from "./frameworks/FrameworkPage";
-import { NewFrameworkPage } from "./frameworks/NewFrameworkPage";
-import { ControlPage } from "./frameworks/controls/ControlPage";
-import { EditControlPage } from "./frameworks/controls/EditControlPage";
-import { NewControlPage } from "./frameworks/controls/NewControlPage";
-import { EditMeasurePage } from "./measures/EditMeasurePage";
-import { MeasureListPage } from "./measures/MeasureListPage";
-import { MeasurePage } from "./measures/MeasurePage";
-import { NewMeasurePage } from "./measures/NewMeasurePage";
-import { NewPeoplePage } from "./people/NewPeoplePage";
-import { PeopleListPage } from "./people/PeopleListPage";
-import { PeoplePage } from "./people/PeoplePage";
-import { EditDocumentPage } from "./documents/EditDocumentPage";
-import { DocumentListPage } from "./documents/DocumentListPage";
-import { ShowDocumentPage } from "./documents/ShowDocumentPage";
-import { EditRiskPage } from "./risks/EditRiskPage";
-import { NewRiskPage } from "./risks/NewRiskPage";
-import { ListRiskPage } from "./risks/ListRiskPage";
-import ShowRiskView from "./risks/ShowRiskView";
-import { ListVendorPage } from "./vendors/ListVendorPage";
-import { VendorPage } from "./vendors/VendorPage";
-import { ListTaskPage } from "./tasks/ListTaskPage";
-import { AssetsListPage } from "./assets/AssetsListPage";
-import { NewAssetPage } from "./assets/NewAssetPage";
-import { AssetPage } from "./assets/AssetPage";
-import { DataListPage } from "./data/DataListPage";
-import { NewDatumPage } from "./data/NewDatumPage";
-import { DatumPage } from "./data/DatumPage";
-
-export function OrganizationsRoutes() {
- return (
-
- }>
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
-
- }>
- } />
- } />
- } />
- } />
-
- } />
- } />
-
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- }
- />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
-
-
- }>
- } />
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/SettingsPage.tsx b/apps/console/src/pages/organizations/SettingsPage.tsx
index f77812cf9..8d4f7e94f 100644
--- a/apps/console/src/pages/organizations/SettingsPage.tsx
+++ b/apps/console/src/pages/organizations/SettingsPage.tsx
@@ -1,39 +1,362 @@
-import { PageTemplateSkeleton } from "@/components/PageTemplate";
-import { Suspense } from "react";
-import { lazy } from "@probo/react-lazy";
-import { useLocation } from "react-router";
-import { ErrorBoundaryWithLocation } from "./ErrorBoundary";
+import {
+ ActionDropdown,
+ Avatar,
+ Badge,
+ Button,
+ Card,
+ DropdownItem,
+ Field,
+ FileButton,
+ IconTrashCan,
+ Label,
+ PageHeader,
+ Spinner,
+ useConfirm,
+ useToast,
+} from "@probo/ui";
+import { useTranslate } from "@probo/i18n";
+import type { PreloadedQuery } from "react-relay";
+import type { OrganizationGraph_ViewQuery } from "/hooks/graph/__generated__/OrganizationGraph_ViewQuery.graphql";
+import { useFragment, useMutation, usePreloadedQuery } from "react-relay";
+import { organizationViewQuery } from "/hooks/graph/OrganizationGraph";
+import { useDebounceCallback } from "usehooks-ts";
+import { graphql } from "relay-runtime";
+import type {
+ SettingsPageFragment$data,
+ SettingsPageFragment$key,
+} from "./__generated__/SettingsPageFragment.graphql";
+import { useState, type ChangeEventHandler } from "react";
+import { sprintf } from "@probo/helpers";
+import type { NodeOf } from "/types";
+import clsx from "clsx";
+import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
+import { useOrganizationId } from "/hooks/useOrganizationId";
+import { InviteUserDialog } from "/components/organizations/InviteUserDialog";
-const SettingsView = lazy(() => import("./SettingsView"));
+type Props = {
+ queryRef: PreloadedQuery;
+};
+
+const organizationFragment = graphql`
+ fragment SettingsPageFragment on Organization {
+ id
+ name
+ logoUrl
+ users(first: 100) {
+ edges {
+ node {
+ id
+ fullName
+ email
+ createdAt
+ }
+ }
+ }
+ connectors(first: 100) {
+ edges {
+ node {
+ id
+ name
+ type
+ createdAt
+ }
+ }
+ }
+ }
+`;
+
+const updateOrganizationMutation = graphql`
+ mutation SettingsPage_UpdateMutation($input: UpdateOrganizationInput!) {
+ updateOrganization(input: $input) {
+ organization {
+ id
+ name
+ logoUrl
+ }
+ }
+ }
+`;
+
+export default function SettingsPage({ queryRef }: Props) {
+ const { __ } = useTranslate();
+ const organizationKey = usePreloadedQuery(
+ organizationViewQuery,
+ queryRef
+ ).node;
+ const { toast } = useToast();
+ const organization = useFragment(
+ organizationFragment,
+ organizationKey
+ );
+ const [updateOrganization, isUpdating] = useMutation(
+ updateOrganizationMutation
+ );
+ const users = organization.users.edges.map((edge) => edge.node);
+
+ const updateOrganizationName = useDebounceCallback((name: string) => {
+ if (!name) {
+ return "";
+ }
+ updateOrganization({
+ variables: {
+ input: {
+ organizationId: organization.id,
+ name,
+ },
+ },
+ });
+ }, 500);
+
+ const updateOrganizationLogo: ChangeEventHandler = (e) => {
+ const file = e.target.files?.[0];
+ if (!file) {
+ return;
+ }
+ updateOrganization({
+ variables: {
+ input: {
+ organizationId: organization.id,
+ logo: null,
+ },
+ },
+ uploadables: {
+ "input.logo": file,
+ },
+ onError(error) {
+ toast({
+ title: __("Failed to update organization logo"),
+ description: error.message || __("Please try again."),
+ variant: "error",
+ });
+ },
+ });
+ };
-export function SettingsViewSkeleton() {
return (
-
-
-
- {[1, 2].map((i) => (
-
+
+
+
+ {/* Organization settings */}
+
+
+
+ {__("Organization details")}
+
+ {isUpdating && }
+
+
+
+
+
+
+
+ {__("Change logo")}
+
+
+
+ updateOrganizationName(e.currentTarget.value)}
+ />
+
+
+
+ {/* Integrations */}
+
+
+
{__("Workspace members")}
+
+
+
+
+
+ {users.map((user) => (
+
))}
+
+
+
+ {/* Integrations */}
+
+
{__("Integrations")}
+
+ edge.node)}
+ />
+
+
+
+ );
+}
+
+function Connectors(props: {
+ organizationId: string;
+ connectors: NodeOf
[];
+}) {
+ const { __, dateTimeFormat } = useTranslate();
+ const fakeconnectors = [
+ {
+ id: "github",
+ name: "GitHub",
+ type: "oauth2",
+ createdAt: new Date(),
+ },
+ ] satisfies typeof props.connectors;
+ const connectors = [
+ {
+ id: "github",
+ name: "GitHub",
+ type: "oauth2",
+ description: __("Connect to GitHub repositories and issues"),
+ ...fakeconnectors.find((connector) => connector.id === "github"),
+ },
+ {
+ id: "slack",
+ name: "Slack",
+ type: "oauth2",
+ description: __("Connect to Slack workspace and channels"),
+ ...fakeconnectors.find((connector) => connector.id === "slack"),
+ },
+ ];
+
+ const getUrl = (connectorId: string) => {
+ const baseUrl = import.meta.env.VITE_API_URL || window.location.origin;
+ const url = new URL("/api/console/v1/connectors/initiate", baseUrl);
+ url.searchParams.append("organization_id", props.organizationId);
+ url.searchParams.append("connector_id", connectorId);
+ url.searchParams.append("continue", window.location.href);
+ return url.toString();
+ };
+
+ return (
+
+ {connectors.map((connector) => (
+
+
+

+
+
+
{connector.name}
+
+ {connector.createdAt
+ ? sprintf(
+ __("Connected on %s"),
+ dateTimeFormat(connector.createdAt)
+ )
+ : connector.description}
+
+
+ {connector.createdAt ? (
+
+
+ {__("Connected")}
+
+
+ ) : (
+
+ )}
+
+ ))}
+
+ );
+}
+
+const removeUserMutation = graphql`
+ mutation SettingsPage_RemoveUserMutation($input: RemoveUserInput!) {
+ removeUser(input: $input) {
+ success
+ }
+ }
+`;
+
+function UserRow(props: { user: NodeOf }) {
+ const { __ } = useTranslate();
+ const organizationId = useOrganizationId();
+ const [removeUser, isRemoving] = useMutationWithToasts(removeUserMutation, {
+ successMessage: sprintf(
+ __("User %s removed successfully"),
+ props.user.fullName
+ ),
+ errorMessage: sprintf(__("Failed to remove user %s"), props.user.fullName),
+ });
+ const confirm = useConfirm();
+ const [isRemoved, setIsRemoved] = useState(false);
+
+ if (isRemoved) {
+ return null;
+ }
+
+ const onRemove = async () => {
+ confirm(
+ () => {
+ return removeUser({
+ variables: {
+ input: {
+ userId: props.user.id,
+ organizationId: organizationId,
+ },
+ },
+ onSuccess: () => {
+ setIsRemoved(true);
+ },
+ });
+ },
+ {
+ message: sprintf(
+ __("Are you sure you want to remove %s?"),
+ props.user.fullName
+ ),
+ }
+ );
+ };
+
+ return (
+
+
+
+
+
{props.user.fullName}
+
{props.user.email}
-
- );
-}
-
-export function SettingsPage() {
- const location = useLocation();
-
- return (
-
}>
-
-
-
-
+
+
{__("Owner")}
+ {isRemoving ? (
+
+ ) : (
+
+
+ {__("Remove")}
+
+
+ )}
+
+
);
}
diff --git a/apps/console/src/pages/organizations/SettingsView.tsx b/apps/console/src/pages/organizations/SettingsView.tsx
deleted file mode 100644
index 88f873429..000000000
--- a/apps/console/src/pages/organizations/SettingsView.tsx
+++ /dev/null
@@ -1,704 +0,0 @@
-import { Building2, Upload, MoreVertical } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardHeader,
- CardTitle,
- CardDescription,
-} from "@/components/ui/card";
-import { Avatar, AvatarFallback } from "@/components/ui/avatar";
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import { Suspense, useEffect, useState, useRef } from "react";
-import {
- graphql,
- PreloadedQuery,
- usePreloadedQuery,
- useQueryLoader,
- useMutation,
-} from "react-relay";
-import { useParams } from "react-router";
-import { Link } from "react-router";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { useToast } from "@/hooks/use-toast";
-import {
- Dialog,
- DialogContent,
- DialogDescription,
- DialogFooter,
- DialogHeader,
- DialogTitle,
-} from "@/components/ui/dialog";
-import type { SettingsViewQuery as SettingsViewQueryType } from "./__generated__/SettingsViewQuery.graphql";
-import type { SettingsViewUpdateOrganizationMutation as SettingsViewUpdateOrganizationMutationType } from "./__generated__/SettingsViewUpdateOrganizationMutation.graphql";
-import type { SettingsViewInviteUserMutation as SettingsViewInviteUserMutationType } from "./__generated__/SettingsViewInviteUserMutation.graphql";
-import type { SettingsViewRemoveUserMutation as SettingsViewRemoveUserMutationType } from "./__generated__/SettingsViewRemoveUserMutation.graphql";
-import { PageTemplate } from "@/components/PageTemplate";
-import { SettingsViewSkeleton } from "./SettingsPage";
-
-interface AvailableConnector {
- id: string;
- name: string;
- type: string;
- description: string;
-}
-
-const settingsViewQuery = graphql`
- query SettingsViewQuery($organizationID: ID!) {
- organization: node(id: $organizationID) {
- id
- ... on Organization {
- name
- logoUrl
- users(first: 100) {
- edges {
- node {
- id
- fullName
- email
- createdAt
- }
- }
- }
- connectors(first: 100) {
- edges {
- node {
- id
- name
- type
- createdAt
- }
- }
- }
- }
- }
- }
-`;
-
-const updateOrganizationMutation = graphql`
- mutation SettingsViewUpdateOrganizationMutation(
- $input: UpdateOrganizationInput!
- ) {
- updateOrganization(input: $input) {
- organization {
- id
- name
- logoUrl
- }
- }
- }
-`;
-
-const inviteUserMutation = graphql`
- mutation SettingsViewInviteUserMutation($input: InviteUserInput!) {
- inviteUser(input: $input) {
- success
- }
- }
-`;
-
-const removeUserMutation = graphql`
- mutation SettingsViewRemoveUserMutation($input: RemoveUserInput!) {
- removeUser(input: $input) {
- success
- }
- }
-`;
-
-function SettingsViewContent({
- queryRef,
-}: {
- queryRef: PreloadedQuery;
-}) {
- const data = usePreloadedQuery(settingsViewQuery, queryRef);
- const organization = data.organization;
- const users = organization.users?.edges.map((edge) => edge.node) || [];
- const connectors =
- organization.connectors?.edges.map((edge) => edge.node) || [];
- const { toast } = useToast();
- const fileInputRef = useRef(null);
-
- const [isEditNameOpen, setIsEditNameOpen] = useState(false);
- const [isInviteOpen, setIsInviteOpen] = useState(false);
- const [inviteEmail, setInviteEmail] = useState("");
- const [inviteFullName, setInviteFullName] = useState("");
- const [isInviting, setIsInviting] = useState(false);
- const [organizationName, setOrganizationName] = useState(
- organization.name || "",
- );
- const [isUploading, setIsUploading] = useState(false);
- const [isRemoving, setIsRemoving] = useState(false);
-
- // Available connectors
- const availableConnectors: AvailableConnector[] = [
- {
- id: "github",
- name: "GitHub",
- type: "oauth2",
- description: "Connect to GitHub repositories and issues",
- },
- {
- id: "slack",
- name: "Slack",
- type: "oauth2",
- description: "Connect to Slack workspace and channels",
- },
- ];
-
- // Filter out connectors that are already connected
- const connectedConnectorIds = connectors.map((connector) => connector.name);
- const notConnectedConnectors = availableConnectors.filter(
- (connector) => !connectedConnectorIds.includes(connector.id),
- );
-
- const [updateOrganization] =
- useMutation(
- updateOrganizationMutation,
- );
-
- const [inviteUser] =
- useMutation(inviteUserMutation);
-
- const [removeUser] =
- useMutation(removeUserMutation);
-
- const { organizationId } = useParams();
- const [, loadQuery] =
- useQueryLoader(settingsViewQuery);
-
- const handleUpdateName = () => {
- updateOrganization({
- variables: {
- input: {
- organizationId: organization.id,
- name: organizationName,
- },
- },
- onCompleted: () => {
- toast({
- title: "Organization updated",
- description: "Organization name has been updated successfully.",
- variant: "default",
- });
- setIsEditNameOpen(false);
- },
- onError: (error) => {
- toast({
- title: "Error updating organization",
- description: error.message,
- variant: "destructive",
- });
- },
- });
- };
-
- const handleLogoUpload = (e: React.ChangeEvent) => {
- const file = e.target.files?.[0];
- if (!file) return;
-
- // Create a FileReader to read the file as a data URL
- const reader = new FileReader();
- reader.onloadend = () => {
- setIsUploading(true);
-
- updateOrganization({
- variables: {
- input: {
- organizationId: organization.id,
- logo: null,
- },
- },
- uploadables: {
- "input.logo": file,
- },
- onCompleted: () => {
- setIsUploading(false);
- toast({
- title: "Logo updated",
- description: "Organization logo has been updated successfully.",
- variant: "default",
- });
- if (fileInputRef.current) {
- fileInputRef.current.value = "";
- }
- },
- onError: (error) => {
- setIsUploading(false);
- toast({
- title: "Error updating logo",
- description: error.message,
- variant: "destructive",
- });
- },
- });
- };
- reader.readAsDataURL(file);
- };
-
- const handleInviteMember = () => {
- if (!inviteEmail || !inviteFullName) {
- toast({
- title: "Missing information",
- description:
- "Please provide both email and full name for the invitation",
- variant: "destructive",
- });
- return;
- }
-
- setIsInviting(true);
-
- inviteUser({
- variables: {
- input: {
- organizationId: organization.id,
- email: inviteEmail,
- fullName: inviteFullName,
- },
- },
- onCompleted: (response) => {
- setIsInviting(false);
- if (response.inviteUser?.success) {
- toast({
- title: "Invitation sent",
- description: `An invitation has been sent to ${inviteEmail}`,
- variant: "default",
- });
- setIsInviteOpen(false);
- setInviteEmail("");
- setInviteFullName("");
- } else {
- toast({
- title: "Error sending invitation",
- description: "The invitation could not be sent. Please try again.",
- variant: "destructive",
- });
- }
- },
- onError: (error) => {
- setIsInviting(false);
- toast({
- title: "Error sending invitation",
- description: error.message,
- variant: "destructive",
- });
- },
- });
- };
-
- const handleRemoveUser = (userId: string) => {
- setIsRemoving(true);
-
- removeUser({
- variables: {
- input: {
- organizationId: organization.id,
- userId: userId,
- },
- },
- onCompleted: (response) => {
- setIsRemoving(false);
- if (response.removeUser?.success) {
- toast({
- title: "User removed",
- description: "The user has been removed from the organization.",
- variant: "default",
- });
- // Refresh the query to update the UI
- loadQuery({ organizationID: organizationId! });
- } else {
- toast({
- title: "Error removing user",
- description: "The user could not be removed. Please try again.",
- variant: "destructive",
- });
- }
- },
- onError: (error) => {
- setIsRemoving(false);
- toast({
- title: "Error removing user",
- description: error.message,
- variant: "destructive",
- });
- },
- });
- };
-
- return (
-
-
-
-
- Organization information
- Manage your organization details
-
-
-
-
-
-
- {organization.logoUrl ? (
-

- ) : (
-
-
-
- )}
-
- Upload a logo to be displayed at the top of your trust page
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Set the name of the organization
-
-
-
- {organization.name}
-
-
-
-
-
-
-
-
-
-
- Workspace members
-
- Manage who has privileged access to your workspace and their
- permissions.
-
-
-
-
-
-
- {users.length === 0 ? (
-
-
-
-
-
No members found
-
- You haven't added any members to your workspace yet.
-
-
- ) : (
- users.map((user) => (
-
-
-
-
- {user.fullName.charAt(0).toUpperCase()}
-
-
-
-
- {user.fullName}
-
-
- {user.email}
-
-
-
-
- Owner
-
-
-
-
-
- handleRemoveUser(user.id)}
- disabled={isRemoving}
- >
- {isRemoving ? "Removing..." : "Remove member"}
-
-
-
-
-
- ))
- )}
-
-
-
-
-
-
-
- Integrations
-
- Connect to third-party services to enhance your workflow
-
-
-
-
-
- {connectors.length > 0 && (
-
-
- Connected services
-
-
- {connectors.map((connector) => (
-
-
-
-
-
-
-
- {connector.name}
-
-
- {connector.type} · Connected on{" "}
- {new Date(
- connector.createdAt,
- ).toLocaleDateString()}
-
-
-
-
- ))}
-
-
- )}
-
- {notConnectedConnectors.length > 0 && (
-
-
- Available services
-
-
- {notConnectedConnectors.map((connector) => (
-
-
-
-
-
-
-
- {connector.name}
-
-
- {connector.description}
-
-
-
-
-
- ))}
-
-
- )}
-
- {connectors.length === 0 &&
- notConnectedConnectors.length === 0 && (
-
-
-
-
-
- No integrations available
-
-
- There are currently no integrations available for your
- workspace.
-
-
- )}
-
-
-
-
-
-
-
-
-
- );
-}
-
-export default function SettingsView() {
- const [queryRef, loadQuery] =
- useQueryLoader(settingsViewQuery);
-
- const { organizationId } = useParams();
-
- useEffect(() => {
- loadQuery({ organizationID: organizationId! });
- }, [loadQuery, organizationId]);
-
- if (!queryRef) {
- return ;
- }
-
- return (
- }>
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/__generated__/CreateOrganizationViewCreateOrganizationMutation.graphql.ts b/apps/console/src/pages/organizations/__generated__/CreateOrganizationViewCreateOrganizationMutation.graphql.ts
deleted file mode 100644
index 266956136..000000000
--- a/apps/console/src/pages/organizations/__generated__/CreateOrganizationViewCreateOrganizationMutation.graphql.ts
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type CreateOrganizationInput = {
- name: string;
-};
-export type CreateOrganizationViewCreateOrganizationMutation$variables = {
- connections: ReadonlyArray;
- input: CreateOrganizationInput;
-};
-export type CreateOrganizationViewCreateOrganizationMutation$data = {
- readonly createOrganization: {
- readonly organizationEdge: {
- readonly node: {
- readonly id: string;
- readonly logoUrl: string | null | undefined;
- readonly name: string;
- };
- };
- };
-};
-export type CreateOrganizationViewCreateOrganizationMutation = {
- response: CreateOrganizationViewCreateOrganizationMutation$data;
- variables: CreateOrganizationViewCreateOrganizationMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "connections"
-},
-v1 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
-},
-v2 = [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
-],
-v3 = {
- "alias": null,
- "args": null,
- "concreteType": "OrganizationEdge",
- "kind": "LinkedField",
- "name": "organizationEdge",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Organization",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "logoUrl",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": [
- (v0/*: any*/),
- (v1/*: any*/)
- ],
- "kind": "Fragment",
- "metadata": null,
- "name": "CreateOrganizationViewCreateOrganizationMutation",
- "selections": [
- {
- "alias": null,
- "args": (v2/*: any*/),
- "concreteType": "CreateOrganizationPayload",
- "kind": "LinkedField",
- "name": "createOrganization",
- "plural": false,
- "selections": [
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [
- (v1/*: any*/),
- (v0/*: any*/)
- ],
- "kind": "Operation",
- "name": "CreateOrganizationViewCreateOrganizationMutation",
- "selections": [
- {
- "alias": null,
- "args": (v2/*: any*/),
- "concreteType": "CreateOrganizationPayload",
- "kind": "LinkedField",
- "name": "createOrganization",
- "plural": false,
- "selections": [
- (v3/*: any*/),
- {
- "alias": null,
- "args": null,
- "filters": null,
- "handle": "appendEdge",
- "key": "",
- "kind": "LinkedHandle",
- "name": "organizationEdge",
- "handleArgs": [
- {
- "kind": "Variable",
- "name": "connections",
- "variableName": "connections"
- }
- ]
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "867788ffb7d7d5f42d86fc0b42e91d8f",
- "id": null,
- "metadata": {},
- "name": "CreateOrganizationViewCreateOrganizationMutation",
- "operationKind": "mutation",
- "text": "mutation CreateOrganizationViewCreateOrganizationMutation(\n $input: CreateOrganizationInput!\n) {\n createOrganization(input: $input) {\n organizationEdge {\n node {\n id\n name\n logoUrl\n }\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "999f210db4fc65cbad47472294d9cf46";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/CreateOrganizationViewViewerQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/CreateOrganizationViewViewerQuery.graphql.ts
deleted file mode 100644
index 419924e97..000000000
--- a/apps/console/src/pages/organizations/__generated__/CreateOrganizationViewViewerQuery.graphql.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @generated SignedSource<<4f30528c9f1b2def73d7058623843697>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type CreateOrganizationViewViewerQuery$variables = Record;
-export type CreateOrganizationViewViewerQuery$data = {
- readonly viewer: {
- readonly id: string;
- };
-};
-export type CreateOrganizationViewViewerQuery = {
- response: CreateOrganizationViewViewerQuery$data;
- variables: CreateOrganizationViewViewerQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "alias": null,
- "args": null,
- "concreteType": "Viewer",
- "kind": "LinkedField",
- "name": "viewer",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": [],
- "kind": "Fragment",
- "metadata": null,
- "name": "CreateOrganizationViewViewerQuery",
- "selections": (v0/*: any*/),
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [],
- "kind": "Operation",
- "name": "CreateOrganizationViewViewerQuery",
- "selections": (v0/*: any*/)
- },
- "params": {
- "cacheID": "70c2f23f09fbeac5b8e8436e6c68b5f6",
- "id": null,
- "metadata": {},
- "name": "CreateOrganizationViewViewerQuery",
- "operationKind": "query",
- "text": "query CreateOrganizationViewViewerQuery {\n viewer {\n id\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "200816c6c6173d8c7a4e5bcdab45dc45";
-
-export default node;
diff --git a/apps/console2/src/pages/organizations/__generated__/NewOrganizationPageMutation.graphql.ts b/apps/console/src/pages/organizations/__generated__/NewOrganizationPageMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/pages/organizations/__generated__/NewOrganizationPageMutation.graphql.ts
rename to apps/console/src/pages/organizations/__generated__/NewOrganizationPageMutation.graphql.ts
diff --git a/apps/console2/src/pages/organizations/__generated__/NewOrganizationPageQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/NewOrganizationPageQuery.graphql.ts
similarity index 100%
rename from apps/console2/src/pages/organizations/__generated__/NewOrganizationPageQuery.graphql.ts
rename to apps/console/src/pages/organizations/__generated__/NewOrganizationPageQuery.graphql.ts
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbAssetOverviewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbAssetOverviewQuery.graphql.ts
deleted file mode 100644
index c26ee1720..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbAssetOverviewQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<<7ee0fb485c12093374bdcbdf43d0a2df>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbAssetOverviewQuery$variables = {
- assetId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbAssetOverviewQuery$data = {
- readonly asset: {
- readonly id: string;
- readonly name?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbAssetOverviewQuery = {
- response: OrganizationBreadcrumbBreadcrumbAssetOverviewQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbAssetOverviewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "assetId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "assetId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "type": "Asset",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbAssetOverviewQuery",
- "selections": [
- {
- "alias": "asset",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbAssetOverviewQuery",
- "selections": [
- {
- "alias": "asset",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "41b1d32aad685d08edfdbf989207e758",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbAssetOverviewQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbAssetOverviewQuery(\n $assetId: ID!\n) {\n asset: node(id: $assetId) {\n __typename\n id\n ... on Asset {\n name\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "4c3d736cb93af42b7dcb88cdcb293e8f";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbControlQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbControlQuery.graphql.ts
deleted file mode 100644
index 63624773a..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbControlQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<<07652bb5a37a4cdf28c0df2f627ada0e>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbControlQuery$variables = {
- controlId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbControlQuery$data = {
- readonly control: {
- readonly id: string;
- readonly sectionTitle?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbControlQuery = {
- response: OrganizationBreadcrumbBreadcrumbControlQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbControlQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "controlId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "controlId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "sectionTitle",
- "storageKey": null
- }
- ],
- "type": "Control",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbControlQuery",
- "selections": [
- {
- "alias": "control",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbControlQuery",
- "selections": [
- {
- "alias": "control",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "6d3e964652b3f13d0524f2db09668d7d",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbControlQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbControlQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n sectionTitle\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "04f863d003032971d0490bf0d0c90fce";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbDataOverviewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbDataOverviewQuery.graphql.ts
deleted file mode 100644
index b068f9c8d..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbDataOverviewQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbDataOverviewQuery$variables = {
- datumId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbDataOverviewQuery$data = {
- readonly datum: {
- readonly id: string;
- readonly name?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbDataOverviewQuery = {
- response: OrganizationBreadcrumbBreadcrumbDataOverviewQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbDataOverviewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "datumId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "datumId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "type": "Datum",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbDataOverviewQuery",
- "selections": [
- {
- "alias": "datum",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbDataOverviewQuery",
- "selections": [
- {
- "alias": "datum",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "def453349ef7d9e50a0c22ae89809a1d",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbDataOverviewQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbDataOverviewQuery(\n $datumId: ID!\n) {\n datum: node(id: $datumId) {\n __typename\n id\n ... on Datum {\n name\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "1e0885f1072995735ebaa637b59f3325";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery.graphql.ts
deleted file mode 100644
index 1d0b39e75..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<<2cac1fe037796fc1b9542c9388ed930d>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery$variables = {
- documentId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery$data = {
- readonly document: {
- readonly id: string;
- readonly title?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery = {
- response: OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "documentId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "documentId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "title",
- "storageKey": null
- }
- ],
- "type": "Document",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery",
- "selections": [
- {
- "alias": "document",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery",
- "selections": [
- {
- "alias": "document",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "bf577e8122cd59894e36f951f7a3551a",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbDocumentOverviewQuery(\n $documentId: ID!\n) {\n document: node(id: $documentId) {\n __typename\n id\n ... on Document {\n title\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "7ef8052c69e997cf2252d7c00b3f1c1f";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery.graphql.ts
deleted file mode 100644
index 3481519c5..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery$variables = {
- frameworkId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery$data = {
- readonly framework: {
- readonly id: string;
- readonly name?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery = {
- response: OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "frameworkId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "frameworkId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "type": "Framework",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery",
- "selections": [
- {
- "alias": "framework",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery",
- "selections": [
- {
- "alias": "framework",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "7621d4cc3a8961e17c017c147084668e",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbFrameworkOverviewQuery(\n $frameworkId: ID!\n) {\n framework: node(id: $frameworkId) {\n __typename\n id\n ... on Framework {\n name\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "8556d69533cf7115847e6a676f275714";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbMeasureViewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbMeasureViewQuery.graphql.ts
deleted file mode 100644
index 3cbca63b0..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbMeasureViewQuery.graphql.ts
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbMeasureViewQuery$variables = {
- measureId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbMeasureViewQuery$data = {
- readonly measure: {
- readonly category?: string;
- readonly id: string;
- readonly name?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbMeasureViewQuery = {
- response: OrganizationBreadcrumbBreadcrumbMeasureViewQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbMeasureViewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "measureId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "measureId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "category",
- "storageKey": null
- }
- ],
- "type": "Measure",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbMeasureViewQuery",
- "selections": [
- {
- "alias": "measure",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbMeasureViewQuery",
- "selections": [
- {
- "alias": "measure",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "3c48e17cf1b1191df67348c4b3fd09e4",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbMeasureViewQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbMeasureViewQuery(\n $measureId: ID!\n) {\n measure: node(id: $measureId) {\n __typename\n id\n ... on Measure {\n name\n category\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "41cebf479daa730843b47f2f9fb46a10";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery.graphql.ts
deleted file mode 100644
index 5aa2d17f7..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery$variables = {
- peopleId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery$data = {
- readonly people: {
- readonly fullName?: string;
- readonly id: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery = {
- response: OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "peopleId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "peopleId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- }
- ],
- "type": "People",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery",
- "selections": [
- {
- "alias": "people",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery",
- "selections": [
- {
- "alias": "people",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "8e31b69ca914380fb45a65f6caef4f55",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbPeopleOverviewQuery(\n $peopleId: ID!\n) {\n people: node(id: $peopleId) {\n __typename\n id\n ... on People {\n fullName\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "754df51d74ab4c3be0b83fdc689e5cfc";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbRiskShowQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbRiskShowQuery.graphql.ts
deleted file mode 100644
index a84638090..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbRiskShowQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<<6cc6ac4101b94ac06f94f04368fbaa6d>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbRiskShowQuery$variables = {
- riskId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbRiskShowQuery$data = {
- readonly risk: {
- readonly id: string;
- readonly name?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbRiskShowQuery = {
- response: OrganizationBreadcrumbBreadcrumbRiskShowQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbRiskShowQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "riskId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "riskId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "type": "Risk",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbRiskShowQuery",
- "selections": [
- {
- "alias": "risk",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbRiskShowQuery",
- "selections": [
- {
- "alias": "risk",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "eaafff390efc7cb4b97300fa65d98c99",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbRiskShowQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbRiskShowQuery(\n $riskId: ID!\n) {\n risk: node(id: $riskId) {\n __typename\n id\n ... on Risk {\n name\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "3f83f754047443e38a51bd8d2351f81c";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbVendorOverviewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbVendorOverviewQuery.graphql.ts
deleted file mode 100644
index 6d98cd4ea..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbBreadcrumbVendorOverviewQuery.graphql.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @generated SignedSource<<8c8b57ca97101932acdb5d73038e228c>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbBreadcrumbVendorOverviewQuery$variables = {
- vendorId: string;
-};
-export type OrganizationBreadcrumbBreadcrumbVendorOverviewQuery$data = {
- readonly vendor: {
- readonly id: string;
- readonly name?: string;
- };
-};
-export type OrganizationBreadcrumbBreadcrumbVendorOverviewQuery = {
- response: OrganizationBreadcrumbBreadcrumbVendorOverviewQuery$data;
- variables: OrganizationBreadcrumbBreadcrumbVendorOverviewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "vendorId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "vendorId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "type": "Vendor",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbBreadcrumbVendorOverviewQuery",
- "selections": [
- {
- "alias": "vendor",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbBreadcrumbVendorOverviewQuery",
- "selections": [
- {
- "alias": "vendor",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "e3b7ec1aa637099854e157f0f06f5289",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbBreadcrumbVendorOverviewQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbBreadcrumbVendorOverviewQuery(\n $vendorId: ID!\n) {\n vendor: node(id: $vendorId) {\n __typename\n id\n ... on Vendor {\n name\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "eb448c353f367e8b4de619facc855959";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbOrganizationQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbOrganizationQuery.graphql.ts
deleted file mode 100644
index 486d9ff97..000000000
--- a/apps/console/src/pages/organizations/__generated__/OrganizationBreadcrumbOrganizationQuery.graphql.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type OrganizationBreadcrumbOrganizationQuery$variables = {
- organizationId: string;
-};
-export type OrganizationBreadcrumbOrganizationQuery$data = {
- readonly organization: {
- readonly name?: string;
- };
-};
-export type OrganizationBreadcrumbOrganizationQuery = {
- response: OrganizationBreadcrumbOrganizationQuery$data;
- variables: OrganizationBreadcrumbOrganizationQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "organizationId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "organizationId"
- }
-],
-v2 = {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "type": "Organization",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "OrganizationBreadcrumbOrganizationQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "OrganizationBreadcrumbOrganizationQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "18cbf77dbfbf76b1f2f51331372de068",
- "id": null,
- "metadata": {},
- "name": "OrganizationBreadcrumbOrganizationQuery",
- "operationKind": "query",
- "text": "query OrganizationBreadcrumbOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n name\n }\n id\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "f8d5fa8a458cdd965df43de084f6a095";
-
-export default node;
diff --git a/apps/console2/src/pages/organizations/__generated__/SettingsPageFragment.graphql.ts b/apps/console/src/pages/organizations/__generated__/SettingsPageFragment.graphql.ts
similarity index 100%
rename from apps/console2/src/pages/organizations/__generated__/SettingsPageFragment.graphql.ts
rename to apps/console/src/pages/organizations/__generated__/SettingsPageFragment.graphql.ts
diff --git a/apps/console2/src/pages/organizations/__generated__/SettingsPage_RemoveUserMutation.graphql.ts b/apps/console/src/pages/organizations/__generated__/SettingsPage_RemoveUserMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/pages/organizations/__generated__/SettingsPage_RemoveUserMutation.graphql.ts
rename to apps/console/src/pages/organizations/__generated__/SettingsPage_RemoveUserMutation.graphql.ts
diff --git a/apps/console2/src/pages/organizations/__generated__/SettingsPage_UpdateMutation.graphql.ts b/apps/console/src/pages/organizations/__generated__/SettingsPage_UpdateMutation.graphql.ts
similarity index 100%
rename from apps/console2/src/pages/organizations/__generated__/SettingsPage_UpdateMutation.graphql.ts
rename to apps/console/src/pages/organizations/__generated__/SettingsPage_UpdateMutation.graphql.ts
diff --git a/apps/console/src/pages/organizations/__generated__/SettingsViewInviteUserMutation.graphql.ts b/apps/console/src/pages/organizations/__generated__/SettingsViewInviteUserMutation.graphql.ts
deleted file mode 100644
index 8ccc8d6a4..000000000
--- a/apps/console/src/pages/organizations/__generated__/SettingsViewInviteUserMutation.graphql.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type InviteUserInput = {
- email: string;
- fullName: string;
- organizationId: string;
-};
-export type SettingsViewInviteUserMutation$variables = {
- input: InviteUserInput;
-};
-export type SettingsViewInviteUserMutation$data = {
- readonly inviteUser: {
- readonly success: boolean;
- };
-};
-export type SettingsViewInviteUserMutation = {
- response: SettingsViewInviteUserMutation$data;
- variables: SettingsViewInviteUserMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
- }
-],
-v1 = [
- {
- "alias": null,
- "args": [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
- ],
- "concreteType": "InviteUserPayload",
- "kind": "LinkedField",
- "name": "inviteUser",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "success",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "SettingsViewInviteUserMutation",
- "selections": (v1/*: any*/),
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "SettingsViewInviteUserMutation",
- "selections": (v1/*: any*/)
- },
- "params": {
- "cacheID": "08abe9c261dc68b1c76991ad5e6f4d95",
- "id": null,
- "metadata": {},
- "name": "SettingsViewInviteUserMutation",
- "operationKind": "mutation",
- "text": "mutation SettingsViewInviteUserMutation(\n $input: InviteUserInput!\n) {\n inviteUser(input: $input) {\n success\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "5e95d05ee3c0d58f9413790a4a9516bf";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/SettingsViewQuery.graphql.ts b/apps/console/src/pages/organizations/__generated__/SettingsViewQuery.graphql.ts
deleted file mode 100644
index 3c11e5802..000000000
--- a/apps/console/src/pages/organizations/__generated__/SettingsViewQuery.graphql.ts
+++ /dev/null
@@ -1,262 +0,0 @@
-/**
- * @generated SignedSource<<302c6e908c1aea64db4820b83e5e2bcd>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type SettingsViewQuery$variables = {
- organizationID: string;
-};
-export type SettingsViewQuery$data = {
- readonly organization: {
- readonly connectors?: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly createdAt: string;
- readonly id: string;
- readonly name: string;
- readonly type: string;
- };
- }>;
- };
- readonly id: string;
- readonly logoUrl?: string | null | undefined;
- readonly name?: string;
- readonly users?: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly createdAt: string;
- readonly email: string;
- readonly fullName: string;
- readonly id: string;
- };
- }>;
- };
- };
-};
-export type SettingsViewQuery = {
- response: SettingsViewQuery$data;
- variables: SettingsViewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "organizationID"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "organizationID"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
-},
-v4 = [
- {
- "kind": "Literal",
- "name": "first",
- "value": 100
- }
-],
-v5 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "createdAt",
- "storageKey": null
-},
-v6 = {
- "kind": "InlineFragment",
- "selections": [
- (v3/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "logoUrl",
- "storageKey": null
- },
- {
- "alias": null,
- "args": (v4/*: any*/),
- "concreteType": "UserConnection",
- "kind": "LinkedField",
- "name": "users",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "UserEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "User",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "email",
- "storageKey": null
- },
- (v5/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": "users(first:100)"
- },
- {
- "alias": null,
- "args": (v4/*: any*/),
- "concreteType": "ConnectorConnection",
- "kind": "LinkedField",
- "name": "connectors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "ConnectorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Connector",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "type",
- "storageKey": null
- },
- (v5/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": "connectors(first:100)"
- }
- ],
- "type": "Organization",
- "abstractKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "SettingsViewQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v6/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "SettingsViewQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- },
- (v2/*: any*/),
- (v6/*: any*/)
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "e243498081f3875e74172abba80a88e8",
- "id": null,
- "metadata": {},
- "name": "SettingsViewQuery",
- "operationKind": "query",
- "text": "query SettingsViewQuery(\n $organizationID: ID!\n) {\n organization: node(id: $organizationID) {\n __typename\n id\n ... on Organization {\n name\n logoUrl\n users(first: 100) {\n edges {\n node {\n id\n fullName\n email\n createdAt\n }\n }\n }\n connectors(first: 100) {\n edges {\n node {\n id\n name\n type\n createdAt\n }\n }\n }\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "52b24e3845bb31016ddad6f815be1cdb";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/SettingsViewRemoveUserMutation.graphql.ts b/apps/console/src/pages/organizations/__generated__/SettingsViewRemoveUserMutation.graphql.ts
deleted file mode 100644
index c079cb2b2..000000000
--- a/apps/console/src/pages/organizations/__generated__/SettingsViewRemoveUserMutation.graphql.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * @generated SignedSource<<83fe53df5d49d9e2441a2e02dfaa63ee>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type RemoveUserInput = {
- organizationId: string;
- userId: string;
-};
-export type SettingsViewRemoveUserMutation$variables = {
- input: RemoveUserInput;
-};
-export type SettingsViewRemoveUserMutation$data = {
- readonly removeUser: {
- readonly success: boolean;
- };
-};
-export type SettingsViewRemoveUserMutation = {
- response: SettingsViewRemoveUserMutation$data;
- variables: SettingsViewRemoveUserMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
- }
-],
-v1 = [
- {
- "alias": null,
- "args": [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
- ],
- "concreteType": "RemoveUserPayload",
- "kind": "LinkedField",
- "name": "removeUser",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "success",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "SettingsViewRemoveUserMutation",
- "selections": (v1/*: any*/),
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "SettingsViewRemoveUserMutation",
- "selections": (v1/*: any*/)
- },
- "params": {
- "cacheID": "4a8d30e01815dbee5f216bbacf9f39e6",
- "id": null,
- "metadata": {},
- "name": "SettingsViewRemoveUserMutation",
- "operationKind": "mutation",
- "text": "mutation SettingsViewRemoveUserMutation(\n $input: RemoveUserInput!\n) {\n removeUser(input: $input) {\n success\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "a6446703d214b8c6c436aabed2d78dd7";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/__generated__/SettingsViewUpdateOrganizationMutation.graphql.ts b/apps/console/src/pages/organizations/__generated__/SettingsViewUpdateOrganizationMutation.graphql.ts
deleted file mode 100644
index 3f9917940..000000000
--- a/apps/console/src/pages/organizations/__generated__/SettingsViewUpdateOrganizationMutation.graphql.ts
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type UpdateOrganizationInput = {
- logo?: any | null | undefined;
- name?: string | null | undefined;
- organizationId: string;
-};
-export type SettingsViewUpdateOrganizationMutation$variables = {
- input: UpdateOrganizationInput;
-};
-export type SettingsViewUpdateOrganizationMutation$data = {
- readonly updateOrganization: {
- readonly organization: {
- readonly id: string;
- readonly logoUrl: string | null | undefined;
- readonly name: string;
- };
- };
-};
-export type SettingsViewUpdateOrganizationMutation = {
- response: SettingsViewUpdateOrganizationMutation$data;
- variables: SettingsViewUpdateOrganizationMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
- }
-],
-v1 = [
- {
- "alias": null,
- "args": [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
- ],
- "concreteType": "UpdateOrganizationPayload",
- "kind": "LinkedField",
- "name": "updateOrganization",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Organization",
- "kind": "LinkedField",
- "name": "organization",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "logoUrl",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "SettingsViewUpdateOrganizationMutation",
- "selections": (v1/*: any*/),
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "SettingsViewUpdateOrganizationMutation",
- "selections": (v1/*: any*/)
- },
- "params": {
- "cacheID": "f2a2984a2d4e764019f4355c13dab46e",
- "id": null,
- "metadata": {},
- "name": "SettingsViewUpdateOrganizationMutation",
- "operationKind": "mutation",
- "text": "mutation SettingsViewUpdateOrganizationMutation(\n $input: UpdateOrganizationInput!\n) {\n updateOrganization(input: $input) {\n organization {\n id\n name\n logoUrl\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "9570926c4f654570cbfe7328cd9893d6";
-
-export default node;
diff --git a/apps/console2/src/pages/organizations/assets/AssetDetailsPage.tsx b/apps/console/src/pages/organizations/assets/AssetDetailsPage.tsx
similarity index 100%
rename from apps/console2/src/pages/organizations/assets/AssetDetailsPage.tsx
rename to apps/console/src/pages/organizations/assets/AssetDetailsPage.tsx
diff --git a/apps/console/src/pages/organizations/assets/AssetPage.tsx b/apps/console/src/pages/organizations/assets/AssetPage.tsx
deleted file mode 100644
index 67960823a..000000000
--- a/apps/console/src/pages/organizations/assets/AssetPage.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { PageTemplateSkeleton } from "@/components/PageTemplate";
-import { Suspense } from "react";
-import { lazy } from "@probo/react-lazy";
-import { useLocation } from "react-router";
-import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
-
-const AssetView = lazy(() => import("./AssetView"));
-
-export function AssetViewSkeleton() {
- return (
-
-
-
-
- {[1, 2].map((i) => (
-
- ))}
-
-
-
- );
-}
-
-export function AssetPage() {
- const location = useLocation();
-
- return (
- }>
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/assets/AssetView.tsx b/apps/console/src/pages/organizations/assets/AssetView.tsx
deleted file mode 100644
index 1569fd7bd..000000000
--- a/apps/console/src/pages/organizations/assets/AssetView.tsx
+++ /dev/null
@@ -1,445 +0,0 @@
-"use client";
-
-import { Card } from "@/components/ui/card";
-import { Label } from "@/components/ui/label";
-import { Input } from "@/components/ui/input";
-import { Button } from "@/components/ui/button";
-import { useToast } from "@/hooks/use-toast";
-import {
- graphql,
- PreloadedQuery,
- usePreloadedQuery,
- useQueryLoader,
- useMutation,
-} from "react-relay";
-import { Suspense, useEffect, useState, useCallback } from "react";
-import type { AssetViewQuery as AssetViewQueryType } from "./__generated__/AssetViewQuery.graphql";
-import { useParams } from "react-router";
-import { PageTemplate } from "@/components/PageTemplate";
-import { AssetViewSkeleton } from "./AssetPage";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@/components/ui/select";
-import PeopleSelector from "@/components/PeopleSelector";
-import { Textarea } from "@/components/ui/textarea";
-import { Badge } from "@/components/ui/badge";
-import { X } from "lucide-react";
-
-const assetViewQuery = graphql`
- query AssetViewQuery($assetId: ID!, $organizationId: ID!) {
- node(id: $assetId) {
- ... on Asset {
- id
- name
- amount
- criticity
- assetType
- dataTypesStored
- owner {
- id
- fullName
- }
- vendors {
- edges {
- node {
- id
- name
- }
- }
- }
- createdAt
- updatedAt
- }
- }
- organization: node(id: $organizationId) {
- ...PeopleSelector_organization
- ... on Organization {
- vendors(first: 100, orderBy: { direction: ASC, field: NAME }) @connection(key: "AssetView_vendors") {
- edges {
- node {
- id
- name
- }
- }
- }
- }
- }
- }
-`;
-
-const updateAssetMutation = graphql`
- mutation AssetViewUpdateAssetMutation($input: UpdateAssetInput!) {
- updateAsset(input: $input) {
- asset {
- id
- name
- amount
- criticity
- assetType
- dataTypesStored
- owner {
- id
- fullName
- }
- vendors {
- edges {
- node {
- id
- name
- }
- }
- }
- updatedAt
- }
- }
- }
-`;
-
-type AssetType = "PHYSICAL" | "VIRTUAL";
-type CriticityLevel = "LOW" | "MEDIUM" | "HIGH";
-
-interface Vendor {
- readonly id: string;
- readonly name: string;
-}
-
-interface Organization {
- readonly id?: string;
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: Vendor;
- } | null> | null;
- } | null;
-}
-
-interface Asset {
- readonly id?: string;
- readonly name?: string;
- readonly amount?: number;
- readonly criticity?: CriticityLevel;
- readonly assetType?: AssetType;
- readonly dataTypesStored?: string;
- readonly owner?: {
- readonly id: string;
- readonly fullName: string;
- } | null;
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- } | null> | null;
- } | null;
- readonly createdAt?: string;
- readonly updatedAt?: string;
-}
-
-function EditableField({
- label,
- value,
- onChange,
- type = "text",
- helpText,
-}: {
- label: string;
- value: string | number;
- onChange: (value: string | number) => void;
- type?: string;
- helpText?: string;
-}) {
- return (
-
-
-
-
-
-
onChange(type === "number" ? parseInt(e.target.value, 10) || 0 : e.target.value)}
- />
- {helpText &&
{helpText}
}
-
-
- );
-}
-
-function AssetViewContent({
- queryRef,
-}: {
- queryRef: PreloadedQuery;
-}) {
- const data = usePreloadedQuery(assetViewQuery, queryRef);
- const { organizationId } = useParams();
- const [editedFields, setEditedFields] = useState>(new Set());
- const asset = data.node as Asset | null;
- const [formData, setFormData] = useState({
- name: asset?.name || "",
- amount: asset?.amount || 0,
- criticity: asset?.criticity || "LOW",
- assetType: asset?.assetType || "VIRTUAL",
- dataTypesStored: asset?.dataTypesStored || "",
- ownerId: asset?.owner?.id || "",
- selectedVendorIds: (asset?.vendors?.edges || [])
- .map(edge => edge?.node?.id)
- .filter((id): id is string => id != null) || [],
- });
- const [commit] = useMutation(updateAssetMutation);
- const [, loadQuery] = useQueryLoader(assetViewQuery);
- const { toast } = useToast();
- const hasChanges = editedFields.size > 0;
-
- const handleSave = useCallback(() => {
- const nodeId = data.node?.id;
- if (!nodeId) return;
-
- commit({
- variables: {
- input: {
- id: nodeId,
- name: formData.name,
- amount: formData.amount,
- criticity: formData.criticity,
- assetType: formData.assetType,
- dataTypesStored: formData.dataTypesStored,
- ownerId: formData.ownerId,
- vendorIds: formData.selectedVendorIds,
- },
- },
- onCompleted: () => {
- toast({
- title: "Success",
- description: "Changes saved successfully",
- variant: "default",
- });
- setEditedFields(new Set());
- },
- onError: (error) => {
- const defaultErrorValues = {
- title: "Error",
- description: error.message || "Failed to save changes",
- variant: "destructive" as const
- };
-
- if (error.message?.includes("concurrent modification")) {
- toast({
- ...defaultErrorValues,
- description: "Someone else modified this asset. Reloading latest data.",
- });
- loadQuery({ assetId: nodeId, organizationId: organizationId! });
- } else {
- toast(defaultErrorValues);
- }
- },
- });
- }, [commit, data.node?.id, formData, loadQuery, toast, organizationId]);
-
- const handleFieldChange = (field: keyof typeof formData, value: unknown) => {
- setFormData((prev) => ({
- ...prev,
- [field]: value,
- }));
- setEditedFields((prev) => new Set(prev).add(field));
- };
-
- const handleVendorSelect = (vendorId: string) => {
- handleFieldChange(
- "selectedVendorIds",
- formData.selectedVendorIds.includes(vendorId)
- ? formData.selectedVendorIds.filter((id) => id !== vendorId)
- : [...formData.selectedVendorIds, vendorId]
- );
- };
-
- const handleCancel = () => {
- const asset = data.node as Asset | null;
- setFormData({
- name: asset?.name || "",
- amount: asset?.amount || 0,
- criticity: asset?.criticity || "LOW",
- assetType: asset?.assetType || "VIRTUAL",
- dataTypesStored: asset?.dataTypesStored || "",
- ownerId: asset?.owner?.id || "",
- selectedVendorIds: (asset?.vendors?.edges || [])
- .map((edge) => edge?.node?.id)
- .filter((id): id is string => id != null) || [],
- });
- setEditedFields(new Set());
- };
-
- const organization = data.organization as Organization;
- const vendors = (organization.vendors?.edges || [])
- .map((edge) => edge?.node)
- .filter((node): node is Vendor => node != null);
-
- return (
-
-
-
-
handleFieldChange("name", value)}
- helpText="Enter the name of the asset"
- />
-
- handleFieldChange("amount", value)}
- helpText="Enter the amount of the asset"
- />
-
-
-
-
-
Asset Details
-
- Additional details about the asset
-
-
-
-
-
-
-
-
-
handleFieldChange("ownerId", value)}
- placeholder="Select asset owner"
- />
-
-
-
-
-
-
- {formData.selectedVendorIds.map((vendorId) => {
- const vendor = vendors.find((v) => v.id === vendorId);
- if (!vendor) return null;
- return (
-
- {vendor.name}
-
-
- );
- })}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
-
-export default function AssetView() {
- const { assetId, organizationId } = useParams();
- const [queryRef, loadQuery] =
- useQueryLoader(assetViewQuery);
-
- useEffect(() => {
- loadQuery({ assetId: assetId!, organizationId: organizationId! });
- }, [loadQuery, assetId, organizationId]);
-
- if (!queryRef) {
- return ;
- }
-
- return (
- }>
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/assets/AssetsListPage.tsx b/apps/console/src/pages/organizations/assets/AssetsListPage.tsx
deleted file mode 100644
index 45807cca5..000000000
--- a/apps/console/src/pages/organizations/assets/AssetsListPage.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import { Skeleton } from "@/components/ui/skeleton";
-import { PageTemplate } from "@/components/PageTemplate";
-import { useLocation } from "react-router";
-import { Suspense } from "react";
-import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
-import { lazy } from "@probo/react-lazy";
-
-
-const AssetsListView = lazy(() => import("./AssetsListView"));
-
-export function AssetsListViewSkeleton() {
- return (
-
-
- {Array.from({ length: 5 }).map((_, i) => (
-
- ))}
-
-
- );
-}
-
-export function AssetsListPage() {
- const location = useLocation();
-
- return (
- }>
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/assets/AssetsListView.tsx b/apps/console/src/pages/organizations/assets/AssetsListView.tsx
deleted file mode 100644
index f6d003548..000000000
--- a/apps/console/src/pages/organizations/assets/AssetsListView.tsx
+++ /dev/null
@@ -1,367 +0,0 @@
-import { Suspense, useEffect, useTransition, useRef } from "react";
-import {
- graphql,
- PreloadedQuery,
- usePreloadedQuery,
- useQueryLoader,
- useMutation,
- usePaginationFragment,
-} from "react-relay";
-import { useSearchParams, useParams } from "react-router";
-import { Avatar, AvatarFallback } from "@/components/ui/avatar";
-import { Badge } from "@/components/ui/badge";
-import { Box, Plus, Trash2, ChevronRight } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { Link } from "react-router";
-import type { AssetsListViewQuery as AssetsListViewQueryType } from "./__generated__/AssetsListViewQuery.graphql";
-import type { AssetsListViewDeleteAssetMutation } from "./__generated__/AssetsListViewDeleteAssetMutation.graphql";
-import { AssetsListViewPaginationQuery } from "./__generated__/AssetsListViewPaginationQuery.graphql";
-import { AssetsListView_assets$key } from "./__generated__/AssetsListView_assets.graphql";
-import { PageTemplate } from "@/components/PageTemplate";
-import { AssetsListViewSkeleton } from "./AssetsListViewSkeleton";
-import { BreadCrumb } from "../OrganizationBreadcrumb";
-
-const ITEMS_PER_PAGE = 25;
-
-const assetsListViewQuery = graphql`
- query AssetsListViewQuery(
- $organizationId: ID!
- $first: Int
- $after: CursorKey
- $last: Int
- $before: CursorKey
- ) {
- organization: node(id: $organizationId) {
- ...AssetsListView_assets
- @arguments(first: $first, after: $after, last: $last, before: $before)
- }
- }
-`;
-
-const assetsListFragment = graphql`
- fragment AssetsListView_assets on Organization
- @refetchable(queryName: "AssetsListViewPaginationQuery")
- @argumentDefinitions(
- first: { type: "Int" }
- after: { type: "CursorKey" }
- last: { type: "Int" }
- before: { type: "CursorKey" }
- ) {
- id
- assets(
- first: $first
- after: $after
- last: $last
- before: $before
- orderBy: { direction: ASC, field: AMOUNT }
- ) @connection(key: "AssetsListView_assets") {
- __id
- edges {
- node {
- id
- name
- amount
- criticity
- assetType
- dataTypesStored
- owner {
- id
- fullName
- }
- vendors {
- edges {
- node {
- id
- name
- }
- }
- }
- createdAt
- updatedAt
- }
- }
- pageInfo {
- hasNextPage
- hasPreviousPage
- startCursor
- endCursor
- }
- }
- }
-`;
-
-const deleteAssetMutation = graphql`
- mutation AssetsListViewDeleteAssetMutation(
- $input: DeleteAssetInput!
- $connections: [ID!]!
- ) {
- deleteAsset(input: $input) {
- deletedAssetId @deleteEdge(connections: $connections)
- }
- }
-`;
-
-function LoadAboveButton({
- isLoading,
- hasMore,
- onLoadMore,
-}: {
- isLoading: boolean;
- hasMore: boolean;
- onLoadMore: () => void;
-}) {
- if (!hasMore) {
- return null;
- }
-
- return (
-
-
-
- );
-}
-
-function LoadBelowButton({
- isLoading,
- hasMore,
- onLoadMore,
-}: {
- isLoading: boolean;
- hasMore: boolean;
- onLoadMore: () => void;
-}) {
- if (!hasMore) {
- return null;
- }
-
- return (
-
-
-
- );
-}
-
-function AssetsListContent({
- queryRef,
-}: {
- queryRef: PreloadedQuery;
-}) {
- const data = usePreloadedQuery(
- assetsListViewQuery,
- queryRef,
- );
- const [, setSearchParams] = useSearchParams();
- const [, startTransition] = useTransition();
- const [deleteAsset] =
- useMutation(deleteAssetMutation);
- const { organizationId } = useParams();
- const isPaginationUpdate = useRef(false);
-
- const {
- data: assetsConnection,
- loadNext,
- loadPrevious,
- hasNext,
- hasPrevious,
- isLoadingNext,
- isLoadingPrevious,
- } = usePaginationFragment<
- AssetsListViewPaginationQuery,
- AssetsListView_assets$key
- >(assetsListFragment, data.organization);
-
- const assets = assetsConnection.assets.edges.map((edge) => edge.node) ?? [];
- const pageInfo = assetsConnection.assets.pageInfo;
-
- return (
- <>
-
-
-
- Add an asset
-
-
- }
- >
-
-
- {assets.map((asset) => (
-
-
-
-
-
-
-
-
-
-
-
- {asset?.name} ({asset?.amount})
-
- {asset?.owner?.fullName && (
- <>
-
•
-
- Owned by {asset.owner.fullName}
-
- >
- )}
-
-
- Data types: {asset?.dataTypesStored}
-
-
- {asset?.vendors?.edges?.length > 0 && (
- <>
-
- Vendors: {asset.vendors.edges.map(edge => edge?.node?.name).join(", ")}
-
- >
- )}
-
-
-
-
-
- {asset?.assetType === "PHYSICAL" ? "Physical" : "Virtual"}
-
-
- {asset?.criticity}
-
-
-
-
-
-
- ))}
-
-
-
{
- startTransition(() => {
- isPaginationUpdate.current = true;
- setSearchParams((prev) => {
- prev.set("before", pageInfo?.startCursor || "");
- prev.delete("after");
- return prev;
- });
- loadPrevious(ITEMS_PER_PAGE);
- });
- }}
- />
- {
- startTransition(() => {
- isPaginationUpdate.current = true;
- setSearchParams((prev) => {
- prev.set("after", pageInfo?.endCursor || "");
- prev.delete("before");
- return prev;
- });
- loadNext(ITEMS_PER_PAGE);
- });
- }}
- />
-
-
- >
- );
-}
-
-export default function AssetsListView() {
- const [searchParams] = useSearchParams();
- const [queryRef, loadQuery] =
- useQueryLoader(assetsListViewQuery);
- const { organizationId } = useParams();
- const isPaginationUpdate = useRef(false);
-
- useEffect(() => {
- const after = searchParams.get("after");
- const before = searchParams.get("before");
-
- // Skip the query if this was triggered by pagination
- if (isPaginationUpdate.current) {
- isPaginationUpdate.current = false;
- return;
- }
-
- loadQuery({
- organizationId: organizationId!,
- first: before ? undefined : ITEMS_PER_PAGE,
- after: after || undefined,
- last: before ? ITEMS_PER_PAGE : undefined,
- before: before || undefined,
- });
- }, [loadQuery, organizationId, searchParams]);
-
- if (!queryRef) {
- return ;
- }
-
- return (
- }>
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/assets/AssetsListViewSkeleton.tsx b/apps/console/src/pages/organizations/assets/AssetsListViewSkeleton.tsx
deleted file mode 100644
index 4651c749d..000000000
--- a/apps/console/src/pages/organizations/assets/AssetsListViewSkeleton.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Skeleton } from "@/components/ui/skeleton";
-import { PageTemplate } from "@/components/PageTemplate";
-
-export function AssetsListViewSkeleton() {
- return (
-
-
- {Array.from({ length: 5 }).map((_, i) => (
-
- ))}
-
-
- );
-}
diff --git a/apps/console2/src/pages/organizations/assets/AssetsPage.tsx b/apps/console/src/pages/organizations/assets/AssetsPage.tsx
similarity index 100%
rename from apps/console2/src/pages/organizations/assets/AssetsPage.tsx
rename to apps/console/src/pages/organizations/assets/AssetsPage.tsx
diff --git a/apps/console/src/pages/organizations/assets/NewAssetPage.tsx b/apps/console/src/pages/organizations/assets/NewAssetPage.tsx
deleted file mode 100644
index b12c25de9..000000000
--- a/apps/console/src/pages/organizations/assets/NewAssetPage.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { Suspense } from "react";
-import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
-import { lazy } from "@probo/react-lazy";
-import { PageTemplate } from "@/components/PageTemplate";
-import { Skeleton } from "@/components/ui/skeleton";
-
-const NewAssetView = lazy(() => import("./NewAssetView"));
-
-export function NewAssetViewSkeleton() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
-
-export function NewAssetPage() {
- return (
- }>
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/assets/NewAssetView.tsx b/apps/console/src/pages/organizations/assets/NewAssetView.tsx
deleted file mode 100644
index a4551c3c8..000000000
--- a/apps/console/src/pages/organizations/assets/NewAssetView.tsx
+++ /dev/null
@@ -1,363 +0,0 @@
-import { useState, Suspense, useEffect } from "react";
-import { useNavigate, useParams } from "react-router";
-import { graphql, useMutation, ConnectionHandler, useQueryLoader, PreloadedQuery, usePreloadedQuery } from "react-relay";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { useToast } from "@/hooks/use-toast";
-import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
-import { Textarea } from "@/components/ui/textarea";
-import { PageTemplate } from "@/components/PageTemplate";
-import { NewAssetViewCreateAssetMutation } from "./__generated__/NewAssetViewCreateAssetMutation.graphql";
-import { NewAssetViewQuery } from "./__generated__/NewAssetViewQuery.graphql";
-import PeopleSelector from "@/components/PeopleSelector";
-import { NewAssetViewSkeleton } from "./NewAssetPage";
-import { Badge } from "@/components/ui/badge";
-import { X } from "lucide-react";
-
-const newAssetViewQuery = graphql`
- query NewAssetViewQuery($organizationId: ID!) {
- organization: node(id: $organizationId) {
- ... on Organization {
- id
- ...PeopleSelector_organization
- vendors(first: 100, orderBy: { direction: ASC, field: NAME }) @connection(key: "NewAssetView_vendors") {
- edges {
- node {
- id
- name
- }
- }
- }
- }
- }
- }
-`;
-
-const createAssetMutation = graphql`
- mutation NewAssetViewCreateAssetMutation(
- $input: CreateAssetInput!
- $connections: [ID!]!
- ) {
- createAsset(input: $input) {
- assetEdge @prependEdge(connections: $connections) {
- node {
- id
- amount
- criticity
- assetType
- dataTypesStored
- owner {
- id
- fullName
- }
- vendors {
- edges {
- node {
- id
- name
- }
- }
- }
- }
- }
- }
- }
-`;
-
-interface Vendor {
- readonly id: string;
- readonly name: string;
-}
-
-interface Organization {
- readonly id?: string;
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: Vendor;
- } | null> | null;
- } | null;
-}
-
-function EditableField({
- label,
- value,
- onChange,
- type = "text",
- helpText,
- required,
- min,
-}: {
- label: string;
- value: string | number;
- onChange: (value: string) => void;
- type?: string;
- helpText?: string;
- required?: boolean;
- min?: number;
-}) {
- return (
-
-
-
-
-
-
onChange(e.target.value)}
- required={required}
- min={min}
- />
- {helpText &&
{helpText}
}
-
-
- );
-}
-
-function NewAssetViewContent({
- queryRef,
-}: {
- queryRef: PreloadedQuery;
-}) {
- const navigate = useNavigate();
- const { organizationId } = useParams();
- const [createAsset] = useMutation(createAssetMutation);
- const { toast } = useToast();
- const data = usePreloadedQuery(newAssetViewQuery, queryRef);
-
- if (!data.organization) {
- return Organization not found
;
- }
-
- const organization = data.organization as Organization;
-
- const [formData, setFormData] = useState({
- name: "",
- amount: 1,
- criticity: "MEDIUM" as "LOW" | "MEDIUM" | "HIGH",
- assetType: "VIRTUAL" as "PHYSICAL" | "VIRTUAL",
- dataTypesStored: "",
- ownerId: "",
- selectedVendorIds: [] as string[],
- });
-
- type FormData = typeof formData;
-
- const handleFieldChange = (
- field: K,
- value: FormData[K]
- ) => {
- setFormData((prev) => ({
- ...prev,
- [field]: value,
- }));
- };
-
- const handleVendorSelect = (vendorId: string) => {
- setFormData((prev) => ({
- ...prev,
- selectedVendorIds: prev.selectedVendorIds.includes(vendorId)
- ? prev.selectedVendorIds.filter((id) => id !== vendorId)
- : [...prev.selectedVendorIds, vendorId],
- }));
- };
-
- const handleSubmit = (e: React.FormEvent) => {
- e.preventDefault();
-
- if (!formData.ownerId) {
- toast({
- title: "Error",
- description: "Please select an owner",
- variant: "destructive",
- });
- return;
- }
-
- createAsset({
- variables: {
- connections: [
- ConnectionHandler.getConnectionID(
- organizationId!,
- "AssetsListView_assets",
- {
- orderBy: {
- direction: "ASC",
- field: "AMOUNT",
- },
- },
- ),
- ],
- input: {
- organizationId: organizationId!,
- name: formData.name,
- amount: Number(formData.amount),
- criticity: formData.criticity,
- assetType: formData.assetType,
- dataTypesStored: formData.dataTypesStored,
- ownerId: formData.ownerId,
- vendorIds: formData.selectedVendorIds.length > 0 ? formData.selectedVendorIds : undefined,
- },
- },
- onCompleted: () => {
- toast({
- title: "Success",
- description: "Asset created successfully",
- variant: "default",
- });
- navigate(`/organizations/${organizationId}/assets`);
- },
- onError: (error) => {
- toast({
- title: "Error",
- description: error.message || "Failed to create asset",
- variant: "destructive",
- });
- },
- });
- };
-
- const vendors = (organization.vendors?.edges || [])
- .map((edge) => edge?.node)
- .filter((node): node is Vendor => node != null);
-
- return (
-
-
-
- );
-}
-
-export default function NewAssetView() {
- const { organizationId } = useParams();
- const [queryRef, loadQuery] = useQueryLoader(newAssetViewQuery);
-
- useEffect(() => {
- loadQuery({ organizationId: organizationId! });
- }, [loadQuery, organizationId]);
-
- if (!queryRef) {
- return ;
- }
-
- return (
- }>
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/assets/__generated__/AssetViewQuery.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/AssetViewQuery.graphql.ts
deleted file mode 100644
index 802a66fa3..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/AssetViewQuery.graphql.ts
+++ /dev/null
@@ -1,525 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type AssetType = "PHYSICAL" | "VIRTUAL";
-export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
-export type AssetViewQuery$variables = {
- assetId: string;
- organizationId: string;
-};
-export type AssetViewQuery$data = {
- readonly node: {
- readonly amount?: number;
- readonly assetType?: AssetType;
- readonly createdAt?: string;
- readonly criticity?: CriticityLevel;
- readonly dataTypesStored?: string;
- readonly id?: string;
- readonly name?: string;
- readonly owner?: {
- readonly fullName: string;
- readonly id: string;
- };
- readonly updatedAt?: string;
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- }>;
- };
- };
- readonly organization: {
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- }>;
- };
- readonly " $fragmentSpreads": FragmentRefs<"PeopleSelector_organization">;
- };
-};
-export type AssetViewQuery = {
- response: AssetViewQuery$data;
- variables: AssetViewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "assetId"
- },
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "organizationId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "assetId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
-},
-v4 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "amount",
- "storageKey": null
-},
-v5 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "criticity",
- "storageKey": null
-},
-v6 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "assetType",
- "storageKey": null
-},
-v7 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "dataTypesStored",
- "storageKey": null
-},
-v8 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
-},
-v9 = {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "owner",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v8/*: any*/)
- ],
- "storageKey": null
-},
-v10 = {
- "alias": null,
- "args": null,
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
-},
-v11 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "createdAt",
- "storageKey": null
-},
-v12 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "updatedAt",
- "storageKey": null
-},
-v13 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "organizationId"
- }
-],
-v14 = {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "NAME"
- }
-},
-v15 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
-},
-v16 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
-},
-v17 = {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- }
- ],
- "storageKey": null
-},
-v18 = [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/),
- (v15/*: any*/)
- ],
- "storageKey": null
- },
- (v16/*: any*/)
- ],
- "storageKey": null
- },
- (v17/*: any*/)
-],
-v19 = {
- "kind": "Literal",
- "name": "first",
- "value": 100
-},
-v20 = [
- (v19/*: any*/),
- {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "FULL_NAME"
- }
- }
-],
-v21 = [
- "orderBy"
-],
-v22 = [
- (v19/*: any*/),
- (v14/*: any*/)
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "AssetViewQuery",
- "selections": [
- {
- "alias": null,
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "kind": "InlineFragment",
- "selections": [
- (v2/*: any*/),
- (v3/*: any*/),
- (v4/*: any*/),
- (v5/*: any*/),
- (v6/*: any*/),
- (v7/*: any*/),
- (v9/*: any*/),
- (v10/*: any*/),
- (v11/*: any*/),
- (v12/*: any*/)
- ],
- "type": "Asset",
- "abstractKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": "organization",
- "args": (v13/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "args": null,
- "kind": "FragmentSpread",
- "name": "PeopleSelector_organization"
- },
- {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": "vendors",
- "args": [
- (v14/*: any*/)
- ],
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "__AssetView_vendors_connection",
- "plural": false,
- "selections": (v18/*: any*/),
- "storageKey": "__AssetView_vendors_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"NAME\"})"
- }
- ],
- "type": "Organization",
- "abstractKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "AssetViewQuery",
- "selections": [
- {
- "alias": null,
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v15/*: any*/),
- (v2/*: any*/),
- {
- "kind": "InlineFragment",
- "selections": [
- (v3/*: any*/),
- (v4/*: any*/),
- (v5/*: any*/),
- (v6/*: any*/),
- (v7/*: any*/),
- (v9/*: any*/),
- (v10/*: any*/),
- (v11/*: any*/),
- (v12/*: any*/)
- ],
- "type": "Asset",
- "abstractKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": "organization",
- "args": (v13/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v15/*: any*/),
- (v2/*: any*/),
- {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": (v20/*: any*/),
- "concreteType": "PeopleConnection",
- "kind": "LinkedField",
- "name": "peoples",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "PeopleEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- (v8/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "primaryEmailAddress",
- "storageKey": null
- },
- (v15/*: any*/)
- ],
- "storageKey": null
- },
- (v16/*: any*/)
- ],
- "storageKey": null
- },
- (v17/*: any*/)
- ],
- "storageKey": "peoples(first:100,orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
- },
- {
- "alias": null,
- "args": (v20/*: any*/),
- "filters": (v21/*: any*/),
- "handle": "connection",
- "key": "PeopleSelector_organization_peoples",
- "kind": "LinkedHandle",
- "name": "peoples"
- },
- {
- "alias": null,
- "args": (v22/*: any*/),
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": (v18/*: any*/),
- "storageKey": "vendors(first:100,orderBy:{\"direction\":\"ASC\",\"field\":\"NAME\"})"
- },
- {
- "alias": null,
- "args": (v22/*: any*/),
- "filters": (v21/*: any*/),
- "handle": "connection",
- "key": "AssetView_vendors",
- "kind": "LinkedHandle",
- "name": "vendors"
- }
- ],
- "type": "Organization",
- "abstractKey": null
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "90ae7758672dc097178bd9ab462b91fa",
- "id": null,
- "metadata": {
- "connection": [
- {
- "count": null,
- "cursor": null,
- "direction": "forward",
- "path": [
- "organization",
- "vendors"
- ]
- }
- ]
- },
- "name": "AssetViewQuery",
- "operationKind": "query",
- "text": "query AssetViewQuery(\n $assetId: ID!\n $organizationId: ID!\n) {\n node(id: $assetId) {\n __typename\n ... on Asset {\n id\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors {\n edges {\n node {\n id\n name\n }\n }\n }\n createdAt\n updatedAt\n }\n id\n }\n organization: node(id: $organizationId) {\n __typename\n ...PeopleSelector_organization\n ... on Organization {\n vendors(first: 100, orderBy: {direction: ASC, field: NAME}) {\n edges {\n node {\n id\n name\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n\nfragment PeopleSelector_organization on Organization {\n id\n peoples(first: 100, orderBy: {direction: ASC, field: FULL_NAME}) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "e2b32fe12d61063010d5a3b0a818331b";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/AssetViewUpdateAssetMutation.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/AssetViewUpdateAssetMutation.graphql.ts
deleted file mode 100644
index ddde3362a..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/AssetViewUpdateAssetMutation.graphql.ts
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * @generated SignedSource<<78e1b25933acfc51a857df68fe5a595c>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type AssetType = "PHYSICAL" | "VIRTUAL";
-export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
-export type UpdateAssetInput = {
- amount?: number | null | undefined;
- assetType?: AssetType | null | undefined;
- criticity?: CriticityLevel | null | undefined;
- dataTypesStored?: string | null | undefined;
- id: string;
- name?: string | null | undefined;
- ownerId?: string | null | undefined;
- vendorIds?: ReadonlyArray | null | undefined;
-};
-export type AssetViewUpdateAssetMutation$variables = {
- input: UpdateAssetInput;
-};
-export type AssetViewUpdateAssetMutation$data = {
- readonly updateAsset: {
- readonly asset: {
- readonly amount: number;
- readonly assetType: AssetType;
- readonly criticity: CriticityLevel;
- readonly dataTypesStored: string;
- readonly id: string;
- readonly name: string;
- readonly owner: {
- readonly fullName: string;
- readonly id: string;
- };
- readonly updatedAt: string;
- readonly vendors: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- }>;
- };
- };
- };
-};
-export type AssetViewUpdateAssetMutation = {
- response: AssetViewUpdateAssetMutation$data;
- variables: AssetViewUpdateAssetMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
- }
-],
-v1 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
-},
-v3 = [
- {
- "alias": null,
- "args": [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
- ],
- "concreteType": "UpdateAssetPayload",
- "kind": "LinkedField",
- "name": "updateAsset",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Asset",
- "kind": "LinkedField",
- "name": "asset",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- (v2/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "amount",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "criticity",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "assetType",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "dataTypesStored",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "owner",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- (v2/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "updatedAt",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "AssetViewUpdateAssetMutation",
- "selections": (v3/*: any*/),
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "AssetViewUpdateAssetMutation",
- "selections": (v3/*: any*/)
- },
- "params": {
- "cacheID": "7a2a8504da4e44785e141f7118760c26",
- "id": null,
- "metadata": {},
- "name": "AssetViewUpdateAssetMutation",
- "operationKind": "mutation",
- "text": "mutation AssetViewUpdateAssetMutation(\n $input: UpdateAssetInput!\n) {\n updateAsset(input: $input) {\n asset {\n id\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors {\n edges {\n node {\n id\n name\n }\n }\n }\n updatedAt\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "c57436cc8a742b3b48987bc702a2fa0e";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewDeleteAssetMutation.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewDeleteAssetMutation.graphql.ts
deleted file mode 100644
index 42a72184f..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewDeleteAssetMutation.graphql.ts
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type DeleteAssetInput = {
- assetId: string;
-};
-export type AssetsListViewDeleteAssetMutation$variables = {
- connections: ReadonlyArray;
- input: DeleteAssetInput;
-};
-export type AssetsListViewDeleteAssetMutation$data = {
- readonly deleteAsset: {
- readonly deletedAssetId: string;
- };
-};
-export type AssetsListViewDeleteAssetMutation = {
- response: AssetsListViewDeleteAssetMutation$data;
- variables: AssetsListViewDeleteAssetMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "connections"
-},
-v1 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
-},
-v2 = [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
-],
-v3 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "deletedAssetId",
- "storageKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": [
- (v0/*: any*/),
- (v1/*: any*/)
- ],
- "kind": "Fragment",
- "metadata": null,
- "name": "AssetsListViewDeleteAssetMutation",
- "selections": [
- {
- "alias": null,
- "args": (v2/*: any*/),
- "concreteType": "DeleteAssetPayload",
- "kind": "LinkedField",
- "name": "deleteAsset",
- "plural": false,
- "selections": [
- (v3/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [
- (v1/*: any*/),
- (v0/*: any*/)
- ],
- "kind": "Operation",
- "name": "AssetsListViewDeleteAssetMutation",
- "selections": [
- {
- "alias": null,
- "args": (v2/*: any*/),
- "concreteType": "DeleteAssetPayload",
- "kind": "LinkedField",
- "name": "deleteAsset",
- "plural": false,
- "selections": [
- (v3/*: any*/),
- {
- "alias": null,
- "args": null,
- "filters": null,
- "handle": "deleteEdge",
- "key": "",
- "kind": "ScalarHandle",
- "name": "deletedAssetId",
- "handleArgs": [
- {
- "kind": "Variable",
- "name": "connections",
- "variableName": "connections"
- }
- ]
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "d7987550f982b36de3911f3e7c8e9677",
- "id": null,
- "metadata": {},
- "name": "AssetsListViewDeleteAssetMutation",
- "operationKind": "mutation",
- "text": "mutation AssetsListViewDeleteAssetMutation(\n $input: DeleteAssetInput!\n) {\n deleteAsset(input: $input) {\n deletedAssetId\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "3f576871aa0d4495afcca5ecaf1aefca";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewPaginationQuery.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewPaginationQuery.graphql.ts
deleted file mode 100644
index 3ce83a799..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewPaginationQuery.graphql.ts
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * @generated SignedSource<<80b2431e63ecff11f93733ef7b235bb8>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type AssetsListViewPaginationQuery$variables = {
- after?: string | null | undefined;
- before?: string | null | undefined;
- first?: number | null | undefined;
- id: string;
- last?: number | null | undefined;
-};
-export type AssetsListViewPaginationQuery$data = {
- readonly node: {
- readonly " $fragmentSpreads": FragmentRefs<"AssetsListView_assets">;
- };
-};
-export type AssetsListViewPaginationQuery = {
- response: AssetsListViewPaginationQuery$data;
- variables: AssetsListViewPaginationQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "after"
-},
-v1 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "before"
-},
-v2 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "first"
-},
-v3 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "id"
-},
-v4 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "last"
-},
-v5 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "id"
- }
-],
-v6 = {
- "kind": "Variable",
- "name": "after",
- "variableName": "after"
-},
-v7 = {
- "kind": "Variable",
- "name": "before",
- "variableName": "before"
-},
-v8 = {
- "kind": "Variable",
- "name": "first",
- "variableName": "first"
-},
-v9 = {
- "kind": "Variable",
- "name": "last",
- "variableName": "last"
-},
-v10 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
-},
-v11 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v12 = [
- (v6/*: any*/),
- (v7/*: any*/),
- (v8/*: any*/),
- (v9/*: any*/),
- {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "AMOUNT"
- }
- }
-],
-v13 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": [
- (v0/*: any*/),
- (v1/*: any*/),
- (v2/*: any*/),
- (v3/*: any*/),
- (v4/*: any*/)
- ],
- "kind": "Fragment",
- "metadata": null,
- "name": "AssetsListViewPaginationQuery",
- "selections": [
- {
- "alias": null,
- "args": (v5/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "args": [
- (v6/*: any*/),
- (v7/*: any*/),
- (v8/*: any*/),
- (v9/*: any*/)
- ],
- "kind": "FragmentSpread",
- "name": "AssetsListView_assets"
- }
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [
- (v0/*: any*/),
- (v1/*: any*/),
- (v2/*: any*/),
- (v4/*: any*/),
- (v3/*: any*/)
- ],
- "kind": "Operation",
- "name": "AssetsListViewPaginationQuery",
- "selections": [
- {
- "alias": null,
- "args": (v5/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v10/*: any*/),
- (v11/*: any*/),
- {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": (v12/*: any*/),
- "concreteType": "AssetConnection",
- "kind": "LinkedField",
- "name": "assets",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "AssetEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Asset",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v11/*: any*/),
- (v13/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "amount",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "criticity",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "assetType",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "dataTypesStored",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "owner",
- "plural": false,
- "selections": [
- (v11/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v11/*: any*/),
- (v13/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "createdAt",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "updatedAt",
- "storageKey": null
- },
- (v10/*: any*/)
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasPreviousPage",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "startCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "kind": "ClientExtension",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__id",
- "storageKey": null
- }
- ]
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": (v12/*: any*/),
- "filters": [
- "orderBy"
- ],
- "handle": "connection",
- "key": "AssetsListView_assets",
- "kind": "LinkedHandle",
- "name": "assets"
- }
- ],
- "type": "Organization",
- "abstractKey": null
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "52c46484b71323276f81a31b48987698",
- "id": null,
- "metadata": {},
- "name": "AssetsListViewPaginationQuery",
- "operationKind": "query",
- "text": "query AssetsListViewPaginationQuery(\n $after: CursorKey\n $before: CursorKey\n $first: Int\n $last: Int\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...AssetsListView_assets_pbnwq\n id\n }\n}\n\nfragment AssetsListView_assets_pbnwq on Organization {\n id\n assets(first: $first, after: $after, last: $last, before: $before, orderBy: {direction: ASC, field: AMOUNT}) {\n edges {\n node {\n id\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors {\n edges {\n node {\n id\n name\n }\n }\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "b7ef7bd1063b9a578b82124ebbdbbbd2";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewQuery.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewQuery.graphql.ts
deleted file mode 100644
index c8f0807e5..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/AssetsListViewQuery.graphql.ts
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type AssetsListViewQuery$variables = {
- after?: string | null | undefined;
- before?: string | null | undefined;
- first?: number | null | undefined;
- last?: number | null | undefined;
- organizationId: string;
-};
-export type AssetsListViewQuery$data = {
- readonly organization: {
- readonly " $fragmentSpreads": FragmentRefs<"AssetsListView_assets">;
- };
-};
-export type AssetsListViewQuery = {
- response: AssetsListViewQuery$data;
- variables: AssetsListViewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "after"
-},
-v1 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "before"
-},
-v2 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "first"
-},
-v3 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "last"
-},
-v4 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "organizationId"
-},
-v5 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "organizationId"
- }
-],
-v6 = {
- "kind": "Variable",
- "name": "after",
- "variableName": "after"
-},
-v7 = {
- "kind": "Variable",
- "name": "before",
- "variableName": "before"
-},
-v8 = {
- "kind": "Variable",
- "name": "first",
- "variableName": "first"
-},
-v9 = {
- "kind": "Variable",
- "name": "last",
- "variableName": "last"
-},
-v10 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
-},
-v11 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v12 = [
- (v6/*: any*/),
- (v7/*: any*/),
- (v8/*: any*/),
- (v9/*: any*/),
- {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "AMOUNT"
- }
- }
-],
-v13 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": [
- (v0/*: any*/),
- (v1/*: any*/),
- (v2/*: any*/),
- (v3/*: any*/),
- (v4/*: any*/)
- ],
- "kind": "Fragment",
- "metadata": null,
- "name": "AssetsListViewQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v5/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "args": [
- (v6/*: any*/),
- (v7/*: any*/),
- (v8/*: any*/),
- (v9/*: any*/)
- ],
- "kind": "FragmentSpread",
- "name": "AssetsListView_assets"
- }
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [
- (v4/*: any*/),
- (v2/*: any*/),
- (v0/*: any*/),
- (v3/*: any*/),
- (v1/*: any*/)
- ],
- "kind": "Operation",
- "name": "AssetsListViewQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v5/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v10/*: any*/),
- (v11/*: any*/),
- {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": (v12/*: any*/),
- "concreteType": "AssetConnection",
- "kind": "LinkedField",
- "name": "assets",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "AssetEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Asset",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v11/*: any*/),
- (v13/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "amount",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "criticity",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "assetType",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "dataTypesStored",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "owner",
- "plural": false,
- "selections": [
- (v11/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v11/*: any*/),
- (v13/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "createdAt",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "updatedAt",
- "storageKey": null
- },
- (v10/*: any*/)
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasPreviousPage",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "startCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "kind": "ClientExtension",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__id",
- "storageKey": null
- }
- ]
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": (v12/*: any*/),
- "filters": [
- "orderBy"
- ],
- "handle": "connection",
- "key": "AssetsListView_assets",
- "kind": "LinkedHandle",
- "name": "assets"
- }
- ],
- "type": "Organization",
- "abstractKey": null
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "dd13d90d325e9f1eaa4d7be061c5a242",
- "id": null,
- "metadata": {},
- "name": "AssetsListViewQuery",
- "operationKind": "query",
- "text": "query AssetsListViewQuery(\n $organizationId: ID!\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n organization: node(id: $organizationId) {\n __typename\n ...AssetsListView_assets_pbnwq\n id\n }\n}\n\nfragment AssetsListView_assets_pbnwq on Organization {\n id\n assets(first: $first, after: $after, last: $last, before: $before, orderBy: {direction: ASC, field: AMOUNT}) {\n edges {\n node {\n id\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors {\n edges {\n node {\n id\n name\n }\n }\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "ce9a262aef17deeb6a9ca87b35014fb6";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/AssetsListView_assets.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/AssetsListView_assets.graphql.ts
deleted file mode 100644
index 3c54fa13c..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/AssetsListView_assets.graphql.ts
+++ /dev/null
@@ -1,346 +0,0 @@
-/**
- * @generated SignedSource<<2ddf214d0baa06962b8ffde078089c42>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ReaderFragment } from 'relay-runtime';
-export type AssetType = "PHYSICAL" | "VIRTUAL";
-export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
-import { FragmentRefs } from "relay-runtime";
-export type AssetsListView_assets$data = {
- readonly assets: {
- readonly __id: string;
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly amount: number;
- readonly assetType: AssetType;
- readonly createdAt: string;
- readonly criticity: CriticityLevel;
- readonly dataTypesStored: string;
- readonly id: string;
- readonly name: string;
- readonly owner: {
- readonly fullName: string;
- readonly id: string;
- };
- readonly updatedAt: string;
- readonly vendors: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- }>;
- };
- };
- }>;
- readonly pageInfo: {
- readonly endCursor: string | null | undefined;
- readonly hasNextPage: boolean;
- readonly hasPreviousPage: boolean;
- readonly startCursor: string | null | undefined;
- };
- };
- readonly id: string;
- readonly " $fragmentType": "AssetsListView_assets";
-};
-export type AssetsListView_assets$key = {
- readonly " $data"?: AssetsListView_assets$data;
- readonly " $fragmentSpreads": FragmentRefs<"AssetsListView_assets">;
-};
-
-const node: ReaderFragment = (function(){
-var v0 = [
- "assets"
-],
-v1 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
-};
-return {
- "argumentDefinitions": [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "after"
- },
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "before"
- },
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "first"
- },
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "last"
- }
- ],
- "kind": "Fragment",
- "metadata": {
- "connection": [
- {
- "count": null,
- "cursor": null,
- "direction": "bidirectional",
- "path": (v0/*: any*/)
- }
- ],
- "refetch": {
- "connection": {
- "forward": {
- "count": "first",
- "cursor": "after"
- },
- "backward": {
- "count": "last",
- "cursor": "before"
- },
- "path": (v0/*: any*/)
- },
- "fragmentPathInResult": [
- "node"
- ],
- "operation": require('./AssetsListViewPaginationQuery.graphql'),
- "identifierInfo": {
- "identifierField": "id",
- "identifierQueryVariableName": "id"
- }
- }
- },
- "name": "AssetsListView_assets",
- "selections": [
- (v1/*: any*/),
- {
- "alias": "assets",
- "args": [
- {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "AMOUNT"
- }
- }
- ],
- "concreteType": "AssetConnection",
- "kind": "LinkedField",
- "name": "__AssetsListView_assets_connection",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "AssetEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Asset",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- (v2/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "amount",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "criticity",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "assetType",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "dataTypesStored",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "owner",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- (v2/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "createdAt",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "updatedAt",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasPreviousPage",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "startCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "kind": "ClientExtension",
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__id",
- "storageKey": null
- }
- ]
- }
- ],
- "storageKey": "__AssetsListView_assets_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"AMOUNT\"})"
- }
- ],
- "type": "Organization",
- "abstractKey": null
-};
-})();
-
-(node as any).hash = "b7ef7bd1063b9a578b82124ebbdbbbd2";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewAddAssetVendorMutation.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewAddAssetVendorMutation.graphql.ts
deleted file mode 100644
index 046ee024a..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewAddAssetVendorMutation.graphql.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * @generated SignedSource<<29c3688b6280f97bc3713b4e107f012a>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type AddAssetVendorInput = {
- assetId: string;
- vendorId: string;
-};
-export type NewAssetViewAddAssetVendorMutation$variables = {
- input: AddAssetVendorInput;
-};
-export type NewAssetViewAddAssetVendorMutation$data = {
- readonly addAssetVendor: {
- readonly asset: {
- readonly id: string;
- readonly vendors: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- }>;
- };
- };
- };
-};
-export type NewAssetViewAddAssetVendorMutation = {
- response: NewAssetViewAddAssetVendorMutation$data;
- variables: NewAssetViewAddAssetVendorMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
- }
-],
-v1 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v2 = [
- {
- "alias": null,
- "args": [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
- ],
- "concreteType": "AddAssetVendorPayload",
- "kind": "LinkedField",
- "name": "addAssetVendor",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Asset",
- "kind": "LinkedField",
- "name": "asset",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v1/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "NewAssetViewAddAssetVendorMutation",
- "selections": (v2/*: any*/),
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "NewAssetViewAddAssetVendorMutation",
- "selections": (v2/*: any*/)
- },
- "params": {
- "cacheID": "5e1ee36fdf08abfcfc75ffe7e9f6f81f",
- "id": null,
- "metadata": {},
- "name": "NewAssetViewAddAssetVendorMutation",
- "operationKind": "mutation",
- "text": "mutation NewAssetViewAddAssetVendorMutation(\n $input: AddAssetVendorInput!\n) {\n addAssetVendor(input: $input) {\n asset {\n id\n vendors {\n edges {\n node {\n id\n name\n }\n }\n }\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "856e34e5fb3ca94b3cc38fe7edca156d";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewCreateAssetMutation.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewCreateAssetMutation.graphql.ts
deleted file mode 100644
index 21e702113..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewCreateAssetMutation.graphql.ts
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-export type AssetType = "PHYSICAL" | "VIRTUAL";
-export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
-export type CreateAssetInput = {
- amount: number;
- assetType: AssetType;
- criticity?: CriticityLevel;
- dataTypesStored: string;
- name: string;
- organizationId: string;
- ownerId: string;
- vendorIds?: ReadonlyArray | null | undefined;
-};
-export type NewAssetViewCreateAssetMutation$variables = {
- connections: ReadonlyArray;
- input: CreateAssetInput;
-};
-export type NewAssetViewCreateAssetMutation$data = {
- readonly createAsset: {
- readonly assetEdge: {
- readonly node: {
- readonly amount: number;
- readonly assetType: AssetType;
- readonly criticity: CriticityLevel;
- readonly dataTypesStored: string;
- readonly id: string;
- readonly owner: {
- readonly fullName: string;
- readonly id: string;
- };
- readonly vendors: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- }>;
- };
- };
- };
- };
-};
-export type NewAssetViewCreateAssetMutation = {
- response: NewAssetViewCreateAssetMutation$data;
- variables: NewAssetViewCreateAssetMutation$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "connections"
-},
-v1 = {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "input"
-},
-v2 = [
- {
- "kind": "Variable",
- "name": "input",
- "variableName": "input"
- }
-],
-v3 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v4 = {
- "alias": null,
- "args": null,
- "concreteType": "AssetEdge",
- "kind": "LinkedField",
- "name": "assetEdge",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Asset",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v3/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "amount",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "criticity",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "assetType",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "dataTypesStored",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "owner",
- "plural": false,
- "selections": [
- (v3/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- }
- ],
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v3/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "storageKey": null
-};
-return {
- "fragment": {
- "argumentDefinitions": [
- (v0/*: any*/),
- (v1/*: any*/)
- ],
- "kind": "Fragment",
- "metadata": null,
- "name": "NewAssetViewCreateAssetMutation",
- "selections": [
- {
- "alias": null,
- "args": (v2/*: any*/),
- "concreteType": "CreateAssetPayload",
- "kind": "LinkedField",
- "name": "createAsset",
- "plural": false,
- "selections": [
- (v4/*: any*/)
- ],
- "storageKey": null
- }
- ],
- "type": "Mutation",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": [
- (v1/*: any*/),
- (v0/*: any*/)
- ],
- "kind": "Operation",
- "name": "NewAssetViewCreateAssetMutation",
- "selections": [
- {
- "alias": null,
- "args": (v2/*: any*/),
- "concreteType": "CreateAssetPayload",
- "kind": "LinkedField",
- "name": "createAsset",
- "plural": false,
- "selections": [
- (v4/*: any*/),
- {
- "alias": null,
- "args": null,
- "filters": null,
- "handle": "prependEdge",
- "key": "",
- "kind": "LinkedHandle",
- "name": "assetEdge",
- "handleArgs": [
- {
- "kind": "Variable",
- "name": "connections",
- "variableName": "connections"
- }
- ]
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "2c2aaa87fd4a17b47fb6207c9be861b5",
- "id": null,
- "metadata": {},
- "name": "NewAssetViewCreateAssetMutation",
- "operationKind": "mutation",
- "text": "mutation NewAssetViewCreateAssetMutation(\n $input: CreateAssetInput!\n) {\n createAsset(input: $input) {\n assetEdge {\n node {\n id\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors {\n edges {\n node {\n id\n name\n }\n }\n }\n }\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "56f34aeeaca0d8165b8145c83b30fe67";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewQuery.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewQuery.graphql.ts
deleted file mode 100644
index dbf6f697b..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/NewAssetViewQuery.graphql.ts
+++ /dev/null
@@ -1,341 +0,0 @@
-/**
- * @generated SignedSource<<166441573cdbf7c3c7aaccc74eb2edc7>>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ConcreteRequest } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type NewAssetViewQuery$variables = {
- organizationId: string;
-};
-export type NewAssetViewQuery$data = {
- readonly organization: {
- readonly id?: string;
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- };
- }>;
- };
- readonly " $fragmentSpreads": FragmentRefs<"PeopleSelector_organization">;
- };
-};
-export type NewAssetViewQuery = {
- response: NewAssetViewQuery$data;
- variables: NewAssetViewQuery$variables;
-};
-
-const node: ConcreteRequest = (function(){
-var v0 = [
- {
- "defaultValue": null,
- "kind": "LocalArgument",
- "name": "organizationId"
- }
-],
-v1 = [
- {
- "kind": "Variable",
- "name": "id",
- "variableName": "organizationId"
- }
-],
-v2 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "id",
- "storageKey": null
-},
-v3 = {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "NAME"
- }
-},
-v4 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
-},
-v5 = {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "cursor",
- "storageKey": null
-},
-v6 = {
- "alias": null,
- "args": null,
- "concreteType": "PageInfo",
- "kind": "LinkedField",
- "name": "pageInfo",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "endCursor",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "hasNextPage",
- "storageKey": null
- }
- ],
- "storageKey": null
-},
-v7 = [
- {
- "alias": null,
- "args": null,
- "concreteType": "VendorEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "Vendor",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "name",
- "storageKey": null
- },
- (v4/*: any*/)
- ],
- "storageKey": null
- },
- (v5/*: any*/)
- ],
- "storageKey": null
- },
- (v6/*: any*/)
-],
-v8 = {
- "kind": "Literal",
- "name": "first",
- "value": 100
-},
-v9 = [
- (v8/*: any*/),
- {
- "kind": "Literal",
- "name": "orderBy",
- "value": {
- "direction": "ASC",
- "field": "FULL_NAME"
- }
- }
-],
-v10 = [
- "orderBy"
-],
-v11 = [
- (v8/*: any*/),
- (v3/*: any*/)
-];
-return {
- "fragment": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Fragment",
- "metadata": null,
- "name": "NewAssetViewQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- {
- "kind": "InlineFragment",
- "selections": [
- (v2/*: any*/),
- {
- "args": null,
- "kind": "FragmentSpread",
- "name": "PeopleSelector_organization"
- },
- {
- "alias": "vendors",
- "args": [
- (v3/*: any*/)
- ],
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "__NewAssetView_vendors_connection",
- "plural": false,
- "selections": (v7/*: any*/),
- "storageKey": "__NewAssetView_vendors_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"NAME\"})"
- }
- ],
- "type": "Organization",
- "abstractKey": null
- }
- ],
- "storageKey": null
- }
- ],
- "type": "Query",
- "abstractKey": null
- },
- "kind": "Request",
- "operation": {
- "argumentDefinitions": (v0/*: any*/),
- "kind": "Operation",
- "name": "NewAssetViewQuery",
- "selections": [
- {
- "alias": "organization",
- "args": (v1/*: any*/),
- "concreteType": null,
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v4/*: any*/),
- (v2/*: any*/),
- {
- "kind": "InlineFragment",
- "selections": [
- {
- "alias": null,
- "args": (v9/*: any*/),
- "concreteType": "PeopleConnection",
- "kind": "LinkedField",
- "name": "peoples",
- "plural": false,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "PeopleEdge",
- "kind": "LinkedField",
- "name": "edges",
- "plural": true,
- "selections": [
- {
- "alias": null,
- "args": null,
- "concreteType": "People",
- "kind": "LinkedField",
- "name": "node",
- "plural": false,
- "selections": [
- (v2/*: any*/),
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "fullName",
- "storageKey": null
- },
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "primaryEmailAddress",
- "storageKey": null
- },
- (v4/*: any*/)
- ],
- "storageKey": null
- },
- (v5/*: any*/)
- ],
- "storageKey": null
- },
- (v6/*: any*/)
- ],
- "storageKey": "peoples(first:100,orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
- },
- {
- "alias": null,
- "args": (v9/*: any*/),
- "filters": (v10/*: any*/),
- "handle": "connection",
- "key": "PeopleSelector_organization_peoples",
- "kind": "LinkedHandle",
- "name": "peoples"
- },
- {
- "alias": null,
- "args": (v11/*: any*/),
- "concreteType": "VendorConnection",
- "kind": "LinkedField",
- "name": "vendors",
- "plural": false,
- "selections": (v7/*: any*/),
- "storageKey": "vendors(first:100,orderBy:{\"direction\":\"ASC\",\"field\":\"NAME\"})"
- },
- {
- "alias": null,
- "args": (v11/*: any*/),
- "filters": (v10/*: any*/),
- "handle": "connection",
- "key": "NewAssetView_vendors",
- "kind": "LinkedHandle",
- "name": "vendors"
- }
- ],
- "type": "Organization",
- "abstractKey": null
- }
- ],
- "storageKey": null
- }
- ]
- },
- "params": {
- "cacheID": "feaf4563ef8c073edbbbfbb935b1a802",
- "id": null,
- "metadata": {
- "connection": [
- {
- "count": null,
- "cursor": null,
- "direction": "forward",
- "path": [
- "organization",
- "vendors"
- ]
- }
- ]
- },
- "name": "NewAssetViewQuery",
- "operationKind": "query",
- "text": "query NewAssetViewQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n ...PeopleSelector_organization\n vendors(first: 100, orderBy: {direction: ASC, field: NAME}) {\n edges {\n node {\n id\n name\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n\nfragment PeopleSelector_organization on Organization {\n id\n peoples(first: 100, orderBy: {direction: ASC, field: FULL_NAME}) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n"
- }
-};
-})();
-
-(node as any).hash = "9f48276b2f88367acfd95b4d95167e73";
-
-export default node;
diff --git a/apps/console/src/pages/organizations/assets/__generated__/NewAssetView_organization.graphql.ts b/apps/console/src/pages/organizations/assets/__generated__/NewAssetView_organization.graphql.ts
deleted file mode 100644
index cabd540ad..000000000
--- a/apps/console/src/pages/organizations/assets/__generated__/NewAssetView_organization.graphql.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @generated SignedSource<>
- * @lightSyntaxTransform
- * @nogrep
- */
-
-/* tslint:disable */
-/* eslint-disable */
-// @ts-nocheck
-
-import { ReaderFragment } from 'relay-runtime';
-import { FragmentRefs } from "relay-runtime";
-export type NewAssetView_organization$data = {
- readonly " $fragmentSpreads": FragmentRefs<"PeopleSelector_organization">;
- readonly " $fragmentType": "NewAssetView_organization";
-};
-export type NewAssetView_organization$key = {
- readonly " $data"?: NewAssetView_organization$data;
- readonly " $fragmentSpreads": FragmentRefs<"NewAssetView_organization">;
-};
-
-const node: ReaderFragment = {
- "argumentDefinitions": [],
- "kind": "Fragment",
- "metadata": null,
- "name": "NewAssetView_organization",
- "selections": [
- {
- "args": null,
- "kind": "FragmentSpread",
- "name": "PeopleSelector_organization"
- }
- ],
- "type": "Organization",
- "abstractKey": null
-};
-
-(node as any).hash = "96eb63be6b58e29a7bd3dafaaa07d5a4";
-
-export default node;
diff --git a/apps/console2/src/pages/organizations/assets/dialogs/CreateAssetDialog.tsx b/apps/console/src/pages/organizations/assets/dialogs/CreateAssetDialog.tsx
similarity index 100%
rename from apps/console2/src/pages/organizations/assets/dialogs/CreateAssetDialog.tsx
rename to apps/console/src/pages/organizations/assets/dialogs/CreateAssetDialog.tsx
diff --git a/apps/console/src/pages/organizations/data/DataListPage.tsx b/apps/console/src/pages/organizations/data/DataListPage.tsx
deleted file mode 100644
index 8a994aa4a..000000000
--- a/apps/console/src/pages/organizations/data/DataListPage.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import { Skeleton } from "@/components/ui/skeleton";
-import { PageTemplate } from "@/components/PageTemplate";
-import { useLocation } from "react-router";
-import { Suspense } from "react";
-import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
-import { lazy } from "@probo/react-lazy";
-
-const DataListView = lazy(() => import("./DataListView"));
-
-export function DataListViewSkeleton() {
- return (
-
-
- {Array.from({ length: 5 }).map((_, i) => (
-
- ))}
-
-
- );
-}
-
-export function DataListPage() {
- const location = useLocation();
-
- return (
- }>
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/data/DataListView.tsx b/apps/console/src/pages/organizations/data/DataListView.tsx
deleted file mode 100644
index 46c6e65e7..000000000
--- a/apps/console/src/pages/organizations/data/DataListView.tsx
+++ /dev/null
@@ -1,363 +0,0 @@
-import { Suspense, useEffect, useTransition, useRef } from "react";
-import {
- graphql,
- PreloadedQuery,
- usePreloadedQuery,
- useQueryLoader,
- useMutation,
- usePaginationFragment,
-} from "react-relay";
-import { useSearchParams, useParams } from "react-router";
-import { Avatar, AvatarFallback } from "@/components/ui/avatar";
-import { Badge } from "@/components/ui/badge";
-import { Database, Plus, Trash2, ChevronRight } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { Link } from "react-router";
-import type { DataListViewQuery as DataListViewQueryType } from "./__generated__/DataListViewQuery.graphql";
-import type { DataListViewDeleteDataMutation } from "./__generated__/DataListViewDeleteDataMutation.graphql";
-import { DataListViewPaginationQuery } from "./__generated__/DataListViewPaginationQuery.graphql";
-import { DataListView_data$key } from "./__generated__/DataListView_data.graphql";
-import { PageTemplate } from "@/components/PageTemplate";
-import { DataListViewSkeleton } from "./DataListPage";
-import { BreadCrumb } from "../OrganizationBreadcrumb";
-
-const ITEMS_PER_PAGE = 25;
-
-const dataListViewQuery = graphql`
- query DataListViewQuery(
- $organizationId: ID!
- $first: Int
- $after: CursorKey
- $last: Int
- $before: CursorKey
- ) {
- organization: node(id: $organizationId) {
- ...DataListView_data
- @arguments(first: $first, after: $after, last: $last, before: $before)
- }
- }
-`;
-
-const dataListFragment = graphql`
- fragment DataListView_data on Organization
- @refetchable(queryName: "DataListViewPaginationQuery")
- @argumentDefinitions(
- first: { type: "Int" }
- after: { type: "CursorKey" }
- last: { type: "Int" }
- before: { type: "CursorKey" }
- ) {
- id
- data(
- first: $first
- after: $after
- last: $last
- before: $before
- orderBy: { direction: ASC, field: NAME }
- ) @connection(key: "DataListView_data") {
- __id
- edges {
- node {
- id
- name
- dataClassification
- owner {
- id
- fullName
- }
- vendors {
- edges {
- node {
- id
- name
- }
- }
- }
- createdAt
- updatedAt
- }
- }
- pageInfo {
- hasNextPage
- hasPreviousPage
- startCursor
- endCursor
- }
- }
- }
-`;
-
-const deleteDataMutation = graphql`
- mutation DataListViewDeleteDataMutation(
- $input: DeleteDatumInput!
- $connections: [ID!]!
- ) {
- deleteDatum(input: $input) {
- deletedDatumId @deleteEdge(connections: $connections)
- }
- }
-`;
-
-function LoadAboveButton({
- isLoading,
- hasMore,
- onLoadMore,
-}: {
- isLoading: boolean;
- hasMore: boolean;
- onLoadMore: () => void;
-}) {
- if (!hasMore) {
- return null;
- }
-
- return (
-
-
-
- );
-}
-
-function LoadBelowButton({
- isLoading,
- hasMore,
- onLoadMore,
-}: {
- isLoading: boolean;
- hasMore: boolean;
- onLoadMore: () => void;
-}) {
- if (!hasMore) {
- return null;
- }
-
- return (
-
-
-
- );
-}
-
-function DataListContent({
- queryRef,
-}: {
- queryRef: PreloadedQuery;
-}) {
- const data = usePreloadedQuery(
- dataListViewQuery,
- queryRef,
- );
- const [, setSearchParams] = useSearchParams();
- const [, startTransition] = useTransition();
- const [deleteData] =
- useMutation(deleteDataMutation);
- const { organizationId } = useParams();
- const isPaginationUpdate = useRef(false);
-
- const {
- data: dataConnection,
- loadNext,
- loadPrevious,
- hasNext,
- hasPrevious,
- isLoadingNext,
- isLoadingPrevious,
- } = usePaginationFragment<
- DataListViewPaginationQuery,
- DataListView_data$key
- >(dataListFragment, data.organization);
-
- const dataItems = dataConnection.data.edges.map((edge) => edge.node) ?? [];
- const pageInfo = dataConnection.data.pageInfo;
-
- return (
- <>
-
-
-
-
- Add data
-
-
- }
- >
-
-
- {dataItems.map((item) => (
-
-
-
-
-
-
-
-
-
-
-
{item?.name}
- {item?.owner?.fullName && (
- <>
-
•
-
- Owned by {item.owner.fullName}
-
- >
- )}
-
- {item?.vendors?.edges?.length > 0 && (
-
- Vendors: {item.vendors.edges.map(edge => edge?.node?.name).join(", ")}
-
- )}
-
-
-
-
- {item?.dataClassification === "PUBLIC"
- ? "Public"
- : item?.dataClassification === "INTERNAL"
- ? "Internal"
- : item?.dataClassification === "CONFIDENTIAL"
- ? "Confidential"
- : item?.dataClassification === "SECRET"
- ? "Secret"
- : "Unknown"}
-
-
-
-
-
-
- ))}
-
-
-
{
- startTransition(() => {
- isPaginationUpdate.current = true;
- setSearchParams((prev) => {
- prev.set("before", pageInfo?.startCursor || "");
- prev.delete("after");
- return prev;
- });
- loadPrevious(ITEMS_PER_PAGE);
- });
- }}
- />
- {
- startTransition(() => {
- isPaginationUpdate.current = true;
- setSearchParams((prev) => {
- prev.set("after", pageInfo?.endCursor || "");
- prev.delete("before");
- return prev;
- });
- loadNext(ITEMS_PER_PAGE);
- });
- }}
- />
-
-
- >
- );
-}
-
-export default function DataListView() {
- const [searchParams] = useSearchParams();
- const [queryRef, loadQuery] =
- useQueryLoader(dataListViewQuery);
- const { organizationId } = useParams();
- const isPaginationUpdate = useRef(false);
-
- useEffect(() => {
- const after = searchParams.get("after");
- const before = searchParams.get("before");
-
- // Skip the query if this was triggered by pagination
- if (isPaginationUpdate.current) {
- isPaginationUpdate.current = false;
- return;
- }
-
- loadQuery({
- organizationId: organizationId!,
- first: before ? undefined : ITEMS_PER_PAGE,
- after: after || undefined,
- last: before ? ITEMS_PER_PAGE : undefined,
- before: before || undefined,
- });
- }, [loadQuery, organizationId, searchParams]);
-
- if (!queryRef) {
- return ;
- }
-
- return (
- }>
-
-
- );
-}
diff --git a/apps/console2/src/pages/organizations/data/DataPage.tsx b/apps/console/src/pages/organizations/data/DataPage.tsx
similarity index 100%
rename from apps/console2/src/pages/organizations/data/DataPage.tsx
rename to apps/console/src/pages/organizations/data/DataPage.tsx
diff --git a/apps/console2/src/pages/organizations/data/DatumDetailsPage.tsx b/apps/console/src/pages/organizations/data/DatumDetailsPage.tsx
similarity index 100%
rename from apps/console2/src/pages/organizations/data/DatumDetailsPage.tsx
rename to apps/console/src/pages/organizations/data/DatumDetailsPage.tsx
diff --git a/apps/console/src/pages/organizations/data/DatumPage.tsx b/apps/console/src/pages/organizations/data/DatumPage.tsx
deleted file mode 100644
index 3c8caa4d6..000000000
--- a/apps/console/src/pages/organizations/data/DatumPage.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { PageTemplateSkeleton } from "@/components/PageTemplate";
-import { Suspense } from "react";
-import { lazy } from "@probo/react-lazy";
-import { useLocation } from "react-router";
-import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
-
-const DatumView = lazy(() => import("./DatumView"));
-
-export function DatumViewSkeleton() {
- return (
-
-
-
-
- {[1, 2].map((i) => (
-
- ))}
-
-
-
- );
-}
-
-export function DatumPage() {
- const location = useLocation();
-
- return (
- }>
-
-
-
-
- );
-}
diff --git a/apps/console/src/pages/organizations/data/DatumView.tsx b/apps/console/src/pages/organizations/data/DatumView.tsx
deleted file mode 100644
index c1c660e8f..000000000
--- a/apps/console/src/pages/organizations/data/DatumView.tsx
+++ /dev/null
@@ -1,375 +0,0 @@
-"use client";
-
-import { Card } from "@/components/ui/card";
-import { Label } from "@/components/ui/label";
-import { Input } from "@/components/ui/input";
-import { Button } from "@/components/ui/button";
-import { useToast } from "@/hooks/use-toast";
-import {
- graphql,
- PreloadedQuery,
- usePreloadedQuery,
- useQueryLoader,
- useMutation,
-} from "react-relay";
-import { Suspense, useEffect, useState, useCallback } from "react";
-import type { DataClassification, DatumViewQuery as DatumViewQueryType } from "./__generated__/DatumViewQuery.graphql";
-import { useParams } from "react-router";
-import { PageTemplate } from "@/components/PageTemplate";
-import { DatumViewSkeleton } from "./DatumPage";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@/components/ui/select";
-import PeopleSelector from "@/components/PeopleSelector";
-import { Badge } from "@/components/ui/badge";
-import { X } from "lucide-react";
-import { BreadCrumb } from "../OrganizationBreadcrumb";
-
-const datumViewQuery = graphql`
- query DatumViewQuery($datumId: ID!, $organizationId: ID!) {
- node(id: $datumId) {
- ... on Datum {
- id
- name
- dataClassification
- vendors {
- edges {
- node {
- id
- name
- }
- }
- }
- owner {
- id
- fullName
- }
- createdAt
- updatedAt
- }
- }
- organization: node(id: $organizationId) {
- ... on Organization {
- id
- ...PeopleSelector_organization
- vendors(first: 100, orderBy: { direction: ASC, field: NAME }) @connection(key: "DatumView_vendors") {
- edges {
- node {
- id
- name
- }
- }
- }
- }
- }
- }
-`;
-
-const updateDatumMutation = graphql`
- mutation DatumViewUpdateDatumMutation($input: UpdateDatumInput!) {
- updateDatum(input: $input) {
- datum {
- id
- name
- dataClassification
- vendors {
- edges {
- node {
- id
- }
- }
- }
- owner {
- id
- fullName
- }
- updatedAt
- }
- }
- }
-`;
-
-// type DataClassification = "PUBLIC" | "INTERNAL" | "CONFIDENTIAL" | "SECRET";
-
-interface Datum {
- readonly id?: string;
- readonly name?: string;
- readonly description?: string;
- readonly dataClassification?: DataClassification;
- readonly owner?: {
- readonly id: string;
- readonly fullName: string;
- } | null;
- readonly createdAt?: string;
- readonly updatedAt?: string;
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: {
- readonly id: string;
- readonly name: string;
- } | null;
- } | null> | null;
- } | null;
-}
-
-interface Vendor {
- readonly id: string;
- readonly name: string;
-}
-
-interface Organization {
- readonly id?: string;
- readonly vendors?: {
- readonly edges: ReadonlyArray<{
- readonly node: Vendor;
- } | null> | null;
- } | null;
-}
-
-function EditableField({
- label,
- value,
- onChange,
- type = "text",
- helpText,
-}: {
- label: string;
- value: string;
- onChange: (value: string) => void;
- type?: string;
- helpText?: string;
-}) {
- return (
-
-
-
-
-
-
onChange(e.target.value)}
- />
- {helpText &&
{helpText}
}
-
-
- );
-}
-
-function DatumViewContent({
- queryRef,
-}: {
- queryRef: PreloadedQuery;
-}) {
- const data = usePreloadedQuery(datumViewQuery, queryRef);
- const [editedFields, setEditedFields] = useState>(new Set());
- const datum = data.node as Datum | null;
- const organization = data.organization as Organization;
- const [formData, setFormData] = useState({
- name: datum?.name || "",
- dataClassification: datum?.dataClassification || "INTERNAL",
- ownerId: datum?.owner?.id || "",
- selectedVendorIds: datum?.vendors?.edges?.map(edge => edge?.node?.id).filter((id): id is string => id != null) || [],
- });
- const [commit] = useMutation(updateDatumMutation);
- const { toast } = useToast();
- const hasChanges = editedFields.size > 0;
-
- const handleSave = useCallback(() => {
- const nodeId = data.node?.id;
- if (!nodeId) return;
-
- commit({
- variables: {
- input: {
- id: nodeId,
- name: formData.name,
- dataClassification: formData.dataClassification,
- ownerId: formData.ownerId,
- vendorIds: formData.selectedVendorIds,
- },
- },
- onCompleted: () => {
- toast({
- title: "Success",
- description: "Changes saved successfully",
- variant: "default",
- });
- setEditedFields(new Set());
- },
- onError: (error) => {
- toast({
- title: "Error",
- description: error.message || "Failed to save changes",
- variant: "destructive",
- });
- },
- });
- }, [commit, data.node?.id, formData, toast]);
-
- const handleFieldChange = (field: keyof typeof formData, value: unknown) => {
- setFormData((prev) => ({
- ...prev,
- [field]: value,
- }));
- setEditedFields((prev) => new Set(prev).add(field));
- };
-
- const handleVendorSelect = (vendorId: string) => {
- setFormData((prev) => ({
- ...prev,
- selectedVendorIds: prev.selectedVendorIds.includes(vendorId)
- ? prev.selectedVendorIds.filter((id) => id !== vendorId)
- : [...prev.selectedVendorIds, vendorId],
- }));
- setEditedFields((prev) => new Set(prev).add("selectedVendorIds"));
- };
-
- const handleCancel = () => {
- const datum = data.node as Datum | null;
- setFormData({
- name: datum?.name || "",
- dataClassification: datum?.dataClassification || "INTERNAL",
- ownerId: datum?.owner?.id || "",
- selectedVendorIds: datum?.vendors?.edges?.map(edge => edge?.node?.id).filter((id): id is string => id != null) || [],
- });
- setEditedFields(new Set());
- };
-
- const vendors = (organization.vendors?.edges || [])
- .map((edge) => edge?.node)
- .filter((node): node is Vendor => node != null);
-
- return (
- <>
-
-
-
-
-
handleFieldChange("name", value)}
- />
-
-
-
-
-
Data Details
-
-
-
-
-
-
-
-
handleFieldChange("ownerId", value)}
- placeholder="Select data owner"
- />
-
-
-
-
-
-
- {formData.selectedVendorIds.map((vendorId) => {
- const vendor = vendors.find((v) => v.id === vendorId);
- if (!vendor) return null;
- return (
-
- {vendor.name}
-