Skip to content

Commit

Permalink
Merge branch 'develop' into chore/upgrade-react-router-dom
Browse files Browse the repository at this point in the history
  • Loading branch information
makelicious committed Dec 3, 2024
2 parents 0f0bdad + 041940d commit bc312ac
Show file tree
Hide file tree
Showing 79 changed files with 2,286 additions and 520 deletions.
14 changes: 4 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ services:
- base
environment:
- COUNTRY_CONFIG_URL_INTERNAL=http://countryconfig:3040
- GATEWAY_URL_INTERNAL=http://gateway:7070
dashboards:
image: opencrvs/ocrvs-dashboards:${VERSION}
#platform: linux/amd64
Expand All @@ -48,16 +49,6 @@ services:
environment:
- COUNTRY_CONFIG_URL_INTERNAL=http://countryconfig:3040

events:
image: opencrvs/ocrvs-events:${VERSION}
#platform: linux/amd64
build:
context: .
dockerfile: ./packages/events/Dockerfile
restart: unless-stopped
depends_on:
- base

gateway:
image: opencrvs/ocrvs-gateway:${VERSION}
#platform: linux/amd64
Expand Down Expand Up @@ -87,6 +78,7 @@ services:
- CHECK_INVALID_TOKEN=true
- MINIO_BUCKET=ocrvs
- DOCUMENTS_URL=http://documents:9050

events:
image: opencrvs/ocrvs-events:${VERSION}
#platform: linux/amd64
Expand All @@ -98,6 +90,8 @@ services:
- base
environment:
- MONGO_URL=mongodb://mongo1/events
- ES_HOST=elasticsearch:9200
- COUNTRY_CONFIG_URL=http://countryconfig:3040/

# User facing services
workflow:
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/nginx-deploy-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ set -e

