public async Task <ActionResult> CreateTicket() { var categories = await SupportReader.GetSupportCategories(); return(View("CreateTicketModal", new CreateSupportTicketModel { Categories = new List <SupportCategoryModel>(categories) })); }
public async Task <ActionResult> ViewTicket(int ticketId) { var model = await SupportReader.GetSupportTicket(User.Id(), ticketId, false); if (model == null) { return(ViewMessage(ViewMessageModel.Warning("Not Found", "Support ticket #{0} not found.", ticketId))); } return(View(model)); }
public async Task <ActionResult> AdminViewRequest(int requestId) { var model = await SupportReader.AdminGetSupportRequest(requestId); if (model == null) { return(ViewMessage(ViewMessageModel.Warning("Not Found", "Support request #{0} not found.", requestId))); } return(View(model)); }
public async Task <ActionResult> UserSupport() { var response = await SupportReader.GetUserSupportTickets(User.Identity.GetUserId()); var model = new UserSupportModel { SupportTickets = response }; return(View(model)); }
public async Task <ActionResult> SupportTicket(int ticketId) { var response = await SupportReader.GetUserSupportTicket(User.Identity.GetUserId(), ticketId); if (response == null) { return(ViewMessage(new ViewMessageModel(ViewMessageType.Warning, Resources.Support.tickectNotFoundMessageTitle, Resources.Support.tickectNotFoundMessage))); } return(View(response)); }
public async Task <ActionResult> Index() { var queues = await SupportReader.GetSupportQueues(); var model = new TicketListViewModel { Queues = queues }; return(View("TicketList", model)); }
public async Task <ActionResult> Support() { var faq = await SupportReader.GetSupportFaq(); var tickets = await SupportReader.GetSupportTickets(User.Id()); return(View(new SupportUserModel { SupportFaq = new List <SupportFaqModel>(faq), Tickets = new List <SupportTicketModel>(tickets) })); }
public async Task <ActionResult> AdminUpdateCategory(int categoryId) { var category = await SupportReader.AdminGetSupportCategory(categoryId); if (category == null) { return(ViewMessageModal(ViewMessageModel.Error("Not Found", "Category with id {0} not found", categoryId))); } return(View("AdminUpdateCategoryModal", new UpdateSupportCategoryModel { Id = category.Id, Name = category.Name, IsEnabled = category.IsEnabled })); }
public async Task <ActionResult> AdminUpdateFaq(int faqId) { var faq = await SupportReader.AdminGetSupportFaq(faqId); if (faq == null) { return(ViewMessageModal(ViewMessageModel.Error("Not Found", "FAQ with id {0} not found", faqId))); } return(View("AdminUpdateFaqModal", new UpdateSupportFaqModel { Id = faq.Id, Question = faq.Question, Answer = faq.Answer, Order = faq.Order, IsEnabled = faq.IsEnabled })); }
public async Task <ActionResult> GetSupportFaq(DataTablesModel param) { return(DataTable(await SupportReader.AdminGetSupportFaqDataTable(param))); }
public async Task <ActionResult> CreateTicket() { var model = await SupportReader.GetCreateTicket(); return(View("CreateTicketModal", model)); }
public async Task <ActionResult> Index() { var queues = await SupportReader.GetSupportQueues(); return(View(queues)); }
public async Task <ActionResult> GetOpenTickets(GetTicketsRequestModel model) { var result = DataTable(await SupportReader.GetTickets(model)); return(result); }
public async Task <ActionResult> UpdateTicket(int id) { var model = await SupportReader.GetUpdateTicket(id); return(View("UpdateTicketModal", model)); }
public async Task <ActionResult> TicketDetails(int id) { var model = await SupportReader.GetTicket(id); return(View("TicketDetails", model)); }
public async Task <ActionResult> GetTicketDetails(int ticketId) { var model = await SupportReader.GetTicket(ticketId); return(Json(model)); }