From f9626c8bc29d71fbe579e23624c55c5a85c11b28 Mon Sep 17 00:00:00 2001 From: NabeelAyubee Date: Thu, 3 Oct 2024 15:16:42 +0530 Subject: [PATCH 1/6] pgr citizen issue fix --- .../modules/pgr/src/pages/citizen/Create/Steps/SelectImages.js | 2 +- .../packages/modules/pgr/src/pages/citizen/Create/index.js | 1 + .../packages/react-components/src/atoms/ImageUploadHandler.js | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/Steps/SelectImages.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/Steps/SelectImages.js index 1cc1fd67d0b..7fa97fddd09 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/Steps/SelectImages.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/Steps/SelectImages.js @@ -16,7 +16,7 @@ const SelectImages = ({ t, config, onSelect, onSkip, value }) => { // const onSkip = () => onSelect(); const handleSubmit = () => { - if (!uploadedImages || uploadedImages.length === 0) return onSkip(); + // if (!uploadedImages || uploadedImages.length === 0) return onSkip(); // const _uploadImages = uploadedImages.map((url) => ({ // documentType: "PHOTO", // fileStore: url, diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/index.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/index.js index 740de4a682f..66592a4e7c9 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Create/index.js @@ -92,6 +92,7 @@ export const CreateComplaint = () => { await dispatch(createComplaint(data)); await client.refetchQueries(["complaintsList"]); + clearParams(); history.push(`${match.path}/response`); } }; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js index 906d3af5343..671f8db72b0 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js @@ -31,7 +31,8 @@ export const ImageUploadHandler = (props) => { } })(); } else { - setIsDeleting(false); + setIsDeleting(false) + props.onPhotoChange(uploadedImagesIds); } }, [uploadedImagesIds]); From 55f984f8f1c9048fef7d3b762bcfc08ab48d4670 Mon Sep 17 00:00:00 2001 From: NabeelAyubee Date: Thu, 3 Oct 2024 15:51:14 +0530 Subject: [PATCH 2/6] dss package --- micro-ui/web/sandbox/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/micro-ui/web/sandbox/package.json b/micro-ui/web/sandbox/package.json index fb859d9280c..0ca0be7a25a 100644 --- a/micro-ui/web/sandbox/package.json +++ b/micro-ui/web/sandbox/package.json @@ -24,6 +24,7 @@ "@egovernments/digit-ui-components": "0.0.2-beta.31", "@egovernments/digit-ui-module-core": "1.8.2-beta.19", "@egovernments/digit-ui-module-hrms": "1.8.1-beta.1", + "@egovernments/digit-ui-module-dss": "1.8.1", "@egovernments/digit-ui-module-pgr": "1.8.1-beta.1", "@egovernments/digit-ui-module-utilities": "1.0.1-beta.39", "@egovernments/digit-ui-react-components": "1.8.2-beta.13", From 3eb533dfa7d2305435107f5d15d948287976093f Mon Sep 17 00:00:00 2001 From: NabeelAyubee Date: Fri, 4 Oct 2024 17:36:46 +0530 Subject: [PATCH 3/6] Added new side bar cmponent --- .../packages/css/src/components/table.scss | 8 +- .../css/src/pages/employee/sandbox.scss | 26 ++- .../src/pages/citizen/FAQs/FaqComponent.js | 4 +- .../src/pages/citizen/Home/UserProfile.js | 5 +- .../src/pages/employee/QuickStart/Config.js | 219 ++++++++++++++++-- .../pages/employee/QuickStart/QuickSetup.js | 91 ++++++++ 6 files changed, 322 insertions(+), 31 deletions(-) create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss index 379af9fa6a1..d743e4bcdfb 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss @@ -3,6 +3,7 @@ thead { th { + background-color: #ffffff; padding: 20px 18px; @apply font-bold align-middle text-left; &:first-child { @@ -14,7 +15,6 @@ } } - tbody { border: none; padding: 0; @@ -102,7 +102,7 @@ position: sticky; background: #fff; right: 0; - left:0; + left: 0; border-top-left-radius: 4px; } } @@ -112,7 +112,7 @@ background: #fff; color: theme(colors.primary.main); left: 0; - right:0; + right: 0; } } } @@ -192,7 +192,7 @@ .reports-table { margin-top: 2rem; thead { - th { + th { &:first-child { min-width: unset; } diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss index 2c6596859eb..fa7616407d6 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss @@ -37,7 +37,7 @@ thead { tr { th { - background-color: #ffffff; + background-color: #ffffff !important; } } } @@ -619,3 +619,27 @@ digit-card-text.center { text-decoration: none; } } +.profileDropdown{ + input{ + font-size: 1rem !important; + } +} + +.digit-card-component { + &.sandbox-guide { + &::-webkit-scrollbar { + width: 0.3rem; + background-color: #fff; + } + + &::-webkit-scrollbar-track { + background-color: #fff; + border-radius: 0.3rem; + } + + &::-webkit-scrollbar-thumb { + background-color: #d6d5d4; + border-radius: 0.3rem; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/FAQs/FaqComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/FAQs/FaqComponent.js index 6d669ffdf96..c75cfb9a991 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/FAQs/FaqComponent.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/FAQs/FaqComponent.js @@ -1,4 +1,4 @@ -import { ArrowForward } from "@egovernments/digit-ui-components"; +import { ArrowForward } from "@egovernments/digit-ui-svg-components"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -12,7 +12,7 @@ const FaqComponent = (props) => {
{t(question)} - {isOpen ? : } +
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js index 63aa51dac45..3773e720aaa 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js @@ -580,8 +580,8 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { {`${t("CORE_COMMON_PROFILE_GENDER")}`} { )}`}
{ const { t } = useTranslation(); @@ -34,11 +35,11 @@ const QuickSetupConfigComponent = ({ onSelect, formData, control, formState, ... if (!acc[module]) { acc[module] = { module: module, - label: Digit.Utils.locale.getTransformedLocale(`${module}_CARD_HEADER`), + label: Digit.Utils.locale.getTransformedLocale(`${module}_CARD_HEADER`), links: [], }; } - const linkUrl = Digit.Utils.transformURL(item.navigationURL,tenantId); + const linkUrl = Digit.Utils.transformURL(item.navigationURL, tenantId); const queryParamIndex = linkUrl.indexOf("?"); acc[module].links.push({ link: queryParamIndex === -1 ? linkUrl : linkUrl.substring(0, queryParamIndex), @@ -54,27 +55,201 @@ const QuickSetupConfigComponent = ({ onSelect, formData, control, formState, ... } const QuickSetupConfig = [ { - sectionHeader:"WELCOME_TO_SANDBOX", - sections:[ - { - label:"SANDBOX_DESCRIPTION_1" - }, - { - label:"SANDBOX_DESCRIPTION_2" - }, - { - label:"SANDBOX_DESCRIPTION_3" - } - ] + sectionHeader: "WELCOME_TO_SANDBOX", + sections: [ + { + label: "SANDBOX_DESCRIPTION_1", + }, + { + label: "SANDBOX_DESCRIPTION_2", + }, + { + label: "SANDBOX_DESCRIPTION_3", + }, + ], }, { - sectionHeader:"QUICK_SETUP", - links:configEmployeeSideBar - } - ]; - return ( - - ); + sectionHeader: "QUICK_SETUP", + links: configEmployeeSideBar, + }, + ]; + + const cardConfig = [ + { + id: 1, + title: "SANDBOX_GUIDE_1", + content: "SANDBOX_CONTENT_1", + actions: [ + { + label: "SANDBOX_GUIDE_1_LABEL_1", + description: "SANDBOX_GUIDE_1_DESC_1", + }, + { + label: "SANDBOX_GUIDE_1_LABEL_2", + description: "SANDBOX_GUIDE_1_DESC_2", + }, + { + label: "SANDBOX_GUIDE_1_LABEL_3", + description: "SANDBOX_GUIDE_1_DESC_3", + }, + ], + }, + { + id: 2, + title: "SANDBOX_GUIDE_2", + content: "SANDBOX_CONTENT_2", + actions: [ + { + label: "SANDBOX_GUIDE_2_LABEL_1", + description: "SANDBOX_GUIDE_2_DESC_1", + }, + { + label: "SANDBOX_GUIDE_2_LABEL_2", + description: "SANDBOX_GUIDE_2_DESC_2", + }, + { + label: "SANDBOX_GUIDE_2_LABEL_3", + description: "SANDBOX_GUIDE_2_DESC_3", + }, + { + label: "SANDBOX_GUIDE_2_LABEL_4", + description: "SANDBOX_GUIDE_2_DESC_4", + }, + { + label: "SANDBOX_GUIDE_2_LABEL_5", + description: "SANDBOX_GUIDE_2_DESC_5", + }, + { + label: "SANDBOX_GUIDE_2_LABEL_6", + description: "SANDBOX_GUIDE_2_DESC_6", + }, + ], + style: { + backgroundColor: "#fce4ec", + color: "#880e4f", + }, + }, + { + id: 3, + title: "SANDBOX_GUIDE_3", + content: "SANDBOX_CONTENT_3", + actions: [ + { + label: "SANDBOX_GUIDE_3_LABEL_1", + description: "SANDBOX_GUIDE_3_DESC_1", + }, + { + label: "SANDBOX_GUIDE_3_LABEL_2", + description: "SANDBOX_GUIDE_3_DESC_2", + }, + { + label: "SANDBOX_GUIDE_3_LABEL_3", + description: "SANDBOX_GUIDE_3_DESC_3", + }, + ], + style: { + backgroundColor: "#fff9c4", + color: "#f57f17", + }, + }, + { + id: 4, + title: "SANDBOX_GUIDE_4", + content: "SANDBOX_CONTENT_4", + actions: [ + { + label: "SANDBOX_GUIDE_4_LABEL_1", + description: "SANDBOX_GUIDE_4_DESC_1", + }, + { + label: "SANDBOX_GUIDE_4_LABEL_2", + description: "SANDBOX_GUIDE_4_DESC_2", + }, + { + label: "SANDBOX_GUIDE_4_LABEL_3", + description: "SANDBOX_GUIDE_4_DESC_3", + }, + ], + style: { + backgroundColor: "#fff9c4", + color: "#f57f17", + }, + }, + { + id: 5, + title: "SANDBOX_GUIDE_5", + content: "SANDBOX_CONTENT_5", + actions: [ + { + label: "SANDBOX_GUIDE_5_LABEL_1", + description: "SANDBOX_GUIDE_5_DESC_1", + }, + { + label: "SANDBOX_GUIDE_5_LABEL_2", + description: "SANDBOX_GUIDE_5_DESC_2", + }, + ], + }, + { + id: 6, + title: "SANDBOX_GUIDE_6", + content: "SANDBOX_CONTENT_6", + actions: [], + }, + { + id: 7, + title: "SANDBOX_GUIDE_7", + content: "SANDBOX_CONTENT_7", + actions: [ + { + label: "SANDBOX_GUIDE_7_LABEL_1", + description: "SANDBOX_GUIDE_7_DESC_1", + }, + { + label: "SANDBOX_GUIDE_7_LABEL_2", + description: "SANDBOX_GUIDE_7_DESC_2", + }, + ], + }, + { + id: 8, + title: "SANDBOX_GUIDE_8", + content: "SANDBOX_CONTENT_8", + actions: [ + { + label: "SANDBOX_GUIDE_8_LABEL_1", + description: "SANDBOX_GUIDE_8_DESC_1", + }, + ], + }, + { + id: 9, + title: "SANDBOX_GUIDE_9", + type: "faqs", + content: null, + actions: [ + { + question: "SANDBOX_FAQ_QUES_ONE", + answer: "SANDBOX_FAQ_ANS_ONE", + }, + { + question: "SANDBOX_FAQ_QUES_TWO", + answer: "SANDBOX_FAQ_ANS_TWO", + }, + { + question: "SANDBOX_FAQ_QUES_THREE", + answer: "SANDBOX_FAQ_ANS_THREE", + }, + { + question: "SANDBOX_FAQ_QUES_FOUR", + answer: "SANDBOX_FAQ_ANS_FOUR", + }, + ], + }, + ]; + + // return ; + return ; }; export default QuickSetupConfigComponent; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js new file mode 100644 index 00000000000..82e7a0a373d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js @@ -0,0 +1,91 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; +import { CardText, CardHeader, LinkLabel, Card } from "@egovernments/digit-ui-components"; +import { CardSubHeader, CardSectionHeader, BreakLine, CardSectionSubText } from "@egovernments/digit-ui-react-components"; +import { Link } from "react-router-dom"; +import FaqComponent from "../../citizen/FAQs/FaqComponent"; + +const CardC = ({ type, title, content, actions, style }) => { + const ListTag = type === "number" ? "ol" : "ul"; + return ( +
+ {/*
*/} + {title} + {content} +
+ {actions && ( + + {actions.map((action, index) => ( +
  • + {action.label}: {action.description} +
  • + ))} +
    + )} +
    +
    + ); +}; + +const FAQ = ({ key, title, content, faqs }) => { + return ( +
    + {title} + {content} +
    + {faqs.map((faq, i) => ( + + ))} +
    +
    + ); +}; +const QuickSetup = ({ cardConfig }) => { + const { t } = useTranslation(); + + const moduleFaqs = [ + { + question: "SANDBOX_FAQ_QUES_ONE", + answer: "SANDBOX_FAQ_ANS_ONE", + }, + { + question: "SANDBOX_FAQ_QUES_TWO", + answer: "SANDBOX_FAQ_ANS_TWO", + }, + { + question: "SANDBOX_FAQ_QUES_THREE", + answer: "SANDBOX_FAQ_ANS_THREE", + }, + { + question: "SANDBOX_FAQ_QUES_FOUR", + answer: "SANDBOX_FAQ_ANS_FOUR", + }, + ]; + return ( + + {/* */} + Guide To Sandbox +
    + {cardConfig.map((config, index) => { + return config?.type === "faqs" ? ( + + ) : ( + + + {index !== cardConfig?.length - 1 && } + + ); + })} +
    +
    + ); +}; + +export default QuickSetup; From 4a4b15944f223801df35abf2941a6c5a169e3011 Mon Sep 17 00:00:00 2001 From: NabeelAyubee Date: Fri, 4 Oct 2024 17:36:51 +0530 Subject: [PATCH 4/6] added --- micro-ui/web/micro-ui-internals/packages/css/package.json | 2 +- micro-ui/web/public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index 1f8a84d6783..c5385bf3ae4 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.8.2-beta.34", + "version": "1.8.2-beta.35", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/micro-ui/web/public/index.html b/micro-ui/web/public/index.html index 9a752021fbe..84b903ee62f 100644 --- a/micro-ui/web/public/index.html +++ b/micro-ui/web/public/index.html @@ -7,7 +7,7 @@ - + From 47dfa5283f6596ffebb417d10698ecd061fc8716 Mon Sep 17 00:00:00 2001 From: NabeelAyubee Date: Fri, 4 Oct 2024 19:41:43 +0530 Subject: [PATCH 5/6] added css --- .../css/src/pages/employee/sandbox.scss | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss index fa7616407d6..60d0d29d16b 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss @@ -114,21 +114,21 @@ } .digit-card-component { - .bannerHeader p{ + .bannerHeader p { font-size: 2rem; } } - .digit-card-component{ + .digit-card-component { .bannerHeader { margin-top: -1.5rem; margin-bottom: -0.5rem !important; - .bannerLogo { - width: 10rem; - height: 2rem; + .bannerLogo { + width: 10rem; + height: 2rem; + } } } -} .employeeCard { height: 500px !important; width: 408px !important; @@ -255,7 +255,7 @@ .digit-card-component.signupCardClassName.sandbox-onboarding-wrapper { .bannerHeader { .bannerLogo { - margin-top:0.5rem; + margin-top: 0.5rem; height: 2rem; width: 10rem; margin-bottom: -0.5rem; @@ -619,8 +619,8 @@ digit-card-text.center { text-decoration: none; } } -.profileDropdown{ - input{ +.profileDropdown { + input { font-size: 1rem !important; } } @@ -643,3 +643,6 @@ digit-card-text.center { } } } +.infotext { + width: 20rem !important; +} From f90e62bc627eb307709e11ed6dc0a08bcd8c28de Mon Sep 17 00:00:00 2001 From: NabeelAyubee Date: Fri, 4 Oct 2024 21:36:18 +0530 Subject: [PATCH 6/6] added --- .../src/pages/employee/QuickStart/Config.js | 32 ++++++++++++------- .../pages/employee/QuickStart/QuickSetup.js | 12 +++---- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/Config.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/Config.js index 71f445ad4dc..4b9fb1b04a0 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/Config.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/Config.js @@ -78,20 +78,32 @@ const QuickSetupConfigComponent = ({ onSelect, formData, control, formState, ... { id: 1, title: "SANDBOX_GUIDE_1", - content: "SANDBOX_CONTENT_1", + content: null, actions: [ { - label: "SANDBOX_GUIDE_1_LABEL_1", + label: null, description: "SANDBOX_GUIDE_1_DESC_1", }, { - label: "SANDBOX_GUIDE_1_LABEL_2", + label: null, description: "SANDBOX_GUIDE_1_DESC_2", }, { - label: "SANDBOX_GUIDE_1_LABEL_3", + label: null, description: "SANDBOX_GUIDE_1_DESC_3", }, + { + label: null, + description: "SANDBOX_GUIDE_1_DESC_4", + }, + { + label: null, + description: "SANDBOX_GUIDE_1_DESC_5", + }, + { + label: null, + description: "SANDBOX_GUIDE_1_DESC_6", + }, ], }, { @@ -123,11 +135,11 @@ const QuickSetupConfigComponent = ({ onSelect, formData, control, formState, ... label: "SANDBOX_GUIDE_2_LABEL_6", description: "SANDBOX_GUIDE_2_DESC_6", }, + { + label: "SANDBOX_GUIDE_2_LABEL_7", + description: "SANDBOX_GUIDE_2_DESC_7", + }, ], - style: { - backgroundColor: "#fce4ec", - color: "#880e4f", - }, }, { id: 3, @@ -147,10 +159,6 @@ const QuickSetupConfigComponent = ({ onSelect, formData, control, formState, ... description: "SANDBOX_GUIDE_3_DESC_3", }, ], - style: { - backgroundColor: "#fff9c4", - color: "#f57f17", - }, }, { id: 4, diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js index 82e7a0a373d..5838cc366da 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/QuickStart/QuickSetup.js @@ -11,13 +11,13 @@ const CardC = ({ type, title, content, actions, style }) => {
    {/*
    */} {title} - {content} -
    + {content} +
    {actions && ( {actions.map((action, index) => (
  • - {action.label}: {action.description} + {action?.label ? {action?.label}: : null} {action.description}
  • ))}
    @@ -29,9 +29,9 @@ const CardC = ({ type, title, content, actions, style }) => { const FAQ = ({ key, title, content, faqs }) => { return ( -
    +
    {title} - {content} + {content}
    {faqs.map((faq, i) => ( @@ -79,7 +79,7 @@ const QuickSetup = ({ cardConfig }) => { actions={config.actions} style={config.style} /> - {index !== cardConfig?.length - 1 && } + {index !== cardConfig?.length - 1 && } ); })}