using Microsoft.AspNetCore.Mvc; namespace CPRNIMS.WebApps.ViewComponents.POMgmt { public class POReportTableVC : ViewComponent { public IViewComponentResult Invoke(int tableId) { // Set the correct view path based on the shippingInstructionId string viewName = tableId switch { 1 => "~/Views/Components/POMgmt/Reports/PerDepartment.cshtml", _ => "~/Views/Components/POMgmt/Reports/PerItem.cshtml" }; return View(viewName); } } }