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

[#1049] approver tree info icon added and title changed #1053

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 2 additions & 13 deletions frontend/src/lib/__test__/__snapshots__/ui-text.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,7 @@ Object {
"approvalsTab3": "Approved",
"approvalsTitle": "Approvals",
"approversDescription": <React.Fragment>
This is where you manage data validation for each Questionnaire. You can:
<ul>
<li>
Add data validator
</li>
<li>
Modify data validator
</li>
<li>
Delete data validator
</li>
</ul>
This is where you can see the approvers for each submitted form across different administrative areas:
</React.Fragment>,
"attrConfirmDelete": "Are you sure you want to delete this attribute?",
"attrErrDeleteTitle": "Unable to delete the attribute",
Expand Down Expand Up @@ -330,7 +319,7 @@ Object {
</ul>
</React.Fragment>,
"manageDataTitle": "Manage Data",
"manageDataValidationSetup": "Manage Data Validation Setup",
"manageDataValidationSetup": "Validation Tree",
"manageEntities": "Manage Entities",
"manageEntitiesText": <React.Fragment>
This is where you manage entitys based on their fields. You can :
Expand Down
11 changes: 3 additions & 8 deletions frontend/src/lib/ui-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const uiText = {
// Charts
showEmpty: "Show empty values",
// User Management
manageDataValidationSetup: "Manage Data Validation Setup",
manageDataValidationSetup: "Validation Tree",
manageUsers: "Manage Users",
addUser: "Add User",
addNewUser: "Add new user",
Expand Down Expand Up @@ -309,13 +309,8 @@ const uiText = {
questionnaireText: "Questionnaire",
approversDescription: (
<Fragment>
This is where you manage data validation for each Questionnaire. You
can:
<ul>
<li>Add data validator</li>
<li>Modify data validator</li>
<li>Delete data validator</li>
</ul>
This is where you can see the approvers for each submitted form across
different administrative areas:
</Fragment>
),
// Misc
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/pages/approvers-tree/ApproversTree.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { useState, useEffect, useMemo } from "react";
import "./style.scss";
import { Row, Col, Divider, Space } from "antd";
import { Row, Col, Divider, Space, Popover } from "antd";
import { Breadcrumbs, DescriptionPanel } from "../../components";
import { api, store, uiText } from "../../lib";
import ApproverFilters from "../../components/filters/ApproverFilters";
import { SteppedLineTo } from "react-lineto";
import { take, takeRight } from "lodash";
import { useNotification } from "../../util/hooks";
import { InfoCircleOutlined } from "@ant-design/icons";

const ApproversTree = () => {
const {
Expand Down Expand Up @@ -218,6 +219,13 @@ const ApproversTree = () => {
}
}}
>
{approver && (
<div className="info-icon">
<Popover title={`Email: ${approver?.email}`}>
<InfoCircleOutlined />
</Popover>
</div>
)}
<Space direction="vertical">
<div>{childItem.name}</div>
<h3 className={approver ? "" : "not-assigned"}>
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/pages/approvers-tree/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
h3 {
color: #fff;
}
.info-icon {
position: absolute;
right: 10px;
}
}
}
}
Expand Down