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

demo fixes #700

Merged
merged 5 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
20 changes: 10 additions & 10 deletions micro-ui/web/micro-ui-internals/example/src/UICustomizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ function filterUniqueByKey(arr, key) {
}

const epochTimeForTomorrow12 = () => {
// Get the current date and time
const now = new Date();

// Create a new Date object for tomorrow at 12:00 AM
const tomorrow = new Date(
// Get the current date and time
const now = new Date();
// Create a new Date object for tomorrow at 12:00 PM
const tomorrowNoon = new Date(
now.getFullYear(),
now.getMonth(),
now.getDate() + 1,
0, 0, 0, 0
);

// Return the epoch time (in milliseconds) for tomorrow at 12:00 AM
return Math.floor(tomorrow.getTime() / 1000);
12, 0, 0, 0
);
// Return the epoch time (in milliseconds) for tomorrow at 12:00 PM
return tomorrowNoon.getTime();
};

function cleanObject(obj) {
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/packages/css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.0.27-microplan",
"version": "1.0.29-microplan",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ $border-color: rgba(214, 213, 212, 1);

.microplan-close-button {
margin: 0.5rem 0.5rem 0 0;
align-self: flex-start;
border: none;
color: inherit;
cursor: pointer;
Expand Down Expand Up @@ -2412,4 +2413,16 @@ $border-color: rgba(214, 213, 212, 1);

.help-lable{
color: $primary-theme-color
}
}

.loginFormStyleEmployee {
.loginCardClassName {
.digit-header-content {
&:not(label) {
display: flex;
justify-content: center;
font-size: 2rem;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ const Hypothesis = ({ campaignType = "SMC", microplanData, setMicroplanData, che
popupModuleMianStyles={{ padding: 0, margin: 0 }}
style={{
flex: 1,
height:"2.5rem",
border: `0.063rem solid ${PRIMARY_THEME_COLOR}`,
}}
headerBarMainStyle={{ padding: 0, margin: 0 }}
Expand Down Expand Up @@ -353,7 +354,7 @@ const InterractableSection = React.memo(
{assumptions?.filter(item=>item.active)?.map((item, index) => (
<div
key={index}
className={`${index === 0 ? "select-and-input-wrapper-first" : "select-and-input-wrapper"}`}
className={`${index === 0 ? "select-and-input-wrapper-first" : "select-and-input-wrapper"} ${index ===assumptions?.filter(item=>item.active)?.length -1 ?"last-container":""} `}
>
<div className="key"
ref={el => { itemRefs.current[index] = el; }}
Expand Down Expand Up @@ -545,7 +546,7 @@ const Input = React.memo(({ item, setAssumptions, t, disabled = false }) => {
return (
<TextInput
name={"input"}
type={"text"}
type={"number"}
value={inputValue}
t={t}
config={{}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export const JsonPreviewInExcelForm = (props) => {
<Button
label={t("BUTTON_BACK")}
variation="secondary"
icon={<SVG.ArrowBack height={"2rem"} width={"2rem"} fill={PRIMARY_THEME_COLOR} />}
icon={<SVG.ArrowBack height={"2rem"} width={"2rem"} fill={PRIMARY_THEME_COLOR} />}
type="button"
onButtonClick={() => props?.onBack()}
/>
<Button
label={t("BUTTON_DOWNLOAD")}
variation="secondary"
icon={<DownloadIcon height={"1.25rem"} width={"1.25rem"} fill={PRIMARY_THEME_COLOR} />}
icon={<DownloadIcon height={"1.25rem"} width={"1.25rem"} fill={PRIMARY_THEME_COLOR} />}
type="button"
onButtonClick={() => props?.onDownload()}
/>
Expand All @@ -44,22 +44,31 @@ export const JsonPreviewInExcelForm = (props) => {
<tbody>
{sheetsData?.[currentSheetName]?.slice(1).map((rowData, rowIndex) => (
<tr key={rowIndex}>
{Object.values(sheetsData?.[currentSheetName]?.[0])?.map((_, cellIndex) => (
<td key={cellIndex}>{rowData[cellIndex] || ""}</td>
))}
{Object.values(sheetsData?.[currentSheetName]?.[0])?.map((_, cellIndex) => {
return (
<td key={cellIndex} style={!isNaN(rowData[cellIndex]) ? { textAlign: "end" } : {}}>
{rowData[cellIndex] || ""}
</td>
);
siddhant-nawale-egov marked this conversation as resolved.
Show resolved Hide resolved
})}
</tr>
))}
</tbody>
</table>
</div>
<div className="excel-tab-list">
{Object.entries(sheetsData).map(([sheetName, sheetData], index) => (
<button type="button" key={sheetName} className={`tab ${sheetName === currentSheetName ? "active" : ""}`} onClick={() =>{
setCurrentSheetName(sheetName);
}}>
{sheetName}
</button>
))}
{Object.entries(sheetsData).map(([sheetName, sheetData], index) => (
<button
type="button"
key={sheetName}
className={`tab ${sheetName === currentSheetName ? "active" : ""}`}
onClick={() => {
setCurrentSheetName(sheetName);
}}
>
{sheetName}
</button>
))}
</div>
{/* ))} */}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ const ChoroplethSelection = memo(

return (
<div className="choropleth-section" ref={showChoroplethOptionRef}>
<div className="icon-rest filter-icon">
<div className="icon-rest virtualization-icon">
siddhant-nawale-egov marked this conversation as resolved.
Show resolved Hide resolved
<p onClick={() => setShowChoroplethOptions((previous) => !previous)}>{t("VISUALIZATIONS")}</p>
<div className="icon" onClick={() => setShowChoroplethOptions((previous) => !previous)}>
<div className="icon" onClick={() => setShowChoroplethOptions((previous) => !previous)} onKeyUp={() => setShowChoroplethOptions((previous) => !previous)} tabIndex={0}>
{DigitSvgs.FilterAlt && <DigitSvgs.FilterAlt width={"1.667rem"} height={"1.667rem"} fill={"rgba(255, 255, 255, 1)"} />}
</div>
</div>
Expand Down Expand Up @@ -728,6 +728,7 @@ const BoundarySelection = memo(
popupModuleMianStyles={{ padding: 0, margin: 0, }}
style={{
flex: 1,
height:"2.5rem",
border: `0.063rem solid ${PRIMARY_THEME_COLOR}`,
}}
headerBarMainStyle={{ padding: 0, margin: 0 }}
Expand Down Expand Up @@ -1275,7 +1276,7 @@ const addGeojsonToMap = (map, geojson, t) => {
feature.properties["name"] +
"</div>";
for (let prop in feature.properties) {
if (prop !== "name" && prop !== "addOn") {
if (prop !== "name" && prop !== "addOn" && prop !== "feature") {
let data = !!feature.properties[prop] ? feature.properties[prop] : t("NO_DATA");
popupContent +=
"<tr><td style='font-family: Roboto;font-size: 0.8rem;font-weight: 700;text-align: left; color:rgba(80, 90, 95, 1);padding-right:1rem'>" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const MicroplanCreatedScreen = memo(({ microplanData, ...props }) => {
data[i] = data[i].map((item) => (item ? t(item) : t("NO_DATA")));
}

let blob = convertJsonToXlsx({ [microplanData?.microplanDetails?.name]: data }, { skipHeader: true });
const blob = convertJsonToXlsx({ [microplanData?.microplanDetails?.name]: data }, { skipHeader: true });

if (!blob) {
return;
Expand All @@ -45,7 +45,7 @@ const MicroplanCreatedScreen = memo(({ microplanData, ...props }) => {
};

const clickGoHome = () => {
history.push(`/microplan-ui/employee`);
history.push('/microplan-ui/employee');
};

return (
Expand Down Expand Up @@ -73,7 +73,7 @@ const MicroplanCreatedScreen = memo(({ microplanData, ...props }) => {
</div>
</div>

<ActionBar className={`custom-action-bar-success-screen`}>
<ActionBar className={'custom-action-bar-success-screen'}>
{/* Back button */}
<Button
type="button"
Expand All @@ -90,7 +90,7 @@ const MicroplanCreatedScreen = memo(({ microplanData, ...props }) => {
type="button"
className="custom-button"
label={t("GO_TO_HCM")}
onButtonClick={clickGoToHCM}
onButtonClick={()=>{}}
isSuffix={true}
variation={"primary"}
textStyles={{ padding: 0, margin: 0 }}
Expand Down
Loading