-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boundary feature + checklist fixes (#1518)
* Feature/boundary ss (#1490) * boundary-hierarchy * boundary-hierarchy * localization changes * ui changes * Update health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignCard.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * pr review changes * removed all logs --------- Co-authored-by: suryansh-egov <suryansh.singh.egovernments.org> Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * checklist-bugs-fixes (#1513) * checklist-bugs-fixes * cahgnes --------- Co-authored-by: suryansh-egov <suryansh.singh.egovernments.org> * changesnew --------- Co-authored-by: suryansh-egov <suryansh.singh@egovernments.org> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: suryansh-egov <suryansh.singh.egovernments.org>
- Loading branch information
1 parent
7382ef1
commit 842be89
Showing
23 changed files
with
1,555 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
health/micro-ui/web/micro-ui-internals/packages/css/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
.../web/micro-ui-internals/packages/modules/campaign-manager/src/components/BoundaryPopup.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from "react"; | ||
import { PopUp, Button } from "@egovernments/digit-ui-components"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
const BoundaryPopup = ({ showPopUp, setShowPopUp, callGeoPode, geoPodeData })=> { | ||
const { t } = useTranslation(); | ||
return ( | ||
showPopUp && ( | ||
<PopUp | ||
className={"custom-popup-boundary"} | ||
type={"default"} | ||
heading={t("CHOOSE_MEANS_TO_CREATE_BOUNDARY")} | ||
children={[ | ||
]} | ||
onClose={()=>{ | ||
setShowPopUp(false); | ||
}} | ||
style={{ | ||
height:"11rem", | ||
width: "48rem" | ||
}} | ||
footerChildren={[ | ||
]} | ||
sortFooterChildren={true} | ||
> | ||
<div style={{display:"flex", gap:"1rem", justifyContent:"space-around"}}> | ||
<Button | ||
type={"button"} | ||
size={"large"} | ||
isDisabled={!geoPodeData} | ||
variation={"secondary"} | ||
label={t("GET_BOUNDARY_DATA_FROM_GEOPODE")} | ||
onClick={() => { | ||
callGeoPode(false); | ||
}} | ||
style={{height:"4rem"}} | ||
/> | ||
<Button | ||
type={"button"} | ||
size={"large"} | ||
variation={"secondary"} | ||
label={t("CREATE_MY_OWN_BOUNDARY_DATA")} | ||
onClick={() => { | ||
callGeoPode(true); | ||
}} | ||
style={{height:"4rem"}} | ||
/> | ||
</div> | ||
</PopUp> | ||
|
||
) | ||
); | ||
}; | ||
|
||
export default BoundaryPopup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/FinalPopup.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React from "react"; | ||
import { PopUp, Button } from "@egovernments/digit-ui-components"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
const FinalPopup = ({ showFinalPopUp, setShowFinalPopup, addParents, createNewHierarchy })=> { | ||
const { t } = useTranslation(); | ||
return ( | ||
showFinalPopUp && ( | ||
<PopUp | ||
className={"custom-popup"} | ||
type={"default"} | ||
heading={t("CREATE_BOUNDARY_HIERARCHY")} | ||
children={[ | ||
]} | ||
onClose={()=>{ | ||
setShowFinalPopup(false); | ||
}} | ||
onOverlayClick={()=>{ | ||
setShowFinalPopup(false); | ||
}} | ||
style={{ | ||
// height:"11rem" | ||
width: "50rem" | ||
}} | ||
footerChildren={[ | ||
<Button | ||
type={"button"} | ||
size={"large"} | ||
variation={"secondary"} | ||
label={t("CANCEL")} | ||
onClick={() => { | ||
setShowFinalPopup(false); | ||
}} | ||
/>, | ||
<Button | ||
type={"button"} | ||
size={"large"} | ||
variation={"primary"} | ||
label={t("CREATE")} | ||
onClick={() => { | ||
addParents(); | ||
createNewHierarchy(); | ||
setShowFinalPopup(false); | ||
}} | ||
/> | ||
]} | ||
sortFooterChildren={true} | ||
> | ||
<div> | ||
{<div>{t("YOU_WON'T_BE_ABLE_TO_UNDO_THIS_STEP_OF_CREATING_HIERARCHY")}</div>} | ||
</div> | ||
</PopUp> | ||
|
||
) | ||
); | ||
}; | ||
|
||
export default FinalPopup; |
69 changes: 69 additions & 0 deletions
69
.../web/micro-ui-internals/packages/modules/campaign-manager/src/components/XlsPreviewNew.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { PopUp, SVG, DownloadIcon, Button } from "@egovernments/digit-ui-react-components"; | ||
import React from "react"; | ||
import DocViewer, { DocViewerRenderers } from "@cyntler/react-doc-viewer"; | ||
import { useTranslation } from "react-i18next"; | ||
import { PRIMARY_COLOR } from "../utils"; | ||
|
||
const ArrowBack = ({ className = "", height = "15", width = "15", styles = {} }) => { | ||
return ( | ||
<svg className={className} style={styles} width={width} height={height} viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M14.1663 6.16658H4.02467L8.68301 1.50825L7.49967 0.333252L0.833008 6.99992L7.49967 13.6666L8.67467 12.4916L4.02467 7.83325H14.1663V6.16658Z" | ||
fill={PRIMARY_COLOR} | ||
/> | ||
</svg> | ||
); | ||
}; | ||
function XlsPreviewNew({ file, ...props }) { | ||
const { t } = useTranslation(); | ||
const documents = file | ||
? [ | ||
{ | ||
fileType: "xlsx", | ||
fileName: file?.filename, | ||
uri: file?.url, | ||
}, | ||
] | ||
: null; | ||
|
||
return ( | ||
<div> | ||
<div style={{ display: "flex", justifyContent: "space-between", marginLeft: "2.5rem", marginRight: "2.5rem", marginTop: "2.5rem" }}> | ||
{/* <Button | ||
label={t("BACK")} | ||
variation="secondary" | ||
icon={<ArrowBack styles={{ height: "1.25rem", width: "1.25rem" }} fill={PRIMARY_COLOR} />} | ||
type="button" | ||
className="workbench-download-template-btn" | ||
onButtonClick={() => props?.onBack()} | ||
/> | ||
<Button | ||
label={t("WBH_DOWNLOAD")} | ||
variation="secondary" | ||
icon={<DownloadIcon styles={{ height: "1.25rem", width: "1.25rem" }} fill={PRIMARY_COLOR} />} | ||
type="button" | ||
className="workbench-download-template-btn" | ||
onButtonClick={() => props?.onDownload()} | ||
/> */} | ||
</div> | ||
<div className="campaign-popup-module" style={{ marginTop: "1.5rem" }}> | ||
<DocViewer | ||
style={{ height: "80vh", overflowY: "hidden" }} | ||
theme={{ | ||
primary: PRIMARY_COLOR, | ||
secondary: "#feefe7", | ||
tertiary: "#feefe7", | ||
textPrimary: "#0B0C0C", | ||
textSecondary: "#505A5F", | ||
textTertiary: "#00000099", | ||
disableThemeScrollbar: true, | ||
}} | ||
documents={documents} | ||
pluginRenderers={DocViewerRenderers} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default XlsPreviewNew; |
Empty file.
65 changes: 65 additions & 0 deletions
65
...icro-ui-internals/packages/modules/campaign-manager/src/components/icons/ShapeFileIcon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React from "react"; | ||
|
||
export const ShpFileIcon = () => ( | ||
<svg width="96" height="120" viewBox="0 0 96 120" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
{/* File outline */} | ||
<rect | ||
x="5" | ||
y="5" | ||
width="86" | ||
height="110" | ||
rx="10" | ||
ry="10" | ||
fill="url(#gradient)" // Gradient fill | ||
stroke="#DAA520" // Golden outline | ||
strokeWidth="2" | ||
/> | ||
|
||
{/* File fold at the top-right corner */} | ||
<path | ||
d="M64 0V24H88" | ||
fill="url(#foldGradient)" | ||
stroke="#DAA520" | ||
strokeWidth="1" | ||
/> | ||
|
||
{/* Shadow under the fold */} | ||
<path | ||
d="M64 24L88 24" | ||
stroke="#FFD700" | ||
strokeOpacity="0.5" | ||
strokeWidth="1.5" | ||
/> | ||
|
||
{/* Add subtle shadow for depth */} | ||
<rect | ||
x="5" | ||
y="5" | ||
width="86" | ||
height="110" | ||
rx="10" | ||
ry="10" | ||
fill="none" | ||
stroke="rgba(0,0,0,0.2)" // Shadow | ||
strokeWidth="4" | ||
strokeLinecap="round" | ||
/> | ||
|
||
{/* Add .SHP text below the file */} | ||
<text x="28" y="115" fill="#DAA520" fontSize="22" fontWeight="bold">.SHP</text> | ||
|
||
{/* Define gradient for file */} | ||
<defs> | ||
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%"> | ||
<stop offset="0%" style={{ stopColor: "#FFD700", stopOpacity: 1 }} /> | ||
<stop offset="100%" style={{ stopColor: "#FFEA00", stopOpacity: 1 }} /> | ||
</linearGradient> | ||
|
||
{/* Gradient for the folded corner */} | ||
<linearGradient id="foldGradient" x1="0%" y1="0%" x2="100%" y2="100%"> | ||
<stop offset="0%" style={{ stopColor: "#FFDE5A", stopOpacity: 1 }} /> | ||
<stop offset="100%" style={{ stopColor: "#FFD700", stopOpacity: 0.8 }} /> | ||
</linearGradient> | ||
</defs> | ||
</svg> | ||
); |
Oops, something went wrong.