fixed for real.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-01-10 14:42:58 -07:00
parent e3bf6f03d7
commit 52f9ae7ea1
13 changed files with 44 additions and 55 deletions

View File

@@ -9,7 +9,7 @@ namespace CarCareTracker.MapProfile
{ {
Map(m => m.Date).Name(["date", "fuelup_date"]); Map(m => m.Date).Name(["date", "fuelup_date"]);
Map(m => m.Odometer).Name(["odometer"]); Map(m => m.Odometer).Name(["odometer"]);
Map(m => m.FuelConsumed).Name(["gallons", "liters", "litres", "consumption", "fuelconsumed"]); Map(m => m.FuelConsumed).Name(["gallons", "liters", "litres", "consumption", "quantity"]);
Map(m => m.Cost).Name(["cost", "total cost", "totalcost", "total price"]); Map(m => m.Cost).Name(["cost", "total cost", "totalcost", "total price"]);
Map(m => m.Notes).Name("notes", "note"); Map(m => m.Notes).Name("notes", "note");
Map(m => m.Price).Name(["price"]); Map(m => m.Price).Name(["price"]);

View File

@@ -45,5 +45,7 @@
} }
else else
{ {
<h4>No data found or all records have zero sums, insert records with non-zero sums to see visualizations here.</h4> <div class="text-center">
<h4>No data found or all records have zero sums, insert records with non-zero sums to see visualizations here.</h4>
</div>
} }

View File

@@ -52,5 +52,7 @@
</script> </script>
} else } else
{ {
<h4>No data found, insert/select some data to see visualizations here.</h4> <div class="text-center">
<h4>No data found, insert/select some data to see visualizations here.</h4>
</div>
} }

View File

@@ -44,5 +44,7 @@
} }
else else
{ {
<h4>No data found, create reminders to see visualizations here.</h4> <div class="text-center">
<h4>No data found, create reminders to see visualizations here.</h4>
</div>
} }

View File

@@ -53,6 +53,12 @@ html {
td { td {
color: #000 !important; color: #000 !important;
} }
td.col-1{
width:10%;
}
th.col-1 {
width: 10%;
}
th { th {
color: #000 !important; color: #000 !important;
} }

View File

@@ -3,10 +3,7 @@
if (data) { if (data) {
$("#collisionRecordModalContent").html(data); $("#collisionRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#collisionRecordDate').datepicker({ initDatePicker($('#collisionRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#collisionRecordModal').modal('show'); $('#collisionRecordModal').modal('show');
} }
}); });
@@ -16,10 +13,7 @@ function showEditCollisionRecordModal(collisionRecordId) {
if (data) { if (data) {
$("#collisionRecordModalContent").html(data); $("#collisionRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#collisionRecordDate').datepicker({ initDatePicker($('#collisionRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#collisionRecordModal').modal('show'); $('#collisionRecordModal').modal('show');
} }
}); });

View File

@@ -3,10 +3,7 @@
if (data) { if (data) {
$("#gasRecordModalContent").html(data); $("#gasRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#gasRecordDate').datepicker({ initDatePicker($('#gasRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#gasRecordModal').modal('show'); $('#gasRecordModal').modal('show');
} }
}); });
@@ -16,10 +13,7 @@ function showEditGasRecordModal(gasRecordId) {
if (data) { if (data) {
$("#gasRecordModalContent").html(data); $("#gasRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#gasRecordDate').datepicker({ initDatePicker($('#gasRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#gasRecordModal').modal('show'); $('#gasRecordModal').modal('show');
} }
}); });

View File

@@ -2,10 +2,7 @@
$.get(`/Vehicle/GetReminderRecordForEditById?reminderRecordId=${reminderId}`, function (data) { $.get(`/Vehicle/GetReminderRecordForEditById?reminderRecordId=${reminderId}`, function (data) {
if (data) { if (data) {
$("#reminderRecordModalContent").html(data); $("#reminderRecordModalContent").html(data);
$('#reminderDate').datepicker({ initDatePicker($('#reminderDate'), true);
startDate: "+0d",
format: getShortDatePattern().pattern
});
$("#reminderRecordModal").modal("show"); $("#reminderRecordModal").modal("show");
} }
}); });

View File

