fix: display purchase info and fix validation on vehicle detail (refs #41)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m47s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 38s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m47s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 38s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
- Add purchase price and purchase date display to vehicle detail page - Fix form validation to handle NaN from empty number inputs using z.preprocess 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -414,6 +414,23 @@ export const VehicleDetailPage: React.FC = () => {
|
||||
label="Current Odometer Reading"
|
||||
value={vehicle.odometerReading ? `${vehicle.odometerReading.toLocaleString()} mi` : undefined}
|
||||
/>
|
||||
|
||||
{/* Purchase Information Section */}
|
||||
<div className="border-t border-gray-200 dark:border-silverstone pt-4 mt-4">
|
||||
<h3 className="text-lg font-medium text-gray-900 dark:text-avus mb-4">
|
||||
Purchase Information
|
||||
</h3>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<DetailField
|
||||
label="Purchase Price"
|
||||
value={vehicle.purchasePrice ? `$${vehicle.purchasePrice.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : undefined}
|
||||
/>
|
||||
<DetailField
|
||||
label="Purchase Date"
|
||||
value={vehicle.purchaseDate ? new Date(vehicle.purchaseDate).toLocaleDateString() : undefined}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<Divider sx={{ my: 4 }} />
|
||||
|
||||
Reference in New Issue
Block a user