diff --git a/handlers/corporate/mcudetail/tabchartkepesertaan.handlers.go b/handlers/corporate/mcudetail/tabchartkepesertaan.handlers.go deleted file mode 100644 index e27569e..0000000 --- a/handlers/corporate/mcudetail/tabchartkepesertaan.handlers.go +++ /dev/null @@ -1 +0,0 @@ -package mcu_corporate_handlers diff --git a/handlers/corporate/mcudetail/tabkepesertaan.handlers.go b/handlers/corporate/mcudetail/tabkepesertaan.handlers.go new file mode 100644 index 0000000..28dbe4c --- /dev/null +++ b/handlers/corporate/mcudetail/tabkepesertaan.handlers.go @@ -0,0 +1,24 @@ +package mcu_corporate_handlers + +import ( + "net/http" + + "github.com/labstack/echo/v4" +) + +type TabKepersertaanServices interface { +} + +type TabKepersertaanHandler struct { + TabKepersertaanServices TabKepersertaanServices +} + +func NewTabKepersertaanHandler(tkh TabKepersertaanServices) *TabKepersertaanHandler { + return &TabKepersertaanHandler{ + TabKepersertaanServices: tkh, + } +} + +func (tkh *TabKepersertaanHandler) HandleShowTabKepesertaan(c echo.Context) error { + return c.String(http.StatusOK, "test") +} diff --git a/handlers/routes.go b/handlers/routes.go index e12204d..282de8c 100644 --- a/handlers/routes.go +++ b/handlers/routes.go @@ -121,6 +121,10 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) { mcudHandr := corporate_handlers.NewMcuDetailHandler(mcudServ) corp.GET("/dashboard_pic/detail/:id", mcudHandr.HandlerShowMcuDetailScreen) + kepesertaanSrvs := mcu_corporate_services.NewTabKepersertaanService(appStore) + kepesertaanHdlr := mcu_corporate_handlers.NewTabKepersertaanHandler(kepesertaanSrvs) + corp.GET("/dashboard_pic/detail/:id/tabkepesertaan", kepesertaanHdlr.HandleShowTabKepesertaan) + kesimpulanSrv := mcu_corporate_services.NewTabKesimpulanServices(appStore) kesimpulanHdr := mcu_corporate_handlers.NewTabKesimpulanHandler(kesimpulanSrv) corp.GET("/dashboard_pic/detail/:id/tabkesimpulan", kesimpulanHdr.HandleShowTabKesimpulanScreen) diff --git a/services/corporate/mcudetail/tabkepesertaan.services.go b/services/corporate/mcudetail/tabkepesertaan.services.go new file mode 100644 index 0000000..d647d15 --- /dev/null +++ b/services/corporate/mcudetail/tabkepesertaan.services.go @@ -0,0 +1,13 @@ +package mcu_corporate_services + +import "cpone/db" + +type TabKepersertaanServices struct { + TabKepersertaanServiceStore db.AppStore +} + +func NewTabKepersertaanService(store db.AppStore) *TabKepersertaanServices { + return &TabKepersertaanServices{ + TabKepersertaanServiceStore: store, + } +} diff --git a/views/corporate/mcu/mcutab/tabchartkepesertaan.templ b/views/corporate/mcu/mcutab/tabkepesertaan.templ similarity index 96% rename from views/corporate/mcu/mcutab/tabchartkepesertaan.templ rename to views/corporate/mcu/mcutab/tabkepesertaan.templ index c906eeb..a0e966f 100644 --- a/views/corporate/mcu/mcutab/tabchartkepesertaan.templ +++ b/views/corporate/mcu/mcutab/tabkepesertaan.templ @@ -1,6 +1,6 @@ package corporate_mcudetail -templ TabChartKepesertaan( +templ TabKepesertaan( chart templ.Component, ) {
diff --git a/views/corporate/mcu/mcutab/tabkepesertaan_templ.go b/views/corporate/mcu/mcutab/tabkepesertaan_templ.go new file mode 100644 index 0000000..c560eac --- /dev/null +++ b/views/corporate/mcu/mcutab/tabkepesertaan_templ.go @@ -0,0 +1,45 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package corporate_mcudetail + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import "context" +import "io" +import "bytes" + +func TabKepesertaan( + chart templ.Component, +) templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Data Kepesertaan MCU

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = chart.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Loading...
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +}