client dashboard
This commit is contained in:
26
handlers/client/clientdashboard.handlers.go
Normal file
26
handlers/client/clientdashboard.handlers.go
Normal 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)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user