Skip to content

Commit ea2d8ec

Browse files
Merge pull request #2409 from OneCommunityGlobal/Carlos_NewPieChart_Hour_visualization_by_Team_Member__Project_Reports
Carlos new pie chart hour visualization by team member project reports
2 parents bfe8af1 + 309a86a commit ea2d8ec

19 files changed

Lines changed: 789 additions & 59 deletions

File tree

package-lock.json

Lines changed: 123 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"reactjs-popup": "^2.0.5",
6464
"reactstrap": "^8.4.1",
6565
"read-excel-file": "^5.5.3",
66+
"recharts": "^2.12.7",
6667
"redux": "^4.0.5",
6768
"redux-actions": "^2.6.5",
6869
"redux-concatenate-reducers": "^1.0.0",

src/actions/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,21 @@ export function postTimeEntry(timeEntryObj) {
240240
);
241241
};
242242
};
243+
244+
export function getTimeEntryByProjectSpecifiedPeriod(projectId, fromDate, toDate) {
245+
const request = httpService.get(`${APIEndpoint}/TimeEntry/projects/${projectId}/${fromDate}/${toDate}`);
246+
247+
return dispatch => {
248+
return new Promise((resolve, reject) => {
249+
request.then(({ data }) => {
250+
dispatch({
251+
type: 'GET_TIME_ENTRY_By_Project_FOR_SPECIFIED_PERIOD',
252+
payload: data,
253+
});
254+
resolve(data);
255+
}).catch(error => {
256+
reject(error);
257+
});
258+
});
259+
};
260+
};

src/components/BMDashboard/ItemList/ItemsTable.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ export default function ItemsTable({
133133
<td key={label}>{getNestedValue(el, key)}</td>
134134
))}
135135
<td className="items_cell">
136-
<button type="button" onClick={() => handleEditRecordsClick(el, 'Update')}>
136+
<button
137+
type="button"
138+
onClick={() => handleEditRecordsClick(el, 'Update')}
139+
aria-label="Edit Record"
140+
>
137141
<BiPencil />
138142
</button>
139143
<Button

src/components/BMDashboard/LogTools/LogTools.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ function LogTools() {
306306
isMulti
307307
styles={multiSelectCustomStyles}
308308
onChange={handleCodeSelect}
309+
aria-label="Select Tool Code"
309310
/>
310311
</td>
311312
</tr>

src/components/BMDashboard/ToolItemList/ToolItemsTable.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ export default function ToolItemsTable({
156156
</td>
157157
<td>{el.code}</td>
158158
<td className="items_cell">
159-
<button type="button" onClick={() => handleEditRecordsClick(el, 'Update')}>
159+
<button
160+
type="button"
161+
onClick={() => handleEditRecordsClick(el, 'Update')}
162+
aria-label="Edit Record"
163+
>
160164
<BiPencil />
161165
</button>
162166
<Button

src/components/LeaderBoard/Leaderboard.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function LeaderBoard({
225225
</thead>
226226
<tbody className="my-custome-scrollbar">
227227
<tr className={darkMode ? 'bg-yinmn-blue' : ''}>
228-
<td />
228+
<td aria-label="Placeholder" />
229229
<th scope="row" className="leaderboard-totals-container">
230230
<span>{organizationData.name}</span>
231231
{viewZeroHouraMembers(loggedInUser.role) && (
@@ -234,11 +234,11 @@ function LeaderBoard({
234234
</span>
235235
)}
236236
</th>
237-
<td className="align-middle" />
237+
<td className="align-middle" aria-label="Description" />
238238
<td className="align-middle">
239239
<span title="Tangible time">{organizationData.tangibletime || ''}</span>
240240
</td>
241-
<td className="align-middle">
241+
<td className="align-middle" aria-label="Description">
242242
<Progress
243243
title={`TangibleEffort: ${organizationData.tangibletime} hours`}
244244
value={organizationData.barprogress}
@@ -404,6 +404,7 @@ function LeaderBoard({
404404
handleTimeOffModalOpen(data);
405405
}}
406406
style={{ width: '35px', height: 'auto' }}
407+
aria-label="View Time Off Requests"
407408
>
408409
<svg
409410
xmlns="http://www.w3.org/2000/svg"
@@ -433,7 +434,7 @@ function LeaderBoard({
433434
<td className="align-middle" id={`id${item.personId}`}>
434435
<span title="Tangible time">{item.tangibletime}</span>
435436
</td>
436-
<td className="align-middle">
437+
<td className="align-middle" aria-label="Description or purpose of the cell">
437438
<Link
438439
to={`/timelog/${item.personId}`}
439440
title={`TangibleEffort: ${item.tangibletime} hours`}

src/components/Reports/PeopleReport/components/PeopleTasksPieChart.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const PeopleTasksPieChart = ({darkMode}) => {
5757
darkMode={darkMode}
5858
/>}
5959
{showViewAllTasksButton && (
60-
<div>
60+
<div>
6161
{showAllTasks && <PieChart
6262
pieChartId={'allTasksPieChart'}
6363
data={tasksWithLoggedHoursById}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
.pie-chart-title{
3+
text-align: left;
4+
margin-bottom: 24px;
5+
6+
}
7+
.pie-chart-description{
8+
display: flex;
9+
justify-content: space-around;
10+
alignItems: center;
11+
backgroundColor: white;
12+
overflow: auto;
13+
flex-direction: column;
14+
align-items: flex-start;
15+
width: 100%;
16+
17+
}

0 commit comments

Comments
 (0)