public async Task <ActionResult> UpdateTicket(UpdateTicketModel model) { var result = await TicketWriter.UpdateTicket(User.Identity.GetUserId(), model); await SupportHubContext.Clients.All.TicketUpdated(model.TicketId); return(CloseModalSuccess(result.Message)); }
public async Task <ActionResult> MoveTicket(int ticketId, int queueId) { var result = await TicketWriter.MoveTicket(User.Identity.GetUserId(), ticketId, queueId); await SupportHubContext.Clients.All.TicketUpdated(ticketId); return(Json(result)); }
public async Task <ActionResult> ReopenTicket(int ticketId) { var result = await TicketWriter.UpdateTicketStatus(User.Identity.GetUserId(), ticketId, SupportTicketStatus.Reopened); await SupportHubContext.Clients.All.TicketUpdated(ticketId); return(Json(result)); }
public async Task <ActionResult> CreateTicket(CreateTicketModel model) { if (!ModelState.IsValid) { return(CloseModalError("Error Creating Ticket")); } var result = await TicketWriter.CreateTicket(model); if (result.Success) { return(CloseModalSuccess(result.Message)); } return(CloseModalError(result.Message)); }