Skip to content

Commit

Permalink
BUGFIX/HCMPRE-1776 : Added UI/UX Master changes (#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov authored Jan 7, 2025
1 parent 4efa047 commit cf8a7c9
Show file tree
Hide file tree
Showing 23 changed files with 91 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<title>DIGIT</title>
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.3/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.43/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-health-css@0.2.33/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-health-css@0.2.34/dist/index.css" />


<!-- added below css for hcm-workbench module inclusion-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-health-css",
"version": "0.2.33",
"version": "0.2.34",
"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 @@ -135,8 +135,9 @@
align-items: stretch;
}
.stepper-card{
height: 39rem;
height: 37rem;
margin-bottom: 1.5rem !important;
padding-top: 0rem;
}
.stepper-subheader{
color: theme(digitv2.lightTheme.header-sidenav);
Expand Down Expand Up @@ -209,13 +210,7 @@
width: 100%;
}
.campaign-tag{
border: 0.5px solid #0B4B66;
margin-bottom: 1rem;
height: 3.3rem;
.digit-tag-text{
font-size: 1.5rem;
font-weight: 700;
}
}
.digit-popup-wrapper.dataMapping {
.digit-popup-children-wrap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,18 @@ tbody {
border-color: #D4D5D6;
border-radius: 0.25rem;
padding: 1rem;
padding-bottom: 0rem;
}

.summary-parent-group {
border-width: 0.063rem;
background: theme(digitv2.lightTheme.paper-secondary);
border-color: #D4D5D6;
border-radius: 0.25rem;
padding: 1rem;
}
.summary-parent-group:not(:last-child) {
margin-bottom: 1.5rem;
}

.card-container {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const BoundaryDetailsSummary = (props) => {
{Object.keys(groupedByParent)
.slice(0, 2)
.map((parentKey, index) => (
<div className="parent-group" key={index}>
<div className="summary-parent-group" key={index}>
{parentKey && parentKey !== "undefined" && parentKey.trim() !== "" && <div className="boundary-header">{t(parentKey)}</div>}
<div>
<div className="digit-tag-container" style={{ display: "flex", maxWidth: "100%" , margin: "0rem" }}>
Expand Down Expand Up @@ -100,7 +100,7 @@ const BoundaryDetailsSummary = (props) => {
>
{Object.keys(groupedByParent)
.map((parentKey, index) => (
<div className="parent-group" key={index} style={{ marginBottom: "20px" }}>
<div className="parent-group" key={index}>
{parentKey && parentKey !== "undefined" && parentKey.trim() !== "" && <div className="boundary-header">{t(parentKey)}</div>}
<div>
<div className="digit-tag-container" style={{ display: "flex", maxWidth: "100%" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React, { useEffect, useState,Fragment } from "react";
import { useTranslation } from "react-i18next";
import { Header, Loader, LoaderWithGap, ViewComposer } from "@egovernments/digit-ui-react-components";
import { Toast, Stepper, TextBlock, Card ,Tag } from "@egovernments/digit-ui-components";


import TagComponent from "./TagComponent";


function boundaryDataGrp(boundaryData) {
Expand Down Expand Up @@ -152,7 +151,7 @@ const BoundarySummary = (props) => {
</div>

<div className="card-container-delivery">
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<div style={{ display: "flex", justifyContent: "space-between" }}>
<Header className="summary-header">{t("ES_BOUNDARY_SUMMARY_HEADING")}</Header>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState, useEffect , Fragment } from "react";
import { DatePicker, LabelFieldPair, Header } from "@egovernments/digit-ui-react-components";
import { useTranslation } from "react-i18next";
import { ErrorMessage, FieldV1, TextInput ,Stepper , TextBlock , Card , InfoCard ,Tag } from "@egovernments/digit-ui-components";
import TagComponent from "./TagComponent";

const CampaignDates = ({ onSelect, formData, ...props }) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -131,7 +132,7 @@ const CampaignDates = ({ onSelect, formData, ...props }) => {
</div>

<div className="card-container2">
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<Card className="setup-campaign-card">
<Header>{t(`HCM_CAMPAIGN_DATES_HEADER`)}</Header>
<p className="dates-description">{t(`HCM_CAMPAIGN_DATES_DESCRIPTION`)}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import { useHistory } from "react-router-dom";
import { EditIcon, Header, Loader, LoaderWithGap, ViewComposer } from "@egovernments/digit-ui-react-components";
import { Toast , Stepper , TextBlock ,Card ,Tag } from "@egovernments/digit-ui-components";
import TagComponent from "./TagComponent";

const CampaignDetailsSummary = (props) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -158,8 +159,8 @@ const CampaignDetailsSummary = (props) => {
</div>

<div className="card-container-delivery">
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<div style={{ display: "flex", justifyContent: "space-between" }}>
<TagComponent campaignName={campaignName} />
<div style={{ display: "flex", justifyContent: "space-between" }}>
<Header className="summary-header">{t("HCM_CAMPAIGN_DETAILS_SUMMARY")}</Header>
</div>
<div className="campaign-summary-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,22 @@ const CampaignSummary = (props) => {
{
type: "DATA",
cardHeader: { value: t("CAMPAIGN_DETAILS"), inlineStyles: { marginTop: 0, fontSize: "1.5rem" } },
cardSecondaryAction: isPreview === "true" && (
// cardSecondaryAction: isPreview === "true" && (
// <Button
// className={"campaign-type-alert-button"}
// type={"button"}
// size={"large"}
// variation={"primary"}
// label={t("ES_CAMPAIGN_DOWNLOAD_USER_DETAILS")}
// onClick={() => {
// setTimeline(true);
// setResource(resourceIdArr);
// setCampaignId(data?.[0]?.id);

// }}
// />
// ),
cardSecondaryAction: isPreview === "true" ? (
<Button
className={"campaign-type-alert-button"}
type={"button"}
Expand All @@ -387,6 +402,14 @@ const CampaignSummary = (props) => {

}}
/>
) : (
<div
className="campaign-preview-edit-container"
onClick={() => handleRedirect(4)}
>
<span>{t("CAMPAIGN_EDIT")}</span>
<EditIcon />
</div>
),
values: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Toast , Tag } from "@egovernments/digit-ui-components";
import { PRIMARY_COLOR, downloadExcelWithCustomName } from "../utils";
import getProjectServiceUrl from "../utils/getProjectServiceUrl";
import NoResultsFound from "./NoResultsFound";
import TagComponent from "./TagComponent";

// function boundaryDataGrp(boundaryData) {
// // Create an empty object to hold grouped data by type
Expand Down Expand Up @@ -444,7 +445,7 @@ const CampaignUpdateSummary = (props) => {

return (
<>
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<div style={{ display: "flex", justifyContent: "space-between" , marginBottom:"-1.5rem" }}>
<Header className="summary-header">{t("ES_TQM_SUMMARY_HEADING")}</Header>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { EditIcon, Header, Loader, LoaderWithGap, ViewComposer } from "@egovern
import { Toast, Stepper, TextBlock, Card , Tag} from "@egovernments/digit-ui-components";
import { downloadExcelWithCustomName } from "../utils";
import getProjectServiceUrl from "../utils/getProjectServiceUrl";
import TagComponent from "./TagComponent";

function mergeObjects(item) {
const arr = item;
Expand Down Expand Up @@ -304,7 +305,7 @@ const DataUploadSummary = (props) => {
</div>

<div className="card-container-delivery">
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<div style={{ display: "flex", justifyContent: "space-between" }}>
<Header className="summary-header">{t("HCM_DATA_UPLOAD_SUMMARY")}</Header>
{/* {userCredential && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import { useHistory } from "react-router-dom";
import { EditIcon, Header, Loader, LoaderWithGap, ViewComposer } from "@egovernments/digit-ui-react-components";
import { Toast, Card, Stepper, TextBlock ,Tag } from "@egovernments/digit-ui-components";

import TagComponent from "./TagComponent";

function mergeObjects(item) {
const arr = item;
Expand Down Expand Up @@ -352,7 +352,7 @@ const DeliveryDetailsSummary = (props) => {
</Card>
</div>
<div className="card-container-delivery">
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<div style={{ display: "flex", justifyContent: "space-between" }}>
<Header className="summary-header">{t("HCM_DELIVERY_DETAILS_SUMMARY")}</Header>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useLocation, useHistory } from "react-router-dom";
import { Wrapper } from "./SelectingBoundaryComponent";
import { InfoCard, PopUp, Stepper, TextBlock,Tag , Card} from "@egovernments/digit-ui-components";
import { CONSOLE_MDMS_MODULENAME } from "../Module";
import TagComponent from "./TagComponent";

const SelectingBoundariesDuplicate = ({ onSelect, formData, ...props }) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -112,7 +113,7 @@ const SelectingBoundariesDuplicate = ({ onSelect, formData, ...props }) => {
</div>

<div className="card-container-delivery">
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<Card>
<Header>{t(`CAMPAIGN_SELECT_BOUNDARY`)}</Header>
<p className="description-type">{t(`CAMPAIGN_SELECT_BOUNDARIES_DESCRIPTION`)}</p>
Expand All @@ -134,7 +135,7 @@ const SelectingBoundariesDuplicate = ({ onSelect, formData, ...props }) => {
name: "infocard",
}}
variant="default"
style={{ margin: "0rem", maxWidth: "100%" , marginTop: "1rem"}}
style={{ margin: "0rem", maxWidth: "100%" , marginTop: "1.5rem" , marginBottom: "2rem"}}
additionalElements={[
<span style={{ color: "#505A5F" }}>
{t("HCM_BOUNDARY_INFO")}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
import { Tag } from "@egovernments/digit-ui-components";

const TagComponent = ({campaignName}) => {
const { t } = useTranslation();
return (
<Tag label={campaignName} showIcon={false} className={"campaign-tag"} type={"monochrome"} stroke={true} />
);
};


export default TagComponent;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useLocation , useHistory } from "react-router-dom";
import { Wrapper } from "./SelectingBoundaryComponent";
import { Loader, InfoCard ,Tag } from "@egovernments/digit-ui-components";
import { CONSOLE_MDMS_MODULENAME } from "../Module";
import TagComponent from "./TagComponent";

const UpdateBoundaryWrapper = ({ onSelect,...props }) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -76,7 +77,7 @@ const UpdateBoundaryWrapper = ({ onSelect,...props }) => {

return (
<>
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<Card>
<Header>{t(`CAMPAIGN_SELECT_BOUNDARY`)}</Header>
<p className="description-type">{t(`CAMPAIGN_SELECT_BOUNDARIES_DESCRIPTION`)}</p>
Expand All @@ -101,6 +102,7 @@ const UpdateBoundaryWrapper = ({ onSelect,...props }) => {
label="Info"
text={t("CAMPAIGN_CANNOT_REMOVE_PREVIOUS_BOUNDARIES")}
variant="default"
style={{ margin: "0rem", maxWidth: "100%" , marginTop: "1.5rem" , marginBottom: "2rem"}}
/>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { Card, Modal, CardText } from "@egovernments/digit-ui-react-components";
import BulkUpload from "./BulkUpload";
import Ajv from "ajv";
import XLSX from "xlsx";
import { InfoCard, PopUp, Toast, Button, DownloadIcon, Stepper, TextBlock, Tag } from "@egovernments/digit-ui-components";
import { InfoCard, PopUp, Toast, Button} from "@egovernments/digit-ui-components";
import { downloadExcelWithCustomName } from "../utils";
import { CONSOLE_MDMS_MODULENAME } from "../Module";
import TagComponent from "./TagComponent";

/**
* The `UploadData` function in JavaScript handles the uploading, validation, and management of files
Expand Down Expand Up @@ -1108,7 +1109,7 @@ const UploadData = ({ formData, onSelect, ...props }) => {
{loader && <LoaderWithGap text={"CAMPAIGN_VALIDATION_INPROGRESS"} />}

<div className={parentId ? "card-container2" : "card-container1"}>
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<Card>
<div className="campaign-bulk-upload">
<Header className="digit-form-composer-sub-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useTranslation } from "react-i18next";
import data_hook from "../../hooks/data_hook";
import MobileChecklist from "../../components/MobileChecklist";
import { CONSOLE_MDMS_MODULENAME } from "../../Module";
import TagComponent from "../../components/TagComponent";

let temp_data = []

Expand Down Expand Up @@ -514,7 +515,7 @@ const CreateChecklist = () => {
{!loading_new && submitting && <Loader />}
{!submitting && !loading_new &&
<div>
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} style={{border: '0.5px solid #0B4B66'}} />
<TagComponent campaignName={campaignName} />
<div style={{ display: "flex", justifyContent: "space-between", height:"5.8rem", marginTop: "-1.2rem"}}>
<div>
<h2 style={{ fontSize: "2.5rem", fontWeight: "700", fontFamily: "Roboto Condensed" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
import { TextInput, InfoCard , Stepper , TextBlock , Tag } from "@egovernments/digit-ui-components";
import { deliveryConfig } from "../../configs/deliveryConfig";
import getDeliveryConfig from "../../utils/getDeliveryConfig";
import TagComponent from "../../components/TagComponent";

const initialState = (saved, filteredDeliveryConfig, refetch) => {
const data = {
Expand Down Expand Up @@ -215,7 +216,7 @@ function CycleConfiguration({ onSelect, formData, control, ...props }) {
</Card>
</div>
<div className="card-container2">
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<Card>
<Header>
{t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next";
import { useHistory } from "react-router-dom";
import { checklistSearchConfig } from "../../configs/checklistSearchConfig";
import { CONSOLE_MDMS_MODULENAME } from "../../Module";
import TagComponent from "../../components/TagComponent";

const SearchChecklist = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -134,7 +135,7 @@ const SearchChecklist = () => {
activeSteps={6}
// className={"campaign-flow-stepper"}
/> */}
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<div style={{ fontSize: "2.5rem", fontWeight: "700", fontFamily: "Roboto Condensed" }}>{t("CONFIGURE_CHECKLIST")}</div>
<div style={{ display: "flex", justifyContent: "space-between", marginTop: "1rem" }}>
{/* <Header styles={{ fontSize: "32px", marginBottom: "2rem", marginTop: "2rem" }}>{t("ACTION_LABEL_CONFIGURE_APP")}</Header> */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ViewCardFieldPair, Toast, Card, TextBlock, Button, PopUp, CardText, Tex
import { FormComposerV2 } from "@egovernments/digit-ui-react-components";
import { useHistory, useLocation } from "react-router-dom";
import MobileChecklist from "../../components/MobileChecklist";
import TagComponent from "../../components/TagComponent";

const UpdateChecklist = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -465,7 +466,7 @@ const UpdateChecklist = () => {
{/* {submitting && <Loader />} */}
{!submitting &&
<div>
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} style={{border: '0.5px solid #0B4B66'}} />
<TagComponent campaignName={campaignName} />
<div style={{ display: "flex", justifyContent: "space-between", height: "5.8rem", marginTop:"-1.2rem" }}>
<div>
<h2 style={{ fontSize: "2.5rem", fontWeight: "700", fontFamily: "Roboto Condensed" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { dateChangeBoundaryConfig, dateChangeConfig } from "../../configs/dateCh
import { Button, InfoCard, PopUp, Toast , Tag} from "@egovernments/digit-ui-components";
import getProjectServiceUrl from "../../utils/getProjectServiceUrl";
import { CONSOLE_MDMS_MODULENAME } from "../../Module";
import TagComponent from "../../components/TagComponent";


function UpdateDatesWithBoundaries() {
Expand Down Expand Up @@ -146,7 +147,7 @@ function UpdateDatesWithBoundaries() {

return (
<div>
<Tag icon="" label={campaignName} labelStyle={{}} showIcon={false} className={"campaign-tag"} />
<TagComponent campaignName={campaignName} />
<FormComposerV2
label={t("CAMPAIGN_UPDATE_DATE_SUBMIT")}
config={
Expand Down
Loading

0 comments on commit cf8a7c9

Please sign in to comment.