Skip to content

Commit

Permalink
Feat/backoffice (#636)
Browse files Browse the repository at this point in the history
* feat(codegen): add getPendingReviews query

* feat(admin-web): setup apollo and add getPendingReviews api

* feat: add override query in frontend

* refactor: migrate apollo provider to AppProvider

* Configure pre-release mode

* change sync workflow

* Version Packages (#512)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* install changeset in workflow

* fix sync beta workflow

* add commit identity

* Enter pre-release mode

* fix transform packages

* feat: add override query in frontend

* fix: edit import path

* feat: add HtmlSanitizer and Navbar

* feat: add approvedReviews and GenEd Page

* ci: update pnpm-lock

* move transpile packages out of experimental

* refactor: migrate appProvider to context folder

* refactor: create pendingReviews page and remove api page

* ci(gitignore): remove .env from gitignore

* refactor: create genEd module

* refactor: migrate pendingReviews to its own module

* refactor: migrate approvedReviews to its own module

* refactor: remove unused codes

Including
1. Logging
2. proxy in httpClient
3. Admin access token leaked in apollo

* fix(homePage): move router.push inside useEffect

* refactor(pendingReviews): remove unused codes

* refactor(apollo): remove course search cache from apollo client

* ci(env): remove unused variables

* feat: add MUI and create pendingReviews design

* feat(pendingReviews): add skeleton

* install mui

* feat: add themeProvider

* feat: add Poppin and Prompts fonts

* feat: recreate Navbar with MUI's appbar

* feat: add styling to Navbar(Appbar)

* docs: add required environment variables to readme

* feat: Demo genEd table

* setup review with graphql

* feat(admin-api): add override

* feat(admin-api): add get-all-reviews query

* refactor(admin-api): remove unused codes and comments

* add graphql asset

* add enum graphql

* remove unused file

* remove unused env from template and config

* fix lockfile broken

* add dashboard url to env

* fix env and config

* match dependencies version to api's

* feat(sidebar): add sidebar

* feat(sidebar): decorate sidebar

* feat: add fonts

* feat: add theme palette

* feat: add highlight link when selected

* fix(index): remove import .css

* feat: pendingReview header

* feat: upper Review page

* feat: table header and card layout wip

* feat(pendingReviews): add html sanitize to content

* fix: padding

* feat: WIP pendingReview

* setup auth to request id_token

* feat: add Thai font

* feat: add mui icon

* feat: polish pendingReview page

* add config variable

* feat: add login page and generate token page

* add template env, validate token

* feat(auth): add protectedRoutes

* format: apply format

* fix: update design to final WIP

* format: format code

* fix: remove .env files from remote and add .env.example

* refactor: migrate code to its own module

* ci: config tsconfig.json

* feat(GenEd): decorate gened page

* setup review with graphql

* feat(admin-api): add override

* feat(admin-api): add get-all-reviews query

* refactor(admin-api): remove unused codes and comments

* add enum graphql

* remove unused env from template and config

* fix lockfile broken

* fix env and config

* match dependencies version to api's

* setup auth to request id_token

* add config variable

* add template env, validate token

* fix: tsconfig

* refactor: change 'Topbar' component name to 'Sidebar'

* feat(gened): add topbar to gened page

* feat(sidebar): add cugetreg logo

* add jwt module

* feat(pending reviews): add topbar

* feat: cancel button

* fix(topbar): center rightside buttons vertically

* feat(pending reviews): add API for approve and reject reviews

* feat: improve textfield

* feat: error handling pendingReview

* feat(gened): add delete button

* feat(gened): add delete gened api

* fix: change dependecy installation scope

* feat(gened): add input for new gened course

* change review and override schema

* add idToken validation, me and remove unused code

* feat(gened): add refresh button

* feat(gened): add react toast for gened page

* refactor: migrate toast config to /config

* fix(sidebar): fix highlight current page bug

* fix(gened): table head is now sticky

* fix: make the program compilable

* fix: fix sending code

* feat: handle validating id_token and generate access_token

* feat: handle sending cookie both frontend and backend

* feat: add auth guard

* feat: lazy query review

* feat: add global auth guard

* fix: first fetch

* fix: fix circular structure by removing passthrough in res

* feat(frontend): add protected routes

* fix(frontend/generateToken): change from fetch to axios and add spinner

* refactor: remove unused code in backend auth

* feat: add logout feature

* feat(frontend): add authApi

* edit readme

* fix(backend-api): change cookie expiry date to 30 days

* fix(pendingReviews): fix select form type

* refactor: remove unused code

* feat: filter wip

* feat: wip filter

* regenerate lockfile

* fix admin-web

* migrate changes from api to admin-api

* fix(admin-api): setReviewStatus return type

* fix(admin-api): authentication for graphql

* feat(frontend): add login page

* feat(frontend): add user feedback approve review

* fix(frontend): redirect if login fail

* refactor(frontend): remove year and semester

* feat(api): add filter to overrides

* ci(admin-api): add Dockerfile

* Revert "ci(admin-api): add Dockerfile"

This reverts commit 1a3e4df.

* ci(admin-web): add Dockerfile

* ci(admin-web): edit Dockerfile

* fix(admin-api): fix dashBoardUrl typo

* fix: add skip auth to health check path

* Revert "fix: add skip auth to health check path"

This reverts commit babd8e3.

* fix: add skip auth in health check

* ci: add changeset

* ci(admin-web): edit .env

* ci(admin-web): edit .env

* ci(admin-web): edit .env

* ci(admin-web): edit .env

* chore: add changeset

---------

Co-authored-by: Chanatip Pattanapen <[email protected]>
Co-authored-by: bombnp <[email protected]>
Co-authored-by: Nut Pinyo <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: nac <[email protected]>
Co-authored-by: Saenyakorn Siangsanoh <[email protected]>
Co-authored-by: Nutthapat Pongtanyavichai <[email protected]>
  • Loading branch information
9 people authored Sep 19, 2023
1 parent c5bb0b2 commit c0c50c2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/admin-web-env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'admin-web': patch
---

edit .env for admin-web
6 changes: 3 additions & 3 deletions apps/admin-web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
NEXT_PUBLIC_ENVIRONMENT=local

# Backend
NEXT_PUBLIC_BACKEND_URL_BASE=http://localhost:3333
NEXT_PUBLIC_BACKEND_URL_BASE=http://localhost:3333/_api

# GraphQL
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/_api/graphql
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/graphql

# Sitemap (Frontend URL)
NEXT_PUBLIC_SITE_URL=http://localhost:4201
Expand All @@ -20,4 +20,4 @@ NEXT_PUBLIC_CLIENT_ID=2f3a5527c10a61c0489d75825011c69f59743981
NEXT_PUBLIC_REDIRECT_URI=${NEXT_PUBLIC_SITE_URL}/generateToken

# Auth URL of backend
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL}/_api/auth
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/auth
8 changes: 4 additions & 4 deletions apps/admin-web/.env.beta
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
NEXT_PUBLIC_ENVIRONMENT=beta

# Backend
NEXT_PUBLIC_BACKEND_URL=http://localhost:3333
NEXT_PUBLIC_BACKEND_URL_BASE=https://beta-admin.internal.cugetreg.com/_api

# GraphQL
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL}/_api/graphql
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/graphql

