Skip to content
Open
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
6 changes: 6 additions & 0 deletions src/components/Dashboard/Profile/common/statusMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import {
CalendarBlankIcon,
CalendarXIcon,
ChartLineIcon,
ChatsCircleIcon,
CheckCircleIcon,
HandPalmIcon,
HourglassIcon,
PhoneDisconnectIcon,
PhoneXIcon,
ProhibitInsetIcon,
QuestionIcon,
Expand Down Expand Up @@ -99,6 +101,8 @@ export const statusColorMap: Record<StatusValue, string> = {
[AgentEngagementStatusType.ACTIVE, "var(--color-green-100)"],
[AgentEngagementStatusType.INACTIVE, "var(--color-grey-50)"],
[AgentEngagementStatusType.UNRESPONSIVE, "var(--color-grey-50)"],
[AgentEngagementStatusType.INCONTACT, "var(--color-green-500)"],
[AgentEngagementStatusType.TRIED_TO_CONTACT, "var(--color-grey-200)"],
]),
...manualStatusColorMap,
};
Expand Down Expand Up @@ -147,6 +151,8 @@ export const statusIconMap: Record<StatusValue, IconComponent> = {
[AgentEngagementStatusType.ACTIVE, ChartLineIcon],
[AgentEngagementStatusType.INACTIVE, StopCircleIcon],
[AgentEngagementStatusType.UNRESPONSIVE, PhoneXIcon],
[AgentEngagementStatusType.INCONTACT, ChatsCircleIcon],
[AgentEngagementStatusType.TRIED_TO_CONTACT, PhoneDisconnectIcon],
]),
...manualStatusIconMap,
};
6 changes: 3 additions & 3 deletions src/components/Dashboard/common/statusMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const statusColorMap: Record<StatusValue, string> = {
[AgentEngagementStatusType.ACTIVE]: "var(--color-green-100)",
[AgentEngagementStatusType.UNRESPONSIVE]: "var(--color-grey-50)",
[AgentEngagementStatusType.INACTIVE]: "var(--color-grey-50)",
[AgentEngagementStatusType.NEW]: "var(--color-green-100)",
[AgentEngagementStatusType.INCONTACT]: "var(--color-green-100)",
[AgentEngagementStatusType.TRIED_TO_CONTACT]: "var(--color-green-100)",
[AgentEngagementStatusType.NEW]: "var(--color-violet-100)",
[AgentEngagementStatusType.INCONTACT]: "var(--color-green-500)",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness: statusIconMap further down in this file was left unchanged for INCONTACT/TRIED_TO_CONTACT (still SparkleIcon, same as NEW), even though this diff gives them distinct colors here, and the sibling Dashboard/Profile/common/statusMaps.ts gives them distinct icons (ChatsCircleIcon/PhoneDisconnectIcon).

Failure scenario: Any future caller of Dashboard/common/StatusBadge.tsx for engagement status will render the new colors paired with the wrong, stale icon, inconsistent with how the same statuses render on the agent profile page. Currently dormant because AgentCard.tsx only feeds volunteerSearch (not engagementStatus) into this specific StatusBadge, so it won't visibly break until that column is wired up — but the next person to consume this map has no reason to suspect the inconsistency.

[AgentEngagementStatusType.TRIED_TO_CONTACT]: "var(--color-grey-200)",
[AgentVolunteerSearchType.NOT_NEEDED]: "var(--color-grey-50)",
[AgentVolunteerSearchType.VOLUNTEERS_FOUND]: "var(--color-green-100)",
[AgentVolunteerSearchType.SEARCHING]: "var(--color-red-50)",
Expand Down
Loading