Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2a79877
task: admin pages done
YottaYocta Apr 8, 2026
18cb01a
task: core pages moved to tailwind
YottaYocta Apr 8, 2026
48195ed
task: schedule formatting
YottaYocta Apr 8, 2026
d031da4
task: remove css in rider
YottaYocta Apr 8, 2026
6356258
task: complete Tailwind CSS migration - remove all CSS modules
YottaYocta Apr 8, 2026
a7724a1
Revert "task: complete Tailwind CSS migration - remove all CSS modules"
YottaYocta Apr 8, 2026
e56c08e
task: A components
YottaYocta Apr 8, 2026
32bf8ec
task: C components
YottaYocta Apr 8, 2026
c0301b9
task: formatting
YottaYocta Apr 8, 2026
21374cf
task: migrate components D-F
YottaYocta Apr 15, 2026
69cefa6
task: minor formatting
YottaYocta Apr 15, 2026
896d786
fix: button with invisible text
YottaYocta Apr 15, 2026
0890dd3
Merge branch 'master' into rwq3/style-migration
YottaYocta Apr 15, 2026
5b5e573
task: migrated up till O
YottaYocta Apr 15, 2026
99da215
task: styling
YottaYocta Apr 15, 2026
aaf150b
task: style migration mostly done
YottaYocta Apr 16, 2026
78fd5ab
task: styling
YottaYocta Apr 16, 2026
7b84791
task: remove minical
YottaYocta Apr 16, 2026
18f6e3a
task: RequestRidePlaceSearch styles migrated
YottaYocta Apr 16, 2026
fd31f93
style: landing image
YottaYocta Apr 22, 2026
169b0b1
style: export button
YottaYocta Apr 22, 2026
8ec14e1
style: user profile sizing
YottaYocta Apr 22, 2026
70ea50e
style: responsive ride button
YottaYocta Apr 22, 2026
0f8064a
style: employee card name netid spacing
YottaYocta Apr 22, 2026
3cf16b4
style: analytics page tab focus
YottaYocta Apr 22, 2026
ea61947
style: landing page responsivity
YottaYocta Apr 22, 2026
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: 1 addition & 5 deletions frontend/src/components/AddRideButton/AddRideButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { createEmptyRide } from '../../util/modelFixtures';
import { RideType } from '@carriage-web/shared/types/ride';
import { useRides } from '../../context/RidesContext';
import buttonStyles from '../../styles/button.module.css';

const AddRideButton: React.FC = () => {
const [open, setOpen] = useState(false);
Expand All @@ -21,7 +20,7 @@
setOpen(false);
};

const handleRideCreated = (newRide: RideType) => {

Check warning on line 23 in frontend/src/components/AddRideButton/AddRideButton.tsx

View workflow job for this annotation

GitHub Actions / check

'newRide' is defined but never used. Allowed unused args must match /^_/u
refreshRides();
setOpen(false);
};
Expand All @@ -29,11 +28,8 @@
return (
<>
<button
style={{
width: '8rem',
}}
onClick={handleOpenModal}
className={`${buttonStyles.buttonLarge} ${buttonStyles.button} ${buttonStyles.buttonPrimary}`}
className="w-32 h-10 flex items-center justify-center cursor-pointer rounded text-base whitespace-nowrap pl-6 pr-6 border border-[#303030] bg-black text-white transition-all duration-100 hover:bg-[#333] active:bg-[#555]"
>
+ Add ride
</button>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';

Check warning on line 1 in frontend/src/components/AnalyticsOverview/AnalyticsOverview.tsx

View workflow job for this annotation

GitHub Actions / check

'React' is defined but never used. Allowed unused vars must match /^_/u
import { TableData } from '../../types';
import StatsBox, { StatsBoxProps } from './StatsBox';
import {
Expand All @@ -7,7 +7,6 @@
nightRide,
noShow,
} from '../../icons/analytics/index';
import styles from './AnalyticsOverview.module.css';
import { useEmployees } from '../../context/EmployeesContext';

type AnalyticsOverviewProps = {
Expand Down Expand Up @@ -81,9 +80,9 @@
}, [data, drivers, type]);

