Exemplo n.º 1
0
        public async Task <ActionResult> CreateTicket()
        {
            var categories = await SupportReader.GetSupportCategories();

            return(View("CreateTicketModal", new CreateSupportTicketModel
            {
                Categories = new List <SupportCategoryModel>(categories)
            }));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        public async Task <ActionResult> UserSupport()
        {
            var response = await SupportReader.GetUserSupportTickets(User.Identity.GetUserId());

            var model = new UserSupportModel
            {
                SupportTickets = response
            };

            return(View(model));
        }
Exemplo n.º 5
0
        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));
        }
Exemplo n.º 6
0
        public async Task <ActionResult> Index()
        {
            var queues = await SupportReader.GetSupportQueues();

            var model = new TicketListViewModel
            {
                Queues = queues
            };

            return(View("TicketList", model));
        }
Exemplo n.º 7
0
        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)
            }));
        }
Exemplo n.º 8
0
        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
            }));
        }
Exemplo n.º 9
0
        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
            }));
        }
Exemplo n.º 10
0
 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));
        }
Exemplo n.º 13
0
        public async Task <ActionResult> GetOpenTickets(GetTicketsRequestModel model)
        {
            var result = DataTable(await SupportReader.GetTickets(model));

            return(result);
        }
Exemplo n.º 14
0
        public async Task <ActionResult> UpdateTicket(int id)
        {
            var model = await SupportReader.GetUpdateTicket(id);

            return(View("UpdateTicketModal", model));
        }
Exemplo n.º 15
0
        public async Task <ActionResult> TicketDetails(int id)
        {
            var model = await SupportReader.GetTicket(id);

            return(View("TicketDetails", model));
        }
Exemplo n.º 16
0
        public async Task <ActionResult> GetTicketDetails(int ticketId)
        {
            var model = await SupportReader.GetTicket(ticketId);

            return(Json(model));
        }