public async Task <IActionResult> Index(DateTime?planningDate)
    {
        return(await _resiliencyHelper.ExecuteResilient(async() =>
        {
            if (planningDate == null)
            {
                planningDate = DateTime.Now.Date;
            }

            var model = new WorkshopManagementViewModel
            {
                Date = planningDate.Value,
                MaintenanceJobs = new List <MaintenanceJob>()
            };

            // get planning
            string dateStr = planningDate.Value.ToString("yyyy-MM-dd");
            WorkshopPlanning planning = await _workshopManagementAPI.GetWorkshopPlanning(dateStr);
            if (planning?.Jobs?.Count > 0)
            {
                model.MaintenanceJobs.AddRange(planning.Jobs.OrderBy(j => j.StartTime));
            }

            return View(model);
        }, View("Offline", new WorkshopManagementOfflineViewModel())));
    }
Exemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            return(await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _resumeManagementApi.GetResume();

                return View(model);
            }, View("Offline")));
        }
 public async Task <IActionResult> Index()
 {
     return(await _resiliencyHelper.ExecuteResilient(async() =>
     {
         var model = new CustomerManagementViewModel
         {
             Customers = await _customerManagementAPI.GetCustomers()
         };
         return View(model);
     }, View("Offline", new CustomerManagementOfflineViewModel())));
 }
Exemplo n.º 4
0
        public async Task <IActionResult> Index(int resumeId)
        {
            return(await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _experienceWebApi.GetExperiences(resumeId);

                return View(model);
            }, View("Offline")));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Index(int resumeId)
        {
            ViewBag.ResumeId = resumeId;
            return(await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _educationWebApi.GetEducations(resumeId);

                return View(model);
            }, View("Offline")));
        }
Exemplo n.º 6
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            int languageId = _workContext.Current.WorkingLanguageId;
            var res        = await _resiliencyHelper.ExecuteResilient(async() =>
            {
                var model = await _resumeManagementApi.GetResumeDetails(1, languageId);
                return(model);
            }, null);


            return(View(res));
        }