mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
36 lines
1023 B
JavaScript
36 lines
1023 B
JavaScript
function showAddVehicleModal() {
|
|
$('#addVehicleModal').modal('show');
|
|
}
|
|
function hideAddVehicleModal() {
|
|
$('#addVehicleModal').modal('hide');
|
|
}
|
|
function DeleteVehicle(vehicleId) {
|
|
$.post('/Vehicle/DeleteVehicle', { vehicleId: vehicleId }, function (data) {
|
|
if (data) {
|
|
window.location.href = '/Home';
|
|
}
|
|
})
|
|
}
|
|
$(document).ready(function () {
|
|
loadGarage();
|
|
});
|
|
//refreshable function to reload Garage PartialView
|
|
function loadGarage() {
|
|
$.get('/Home/Garage', function (data) {
|
|
$("#garageContainer").html(data);
|
|
});
|
|
}
|
|
function viewVehicle(vehicleId) {
|
|
window.location.href = `/Vehicle/Index?vehicleId=${vehicleId}`;
|
|
}
|
|
function returnToGarage() {
|
|
window.location.href = '/Home';
|
|
}
|
|
function saveVehicleNote(vehicleId) {
|
|
var noteText = $("#noteTextArea").val();
|
|
$.post('/Vehicle/SaveNoteToVehicle', { vehicleId: vehicleId, noteText: noteText }, function (data) {
|
|
if (data) {
|
|
//window.location.href = '/Home';
|
|
}
|
|
})
|
|
} |