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