return (
<div className={styles.analyticsOverview}>
<p className={styles.overviewName}>Overview [{label}]</p>
<div className={styles.statsContainer}>
<div className="inline-block w-full mb-8">
<p className="font-bold text-[1.2rem]">Overview [{label}]</p>
<div className="flex gap-6 items-center bg-white p-6 px-8 rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.1)]">
{stats.map((stat, idx) => (
<StatsBox key={idx} {...stat} />
))}
Expand Down
100 changes: 0 additions & 100 deletions frontend/src/components/AnalyticsOverview/StatsBox.module.css

This file was deleted.

77 changes: 52 additions & 25 deletions frontend/src/components/AnalyticsOverview/StatsBox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import styles from './StatsBox.module.css';

export type ColorVariant = 'green' | 'gray' | 'red' | 'default';

Expand All @@ -12,38 +11,66 @@ export interface StatsBoxProps {
variant?: ColorVariant;
}

const getVariantStyles = (variant: ColorVariant) => {
const iconBgMap: Record<ColorVariant, string> = {
green: 'bg-[rgba(34,197,94,0.1)]',
gray: 'bg-[rgba(107,114,128,0.1)]',
red: 'bg-[rgba(246,59,59,0.1)]',
default: 'bg-[rgba(0,0,0,0.04)]',
};
const statColorMap: Record<ColorVariant, string> = {
green: 'text-[#16a34a]',
gray: 'text-[#4b5563]',
red: 'text-[#eb2525]',
default: 'text-[#111827]',
};
return {
iconBg: iconBgMap[variant],
statColor: statColorMap[variant],
};
};

const StatsBox: React.FC<StatsBoxProps> = ({
icon,
alt,
stats,
description,
className = '',
variant = 'default',
}) => (
<div className={`${styles.statsbox} ${styles[variant]} ${className}`}>
<div className={styles.left}>
{icon ? (
<div className={`${styles.iconWrapper} ${styles[`icon-${variant}`]}`}>
<img
className={styles.icon}
src={icon}
alt={alt}
width={40}
height={40}
}) => {
const { iconBg, statColor } = getVariantStyles(variant);
return (
<div
className={`flex items-center p-5 px-6 min-w-45 bg-white rounded-lg transition-all duration-200 ${className}`}
>
<div className="flex items-center justify-center mr-4 shrink-0">
{icon ? (
<div
className={`rounded-full w-10 h-10 flex items-center justify-center ${iconBg} transition-all duration-200`}
>
<img
className="w-6 h-6 object-contain"
src={icon}
alt={alt}
width={40}
height={40}
/>
</div>
) : (
<div
className={`rounded-full w-10 h-10 flex items-center justify-center ${iconBg} transition-all duration-200`}
aria-hidden="true"
/>
</div>
) : (
<div
className={`${styles.iconWrapper} ${styles[`icon-${variant}`]}`}
aria-hidden="true"
/>
)}
</div>
<div className={styles.right}>
<p className={`${styles.stats} ${styles[`stats-${variant}`]}`}>{stats}</p>
<p className={styles.description}>{description}</p>
)}
</div>
<div className="flex flex-col items-center text-center w-full">
<p className={`text-2xl font-semibold m-0 leading-tight ${statColor}`}>
{stats}
</p>
<p className="text-sm text-[#6b7280] m-0 mt-1">{description}</p>
</div>
</div>
</div>
);
);
};

export default StatsBox;
28 changes: 13 additions & 15 deletions frontend/src/components/AnalyticsTable/AnalyticsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ObjectType, TableData } from '../../types';
import { useEmployees } from '../../context/EmployeesContext';
import editIcon from './edit.svg';
import checkIcon from './check.svg';
import styles from './analyticstable.module.css';
import axios from '../../util/axios';

type Cell = string | number;
Expand Down Expand Up @@ -44,14 +43,11 @@ const Row = ({ data, index, isEditing, onEdit }: RowProps) => {
};

return (
<tr
className={styles.row}
style={{ backgroundColor: index % 2 ? undefined : '#EBEAEA' }}
>
<tr style={{ backgroundColor: index % 2 ? undefined : '#EBEAEA' }}>
{data.map((d, cellIndex) => (
<td
key={cellIndex}
className={styles.cell}
className="py-4.5 px-2 text-center"
style={{ borderRadius: getBorderRadius(cellIndex, data.length) }}
>
{isEditing && cellIndex >= 2 ? ( // excluding first two columns
Expand All @@ -61,7 +57,7 @@ const Row = ({ data, index, isEditing, onEdit }: RowProps) => {
type="number"
min={0}
id={`${index}${cellIndex}`}
className={styles.input}
className="bg-[#f2f2f2] border border-black box-border rounded-[10px] text-center w-14 text-base"
defaultValue={d}
onInput={(e) => handleEdit(e, cellIndex)}
/>
Expand Down Expand Up @@ -204,9 +200,9 @@ const Table = ({ type, data, refreshTable }: TableProps) => {
}, [data, driverNames, drivers, type]);

return (
<div className={styles.analyticsTable}>
<div className="relative p-7.5 shadow-[2px_4px_15px_rgba(0,0,0,0.1)]">
<button
className={styles.editBtn}
className="absolute top-5 right-8.5 border-none bg-none p-0"
aria-label={!isEditing ? 'Edit' : 'Submit'}
onClick={!isEditing ? () => setIsEditing(true) : handleSubmit}
>
Expand All @@ -216,10 +212,10 @@ const Table = ({ type, data, refreshTable }: TableProps) => {
<img src={checkIcon} alt="checkmark" />
)}
</button>
<div className={styles.tableContainer}>
<table className={styles.table}>
<div className="overflow-auto whitespace-nowrap">
<table className="w-full border-collapse">
<thead>
<tr className={styles.row}>
<tr>
{type === 'ride'
? rideTableHeader.map((title, idx) => {
let color;
Expand All @@ -232,8 +228,8 @@ const Table = ({ type, data, refreshTable }: TableProps) => {
return (
<th
key={idx}
className={cn(styles.cell, {
[styles.sticky]: idx < 2,
className={cn('py-4.5 px-2 text-center', {
'sticky left-0': idx < 2,
})}
style={{ color }}
>
Expand All @@ -244,7 +240,9 @@ const Table = ({ type, data, refreshTable }: TableProps) => {
: driverTableHeader.map((title, idx) => (
<th
key={idx}
className={cn(styles.cell, { [styles.sticky]: idx < 2 })}
className={cn('py-4.5 px-2 text-center', {
'sticky left-0': idx < 2,
})}
>
{title}
</th>
Expand Down
Loading
Loading