Fix count labels for odometer and reminder records when filtered by tags.
This commit is contained in:
@@ -139,7 +139,7 @@ function getAndValidateOdometerRecordValues() {
|
||||
|
||||
function recalculateDistance() {
|
||||
//force distance recalculation
|
||||
//reserved for when data is incoherent with negative distances due to non-chronologica order of odometer records.
|
||||
//reserved for when data is incoherent with negative distances due to non-chronological order of odometer records.
|
||||
var vehicleId = GetVehicleId().vehicleId
|
||||
$.post(`/Vehicle/ForceRecalculateDistanceByVehicleId?vehicleId=${vehicleId}`, function (data) {
|
||||
if (data) {
|
||||
@@ -362,15 +362,16 @@ function getRecordedOdometer() {
|
||||
return parseFloat(`${recordedOdometer}.${recordedSubOdometer}`);
|
||||
}
|
||||
function saveRecordedOdometer() {
|
||||
//update current odometer value
|
||||
$("#odometerRecordMileage").val(parseInt(getRecordedOdometer()).toString());
|
||||
//save coordinates into a CSV file and upload
|
||||
if (tripCoordinates.length > 0) {
|
||||
if (tripCoordinates.length > 1) {
|
||||
//update current odometer value
|
||||
$("#odometerRecordMileage").val(parseInt(getRecordedOdometer()).toString());
|
||||
//generate attachment
|
||||
$.post('/Files/UploadCoordinates', { coordinates: tripCoordinates }, function (response) {
|
||||
uploadedFiles.push(response);
|
||||
$.post('/Vehicle/GetFilesPendingUpload', { uploadedFiles: uploadedFiles }, function (viewData) {
|
||||
$("#filesPendingUpload").html(viewData);
|
||||
tripCoordinates = [];
|
||||
tripCoordinates = ["Latitude,Longitude"];
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1449,7 +1449,7 @@ function handleModalPaste(e, recordType) {
|
||||
}
|
||||
function handleEnter(e) {
|
||||
if ((event.ctrlKey || event.metaKey) && event.which == 13) {
|
||||
var saveButton = $(e).parent().find(".modal-footer .btn-primary");
|
||||
var saveButton = $(e).parent().find(".modal-footer .btn-primary:not('.d-none')");
|
||||
if (saveButton.length > 0) {
|
||||
saveButton.first().trigger('click');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user