Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e9a5508
insights page creation
nishitag5 Feb 8, 2025
b8b46a0
insights page creation
nishitag5 Feb 8, 2025
453b9e8
Initial commit
Mar 16, 2024
9d7b02b
Initial commit
Mar 31, 2024
e652448
completed unit test case of the component
Apr 20, 2024
43da217
fixed the console warning in unit test case
Apr 21, 2024
9c0b5ab
ut
suaniii Feb 19, 2025
46cd2f7
fix
suaniii Feb 19, 2025
1f30379
resolving merge conflicts
nishitag5 Mar 5, 2025
787a196
Merge remote-tracking branch 'origin/development' into nishita_insigh…
nishitag5 Mar 5, 2025
e9a8a43
basic structure ready
Mar 12, 2025
33644be
Merge remote-tracking branch 'origin/development' into bhavpreet_crea…
Mar 12, 2025
ebe75d8
added buttons in summary dashboard
Mar 15, 2025
11c6584
added pointers and mergered developement changes
Mar 17, 2025
f75725a
changed map, pointer, and clickable sizes and add some feature
Mar 19, 2025
2d29d4c
map feature is complete
Mar 20, 2025
28bcc87
Merge remote-tracking branch 'origin/development' into bhavpreet_crea…
Mar 20, 2025
87d811e
Fixed the issue with the pdf generation
Chetan0606 Mar 23, 2025
559cfec
merged in new changes
Mar 24, 2025
0f424b1
Fixed the random timer icon on the dashboard
barnaboss305 Mar 27, 2025
fb9e461
fix: updated text color
Mar 28, 2025
89a8718
fix: updated for failing tests
Mar 28, 2025
0a9f7ad
fix: button width to fit table styles
Mar 28, 2025
cbf4633
adding new changes for dark mode
nishitag5 Mar 29, 2025
f5af14a
adding new changes for dark mode
nishitag5 Mar 29, 2025
9a050a0
Merge remote-tracking branch 'origin/development' into bhavpreet_crea…
Mar 29, 2025
0c69e87
Fix: Resolve bug that prevented the modal from closing when clicking …
peterson337 Apr 2, 2025
0fd72cd
changed custom carousel to bootstraps
Apr 3, 2025
701c6db
made some changes
Apr 3, 2025
6b67c0c
fixed the end date and final date issue on um
Apr 9, 2025
ab29b2d
updated the test to match the new code
Apr 9, 2025
c390c7e
add timeZone difference in user management page
Akshay-Jayaram Apr 10, 2025
af50c07
project assign to userprofile fix
Ramaruva Apr 11, 2025
def400c
Merge branch 'development' of https://github.com/OneCommunityGlobal/H…
Ramaruva Apr 11, 2025
3936cf4
uncommted test case
Ramaruva Apr 11, 2025
edf37f7
added disabled for edit&delete button for teams based on permissions
Ramaruva Apr 11, 2025
79c990b
rename, modify tests
suaniii Apr 12, 2025
ebade00
Merge pull request #3275 from OneCommunityGlobal/jaissica-create-butt…
one-community Apr 13, 2025
a183dfd
Retry deployment
barnaboss305 Apr 14, 2025
ffc8ef5
sorting buttons and title fixed
Apr 15, 2025
675e2c6
fix error in addwbs file
Apr 15, 2025
d8684af
Deleted extra model which is present in project.jsx file and correcte…
dipti95 Apr 15, 2025
8be0afc
added one more state isArchiving
dipti95 Apr 15, 2025
1fc9837
Added visual feedback in modal to show confirm button is working
dipti95 Apr 15, 2025
1f47aec
Update Project.test.jsx
dipti95 Apr 15, 2025
17d0a3d
Update Modal.jsx
dipti95 Apr 15, 2025
5db52b2
Update Modal.jsx
dipti95 Apr 15, 2025
632a106
Update Modal.jsx
dipti95 Apr 15, 2025
148033c
Update Modal.jsx
dipti95 Apr 15, 2025
b22baf8
Merge pull request #3175 from OneCommunityGlobal/yili_unit_test_repor…
one-community Apr 16, 2025
969f998
Merge pull request #3293 from OneCommunityGlobal/bhavpreet_create_cho…
one-community Apr 16, 2025
42ac941
Merge remote-tracking branch 'origin/development' into bhavpreet_caro…
Apr 16, 2025
404aa45
number and name col position fixed
Apr 16, 2025
e7f81c1
fix test fail
Apr 16, 2025
9cee99c
Merge pull request #3379 from OneCommunityGlobal/peterson-fix-the-bug…
one-community Apr 16, 2025
c91e13c
fixing the merging conflicts
Apr 16, 2025
b68f511
Merge pull request #3393 from OneCommunityGlobal/Akshay-Add-timeZone-…
one-community Apr 16, 2025
dfb7643
Merge pull request #3387 from OneCommunityGlobal/bhavpreet_endDate_on_UM
one-community Apr 16, 2025
d516366
Merge pull request #3363 from OneCommunityGlobal/bhavpreet_carousel_fix
one-community Apr 16, 2025
fcaa55e
Merge pull request #3415 from OneCommunityGlobal/guirong_add_title_so…
one-community Apr 17, 2025
533a24d
Merge pull request #3306 from OneCommunityGlobal/Chetan-fix-badges-re…
one-community Apr 17, 2025
a8eb2a0
Merge pull request #3417 from OneCommunityGlobal/Dipti__Fix_inability…
one-community Apr 17, 2025
5bdbdd1
Merge pull request #3133 from OneCommunityGlobal/nishita_insights_for…
one-community Apr 18, 2025
3c7b394
Reports->people page UI table fix and pie chart shown
CodewithKoushica Apr 18, 2025
72dbe12
Weekly Summary UI fix and functionality fix of WeekLy Summary Due Dat…
CodewithKoushica Apr 18, 2025
0bc21b5
Left alignment of the contents in the leaderboard data
CodewithKoushica Apr 18, 2025
91bc76d
Merge pull request #3422 from OneCommunityGlobal/Koushica_hotfix_UI_c…
one-community Apr 18, 2025
e058026
Merge pull request #3327 from OneCommunityGlobal/Barnaboss-remove-tim…
one-community Apr 19, 2025
57ee7db
Merge pull request #3397 from OneCommunityGlobal/Ramakrishna_Fix_user…
one-community Apr 19, 2025
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
Binary file added src/assets/images/masterMap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pin-point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/routeMarker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,89 @@
.weekly-project-summary-dashboard-grid {
grid-template-columns: 1fr;
}
}
}

