client dashboard

This commit is contained in:
Sas Andy
2024-05-10 09:32:36 +07:00
parent f6d177f2f1
commit ff0f95a67f
5 changed files with 214 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package client_handlers
import (
"cpone/utils"
client_dashboard "cpone/views/client/dashboard"
"github.com/labstack/echo/v4"
)
type ClientDashboardService interface {
}
func NewClientDashboardHandler(us ClientDashboardService) *ClientDashboardHandler {
return &ClientDashboardHandler{
ClientDashboardService: us,
}
}
type ClientDashboardHandler struct {
ClientDashboardService ClientDashboardService
}
func (uh *ClientDashboardHandler) ShowClientDashboard(c echo.Context) error {
helo := client_dashboard.Show()
return utils.View(c, helo)
}

View File

@@ -84,4 +84,6 @@ func SetupRoutesClient(app *echo.Echo, appStore db.AppStore) {
l := client_services.NewServicesMdBahan(appStore)
lh := client_handlers.NewMdBahanHandler(l)
public.GET("/md/bahan", lh.ShowMdBahan)
clientdshbrdHandler := client_handlers.NewClientDashboardHandler(l)
public.GET("", clientdshbrdHandler.ShowClientDashboard)
}