-
Notifications
You must be signed in to change notification settings - Fork 9
[Customer Portal Micro App] Add Project Selection View #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
lithika-damnod
wants to merge
1
commit into
wso2-open-operations:customer-portal-milestone-1
Choose a base branch
from
lithika-damnod:feature/project-selection-view
base: customer-portal-milestone-1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,031
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| VITE_BACKEND_URL=https://example.com/api | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||||
| # Logs | ||||||||
| logs | ||||||||
| *.log | ||||||||
| npm-debug.log* | ||||||||
| yarn-debug.log* | ||||||||
| yarn-error.log* | ||||||||
| pnpm-debug.log* | ||||||||
| lerna-debug.log* | ||||||||
|
|
||||||||
| node_modules | ||||||||
| dist | ||||||||
| dist-ssr | ||||||||
| *.local | ||||||||
| package-lock.json | ||||||||
|
|
||||||||
| # Editor directories and files | ||||||||
| .vscode/* | ||||||||
| !.vscode/extensions.json | ||||||||
| .idea | ||||||||
| .DS_Store | ||||||||
| *.suo | ||||||||
| *.ntvs* | ||||||||
| *.njsproj | ||||||||
| *.sln | ||||||||
| *.sw? | ||||||||
|
|
||||||||
| # config.js | ||||||||
| /public/config.js | ||||||||
|
|
||||||||
| .env | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "endOfLine": "lf", | ||
| "singleQuote": false, | ||
| "trailingComma": "all", | ||
| "printWidth": 120, | ||
| "semi": true, | ||
| "tabWidth": 2 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ## Setting Up Environment Configuration | ||
|
|
||
| 1. **Create a file named `config.js` inside the `public` folder in root directory.** | ||
| 2. **Add the following code to `config.js`:** | ||
|
|
||
| ```javascript | ||
| window.config = { | ||
| ASGARDEO_BASE_URL: "", // Asgardeo base URL | ||
| CLIENT_ID: "", // Asgardeo client ID | ||
| SIGN_IN_REDIRECT_URL: "", // Redirect URL after sign in | ||
| SIGN_OUT_REDIRECT_URL: "", // Redirect URL after sign out | ||
| BACKEND_BASE_URL: "", // Backend API base URL | ||
| IS_MICROAPP: true, | ||
| }; | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // Copyright (c) 2025 WSO2 LLC. (https://www.wso2.com). | ||
| // | ||
| // WSO2 LLC. licenses this file to you under the Apache License, | ||
| // Version 2.0 (the "License"); you may not use this file except | ||
| // in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| 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"; | ||
| import { defineConfig, globalIgnores } from "eslint/config"; | ||
| import prettier from "eslint-plugin-prettier"; | ||
| import prettierConfig from "eslint-config-prettier"; | ||
|
|
||
| export default defineConfig([ | ||
| globalIgnores(["dist"]), | ||
| { | ||
| files: ["**/*.{ts,tsx}"], | ||
| extends: [js.configs.recommended, ...tseslint.configs.recommended, prettierConfig], | ||
| plugins: { | ||
| "react-hooks": reactHooks, | ||
| "react-refresh": reactRefresh, | ||
| prettier: prettier, | ||
| }, | ||
| rules: { | ||
| ...reactHooks.configs.recommended.rules, | ||
| ...reactRefresh.configs.vite.rules, | ||
| "prettier/prettier": "error", | ||
| }, | ||
| languageOptions: { | ||
| ecmaVersion: 2020, | ||
| globals: globals.browser, | ||
| }, | ||
| }, | ||
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <!-- | ||
| Copyright (c) 2025 WSO2 LLC. (https://www.wso2.com). | ||
|
|
||
| WSO2 LLC. licenses this file to you under the Apache License, | ||
| Version 2.0 (the "License"); you may not use this file except | ||
| in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
|
|
||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/wso2-logo.svg" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Vite + React + TS</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| <script src="/config.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| { | ||
| "name": "microapp", | ||
| "private": true, | ||
| "version": "0.0.0", | ||
| "type": "module", | ||
| "scripts": { | ||
| "dev": "vite", | ||
| "build": "tsc -b && vite build", | ||
| "lint": "eslint .", | ||
| "preview": "vite preview", | ||
| "prettier": "prettier --write .", | ||
| "prettier:check": "prettier --check ." | ||
| }, | ||
| "dependencies": { | ||
| "@asgardeo/auth-react": "^5.3.0", | ||
| "@emotion/react": "^11.14.0", | ||
| "@emotion/styled": "^11.14.1", | ||
| "@headlessui/react": "^2.2.3", | ||
| "@mui/icons-material": "^7.3.6", | ||
| "@mui/material": "^7.3.6", | ||
| "@tanstack/react-query": "^5.90.12", | ||
| "@types/react": "^19.1.3", | ||
| "@types/react-dom": "^19.1.3", | ||
| "@types/react-router-dom": "^5.3.3", | ||
| "axios": "^1.13.2", | ||
| "jwt-decode": "^4.0.0", | ||
| "react": "^19.1.1", | ||
| "react-dom": "^19.1.1", | ||
| "react-router-dom": "^7.9.1", | ||
| "vite-plugin-svgr": "^4.5.0", | ||
| "vite-tsconfig-paths": "^5.1.4", | ||
| "zustand": "^5.0.9" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed let's use Context API for state management |
||
| }, | ||
| "devDependencies": { | ||
| "@eslint/js": "^9.39.1", | ||
| "@tanstack/eslint-plugin-query": "^5.91.2", | ||
| "@types/node": "^24.10.1", | ||
| "@types/react": "^19.1.13", | ||
| "@types/react-dom": "^19.1.9", | ||
| "@vitejs/plugin-react": "^5.0.3", | ||
| "eslint": "^9.39.1", | ||
| "eslint-config-prettier": "^10.1.8", | ||
| "eslint-plugin-prettier": "^5.5.4", | ||
| "eslint-plugin-react": "^7.37.5", | ||
| "eslint-plugin-react-hooks": "^5.2.0", | ||
| "eslint-plugin-react-refresh": "^0.4.20", | ||
| "globals": "^16.5.0", | ||
| "prettier": "3.6.2", | ||
| "typescript": "~5.8.3", | ||
| "typescript-eslint": "^8.46.4", | ||
| "vite": "^7.1.7" | ||
| } | ||
| } | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /* | ||
| Copyright (c) 2025 WSO2 LLC. (https://www.wso2.com). | ||
|
|
||
| WSO2 LLC. licenses this file to you under the Apache License, | ||
| Version 2.0 (the "License"); you may not use this file except | ||
| in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| */ | ||
|
|
||
| body { | ||
| margin: 0; | ||
| font-family: "Arial", sans-serif; | ||
| background-color: #fff; | ||
| } | ||
|
|
||
| .container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| height: 100vh; | ||
| background-color: #fff; | ||
| padding: 0 16px; | ||
| } | ||
|
|
||
| .loading-container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| height: 100vh; | ||
| } | ||
|
|
||
| .spinner { | ||
| border: 4px solid rgba(0, 0, 0, 0.1); | ||
| border-left-color: #d25d23; | ||
| border-radius: 50%; | ||
| width: 40px; | ||
| height: 40px; | ||
| animation: spin 1s linear infinite; | ||
| } | ||
|
|
||
| @keyframes spin { | ||
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) 2025 WSO2 LLC. (https://www.wso2.com). | ||
| // | ||
| // WSO2 LLC. licenses this file to you under the Apache License, | ||
| // Version 2.0 (the "License"); you may not use this file except | ||
| // in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| import React from "react"; | ||
| import HomePage from "@pages/HomePage"; | ||
| import { HashRouter as Router, Route, Routes } from "react-router-dom"; | ||
|
|
||
| const App: React.FC = () => { | ||
| return ( | ||
| <Router> | ||
| <Routes> | ||
| <Route path="/" element={<HomePage />} /> | ||
| </Routes> | ||
| </Router> | ||
| ); | ||
| }; | ||
|
|
||
| export default App; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.