-
Notifications
You must be signed in to change notification settings - Fork 20
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
Summary screen2 #1433
Merged
Merged
Summary screen2 #1433
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
.search-tabs-container { | ||
display: flex; | ||
justify-content: space-between; | ||
background-color: #eee; | ||
|
||
.search-tab-head { | ||
padding: 10px 35px; | ||
font-weight: 700; | ||
font-size: 1rem; | ||
border: 1px solid #d6d5d4; | ||
border-radius: 0.5rem 0.5rem 0 0; | ||
} | ||
|
||
.search-tab-head-selected { | ||
padding: 10px 35px; | ||
color: rgb(244, 119, 56); | ||
background-color: #fff; | ||
border: 1px solid #f47738; | ||
border-radius: 0.5rem 0.5rem 0 0; | ||
border-bottom: 4px solid rgb(244, 119, 56); | ||
font-weight: 700; | ||
font-size: 1.125rem; | ||
margin-bottom: -1rem; | ||
} | ||
|
||
.search-tab-head-selected:focus { | ||
outline: 0; | ||
} | ||
} | ||
|
||
/* Parent container */ | ||
.dm-parent-container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0.5rem 1rem; | ||
background-color: #fff; | ||
margin: 0.5rem 0; | ||
} | ||
|
||
/* Uploaded file container (left side) */ | ||
.dm-uploaded-file-container-sub { | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
} | ||
|
||
.dm-icon { | ||
margin-right: 0.5rem; /* Space between icon and filename */ | ||
} | ||
|
||
.dm-file-name { | ||
color: #505a5f; | ||
font-weight: 700; | ||
font-size: 0.875rem; /* Smaller text size */ | ||
} | ||
|
||
/* Actions container (right side) */ | ||
.dm-actions-container { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.75rem; /* Space between edit and delete buttons */ | ||
} | ||
|
||
/* Edit container */ | ||
.dm-campaign-preview-edit-container { | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
} | ||
|
||
.dm-campaign-preview-edit-container span { | ||
/*margin-right: 0.25rem;*/ | ||
font-size: 0.875rem; | ||
font-weight: 500; | ||
color: #dc5a32; /* Orange color for the text */ | ||
} | ||
|
||
/* Button styles */ | ||
.dm-workbench-download-template-btn { | ||
border: 1px solid #dc5a32; /* Orange border */ | ||
background-color: transparent; | ||
color: #dc5a32; /* Orange text */ | ||
padding: 0.25rem 0.5rem; | ||
border-radius: 4px; | ||
font-size: 0.875rem; /* Small font size */ | ||
font-weight: 500; | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
/* Hover effect for the button */ | ||
.dm-hover:hover { | ||
background-color: #fbe9e6; | ||
border-color: #dc5a32; | ||
} | ||
|
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
30 changes: 30 additions & 0 deletions
30
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/formulaConfig.scss
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,30 @@ | ||
.formula-label-field{ | ||
display: flex; | ||
gap:1.5rem; | ||
} | ||
.equals-icon { | ||
font-family: 'Roboto Condensed'; /* Set font family */ | ||
font-size: 2.5rem; /* Set font size to 2.5rem */ | ||
font-weight: 700; /* Set font weight */ | ||
line-height: 2.93rem; /* Set line height to 2.93rem */ | ||
text-align: left; /* Align text to the left */ | ||
|
||
width: 1.31rem; /* Set width to 1.31rem */ | ||
height: 2.38rem; /* Set height to 2.38rem */ | ||
gap: 0; /* Set gap to 0rem */ | ||
opacity: 100; /* Set opacity to 0 */ | ||
} | ||
|
||
.formula-label-field > span { | ||
width: 20rem; | ||
font-size: 1.2rem; | ||
margin-right: 2rem; | ||
font-weight: bold; | ||
} | ||
|
||
/* styles.css */ | ||
.header-comp-blue { | ||
margin-top: 0; /* Set margin-top to 0 */ | ||
font-size: 2rem; /* Set font size to 1.5rem */ | ||
color: #0B4B66 !important; /* Set text color */ | ||
} |
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
...icro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/DataMgmtTable.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 { useTranslation } from "react-i18next"; | ||
import { EditIcon } from "@egovernments/digit-ui-react-components"; | ||
import { DeleteIconv2 } from "@egovernments/digit-ui-react-components"; | ||
import { FileIcon } from "@egovernments/digit-ui-react-components"; | ||
import { Button } from "@egovernments/digit-ui-react-components"; | ||
import { Card } from "@egovernments/digit-ui-react-components"; | ||
import { CardSubHeader } from "@egovernments/digit-ui-react-components"; | ||
import { InboxSearchComposer } from "@egovernments/digit-ui-react-components"; | ||
|
||
import { Table } from '@egovernments/digit-ui-react-components'; | ||
|
||
|
||
const DataMgmtTable = ({ file, index, handleFileDelete, handleRedirect, setShowPreview }) => { | ||
|
||
|
||
const { t } = useTranslation(); | ||
const columns = [ | ||
{ Header: 'Vehicle type', accessor: 'vehicleType' }, | ||
{ Header: 'Manufacturer', accessor: 'manufacturer' }, | ||
{ Header: 'Model', accessor: 'model' }, | ||
{ Header: 'Capacity(in Bales)', accessor: 'cap' }, | ||
|
||
]; | ||
|
||
const data = [ | ||
{ vehicleType: 'Truck', manufacturer: "Draft", model: 'Household',cap:"70" }, | ||
{ vehicleType: 'Motorcycle', manufacturer: "Draft", model: 'Household',cap:"2" }, | ||
{ vehicleType: 'Motorcycle', manufacturer: "Draft", model: 'Household', cap:"2" }, | ||
]; | ||
return ( | ||
<div> | ||
|
||
{/* Second card */} | ||
|
||
|
||
<div className="view-composer-header-section"> | ||
<CardSubHeader style={{ marginTop: 0, fontSize: "1.5rem", color: " #0B4B66", marginBottom: "0rem" }}>Vehicles</CardSubHeader> | ||
</div> | ||
<Table | ||
columns={columns} data={data} | ||
getCellProps={(cellInfo) => { | ||
return { | ||
style: { | ||
padding: "20px 18px", | ||
fontSize: "16px", | ||
whiteSpace: "normal", | ||
}, | ||
}; | ||
}} | ||
t={t} | ||
/> | ||
|
||
</div> | ||
); | ||
}; | ||
|
||
export default DataMgmtTable; |
70 changes: 70 additions & 0 deletions
70
...icro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.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,70 @@ | ||
import React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import { EditIcon } from "@egovernments/digit-ui-react-components"; | ||
import { DeleteIconv2 } from "@egovernments/digit-ui-react-components"; | ||
import { FileIcon } from "@egovernments/digit-ui-react-components"; | ||
import { Button } from "@egovernments/digit-ui-react-components"; | ||
import { Card } from "@egovernments/digit-ui-react-components"; | ||
import { CardSubHeader } from "@egovernments/digit-ui-react-components"; | ||
import { InboxSearchComposer } from "@egovernments/digit-ui-react-components"; | ||
import { Table } from '@egovernments/digit-ui-react-components'; | ||
|
||
const FileComponent = ({ title,fileName,editHandler,deleteHandler}) => { | ||
const {t}=useTranslation(); | ||
return ( | ||
<div> | ||
|
||
{/* First card */} | ||
<div className="view-composer-header-section"> | ||
<CardSubHeader style={{ marginTop: 0, fontSize: "1.5rem", color: " #0B4B66", marginBottom: "0rem" }}>{title}</CardSubHeader> | ||
|
||
</div> | ||
<Card> | ||
<div className="dm-parent-container"> | ||
{/* Left side: File Icon */} | ||
<div | ||
className="dm-uploaded-file-container-sub" | ||
onClick={() => setShowPreview(true)} | ||
> | ||
<FileIcon className="dm-icon" /> | ||
<div>{fileName}</div> | ||
</div> | ||
|
||
{/* Right side: Edit and Delete Buttons */} | ||
<div className="dm-actions-container"> | ||
{/* Edit Icon and Button */} | ||
<div className="dm-campaign-preview-edit-container" onClick={() => handleRedirect(1)}> | ||
{/* <span>{t("CAMPAIGN_EDIT")}</span> */} | ||
<Button | ||
label={t("WBH_EDIT")} | ||
variation="secondary" | ||
icon={<EditIcon styles={{ height: "1.25rem", width: "2.5rem" }} />} | ||
type="button" | ||
className="dm-workbench-download-template-btn dm-hover" | ||
onButtonClick={(e) => { | ||
editHandler(); | ||
}} | ||
/> | ||
</div> | ||
|
||
{/* Delete Button */} | ||
<Button | ||
label={t("WBH_DELETE")} | ||
variation="secondary" | ||
icon={<DeleteIconv2 styles={{ height: "1.25rem", width: "2.5rem" }} />} | ||
type="button" | ||
className="dm-workbench-download-template-btn dm-hover" | ||
onButtonClick={(e) => { | ||
deleteHandler(); | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
</Card> | ||
|
||
</div> | ||
); | ||
}; | ||
|
||
export default FileComponent; | ||
|
29 changes: 29 additions & 0 deletions
29
...h/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/HeaderComp.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,29 @@ | ||
import React from 'react'; | ||
import { Card } from '@egovernments/digit-ui-react-components'; | ||
import { Header } from '@egovernments/digit-ui-react-components'; | ||
import { useTranslation } from 'react-i18next'; | ||
const HeaderComp = ({ title,styles = {} }) => { | ||
// Define default styles | ||
const {t}=useTranslation(); | ||
const defaultStyles = { | ||
marginTop: 0, | ||
fontSize: "1.5rem", | ||
color: "#0B4B66", | ||
}; | ||
|
||
// Merge default styles with the custom styles passed as a prop | ||
const mergedStyles = { ...defaultStyles, ...styles }; | ||
|
||
|
||
|
||
return ( | ||
<div> | ||
{/* Apply the merged styles */} | ||
<Header className="header-comp-blue" style={mergedStyles}> | ||
{t(title)} | ||
</Header> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HeaderComp; |
33 changes: 33 additions & 0 deletions
33
.../web/micro-ui-internals/packages/modules/microplan/src/components/HeaderPlusThreeInput.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,33 @@ | ||
import React from 'react'; | ||
import ThreeInputComp from './ThreeInputComp'; | ||
import HeaderComp from './HeaderComp'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
const HeaderPlusThreeInput = ({ title, threeInputArr }) => { | ||
const { t } = useTranslation(); | ||
|
||
|
||
return ( | ||
<div> | ||
<HeaderComp title={t(title)} /> | ||
|
||
{ | ||
threeInputArr.map((arr) => { | ||
|
||
|
||
return ( | ||
<ThreeInputComp | ||
output={arr[0]} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just send all this data in one prop and access accordingly in compnent There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it will be more readable and structured , so we know what we are sending |
||
input1={arr[1]} | ||
input2={arr[2]} | ||
input3={arr[3]} | ||
/> | ||
); | ||
}) | ||
} | ||
|
||
</div> | ||
); | ||
}; | ||
|
||
export default HeaderPlusThreeInput; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name component properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to FormulaSectionComp.js