public async Task <IActionResult> Index() { if (UserHasPermission(Permission.ManageVendorCodes)) { var vendorCodeStatus = await _vendorCodeService.GetStatusAsync(); if (vendorCodeStatus.IsConfigured) { return(View(vendorCodeStatus)); } else { var vendorCodeType = await _vendorCodeService.GetTypeAllAsync(); if (vendorCodeType?.Count == 0) { return(RedirectToAction(nameof(Configure))); } else { return(RedirectToAction(nameof(GenerateCodes))); } } } return(RedirectToAction(nameof(ViewPackingSlip))); }
public async Task <IActionResult> Index() { return(View(await _vendorCodeService.GetStatusAsync())); }