Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLM 6178: Implementing New Pop up screen in boundaries #809

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/> -->
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.2/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.1/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.0.52-campaign/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.0.53-campaign/dist/index.css" />
<!-- added below css for hcm-workbench module inclusion-->
<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.5.41/dist/index.css" /> -->

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.0.52-campaign",
"version": "1.0.53-campaign",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar <jagan.kumar@egov.org.in>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,22 @@ tbody {
min-width: fit-content;
}
}
.digit-popup-wrapper.boundaries-pop-module.default {
width: 36rem;
.digit-popup-footer {
.digit-popup-footer-buttons {
width: 100% !important;
display: grid;
grid-template-columns: 1fr 1fr;
.digit-button-secondary {
width: 100%;
}
.digit-button-primary {
width: 100%;
}
}
}
}
.campaign-pop-module {
padding: 1.5rem;
border-radius: 4px;
Expand Down Expand Up @@ -441,8 +457,8 @@ tbody {
margin-top: 0;
margin-bottom: 0;
}
.digit-infobanner-wrap.error{
.digit-infobanner-wrap.error {
margin-bottom: 0.5rem;
margin-top: 1.5rem;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState, Fragment, useMemo } from "react";
import { CardText, LabelFieldPair, Card, Header, CardLabel, Modal, LoaderWithGap } from "@egovernments/digit-ui-react-components";
import { CardText, LabelFieldPair, Card, Header, CardLabel, LoaderWithGap } from "@egovernments/digit-ui-react-components";
import { useTranslation } from "react-i18next";
import { Dropdown, InfoCard, MultiSelectDropdown, Toast } from "@egovernments/digit-ui-components";
import { InfoCard, MultiSelectDropdown, PopUp, Button, Toast } from "@egovernments/digit-ui-components";
import { mailConfig } from "../configs/mailConfig";
/**
* The function `SelectingBoundaries` in JavaScript handles the selection of boundaries based on
Expand Down Expand Up @@ -463,26 +463,40 @@ function SelectingBoundaries({ onSelect, formData, ...props }) {
label={"Info"}
/>
{showPopUp && (
<Modal
popupStyles={{
top: "5rem",
<PopUp
className={"boundaries-pop-module"}
type={"default"}
heading={t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_HEADER")}
children={[
<div>
<CardText style={{ margin: 0 }}>{t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_TEXT") + " "}</CardText>
</div>,
]}
onOverlayClick={() => {
setShowPopUp(false);
}}
popmoduleClassName="campaign-pop-module"
popupModuleActionBarClass="campaign-pop-action"
style={{ flex: 1 }}
popupMainModuleClass="campaign-pop-main"
headerBarMain={<h1 className="campaign-modal-heading">{t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_HEADER")}</h1>}
actionCancelLabel={t("ES_CAMPAIGN_BOUNDARY_MODAL_BACK")}
actionCancelOnSubmit={() => checkDataPresent({ action: false })}
actionSaveLabel={t("ES_CAMPAIGN_BOUNDARY_MODAL_SUBMIT")}
actionSaveOnSubmit={() => checkDataPresent({ action: true })}
customTheme="v-campaign"
formId="modal-action"
>
<div>
<CardText style={{ margin: 0 }}>{t("ES_CAMPAIGN_UPDATE_BOUNDARY_MODAL_TEXT") + " "}</CardText>
</div>
</Modal>
footerChildren={[
<Button
type={"button"}
size={"large"}
variation={"secondary"}
label={t("ES_CAMPAIGN_BOUNDARY_MODAL_BACK")}
onClick={() => {
checkDataPresent({ action: false });
}}
/>,
<Button
type={"button"}
size={"large"}
variation={"primary"}
label={t("ES_CAMPAIGN_BOUNDARY_MODAL_SUBMIT")}
onClick={() => {
checkDataPresent({ action: true });
}}
/>,
]}
sortFooterChildren={true}
></PopUp>
)}
{showToast && (
<Toast
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.2/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.1/dist/index.css" />
<!-- added below css for hcm-workbench module inclusion-->
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.0.52-campaign/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.0.53-campaign/dist/index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#00bcd1" />
<title>DIGIT</title>
Expand Down
Loading