Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/web/usability test fixes #430

Merged
merged 5 commits into from
Oct 20, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ const AiDashCard: React.FC<AiDashCardProps> = ({
}) => {
return (
<Card
className="w-full max-w-sm h-auto bg-secondary text-text_col shadow-lg rounded-xl overflow-hidden transition-all duration-300 hover:shadow-xl"
className="w-full max-w-sm h-auto shadow-lg rounded-xl overflow-hidden transition-all duration-300 hover:shadow-xl"
data-testid="ai-dash-card">
<CardHeader
className="flex text-text_col justify-between items-center p-4 bg-zinc-500"
className="flex justify-between items-center p-4 bg-secondary dark:bg-zinc-500"
data-testid="card-header">
<div className="flex items-center gap-3">
<div className="text-2xl text-primary" data-testid="icon">
<div className="text-2xl text-text_col " data-testid="icon">
{icon}
</div>
<h4 className="text-lg font-semibold" data-testid="title">
Expand All @@ -43,13 +43,13 @@ const AiDashCard: React.FC<AiDashCardProps> = ({
<Button
onClick={onRemove}
size="sm"
className="bg-transparent text-3xl hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-600 dark:text-gray-300"
className="bg-transparent text-2xl hover:bg-red_salmon text-gray-600 dark:text-gray-300"
data-testid="remove-button">
×
×
</Button>
</CardHeader>
<CardBody
className="flex bg-secondary flex-col items-center justify-center py-6"
className=" background-color: hsl(var(--nextui-content1) / var(--nextui-content1-opacity, var(--tw-bg-opacity))); flex flex-col items-center justify-center py-6"
data-testid="card-body">
<h2
className="text-6xl font-bold text-text_col -mb-2"
Expand All @@ -58,7 +58,7 @@ const AiDashCard: React.FC<AiDashCardProps> = ({
</h2>
</CardBody>
<CardFooter
className="flex bg-secondary justify-center py-3"
className="flex justify-center py-3"
data-testid="card-footer">
<p
className={`text-sm font-medium flex items-center gap-1 ${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ afterEach(() => {
expect(containers[1].className).toContain("card border-2");
expect(containers[1].className).toContain("border-tertiary");
expect(containers[1].className).toContain("rounded-[20px]");
expect(containers[1].className).toContain("bg-secondary");
// expect(containers[1].className).toContain("bg-secondary");
// expect(containers[1].className).toContain("shadow-2xl");
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface GraphContainerProps {
const GraphContainer: React.FC<GraphContainerProps> = ({ width = '24.531vw', height = '13.49vw' ,mainComponent}) => {
return (
<div data-testid='graph-container' className='mb-5'>
<div style={{ width, height }} data-testid="graph-container" className={`card border-2 border-tertiary rounded-[20px] bg-secondary`} > {mainComponent}
<div style={{ width, height }} data-testid="graph-container" className={`card border-2 border-tertiary rounded-[20px] shadow-md`} > {mainComponent}
</div>
</div>
);
Expand Down
16 changes: 8 additions & 8 deletions frontend/occupi-web/src/pages/aiDashboard/AiDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,29 +135,29 @@ const AiDashboard: React.FC = () => {
{
id: "card1",
title: "Office Occupancy",
icon: <FaUsers size={24} color="white" />,
icon: <FaUsers size={24} />,
stat: workRatio ? `${(workRatio * 10).toFixed(2)}%` : "Loading...",
trend: 3.46,
},
{
id: "card2",
title: "Available Space",
icon: <FaBed size={24} color="white" />,
icon: <FaBed size={24} />,
stat: totalMaxCapacity && totalBookings
? `${totalBookings}/${totalMaxCapacity}`
: "Loading...", trend: -2.1,
},
{
id: "card3",
title: "Bookings",
icon: <FaClipboardList size={24} color="white" />,
icon: <FaClipboardList size={24} />,
stat: currentBookings !== null ? `${currentBookings}` : "Loading...",
trend: 8.7,
},
{
id: "card4",
title: "Check-ins Today",
icon: <FaCalendarCheck size={24} color="white" />,
icon: <FaCalendarCheck size={24} />,
stat: `${counter}`,
trend: 3.4,
},
Expand Down Expand Up @@ -340,21 +340,21 @@ const AiDashboard: React.FC = () => {
</div>
)
)}
<div key="graph1" className="bg-secondary rounded-lg shadow-md p-4">
<div key="graph1" className="border border-gray-200 dark:border-gray-700 rounded-lg shadow-md p-4">
<PredictedCapacityGraph />
</div>
<div key="graph2" className="bg-secondary rounded-lg shadow-md p-4">
<div key="graph2" className="border border-gray-200 dark:border-gray-700 rounded-lg shadow-md p-4">
<CapacityComparisonGraph />
</div>
<div
key="hourlyPrediction"
className="bg-secondary rounded-lg shadow-md p-4"
className="border border-gray-200 dark:border-gray-700 rounded-lg shadow-md p-4"
>
<HourlyPredictionGraph />
</div>
<div
key="hourlyCapacity"
className="bg-secondary rounded-lg shadow-md p-4"
className=" border border-gray-200 dark:border-gray-700 rounded-lg shadow-md p-4"
>
<HourlyComparisonGraph />
</div>
Expand Down
Loading