Skip to content

Commit 7bef733

Browse files
Resolved the version conflicts in package-lock.json
2 parents e343eb7 + 68423b2 commit 7bef733

18 files changed

Lines changed: 2785 additions & 1992 deletions

File tree

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ module.exports = [
3333
'src/components/Reports/PeopleReport/components/PeopleTasksPieChart.test.jsx',
3434
// Ignore entire component folders
3535
'src/components/Badge/**',
36-
'src/components/Dashboard/**',
3736
'src/components/Projects/**',
3837
'src/components/SummaryManagement/**',
3938
'src/components/TeamMemberTasks/**',

package-lock.json

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

src/actions/bmdashboard/toolActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import axios from 'axios';
2-
import GET_TOOL_BY_ID, { GET_TOOLS, GET_TOOL_AVAILABILITY } from '../../constants/bmdashboard/toolsConstants';
2+
import { GET_TOOL_BY_ID, GET_TOOLS, GET_TOOL_AVAILABILITY } from '../../constants/bmdashboard/toolsConstants';
33
import { GET_ERRORS } from '../../constants/errors';
44
import { ENDPOINTS } from '~/utils/URL';
55

src/actions/promotionActions.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import axios from 'axios';
2+
import { ENDPOINTS } from '../utils/URL';
3+
4+
export const getPromotionEligibility = async () => {
5+
const res = await axios.get(ENDPOINTS.PROMOTION_ELIGIBILITY);
6+
return res.data;
7+
};
8+
9+
export const postPromotionEligibility = async (memberIds, requestor) => {
10+
const res = await axios.post(ENDPOINTS.PROMOTE_MEMBERS, {
11+
memberIds,
12+
requestor,
13+
});
14+
return res.data;
15+
};

src/components/BMDashboard/WeeklyProjectSummary/ActualVsPlannedCost/ActualVsPlannedCost.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from 'recharts';
1515
import { fetchBMProjects } from '../../../../actions/bmdashboard/projectActions';
1616
import { ENDPOINTS } from '../../../../utils/URL';
17-
import './ActualVsPlannedCost.css';
17+
import styles from './ActualVsPlannedCost.module.css';
1818

1919
function ActualVsPlannedCost() {
2020
const dispatch = useDispatch();
@@ -130,19 +130,19 @@ function ActualVsPlannedCost() {
130130
</BarChart>
131131
</ResponsiveContainer>
132132
</div>
133-
<div className="ActualVsPlannedCost-chart-caption">{selectedProjectName}</div>
133+
<div className={styles.chartCaption}>{selectedProjectName}</div>
134134
</>
135135
);
136136
}
137137

138138
return (
139139
<div style={{ padding: 10 }}>
140-
<h2 style={{ fontSize: 'large', marginBottom: '3px' }} className="ActualVsPlannedCost-title">
140+
<h2 style={{ fontSize: 'large', marginBottom: '3px' }} className={styles.title}>
141141
Actual vs Planned Costs
142142
</h2>
143143

144-
<div className={`ActualVsPlannedCost-selectors-container ${darkMode ? 'dark-mode' : ''}`}>
145-
<div className="ActualVsPlannedCost-selector-group">
144+
<div className={`${styles.selectorsContainer} ${darkMode ? 'dark-mode' : ''}`}>
145+
<div className={styles.selectorGroup}>
146146
<label htmlFor="ActualVsPlannedCost-project-select">Project:</label>
147147
<select
148148
id="ActualVsPlannedCost-project-select"
@@ -162,7 +162,7 @@ function ActualVsPlannedCost() {
162162
</select>
163163
</div>
164164

165-
<div className="ActualVsPlannedCost-selector-group">
165+
<div className={styles.selectorGroup}>
166166
<label htmlFor="ActualVsPlannedCost-category-select">Category:</label>
167167
<select
168168
id="ActualVsPlannedCost-category-select"

src/components/BMDashboard/WeeklyProjectSummary/ActualVsPlannedCost/ActualVsPlannedCost.css renamed to src/components/BMDashboard/WeeklyProjectSummary/ActualVsPlannedCost/ActualVsPlannedCost.module.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
/* === selectors layout === */
2-
.ActualVsPlannedCost-selectors-container {
2+
.selectorsContainer {
33
display: flex;
44
gap: 1rem;
55
flex-wrap: wrap;
66
margin-bottom: 3px;
77
}
88

9-
.ActualVsPlannedCost-title {
9+
.title {
1010
color: var(--text-color);
1111
}
1212

13-
.ActualVsPlannedCost-selector-group {
13+
.selectorGroup {
1414
flex: 1;
1515
display: flex;
1616
flex-direction: column;
1717
}
1818

19-
.ActualVsPlannedCost-selector-group label {
19+
.selectorGroup label {
2020
font-size: small;
2121
margin-bottom: 3px;
2222
color: var(--text-color);
2323
}
2424

25-
.ActualVsPlannedCost-selector-group select {
25+
.selectorGroup select {
2626
font-size: small;
2727
width: 100%;
2828
max-height: 200px;
@@ -35,20 +35,20 @@
3535
box-sizing: border-box;
3636
}
3737

38-
.ActualVsPlannedCost-chart-caption {
38+
.chartCaption {
3939
text-align: center;
4040
font-size: medium;
4141
margin-top: 4px;
4242
color: var(--text-color);
4343
}
4444

4545
@media (max-width: 768px) {
46-
.ActualVsPlannedCost-selectors-container {
46+
.selectorsContainer {
4747
flex-direction: column;
4848
gap: 0.5rem;
4949
}
5050

51-
.ActualVsPlannedCost-selector-group {
51+
.selectorGroup {
5252
width: 100%;
5353
}
5454
}

src/components/Dashboard/Dashboard.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import React, { useState, useEffect } from 'react';
22
import { Row, Col, Container } from 'reactstrap';
3-
import { connect, useSelector } from 'react-redux';
3+
import { connect, useSelector, useDispatch } from 'react-redux';
44
import { cantUpdateDevAdminDetails } from '~/utils/permissions';
55
import {
66
DEV_ADMIN_ACCOUNT_EMAIL_DEV_ENV_ONLY,
77
DEV_ADMIN_ACCOUNT_CUSTOM_WARNING_MESSAGE_DEV_ENV_ONLY,
88
PROTECTED_ACCOUNT_MODIFICATION_WARNING_MESSAGE,
99
} from '~/utils/constants';
10-
import { useDispatch } from 'react-redux';
1110
import { updateSummaryBarData } from '~/actions/dashboardActions';
1211
import Leaderboard from '../LeaderBoard';
1312
import WeeklySummary from '../WeeklySummary/WeeklySummary';
@@ -18,6 +17,7 @@ import styles from './Dashboard.module.css';
1817
import '../../App.css';
1918
import TimeOffRequestDetailModal from './TimeOffRequestDetailModal';
2019
import FeedbackModal from '../FeedbackModal/FeedbackModal';
20+
import { toast } from 'react-toastify';
2121

2222
export function Dashboard(props) {
2323
const [popup, setPopup] = useState(false);
@@ -40,7 +40,7 @@ export function Dashboard(props) {
4040
viewingUser?.email === DEV_ADMIN_ACCOUNT_EMAIL_DEV_ENV_ONLY
4141
? DEV_ADMIN_ACCOUNT_CUSTOM_WARNING_MESSAGE_DEV_ENV_ONLY
4242
: PROTECTED_ACCOUNT_MODIFICATION_WARNING_MESSAGE;
43-
alert(warningMessage);
43+
toast.warn(warningMessage);
4444
return;
4545
}
4646

@@ -68,7 +68,6 @@ export function Dashboard(props) {
6868
}, []);
6969

7070
useEffect(() => {
71-
console.log(summaryBarData);
7271
dispatch(updateSummaryBarData({ summaryBarData }));
7372
}, [summaryBarData]);
7473

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
.page-wrapper {
2+
min-height: 100vh;
3+
background-color: inherit;
4+
}
5+
6+
.promo-table-container {
7+
max-width: 70vw;
8+
background-color: rgb(241, 241, 241);
9+
margin: 0 auto;
10+
padding: 1rem;
11+
border-radius: 12px;
12+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);;
13+
}
14+
15+
.promo-table-header {
16+
display: flex;
17+
justify-content: space-between;
18+
align-items: center;
19+
font-size: 2.5rem;
20+
padding: 0.75rem 1rem;
21+
font-weight: 500;
22+
margin-bottom: 10pt;
23+
}
24+
25+
.review-btn,
26+
.process-promo-btn {
27+
background-color: #2563eb;
28+
color: white;
29+
border: none;
30+
padding: 0.5rem 1rem;
31+
margin-left: 0.5rem;
32+
border-radius: 8px;
33+
cursor: pointer;
34+
font-size: 1.25rem;
35+
}
36+
37+
.review-btn:hover,
38+
.process-promo-btn:hover {
39+
background-color: #1d4ed8;
40+
}
41+
42+
.promo-table {
43+
width: 100%;
44+
border-collapse: collapse;
45+
background-color: #fff;
46+
font-size: 0.95rem;
47+
}
48+
49+
.promo-table th,
50+
.promo-table td {
51+
padding: 0.5rem;
52+
text-align: center;
53+
border: none;
54+
}
55+
56+
.promo-table th {
57+
background-color: rgb(224, 237, 250);
58+
font-weight: 400;
59+
}
60+
61+
.section-row td {
62+
text-align: left;
63+
font-weight: bold;
64+
padding-top: 0.75rem;
65+
background-color:antiquewhite;
66+
}
67+
68+
.custom-circular-checkbox-wrapper {
69+
display: flex;
70+
justify-content: center;
71+
align-items: center;
72+
height: 100%;
73+
}
74+
75+
.custom-circular-checkbox {
76+
width: 20px;
77+
height: 20px;
78+
border-radius: 50%;
79+
border: 2px solid black;
80+
background-color: white;
81+
display: flex;
82+
align-items: center;
83+
justify-content: center;
84+
pointer-events: none;
85+
transition: background-color 0.2s ease;
86+
}
87+
88+
.custom-circular-checkbox.checked {
89+
background-color: black;
90+
}
91+
92+
.check-icon {
93+
color: white;
94+
font-size: 12px;
95+
}
96+
97+
/* dark mode */
98+
.page-wrapper.dark {
99+
background-color: #121212;
100+
}
101+
102+
.promo-table-container.dark .promo-table tr:hover {
103+
background-color: #555555;
104+
}
105+
106+
.promo-table-container.dark {
107+
background-color: #1f1f1f;
108+
color: #f5f5f5;
109+
box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
110+
}
111+
112+
.promo-table-container.dark .promo-table {
113+
background-color: #2a2a2a;
114+
}
115+
116+
.promo-table-container.dark .promo-table th {
117+
background-color: #3b3b3b;
118+
color: #ddd;
119+
}
120+
121+
.promo-table-container.dark .promo-table td {
122+
color: #eaeaea;
123+
}
124+
125+
.promo-table-container.dark .section-row td {
126+
background-color: #333;
127+
color: #f0f0f0;
128+
}
129+
130+
.promo-table-container.dark .review-btn,
131+
.promo-table-container.dark .process-promo-btn {
132+
background-color: #3b82f6;
133+
color: white;
134+
}
135+
136+
.promo-table-container.dark .review-btn:hover,
137+
.promo-table-container.dark .process-promo-btn:hover {
138+
background-color: #2563eb;
139+
}
140+
141+
.promo-table-container.dark .custom-circular-checkbox {
142+
border: 2px solid #ccc;
143+
background-color: #1a1a1a;
144+
}
145+
146+
.promo-table-container.dark .custom-circular-checkbox.checked {
147+
background-color: #00cc66;
148+
}
149+
150+
.promo-table-container.dark .check-icon {
151+
color: white;
152+
}
153+
154+
/* mobile */
155+
156+
@media screen and (max-width: 768px) {
157+
.promo-table,
158+
.promo-table thead,
159+
.promo-table tbody,
160+
.promo-table th,
161+
.promo-table td,
162+
.promo-table tr {
163+
display: block;
164+
width: 100%;
165+
}
166+
167+
.promo-table tr {
168+
margin-bottom: 1rem;
169+
background-color: #fff;
170+
border: 1px solid #d1d5db;
171+
border-radius: 8px;
172+
padding: 0.75rem;
173+
}
174+
175+
.promo-table td {
176+
text-align: left;
177+
border: none;
178+
padding: 0.5rem 0;
179+
position: relative;
180+
}
181+
182+
.promo-table td::before {
183+
content: attr(data-label);
184+
font-weight: 600;
185+
color: #374151;
186+
display: block;
187+
margin-bottom: 4px;
188+
}
189+
190+
.section-row td {
191+
font-size: 1rem;
192+
padding: 0.5rem 0;
193+
border: none;
194+
background-color: transparent;
195+
}
196+
197+
.custom-circular-checkbox-wrapper {
198+
justify-content: flex-start;
199+
}
200+
201+
.promo-table-container {
202+
max-width: 100%;
203+
padding: 1rem;
204+
}
205+
206+
/* mobile dark mode */
207+
.promo-table-container.dark .promo-table tr {
208+
background-color: #2a2a2a;
209+
border-color: #444;
210+
}
211+
212+
.promo-table-container.dark .promo-table td::before {
213+
color: #ccc;
214+
}
215+
216+
.promo-table-container.dark .promo-table td {
217+
color: #eaeaea;
218+
}
219+
220+
.promo-table-container.dark .section-row td {
221+
background-color: transparent;
222+
color: #f0f0f0;
223+
}
224+
}

0 commit comments

Comments
 (0)