feat: add content management feature for superadmin

- Implemented API endpoint for fetching content list with filtering, sorting, and pagination.
- Added DTOs for content items and tenant information.
- Created frontend components for content management, including search and data table functionalities.
- Updated routing to include content management page.
- Enhanced the superadmin menu to navigate to the new content management section.
- Included necessary styles and scripts for the new content management interface.
This commit is contained in:
2025-12-24 16:24:50 +08:00
parent 568f5cda43
commit d60c1e9312
14 changed files with 1373 additions and 8 deletions

View File

@@ -24,10 +24,11 @@ type Routes struct {
log *log.Entry `inject:"false"`
middlewares *middlewares.Middlewares
// Controller instances
auth *auth
order *order
tenant *tenant
user *user
auth *auth
content *content
order *order
tenant *tenant
user *user
}
// Prepare initializes the routes provider with logging configuration.
@@ -55,6 +56,12 @@ func (r *Routes) Register(router fiber.Router) {
r.auth.login,
Body[dto.LoginForm]("form"),
))
// Register routes for controller: content
r.log.Debugf("Registering route: Get /super/v1/contents -> content.list")
router.Get("/super/v1/contents"[len(r.Path()):], DataFunc1(
r.content.list,
Query[dto.SuperContentPageFilter]("filter"),
))
// Register routes for controller: order
r.log.Debugf("Registering route: Get /super/v1/orders -> order.list")
router.Get("/super/v1/orders"[len(r.Path()):], DataFunc1(