/// <summary> /// Provides index page /// </summary> /// <returns>Index page view</returns> public ActionResult Index() { // Clear all info HomeService.ClearSessions(); //Stop processes ProcessService.StopAll(); // ask user to log in if no current store available //if (StoreService.IsStoreInfoExist && !StoreService.IsCallCenter) //{ ViewBag.JobStatus = jobStatusService.GetSummaryJobsStatuses(); ViewBag.FreeSparesEnquiry = HomeService.FreeSparesEnquiry; //} // Is call center ViewBag.IsCallCenter = StoreService.IsStoreInfoExist && !StoreService.IsCallCenter; ViewBag.IsStoreSet = StoreService.IsStoreInfoExist; ViewBag.SuperAdmin = StoreService.IsSuperAdmin; //if (StoreService.CallcenterUser && StoreService.StoreId == 0) // return RedirectToAction("Index", "CallCenter"); //if (StoreService.StoreId == 0) //{ // return Redirect(Url.Process(PredefinedProcess.SignIn)); //} if (!StoreService.CallcenterUser) { return(Redirect(Url.Process(PredefinedProcess.CallcenterSignIn))); } else { //return RedirectToAction("Index", "CallCenter"); ViewBag.ClientBookingType = StoreService.GetStoreInfo(StoreService.StoreId).ClientBookingType;// StoreService.ClientBookingType; // Set flag for false //UserService.IsAutoSignIn = false; // ViewBag.IsUserAuthenticated = AuthInfo.IsAuthenticated(); return(View()); } }