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

pop-inbox and plan-inbox table audit fixes #1754

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -12,7 +12,7 @@
<title>DIGIT</title>
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.49/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.39/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-health-css@0.1.23/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-health-css@0.1.24/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-health-css",
"version": "0.1.23",
"version": "0.1.24",
"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 @@ -306,4 +306,27 @@

.mp-margin-bottom{
margin-bottom: 1.5rem;
}

.rdt_TableCol_Sortable{
display: flex;
align-items: center;
gap: 0.25rem;

&:hover{
opacity: 1 !important;
}

.__rdt_custom_sort_icon__{
display: flex;
align-items: center;
}
}
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved

.rdt_TableCol{
border-radius: 0rem !important;

&:last-of-type{
border-left: none !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const PopInboxTable = ({ ...props }) => {
onSelectedRowsChange={handleRowSelect}
customStyles={tableCustomStyle}
selectableRowsComponent={CheckBox}
sortIcon={<CustomSVG.SortUp />}
sortIcon={<CustomSVG.SortUp width={"16px"} height={"16px"} fill={"#0b4b66"} />}
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved
defaultSortFieldId={1}
selectableRowsComponentProps={selectProps}
progressPending={props?.progressPending}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const WorkflowCommentPopUp = ({ onClose, heading, submitLabel, url, requestPaylo
className="campaign-type-alert-button"
type="button"
size="large"
style={{minWidth:"270px"}}
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved
variation="secondary"
label={t(`HCM_MICROPLAN_EDIT_POPULATION_CLOSE`)}
onClick={onClose}
Expand All @@ -151,6 +152,7 @@ const WorkflowCommentPopUp = ({ onClose, heading, submitLabel, url, requestPaylo
type="button"
size="large"
variation="primary"
style={{minWidth:"270px"}}
label={t(submitLabel)}
onClick={handleSave}
isDisabled={isSubmitting} // Disable button during submission
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React, { Fragment, useState, useEffect, useMemo } from "react";
import SearchJurisdiction from "../../components/SearchJurisdiction";
import { useHistory } from "react-router-dom";
import { Card, Tab, Button, SVG, Loader, ActionBar, Toast } from "@egovernments/digit-ui-components";
import { Card, Tab, Button, SVG, Loader, ActionBar, Toast , ButtonsGroup} from "@egovernments/digit-ui-components";
import { useTranslation } from "react-i18next";
import InboxFilterWrapper from "../../components/InboxFilterWrapper";
import DataTable from "react-data-table-component";
import { CheckBox } from "@egovernments/digit-ui-components";
import WorkflowCommentPopUp from "../../components/WorkflowCommentPopUp";
import { tableCustomStyle } from "../../components/tableCustomStyle";
import { CustomSVG } from "@egovernments/digit-ui-components";

const PlanInbox = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -460,6 +461,13 @@ const PlanInbox = () => {
},
];

const actionIconMap = {
"VALIDATE": { isSuffix: false, icon: "CheckCircle" },
"EDIT_AND_SEND_FOR_APPROVAL": { isSuffix: false, icon: "Edit" },
"APPROVE": { isSuffix: false, icon: "CheckCircle" },
"SEND_BACK_FOR_CORRECTION": { isSuffix: true, icon: "ArrowForward" },
}
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved

if (isPlanEmpSearchLoading || isLoadingCampaignObject || isWorkflowLoading) {
return <Loader />;
}
Expand Down Expand Up @@ -493,7 +501,7 @@ const PlanInbox = () => {
<Tab
activeLink={activeLink?.code}
configItemKey="code"
itemStyle={{ width: "unset !important" }}
itemStyle={{ width: "290px" }}
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved
configNavItems={[
{
code: "ASSIGNED_TO_ME",
Expand All @@ -520,20 +528,41 @@ const PlanInbox = () => {
<SVG.DoneAll width={"1.5rem"} height={"1.5rem"} fill={"#C84C0E"}></SVG.DoneAll>
<div className={"selected-state"}>{`${villagesSlected} ${t("MICROPLAN_VILLAGES_SELECTED")}`}</div>
</div>

<div className={`table-actions-wrapper`}>
{actionsMain
?.filter((action) => !actionsToHide.includes(action.action))
?.map((action, index) => (
<Button
key={index}
variation="secondary"
label={t(action.action)}
type="button"
onClick={(curr) => handleActionClick(action?.action)}
size={"large"}
/>
))}
{actionsMain?.filter((action) => !actionsToHide.includes(action.action)).length > 1 ? (
<ButtonsGroup
buttonsArray={actionsMain
?.filter((action) => !actionsToHide.includes(action.action))
?.map((action, index) => (
<Button
key={index}
variation="secondary"
label={t(action.action)}
type="button"
onClick={(curr) => handleActionClick(action?.action)}
size="large"
icon={actionIconMap[action.action]?.icon}
isSuffix={actionIconMap[action.action]?.isSuffix}
/>
))
}
/>
) : (
actionsMain
?.filter((action) => !actionsToHide.includes(action.action))
?.map((action, index) => (
<Button
key={index}
variation="secondary"
label={t(action.action)}
type="button"
onClick={(curr) => handleActionClick(action?.action)}
size="large"
icon={actionIconMap[action.action]?.icon}
isSuffix={actionIconMap[action.action]?.isSuffix}
/>
))
)}
</div>

{workFlowPopUp !== "" && (
Expand Down Expand Up @@ -576,6 +605,7 @@ const PlanInbox = () => {
conditionalRowStyles={conditionalRowStyles}
paginationPerPage={rowsPerPage}
paginationRowsPerPageOptions={[10, 20, 50, 100]}
sortIcon={<CustomSVG.SortUp width={"16px"} height={"16px"} fill={"#0b4b66"} />}
/>
</Card>
</div>
Expand Down
2 changes: 1 addition & 1 deletion health/micro-ui/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.49/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.39/dist/index.css" />
<!-- added below css for hcm-workbench module inclusion-->
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-health-css@0.1.23/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-health-css@0.1.24/dist/index.css" />
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#00bcd1" />
<title>DIGIT HCM</title>
Expand Down