Skip to content

Commit

Permalink
Preetham_fixed the issue 2 blue square for overview permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
preethamdnr committed Feb 4, 2025
1 parent da542e4 commit a33abfa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Warnings/WarningIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ function WarningIcon(props) {
warningText,
handleModalTriggered,
numberOfWarnings,
canIssueTrackingWarnings,
} = props;

const btnColor = color ? colors[color] : 'white';

// eslint-disable-next-line no-shadow
const handleIssueWarning = id => {
if (!canIssueTrackingWarnings) {
return;
}
const today = moment().format('MM/DD/YYYY HH:mm:ss a');
const [todaysDate, todaysTime, todaysTimeOfDay] = today.split(' ');

Expand Down
12 changes: 12 additions & 0 deletions src/components/Warnings/WarningIcons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ function WarningIcons({
warningText,
handleModalTriggered,
numberOfWarnings,
handleIssueWarning,
canIssueTrackingWarnings,
canIssueBlueSquare,
canDeleteWarning,
}) {
const filledWarnings = warnings.concat(Array.from({ length: Math.max(8 - warnings.length, 0) }));

Expand All @@ -25,6 +29,10 @@ function WarningIcons({
warningText={warningText}
handleModalTriggered={handleModalTriggered}
numberOfWarnings={numberOfWarnings}
handleIssueWarning={handleIssueWarning}
canIssueTrackingWarnings={canIssueTrackingWarnings}
canIssueBlueSquare={canIssueBlueSquare}
canDeleteWarning={canDeleteWarning}
/>
);
}
Expand All @@ -36,6 +44,10 @@ function WarningIcons({
warningText={warningText}
handleModalTriggered={handleModalTriggered}
numberOfWarnings={numberOfWarnings}
handleIssueWarning={handleIssueWarning}
canIssueTrackingWarnings={canIssueTrackingWarnings}
canIssueBlueSquare={canIssueBlueSquare}
canDeleteWarning={canDeleteWarning}
/>
);
})}
Expand Down
4 changes: 4 additions & 0 deletions src/components/Warnings/WarningItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ function WarningItem({
handleWarningIconClicked={handlePostWarningDetails}
handleModalTriggered={handleModalTriggered}
numberOfWarnings={warnings.length}
handleIssueWarning={handleIssueWarning}
canIssueTrackingWarnings={canIssueTrackingWarnings}
canIssueBlueSquare={canIssueBlueSquare}
canDeleteWarning={canDeleteWarning}
/>
<p className="warning-text"> {warningText}</p>
</div>
Expand Down

0 comments on commit a33abfa

Please sign in to comment.