diff --git a/backend/src/modules/issues/repositories/issueRepository.ts b/backend/src/modules/issues/repositories/issueRepository.ts index cf371de8..d5e5b9c3 100644 --- a/backend/src/modules/issues/repositories/issueRepository.ts +++ b/backend/src/modules/issues/repositories/issueRepository.ts @@ -129,7 +129,7 @@ export default class IssueRepository { const days = forecastData && !forecastError ? formatTime(forecastData) : "6 days"; const information = !issue.resolved_at - ? `This issue may take at least ${days} to be resolved. Please check back if your issue is not resolved by then.` + ? `This issue may take around ${days} to be resolved based on similar issues in this area.` : "This issue has already been resolved."; return { @@ -249,7 +249,7 @@ export default class IssueRepository { const days = forecastData && !forecastError ? formatTime(forecastData) : "6 days"; const information = !data.resolved_at - ? `This issue may take at least ${days} to be resolved. Please check back if your issue is not resolved by then.` + ? `This issue may take around ${days} to be resolved based on similar issues in this area.` : "This issue has already been resolved."; return { @@ -427,7 +427,7 @@ export default class IssueRepository { const days = forecastData && !forecastError ? formatTime(forecastData) : "6 days"; const information = !issue.resolved_at - ? `This issue may take at least ${days} to be resolved. Please check back if your issue is not resolved by then.` + ? `This issue may take around ${days} to be resolved based on similar issues in this area.` : "This issue has already been resolved."; return { @@ -677,7 +677,7 @@ export default class IssueRepository { const days = forecastData && !forecastError ? formatTime(forecastData) : "6 days"; const information = !issue.resolved_at - ? `This issue may take at least ${days} to be resolved. Please check back if your issue is not resolved by then.` + ? `This issue may take around ${days} to be resolved based on similar issues in this area.` : "This issue has already been resolved."; return { @@ -772,7 +772,7 @@ export default class IssueRepository { const days = forecastData && !forecastError ? formatTime(forecastData) : "6 days"; const information = !issue.resolved_at - ? `This issue may take at least ${days} to be resolved. Please check back if your issue is not resolved by then.` + ? `This issue may take around ${days} to be resolved based on similar issues in this area.` : "This issue has already been resolved."; return { diff --git a/frontend/__tests__/pages/home/Analytics.test.tsx b/frontend/__tests__/pages/home/Analytics.test.tsx index 577615a2..21573d7c 100644 --- a/frontend/__tests__/pages/home/Analytics.test.tsx +++ b/frontend/__tests__/pages/home/Analytics.test.tsx @@ -7,7 +7,7 @@ jest.mock('@/components/ReportCharts/Reports', () => () =>
Reports Componen describe('Tabs Component', () => { test('renders Reports tab by default', () => { render(); - expect(screen.getByText('Reports')).toBeInTheDocument(); + expect(screen.getByText('Statistics')).toBeInTheDocument(); expect(screen.getByText('Reports Component')).toBeInTheDocument(); }); @@ -20,7 +20,7 @@ describe('Tabs Component', () => { test('highlights the active tab correctly', () => { render(); - const reportsTab = screen.getByText('Reports'); + const reportsTab = screen.getByText('Statistics'); const visualizationsTab = screen.getByText('Visualizations'); fireEvent.click(reportsTab); diff --git a/frontend/app/(home)/analytics/page.tsx b/frontend/app/(home)/analytics/page.tsx index 828a49b0..b0d914df 100644 --- a/frontend/app/(home)/analytics/page.tsx +++ b/frontend/app/(home)/analytics/page.tsx @@ -29,7 +29,7 @@ function Tabs() { onClick={() => handleTabClick('Reports')} aria-current={activeTab === 'Reports' ? 'page' : undefined} > - Reports + Statistics
  • diff --git a/frontend/components/Issue/Issue.tsx b/frontend/components/Issue/Issue.tsx index ff17c737..605b3154 100644 --- a/frontend/components/Issue/Issue.tsx +++ b/frontend/components/Issue/Issue.tsx @@ -1,4 +1,5 @@ import React, { useState, useRef, useEffect } from "react"; +import { useTheme } from 'next-themes'; import { Card, CardContent, @@ -38,6 +39,7 @@ const Issue: React.FC = ({ }) => { const { user } = useUser(); const router = useRouter(); + const { theme } = useTheme(); const [type, setType] = useState(""); const queryClient = useQueryClient(); const [showSubscribeDropdown, setShowSubscribeDropdown] = useState(false); @@ -285,6 +287,10 @@ const Issue: React.FC = ({ return text.replace(/@(\w+)/g, '@$1'); }; + const dropdownClasses = `origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg ring-1 ring-opacity-5 focus:outline-none ${ + theme === "dark" ? "bg-[#262626] text-white ring-gray-700" : "bg-white text-gray-700 ring-black" + }`; + return ( <> @@ -341,7 +347,7 @@ const Issue: React.FC = ({ {showSubscribeDropdown && (
    = ({
    diff --git a/frontend/components/ResolutionModal/ResolutionModal.tsx b/frontend/components/ResolutionModal/ResolutionModal.tsx index afca784a..ccc63132 100644 --- a/frontend/components/ResolutionModal/ResolutionModal.tsx +++ b/frontend/components/ResolutionModal/ResolutionModal.tsx @@ -46,24 +46,32 @@ interface OrganizationToggleProps { onToggle: (id: string) => void; } -const OrganizationToggle: React.FC = ({ organization, isSelected, onToggle }) => ( - onToggle(organization.id)} - className={cn( - "flex flex-col items-center justify-center p-2 rounded-md", - "w-24 h-24 border-2", - isSelected ? "border-primary bg-primary/10" : "border-gray-200 hover:bg-gray-100", - "transition-all duration-200 ease-in-out" - )} - > - - - {organization.name.charAt(0)} - - {organization.name} - -); +const OrganizationToggle: React.FC = ({ organization, isSelected, onToggle }) => { + const { theme } = useTheme(); + + return ( + onToggle(organization.id)} + className={cn( + "flex flex-col items-center justify-center p-2 rounded-md", + "w-24 h-24 border-2", + isSelected ? "border-primary bg-primary/10" : "border-gray-200", + theme === 'dark' + ? "hover:bg-[#0C0A09] hover:text-white" + : "hover:bg-gray-100", + "transition-all duration-200 ease-in-out" + )} + > + + + {organization.name.charAt(0)} + + {organization.name} + + ); +}; + const ResolutionModal: React.FC = ({ isOpen, @@ -264,31 +272,47 @@ const ResolutionModal: React.FC = ({
    {isSearchOpen && searchResults.length > 0 && ( -
    - {searchResults.map((item) => ( -
    { - setResolvedBy(item.name); - setResolverID(item.id); - setSearchQuery(item.name); - setIsSearchOpen(false); - }} - > - - {item.name} - - - @{item.username} - - - {item.type} - -
    - ))} -
    - )} +
    + {searchResults.map((item) => ( +
    { + setResolvedBy(item.name); + setResolverID(item.id); + setSearchQuery(item.name); + setIsSearchOpen(false); + }} + > + + {item.name} + + + @{item.username} + + + {item.type} + +
    + ))} +
    +)}
  • )} @@ -343,10 +367,12 @@ const ResolutionModal: React.FC = ({ className={cn( "px-4 py-2 rounded-lg", theme === "dark" - ? "bg-gray-700 text-white hover:bg-gray-600" + ? "bg-[#0C0A09] text-white hover:bg-[#262626]" : "bg-gray-200 text-gray-800 hover:bg-gray-300" )} > + + Upload Image diff --git a/frontend/components/ui/resolution-popover.tsx b/frontend/components/ui/resolution-popover.tsx index 508c961c..cf60cf34 100644 --- a/frontend/components/ui/resolution-popover.tsx +++ b/frontend/components/ui/resolution-popover.tsx @@ -23,7 +23,7 @@ export default function InfoPopover({ message }: PopoverProps) {

    Resolution Information

    -

    {message ?? 'This issue may take at least 6 day(s) to be resolved. Please check back if your issue is not resolved by then.'}

    +

    {message ?? 'This issue may take around 6 day(s) to be resolved based on similar issues in this area.'}

    {/*
    */}