diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 99eaafe..27a685d 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -108,13 +108,13 @@ export default function AdminDashboard() { {error && ( -
-

{error}

+
+

{error}

)} {success && ( -
+

{success}

diff --git a/src/app/auth/forgot-password/page.tsx b/src/app/auth/forgot-password/page.tsx index 139d021..5d883ad 100644 --- a/src/app/auth/forgot-password/page.tsx +++ b/src/app/auth/forgot-password/page.tsx @@ -46,7 +46,7 @@ export default function ForgotPasswordPage() {
-

TechTorque Auto

+
TT

TechTorque

Back to Sign In
@@ -74,7 +74,7 @@ export default function ForgotPasswordPage() {
{error && (
-

{error}

+

{error}

)}
diff --git a/src/app/auth/login/page.tsx b/src/app/auth/login/page.tsx index ffc6ba1..cb2e2c2 100644 --- a/src/app/auth/login/page.tsx +++ b/src/app/auth/login/page.tsx @@ -74,11 +74,11 @@ export default function LoginPage() {
-
- +
+ TT

- TechTorque Auto + TechTorque

@@ -160,7 +160,7 @@ export default function LoginPage() { {error && (
-

{error}

+

{error}

{unverifiedEmail && (
-

TechTorque Auto

+
TT

TechTorque

diff --git a/src/app/auth/register/page.tsx b/src/app/auth/register/page.tsx index 1dafed5..f5cf46d 100644 --- a/src/app/auth/register/page.tsx +++ b/src/app/auth/register/page.tsx @@ -132,11 +132,11 @@ export default function RegisterPage() {
-
- +
+ TT

- TechTorque Auto + TechTorque

@@ -178,7 +178,7 @@ export default function RegisterPage() { Account Created!

- Welcome to TechTorque Auto, {formData.fullName}! + Welcome to TechTorque, {formData.fullName}!

diff --git a/src/app/auth/resend-verification/page.tsx b/src/app/auth/resend-verification/page.tsx index 683ced8..7935209 100644 --- a/src/app/auth/resend-verification/page.tsx +++ b/src/app/auth/resend-verification/page.tsx @@ -112,7 +112,7 @@ function ResendVerificationContent() { {error && (

-

{error}

+

{error}

)} @@ -138,11 +138,11 @@ export default function ResendVerificationPage() {
-
- +
+ TT

- TechTorque Auto + TechTorque

diff --git a/src/app/auth/reset-password/ResetPasswordForm.tsx b/src/app/auth/reset-password/ResetPasswordForm.tsx index e8e7a1f..ed32f49 100644 --- a/src/app/auth/reset-password/ResetPasswordForm.tsx +++ b/src/app/auth/reset-password/ResetPasswordForm.tsx @@ -143,7 +143,7 @@ export default function ResetPasswordForm() { {error && (
-

{error}

+

{error}

)} diff --git a/src/app/auth/reset-password/page.tsx b/src/app/auth/reset-password/page.tsx index 30d5461..5eb58d6 100644 --- a/src/app/auth/reset-password/page.tsx +++ b/src/app/auth/reset-password/page.tsx @@ -24,11 +24,11 @@ export default function ResetPasswordPage() {
-
- +
+ TT

- TechTorque Auto + TechTorque

diff --git a/src/app/auth/verify-email/page.tsx b/src/app/auth/verify-email/page.tsx index c5cc1b0..d2065d3 100644 --- a/src/app/auth/verify-email/page.tsx +++ b/src/app/auth/verify-email/page.tsx @@ -27,11 +27,11 @@ export default function VerifyEmailPage() {
-
- +
+ TT

- TechTorque Auto + TechTorque

diff --git a/src/app/components/NotificationBell.tsx b/src/app/components/NotificationBell.tsx index 39a3407..d80f410 100644 --- a/src/app/components/NotificationBell.tsx +++ b/src/app/components/NotificationBell.tsx @@ -102,7 +102,7 @@ export default function NotificationBell() { {loading ? (
Loading notifications...
) : error ? ( -
{error}
+
{error}
) : notifications.length === 0 ? (
No notifications yet.
) : ( diff --git a/src/app/components/PaymentGateway.tsx b/src/app/components/PaymentGateway.tsx index 40649ca..0343e1d 100644 --- a/src/app/components/PaymentGateway.tsx +++ b/src/app/components/PaymentGateway.tsx @@ -123,14 +123,14 @@ export default function PaymentGateway({
{error && ( -
-

{error}

+
+

{error}

)} {success && ( -
-

Payment completed successfully!

+
+

Payment completed successfully!

)} @@ -144,8 +144,8 @@ export default function PaymentGateway({ {loading ? 'Processing...' : success ? 'Payment Completed' : 'Pay with PayHere'} -
-

+

+

Secure payment powered by PayHere. Your payment information is encrypted and secure.

diff --git a/src/app/components/VehicleCard.tsx b/src/app/components/VehicleCard.tsx index fcdac0f..d72a5fb 100644 --- a/src/app/components/VehicleCard.tsx +++ b/src/app/components/VehicleCard.tsx @@ -10,7 +10,7 @@ interface VehicleCardProps { export default function VehicleCard({ vehicle, onDelete, onEdit }: VehicleCardProps) { return ( -
+

diff --git a/src/app/components/chatbot/AIChatWidget.tsx b/src/app/components/chatbot/AIChatWidget.tsx index 20d7081..ac93d99 100644 --- a/src/app/components/chatbot/AIChatWidget.tsx +++ b/src/app/components/chatbot/AIChatWidget.tsx @@ -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 --- @@ -27,8 +28,8 @@ interface ChatResponse { 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`; const AIChatWidget: React.FC = () => { // State Management diff --git a/src/app/components/dashboards/AdminDashboard.tsx b/src/app/components/dashboards/AdminDashboard.tsx index 818b715..c6bf952 100644 --- a/src/app/components/dashboards/AdminDashboard.tsx +++ b/src/app/components/dashboards/AdminDashboard.tsx @@ -57,7 +57,7 @@ const AdminDashboard: React.FC = ({ profile }) => {

{error && ( -
+
{error}
)} diff --git a/src/app/components/dashboards/CustomerDashboard.tsx b/src/app/components/dashboards/CustomerDashboard.tsx index 00b8bd7..3b2da0a 100644 --- a/src/app/components/dashboards/CustomerDashboard.tsx +++ b/src/app/components/dashboards/CustomerDashboard.tsx @@ -75,7 +75,7 @@ const CustomerDashboard: React.FC = ({ profile }) => {
{error && ( -
+
{error}
)} diff --git a/src/app/components/dashboards/EmployeeDashboard.tsx b/src/app/components/dashboards/EmployeeDashboard.tsx index 4013d55..9e56ece 100644 --- a/src/app/components/dashboards/EmployeeDashboard.tsx +++ b/src/app/components/dashboards/EmployeeDashboard.tsx @@ -94,7 +94,7 @@ const EmployeeDashboard: React.FC = ({ profile }) => {
{error && ( -
+
{error}
)} diff --git a/src/app/dashboard/admin/audit-logs/page.tsx b/src/app/dashboard/admin/audit-logs/page.tsx index 699f8f9..c6b4b88 100644 --- a/src/app/dashboard/admin/audit-logs/page.tsx +++ b/src/app/dashboard/admin/audit-logs/page.tsx @@ -52,7 +52,7 @@ export default function AuditLogsPage() {
{[...Array(10)].map((_, i) => ( -
+
))}
@@ -94,10 +94,10 @@ export default function AuditLogsPage() {
)} -
+
- + @@ -110,7 +110,7 @@ export default function AuditLogsPage() { {logs.length === 0 ? ( ) : ( logs.map((log) => ( - + diff --git a/src/app/dashboard/admin/page.tsx b/src/app/dashboard/admin/page.tsx index 83f1ade..7727a8c 100644 --- a/src/app/dashboard/admin/page.tsx +++ b/src/app/dashboard/admin/page.tsx @@ -35,10 +35,10 @@ export default function AdminPage() { return (
-
+
{[...Array(8)].map((_, i) => ( -
+
))}
@@ -79,11 +79,11 @@ export default function AdminPage() {
- +
@@ -96,11 +96,11 @@ export default function AdminPage() {
- +
@@ -113,11 +113,11 @@ export default function AdminPage() {
- +
@@ -130,11 +130,11 @@ export default function AdminPage() {
- +
@@ -152,17 +152,17 @@ export default function AdminPage() {

User Statistics

-
-

Total customers

-

{stats.totalCustomers ?? 0}

+
+

Total customers

+

{stats.totalCustomers ?? 0}

-
-

Total employees

-

{stats.totalEmployees ?? 0}

+
+

Total employees

+

{stats.totalEmployees ?? 0}

-
-

Total vehicles

-

{stats.totalVehicles ?? 0}

+
+

Total vehicles

+

{stats.totalVehicles ?? 0}

@@ -170,21 +170,21 @@ export default function AdminPage() {

Service Statistics

-
-

Active appointments

-

{stats.activeAppointments ?? 0}

+
+

Active appointments

+

{stats.activeAppointments ?? 0}

-
-

Completed (month)

-

{stats.completedServicesThisMonth ?? 0}

+
+

Completed (month)

+

{stats.completedServicesThisMonth ?? 0}

-
-

Active projects

-

{stats.activeProjects ?? 0}

+
+

Active projects

+

{stats.activeProjects ?? 0}

-
-

Pending invoices

-

{stats.pendingInvoices ?? 0}

+
+

Pending invoices

+

{stats.pendingInvoices ?? 0}

@@ -192,13 +192,13 @@ export default function AdminPage() {

Financial Overview

-
-

Revenue this month

-

LKR {(stats.revenueThisMonth ?? 0).toLocaleString()}

+
+

Revenue this month

+

LKR {(stats.revenueThisMonth ?? 0).toLocaleString()}

-
-

Pending invoices count

-

{stats.pendingInvoices ?? 0}

+
+

Pending invoices count

+

{stats.pendingInvoices ?? 0}

diff --git a/src/app/dashboard/admin/reports/page.tsx b/src/app/dashboard/admin/reports/page.tsx index 4aab25f..e80403b 100644 --- a/src/app/dashboard/admin/reports/page.tsx +++ b/src/app/dashboard/admin/reports/page.tsx @@ -43,8 +43,8 @@ export default function ReportsPage() { return (
-
-
+
+
); @@ -79,7 +79,7 @@ export default function ReportsPage() {

Generate business analytics and reports

-
+

Generate Report

@@ -88,7 +88,7 @@ export default function ReportsPage() { setFormat(e.target.value as typeof format)} - className="w-full px-4 py-3 rounded-lg border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 theme-text-primary focus:ring-2 focus:ring-blue-500" + className="form-select" > @@ -120,7 +120,7 @@ export default function ReportsPage() { type="date" value={dateRange.fromDate} onChange={(e) => setDateRange({ ...dateRange, fromDate: e.target.value })} - className="w-full px-4 py-3 rounded-lg border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 theme-text-primary focus:ring-2 focus:ring-blue-500" + className="form-input" />
@@ -129,7 +129,7 @@ export default function ReportsPage() { type="date" value={dateRange.toDate} onChange={(e) => setDateRange({ ...dateRange, toDate: e.target.value })} - className="w-full px-4 py-3 rounded-lg border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 theme-text-primary focus:ring-2 focus:ring-blue-500" + className="form-input" />
diff --git a/src/app/dashboard/admin/service-types/page.tsx b/src/app/dashboard/admin/service-types/page.tsx index ca8ab4c..8ccbc84 100644 --- a/src/app/dashboard/admin/service-types/page.tsx +++ b/src/app/dashboard/admin/service-types/page.tsx @@ -195,7 +195,7 @@ export default function ServiceTypesPage() {
@@ -280,7 +280,7 @@ export default function ServiceTypesPage() { {/* Create/Edit Modal */} {showModal && (
-
+

@@ -304,7 +304,7 @@ export default function ServiceTypesPage() { required value={formData.name} onChange={(e) => setFormData({ ...formData, name: e.target.value })} - className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 theme-text-primary" + className="form-input" placeholder="e.g., Oil Change" />

@@ -317,7 +317,7 @@ export default function ServiceTypesPage() { required value={formData.category} onChange={(e) => setFormData({ ...formData, category: e.target.value })} - className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 theme-text-primary" + className="form-select" > @@ -334,7 +334,7 @@ export default function ServiceTypesPage() {
Timestamp User
- +

@@ -123,7 +123,7 @@ export default function AuditLogsPage() {

{formatDateTime(log.timestamp)}