sed -i s~{{COUNTRY_CONFIG_URL_INTERNAL}}~$COUNTRY_CONFIG_URL_INTERNAL~g /etc/nginx/conf.d/default.conf
sed -i s~{{COUNTRY_CONFIG_URL_INTERNAL}}~$COUNTRY_CONFIG_URL_INTERNAL~g /usr/share/nginx/html/index.html
sed -i s~{{GATEWAY_URL_INTERNAL}}~$GATEWAY_URL_INTERNAL~g /etc/nginx/conf.d/default.conf
sed -i s~{{GATEWAY_URL_INTERNAL}}~$GATEWAY_URL_INTERNAL~g /usr/share/nginx/html/index.html
sed -i s~{{CONTENT_SECURITY_POLICY_WILDCARD}}~$CONTENT_SECURITY_POLICY_WILDCARD~g /etc/nginx/conf.d/default.conf
nginx -g 'daemon off;'
1 change: 1 addition & 0 deletions license-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"ignore": [
"**/*.@(editorconfig|md|log|lock|patch|prettierrc|gitignore|eslintignore|stylelintrc|csv|gz|geojson|woff2|woff|xml|yarnrc|yarn-integrity|ttf|map|pdf|snap|dockerignore|jsonc|idea|env|info|key|pub|cjs|sql)",
".husky",
"**/*.ipynb",
".git",
".github/DISCUSSION_TEMPLATE/Installation.yml",
".github/CODEOWNERS",
Expand Down
1 change: 1 addition & 0 deletions packages/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ COPY --chown=node:node packages/components /app/packages/components
RUN yarn install --frozen-lockfile && yarn build
ENV CONTENT_SECURITY_POLICY_WILDCARD "{{CONTENT_SECURITY_POLICY_WILDCARD}}"
ENV COUNTRY_CONFIG_URL_INTERNAL "{{COUNTRY_CONFIG_URL_INTERNAL}}"
ENV GATEWAY_URL_INTERNAL "{{GATEWAY_URL_INTERNAL}}"
WORKDIR /app/packages/client
COPY --chown=node:node packages/client /app/packages/client
RUN yarn install --frozen-lockfile && yarn build
Expand Down
30 changes: 15 additions & 15 deletions packages/client/graphql.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -3806,7 +3806,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -4709,7 +4709,7 @@
"deprecationReason": null
},
{
"name": "fields",
"name": "data",
"description": null,
"args": [],
"type": {
Expand Down Expand Up @@ -5625,7 +5625,7 @@
"deprecationReason": null
},
{
"name": "fields",
"name": "data",
"description": null,
"args": [],
"type": {
Expand Down Expand Up @@ -5693,7 +5693,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -7991,7 +7991,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -12507,7 +12507,7 @@
"deprecationReason": null
},
{
"name": "fields",
"name": "data",
"description": null,
"args": [],
"type": {
Expand Down Expand Up @@ -12559,7 +12559,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -16477,7 +16477,7 @@
"deprecationReason": null
},
{
"name": "fields",
"name": "data",
"description": null,
"args": [],
"type": {
Expand Down Expand Up @@ -16545,7 +16545,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -17513,7 +17513,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -17587,7 +17587,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -18390,7 +18390,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -18452,7 +18452,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -18487,7 +18487,7 @@
"fields": null,
"inputFields": [
{
"name": "fields",
"name": "data",
"description": null,
"type": {
"kind": "NON_NULL",
Expand Down
8 changes: 8 additions & 0 deletions packages/client/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/ {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass {{GATEWAY_URL_INTERNAL}};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location / {
root /usr/share/nginx/html;
Expand Down
9 changes: 8 additions & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"open:cov": "yarn test && opener coverage/index.html",
"lint": "yarn lint:css && yarn lint:ts",
"lint:css": "stylelint 'src/**/*.{ts,tsx}'",
"lint:ts": "eslint --fix './src/**/*.{ts,tsx}' --max-warnings=1000",
"lint:ts": "eslint --fix './src/**/*.{ts,tsx}' --max-warnings=353",
"test:compilation": "tsc --noEmit",
"extract:translations": "bash extract-translations.sh",
"generate-gateway-types": "NODE_OPTIONS=--dns-result-order=ipv4first graphql-codegen --config codegen.ts && prettier --write src/utils/gateway.ts",
Expand All @@ -36,9 +36,14 @@
"@craco/craco": "^6.4.3",
"@opencrvs/commons": "^1.5.0",
"@opencrvs/components": "^1.3.0",
"@opencrvs/gateway": "1.5.0",
"@reduxjs/toolkit": "^1.8.3",
"@sentry/react": "^7.12.1",
"@sentry/tracing": "^7.12.1",
"@tanstack/react-query": "^5.61.5",
"@trpc/client": "^11.0.0-rc.648",
"@trpc/react-query": "^11.0.0-rc.648",
"@trpc/server": "^11.0.0-rc.648",
"@types/bcryptjs": "^2.4.2",
"@types/history": "^4.6.2",
"@types/html-to-pdfmake": "^2.4.4",
Expand All @@ -63,6 +68,7 @@
"formik": "^2.2.9",
"google-libphonenumber": "^3.2.32",
"graphql": "^15.0.0",
"graphql-tag": "^2.12.6",
"graphql-tools": "^4.0.7",
"handlebars": "^4.7.6",
"history": "^4.7.2",
Expand Down Expand Up @@ -93,6 +99,7 @@
"redux-sentry-middleware": "^0.2.0",
"sanitize-html": "^2.4.0",
"styled-components": "^5.2.0",
"superjson": "1.9.0-0",
"tsconfig-paths": "^3.13.0",
"vite": "^5.4.8",
"vite-plugin-svgr": "^0.6.0",
Expand Down
34 changes: 32 additions & 2 deletions packages/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ import { ViewRecord } from '@client/views/ViewRecord/ViewRecord'
import { ApolloClient, NormalizedCacheObject } from '@apollo/client'
import { AppStore } from './store'
import { Workqueues } from './v2-events/features/workqueues'
import { V2_ROOT_ROUTE } from './v2-events/routes/routes'
import {
V2_EVENT_ROUTE,
V2_EVENTS_ROUTE,
V2_ROOT_ROUTE
} from './v2-events/routes'
import { CorrectionForm, CorrectionReviewForm } from './views/CorrectionForm'
import { VerifyCorrector } from './views/CorrectionForm/VerifyCorrector'
import { ReloadModal } from './views/Modals/ReloadModal'
Expand All @@ -73,6 +77,9 @@ import { SystemList } from './views/SysAdmin/Config/Systems/Systems'
import { UserList } from './views/SysAdmin/Team/user/UserList'
import VSExport from './views/SysAdmin/Vsexports/VSExport'
import { UserAudit } from './views/UserAudit/UserAudit'
import { EventSelection } from './v2-events/features/events/EventSelection'
import { EventFormWizardIndex } from './v2-events/features/events/EventFormWizard'
import { TRPCProvider } from './v2-events/trcp'

// Injecting global styles for the body tag - used only once
// eslint-disable-line
Expand Down Expand Up @@ -373,7 +380,30 @@ export const routesConfig = [
path: routes.REVIEW_USER_DETAILS,
element: <CreateNewUser />
},
{ path: V2_ROOT_ROUTE, element: <Workqueues /> }
{
path: V2_ROOT_ROUTE,
element: (
<TRPCProvider>
<Workqueues />
</TRPCProvider>
)
},
{
path: V2_EVENTS_ROUTE,
element: (
<TRPCProvider>
<EventSelection />
</TRPCProvider>
)
},
{
path: V2_EVENT_ROUTE,
element: (
<TRPCProvider>
<EventFormWizardIndex />
</TRPCProvider>
)
}
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class RejectRegistrationView extends React.Component<IFullProps, IState> {
key="submit_archive"
id="submit_archive"
size="medium"
type="secondary_negative"
type="secondaryNegative"
onClick={() => {
this.props.archiveDeclaration(
payload.id,
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/forms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export interface IDynamicOptions {
options?: { [key: string]: ISelectOption[] }
}

export interface IDispatchOptions {
interface IDispatchOptions {
action: string
payloadKey: string
}
Expand Down
Loading

0 comments on commit bc312ac

Please sign in to comment.