display pinned notes in garage.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-01-26 12:01:53 -07:00
parent d36f2c59e3
commit 1c2f83026c
4 changed files with 33 additions and 2 deletions

View File

@@ -1311,6 +1311,14 @@ namespace CarCareTracker.Controllers
result = result.OrderByDescending(x => x.Pinned).ToList();
return PartialView("_Notes", result);
}
[TypeFilter(typeof(CollaboratorFilter))]
[HttpGet]
public IActionResult GetPinnedNotesByVehicleId(int vehicleId)
{
var result = _noteDataAccess.GetNotesByVehicleId(vehicleId);
result = result.Where(x=>x.Pinned).ToList();
return Json(result);
}
[HttpPost]
public IActionResult SaveNoteToVehicleId(Note note)
{