/* ---------------- STATUS CARD ---------------- */
.status-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 25px;
width: 100%;
max-width: 284px;
height: 190px;
text-align: center;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
padding: 20px;
border: 1px solid rgba(0, 0, 0, 0.1);
position: relative;
}

/* ---------------- RESPONSIVE GRID LAYOUT ---------------- */
.project-status-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 20px;
justify-content: center;
align-items: center;
width: 100%;
max-width: 1600px;
margin: auto;
}

/* ---------------- OVAL STATUS BUTTON ---------------- */
.weekly-status-button {
width: 130px;
height: 65px;
border-radius: 50px / 32px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
margin: 12px 0;
}

.weekly-card-title {
color: #000;
font-size: 24px;
font-weight: 600;
}

.weekly-status-value {
color: #000;
font-size: 40px;
font-weight: 600;
}


/* ---------------- RESPONSIVE BREAKPOINTS ---------------- */
@media (min-width: 1600px) {
.project-status-grid {
grid-template-columns: repeat(6, 1fr);
}
}

@media (max-width: 1400px) {
.project-status-grid {
grid-template-columns: repeat(4, 1fr);
}
}

@media (max-width: 1024px) {
.project-status-grid {
grid-template-columns: repeat(3, 1fr);
}
}

@media (max-width: 768px) {
.project-status-grid {
grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 576px) {
.project-status-grid {
grid-template-columns: repeat(1, 1fr);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,105 @@ import { useSelector } from 'react-redux';
import { v4 as uuidv4 } from 'uuid';
import WeeklyProjectSummaryHeader from './WeeklyProjectSummaryHeader';

const projectStatusButtons = [
{
title: 'Total Projects',
value: 426,
change: '+16% week over week',
bgColor: '#F0FFEE',
buttonColor: '#BAF0B6',
textColor: '#328D1B',
},
{
title: 'Completed Projects',
value: 127,
change: '+14% week over week',
bgColor: '#F3FCFF',
buttonColor: '#C1EFFB',
textColor: '#328D1B',
},
{
title: 'Delayed Projects',
value: 34,
change: '-18% week over week',
bgColor: '#FFE9FA',
buttonColor: '#FECFF3',
textColor: '#C82F2F',
},
{
title: 'Active Projects',
value: 265,
change: '+3% week over week',
bgColor: '#E8E8FF',
buttonColor: '#CBCBFE',
textColor: '#328D1B',
},
{
title: 'Avg Project Duration',
value: '17 hrs',
change: '+13% week over week',
bgColor: '#FFF6EE',
buttonColor: '#FFD8A5',
textColor: '#FFD8A5',
},
{
title: 'Total Material Cost',
value: '$27.6K',
change: '+9% week over week',
bgColor: '#FFF3F3',
buttonColor: '#FBC1C2',
textColor: '#328D1B',
},
{
title: 'Total Material Used',
value: '2714',
change: '+11% week over week',
bgColor: '#DAC8FF',
buttonColor: '#B28ECC',
textColor: '#328D1B',
},
{
title: 'Active Projects',
value: '265',
change: '+3% week over week',
bgColor: '#E8E8FF',
buttonColor: '#CBCBFE',
textColor: '#328D1B',
},
{
title: 'Total Labor Hours Invested',
value: '12.8K',
change: '+17% week over week',
bgColor: '#E5C1FC',
buttonColor: '#F6E1FB',
textColor: '#328D1B',
},
{
title: 'Total Labor Cost',
value: '$18.4K',
change: '+14% week over week',
bgColor: '#FFFDF3',
buttonColor: '#FBF9C1',
textColor: '#328D1B',
},
{
title: 'Material Available',
value: 693,
change: '-8% week over week',
bgColor: '#B4D9C5',
buttonColor: '#31BD41',
textColor: '#C82F2F',
},
{
title: 'Material Wasted',
value: 879,
change: '+14% week over week',
bgColor: '#EFBABB',
buttonColor: '#F79395',
textColor: '#328D1B',
},
];

export default function WeeklyProjectSummary() {
const [openSections, setOpenSections] = useState({});

Expand All @@ -23,11 +122,27 @@ export default function WeeklyProjectSummary() {
className: 'full',
content: (
<div className="project-status-grid">
{Array.from({ length: 12 }).map(() => {
{projectStatusButtons.map(button => {
const uniqueId = uuidv4();
return (
<div key={uniqueId} className="weekly-project-summary-card small-card">
📊 Card
<div
key={uniqueId}
className="weekly-project-summary-card status-card"
style={{ backgroundColor: button.bgColor }} // Dynamic Background
>
<div className="weekly-card-title">{button.title}</div>
<div
className="weekly-status-button"
style={{ backgroundColor: button.buttonColor }} // Dynamic Oval Color
>
<span className="weekly-status-value">{button.value}</span>
</div>
<div
className="weekly-status-change"
style={{ color: button.textColor }} // Dynamic Change Color
>
{button.change}
</div>
</div>
);
})}
Expand Down
7 changes: 1 addition & 6 deletions src/components/Badge/AssignBadge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,7 @@ function AssignBadge(props) {
>
Assign Badge
</Button>
<Modal
isOpen={isOpen}
toggle={toggle}
backdrop="static"
className={darkMode ? 'text-light dark-mode' : ''}
>
<Modal isOpen={isOpen} toggle={toggle} className={darkMode ? 'text-light dark-mode' : ''}>
<ModalHeader className={darkMode ? 'bg-space-cadet' : ''} toggle={toggle}>
Assign Badge
</ModalHeader>
Expand Down
108 changes: 61 additions & 47 deletions src/components/Badge/BadgeReport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,54 +84,68 @@ function BadgeReport(props) {
};
}

const FormatReportForPdf = (badges, callback) => {
const bgReport = [];
bgReport[0] = `<h3>Badge Report (Page 1 of ${Math.ceil(badges.length / 4)})</h3>
<div style="margin-bottom: 20px; color: orange;"><h4>For ${props.firstName} ${
props.lastName
}</h4></div>
<div style="color:#DEE2E6; margin:10px 0px 20px 0px; text-align:center;">_______________________________________________________________________________________________</div>`;

for (let i = 0; i < badges.length; i += 1) {
imageToUri(badges[i].badge.imageUrl, function(uri) {
bgReport[i + 1] = `
<table>
<thead>
<tr>
<th>Badge Image</th>
<th>Badge Name, Count Awarded & Badge Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:160px">
<div><img height="150" width="150" src=${uri}/></div>
</td>
<td style="width:500px">
<div><b>Name:</b> <span class="name">${badges[i].badge.badgeName}</span></div>
<div><b>Count:</b> ${badges[i].count}</div>
<div><b>Description:</b> ${badges[i].badge.description}</div>
</td>
</tr>
</tbody>
</table>
${
(i + 1) % 4 === 0 && i + 1 !== badges.length
? `</br></br></br>
<h3>Badge Report (Page ${1 + Math.ceil((i + 1) / 4)} of ${Math.ceil(badges.length / 4)})</h3>
<div style="margin-bottom: 20px; color: orange;"><h4>For ${props.firstName} ${
props.lastName
}</h4></div>
<div style="color:#DEE2E6; margin:10px 0px 20px 0px; text-align:center;">_______________________________________________________________________________________________</div>
`
: ''
}`;
if (i === badges.length - 1) {
setTimeout(() => {
callback(bgReport.join('\n'));
}, 100);
}
const FormatReportForPdf = async (badges, callback) => {
try {
const bgReport = [];
bgReport[0] = `<h3>Badge Report (Page 1 of ${Math.ceil(badges.length / 4)})</h3>
<div style="margin-bottom: 20px; color: orange;"><h4>For ${props.firstName} ${
props.lastName
}</h4></div>
<div style="color:#DEE2E6; margin:10px 0px 20px 0px; text-align:center;">_______________________________________________________________________________________________</div>`;

const badgePromises = badges.map((badge, i) => {
const imageUrl = badge.badge?.imageUrl || ''; // Fallback to empty string if imageUrl is missing
const badgeName = badge.badge?.badgeName || 'Unknown Badge'; // Fallback for missing badgeName
const description = badge.badge?.description || 'No description available'; // Fallback for missing description

return new Promise((resolve) => {
imageToUri(imageUrl, (uri) => {
const badgeHtml = `
<table>
<thead>
<tr>
<th>Badge Image</th>
<th>Badge Name, Count Awarded & Badge Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:160px">
<div><img height="150" width="150" src="${uri}" /></div>
</td>
<td style="width:500px">
<div><b>Name:</b> <span class="name">${badgeName}</span></div>
<div><b>Count:</b> ${badge.count}</div>
<div><b>Description:</b> ${description}</div>
</td>
</tr>
</tbody>
</table>
${
(i + 1) % 4 === 0 && i + 1 !== badges.length
? `</br></br></br>
<h3>Badge Report (Page ${1 + Math.ceil((i + 1) / 4)} of ${Math.ceil(
badges.length / 4
)})</h3>
<div style="margin-bottom: 20px; color: orange;"><h4>For ${props.firstName} ${
props.lastName
}</h4></div>
<div style="color:#DEE2E6; margin:10px 0px 20px 0px; text-align:center;">_______________________________________________________________________________________________</div>
`
: ''
}`;
resolve(badgeHtml);
});
});
});

const badgeHtmlArray = await Promise.all(badgePromises);
bgReport.push(...badgeHtmlArray);

callback(bgReport.join('\n'));
} catch (error) {
console.error('Error generating badge report:', error);
callback('<p>Error generating badge report. Please try again later.</p>');
}
};

Expand Down
Loading