Skip to content

Commit

Permalink
update branch
Browse files Browse the repository at this point in the history
  • Loading branch information
suryansh-egov committed Jan 31, 2025
2 parents a27768b + 6c84b84 commit 7d2b97a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 32 deletions.
7 changes: 7 additions & 0 deletions health/micro-ui/web/micro-ui-internals/example/.env-hcm-demo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SKIP_PREFLIGHT_CHECK=true
REACT_APP_USER_TYPE=EMPLOYEE
REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a
REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c
REACT_APP_PROXY_API=https://hcm-demo.digit.org
REACT_APP_PROXY_ASSETS=https://hcm-demo.digit.org
REACT_APP_GLOBAL=https://hcm-demo-assets.s3.ap-south-1.amazonaws.com/demo/globalConfigsWorkbenchDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a
REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c
REACT_APP_PROXY_API=https://unified-dev.digit.org
REACT_APP_PROXY_ASSETS=https://unified-dev.digit.org
REACT_APP_GLOBAL=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsMicroplan.js
REACT_APP_GLOBAL=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsWorkbenchDev.js
REACT_APP_CONTEXT=works
WORKBENCH=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsWorkbenchHCMMZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@ const CampaignCard = () => {
},
{
label: t("NATIONAL_DASHBOARD"),
link: "/digit-ui/employee/utilities/iframe/elastic/national",
roles: ROLES.NATIONAL_SUPERVISOR,
// count: isLoading?"-":data
},
{
label: t("NDSS_DASHBOARD"),
link: "/digit-ui/employee/dss/landing/national-health-dashboard",
link: "/digit-ui/employee",
roles: ROLES.NATIONAL_SUPERVISOR,
// count: isLoading?"-":data
},
Expand All @@ -64,12 +58,12 @@ const CampaignCard = () => {
roles: ROLES.BOUNDARY_MANAGER,
// count: isLoading?"-":data
},
{
label: t("ACTION_TEST_APP_CONFIGURATION"),
link: `/workbench-ui/employee/campaign/app-configuration`,
roles: ROLES.CAMPAIGN_MANAGER,
// count: isLoading?"-":data
},
// {
// label: t("ACTION_TEST_APP_CONFIGURATION"),
// link: `/workbench-ui/employee/campaign/app-configuration`,
// roles: ROLES.CAMPAIGN_MANAGER,
// // count: isLoading?"-":data
// }, WILLBEDISABLEDINPATCHRELEASE
];

links = links.filter((link) => (link?.roles && link?.roles?.length > 0 ? Digit.Utils.didEmployeeHasAtleastOneRole(link?.roles) : true));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useMemo, useRef, useEffect, Fragment } from "react";
import { Header } from "@egovernments/digit-ui-react-components";
import { useTranslation } from "react-i18next";
import { LabelFieldPair } from "@egovernments/digit-ui-components";
import { InfoCard, LabelFieldPair } from "@egovernments/digit-ui-components";
import { Button, CardText, Dropdown, ErrorMessage, PopUp, Stepper, TextBlock , Card, Loader} from "@egovernments/digit-ui-components";

const CampaignSelection = ({ onSelect, formData, formState, ...props }) => {
Expand Down Expand Up @@ -158,35 +158,39 @@ const CampaignSelection = ({ onSelect, formData, formState, ...props }) => {
return (
<>
{loading && <Loader />}
{!loading &&
{!loading && (
<div className="container">
<div className="card-container" >
<Card className="card-header-timeline" >
<TextBlock subHeader={t("HCM_CAMPAIGN_DETAILS")} subHeaderClassName={"stepper-subheader"} wrapperClassName={"stepper-wrapper"} />
<div className="card-container">
<Card className="card-header-timeline">
<TextBlock
subHeader={t("HCM_CAMPAIGN_DETAILS")}
subHeaderClassName={"stepper-subheader"}
wrapperClassName={"stepper-wrapper"}
/>
</Card>
<Card className="stepper-card">
<Stepper
customSteps={["HCM_CAMPAIGN_TYPE","HCM_CAMPAIGN_NAME", "HCM_CAMPAIGN_DATE" , "HCM_SUMMARY"]}
currentStep={currentStep }
customSteps={["HCM_CAMPAIGN_TYPE", "HCM_CAMPAIGN_NAME", "HCM_CAMPAIGN_DATE", "HCM_SUMMARY"]}
currentStep={currentStep}
onStepClick={onStepClick}
direction={"vertical"}
/>
</Card>
</div>

<div className="card-container2">
<Card className = "setup-campaign-card">
<Card className="setup-campaign-card">
<Header styles={{ margin: '0px' }}>{t(`HCM_CAMPAIGN_TYPE_HEADER`)}</Header>
<p className="description-type">{t(`HCM_CAMPAIGN_TYPE_DESCRIPTION`)}</p>
<LabelFieldPair style={{ display: "flex", marginBottom:"-0.8rem" }}>
<LabelFieldPair style={{ display: "flex", marginBottom: "-0.8rem" }}>
<div className="campaign-type">
<span>{`${t("HCM_CAMPAIGN_TYPE")}`}</span>
<span className="mandatory-span">*</span>
</div>
<div
className="campaign-type-wrapper"
onClick={(e) => {
if (props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate && source!=="microplan") {
if (props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate && source !== "microplan") {
setShowPopUp(true);
return;
}
Expand All @@ -204,28 +208,35 @@ const CampaignSelection = ({ onSelect, formData, formState, ...props }) => {
style={!showBeneficiary ? { width: "40rem", paddingBottom: 0, marginBottom: 0 } : { width: "40rem", paddingBottom: "1rem" }}
variant={error ? "error" : ""}
t={t}
// option={projectType?.["HCM-PROJECT-TYPES"]?.projectTypes}
option={filteredProjectTypes}
optionKey={"code"}
selected={type}
select={(value) => {
setStartValidation(true);
handleChange(value);
}}
disabled = {source === "microplan"}

disabled={source === "microplan"}
/>
{error?.message && <ErrorMessage message={t(error?.message)} showIcon={true} />}
</div>
</LabelFieldPair>
{showBeneficiary && (
<LabelFieldPair style={{ alignItems: "center" , display: "flex" , marginBottom: "0rem" }} >
<LabelFieldPair style={{ alignItems: "center", display: "flex", marginBottom: "0rem" }}>
<div className="beneficiary-type">{`${t("HCM_BENEFICIARY_TYPE")}`}</div>
<div>{t(`CAMPAIGN_TYPE_${beneficiaryType}`)}</div>
</LabelFieldPair>
)}
</Card>
<InfoCard
populators={{
name: "infocard",
}}
variant="info"
text={t("HCM_UPDATE_CAMPAIGN_TYPE_INFO")}
style={{ marginTop: "1rem", maxWidth: "100%" }}
/>
</div>

{showPopUp && (
<PopUp
className={"boundaries-pop-module"}
Expand Down Expand Up @@ -267,13 +278,12 @@ const CampaignSelection = ({ onSelect, formData, formState, ...props }) => {
/>,
]}
sortFooterChildren={true}
></PopUp>
/>
)}
</div>
}
)}
</>

);
};

export default CampaignSelection;
export default CampaignSelection;

0 comments on commit 7d2b97a

Please sign in to comment.