53 lines
1.6 KiB
Go
53 lines
1.6 KiB
Go
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
//go:build plus
|
|
|
|
package tickets
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/plus"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/tickets/categories"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/tickets/categories/category"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/tickets/ticket"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/tickets/users"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
|
"github.com/iwind/TeaGo"
|
|
)
|
|
|
|
func init() {
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
server.
|
|
Helper(plus.NewHelper(plus.ComponentCodeTicket)).
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeTicket)).
|
|
Data("teaMenu", "tickets").
|
|
|
|
// 工单列表
|
|
Prefix("/tickets").
|
|
Get("", new(IndexAction)).
|
|
|
|
// 工单详情
|
|
Prefix("/tickets/ticket").
|
|
Get("", new(ticket.IndexAction)).
|
|
GetPost("/createLogPopup", new(ticket.CreateLogPopupAction)).
|
|
Post("/deleteLog", new(ticket.DeleteLogAction)).
|
|
|
|
// 分类列表
|
|
Data("teaSubMenu", "categories").
|
|
Prefix("/tickets/categories").
|
|
Get("", new(categories.IndexAction)).
|
|
GetPost("/createPopup", new(categories.CreatePopupAction)).
|
|
|
|
// 分类
|
|
Prefix("/tickets/categories/category").
|
|
Post("/delete", new(category.DeleteAction)).
|
|
GetPost("/updatePopup", new(category.UpdatePopupAction)).
|
|
|
|
// 用户
|
|
Prefix("/tickets/users").
|
|
Post("/options", new(users.OptionsAction)).
|
|
|
|
//
|
|
EndAll()
|
|
})
|
|
}
|