From 8b912e84ad7d95afb7c193984f3f962f01b7ae46 Mon Sep 17 00:00:00 2001 From: Swathi-eGov Date: Wed, 6 Nov 2024 15:18:40 +0530 Subject: [PATCH] pop-inbox and plan-inbox table audit fixes --- .../example/public/index.html | 2 +- .../packages/css/package.json | 2 +- .../css/src/components/microplan.scss | 23 +++++++ .../microplan/src/components/PopInboxTable.js | 2 +- .../src/components/WorkflowCommentPopUp.js | 2 + .../microplan/src/pages/employee/PlanInbox.js | 60 ++++++++++++++----- health/micro-ui/web/public/index.html | 2 +- 7 files changed, 74 insertions(+), 19 deletions(-) diff --git a/health/micro-ui/web/micro-ui-internals/example/public/index.html b/health/micro-ui/web/micro-ui-internals/example/public/index.html index 43917c1ea7a..12a774aed75 100644 --- a/health/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/health/micro-ui/web/micro-ui-internals/example/public/index.html @@ -12,7 +12,7 @@ DIGIT - + diff --git a/health/micro-ui/web/micro-ui-internals/packages/css/package.json b/health/micro-ui/web/micro-ui-internals/packages/css/package.json index 109e12eada1..e48f8ffd109 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/health/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-health-css", - "version": "0.1.21", + "version": "0.1.22", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss b/health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss index d795294ddbe..f37bf8f7db8 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss +++ b/health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss @@ -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; + } +} + +.rdt_TableCol{ + border-radius: 0rem !important; + + &:last-of-type{ + border-left: none !important; + } } \ No newline at end of file diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js index eb6775956dc..1df0cbbcdba 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/PopInboxTable.js @@ -165,7 +165,7 @@ const PopInboxTable = ({ ...props }) => { onSelectedRowsChange={handleRowSelect} customStyles={tableCustomStyle} selectableRowsComponent={CheckBox} - sortIcon={} + sortIcon={} defaultSortFieldId={1} selectableRowsComponentProps={selectProps} progressPending={props?.progressPending} diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/WorkflowCommentPopUp.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/WorkflowCommentPopUp.js index b8282d28fcb..efc8855f14f 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/WorkflowCommentPopUp.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/WorkflowCommentPopUp.js @@ -139,6 +139,7 @@ const WorkflowCommentPopUp = ({ onClose, heading, submitLabel, url, requestPaylo className="campaign-type-alert-button" type="button" size="large" + style={{minWidth:"270px"}} variation="secondary" label={t(`HCM_MICROPLAN_EDIT_POPULATION_CLOSE`)} onClick={onClose} @@ -150,6 +151,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 diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js index 91cdd49e42c..9dae3067e3a 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js @@ -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(); @@ -450,6 +451,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" }, + } + if (isPlanEmpSearchLoading || isLoadingCampaignObject || isWorkflowLoading) { return ; } @@ -483,7 +491,7 @@ const PlanInbox = () => { {
{`${villagesSlected} ${t("MICROPLAN_VILLAGES_SELECTED")}`}
-
- {actionsMain - ?.filter((action) => !actionsToHide.includes(action.action)) - ?.map((action, index) => ( -
{workFlowPopUp !== "" && ( @@ -566,6 +595,7 @@ const PlanInbox = () => { conditionalRowStyles={conditionalRowStyles} paginationPerPage={rowsPerPage} paginationRowsPerPageOptions={[10, 20, 50, 100]} + sortIcon={} /> diff --git a/health/micro-ui/web/public/index.html b/health/micro-ui/web/public/index.html index a2e357448a7..a7055d2adc4 100644 --- a/health/micro-ui/web/public/index.html +++ b/health/micro-ui/web/public/index.html @@ -10,7 +10,7 @@ - + DIGIT HCM