fixed csv import
This commit is contained in:
@@ -503,7 +503,7 @@ namespace CarCareTracker.Controllers
|
||||
{
|
||||
VehicleId = vehicleId,
|
||||
Date = DateTime.Parse(importModel.Date),
|
||||
InitialMileage = decimal.ToInt32(decimal.Parse(importModel.InitialOdometer, NumberStyles.Any)),
|
||||
InitialMileage = string.IsNullOrWhiteSpace(importModel.InitialOdometer) ? 0 : decimal.ToInt32(decimal.Parse(importModel.InitialOdometer, NumberStyles.Any)),
|
||||
Mileage = decimal.ToInt32(decimal.Parse(importModel.Odometer, NumberStyles.Any)),
|
||||
Notes = string.IsNullOrWhiteSpace(importModel.Notes) ? "" : importModel.Notes,
|
||||
Tags = string.IsNullOrWhiteSpace(importModel.Tags) ? [] : importModel.Tags.Split(" ").ToList()
|
||||
|
||||
@@ -961,7 +961,7 @@ function saveUserColumnPreferences(importMode) {
|
||||
});
|
||||
}
|
||||
function copyToClipboard(e) {
|
||||
var textToCopy = e.textContent;
|
||||
var textToCopy = e.textContent.trim();
|
||||
navigator.clipboard.writeText(textToCopy);
|
||||
successToast("Copied to Clipboard");
|
||||
}
|
||||
Reference in New Issue
Block a user