# Sitemap (Frontend URL)
NEXT_PUBLIC_SITE_URL=http://localhost:4200
NEXT_PUBLIC_SITE_URL=https://beta-admin.internal.cugetreg.com

# OAuth url
NEXT_PUBLIC_AUTHORIZE_URL=https://auth.internal.cugetreg.com/application/o/authorize/
Expand All @@ -20,4 +20,4 @@ NEXT_PUBLIC_CLIENT_ID=2f3a5527c10a61c0489d75825011c69f59743981
NEXT_PUBLIC_REDIRECT_URI=${NEXT_PUBLIC_SITE_URL}/generateToken

# Auth URL of backend
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL}/_api/auth
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/auth
8 changes: 4 additions & 4 deletions apps/admin-web/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
NEXT_PUBLIC_ENVIRONMENT=dev

# Backend
NEXT_PUBLIC_BACKEND_URL=http://localhost:3333
NEXT_PUBLIC_BACKEND_URL_BASE=https://dev-admin.internal.cugetreg.com/_api

# GraphQL
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL}/_api/graphql
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/graphql

# Sitemap (Frontend URL)
NEXT_PUBLIC_SITE_URL=http://localhost:4200
NEXT_PUBLIC_SITE_URL=https://dev-admin.internal.cugetreg.com

# OAuth url
NEXT_PUBLIC_AUTHORIZE_URL=https://auth.internal.cugetreg.com/application/o/authorize/
Expand All @@ -20,4 +20,4 @@ NEXT_PUBLIC_CLIENT_ID=2f3a5527c10a61c0489d75825011c69f59743981
NEXT_PUBLIC_REDIRECT_URI=${NEXT_PUBLIC_SITE_URL}/generateToken

# Auth URL of backend
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL}/_api/auth
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/auth
8 changes: 4 additions & 4 deletions apps/admin-web/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
NEXT_PUBLIC_ENVIRONMENT=production

# Backend
NEXT_PUBLIC_BACKEND_URL=http://localhost:3333
NEXT_PUBLIC_BACKEND_URL_BASE=https://admin.internal.cugetreg.com/_api

# GraphQL
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL}/_api/graphql
NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/graphql

# Sitemap (Frontend URL)
NEXT_PUBLIC_SITE_URL=http://localhost:4200
NEXT_PUBLIC_SITE_URL=https://admin.internal.cugetreg.com

# OAuth url
NEXT_PUBLIC_AUTHORIZE_URL=https://auth.internal.cugetreg.com/application/o/authorize/
Expand All @@ -20,4 +20,4 @@ NEXT_PUBLIC_CLIENT_ID=2f3a5527c10a61c0489d75825011c69f59743981
NEXT_PUBLIC_REDIRECT_URI=${NEXT_PUBLIC_SITE_URL}/generateToken

# Auth URL of backend
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL}/_api/auth
NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_BACKEND_URL_BASE}/auth

0 comments on commit c0c50c2

Please sign in to comment.