using Microsoft.AspNetCore.Mvc; namespace CPRNIMS.WebApps.ViewComponents.Inventory { public class InventoryTabPageViewComponent : ViewComponent { public IViewComponentResult Invoke(int InventoryTabPageId,bool isFinance) { var report = isFinance ? "~/Views/Components/Inventory/TabPage/Reports/InventorySummaryReportFinance.cshtml" : "~/Views/Components/Inventory/TabPage/Reports/InventorySummaryReport.cshtml"; string viewName = InventoryTabPageId switch { 1 => "~/Views/Components/Inventory/TabPage/Inventory.cshtml", 2 => "~/Views/Components/Inventory/TabPage/RIS.cshtml", 3 => "~/Views/Components/Inventory/TabPage/MRS.cshtml", 4 => report, 5 => "~/Views/Components/Inventory/TabPage/Reports/RISReport.cshtml", _ => "~/Views/Components/Inventory/TabPage/Reports/MRSReport.cshtml" }; return View(viewName); } } }