Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
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
6 changes: 3 additions & 3 deletions src/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ export default function AdminDashboard() {
</div>

{error && (
<div className="mb-6 p-4 bg-red-50 dark:bg-red-900/20 rounded-lg border border-red-200 dark:border-red-800">
<p className="text-sm text-red-600 dark:text-red-400">{error}</p>
<div className="mb-6 theme-alert-danger">
<p className="text-sm">{error}</p>
</div>
)}

{success && (
<div className="mb-6 p-4 bg-green-50 dark:bg-green-900/20 rounded-lg border border-green-200 dark:border-green-800">
<div className="mb-6 theme-alert-success">
<p className="text-sm text-green-600 dark:text-green-400">
{success}
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/app/auth/forgot-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import ThemeToggle from '../../components/ThemeToggle'

const Icon = ({ d, size = 10 }: { d: string; size?: number }) => ( <svg className={`w-${size} h-${size} text-white`} fill="none" stroke="currentColor" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={d} /></svg>);
const BoltIcon = ({size = 10}) => <Icon d="M13 10V3L4 14h7v7l9-11h-7z" size={size} />;

Check warning on line 10 in src/app/auth/forgot-password/page.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'BoltIcon' is assigned a value but never used

// --- Forgot Password Page Component ---
export default function ForgotPasswordPage() {
Expand Down Expand Up @@ -46,7 +46,7 @@
<header className="sticky-header shadow-lg border-b theme-border">
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center">
<Link href="/" className="flex items-center space-x-3 group"><div className="w-12 h-12 rounded-full bg-gradient-to-r from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110"><BoltIcon size={6} /></div><h1 className="text-2xl font-bold theme-text-primary hidden sm:block">TechTorque Auto</h1></Link>
<Link href="/" className="flex items-center space-x-3 group"><div className="automotive-accent w-12 h-12 rounded-full flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110"><span className="text-white font-bold text-lg">TT</span></div><h1 className="text-2xl font-bold theme-text-primary hidden sm:block">TechTorque</h1></Link>
<div className="flex items-center space-x-4"><Link href="/auth/login" className="theme-link hidden md:inline-block">Back to Sign In</Link><ThemeToggle /></div>
</div>
</div>
Expand Down Expand Up @@ -74,7 +74,7 @@
</div>
{error && (
<div className="mb-6 p-4 bg-red-50 dark:bg-red-900/20 rounded-lg border border-red-200 dark:border-red-800">
<p className="text-sm text-red-600 dark:text-red-400">{error}</p>
<p className="text-sm theme-text-danger">{error}</p>
</div>
)}
<form className="space-y-6" onSubmit={handleSubmit}>
Expand Down
8 changes: 4 additions & 4 deletions src/app/auth/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={d} />
</svg>
);
const BoltIcon = ({size = 10}) => <Icon d="M13 10V3L4 14h7v7l9-11h-7z" size={size} />;

Check warning on line 17 in src/app/auth/login/page.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'BoltIcon' is assigned a value but never used
const LockClosedIcon = () => <svg className="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>;


Expand Down Expand Up @@ -74,11 +74,11 @@
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center">
<Link href="/" className="flex items-center space-x-3 group">
<div className="w-12 h-12 rounded-full bg-gradient-to-r from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<BoltIcon size={6} />
<div className="automotive-accent w-12 h-12 rounded-full flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<span className="text-white font-bold text-lg">TT</span>
</div>
<h1 className="text-2xl font-bold theme-text-primary hidden sm:block">
TechTorque Auto
TechTorque
</h1>
</Link>
<div className="flex items-center space-x-4">
Expand Down Expand Up @@ -160,7 +160,7 @@
</form>
{error && (
<div role="alert" className="mt-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
<p className="text-sm text-red-600 dark:text-red-400 mb-2">{error}</p>
<p className="text-sm theme-text-danger mb-2">{error}</p>
{unverifiedEmail && (
<Link
href={`/auth/resend-verification?email=${encodeURIComponent(unverifiedEmail)}`}
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/otp-verify/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { useRouter } from 'next/navigation'
import ThemeToggle from '../../components/ThemeToggle'
const Icon = ({ d, size = 10 }: { d: string; size?: number }) => ( <svg className={`w-${size} h-${size} text-white`} fill="none" stroke="currentColor" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={d} /></svg>);
const BoltIcon = ({size = 10}) => <Icon d="M13 10V3L4 14h7v7l9-11h-7z" size={size} />;

Check warning on line 8 in src/app/auth/otp-verify/page.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'BoltIcon' is assigned a value but never used

// --- OTP Page Component ---
export default function OtpVerifyPage() {
Expand Down Expand Up @@ -39,7 +39,7 @@
<header className="sticky-header shadow-lg border-b theme-border">
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center">
<Link href="/" className="flex items-center space-x-3 group"><div className="w-12 h-12 rounded-full bg-gradient-to-r from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110"><BoltIcon size={6} /></div><h1 className="text-2xl font-bold theme-text-primary hidden sm:block">TechTorque Auto</h1></Link>
<Link href="/" className="flex items-center space-x-3 group"><div className="automotive-accent w-12 h-12 rounded-full flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110"><span className="text-white font-bold text-lg">TT</span></div><h1 className="text-2xl font-bold theme-text-primary hidden sm:block">TechTorque</h1></Link>
<div className="flex items-center space-x-4"><ThemeToggle /></div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/app/auth/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={d} />
</svg>
);
const BoltIcon = ({ size = 10 }) => (

Check warning on line 21 in src/app/auth/register/page.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'BoltIcon' is assigned a value but never used
<Icon d="M13 10V3L4 14h7v7l9-11h-7z" size={size} />
);
const UserPlusIcon = () => (
Expand Down Expand Up @@ -132,11 +132,11 @@
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center">
<Link href="/" className="flex items-center space-x-3 group">
<div className="w-12 h-12 rounded-full bg-gradient-to-r from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<BoltIcon size={6} />
<div className="automotive-accent w-12 h-12 rounded-full flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<span className="text-white font-bold text-lg">TT</span>
</div>
<h1 className="text-2xl font-bold theme-text-primary hidden sm:block">
TechTorque Auto
TechTorque
</h1>
</Link>
<div className="flex items-center space-x-4">
Expand Down Expand Up @@ -178,7 +178,7 @@
Account Created!
</h2>
<p className="text-base theme-text-secondary mb-2">
Welcome to TechTorque Auto, {formData.fullName}!
Welcome to TechTorque, {formData.fullName}!
</p>
<div className="mb-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800">
<p className="text-sm font-semibold theme-text-primary mb-2">
Expand Down
8 changes: 4 additions & 4 deletions src/app/auth/resend-verification/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={d} />
</svg>
);
const BoltIcon = ({size = 10}) => <Icon d="M13 10V3L4 14h7v7l9-11h-7z" size={size} />;

Check warning on line 15 in src/app/auth/resend-verification/page.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'BoltIcon' is assigned a value but never used
const MailIcon = () => <svg className="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /></svg>;

function ResendVerificationContent() {
Expand Down Expand Up @@ -112,7 +112,7 @@

{error && (
<div role="alert" className="mt-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
<p className="text-sm text-red-600 dark:text-red-400">{error}</p>
<p className="text-sm theme-text-danger">{error}</p>
</div>
)}

Expand All @@ -138,11 +138,11 @@
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center">
<Link href="/" className="flex items-center space-x-3 group">
<div className="w-12 h-12 rounded-full bg-gradient-to-r from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<BoltIcon size={6} />
<div className="automotive-accent w-12 h-12 rounded-full flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<span className="text-white font-bold text-lg">TT</span>
</div>
<h1 className="text-2xl font-bold theme-text-primary hidden sm:block">
TechTorque Auto
TechTorque
</h1>
</Link>
<div className="flex items-center space-x-4">
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/reset-password/ResetPasswordForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function ResetPasswordForm() {

{error && (
<div className="mb-6 p-4 bg-red-50 dark:bg-red-900/20 rounded-lg border border-red-200 dark:border-red-800">
<p className="text-sm text-red-600 dark:text-red-400">{error}</p>
<p className="text-sm theme-text-danger">{error}</p>
</div>
)}

Expand Down
6 changes: 3 additions & 3 deletions src/app/auth/reset-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={d} />
</svg>
);
const BoltIcon = ({ size = 10 }) => (

Check warning on line 16 in src/app/auth/reset-password/page.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'BoltIcon' is assigned a value but never used
<Icon d="M13 10V3L4 14h7v7l9-11h-7z" size={size} />
);

Expand All @@ -24,11 +24,11 @@
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center">
<Link href="/" className="flex items-center space-x-3 group">
<div className="w-12 h-12 rounded-full bg-gradient-to-r from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<BoltIcon size={6} />
<div className="automotive-accent w-12 h-12 rounded-full flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<span className="text-white font-bold text-lg">TT</span>
</div>
<h1 className="text-2xl font-bold theme-text-primary hidden sm:block">
TechTorque Auto
TechTorque
</h1>
</Link>
<div className="flex items-center space-x-4">
Expand Down
6 changes: 3 additions & 3 deletions src/app/auth/verify-email/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={d} />
</svg>
);
const BoltIcon = ({ size = 10 }) => (

Check warning on line 18 in src/app/auth/verify-email/page.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'BoltIcon' is assigned a value but never used
<Icon d="M13 10V3L4 14h7v7l9-11h-7z" size={size} />
);

Expand All @@ -27,11 +27,11 @@
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center">
<Link href="/" className="flex items-center space-x-3 group">
<div className="w-12 h-12 rounded-full bg-gradient-to-r from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<BoltIcon size={6} />
<div className="automotive-accent w-12 h-12 rounded-full flex items-center justify-center shadow-lg transform transition-transform duration-300 group-hover:scale-110">
<span className="text-white font-bold text-lg">TT</span>
</div>
<h1 className="text-2xl font-bold theme-text-primary hidden sm:block">
TechTorque Auto
TechTorque
</h1>
</Link>
<ThemeToggle />
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/NotificationBell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function NotificationBell() {
{loading ? (
<div className="py-8 text-center theme-text-muted text-sm">Loading notifications...</div>
) : error ? (
<div className="py-8 text-center text-red-500 text-sm">{error}</div>
<div className="py-8 text-center theme-text-danger text-sm">{error}</div>
) : notifications.length === 0 ? (
<div className="py-8 text-center theme-text-muted text-sm">No notifications yet.</div>
) : (
Expand Down
12 changes: 6 additions & 6 deletions src/app/components/PaymentGateway.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ export default function PaymentGateway({
</div>

{error && (
<div className="mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
<p className="text-sm text-red-600 dark:text-red-400">{error}</p>
<div className="mb-6 theme-alert-danger">
<p className="text-sm">{error}</p>
</div>
)}

{success && (
<div className="mb-6 p-4 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg">
<p className="text-sm text-green-600 dark:text-green-400 font-semibold">Payment completed successfully!</p>
<div className="mb-6 theme-alert-success">
<p className="text-sm font-semibold">Payment completed successfully!</p>
</div>
)}

Expand All @@ -144,8 +144,8 @@ export default function PaymentGateway({
{loading ? 'Processing...' : success ? 'Payment Completed' : 'Pay with PayHere'}
</button>

<div className="mt-4 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800">
<p className="text-xs theme-text-muted text-center">
<div className="mt-4 theme-alert-info">
<p className="text-xs text-center">
Secure payment powered by PayHere. Your payment information is encrypted and secure.
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/VehicleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface VehicleCardProps {

export default function VehicleCard({ vehicle, onDelete, onEdit }: VehicleCardProps) {
return (
<div className="automotive-card p-6 hover:scale-[1.02] transition-transform">
<div className="automotive-card p-6 hover:scale-[1.02] hover:shadow-lg transition-all">
<div className="flex justify-between items-start mb-4">
<div>
<h3 className="text-xl font-bold theme-text-primary mb-1">
Expand Down
5 changes: 3 additions & 2 deletions src/app/components/chatbot/AIChatWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useRef, useEffect, useCallback } from 'react';
import { Sparkles, Bolt } from 'lucide-react';
import Cookies from 'js-cookie';
import { config } from '@/config/runtime';
import apiClient from '@/lib/apiClient';

// --- Theme Simulation & Constants ---
Expand All @@ -27,8 +28,8 @@
tool_executed?: string | null;
}

// Use the shared API client with a baseURL of `${API_BASE_URL}/api/v1`.
// Then call the `ai/chat` endpoint relative to that base.
// Use the runtime config to get the API Gateway URL
const API_ENDPOINT = `${config.NEXT_PUBLIC_API_BASE_URL}/api/v1/ai/chat`;

Check warning on line 32 in src/app/components/chatbot/AIChatWidget.tsx

View workflow job for this annotation

GitHub Actions / Install, Lint and Build

'API_ENDPOINT' is assigned a value but never used

const AIChatWidget: React.FC = () => {
// State Management
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/dashboards/AdminDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const AdminDashboard: React.FC<AdminDashboardProps> = ({ profile }) => {
</div>

{error && (
<div className="mb-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 px-4 py-3 rounded-lg">
<div className="theme-alert-danger mb-6">
{error}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/dashboards/CustomerDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const CustomerDashboard: React.FC<CustomerDashboardProps> = ({ profile }) => {
</div>

{error && (
<div className="mb-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 px-4 py-3 rounded-lg">
<div className="theme-alert-danger mb-6">
{error}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/dashboards/EmployeeDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const EmployeeDashboard: React.FC<EmployeeDashboardProps> = ({ profile }) => {
</div>

{error && (
<div className="mb-6 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 px-4 py-3 rounded-lg">
<div className="theme-alert-danger mb-6">
{error}
</div>
)}
Expand Down
10 changes: 5 additions & 5 deletions src/app/dashboard/admin/audit-logs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function AuditLogsPage() {
<div className="max-w-7xl mx-auto p-6">
<div className="animate-pulse space-y-3">
{[...Array(10)].map((_, i) => (
<div key={i} className="h-20 bg-gray-200 dark:bg-gray-800 rounded-lg"></div>
<div key={i} className="h-20 theme-bg-tertiary rounded-lg"></div>
))}
</div>
</div>
Expand Down Expand Up @@ -94,10 +94,10 @@ export default function AuditLogsPage() {
</div>
)}

<div className="rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900/50 overflow-hidden">
<div className="dashboard-content-card overflow-hidden">
<div className="overflow-x-auto">
<table className="w-full">
<thead className="bg-gray-50 dark:bg-gray-800/50">
<thead className="theme-bg-tertiary">
<tr>
<th className="px-6 py-3 text-left text-xs font-semibold theme-text-muted uppercase">Timestamp</th>
<th className="px-6 py-3 text-left text-xs font-semibold theme-text-muted uppercase">User</th>
Expand All @@ -110,7 +110,7 @@ export default function AuditLogsPage() {
{logs.length === 0 ? (
<tr>
<td colSpan={5} className="px-6 py-12 text-center">
<svg className="mx-auto w-12 h-12 text-gray-400 dark:text-gray-600 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<svg className="mx-auto w-12 h-12 theme-text-muted mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
<p className="text-sm theme-text-muted">
Expand All @@ -123,7 +123,7 @@ export default function AuditLogsPage() {
</tr>
) : (
logs.map((log) => (
<tr key={log.logId} className="hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors">
<tr key={log.logId} className="hover:theme-bg-hover transition-colors">
<td className="px-6 py-4 whitespace-nowrap text-sm theme-text-secondary">
{formatDateTime(log.timestamp)}
</td>
Expand Down
Loading