diff --git a/Models/Vehicle.cs b/Models/Vehicle.cs
index cd01f98..5ae3bc8 100644
--- a/Models/Vehicle.cs
+++ b/Models/Vehicle.cs
@@ -9,5 +9,6 @@
public string Model { get; set; }
public string LicensePlate { get; set; }
public bool IsElectric { get; set; } = false;
+ public bool UseHours { get; set; } = false;
}
}
diff --git a/Views/Vehicle/_VehicleModal.cshtml b/Views/Vehicle/_VehicleModal.cshtml
index f9d209c..9cd8bb7 100644
--- a/Views/Vehicle/_VehicleModal.cshtml
+++ b/Views/Vehicle/_VehicleModal.cshtml
@@ -33,6 +33,10 @@
+
+
+
+
@if (!string.IsNullOrWhiteSpace(Model.ImageLocation))
{
diff --git a/wwwroot/js/shared.js b/wwwroot/js/shared.js
index f2f014a..d4b4be0 100644
--- a/wwwroot/js/shared.js
+++ b/wwwroot/js/shared.js
@@ -38,6 +38,7 @@ function saveVehicle(isEdit) {
var vehicleModel = $("#inputModel").val();
var vehicleLicensePlate = $("#inputLicensePlate").val();
var vehicleIsElectric = $("#inputIsElectric").is(":checked");
+ var vehicleUseHours = $("#inputUseHours").is(":checked");
//validate
var hasError = false;
if (vehicleYear.trim() == '' || parseInt(vehicleYear) < 1900) {
@@ -74,7 +75,8 @@ function saveVehicle(isEdit) {
make: vehicleMake,
model: vehicleModel,
licensePlate: vehicleLicensePlate,
- isElectric: vehicleIsElectric
+ isElectric: vehicleIsElectric,
+ useHours: vehicleUseHours
}, function (data) {
if (data) {
if (!isEdit) {