Skip to content

Commit 9ede08d

Browse files
committed
chore work
1 parent 2d7e9c7 commit 9ede08d

5 files changed

Lines changed: 17 additions & 19 deletions

File tree

front-end/src/components/Chatbot.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ function Chatbot() {
130130
// const citations = response.data.citations
131131
const chatContent = "Here is the list of cars recommendation"
132132
const citations = [
133-
{ VIM: '1234567899', description: 'Toyota Camry 2016' },
134-
{ VIM: '1234556788', description: 'Honda CV 2017' }
133+
{ VIM: '1HGCM82633A123456', description: 'Tesla Model S 2022' },
134+
{ VIM: '4HGCM82633A789654', description: 'Toyota Camry 2020' }
135135
]
136136

137137
const options = citations.map(({ VIM, description }) => ({

front-end/src/pages/ComparePage/BudgetCalculator.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const BudgetCalculator = ({ cart, setVehiclePayemnt, modal_id }) => {
1414
if (tradeValue && tradeValue < 0) newErrors.tradeValue = "Trade value must be positive number"
1515

1616
if (!loanTerm) newErrors.loanTerm = "Loan term is required"
17-
else if (loanTerm <= 6) newErrors.loanTerm = "Loan term must be greater than 6 months"
17+
else if (loanTerm < 6) newErrors.loanTerm = "Loan term must be greater or equal than 6 months"
1818

1919
if (!interestRate) newErrors.interestRate = "Interest rate is required"
2020
else if (interestRate < 0) newErrors.interestRate = "Interest rate must be greater than 0"

front-end/src/pages/ComparePage/ComparePage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const ComparePage = () => {
120120
🌍 CO₂: {vehicle.cO2Emissions} g/km
121121
</span>
122122
<span className="badge bg-teal-50 px-3 py-1 rounded-lg shadow">
123-
{vehicle.mpg} MPG
123+
{vehicle.mpg} {isVehicleSustainable(vehicle) ? 'MPGe' : 'MPG'}
124124
</span>
125125
</div>
126126

front-end/src/pages/FinancePage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const FinancePage = () => {
4141
if (tradeValue && tradeValue < 0) newErrors.tradeValue = "Trade value must be positive number"
4242

4343
if (!loanTerm) newErrors.loanTerm = "Loan term is required"
44-
else if (loanTerm <= 6) newErrors.loanTerm = "Loan term must be greater than 6 months"
44+
else if (loanTerm < 6) newErrors.loanTerm = "Loan term must be greater or equal than 6 months"
4545

4646
if (!interestRate) newErrors.interestRate = "Interest rate is required"
4747
else if (interestRate < 0) newErrors.interestRate = "Interest rate must be greater than 0"

front-end/src/pages/VehicleDetailPage.jsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ const VehicleDetailPage = () => {
6262
navigate('/search/')
6363
}
6464

65-
const handleNotDevelop = () => {
66-
startWindToast("Future", "This feature is for future develop", 'info', 3, 'top')
67-
}
68-
6965
const handleAddToCart = () => {
7066
if (cart.length >= 3) {
7167
startWindToast("Cart Limit Reached", "Only add up to 3 vehicles to the cart", 'error', 3, 'top')
@@ -74,7 +70,7 @@ const VehicleDetailPage = () => {
7470
dispatch(addToCart(vehicle))
7571
startWindToast("Added to Cart", "The vehicle has been successfully added to your cart", 'success', 3, 'top')
7672
}
77-
73+
7874
const handleRemoveFromCart = (vehicle) => {
7975
dispatch(removeFromCart(vehicle))
8076
startWindToast("Removed from Cart", "The vehicle has been successfully removed from your cart", 'warning', 3, 'top')
@@ -109,11 +105,11 @@ const VehicleDetailPage = () => {
109105
{/* Main Content */}
110106
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
111107
{/* Left Column - Image */}
112-
<div className="card bg-base-100 shadow-xl rounded-xl overflow-hidden">
108+
<div className="card bg-base-100 shadow-xl rounded-xl overflow-hidden items-center justify-center">
113109
<img
114110
src={vehicle.imageUrls[0]}
115111
alt={vehicle.model}
116-
className="w-full h-[400px] object-cover"
112+
className="w-full object-cover"
117113
/>
118114
</div>
119115

@@ -142,6 +138,14 @@ const VehicleDetailPage = () => {
142138

143139
{/* Key Details Grid */}
144140
<div className="grid grid-cols-2 gap-6 mb-8">
141+
<div className="border-b pb-4">
142+
<div className="text-gray-500">Year</div>
143+
<div className="text-xl font-semibold">{vehicle.year}</div>
144+
</div>
145+
<div className="border-b pb-4">
146+
<div className="text-gray-500">Mileage</div>
147+
<div className="text-xl font-semibold">{vehicle.mileage}</div>
148+
</div>
145149
<div className="border-b pb-4">
146150
<div className="text-gray-500">Body Type</div>
147151
<div className="text-xl font-semibold">{vehicle.bodyType}</div>
@@ -162,12 +166,6 @@ const VehicleDetailPage = () => {
162166

163167
{/* Action Buttons */}
164168
<div className="space-y-4">
165-
<button
166-
onClick={handleNotDevelop}
167-
className="btn w-full text-lg h-14 bg-[#e6d5e8] text-black hover:bg-[#d8c7da]"
168-
>
169-
Schedule Test Drive
170-
</button>
171169
{!isInCart ? (
172170
<button
173171
onClick={() => handleAddToCart(vehicle)}
@@ -215,7 +213,7 @@ const VehicleDetailPage = () => {
215213
<h2 className="text-2xl font-bold mb-4">Performance</h2>
216214
<div className="space-y-4">
217215
<div className="flex justify-between items-center border-b pb-2">
218-
<span className="text-gray-600">Fuel Economy (MPG)</span>
216+
<span className="text-gray-600">Fuel Economy (MPG/MPGe)</span>
219217
<span className="font-semibold">{vehicle.mpg}</span>
220218
</div>
221219
<div className="flex justify-between items-center border-b pb-2">

0 commit comments

Comments
 (0)