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