Merge pull request #55 from hargata/Hargata/consolidated.report

fixed for real.
This commit is contained in:
Hargata Softworks 2024-01-10 14:43:31 -07:00 committed by GitHub
commit ad8c27a2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.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.Notes).Name("notes", "note");
Map(m => m.Price).Name(["price"]);

View File

@ -45,5 +45,7 @@
}
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>
} 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
{
<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 {
color: #000 !important;
}
td.col-1{
width:10%;
}
th.col-1 {
width: 10%;
}
th {
color: #000 !important;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -115,4 +115,19 @@ function isValidMoney(input) {
const euRegex = /^\$?(?=\(.*\)|[^()]*$)\(?\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));
}
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) {
$("#taxRecordModalContent").html(data);
//initiate datepicker
$('#taxRecordDate').datepicker({
endDate: "+0d",
format: getShortDatePattern().pattern
});
initDatePicker($('#taxRecordDate'));
$('#taxRecordModal').modal('show');
}
});
@ -16,10 +13,7 @@ function showEditTaxRecordModal(taxRecordId) {
if (data) {
$("#taxRecordModalContent").html(data);
//initiate datepicker
$('#taxRecordDate').datepicker({
endDate: "+0d",
format: getShortDatePattern().pattern
});
initDatePicker($('#taxRecordDate'));
$('#taxRecordModal').modal('show');
}
});

View File

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

View File

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