feat: add TenantDetail and UserDetail views with comprehensive functionality
- Implemented TenantDetail.vue to display tenant information, manage tenant status, and handle tenant renewals. - Added user management features in UserDetail.vue, including user status updates and role management. - Integrated data loading for tenant users and orders in TenantDetail.vue. - Included search and pagination functionalities for owned and joined tenants in UserDetail.vue. - Enhanced user experience with toast notifications for success and error messages.
This commit is contained in:
@@ -82,6 +82,11 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
r.tenant.list,
|
||||
Query[dto.TenantFilter]("filter"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Get /super/v1/tenants/:tenantID<int> -> tenant.detail")
|
||||
router.Get("/super/v1/tenants/:tenantID<int>"[len(r.Path()):], DataFunc1(
|
||||
r.tenant.detail,
|
||||
PathParam[int64]("tenantID"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Get /super/v1/tenants/:tenantID<int>/users -> tenant.users")
|
||||
router.Get("/super/v1/tenants/:tenantID<int>/users"[len(r.Path()):], DataFunc2(
|
||||
r.tenant.users,
|
||||
@@ -115,6 +120,11 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
r.user.list,
|
||||
Query[dto.UserPageFilter]("filter"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Get /super/v1/users/:userID<int> -> user.detail")
|
||||
router.Get("/super/v1/users/:userID<int>"[len(r.Path()):], DataFunc1(
|
||||
r.user.detail,
|
||||
PathParam[int64]("userID"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Get /super/v1/users/:userID<int>/tenants -> user.tenants")
|
||||
router.Get("/super/v1/users/:userID<int>/tenants"[len(r.Path()):], DataFunc2(
|
||||
r.user.tenants,
|
||||
|
||||
@@ -15,6 +15,21 @@ import (
|
||||
// @provider
|
||||
type tenant struct{}
|
||||
|
||||
// detail
|
||||
//
|
||||
// @Summary 租户详情
|
||||
// @Tags Super
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param tenantID path int64 true "TenantID"
|
||||
// @Success 200 {object} dto.TenantItem
|
||||
//
|
||||
// @Router /super/v1/tenants/:tenantID<int> [get]
|
||||
// @Bind tenantID path
|
||||
func (*tenant) detail(ctx fiber.Ctx, tenantID int64) (*dto.TenantItem, error) {
|
||||
return services.Tenant.SuperDetail(ctx, tenantID)
|
||||
}
|
||||
|
||||
// list
|
||||
//
|
||||
// @Summary 租户列表
|
||||
|
||||
@@ -13,6 +13,21 @@ import (
|
||||
// @provider
|
||||
type user struct{}
|
||||
|
||||
// detail
|
||||
//
|
||||
// @Summary 用户详情
|
||||
// @Tags Super
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param userID path int64 true "UserID"
|
||||
// @Success 200 {object} dto.UserItem
|
||||
//
|
||||
// @Router /super/v1/users/:userID<int> [get]
|
||||
// @Bind userID path
|
||||
func (*user) detail(ctx fiber.Ctx, userID int64) (*dto.UserItem, error) {
|
||||
return services.User.Detail(ctx, userID)
|
||||
}
|
||||
|
||||
// list
|
||||
//
|
||||
// @Summary 用户列表
|
||||
|
||||
Reference in New Issue
Block a user