Initial Commit.
This commit is contained in:
24
wwwroot/js/vehicle.js
Normal file
24
wwwroot/js/vehicle.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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';
|
||||
}
|
||||
})
|
||||
}
|
||||
//tap into tabchange
|
||||
$(document).ready(function () {
|
||||
var vehicleId = GetVehicleId().vehicleId;
|
||||
getVehicleNote(vehicleId);
|
||||
});
|
||||
|
||||
function getVehicleNote(vehicleId) {
|
||||
$.get(`/Vehicle/GetNoteByVehicleId?vehicleId=${vehicleId}`, function (data) {
|
||||
if (data) {
|
||||
$("#noteTextArea").val(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user