public IActionResult GetReviewersWaiting() { var taskId = _camundaExecutor.GetAssignedTaskId("PotvrdaRecenzenta", "administrator"); var users = _dataContext.Users.Where(x => x.AdminConfirmed == false && x.IsReviewer == true && x.EmailConfirmed == true); return(Ok(users)); }
public IActionResult GetAddingReviewersTask() { var taskId = _camundaExecutor.GetAssignedTaskId("DodavanjeUrednikaiRecenzenataCasopisa", "administrator"); var activeTasks = _camundaExecutor.GetAllActiveTasks("DodavanjeUrednikaiRecenzenataCasopisa"); var magazines = GetActiveTasksForUser(taskId, activeTasks); return(Ok(magazines)); }
public IActionResult DeclineMagazine(int id) { var taskId = _camundaExecutor.GetAssignedTaskId("AdminProveravaPodatke", "administrator"); dynamic content = new { PodaciValidni = new CamundaValueItem <bool>(false) }; var actionSucceeded = _camundaExecutor.CompleteTask(taskId, JsonConvert.SerializeObject(content)); if (actionSucceeded) { var magazine = _dataContext.Magazines.FirstOrDefault(x => x.Id == id); magazine.AdminReviewed = true; magazine.DataValid = false; _dataContext.SaveChanges(); } return(Ok()); }