@@ -3,10 +3,7 @@
if (data) { if (data) {
$("#serviceRecordModalContent").html(data); $("#serviceRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#serviceRecordDate').datepicker({ initDatePicker($('#serviceRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#serviceRecordModal').modal('show'); $('#serviceRecordModal').modal('show');
} }
}); });
@@ -16,10 +13,7 @@ function showEditServiceRecordModal(serviceRecordId) {
if (data) { if (data) {
$("#serviceRecordModalContent").html(data); $("#serviceRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#serviceRecordDate').datepicker({ initDatePicker($('#serviceRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#serviceRecordModal').modal('show'); $('#serviceRecordModal').modal('show');
} }
}); });

View File

@@ -116,3 +116,18 @@ function isValidMoney(input) {
const usRegex = /^\$?(?=\(.*\)|[^()]*$)\(?\d{1,3}(,?\d{3})?(\.\d{1,3}?)?\)?$/; const usRegex = /^\$?(?=\(.*\)|[^()]*$)\(?\d{1,3}(,?\d{3})?(\.\d{1,3}?)?\)?$/;
return (euRegex.test(input) || usRegex.test(input)); return (euRegex.test(input) || usRegex.test(input));
} }
function initDatePicker(input, futureOnly) {
if (futureOnly) {
input.datepicker({
startDate: "+0d",
format: getShortDatePattern().pattern,
autoclose: true
});
} else {
input.datepicker({
endDate: "+0d",
format: getShortDatePattern().pattern,
autoclose: true
});
}
}

View File

@@ -3,10 +3,7 @@
if (data) { if (data) {
$("#taxRecordModalContent").html(data); $("#taxRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#taxRecordDate').datepicker({ initDatePicker($('#taxRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#taxRecordModal').modal('show'); $('#taxRecordModal').modal('show');
} }
}); });
@@ -16,10 +13,7 @@ function showEditTaxRecordModal(taxRecordId) {
if (data) { if (data) {
$("#taxRecordModalContent").html(data); $("#taxRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#taxRecordDate').datepicker({ initDatePicker($('#taxRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#taxRecordModal').modal('show'); $('#taxRecordModal').modal('show');
} }
}); });

View File

@@ -3,10 +3,7 @@
if (data) { if (data) {
$("#upgradeRecordModalContent").html(data); $("#upgradeRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#upgradeRecordDate').datepicker({ initDatePicker($('#upgradeRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#upgradeRecordModal').modal('show'); $('#upgradeRecordModal').modal('show');
} }
}); });
@@ -16,10 +13,7 @@ function showEditUpgradeRecordModal(upgradeRecordId) {
if (data) { if (data) {
$("#upgradeRecordModalContent").html(data); $("#upgradeRecordModalContent").html(data);
//initiate datepicker //initiate datepicker
$('#upgradeRecordDate').datepicker({ initDatePicker($('#upgradeRecordDate'));
endDate: "+0d",
format: getShortDatePattern().pattern
});
$('#upgradeRecordModal').modal('show'); $('#upgradeRecordModal').modal('show');
} }
}); });

View File

@@ -197,18 +197,13 @@ function showAddReminderModal(reminderModalInput) {
if (reminderModalInput != undefined) { if (reminderModalInput != undefined) {
$.post('/Vehicle/GetAddReminderRecordPartialView', {reminderModel: reminderModalInput}, function (data) { $.post('/Vehicle/GetAddReminderRecordPartialView', {reminderModel: reminderModalInput}, function (data) {
$("#reminderRecordModalContent").html(data); $("#reminderRecordModalContent").html(data);
$('#reminderDate').datepicker({ initDatePicker($('#reminderDate'), true);
startDate: "+0d"
});
$("#reminderRecordModal").modal("show"); $("#reminderRecordModal").modal("show");
}); });
} else { } else {
$.post('/Vehicle/GetAddReminderRecordPartialView', function (data) { $.post('/Vehicle/GetAddReminderRecordPartialView', function (data) {
$("#reminderRecordModalContent").html(data); $("#reminderRecordModalContent").html(data);
$('#reminderDate').datepicker({ initDatePicker($('#reminderDate'), true);
startDate: "+0d",
format: getShortDatePattern().pattern
});
$("#reminderRecordModal").modal("show"); $("#reminderRecordModal").modal("show");
}); });
} }