From 3a162b66a5378ea42bd8fffd34961c8ea7916151 Mon Sep 17 00:00:00 2001 From: lochana Date: Thu, 12 Oct 2023 16:28:22 +0530 Subject: [PATCH 01/48] sop changes --- backend/services/package.json | 2 +- backend/services/yarn.lock | 8 ++++---- web/package.json | 2 +- web/yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/services/package.json b/backend/services/package.json index 9e94d9026..c25d8668d 100644 --- a/backend/services/package.json +++ b/backend/services/package.json @@ -42,7 +42,7 @@ "aws-lambda": "^1.0.7", "aws-serverless-express": "^3.4.0", "axios": "^1.2.4", - "carbon-services-lib": "0.0.230", + "carbon-services-lib": "0.0.231-CARBON-283.0", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "dotenv-flow": "^3.2.0", diff --git a/backend/services/yarn.lock b/backend/services/yarn.lock index b77b0d7b2..cf0b5784a 100644 --- a/backend/services/yarn.lock +++ b/backend/services/yarn.lock @@ -6763,10 +6763,10 @@ caniuse-lite@^1.0.30001449: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001474.tgz#13b6fe301a831fe666cce8ca4ef89352334133d5" integrity sha512-iaIZ8gVrWfemh5DG3T9/YqarVZoYf0r188IjaGwx68j4Pf0SGY6CQkmJUIE+NZHkkecQGohzXmBGEwWDr9aM3Q== -carbon-services-lib@0.0.230: - version "0.0.230" - resolved "https://registry.yarnpkg.com/carbon-services-lib/-/carbon-services-lib-0.0.230.tgz#e16728a7f36047495ef4347db37cb2bc9ecf19f0" - integrity sha512-wk1Jch2y7Eh6yOK/mDutgV5fGuwbJgU2/8RdC05thK7wD3VHNZdKodCWVqC6IsdygKm66BYUz5UkGoi0IvDFhw== +carbon-services-lib@0.0.231-CARBON-283.0: + version "0.0.231-CARBON-283.0" + resolved "https://registry.yarnpkg.com/carbon-services-lib/-/carbon-services-lib-0.0.231-CARBON-283.0.tgz#0ff13fab79f4c9bf3e70ee472d7ad92b7fd64dd0" + integrity sha512-e4m0RO455dlY/mJsi8oKFxBR0OFPTWU/CWWqvm94OOT2XA3igBfdVFA7Km2PfVRyXg2V/5gwNNkymyVCfa1xSw== dependencies: "@aws-sdk/client-qldb" "^3.408.0" "@aws-sdk/client-qldb-session" "^3.408.0" diff --git a/web/package.json b/web/package.json index 3b0292516..ec27ca050 100644 --- a/web/package.json +++ b/web/package.json @@ -14,7 +14,7 @@ "@types/react-dom": "^18.0.8", "@types/styled-components": "^5.1.26", "@types/validator": "^13.7.13", - "@undp/carbon-library": "^1.0.123", + "@undp/carbon-library": "1.0.124-CARBON-283.0", "antd": "^4.24.1", "apexcharts": "^3.36.3", "axios": "^1.1.3", diff --git a/web/yarn.lock b/web/yarn.lock index b2572cc88..453e1317e 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -2678,10 +2678,10 @@ "@types/node" "^18.11.9" convert-units "^2.3.4" -"@undp/carbon-library@^1.0.123": - version "1.0.123" - resolved "https://registry.yarnpkg.com/@undp/carbon-library/-/carbon-library-1.0.123.tgz#9f049794e17816b02d7cab32cca8c08b0f3d8fde" - integrity sha512-bPpkiBMSHE+ZHATTI07XYoQB+MXCn7fON0MBH/N3OPrJhNi+xC08x8wPkwqzaY7YGz7IxfZR3cRsrIA2RrOImg== +"@undp/carbon-library@1.0.124-CARBON-283.0": + version "1.0.124-CARBON-283.0" + resolved "https://registry.yarnpkg.com/@undp/carbon-library/-/carbon-library-1.0.124-CARBON-283.0.tgz#c40dcbe2d912e2cc724308a271df0b1158aa17cf" + integrity sha512-Lx1cbIlmDjDr/sWpocZ/YbXyKNGP9wKkmGpXJuqngmiLZJhsurIt7TC2VZ0ROVhQntiqZn7f+gOkDNLBd3vBNw== dependencies: "@rollup/plugin-commonjs" "^25.0.0" "@rollup/plugin-node-resolve" "^15.0.2" From 84f90e8212979d64601631b2623d108d2d603c9b Mon Sep 17 00:00:00 2001 From: lochana Date: Thu, 12 Oct 2023 16:33:44 +0530 Subject: [PATCH 02/48] carb reg code change for sop --- web/src/Pages/Company/addNewCompany.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/Pages/Company/addNewCompany.tsx b/web/src/Pages/Company/addNewCompany.tsx index 7c945845e..93c8d8049 100644 --- a/web/src/Pages/Company/addNewCompany.tsx +++ b/web/src/Pages/Company/addNewCompany.tsx @@ -2,7 +2,7 @@ import { useConnection } from '../../Context/ConnectionContext/connectionContext import { useLocation, useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useUserContext } from '../../Context/UserInformationContext/userInformationContext'; -import { AddNewCompanyComponent } from '@undp/carbon-library'; +import { AddNewCompanyComponent, CarbonSystemType } from '@undp/carbon-library'; const AddNewCompany = () => { const navigate = useNavigate(); @@ -24,6 +24,7 @@ const AddNewCompany = () => { useConnection={useConnection} useUserContext={useUserContext} useLocation={useLocation} + systemType={CarbonSystemType.REGISTRY} > ); }; From 71565441813c75d84e9ab67ff2890bfbf4c7ba77 Mon Sep 17 00:00:00 2001 From: Dhanuxeptagon Date: Sun, 15 Oct 2023 18:36:14 +0530 Subject: [PATCH 03/48] programme view url change --- web/src/App.tsx | 2 +- web/src/Pages/ProgrammeManagement/programmeManagement.tsx | 2 +- web/src/Pages/Transfers/creditTransfers.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 9956b745c..560b0a57a 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -91,7 +91,7 @@ const App = () => { element={} > } /> - } /> + } /> { ]; const onNavigateToProgrammeView = (record: any) => { - navigate('/programmeManagement/view', { state: { record } }); + navigate(`/programmeManagement/view/${record.programmeId}`, { state: { record } }); }; return ( diff --git a/web/src/Pages/Transfers/creditTransfers.tsx b/web/src/Pages/Transfers/creditTransfers.tsx index 160220492..44ad3a8ba 100644 --- a/web/src/Pages/Transfers/creditTransfers.tsx +++ b/web/src/Pages/Transfers/creditTransfers.tsx @@ -10,7 +10,7 @@ const CreditTransfer = () => { const { i18n } = useTranslation(['common', 'creditTransfer', 'programme', 'view']); const onNavigateToProgrammeView = (programmeId: any) => { - navigate('/programmeManagement/view', { state: { id: programmeId } }); + navigate(`/programmeManagement/view/${programmeId}`); }; return ( From 2e297d61524a3ac6d82bf7f3fd9fe0926246c39a Mon Sep 17 00:00:00 2001 From: Dhanuxeptagon Date: Mon, 16 Oct 2023 13:40:11 +0530 Subject: [PATCH 04/48] programme url changes --- backend/services/package.json | 2 +- backend/services/yarn.lock | 8 +++---- docker-compose.yml | 6 +++++ web/package.json | 2 +- web/src/Pages/ProgrammeView/programmeView.tsx | 22 ++++++++----------- web/yarn.lock | 8 +++---- 6 files changed, 25 insertions(+), 23 deletions(-) diff --git a/backend/services/package.json b/backend/services/package.json index 9e94d9026..c4b274e61 100644 --- a/backend/services/package.json +++ b/backend/services/package.json @@ -42,7 +42,7 @@ "aws-lambda": "^1.0.7", "aws-serverless-express": "^3.4.0", "axios": "^1.2.4", - "carbon-services-lib": "0.0.230", + "carbon-services-lib": "0.0.231-CARBON-323.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "dotenv-flow": "^3.2.0", diff --git a/backend/services/yarn.lock b/backend/services/yarn.lock index b77b0d7b2..8a2a4280c 100644 --- a/backend/services/yarn.lock +++ b/backend/services/yarn.lock @@ -6763,10 +6763,10 @@ caniuse-lite@^1.0.30001449: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001474.tgz#13b6fe301a831fe666cce8ca4ef89352334133d5" integrity sha512-iaIZ8gVrWfemh5DG3T9/YqarVZoYf0r188IjaGwx68j4Pf0SGY6CQkmJUIE+NZHkkecQGohzXmBGEwWDr9aM3Q== -carbon-services-lib@0.0.230: - version "0.0.230" - resolved "https://registry.yarnpkg.com/carbon-services-lib/-/carbon-services-lib-0.0.230.tgz#e16728a7f36047495ef4347db37cb2bc9ecf19f0" - integrity sha512-wk1Jch2y7Eh6yOK/mDutgV5fGuwbJgU2/8RdC05thK7wD3VHNZdKodCWVqC6IsdygKm66BYUz5UkGoi0IvDFhw== +carbon-services-lib@0.0.231-CARBON-323.2: + version "0.0.231-CARBON-323.2" + resolved "https://registry.yarnpkg.com/carbon-services-lib/-/carbon-services-lib-0.0.231-CARBON-323.2.tgz#b4a33fc0955ef8839e5e4bf857c5215872df2f43" + integrity sha512-IR0d1s7T4jUneQ6eH1muqdXJNwHaIGVhDL66X7I1dJSIvQqQ1ajG1ZZMWyMvwk/SsQB+EWeQEFCwPVYTYBEjXQ== dependencies: "@aws-sdk/client-qldb" "^3.408.0" "@aws-sdk/client-qldb-session" "^3.408.0" diff --git a/docker-compose.yml b/docker-compose.yml index 1215e8722..42566467f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,12 +38,14 @@ services: name: "Antactic Region" logoBase64: "sss" IS_EMAIL_DISABLED: "true" + DISABLE_LOW_PRIORITY_EMAIL: "true" LOCATION_SERVICE: OPENSTREET ASYNC_OPERATIONS_TYPE: Database HOST: "http://localhost:3030" DOMAIN_MAP: "true" EXPIRES_IN: "7200" SYSTEM_TYPE: CARBON_REGISTRY_SYSTEM + BACKEND_HOST: http://192.168.1.73:9000 volumes: - filestore:/app/backend/services/public - ./users.csv:/app/backend/services/users.csv @@ -79,8 +81,10 @@ services: RUN_MODULE: replicator,async-operations-handler LOCATION_SERVICE: OPENSTREET SMTP_ENDPOINT: email-smtp.us-east-1.amazonaws.com + SMTP_USERNAME: "AKIAUMXKTXDJLKSXTF3U" SMTP_PASSWORD: "" IS_EMAIL_DISABLED: "true" + DISABLE_LOW_PRIORITY_EMAIL: "true" ASYNC_OPERATIONS_TYPE: Database ITMO_API_KEY: "" ITMO_EMAIL: "" @@ -89,6 +93,8 @@ services: SYNC_API_TOKEN: '' SYNC_ENABLE: true SYSTEM_TYPE: CARBON_REGISTRY_SYSTEM + HOST: "http://localhost:3030" + BACKEND_HOST: http://192.168.1.73:9000 # async-operations-handler: # build: # context: . diff --git a/web/package.json b/web/package.json index 3b0292516..af970da2f 100644 --- a/web/package.json +++ b/web/package.json @@ -14,7 +14,7 @@ "@types/react-dom": "^18.0.8", "@types/styled-components": "^5.1.26", "@types/validator": "^13.7.13", - "@undp/carbon-library": "^1.0.123", + "@undp/carbon-library": "1.0.124-CARBON-323.0", "antd": "^4.24.1", "apexcharts": "^3.36.3", "axios": "^1.1.3", diff --git a/web/src/Pages/ProgrammeView/programmeView.tsx b/web/src/Pages/ProgrammeView/programmeView.tsx index fd0ec60bd..babbff6e6 100644 --- a/web/src/Pages/ProgrammeView/programmeView.tsx +++ b/web/src/Pages/ProgrammeView/programmeView.tsx @@ -1,7 +1,7 @@ import { useState, useEffect, useRef } from 'react'; import { Row, Col, Card, Progress, Tag, Steps, message, Skeleton, Button, Modal, Form } from 'antd'; import { useConnection } from '../../Context/ConnectionContext/connectionContext'; -import { useLocation, useNavigate } from 'react-router-dom'; +import { useLocation, useNavigate, useParams } from 'react-router-dom'; import './programmeView.scss'; import Chart from 'react-apexcharts'; import { useTranslation } from 'react-i18next'; @@ -89,6 +89,7 @@ const ProgrammeView = () => { mapType === MapTypes.Mapbox && process.env.REACT_APP_MAPBOXGL_ACCESS_TOKEN ? process.env.REACT_APP_MAPBOXGL_ACCESS_TOKEN : ''; + const { id } = useParams(); const showModal = () => { setOpenModal(true); @@ -1070,20 +1071,15 @@ const ProgrammeView = () => { if (userInfoState?.companyRole === CompanyRole.MINISTRY) { getUserDetails(); } - const queryParams = new URLSearchParams(window.location.search); - const programmeId = queryParams.get('id'); - if (programmeId) { - getProgrammeById(programmeId); - } else if (!state) { - navigate('/programmeManagement/viewAll', { replace: true }); + + if (state && state.record) { + setLoadingAll(false); + setData(state.record); } else { - if (!state.record) { - if (state.id) { - getProgrammeById(state.id); - } + if (id) { + getProgrammeById(id); } else { - setLoadingAll(false); - setData(state.record); + navigate('/programmeManagement/viewAll', { replace: true }); } } }, []); diff --git a/web/yarn.lock b/web/yarn.lock index b2572cc88..e12d3e6a5 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -2678,10 +2678,10 @@ "@types/node" "^18.11.9" convert-units "^2.3.4" -"@undp/carbon-library@^1.0.123": - version "1.0.123" - resolved "https://registry.yarnpkg.com/@undp/carbon-library/-/carbon-library-1.0.123.tgz#9f049794e17816b02d7cab32cca8c08b0f3d8fde" - integrity sha512-bPpkiBMSHE+ZHATTI07XYoQB+MXCn7fON0MBH/N3OPrJhNi+xC08x8wPkwqzaY7YGz7IxfZR3cRsrIA2RrOImg== +"@undp/carbon-library@1.0.124-CARBON-323.0": + version "1.0.124-CARBON-323.0" + resolved "https://registry.yarnpkg.com/@undp/carbon-library/-/carbon-library-1.0.124-CARBON-323.0.tgz#0e8a7cad35500833089db64cabbb41fb3a0f9b5b" + integrity sha512-SSbOVWewpvTXgBUC0SdHHGXCspARfVWA/0vDxxUB4t+tBuGLOFFtKvQFZR2LFBf8/IQzK4wEjttWzK1qbj9BUw== dependencies: "@rollup/plugin-commonjs" "^25.0.0" "@rollup/plugin-node-resolve" "^15.0.2" From d4cecd8c240e3a2bdfab1033ca0a6287ca3317ba Mon Sep 17 00:00:00 2001 From: lochana Date: Mon, 16 Oct 2023 15:52:25 +0530 Subject: [PATCH 05/48] government tax id --- backend/services/src/setup/handler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/services/src/setup/handler.ts b/backend/services/src/setup/handler.ts index 7df7a12b2..8d6ee02ab 100644 --- a/backend/services/src/setup/handler.ts +++ b/backend/services/src/setup/handler.ts @@ -184,6 +184,7 @@ export const handler: Handler = async (event) => { company.name = event["name"]; company.logo = event["logoBase64"]; company.companyRole = CompanyRole.GOVERNMENT; + company.taxId = `00000${event["systemCountryCode"]}` const user = new UserDto(); user.email = event["rootEmail"]; From eb6dbb153ba6292736d4ac71623e6ea5b8f46dea Mon Sep 17 00:00:00 2001 From: Dhanuxeptagon Date: Fri, 20 Oct 2023 09:13:48 +0530 Subject: [PATCH 06/48] fixed credit send isse --- web/src/Pages/ProgrammeView/programmeView.tsx | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/web/src/Pages/ProgrammeView/programmeView.tsx b/web/src/Pages/ProgrammeView/programmeView.tsx index ccdd59c5b..f97a91d02 100644 --- a/web/src/Pages/ProgrammeView/programmeView.tsx +++ b/web/src/Pages/ProgrammeView/programmeView.tsx @@ -94,6 +94,12 @@ const ProgrammeView = () => { setOpenModal(true); }; + const ministryLevelPermission = + data && + userInfoState?.companyRole === CompanyRole.MINISTRY && + ministrySectoralScope.includes(data.sectoralScope) && + userInfoState?.userRole !== 'ViewOnly'; + const locationColors = ['#6ACDFF', '#FF923D', '#CDCDCD', '#FF8183', '#B7A4FE']; const getFileName = (filepath: string) => { @@ -1228,11 +1234,7 @@ const ProgrammeView = () => { if (userInfoState?.userRole !== 'ViewOnly') { if (data.currentStage.toString() === ProgrammeStageR.Approved) { - if ( - userInfoState?.companyRole === CompanyRole.GOVERNMENT || - (userInfoState?.companyRole === CompanyRole.MINISTRY && - ministrySectoralScope.includes(data.sectoralScope)) - ) { + if (userInfoState?.companyRole === CompanyRole.GOVERNMENT || ministryLevelPermission) { actionBtns.push(