deprecated pinned notes

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-03-01 04:31:13 -07:00
parent 84b748a361
commit 993c271fa8
3 changed files with 13 additions and 22 deletions

View File

@@ -173,27 +173,8 @@ function performLogOut() {
}
function loadPinnedNotes(vehicleId) {
var hoveredGrid = $(`#gridVehicle_${vehicleId}`);
if (hoveredGrid.attr("data-bs-title") == undefined) {
$.get(`/Vehicle/GetPinnedNotesByVehicleId?vehicleId=${vehicleId}`, function (data) {
if (data.length > 0) {
//converted pinned notes to html.
var htmlString = "<ul class='list-group list-group-flush'>";
data.forEach(x => {
htmlString += `<li><b>${x.description}</b> : ${x.noteText}</li>`;
});
htmlString += "</ul>";
hoveredGrid.attr("data-bs-title", htmlString);
new bootstrap.Tooltip(hoveredGrid);
hoveredGrid.tooltip("show");
} else {
//disable the tooltip
hoveredGrid.attr("data-bs-title", "");
}
});
} else {
if (hoveredGrid.attr("data-bs-title") != '') {
hoveredGrid.tooltip("show");
}
if (hoveredGrid.attr("data-bs-title") != '') {
hoveredGrid.tooltip("show");
}
}
function hidePinnedNotes(vehicleId) {