From 9ae7e495c6511046e894dabfe5d811d88d9555a8 Mon Sep 17 00:00:00 2001 From: Sas Andy Date: Wed, 8 May 2024 15:26:14 +0700 Subject: [PATCH] refactor structure --- cmd/main.go | 81 +--- .../breadcrumbadmin/breadcrumbadmin.templ | 0 .../breadcrumbadmin/breadcrumbadmin_templ.go | 0 .../component => component}/chart/chart.templ | 0 .../chart/chart_templ.go | 2 +- .../customtextfield/customtextfield.templ | 0 .../customtextfield/customtextfield_templ.go | 10 +- .../customtextfield/customtextfieldv2.templ | 2 +- .../customtextfieldv2_templ.go | 14 +- .../customtextfieldautocomplete.templ | 4 +- .../customtextfieldautocomplete_templ.go | 14 +- .../customtextfieldsearch.templ | 0 .../customtextfieldsearch_templ.go | 16 +- .../component => component}/modal/modal.templ | 0 .../modal/modal_confirmation.templ | 0 .../modal/modal_confirmation_templ.go | 10 +- .../modal/modal_templ.go | 4 +- .../navbar/navbar.templ | 6 +- .../navbar/navbar_templ.go | 8 +- .../pagination/pagination.templ | 0 .../pagination/pagination_templ.go | 4 +- .../sidebar_user_profile.templ | 2 +- .../sidebar_user_profile_templ.go | 6 +- .../sidebarmaster/sidebarmaster.templ | 2 +- .../sidebarmaster/sidebarmaster_templ.go | 10 +- .../component => component}/table/table.templ | 0 .../table/table_templ.go | 4 +- db/db.go | 12 +- go.mod | 2 +- handlers/{ => dev}/chart.handlers.go | 14 +- handlers/{ => dev}/employee.handler.go | 8 +- handlers/{ => dev}/landingpage.handlers.go | 8 +- handlers/{ => dev}/login.handlers.go | 8 +- .../{ => dev}/mastermenuusergroup.handlers.go | 16 +- handlers/{ => dev}/user.handlers.go | 6 +- handlers/{ => dev}/xsample.handlers.go | 9 +- handlers/public/landingpage.handlers.go | 64 +++ handlers/routes.go | 30 +- {views/layout => layout}/base.layout.templ | 0 {views/layout => layout}/base.layout_templ.go | 2 +- {views/layout => layout}/canvas_layout.templ | 0 .../layout => layout}/canvas_layout_templ.go | 2 +- .../layout => layout}/layout_corporate.templ | 8 +- .../layout_corporate_templ.go | 10 +- .../layout => layout}/playground_layout.templ | 0 .../playground_layout_templ.go | 2 +- services/{ => dev}/chart.services.go | 4 +- services/{ => dev}/employee.services.go | 4 +- services/{ => dev}/landingpage.services.go | 4 +- services/{ => dev}/login.services.go | 4 +- .../{ => dev}/mastermenuusergroup.services.go | 8 +- services/{ => dev}/user.services.go | 20 +- services/{ => dev}/xsample.services.go | 4 +- services/public/landingpage.services.go | 287 ++++++++++++ views/{ => dev}/employee/employee.templ | 4 +- views/{ => dev}/employee/employee_templ.go | 4 +- .../employee/employeecomponent.templ | 2 +- .../employee/employeecomponent_templ.go | 12 +- views/dev/landingpage/footer.templ | 131 ++++++ views/{ => dev}/landingpage/footer_templ.go | 8 +- views/{ => dev}/landingpage/landingpage.templ | 2 +- .../landingpage/landingpage_templ.go | 2 +- .../landingpage/medicalservice.templ | 2 +- .../landingpage/medicalservice_templ.go | 18 +- views/{ => dev}/login/login.templ | 2 +- views/{ => dev}/login/login_templ.go | 2 +- views/{ => dev}/login/logincomponent.templ | 0 views/{ => dev}/login/logincomponent_templ.go | 0 .../mastermenuusergroup.templ | 16 +- .../mastermenuusergroup_templ.go | 24 +- .../modaladdusergroup.templ | 4 +- .../modaladdusergroup_templ.go | 4 +- .../modaleditusergroup.templ | 4 +- .../modaleditusergroup_templ.go | 4 +- .../mcu/kelainan_global/kelainan_global.templ | 4 +- .../kelainan_global/kelainan_global_templ.go | 4 +- views/{ => dev}/mcu/peserta/bagian.txt | 0 views/{ => dev}/mcu/peserta/mcupeserta.templ | 4 +- .../{ => dev}/mcu/peserta/mcupeserta_templ.go | 4 +- views/{ => dev}/piechart/piechart.templ | 6 +- views/{ => dev}/piechart/piechart_templ.go | 4 +- .../under_development/under_development.templ | 0 .../under_development_templ.go | 0 views/{ => dev}/user/details.templ | 4 +- views/{ => dev}/user/details_templ.go | 12 +- views/{ => dev}/user/show.templ | 4 +- views/{ => dev}/user/show_templ.go | 10 +- views/{ => dev}/xsample/coba.templ | 8 +- views/{ => dev}/xsample/coba_templ.go | 10 +- views/{ => dev}/xsample/trycounter.templ | 2 +- views/{ => dev}/xsample/trycounter_templ.go | 8 +- views/{ => dev}/xsample/xsample.templ | 2 +- views/{ => dev}/xsample/xsample_templ.go | 4 +- views/landingpage/footer.templ | 132 ------ views/public/landingpage/footer.templ | 131 ++++++ views/public/landingpage/footer_templ.go | 186 ++++++++ views/public/landingpage/landingpage.templ | 354 +++++++++++++++ views/public/landingpage/landingpage_templ.go | 190 ++++++++ views/public/landingpage/medicalservice.templ | 307 +++++++++++++ .../landingpage/medicalservice_templ.go | 414 ++++++++++++++++++ 100 files changed, 2337 insertions(+), 447 deletions(-) rename {views/component => component}/breadcrumbadmin/breadcrumbadmin.templ (100%) rename {views/component => component}/breadcrumbadmin/breadcrumbadmin_templ.go (100%) rename {views/component => component}/chart/chart.templ (100%) rename {views/component => component}/chart/chart_templ.go (96%) rename {views/component => component}/customtextfield/customtextfield.templ (100%) rename {views/component => component}/customtextfield/customtextfield_templ.go (84%) rename {views/component => component}/customtextfield/customtextfieldv2.templ (87%) rename {views/component => component}/customtextfield/customtextfieldv2_templ.go (82%) rename {views/component => component}/customtextfieldautocomplete/customtextfieldautocomplete.templ (96%) rename {views/component => component}/customtextfieldautocomplete/customtextfieldautocomplete_templ.go (92%) rename {views/component => component}/customtextfieldsearch/customtextfieldsearch.templ (100%) rename {views/component => component}/customtextfieldsearch/customtextfieldsearch_templ.go (80%) rename {views/component => component}/modal/modal.templ (100%) rename {views/component => component}/modal/modal_confirmation.templ (100%) rename {views/component => component}/modal/modal_confirmation_templ.go (89%) rename {views/component => component}/modal/modal_templ.go (93%) rename {views/component => component}/navbar/navbar.templ (91%) rename {views/component => component}/navbar/navbar_templ.go (94%) rename {views/component => component}/pagination/pagination.templ (100%) rename {views/component => component}/pagination/pagination_templ.go (92%) rename {views/component => component}/sidebar_user_profile/sidebar_user_profile.templ (97%) rename {views/component => component}/sidebar_user_profile/sidebar_user_profile_templ.go (94%) rename {views/component => component}/sidebarmaster/sidebarmaster.templ (98%) rename {views/component => component}/sidebarmaster/sidebarmaster_templ.go (94%) rename {views/component => component}/table/table.templ (100%) rename {views/component => component}/table/table_templ.go (93%) rename handlers/{ => dev}/chart.handlers.go (92%) rename handlers/{ => dev}/employee.handler.go (87%) rename handlers/{ => dev}/landingpage.handlers.go (91%) rename handlers/{ => dev}/login.handlers.go (84%) rename handlers/{ => dev}/mastermenuusergroup.handlers.go (93%) rename handlers/{ => dev}/user.handlers.go (91%) rename handlers/{ => dev}/xsample.handlers.go (91%) create mode 100644 handlers/public/landingpage.handlers.go rename {views/layout => layout}/base.layout.templ (100%) rename {views/layout => layout}/base.layout_templ.go (95%) rename {views/layout => layout}/canvas_layout.templ (100%) rename {views/layout => layout}/canvas_layout_templ.go (97%) rename {views/layout => layout}/layout_corporate.templ (96%) rename {views/layout => layout}/layout_corporate_templ.go (96%) rename {views/layout => layout}/playground_layout.templ (100%) rename {views/layout => layout}/playground_layout_templ.go (97%) rename services/{ => dev}/chart.services.go (99%) rename services/{ => dev}/employee.services.go (96%) rename services/{ => dev}/landingpage.services.go (99%) rename services/{ => dev}/login.services.go (93%) rename services/{ => dev}/mastermenuusergroup.services.go (98%) rename services/{ => dev}/user.services.go (79%) rename services/{ => dev}/xsample.services.go (99%) create mode 100644 services/public/landingpage.services.go rename views/{ => dev}/employee/employee.templ (94%) rename views/{ => dev}/employee/employee_templ.go (98%) rename views/{ => dev}/employee/employeecomponent.templ (96%) rename views/{ => dev}/employee/employeecomponent_templ.go (95%) create mode 100644 views/dev/landingpage/footer.templ rename views/{ => dev}/landingpage/footer_templ.go (98%) rename views/{ => dev}/landingpage/landingpage.templ (99%) rename views/{ => dev}/landingpage/landingpage_templ.go (99%) rename views/{ => dev}/landingpage/medicalservice.templ (99%) rename views/{ => dev}/landingpage/medicalservice_templ.go (97%) rename views/{ => dev}/login/login.templ (97%) rename views/{ => dev}/login/login_templ.go (99%) rename views/{ => dev}/login/logincomponent.templ (100%) rename views/{ => dev}/login/logincomponent_templ.go (100%) rename views/{ => dev}/mastermenuusergroup/mastermenuusergroup.templ (91%) rename views/{ => dev}/mastermenuusergroup/mastermenuusergroup_templ.go (95%) rename views/{ => dev}/mastermenuusergroup/modaladdusergroup.templ (88%) rename views/{ => dev}/mastermenuusergroup/modaladdusergroup_templ.go (96%) rename views/{ => dev}/mastermenuusergroup/modaleditusergroup.templ (92%) rename views/{ => dev}/mastermenuusergroup/modaleditusergroup_templ.go (97%) rename views/{ => dev}/mcu/kelainan_global/kelainan_global.templ (95%) rename views/{ => dev}/mcu/kelainan_global/kelainan_global_templ.go (98%) rename views/{ => dev}/mcu/peserta/bagian.txt (100%) rename views/{ => dev}/mcu/peserta/mcupeserta.templ (96%) rename views/{ => dev}/mcu/peserta/mcupeserta_templ.go (98%) rename views/{ => dev}/piechart/piechart.templ (85%) rename views/{ => dev}/piechart/piechart_templ.go (97%) rename views/{ => dev}/under_development/under_development.templ (100%) rename views/{ => dev}/under_development/under_development_templ.go (100%) rename views/{ => dev}/user/details.templ (91%) rename views/{ => dev}/user/details_templ.go (95%) rename views/{ => dev}/user/show.templ (92%) rename views/{ => dev}/user/show_templ.go (96%) rename views/{ => dev}/xsample/coba.templ (90%) rename views/{ => dev}/xsample/coba_templ.go (96%) rename views/{ => dev}/xsample/trycounter.templ (93%) rename views/{ => dev}/xsample/trycounter_templ.go (97%) rename views/{ => dev}/xsample/xsample.templ (81%) rename views/{ => dev}/xsample/xsample_templ.go (97%) delete mode 100644 views/landingpage/footer.templ create mode 100644 views/public/landingpage/footer.templ create mode 100644 views/public/landingpage/footer_templ.go create mode 100644 views/public/landingpage/landingpage.templ create mode 100644 views/public/landingpage/landingpage_templ.go create mode 100644 views/public/landingpage/medicalservice.templ create mode 100644 views/public/landingpage/medicalservice_templ.go diff --git a/cmd/main.go b/cmd/main.go index 536569d..6ff246f 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,11 +1,9 @@ package main import ( - "net/http" + "cpone/db" + "cpone/handlers" - "github.com/emarifer/go-templ-project-structure/db" - "github.com/emarifer/go-templ-project-structure/handlers" - "github.com/emarifer/go-templ-project-structure/services" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" ) @@ -21,79 +19,16 @@ func main() { app.Static("/", "assets") app.Use(middleware.Logger()) - - // We redirect the root route to the "/user" route - app.GET("/", func(c echo.Context) error { - return c.Redirect(http.StatusMovedPermanently, "/landing_page/") - }) - - app.GET("/pie_chart", func(c echo.Context) error { - return c.Redirect(http.StatusMovedPermanently, "/pie_chart/") - }) - - uStore, err := db.NewUserStore(dbName) + appStore, err := db.NewAppStore(dbName) if err != nil { app.Logger.Fatalf("failed to create store: %s", err) } - us := services.NewServicesUser(services.User{}, uStore) - - h := handlers.New(us) - - handlers.SetupRoutes(app, h) - - LStore, err := db.NewLoginStore(dbName) - if err != nil { - app.Logger.Fatalf("failed to create store: %s", err) - } - l := services.NewServicesLogin(services.Login{}, LStore) - lh := handlers.NewLoginHandler(l) - handlers.SetupRoutesLogin(app, lh) - - xStore, err := db.NewXsampleStore(dbName) - if err != nil { - app.Logger.Fatalf("failed to create store: %s", err) - } - xs := services.NewServicesXsample(services.Xsample{}, xStore) - xh := handlers.NewXsampleHandler(xs) - handlers.SetupRoutesXsample(app, xh) - - LpStore, err := db.NewLandingPageStore(dbName) - if err != nil { - app.Logger.Fatalf("failed to create store: %s", err) - } - lps := services.NewServicesLandingPage(services.LandingPage{}, LpStore) - lphs := handlers.NewLandingPageHandler(lps) - // handlers.SetupRoutesLandingPage(app, lphs) - - Lpmastermenustore, err := db.NewMasterMenuUserGroupStore(dbName) - if err != nil { - app.Logger.Fatalf("failed to create store: %s", err) - } - mastermenuservices := services.NewServicesMasterMenuUserGroup(services.MasterMenu{}, Lpmastermenustore) - mastermenuhandler := handlers.NewMasterMenuUserGroupHandler(mastermenuservices) - handlers.SetupRoutesLandingPage(app, lphs, mastermenuhandler) - - LpchartStore, err := db.NewPieChartStore(dbName) - if err != nil { - app.Logger.Fatalf("failed to create store: %s", err) - } - bchart, err := db.NewBarChartStore(dbName) - if err != nil { - app.Logger.Fatalf("failed to create store: %s", err) - } - - lpchart := services.NewServicesPiechart(services.Piechart{}, services.Barchart{}, LpchartStore, bchart) - lphsx := handlers.NewPiechartHandler(lpchart) - handlers.SetupRoutesPieChart(app, lphsx) - - eStore, err := db.NewEmployeeStore(dbName) - if err != nil { - app.Logger.Fatalf("failed to create store: %s", err) - } - el := services.NewServicesEmployee(services.Employee{}, eStore) - ehs := handlers.NewEmployeeHandler(el) - handlers.SetupRoutesEmployee(app, ehs) + // SETUP ROUT PUBLIC + handlers.SetupRoutesPublic(app, appStore) + // SETUP ROUT CORPORATE + // SETUP ROUT CLIENT + // SETUP ROUT DEV app.Logger.Fatal(app.Start(":5000")) } diff --git a/views/component/breadcrumbadmin/breadcrumbadmin.templ b/component/breadcrumbadmin/breadcrumbadmin.templ similarity index 100% rename from views/component/breadcrumbadmin/breadcrumbadmin.templ rename to component/breadcrumbadmin/breadcrumbadmin.templ diff --git a/views/component/breadcrumbadmin/breadcrumbadmin_templ.go b/component/breadcrumbadmin/breadcrumbadmin_templ.go similarity index 100% rename from views/component/breadcrumbadmin/breadcrumbadmin_templ.go rename to component/breadcrumbadmin/breadcrumbadmin_templ.go diff --git a/views/component/chart/chart.templ b/component/chart/chart.templ similarity index 100% rename from views/component/chart/chart.templ rename to component/chart/chart.templ diff --git a/views/component/chart/chart_templ.go b/component/chart/chart_templ.go similarity index 96% rename from views/component/chart/chart_templ.go rename to component/chart/chart_templ.go index 8c688c0..f4049b8 100644 --- a/views/component/chart/chart_templ.go +++ b/component/chart/chart_templ.go @@ -30,7 +30,7 @@ func ShowChart(idDiv string, udata string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(idDiv) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\chart\chart.templ`, Line: 4, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\chart\chart.templ`, Line: 4, Col: 19} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/views/component/customtextfield/customtextfield.templ b/component/customtextfield/customtextfield.templ similarity index 100% rename from views/component/customtextfield/customtextfield.templ rename to component/customtextfield/customtextfield.templ diff --git a/views/component/customtextfield/customtextfield_templ.go b/component/customtextfield/customtextfield_templ.go similarity index 84% rename from views/component/customtextfield/customtextfield_templ.go rename to component/customtextfield/customtextfield_templ.go index 52c41ac..20f8067 100644 --- a/views/component/customtextfield/customtextfield_templ.go +++ b/component/customtextfield/customtextfield_templ.go @@ -33,7 +33,7 @@ func MainCustomTextField(inpLabelText, var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(inpLabelText) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfield.templ`, Line: 8, Col: 90} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfield.templ`, Line: 8, Col: 90} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -46,7 +46,7 @@ func MainCustomTextField(inpLabelText, var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(inpName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfield.templ`, Line: 10, Col: 15} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfield.templ`, Line: 10, Col: 15} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -59,7 +59,7 @@ func MainCustomTextField(inpLabelText, var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(inpName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfield.templ`, Line: 11, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfield.templ`, Line: 11, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -72,7 +72,7 @@ func MainCustomTextField(inpLabelText, var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(inpType) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfield.templ`, Line: 12, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfield.templ`, Line: 12, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -85,7 +85,7 @@ func MainCustomTextField(inpLabelText, var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(inpPlaceHolder) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfield.templ`, Line: 13, Col: 31} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfield.templ`, Line: 13, Col: 31} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { diff --git a/views/component/customtextfield/customtextfieldv2.templ b/component/customtextfield/customtextfieldv2.templ similarity index 87% rename from views/component/customtextfield/customtextfieldv2.templ rename to component/customtextfield/customtextfieldv2.templ index c24ff90..ac99c0f 100644 --- a/views/component/customtextfield/customtextfieldv2.templ +++ b/component/customtextfield/customtextfieldv2.templ @@ -1,6 +1,6 @@ package customtextfield -import "github.com/emarifer/go-templ-project-structure/models" +import "cpone/models" templ CustomTextFieldv2(inp models.CustomTextFieldv2Prm) {
diff --git a/views/component/customtextfield/customtextfieldv2_templ.go b/component/customtextfield/customtextfieldv2_templ.go similarity index 82% rename from views/component/customtextfield/customtextfieldv2_templ.go rename to component/customtextfield/customtextfieldv2_templ.go index 8b20ddb..0b478ea 100644 --- a/views/component/customtextfield/customtextfieldv2_templ.go +++ b/component/customtextfield/customtextfieldv2_templ.go @@ -10,7 +10,7 @@ import "context" import "io" import "bytes" -import "github.com/emarifer/go-templ-project-structure/models" +import "cpone/models" func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) templ.Component { return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { @@ -32,7 +32,7 @@ func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(inp.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfieldv2.templ`, Line: 7, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfieldv2.templ`, Line: 7, Col: 87} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -45,7 +45,7 @@ func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(inp.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfieldv2.templ`, Line: 9, Col: 16} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfieldv2.templ`, Line: 9, Col: 16} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -58,7 +58,7 @@ func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(inp.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfieldv2.templ`, Line: 10, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfieldv2.templ`, Line: 10, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -71,7 +71,7 @@ func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(inp.Type) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfieldv2.templ`, Line: 11, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfieldv2.templ`, Line: 11, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -84,7 +84,7 @@ func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(inp.Placeholder) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfieldv2.templ`, Line: 12, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfieldv2.templ`, Line: 12, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -97,7 +97,7 @@ func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(inp.Value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfield\customtextfieldv2.templ`, Line: 13, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfield\customtextfieldv2.templ`, Line: 13, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { diff --git a/views/component/customtextfieldautocomplete/customtextfieldautocomplete.templ b/component/customtextfieldautocomplete/customtextfieldautocomplete.templ similarity index 96% rename from views/component/customtextfieldautocomplete/customtextfieldautocomplete.templ rename to component/customtextfieldautocomplete/customtextfieldautocomplete.templ index 3fbbe69..ada7166 100644 --- a/views/component/customtextfieldautocomplete/customtextfieldautocomplete.templ +++ b/component/customtextfieldautocomplete/customtextfieldautocomplete.templ @@ -1,8 +1,8 @@ package customtextfieldautocomplete; import ( - "github.com/emarifer/go-templ-project-structure/views/layout" - "github.com/emarifer/go-templ-project-structure/services" + "cpone/layout" + services "cpone/services/dev" ) templ MainCustomAutoComplete(value string) { diff --git a/views/component/customtextfieldautocomplete/customtextfieldautocomplete_templ.go b/component/customtextfieldautocomplete/customtextfieldautocomplete_templ.go similarity index 92% rename from views/component/customtextfieldautocomplete/customtextfieldautocomplete_templ.go rename to component/customtextfieldautocomplete/customtextfieldautocomplete_templ.go index b65d634..c428911 100644 --- a/views/component/customtextfieldautocomplete/customtextfieldautocomplete_templ.go +++ b/component/customtextfieldautocomplete/customtextfieldautocomplete_templ.go @@ -11,8 +11,8 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" + services "cpone/services/dev" ) func MainCustomAutoComplete(value string) templ.Component { @@ -35,7 +35,7 @@ func MainCustomAutoComplete(value string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 21, Col: 16} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 21, Col: 16} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -107,7 +107,7 @@ func ListCustomAutoComplete(limit string, param string, totalDataInt int, foundC var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("/client/autoCompleteSetValue/" + d.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 43, Col: 54} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 43, Col: 54} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -120,7 +120,7 @@ func ListCustomAutoComplete(limit string, param string, totalDataInt int, foundC var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(d.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 48, Col: 13} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 48, Col: 13} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -139,7 +139,7 @@ func ListCustomAutoComplete(limit string, param string, totalDataInt int, foundC var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(textFound) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 59, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 59, Col: 76} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -162,7 +162,7 @@ func ListCustomAutoComplete(limit string, param string, totalDataInt int, foundC var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("/client/autoCompleteLoadMore/" + pageOf + "/" + param + "/" + limit) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 67, Col: 84} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldautocomplete\customtextfieldautocomplete.templ`, Line: 67, Col: 84} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { diff --git a/views/component/customtextfieldsearch/customtextfieldsearch.templ b/component/customtextfieldsearch/customtextfieldsearch.templ similarity index 100% rename from views/component/customtextfieldsearch/customtextfieldsearch.templ rename to component/customtextfieldsearch/customtextfieldsearch.templ diff --git a/views/component/customtextfieldsearch/customtextfieldsearch_templ.go b/component/customtextfieldsearch/customtextfieldsearch_templ.go similarity index 80% rename from views/component/customtextfieldsearch/customtextfieldsearch_templ.go rename to component/customtextfieldsearch/customtextfieldsearch_templ.go index cd7cf7c..6fdae54 100644 --- a/views/component/customtextfieldsearch/customtextfieldsearch_templ.go +++ b/component/customtextfieldsearch/customtextfieldsearch_templ.go @@ -37,7 +37,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(inpType) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 13, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 13, Col: 22} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -50,7 +50,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(inpName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 14, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 14, Col: 22} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -63,7 +63,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(inpName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 15, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 15, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -76,7 +76,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(inpPlaceHolder) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 16, Col: 36} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 16, Col: 36} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -89,7 +89,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(hxPost) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 17, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 17, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -102,7 +102,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hxTrigger) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 18, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 18, Col: 30} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -115,7 +115,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hxTarget) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 19, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 19, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -128,7 +128,7 @@ func MainCustomTextFieldSearch( var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hxIndicator) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 20, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 20, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { diff --git a/views/component/modal/modal.templ b/component/modal/modal.templ similarity index 100% rename from views/component/modal/modal.templ rename to component/modal/modal.templ diff --git a/views/component/modal/modal_confirmation.templ b/component/modal/modal_confirmation.templ similarity index 100% rename from views/component/modal/modal_confirmation.templ rename to component/modal/modal_confirmation.templ diff --git a/views/component/modal/modal_confirmation_templ.go b/component/modal/modal_confirmation_templ.go similarity index 89% rename from views/component/modal/modal_confirmation_templ.go rename to component/modal/modal_confirmation_templ.go index eeb1046..0c18d87 100644 --- a/views/component/modal/modal_confirmation_templ.go +++ b/component/modal/modal_confirmation_templ.go @@ -37,7 +37,7 @@ func ModalConfirmation( var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 13, Col: 9} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_confirmation.templ`, Line: 13, Col: 9} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -50,7 +50,7 @@ func ModalConfirmation( var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(modalTitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 23, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_confirmation.templ`, Line: 23, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -71,7 +71,7 @@ func ModalConfirmation( var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(message) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 28, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_confirmation.templ`, Line: 28, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -89,7 +89,7 @@ func ModalConfirmation( var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(v) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 33, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_confirmation.templ`, Line: 33, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -112,7 +112,7 @@ func ModalConfirmation( var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(v) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 39, Col: 13} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_confirmation.templ`, Line: 39, Col: 13} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { diff --git a/views/component/modal/modal_templ.go b/component/modal/modal_templ.go similarity index 93% rename from views/component/modal/modal_templ.go rename to component/modal/modal_templ.go index 7f79716..265f7e4 100644 --- a/views/component/modal/modal_templ.go +++ b/component/modal/modal_templ.go @@ -30,7 +30,7 @@ func Modal(modalID string, modalTitle string, modalBody templ.Component, modalAc var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(modalID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal.templ`, Line: 7, Col: 14} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal.templ`, Line: 7, Col: 14} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -43,7 +43,7 @@ func Modal(modalID string, modalTitle string, modalBody templ.Component, modalAc var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(modalTitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal.templ`, Line: 17, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal.templ`, Line: 17, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/views/component/navbar/navbar.templ b/component/navbar/navbar.templ similarity index 91% rename from views/component/navbar/navbar.templ rename to component/navbar/navbar.templ index c892f01..aac478f 100644 --- a/views/component/navbar/navbar.templ +++ b/component/navbar/navbar.templ @@ -1,9 +1,9 @@ package navbar import ( - "github.com/emarifer/go-templ-project-structure/views/component/sidebarmaster" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/models" + "cpone/component/sidebarmaster" + services "cpone/services/dev" + "cpone/models" ) templ Navbar(dataUser models.User) { diff --git a/views/component/navbar/navbar_templ.go b/component/navbar/navbar_templ.go similarity index 94% rename from views/component/navbar/navbar_templ.go rename to component/navbar/navbar_templ.go index 4b166a5..be4fa34 100644 --- a/views/component/navbar/navbar_templ.go +++ b/component/navbar/navbar_templ.go @@ -11,9 +11,9 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/component/sidebarmaster" + "cpone/component/sidebarmaster" + "cpone/models" + services "cpone/services/dev" ) func Navbar(dataUser models.User) templ.Component { @@ -36,7 +36,7 @@ func Navbar(dataUser models.User) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\navbar\navbar.templ`, Line: 29, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\navbar\navbar.templ`, Line: 29, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/views/component/pagination/pagination.templ b/component/pagination/pagination.templ similarity index 100% rename from views/component/pagination/pagination.templ rename to component/pagination/pagination.templ diff --git a/views/component/pagination/pagination_templ.go b/component/pagination/pagination_templ.go similarity index 92% rename from views/component/pagination/pagination_templ.go rename to component/pagination/pagination_templ.go index eaf1a44..51b88bc 100644 --- a/views/component/pagination/pagination_templ.go +++ b/component/pagination/pagination_templ.go @@ -38,7 +38,7 @@ func Pagination(length int, currentPage int) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i + 1)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\pagination\pagination.templ`, Line: 10, Col: 118} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\pagination\pagination.templ`, Line: 10, Col: 118} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -56,7 +56,7 @@ func Pagination(length int, currentPage int) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i + 1)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\pagination\pagination.templ`, Line: 12, Col: 93} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\pagination\pagination.templ`, Line: 12, Col: 93} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/views/component/sidebar_user_profile/sidebar_user_profile.templ b/component/sidebar_user_profile/sidebar_user_profile.templ similarity index 97% rename from views/component/sidebar_user_profile/sidebar_user_profile.templ rename to component/sidebar_user_profile/sidebar_user_profile.templ index 7e2242c..06b932f 100644 --- a/views/component/sidebar_user_profile/sidebar_user_profile.templ +++ b/component/sidebar_user_profile/sidebar_user_profile.templ @@ -1,6 +1,6 @@ package sidebaruserprofile -import "github.com/emarifer/go-templ-project-structure/models" +import "cpone/models" templ Navbaruserprofile(dataUser models.User) {
diff --git a/views/component/sidebar_user_profile/sidebar_user_profile_templ.go b/component/sidebar_user_profile/sidebar_user_profile_templ.go similarity index 94% rename from views/component/sidebar_user_profile/sidebar_user_profile_templ.go rename to component/sidebar_user_profile/sidebar_user_profile_templ.go index 779eb04..2723c93 100644 --- a/views/component/sidebar_user_profile/sidebar_user_profile_templ.go +++ b/component/sidebar_user_profile/sidebar_user_profile_templ.go @@ -10,7 +10,7 @@ import "context" import "io" import "bytes" -import "github.com/emarifer/go-templ-project-structure/models" +import "cpone/models" func Navbaruserprofile(dataUser models.User) templ.Component { return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { @@ -72,7 +72,7 @@ func ProfileHeader(dataUser models.User) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.UserFullName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 52, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 52, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -85,7 +85,7 @@ func ProfileHeader(dataUser models.User) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.UserPosition) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 55, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 55, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { diff --git a/views/component/sidebarmaster/sidebarmaster.templ b/component/sidebarmaster/sidebarmaster.templ similarity index 98% rename from views/component/sidebarmaster/sidebarmaster.templ rename to component/sidebarmaster/sidebarmaster.templ index c75d120..7dda4f3 100644 --- a/views/component/sidebarmaster/sidebarmaster.templ +++ b/component/sidebarmaster/sidebarmaster.templ @@ -1,7 +1,7 @@ package sidebarmaster import ( - "github.com/emarifer/go-templ-project-structure/services" + services "cpone/services/dev" ) templ MenuDashboard(ParentMenuName string, ParentMenuUrl string) { diff --git a/views/component/sidebarmaster/sidebarmaster_templ.go b/component/sidebarmaster/sidebarmaster_templ.go similarity index 94% rename from views/component/sidebarmaster/sidebarmaster_templ.go rename to component/sidebarmaster/sidebarmaster_templ.go index 7d52924..5d13e4e 100644 --- a/views/component/sidebarmaster/sidebarmaster_templ.go +++ b/component/sidebarmaster/sidebarmaster_templ.go @@ -11,7 +11,7 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/services" + services "cpone/services/dev" ) func MenuDashboard(ParentMenuName string, ParentMenuUrl string) templ.Component { @@ -43,7 +43,7 @@ func MenuDashboard(ParentMenuName string, ParentMenuUrl string) templ.Component var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(ParentMenuName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebarmaster\sidebarmaster.templ`, Line: 39, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebarmaster\sidebarmaster.templ`, Line: 39, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -89,7 +89,7 @@ func ListMenuChildren(ChildrenMenuURL string, ChildrenMenuName string) templ.Com var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(ChildrenMenuName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebarmaster\sidebarmaster.templ`, Line: 48, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebarmaster\sidebarmaster.templ`, Line: 48, Col: 45} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -126,7 +126,7 @@ func ListMenuNavbar(ParentMenuName string, datamenuchildren []services.ChildrenM var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(ParentMenuName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebarmaster\sidebarmaster.templ`, Line: 84, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebarmaster\sidebarmaster.templ`, Line: 84, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -139,7 +139,7 @@ func ListMenuNavbar(ParentMenuName string, datamenuchildren []services.ChildrenM var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(ParentMenuName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebarmaster\sidebarmaster.templ`, Line: 94, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebarmaster\sidebarmaster.templ`, Line: 94, Col: 46} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { diff --git a/views/component/table/table.templ b/component/table/table.templ similarity index 100% rename from views/component/table/table.templ rename to component/table/table.templ diff --git a/views/component/table/table_templ.go b/component/table/table_templ.go similarity index 93% rename from views/component/table/table_templ.go rename to component/table/table_templ.go index 78877c7..16dcc2b 100644 --- a/views/component/table/table_templ.go +++ b/component/table/table_templ.go @@ -41,7 +41,7 @@ func Table(thName []string, thWidth []string, trComponent templ.Component, pagin var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(thWidth[i]) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\table\table.templ`, Line: 12, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\table.templ`, Line: 12, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -54,7 +54,7 @@ func Table(thName []string, thWidth []string, trComponent templ.Component, pagin var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(item) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\table\table.templ`, Line: 12, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\table.templ`, Line: 12, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/db/db.go b/db/db.go index a64b886..4b2d561 100644 --- a/db/db.go +++ b/db/db.go @@ -8,21 +8,17 @@ import ( _ "github.com/glebarez/go-sqlite" ) -type UserStore struct { +type AppStore struct { Db *sql.DB } -func NewUserStore(dbName string) (UserStore, error) { +func NewAppStore(dbName string) (AppStore, error) { Db, err := getConnection(dbName) if err != nil { - return UserStore{}, err + return AppStore{}, err } - if err := createMigrations(dbName, Db); err != nil { - return UserStore{}, err - } - - return UserStore{ + return AppStore{ Db, }, nil } diff --git a/go.mod b/go.mod index bda6003..f7853db 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/emarifer/go-templ-project-structure +module cpone go 1.21.0 diff --git a/handlers/chart.handlers.go b/handlers/dev/chart.handlers.go similarity index 92% rename from handlers/chart.handlers.go rename to handlers/dev/chart.handlers.go index 20b5ff5..c3636a6 100644 --- a/handlers/chart.handlers.go +++ b/handlers/dev/chart.handlers.go @@ -1,4 +1,4 @@ -package handlers +package dev_handlers import ( "crypto/md5" @@ -8,12 +8,14 @@ import ( "strings" "time" + kelainanglobal "cpone/views/dev/mcu/kelainan_global" + mcupeserta "cpone/views/dev/mcu/peserta" + "cpone/views/dev/piechart" + "cpone/views/dev/xsample" + + services "cpone/services/dev" + "github.com/a-h/templ" - "github.com/emarifer/go-templ-project-structure/services" - kelainanglobal "github.com/emarifer/go-templ-project-structure/views/mcu/kelainan_global" - mcupeserta "github.com/emarifer/go-templ-project-structure/views/mcu/peserta" - "github.com/emarifer/go-templ-project-structure/views/piechart" - "github.com/emarifer/go-templ-project-structure/views/xsample" "github.com/labstack/echo/v4" ) diff --git a/handlers/employee.handler.go b/handlers/dev/employee.handler.go similarity index 87% rename from handlers/employee.handler.go rename to handlers/dev/employee.handler.go index 971c31a..ae154cc 100644 --- a/handlers/employee.handler.go +++ b/handlers/dev/employee.handler.go @@ -1,11 +1,13 @@ -package handlers +package dev_handlers import ( "fmt" + "cpone/views/dev/employee" + + services "cpone/services/dev" + "github.com/a-h/templ" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/employee" "github.com/labstack/echo/v4" ) diff --git a/handlers/landingpage.handlers.go b/handlers/dev/landingpage.handlers.go similarity index 91% rename from handlers/landingpage.handlers.go rename to handlers/dev/landingpage.handlers.go index 1e4510d..75d2504 100644 --- a/handlers/landingpage.handlers.go +++ b/handlers/dev/landingpage.handlers.go @@ -1,11 +1,13 @@ -package handlers +package dev_handlers import ( "fmt" + landingpage "cpone/views/dev/landingpage" + "github.com/a-h/templ" - "github.com/emarifer/go-templ-project-structure/services" - landingpage "github.com/emarifer/go-templ-project-structure/views/landingpage" + + services "cpone/services/dev" "github.com/labstack/echo/v4" ) diff --git a/handlers/login.handlers.go b/handlers/dev/login.handlers.go similarity index 84% rename from handlers/login.handlers.go rename to handlers/dev/login.handlers.go index 1559a8c..935dc62 100644 --- a/handlers/login.handlers.go +++ b/handlers/dev/login.handlers.go @@ -1,9 +1,11 @@ -package handlers +package dev_handlers import ( + "cpone/views/dev/login" + "github.com/a-h/templ" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/login" + + services "cpone/services/dev" "github.com/labstack/echo/v4" ) diff --git a/handlers/mastermenuusergroup.handlers.go b/handlers/dev/mastermenuusergroup.handlers.go similarity index 93% rename from handlers/mastermenuusergroup.handlers.go rename to handlers/dev/mastermenuusergroup.handlers.go index 4383882..aff3189 100644 --- a/handlers/mastermenuusergroup.handlers.go +++ b/handlers/dev/mastermenuusergroup.handlers.go @@ -1,17 +1,19 @@ -package handlers +package dev_handlers import ( "fmt" "net/url" "strconv" + "cpone/component/customtextfieldautocomplete" + "cpone/component/pagination" + tablecomponent "cpone/component/table" + "cpone/models" + mastermenuusergroup "cpone/views/dev/mastermenuusergroup" + + services "cpone/services/dev" + "github.com/a-h/templ" - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/component/customtextfieldautocomplete" - "github.com/emarifer/go-templ-project-structure/views/component/pagination" - tablecomponent "github.com/emarifer/go-templ-project-structure/views/component/table" - mastermenuusergroup "github.com/emarifer/go-templ-project-structure/views/mastermenuusergroup" "github.com/labstack/echo/v4" ) diff --git a/handlers/user.handlers.go b/handlers/dev/user.handlers.go similarity index 91% rename from handlers/user.handlers.go rename to handlers/dev/user.handlers.go index 71d53e8..d901b66 100644 --- a/handlers/user.handlers.go +++ b/handlers/dev/user.handlers.go @@ -1,14 +1,14 @@ -package handlers +package dev_handlers import ( + services "cpone/services/dev" + "cpone/views/dev/user" "fmt" "net/http" "strconv" "strings" "github.com/a-h/templ" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/user" "github.com/labstack/echo/v4" "golang.org/x/text/cases" diff --git a/handlers/xsample.handlers.go b/handlers/dev/xsample.handlers.go similarity index 91% rename from handlers/xsample.handlers.go rename to handlers/dev/xsample.handlers.go index 8292816..6d65a59 100644 --- a/handlers/xsample.handlers.go +++ b/handlers/dev/xsample.handlers.go @@ -1,13 +1,14 @@ -package handlers +package dev_handlers import ( "fmt" "strconv" + services "cpone/services/dev" + "cpone/utils" + "cpone/views/dev/xsample" + "github.com/a-h/templ" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/utils" - "github.com/emarifer/go-templ-project-structure/views/xsample" "github.com/labstack/echo/v4" ) diff --git a/handlers/public/landingpage.handlers.go b/handlers/public/landingpage.handlers.go new file mode 100644 index 0000000..39b4f22 --- /dev/null +++ b/handlers/public/landingpage.handlers.go @@ -0,0 +1,64 @@ +package public_handlers + +import ( + public_services "cpone/services/public" + public_landingpage "cpone/views/public/landingpage" + "fmt" + + "github.com/a-h/templ" + + "github.com/labstack/echo/v4" +) + +type LandingPageService interface { + GetClientService() ([]public_services.ClientService, error) + GetClientAdvantage() ([]public_services.AdvantageClient, error) + GetPromotionList() ([]public_services.Promotion, error) + GetFooterNavList() ([]public_services.FooterNav, error) +} + +func NewLandingPageHandler(us LandingPageService) *LandingPageHandler { + return &LandingPageHandler{ + LandingPageService: us, + } +} + +type LandingPageHandler struct { + LandingPageService LandingPageService +} + +func (uh *LandingPageHandler) ShowLandingPage(c echo.Context) error { + udata, err := uh.LandingPageService.GetClientService() + if err != nil { + // fmt.Println(err) + return err + } + adData, err := uh.LandingPageService.GetClientAdvantage() + if err != nil { + // fmt.Println(err) + return err + } + lpData, err := uh.LandingPageService.GetPromotionList() + if err != nil { + // fmt.Println(err) + return err + } + ftNav, err := uh.LandingPageService.GetFooterNavList() + if err != nil { + return err + } + fmt.Printf("%+v\n", udata) + helo := public_landingpage.ShowLandingPage("Hello World", + public_landingpage.MainLandingPage(public_landingpage.ListMedicalService(udata), + public_landingpage.ListAdvantage(adData), public_landingpage.ListPromotion(lpData), + public_landingpage.FooterSection(ftNav)), + public_landingpage.CssLandingPage(), + public_landingpage.JsLandingPage()) + return uh.View(c, helo) +} + +func (uh *LandingPageHandler) View(c echo.Context, cmp templ.Component) error { + c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) + + return cmp.Render(c.Request().Context(), c.Response().Writer) +} diff --git a/handlers/routes.go b/handlers/routes.go index 14aab5b..3387f84 100644 --- a/handlers/routes.go +++ b/handlers/routes.go @@ -1,8 +1,16 @@ package handlers -import "github.com/labstack/echo/v4" +import ( + dev_handlers "cpone/handlers/dev" + public_handlers "cpone/handlers/public" + public_services "cpone/services/public" -func SetupRoutes(app *echo.Echo, h *UserHandler) { + "cpone/db" + + "github.com/labstack/echo/v4" +) + +func SetupRoutes(app *echo.Echo, h *dev_handlers.UserHandler) { group := app.Group("/user") group.GET("", h.HandlerShowUsers) @@ -10,19 +18,19 @@ func SetupRoutes(app *echo.Echo, h *UserHandler) { } -//PLAYGROUND TESTING -func SetupRoutesLogin(app *echo.Echo, h *LoginHandler) { +// PLAYGROUND TESTING +func SetupRoutesLogin(app *echo.Echo, h *dev_handlers.LoginHandler) { l := app.Group("/login") l.GET("/", h.HandlerShowLogin) } -func SetupRoutesXsample(app *echo.Echo, h *XsampleHandler) { +func SetupRoutesXsample(app *echo.Echo, h *dev_handlers.XsampleHandler) { xSample := app.Group("/xsample") xSample.GET("/xsample01", h.Hello) xSample.GET("/coba", h.ShowCoba) xSample.GET("/counter", h.ShowCounter) xSample.GET("/counterchange", h.ChangeCounter) } -func SetupRoutesLandingPage(app *echo.Echo, h *LandingPageHandler, mastermenuusergroupHandler *MasterMenuUserGroupHandler) { +func SetupRoutesLandingPage(app *echo.Echo, h *dev_handlers.LandingPageHandler, mastermenuusergroupHandler *dev_handlers.MasterMenuUserGroupHandler) { Lp := app.Group("/landing_page") Lp.GET("/", h.ShowLandingPage) clientgroup := app.Group("/client") @@ -37,16 +45,22 @@ func SetupRoutesLandingPage(app *echo.Echo, h *LandingPageHandler, mastermenuuse clientgroup.GET("/usergroup/pagination", mastermenuusergroupHandler.HandleChangePage) } -func SetupRoutesPieChart(app *echo.Echo, h *PiechartHandler) { +func SetupRoutesPieChart(app *echo.Echo, h *dev_handlers.PiechartHandler) { Lp := app.Group("/pie_chart") Lp.GET("/", h.ShowPieChart) Lp.GET("/peserta", h.ShowMcuPeserta) Lp.GET("/bar", h.ShowBarChart) } -func SetupRoutesEmployee(app *echo.Echo, e *EmployeeHandler) { +func SetupRoutesEmployee(app *echo.Echo, e *dev_handlers.EmployeeHandler) { employee := app.Group("/employee") employee.GET("/", e.ShowEmployee) } func SetupRoutesProject(app *echo.Echo) { } +func SetupRoutesPublic(app *echo.Echo, appStore db.AppStore) { + public := app.Group("/") + l := public_services.NewServicesLandingPage(public_services.LandingPage{}, appStore) + lh := public_handlers.NewLandingPageHandler(l) + public.GET("landingpage", lh.ShowLandingPage) +} diff --git a/views/layout/base.layout.templ b/layout/base.layout.templ similarity index 100% rename from views/layout/base.layout.templ rename to layout/base.layout.templ diff --git a/views/layout/base.layout_templ.go b/layout/base.layout_templ.go similarity index 95% rename from views/layout/base.layout_templ.go rename to layout/base.layout_templ.go index 1ab26d9..9cf01b1 100644 --- a/views/layout/base.layout_templ.go +++ b/layout/base.layout_templ.go @@ -30,7 +30,7 @@ func Base(title string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\layout\base.layout.templ`, Line: 18, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `layout\base.layout.templ`, Line: 18, Col: 40} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/views/layout/canvas_layout.templ b/layout/canvas_layout.templ similarity index 100% rename from views/layout/canvas_layout.templ rename to layout/canvas_layout.templ diff --git a/views/layout/canvas_layout_templ.go b/layout/canvas_layout_templ.go similarity index 97% rename from views/layout/canvas_layout_templ.go rename to layout/canvas_layout_templ.go index 6685c82..6580463 100644 --- a/views/layout/canvas_layout_templ.go +++ b/layout/canvas_layout_templ.go @@ -30,7 +30,7 @@ func CanvasLayout(title string, css templ.Component, js templ.Component) templ.C var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\layout\canvas_layout.templ`, Line: 22, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `layout\canvas_layout.templ`, Line: 22, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/views/layout/layout_corporate.templ b/layout/layout_corporate.templ similarity index 96% rename from views/layout/layout_corporate.templ rename to layout/layout_corporate.templ index 43d3df4..a99c0f2 100644 --- a/views/layout/layout_corporate.templ +++ b/layout/layout_corporate.templ @@ -1,10 +1,10 @@ package layout import ( - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/component/navbar" - "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" - "github.com/emarifer/go-templ-project-structure/models" + "cpone/component/navbar" + "cpone/component/sidebar_user_profile" + "cpone/models" + services "cpone/services/dev" ) // LAYOUT PLAYGROUND diff --git a/views/layout/layout_corporate_templ.go b/layout/layout_corporate_templ.go similarity index 96% rename from views/layout/layout_corporate_templ.go rename to layout/layout_corporate_templ.go index 9d8d95a..de68ea2 100644 --- a/views/layout/layout_corporate_templ.go +++ b/layout/layout_corporate_templ.go @@ -11,10 +11,10 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/component/navbar" - "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" + "cpone/component/navbar" + "cpone/component/sidebar_user_profile" + "cpone/models" + services "cpone/services/dev" ) // LAYOUT PLAYGROUND @@ -38,7 +38,7 @@ func CorporateLayout(title string, css templ.Component, js templ.Component, data var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\layout\layout_corporate.templ`, Line: 30, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `layout\layout_corporate.templ`, Line: 30, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/views/layout/playground_layout.templ b/layout/playground_layout.templ similarity index 100% rename from views/layout/playground_layout.templ rename to layout/playground_layout.templ diff --git a/views/layout/playground_layout_templ.go b/layout/playground_layout_templ.go similarity index 97% rename from views/layout/playground_layout_templ.go rename to layout/playground_layout_templ.go index 6af2408..d425de4 100644 --- a/views/layout/playground_layout_templ.go +++ b/layout/playground_layout_templ.go @@ -31,7 +31,7 @@ func PlaygroundLayout(title string, css templ.Component, js templ.Component) tem var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\layout\playground_layout.templ`, Line: 23, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `layout\playground_layout.templ`, Line: 23, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/services/chart.services.go b/services/dev/chart.services.go similarity index 99% rename from services/chart.services.go rename to services/dev/chart.services.go index d67c894..f381331 100644 --- a/services/chart.services.go +++ b/services/dev/chart.services.go @@ -1,9 +1,9 @@ -package services +package dev_services import ( "fmt" - "github.com/emarifer/go-templ-project-structure/db" + "cpone/db" ) func NewServicesPiechart(u Piechart, b Barchart, uStore db.PieChartStore, bStore db.BarChartStore) *ServicesPiechart { diff --git a/services/employee.services.go b/services/dev/employee.services.go similarity index 96% rename from services/employee.services.go rename to services/dev/employee.services.go index 63cec64..857a2c2 100644 --- a/services/employee.services.go +++ b/services/dev/employee.services.go @@ -1,9 +1,9 @@ -package services +package dev_services import ( "time" - "github.com/emarifer/go-templ-project-structure/db" + "cpone/db" ) func NewServicesEmployee(u Employee, uStore db.EmployeeStore) *ServicesEmployee { diff --git a/services/landingpage.services.go b/services/dev/landingpage.services.go similarity index 99% rename from services/landingpage.services.go rename to services/dev/landingpage.services.go index efae3b9..f053687 100644 --- a/services/landingpage.services.go +++ b/services/dev/landingpage.services.go @@ -1,9 +1,9 @@ -package services +package dev_services import ( "time" - "github.com/emarifer/go-templ-project-structure/db" + "cpone/db" ) func NewServicesLandingPage(u LandingPage, uStore db.LandingPageStore) *ServicesLandingPage { diff --git a/services/login.services.go b/services/dev/login.services.go similarity index 93% rename from services/login.services.go rename to services/dev/login.services.go index 0ffa532..0e8d8a1 100644 --- a/services/login.services.go +++ b/services/dev/login.services.go @@ -1,9 +1,9 @@ -package services +package dev_services import ( "time" - "github.com/emarifer/go-templ-project-structure/db" + "cpone/db" ) func NewServicesLogin(u Login, uStore db.LoginStore) *ServicesLogin { diff --git a/services/mastermenuusergroup.services.go b/services/dev/mastermenuusergroup.services.go similarity index 98% rename from services/mastermenuusergroup.services.go rename to services/dev/mastermenuusergroup.services.go index c3d1f85..e7a04cb 100644 --- a/services/mastermenuusergroup.services.go +++ b/services/dev/mastermenuusergroup.services.go @@ -1,12 +1,12 @@ -package services +package dev_services import ( "fmt" "strconv" - "github.com/emarifer/go-templ-project-structure/db" - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/utils" + "cpone/db" + "cpone/models" + "cpone/utils" ) func NewServicesMasterMenuUserGroup(u MasterMenu, uStore db.MasterMenuUserGroupStore) *ServicesMasterMenuUserGroup { diff --git a/services/user.services.go b/services/dev/user.services.go similarity index 79% rename from services/user.services.go rename to services/dev/user.services.go index 63f63f8..8eb2cf6 100644 --- a/services/user.services.go +++ b/services/dev/user.services.go @@ -1,17 +1,17 @@ -package services +package dev_services import ( "time" - "github.com/emarifer/go-templ-project-structure/db" - "github.com/emarifer/go-templ-project-structure/models" + "cpone/db" + "cpone/models" ) -func NewServicesUser(u User, uStore db.UserStore) *ServicesUser { +func NewServicesUser(u User, uStore db.AppStore) *ServicesUser { return &ServicesUser{ - User: u, - UserStore: uStore, + User: u, + AppStore: uStore, } } @@ -23,14 +23,14 @@ type User struct { } type ServicesUser struct { - User User - UserStore db.UserStore + User User + AppStore db.AppStore } func (su *ServicesUser) GetAllUsers() ([]User, error) { query := `SELECT id, username, email, created_at FROM users ORDER BY created_at DESC` - rows, err := su.UserStore.Db.Query(query) + rows, err := su.AppStore.Db.Query(query) if err != nil { return []User{}, err } @@ -57,7 +57,7 @@ func (su *ServicesUser) GetUserById(id int) (User, error) { query := `SELECT id, username, email, created_at FROM users WHERE id = ?` - stmt, err := su.UserStore.Db.Prepare(query) + stmt, err := su.AppStore.Db.Prepare(query) if err != nil { return User{}, err } diff --git a/services/xsample.services.go b/services/dev/xsample.services.go similarity index 99% rename from services/xsample.services.go rename to services/dev/xsample.services.go index 517f131..120ca7d 100644 --- a/services/xsample.services.go +++ b/services/dev/xsample.services.go @@ -1,9 +1,9 @@ -package services +package dev_services import ( "time" - "github.com/emarifer/go-templ-project-structure/db" + "cpone/db" ) func NewServicesXsample(u Xsample, uStore db.XsampleStore) *ServicesXsample { diff --git a/services/public/landingpage.services.go b/services/public/landingpage.services.go new file mode 100644 index 0000000..bb80856 --- /dev/null +++ b/services/public/landingpage.services.go @@ -0,0 +1,287 @@ +package public_services + +import ( + "time" + + "cpone/db" +) + +func NewServicesLandingPage(u LandingPage, uStore db.AppStore) *ServicesLandingPage { + + return &ServicesLandingPage{ + LandingPage: u, + LandingPageStore: uStore, + } +} + +type LandingPage struct { + ID int `json:"id"` + LandingPagename string `json:"LandingPagename"` + Email string `json:"email"` + CreatedAt time.Time `json:"created_at,omitempty"` +} + +type ClientService struct { + ClientServiceID int `json:"ClientServiceID"` + ClientServiceName string `json:"ClientServiceName"` + ClientServiceDescription string `json:"ClientServiceDescription"` + ClientServiceIcon string `json:"ClientServiceIcon"` + ClientServiceLink string `json:"ClientServiceLink"` +} +type AdvantageClient struct { + AdvantageClientID int `json:"AdvantageClientID"` + AdvantageClientName string `json:"AdvantageClientName"` + AdvantageClientDesc string `json:"AdvantageClientDesc"` +} + +type Promotion struct { + PromotionID int `json:"PromotionID"` + PromotionAsset string `json:"PromotionAsset"` + PromotionLink string `json:"PromotionLink"` +} + +type FooterSubNav struct { + FootSubNavID int `json:"FootSubNavID"` + FootSubNavTitle string `json:"FootSubNavTitle"` + FootSubNavLink string `json:"FootSubNavLink"` +} + +type FooterNav struct { + FooterNavID int `json:"FooterNavID"` + FooterNavTitle string `json:"FooterNavTitle"` + FooteSubNav []FooterSubNav `json:"FooterSubNav,omitempty"` +} + +type ServicesLandingPage struct { + LandingPage LandingPage + LandingPageStore db.AppStore +} + +func (su *ServicesLandingPage) GetAllLandingPages() ([]LandingPage, error) { + query := `SELECT id, LandingPagename, email, created_at FROM LandingPages ORDER BY created_at DESC` + + rows, err := su.LandingPageStore.Db.Query(query) + if err != nil { + return []LandingPage{}, err + } + // We close the resource + defer rows.Close() + + LandingPages := []LandingPage{} + for rows.Next() { + rows.Scan( + &su.LandingPage.ID, + &su.LandingPage.LandingPagename, + &su.LandingPage.Email, + &su.LandingPage.CreatedAt, + ) + + LandingPages = append(LandingPages, su.LandingPage) + } + + return LandingPages, nil +} + +func (su *ServicesLandingPage) GetLandingPageById(id int) (LandingPage, error) { + + query := `SELECT id, LandingPagename, email, created_at FROM LandingPages + WHERE id = ?` + + stmt, err := su.LandingPageStore.Db.Prepare(query) + if err != nil { + return LandingPage{}, err + } + + defer stmt.Close() + + su.LandingPage.ID = id + err = stmt.QueryRow( + su.LandingPage.ID, + ).Scan( + &su.LandingPage.ID, + &su.LandingPage.LandingPagename, + &su.LandingPage.Email, + &su.LandingPage.CreatedAt, + ) + if err != nil { + return LandingPage{}, err + } + + return su.LandingPage, nil +} +func (su *ServicesLandingPage) GetClientService() ([]ClientService, error) { + + data := []ClientService{ + { + ClientServiceID: 1, + ClientServiceName: "In House Clinic", + ClientServiceDescription: "Maintaining health in the workplace by carrying out promotional, preventive, curative and rehabilitative programs.", + ClientServiceIcon: "uil:clinic-medical", + ClientServiceLink: "/", + }, + { + ClientServiceID: 2, + ClientServiceName: "Laboratorium Test", + ClientServiceDescription: "Maintaining health in the workplace by carrying out promotional, preventive, curative and rehabilitative programs.", + ClientServiceIcon: "healthicons:clinical-a-outline", + ClientServiceLink: "/", + }, + { + ClientServiceID: 3, + ClientServiceName: "Medical Check Up", + ClientServiceDescription: "Supported by a professional medical, paramedical team, and as well as laboratory equipment ", + ClientServiceIcon: "jam:medical", + ClientServiceLink: "/", + }, + { + ClientServiceID: 4, + ClientServiceName: "Medical Check Up 2", + ClientServiceDescription: "Supported by a professional medical, paramedical team, and as well as laboratory equipment ", + ClientServiceIcon: "jam:medical", + ClientServiceLink: "/", + }, + { + ClientServiceID: 5, + ClientServiceName: "Medical Check Up 3", + ClientServiceDescription: "Supported by a professional medical, paramedical team, and as well as laboratory equipment ", + ClientServiceIcon: "jam:medical", + ClientServiceLink: "/", + }, + } + + return data, nil +} +func (su *ServicesLandingPage) GetClientAdvantage() ([]AdvantageClient, error) { + + data := []AdvantageClient{ + { + AdvantageClientID: 1, + AdvantageClientName: "ISO Certificate", + AdvantageClientDesc: "Westerindo Clinical Laboratory has obtained ISO 15189:2009 (ISO 15189:2007) Accreditation from the National Accreditation Committee (KAN) and the Health Laboratory Accreditation Commission (KALK).", + }, + { + AdvantageClientID: 2, + AdvantageClientName: "Modern Technology", + AdvantageClientDesc: "Laboratory Information System (LIS) is an information system in which laboratory equipment and diagnostic support have been integrated automatically so that examination results can be immediately filled in in employee data. This eliminates the possibility of human error.", + }, + { + AdvantageClientID: 3, + AdvantageClientName: "Good Quality Facilities", + AdvantageClientDesc: "The laboratory and medical support equipment used at the Westerindo Clinical Laboratory is international scale for precise, fast and accurate results. Lab and medical equipment certificates are periodically renewed according to standards.", + }, + { + AdvantageClientID: 4, + AdvantageClientName: "Professional Service", + AdvantageClientDesc: "Westerindo Clinical Laboratory is committed to providing professional and excellent service. Therefore, all staff and doctors at the Westerindo Clinical Laboratory have competency certification according to their field.", + }, + { + AdvantageClientID: 5, + AdvantageClientName: "Experienced", + AdvantageClientDesc: "Westerindo Clinical Laboratory is very experienced in carrying out Medical Check Ups both onsite and insite, in all corners of Indonesia. Serving various kinds of companies, from oil and gas companies, automotive, manufacturing, offices, and others.", + }, + } + + return data, nil +} +func (su *ServicesLandingPage) GetPromotionList() ([]Promotion, error) { + + data := []Promotion{ + { + PromotionID: 1, + PromotionAsset: "../../asset-corporate-portal/media/landingpage/promotion_1.png", + PromotionLink: "", + }, + { + PromotionID: 2, + PromotionAsset: "../../asset-corporate-portal/media/landingpage/promotion_2.png", + PromotionLink: "", + }, + { + PromotionID: 3, + PromotionAsset: "../../asset-corporate-portal/media/landingpage/promotion_3.png", + PromotionLink: "", + }, + { + PromotionID: 4, + PromotionAsset: "../../asset-corporate-portal/media/landingpage/promotion_2.png", + PromotionLink: "", + }, + { + PromotionID: 5, + PromotionAsset: "../../asset-corporate-portal/media/landingpage/promotion_3.png", + PromotionLink: "", + }, + } + + return data, nil +} +func (su *ServicesLandingPage) GetFooterNavList() ([]FooterNav, error) { + data := []FooterNav{ + { + FooterNavID: 1, + FooterNavTitle: "Dashboard", + FooteSubNav: []FooterSubNav{ + { + FootSubNavID: 1, + FootSubNavTitle: "Dashboard #1", + FootSubNavLink: "/", + }, + { + FootSubNavID: 2, + FootSubNavTitle: "Dashboard #2", + FootSubNavLink: "/", + }, + }, + }, + { + FooterNavID: 2, + FooterNavTitle: "Benefit", + FooteSubNav: []FooterSubNav{ + { + FootSubNavID: 1, + FootSubNavTitle: "Benefit #1", + FootSubNavLink: "/", + }, + { + FootSubNavID: 2, + FootSubNavTitle: "Benefit #2", + FootSubNavLink: "/", + }, + }, + }, + { + FooterNavID: 3, + FooterNavTitle: "Finance & Claims", + FooteSubNav: []FooterSubNav{ + { + FootSubNavID: 1, + FootSubNavTitle: "Finance & Claims #1", + FootSubNavLink: "/", + }, + { + FootSubNavID: 2, + FootSubNavTitle: "Finance & Claims #2", + FootSubNavLink: "/", + }, + }, + }, + { + FooterNavID: 4, + FooterNavTitle: "Memberships", + FooteSubNav: []FooterSubNav{ + { + FootSubNavID: 1, + FootSubNavTitle: "Memberships #1", + FootSubNavLink: "/", + }, + { + FootSubNavID: 2, + FootSubNavTitle: "Memberships #2", + FootSubNavLink: "/", + }, + }, + }, + } + + return data, nil +} diff --git a/views/employee/employee.templ b/views/dev/employee/employee.templ similarity index 94% rename from views/employee/employee.templ rename to views/dev/employee/employee.templ index dc4474a..b0f0c6f 100644 --- a/views/employee/employee.templ +++ b/views/dev/employee/employee.templ @@ -1,8 +1,8 @@ package employee import ( - "github.com/emarifer/go-templ-project-structure/views/layout" - "github.com/emarifer/go-templ-project-structure/views/under_development" + "cpone/layout" + "cpone/views/dev/under_development" ) templ MainEmployee(cardServiceComponent templ.Component) { diff --git a/views/employee/employee_templ.go b/views/dev/employee/employee_templ.go similarity index 98% rename from views/employee/employee_templ.go rename to views/dev/employee/employee_templ.go index af3baeb..304b540 100644 --- a/views/employee/employee_templ.go +++ b/views/dev/employee/employee_templ.go @@ -11,8 +11,8 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/views/layout" - "github.com/emarifer/go-templ-project-structure/views/under_development" + "cpone/layout" + "cpone/views/dev/under_development" ) func MainEmployee(cardServiceComponent templ.Component) templ.Component { diff --git a/views/employee/employeecomponent.templ b/views/dev/employee/employeecomponent.templ similarity index 96% rename from views/employee/employeecomponent.templ rename to views/dev/employee/employeecomponent.templ index aa44900..b4f8ff6 100644 --- a/views/employee/employeecomponent.templ +++ b/views/dev/employee/employeecomponent.templ @@ -1,7 +1,7 @@ package employee import ( - "github.com/emarifer/go-templ-project-structure/services" + services "cpone/services/dev" ) templ CardService(title string, description string, startdate string, enddate string) { diff --git a/views/employee/employeecomponent_templ.go b/views/dev/employee/employeecomponent_templ.go similarity index 95% rename from views/employee/employeecomponent_templ.go rename to views/dev/employee/employeecomponent_templ.go index ae708a5..c299c7b 100644 --- a/views/employee/employeecomponent_templ.go +++ b/views/dev/employee/employeecomponent_templ.go @@ -11,7 +11,7 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/services" + services "cpone/services/dev" ) func CardService(title string, description string, startdate string, enddate string) templ.Component { @@ -34,7 +34,7 @@ func CardService(title string, description string, startdate string, enddate str var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\employee\employeecomponent.templ`, Line: 12, Col: 35} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\employee\employeecomponent.templ`, Line: 12, Col: 35} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -47,7 +47,7 @@ func CardService(title string, description string, startdate string, enddate str var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(description) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\employee\employeecomponent.templ`, Line: 15, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\employee\employeecomponent.templ`, Line: 15, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -60,7 +60,7 @@ func CardService(title string, description string, startdate string, enddate str var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(startdate) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\employee\employeecomponent.templ`, Line: 18, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\employee\employeecomponent.templ`, Line: 18, Col: 59} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -73,7 +73,7 @@ func CardService(title string, description string, startdate string, enddate str var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(enddate) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\employee\employeecomponent.templ`, Line: 18, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\employee\employeecomponent.templ`, Line: 18, Col: 73} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -136,7 +136,7 @@ func HeadingEmployee(title string) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\employee\employeecomponent.templ`, Line: 36, Col: 11} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\employee\employeecomponent.templ`, Line: 36, Col: 11} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { diff --git a/views/dev/landingpage/footer.templ b/views/dev/landingpage/footer.templ new file mode 100644 index 0000000..899b010 --- /dev/null +++ b/views/dev/landingpage/footer.templ @@ -0,0 +1,131 @@ +package landingpage + +import ( + services "cpone/services/dev" +) + +templ FooterContact() { +
+ +
+ +
+
+ // + +
+
+
+
+ +
+
+ // for _, d := range phone { + // + // } + + + +
+
+} + +templ FooterNav(title string, data []services.FooterSubNav) { +
+ + for _, d := range data { +
+ { d.FootSubNavTitle } +
+ } +
+} + +templ FooterSection(navlist []services.FooterNav) { +
+ // HP +
+
+
+ Your Brand + @FooterContact() +
+
+ for _, d := range navlist { + @FooterNav(d.FooterNavTitle, d.FooteSubNav) + } +
+
+
+ // End HP + // Tablet +
+
+
+ Your Brand + @FooterContact() +
+
+ for _, d := range navlist { + @FooterNav(d.FooterNavTitle, d.FooteSubNav) + } +
+
+
+ // End Tablet + // Dekstop +
+
+
+ Your Brand + @FooterContact() +
+ for _, d := range navlist { + @FooterNav(d.FooterNavTitle, d.FooteSubNav) + } +
+
+ // End Dekstop +
+
+
+ +
+
+ +
+
+
+} diff --git a/views/landingpage/footer_templ.go b/views/dev/landingpage/footer_templ.go similarity index 98% rename from views/landingpage/footer_templ.go rename to views/dev/landingpage/footer_templ.go index efc6800..6bcbc1f 100644 --- a/views/landingpage/footer_templ.go +++ b/views/dev/landingpage/footer_templ.go @@ -10,7 +10,9 @@ import "context" import "io" import "bytes" -import "github.com/emarifer/go-templ-project-structure/services" +import ( + services "cpone/services/dev" +) func FooterContact() templ.Component { return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { @@ -56,7 +58,7 @@ func FooterNav(title string, data []services.FooterSubNav) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\footer.templ`, Line: 40, Col: 56} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\footer.templ`, Line: 42, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -83,7 +85,7 @@ func FooterNav(title string, data []services.FooterSubNav) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(d.FootSubNavTitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\footer.templ`, Line: 43, Col: 114} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\footer.templ`, Line: 45, Col: 102} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { diff --git a/views/landingpage/landingpage.templ b/views/dev/landingpage/landingpage.templ similarity index 99% rename from views/landingpage/landingpage.templ rename to views/dev/landingpage/landingpage.templ index 61d3b91..20697a6 100644 --- a/views/landingpage/landingpage.templ +++ b/views/dev/landingpage/landingpage.templ @@ -1,7 +1,7 @@ package landingpage import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) templ MainLandingPage(medicalServiceComponent templ.Component, listAdvantageComponent templ.Component, listPromotion templ.Component, footer templ.Component) { diff --git a/views/landingpage/landingpage_templ.go b/views/dev/landingpage/landingpage_templ.go similarity index 99% rename from views/landingpage/landingpage_templ.go rename to views/dev/landingpage/landingpage_templ.go index 39543ca..cc79f27 100644 --- a/views/landingpage/landingpage_templ.go +++ b/views/dev/landingpage/landingpage_templ.go @@ -11,7 +11,7 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) func MainLandingPage(medicalServiceComponent templ.Component, listAdvantageComponent templ.Component, listPromotion templ.Component, footer templ.Component) templ.Component { diff --git a/views/landingpage/medicalservice.templ b/views/dev/landingpage/medicalservice.templ similarity index 99% rename from views/landingpage/medicalservice.templ rename to views/dev/landingpage/medicalservice.templ index 924f744..920a461 100644 --- a/views/landingpage/medicalservice.templ +++ b/views/dev/landingpage/medicalservice.templ @@ -1,7 +1,7 @@ package landingpage import ( - "github.com/emarifer/go-templ-project-structure/services" + services "cpone/services/dev" ) templ MedicalService(title string, desciption string, icon string, link string) { diff --git a/views/landingpage/medicalservice_templ.go b/views/dev/landingpage/medicalservice_templ.go similarity index 97% rename from views/landingpage/medicalservice_templ.go rename to views/dev/landingpage/medicalservice_templ.go index 5aa7756..a724f50 100644 --- a/views/landingpage/medicalservice_templ.go +++ b/views/dev/landingpage/medicalservice_templ.go @@ -11,7 +11,7 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/services" + services "cpone/services/dev" ) func MedicalService(title string, desciption string, icon string, link string) templ.Component { @@ -34,7 +34,7 @@ func MedicalService(title string, desciption string, icon string, link string) t var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(icon) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 15, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 15, Col: 22} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -47,7 +47,7 @@ func MedicalService(title string, desciption string, icon string, link string) t var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 18, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 18, Col: 46} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -60,7 +60,7 @@ func MedicalService(title string, desciption string, icon string, link string) t var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(desciption) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 20, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 20, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -160,7 +160,7 @@ func HeaderSection(title string, desc string) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 56, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 56, Col: 46} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -173,7 +173,7 @@ func HeaderSection(title string, desc string) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 58, Col: 9} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 58, Col: 9} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -210,7 +210,7 @@ func Advantage(title string, desc string) templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 73, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 73, Col: 51} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { @@ -223,7 +223,7 @@ func Advantage(title string, desc string) templ.Component { var templ_7745c5c3_Var12 string templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 75, Col: 11} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 75, Col: 11} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -318,7 +318,7 @@ func Promotion(prm services.Promotion) templ.Component { var templ_7745c5c3_Var16 string templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(prm.PromotionAsset) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\landingpage\medicalservice.templ`, Line: 213, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\landingpage\medicalservice.templ`, Line: 213, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) if templ_7745c5c3_Err != nil { diff --git a/views/login/login.templ b/views/dev/login/login.templ similarity index 97% rename from views/login/login.templ rename to views/dev/login/login.templ index 6db5c6e..02edc91 100644 --- a/views/login/login.templ +++ b/views/dev/login/login.templ @@ -1,7 +1,7 @@ package login import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) templ MainLogin() { diff --git a/views/login/login_templ.go b/views/dev/login/login_templ.go similarity index 99% rename from views/login/login_templ.go rename to views/dev/login/login_templ.go index d540882..cfb9e22 100644 --- a/views/login/login_templ.go +++ b/views/dev/login/login_templ.go @@ -11,7 +11,7 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) func MainLogin() templ.Component { diff --git a/views/login/logincomponent.templ b/views/dev/login/logincomponent.templ similarity index 100% rename from views/login/logincomponent.templ rename to views/dev/login/logincomponent.templ diff --git a/views/login/logincomponent_templ.go b/views/dev/login/logincomponent_templ.go similarity index 100% rename from views/login/logincomponent_templ.go rename to views/dev/login/logincomponent_templ.go diff --git a/views/mastermenuusergroup/mastermenuusergroup.templ b/views/dev/mastermenuusergroup/mastermenuusergroup.templ similarity index 91% rename from views/mastermenuusergroup/mastermenuusergroup.templ rename to views/dev/mastermenuusergroup/mastermenuusergroup.templ index 1d919f1..df6f953 100644 --- a/views/mastermenuusergroup/mastermenuusergroup.templ +++ b/views/dev/mastermenuusergroup/mastermenuusergroup.templ @@ -1,17 +1,17 @@ package mastermenuusergroup import ( - "github.com/emarifer/go-templ-project-structure/views/component/breadcrumbadmin" - "github.com/emarifer/go-templ-project-structure/views/layout" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/views/component/table" - "github.com/emarifer/go-templ-project-structure/views/component/modal" + "cpone/component/breadcrumbadmin" + "cpone/layout" + services "cpone/services/dev" + "cpone/models" + "cpone/component/table" + "cpone/component/modal" "strconv" - "github.com/emarifer/go-templ-project-structure/views/component/pagination" + "cpone/component/pagination" ) -// "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" +// "cpone/component/sidebar_user_profile" templ ContentMasterMenuUserGroup(ugData []models.UserGroup) {
diff --git a/views/mastermenuusergroup/mastermenuusergroup_templ.go b/views/dev/mastermenuusergroup/mastermenuusergroup_templ.go similarity index 95% rename from views/mastermenuusergroup/mastermenuusergroup_templ.go rename to views/dev/mastermenuusergroup/mastermenuusergroup_templ.go index 4aaa747..7cea96e 100644 --- a/views/mastermenuusergroup/mastermenuusergroup_templ.go +++ b/views/dev/mastermenuusergroup/mastermenuusergroup_templ.go @@ -11,17 +11,17 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/component/breadcrumbadmin" - "github.com/emarifer/go-templ-project-structure/views/component/modal" - "github.com/emarifer/go-templ-project-structure/views/component/pagination" - "github.com/emarifer/go-templ-project-structure/views/component/table" - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/component/breadcrumbadmin" + "cpone/component/modal" + "cpone/component/pagination" + "cpone/component/table" + "cpone/layout" + "cpone/models" + services "cpone/services/dev" "strconv" ) -// "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" +// "cpone/component/sidebar_user_profile" func ContentMasterMenuUserGroup(ugData []models.UserGroup) 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) @@ -99,7 +99,7 @@ func TableRow(data []models.UserGroup) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(v.UserGroupKode) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\mastermenuusergroup\mastermenuusergroup.templ`, Line: 64, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroup.templ`, Line: 64, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -112,7 +112,7 @@ func TableRow(data []models.UserGroup) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(v.UserGroupName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\mastermenuusergroup\mastermenuusergroup.templ`, Line: 65, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroup.templ`, Line: 65, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -125,7 +125,7 @@ func TableRow(data []models.UserGroup) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("#dialogEdit" + strconv.Itoa(v.UserGroupID)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\mastermenuusergroup\mastermenuusergroup.templ`, Line: 73, Col: 63} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroup.templ`, Line: 73, Col: 63} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -138,7 +138,7 @@ func TableRow(data []models.UserGroup) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("#dialogDelete" + strconv.Itoa(v.UserGroupID)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\mastermenuusergroup\mastermenuusergroup.templ`, Line: 81, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroup.templ`, Line: 81, Col: 65} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { diff --git a/views/mastermenuusergroup/modaladdusergroup.templ b/views/dev/mastermenuusergroup/modaladdusergroup.templ similarity index 88% rename from views/mastermenuusergroup/modaladdusergroup.templ rename to views/dev/mastermenuusergroup/modaladdusergroup.templ index c4303fd..e2245b7 100644 --- a/views/mastermenuusergroup/modaladdusergroup.templ +++ b/views/dev/mastermenuusergroup/modaladdusergroup.templ @@ -1,8 +1,8 @@ package mastermenuusergroup import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" + "cpone/models" + "cpone/component/customtextfield" ) templ DialogNewBody(code string, name string) { diff --git a/views/mastermenuusergroup/modaladdusergroup_templ.go b/views/dev/mastermenuusergroup/modaladdusergroup_templ.go similarity index 96% rename from views/mastermenuusergroup/modaladdusergroup_templ.go rename to views/dev/mastermenuusergroup/modaladdusergroup_templ.go index cf7559d..f5240b3 100644 --- a/views/mastermenuusergroup/modaladdusergroup_templ.go +++ b/views/dev/mastermenuusergroup/modaladdusergroup_templ.go @@ -11,8 +11,8 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" + "cpone/component/customtextfield" + "cpone/models" ) func DialogNewBody(code string, name string) templ.Component { diff --git a/views/mastermenuusergroup/modaleditusergroup.templ b/views/dev/mastermenuusergroup/modaleditusergroup.templ similarity index 92% rename from views/mastermenuusergroup/modaleditusergroup.templ rename to views/dev/mastermenuusergroup/modaleditusergroup.templ index 4be0c5b..5e0cb68 100644 --- a/views/mastermenuusergroup/modaleditusergroup.templ +++ b/views/dev/mastermenuusergroup/modaleditusergroup.templ @@ -1,8 +1,8 @@ package mastermenuusergroup import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" + "cpone/models" + "cpone/component/customtextfield" ) templ DialogEditForm(code string, name string) { diff --git a/views/mastermenuusergroup/modaleditusergroup_templ.go b/views/dev/mastermenuusergroup/modaleditusergroup_templ.go similarity index 97% rename from views/mastermenuusergroup/modaleditusergroup_templ.go rename to views/dev/mastermenuusergroup/modaleditusergroup_templ.go index 28abe48..870605d 100644 --- a/views/mastermenuusergroup/modaleditusergroup_templ.go +++ b/views/dev/mastermenuusergroup/modaleditusergroup_templ.go @@ -11,8 +11,8 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" + "cpone/component/customtextfield" + "cpone/models" ) func DialogEditForm(code string, name string) templ.Component { diff --git a/views/mcu/kelainan_global/kelainan_global.templ b/views/dev/mcu/kelainan_global/kelainan_global.templ similarity index 95% rename from views/mcu/kelainan_global/kelainan_global.templ rename to views/dev/mcu/kelainan_global/kelainan_global.templ index 5c98f89..169b310 100644 --- a/views/mcu/kelainan_global/kelainan_global.templ +++ b/views/dev/mcu/kelainan_global/kelainan_global.templ @@ -1,8 +1,8 @@ package kelainanglobal import ( - "github.com/emarifer/go-templ-project-structure/views/layout" - chart "github.com/emarifer/go-templ-project-structure/views/component/chart" + "cpone/layout" + chart "cpone/component/chart" ) templ MainKelainanGlobal(divMcu string, dataMcu string, divFisik string, dataFisik string) { diff --git a/views/mcu/kelainan_global/kelainan_global_templ.go b/views/dev/mcu/kelainan_global/kelainan_global_templ.go similarity index 98% rename from views/mcu/kelainan_global/kelainan_global_templ.go rename to views/dev/mcu/kelainan_global/kelainan_global_templ.go index a5ee413..00f9c0b 100644 --- a/views/mcu/kelainan_global/kelainan_global_templ.go +++ b/views/dev/mcu/kelainan_global/kelainan_global_templ.go @@ -11,8 +11,8 @@ import "io" import "bytes" import ( - chart "github.com/emarifer/go-templ-project-structure/views/component/chart" - "github.com/emarifer/go-templ-project-structure/views/layout" + chart "cpone/component/chart" + "cpone/layout" ) func MainKelainanGlobal(divMcu string, dataMcu string, divFisik string, dataFisik string) templ.Component { diff --git a/views/mcu/peserta/bagian.txt b/views/dev/mcu/peserta/bagian.txt similarity index 100% rename from views/mcu/peserta/bagian.txt rename to views/dev/mcu/peserta/bagian.txt diff --git a/views/mcu/peserta/mcupeserta.templ b/views/dev/mcu/peserta/mcupeserta.templ similarity index 96% rename from views/mcu/peserta/mcupeserta.templ rename to views/dev/mcu/peserta/mcupeserta.templ index 70fbeb3..f1ebcd5 100644 --- a/views/mcu/peserta/mcupeserta.templ +++ b/views/dev/mcu/peserta/mcupeserta.templ @@ -1,8 +1,8 @@ package mcupeserta import ( - "github.com/emarifer/go-templ-project-structure/views/layout" - chart "github.com/emarifer/go-templ-project-structure/views/component/chart" + "cpone/layout" + chart "cpone/component/chart" ) templ MainMcuPeserta(divPesertaMcu string, dataPesertaMcu string, divKepesertaanMcu string, dataKepesertaanMcu string, divPesertaMcuUmur string, dataPesertaMcuUmur string) { diff --git a/views/mcu/peserta/mcupeserta_templ.go b/views/dev/mcu/peserta/mcupeserta_templ.go similarity index 98% rename from views/mcu/peserta/mcupeserta_templ.go rename to views/dev/mcu/peserta/mcupeserta_templ.go index 419bba4..b05e7c9 100644 --- a/views/mcu/peserta/mcupeserta_templ.go +++ b/views/dev/mcu/peserta/mcupeserta_templ.go @@ -11,8 +11,8 @@ import "io" import "bytes" import ( - chart "github.com/emarifer/go-templ-project-structure/views/component/chart" - "github.com/emarifer/go-templ-project-structure/views/layout" + chart "cpone/component/chart" + "cpone/layout" ) func MainMcuPeserta(divPesertaMcu string, dataPesertaMcu string, divKepesertaanMcu string, dataKepesertaanMcu string, divPesertaMcuUmur string, dataPesertaMcuUmur string) templ.Component { diff --git a/views/piechart/piechart.templ b/views/dev/piechart/piechart.templ similarity index 85% rename from views/piechart/piechart.templ rename to views/dev/piechart/piechart.templ index 52bee44..4448519 100644 --- a/views/piechart/piechart.templ +++ b/views/dev/piechart/piechart.templ @@ -1,8 +1,8 @@ package piechart import ( - "github.com/emarifer/go-templ-project-structure/views/layout" - chart "github.com/emarifer/go-templ-project-structure/views/component/chart" + "cpone/layout" + chart "cpone/component/chart" ) templ MainPieChart(idDiv string, udata string) { @@ -15,7 +15,7 @@ templ MainPieChart(idDiv string, udata string) {
- @chart.ShowChart(idDiv, udata) + @chart.ShowChart(idDiv, udata)
} diff --git a/views/piechart/piechart_templ.go b/views/dev/piechart/piechart_templ.go similarity index 97% rename from views/piechart/piechart_templ.go rename to views/dev/piechart/piechart_templ.go index b88349c..97bb397 100644 --- a/views/piechart/piechart_templ.go +++ b/views/dev/piechart/piechart_templ.go @@ -11,8 +11,8 @@ import "io" import "bytes" import ( - chart "github.com/emarifer/go-templ-project-structure/views/component/chart" - "github.com/emarifer/go-templ-project-structure/views/layout" + chart "cpone/component/chart" + "cpone/layout" ) func MainPieChart(idDiv string, udata string) templ.Component { diff --git a/views/under_development/under_development.templ b/views/dev/under_development/under_development.templ similarity index 100% rename from views/under_development/under_development.templ rename to views/dev/under_development/under_development.templ diff --git a/views/under_development/under_development_templ.go b/views/dev/under_development/under_development_templ.go similarity index 100% rename from views/under_development/under_development_templ.go rename to views/dev/under_development/under_development_templ.go diff --git a/views/user/details.templ b/views/dev/user/details.templ similarity index 91% rename from views/user/details.templ rename to views/dev/user/details.templ index d1a90d6..e59d0b7 100644 --- a/views/user/details.templ +++ b/views/dev/user/details.templ @@ -1,8 +1,8 @@ package user import ( - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/layout" + services "cpone/services/dev" + "cpone/layout" "fmt" ) diff --git a/views/user/details_templ.go b/views/dev/user/details_templ.go similarity index 95% rename from views/user/details_templ.go rename to views/dev/user/details_templ.go index 7bdbffb..67eac3a 100644 --- a/views/user/details_templ.go +++ b/views/dev/user/details_templ.go @@ -11,9 +11,9 @@ import "io" import "bytes" import ( + "cpone/layout" + services "cpone/services/dev" "fmt" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/layout" ) func Details(tz string, user services.User) templ.Component { @@ -36,7 +36,7 @@ func Details(tz string, user services.User) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("User details %s", user.Username)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\user\details.templ`, Line: 11, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\user\details.templ`, Line: 11, Col: 49} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -49,7 +49,7 @@ func Details(tz string, user services.User) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(user.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\user\details.templ`, Line: 16, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\user\details.templ`, Line: 16, Col: 19} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -62,7 +62,7 @@ func Details(tz string, user services.User) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(user.Email) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\user\details.templ`, Line: 22, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\user\details.templ`, Line: 22, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -75,7 +75,7 @@ func Details(tz string, user services.User) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(services.ConverDateTime(tz, user.CreatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\user\details.templ`, Line: 28, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\user\details.templ`, Line: 28, Col: 51} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { diff --git a/views/user/show.templ b/views/dev/user/show.templ similarity index 92% rename from views/user/show.templ rename to views/dev/user/show.templ index e78f6eb..1aa9963 100644 --- a/views/user/show.templ +++ b/views/dev/user/show.templ @@ -3,8 +3,8 @@ package user import ( "strconv" - "github.com/emarifer/go-templ-project-structure/views/layout" - "github.com/emarifer/go-templ-project-structure/services" + "cpone/layout" + services "cpone/services/dev" "fmt" ) diff --git a/views/user/show_templ.go b/views/dev/user/show_templ.go similarity index 96% rename from views/user/show_templ.go rename to views/dev/user/show_templ.go index 0ce232d..b3b7e6f 100644 --- a/views/user/show_templ.go +++ b/views/dev/user/show_templ.go @@ -13,9 +13,9 @@ import "bytes" import ( "strconv" + "cpone/layout" + services "cpone/services/dev" "fmt" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/layout" ) func Show(users []services.User) templ.Component { @@ -48,7 +48,7 @@ func Show(users []services.User) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(int(user.ID))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\user\show.templ`, Line: 30, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\user\show.templ`, Line: 30, Col: 39} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -73,7 +73,7 @@ func Show(users []services.User) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(user.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\user\show.templ`, Line: 41, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\user\show.templ`, Line: 41, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -86,7 +86,7 @@ func Show(users []services.User) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(user.Email) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\user\show.templ`, Line: 49, Col: 23} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\user\show.templ`, Line: 49, Col: 23} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { diff --git a/views/xsample/coba.templ b/views/dev/xsample/coba.templ similarity index 90% rename from views/xsample/coba.templ rename to views/dev/xsample/coba.templ index 1fe07c8..2b704f7 100644 --- a/views/xsample/coba.templ +++ b/views/dev/xsample/coba.templ @@ -1,10 +1,10 @@ package xsample import ( - "github.com/emarifer/go-templ-project-structure/views/layout" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/views/component/table" + "cpone/layout" + services "cpone/services/dev" + "cpone/models" + "cpone/component/table" ) templ Coba(title string) { diff --git a/views/xsample/coba_templ.go b/views/dev/xsample/coba_templ.go similarity index 96% rename from views/xsample/coba_templ.go rename to views/dev/xsample/coba_templ.go index d6be95f..ad67b9a 100644 --- a/views/xsample/coba_templ.go +++ b/views/dev/xsample/coba_templ.go @@ -11,10 +11,10 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/models" - "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/component/table" - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/component/table" + "cpone/layout" + "cpone/models" + services "cpone/services/dev" ) func Coba(title string) templ.Component { @@ -37,7 +37,7 @@ func Coba(title string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\xsample\coba.templ`, Line: 11, Col: 13} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\xsample\coba.templ`, Line: 11, Col: 13} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/views/xsample/trycounter.templ b/views/dev/xsample/trycounter.templ similarity index 93% rename from views/xsample/trycounter.templ rename to views/dev/xsample/trycounter.templ index 9f41ba4..2f4fcaa 100644 --- a/views/xsample/trycounter.templ +++ b/views/dev/xsample/trycounter.templ @@ -2,7 +2,7 @@ package xsample import "strconv" import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) templ Counts(counter int) { diff --git a/views/xsample/trycounter_templ.go b/views/dev/xsample/trycounter_templ.go similarity index 97% rename from views/xsample/trycounter_templ.go rename to views/dev/xsample/trycounter_templ.go index 0650659..3ef349a 100644 --- a/views/xsample/trycounter_templ.go +++ b/views/dev/xsample/trycounter_templ.go @@ -12,7 +12,7 @@ import "bytes" import "strconv" import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) func Counts(counter int) templ.Component { @@ -35,7 +35,7 @@ func Counts(counter int) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(counter)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\xsample\trycounter.templ`, Line: 9, Col: 48} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\xsample\trycounter.templ`, Line: 9, Col: 48} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -72,7 +72,7 @@ func Form(counter int) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs("/xsample/counter?type=plus&counter=" + strconv.Itoa(counter)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\xsample\trycounter.templ`, Line: 23, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\xsample\trycounter.templ`, Line: 23, Col: 73} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -85,7 +85,7 @@ func Form(counter int) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("/xsample/counter?type=min&counter=" + strconv.Itoa(counter)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\xsample\trycounter.templ`, Line: 33, Col: 72} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\xsample\trycounter.templ`, Line: 33, Col: 72} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { diff --git a/views/xsample/xsample.templ b/views/dev/xsample/xsample.templ similarity index 81% rename from views/xsample/xsample.templ rename to views/dev/xsample/xsample.templ index 11ebd89..acbcc37 100644 --- a/views/xsample/xsample.templ +++ b/views/dev/xsample/xsample.templ @@ -1,7 +1,7 @@ package xsample import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) templ HelloWorld(title string) { diff --git a/views/xsample/xsample_templ.go b/views/dev/xsample/xsample_templ.go similarity index 97% rename from views/xsample/xsample_templ.go rename to views/dev/xsample/xsample_templ.go index 8fbb525..8203def 100644 --- a/views/xsample/xsample_templ.go +++ b/views/dev/xsample/xsample_templ.go @@ -11,7 +11,7 @@ import "io" import "bytes" import ( - "github.com/emarifer/go-templ-project-structure/views/layout" + "cpone/layout" ) func HelloWorld(title string) templ.Component { @@ -34,7 +34,7 @@ func HelloWorld(title string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\xsample\xsample.templ`, Line: 8, Col: 13} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\xsample\xsample.templ`, Line: 8, Col: 13} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { diff --git a/views/landingpage/footer.templ b/views/landingpage/footer.templ deleted file mode 100644 index b62ce9d..0000000 --- a/views/landingpage/footer.templ +++ /dev/null @@ -1,132 +0,0 @@ -package landingpage - -import "github.com/emarifer/go-templ-project-structure/services" - -templ FooterContact() { -
- -
- -
-
- // - -
-
-
-
- -
-
- // for _, d := range phone { - // - // } - - - -
-
-} - -templ FooterNav(title string, data []services.FooterSubNav) { -
- - for _, d := range data { - - } -
-} - -templ FooterSection(navlist []services.FooterNav) { -
- // HP -
-
-
- Your Brand - @FooterContact() -
-
- for _, d := range navlist { - @FooterNav(d.FooterNavTitle, d.FooteSubNav) - } -
-
-
- // End HP - - // Tablet -
-
-
- Your Brand - @FooterContact() -
-
- for _, d := range navlist { - @FooterNav(d.FooterNavTitle, d.FooteSubNav) - } -
-
-
- // End Tablet - - // Dekstop -
-
-
- Your Brand - @FooterContact() -
- for _, d := range navlist { - @FooterNav(d.FooterNavTitle, d.FooteSubNav) - } -
-
- // End Dekstop - -
-
-
- -
-
- -
-
-
-} \ No newline at end of file diff --git a/views/public/landingpage/footer.templ b/views/public/landingpage/footer.templ new file mode 100644 index 0000000..376974c --- /dev/null +++ b/views/public/landingpage/footer.templ @@ -0,0 +1,131 @@ +package public_landingpage + +import ( + services "cpone/services/public" +) + +templ FooterContact() { +
+ +
+ +
+
+ // + +
+
+
+
+ +
+
+ // for _, d := range phone { + // + // } + + + +
+
+} + +templ FooterNav(title string, data []services.FooterSubNav) { +
+ + for _, d := range data { + + } +
+} + +templ FooterSection(navlist []services.FooterNav) { +
+ // HP +
+
+
+ Your Brand + @FooterContact() +
+
+ for _, d := range navlist { + @FooterNav(d.FooterNavTitle, d.FooteSubNav) + } +
+
+
+ // End HP + // Tablet +
+
+
+ Your Brand + @FooterContact() +
+
+ for _, d := range navlist { + @FooterNav(d.FooterNavTitle, d.FooteSubNav) + } +
+
+
+ // End Tablet + // Dekstop +
+
+
+ Your Brand + @FooterContact() +
+ for _, d := range navlist { + @FooterNav(d.FooterNavTitle, d.FooteSubNav) + } +
+
+ // End Dekstop +
+
+
+ +
+
+ +
+
+
+} diff --git a/views/public/landingpage/footer_templ.go b/views/public/landingpage/footer_templ.go new file mode 100644 index 0000000..9c2e9db --- /dev/null +++ b/views/public/landingpage/footer_templ.go @@ -0,0 +1,186 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package public_landingpage + +//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" + +import ( + services "cpone/services/public" +) + +func FooterContact() 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("

Jl. Cipaku I No.5, RT.2/RW.4, Petogogan, Kec. Kby. Baru, Kota\r Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12170\r

021-7392345

021-2702525

021-7255080

") + 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 + }) +} + +func FooterNav(title string, data []services.FooterSubNav) 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_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\public\landingpage\footer.templ`, Line: 42, Col: 50} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range data { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + 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 + }) +} + +func FooterSection(navlist []services.FooterNav) 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_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Your") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = FooterContact().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range navlist { + templ_7745c5c3_Err = FooterNav(d.FooterNavTitle, d.FooteSubNav).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Your") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = FooterContact().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range navlist { + templ_7745c5c3_Err = FooterNav(d.FooterNavTitle, d.FooteSubNav).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Your") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = FooterContact().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range navlist { + templ_7745c5c3_Err = FooterNav(d.FooterNavTitle, d.FooteSubNav).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

© Copyright 2024. Organized PT SADHANA ABIYASA SAMPOERNA (Privacy\r Policy)\r

") + 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 + }) +} diff --git a/views/public/landingpage/landingpage.templ b/views/public/landingpage/landingpage.templ new file mode 100644 index 0000000..f905dc4 --- /dev/null +++ b/views/public/landingpage/landingpage.templ @@ -0,0 +1,354 @@ +package public_landingpage + +import ( + "cpone/layout" +) + +templ MainLandingPage(medicalServiceComponent templ.Component, listAdvantageComponent templ.Component, listPromotion templ.Component, footer templ.Component) { +
+ + + + + + @HeaderCard() + + +
+ @HeaderSection("Our Medical Services", "Discover excellence in healthcare at Our Medical Services. From diagnosis to treatment, our dedicated team provides personalized care for your well-being.") +
+ @medicalServiceComponent + + +
+
+ @HeaderSection("Why Westerindo", "With a dedicated team of professionals we’re committed to providing medical attention tailored to your needs, ensuring a journey to optimal health and vitality.") +
+ @listAdvantageComponent +
+ + +
+
+ @HeaderSection("Promotions", "Seize This Opportunity to Enhance Your Health") +
+ @listPromotion +
+ + + @footer + +
+} + +templ CssLandingPage() { + + + + + + + +} + +templ JsLandingPage() { + + + + +} + +templ ShowLandingPage(title string, cmp templ.Component, css templ.Component, js templ.Component) { + @layout.PlaygroundLayout(title, css, js) { + @cmp + } +} diff --git a/views/public/landingpage/landingpage_templ.go b/views/public/landingpage/landingpage_templ.go new file mode 100644 index 0000000..fb48acc --- /dev/null +++ b/views/public/landingpage/landingpage_templ.go @@ -0,0 +1,190 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package public_landingpage + +//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" + +import ( + "cpone/layout" +) + +func MainLandingPage(medicalServiceComponent templ.Component, listAdvantageComponent templ.Component, listPromotion templ.Component, footer 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("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = HeaderCard().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = HeaderSection("Our Medical Services", "Discover excellence in healthcare at Our Medical Services. From diagnosis to treatment, our dedicated team provides personalized care for your well-being.").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = medicalServiceComponent.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = HeaderSection("Why Westerindo", "With a dedicated team of professionals we’re committed to providing medical attention tailored to your needs, ensuring a journey to optimal health and vitality.").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = listAdvantageComponent.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = HeaderSection("Promotions", "Seize This Opportunity to Enhance Your Health").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = listPromotion.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = footer.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + 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 + }) +} + +func CssLandingPage() 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_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + 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 + }) +} + +func JsLandingPage() 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_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + 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 + }) +} + +func ShowLandingPage(title string, cmp templ.Component, css templ.Component, js 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_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var5 := 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) + } + templ_7745c5c3_Err = cmp.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer) + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = layout.PlaygroundLayout(title, css, js).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + 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 + }) +} diff --git a/views/public/landingpage/medicalservice.templ b/views/public/landingpage/medicalservice.templ new file mode 100644 index 0000000..9563096 --- /dev/null +++ b/views/public/landingpage/medicalservice.templ @@ -0,0 +1,307 @@ +package public_landingpage + +import ( + services "cpone/services/public" +) + +templ MedicalService(title string, desciption string, icon string, link string) { +
+ +
+
+
+ +
+
{ title }
+

+ { desciption } +

+
+ +
+
+} + +templ ListMedicalService(medserData []services.ClientService) { +
+ for _, d := range medserData { + @MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink) + } +
+
+ for _, d := range medserData { + @MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink) + } +
+
+ for _, d := range medserData { + @MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink) + } +
+} + +templ HeaderSection(title string, desc string) { +
+

{ title }

+

+ { desc } +

+
+} + +templ Advantage(title string, desc string) { +
+
+
+ +
+
+

{ title }

+

+ { desc } +

+
+
+
+} + +templ ListAdvantage(adData []services.AdvantageClient) { +
+
+ Your Brand +
+
+ for _, d := range adData { + @Advantage(d.AdvantageClientName, d.AdvantageClientDesc) + } +
+
+} + +templ HeaderCard() { + // Hp +
+
+
+
+
+ Your Brand +
+
+
+
+

+ Invest in Your Well-being with Our Comprehensive Medical + Check-Up +

+

+ Elevate your health journey with our thorough medical + assessments, empowering you to take proactive steps towards a + healthier, happier life. +

+ +
+
+
+
+
+
+ // End Hp + // Tablet +
+
+
+
+
+ Your Brand +
+
+
+
+

+ Invest in Your Well-being with Our Comprehensive Medical + Check-Up +

+

+ Elevate your health journey with our thorough medical + assessments, empowering you to take proactive steps towards a + healthier, happier life. +

+ +
+
+
+
+
+
+ // End Tablet + // Dekstop +
+
+
+
+
+

+ Invest in Your Well-being with Our Comprehensive Medical + Check-Up +

+

+ Elevate your health journey with our thorough medical + assessments, empowering you to take proactive steps towards a + healthier, happier life. +

+ +
+
+
+
+ +
+ Your Brand +
+
+
+
+
+ // End Dekstop +} + +templ Promotion(prm services.Promotion) { +
+ Your Brand +
+} + +templ ListPromotion(prm []services.Promotion) { +
+ for _, d := range prm { + @Promotion(d) + } +
+
+ for _, d := range prm { + @Promotion(d) + } +
+
+ for _, d := range prm { + @Promotion(d) + } +
+} + +templ Footer() { +
+
+
+ Your Brand +
+ +
+ +
+
+ +
+
+
+
+ +
+
+ + + +
+
+
+
+ + +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+} diff --git a/views/public/landingpage/medicalservice_templ.go b/views/public/landingpage/medicalservice_templ.go new file mode 100644 index 0000000..5f54083 --- /dev/null +++ b/views/public/landingpage/medicalservice_templ.go @@ -0,0 +1,414 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package public_landingpage + +//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" + +import ( + services "cpone/services/public" +) + +func MedicalService(title string, desciption string, icon string, link string) 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("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\public\landingpage\medicalservice.templ`, Line: 18, Col: 46} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(desciption) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\public\landingpage\medicalservice.templ`, Line: 20, Col: 17} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + 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 + }) +} + +func ListMedicalService(medserData []services.ClientService) 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_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range medserData { + templ_7745c5c3_Err = MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range medserData { + templ_7745c5c3_Err = MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range medserData { + templ_7745c5c3_Err = MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + 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 + }) +} + +func HeaderSection(title string, desc string) 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_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var8 string + templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\public\landingpage\medicalservice.templ`, Line: 56, Col: 46} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var9 string + templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(desc) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\public\landingpage\medicalservice.templ`, Line: 58, Col: 9} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + 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 + }) +} + +func Advantage(title string, desc string) 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_Var10 := templ.GetChildren(ctx) + if templ_7745c5c3_Var10 == nil { + templ_7745c5c3_Var10 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var11 string + templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\public\landingpage\medicalservice.templ`, Line: 73, Col: 51} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var12 string + templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(desc) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\public\landingpage\medicalservice.templ`, Line: 75, Col: 11} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + 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 + }) +} + +func ListAdvantage(adData []services.AdvantageClient) 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_Var13 := templ.GetChildren(ctx) + if templ_7745c5c3_Var13 == nil { + templ_7745c5c3_Var13 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Your
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range adData { + templ_7745c5c3_Err = Advantage(d.AdvantageClientName, d.AdvantageClientDesc).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + 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 + }) +} + +func HeaderCard() 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_Var14 := templ.GetChildren(ctx) + if templ_7745c5c3_Var14 == nil { + templ_7745c5c3_Var14 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Your

Invest in Your Well-being with Our Comprehensive Medical\r Check-Up\r

Elevate your health journey with our thorough medical\r assessments, empowering you to take proactive steps towards a\r healthier, happier life.\r

\"Your

Invest in Your Well-being with Our Comprehensive Medical\r Check-Up\r

Elevate your health journey with our thorough medical\r assessments, empowering you to take proactive steps towards a\r healthier, happier life.\r

Invest in Your Well-being with Our Comprehensive Medical\r Check-Up\r

Elevate your health journey with our thorough medical\r assessments, empowering you to take proactive steps towards a\r healthier, happier life.\r

\"Your
") + 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 + }) +} + +func Promotion(prm services.Promotion) 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_Var15 := templ.GetChildren(ctx) + if templ_7745c5c3_Var15 == nil { + templ_7745c5c3_Var15 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Your
") + 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 + }) +} + +func ListPromotion(prm []services.Promotion) 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_Var17 := templ.GetChildren(ctx) + if templ_7745c5c3_Var17 == nil { + templ_7745c5c3_Var17 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range prm { + templ_7745c5c3_Err = Promotion(d).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range prm { + templ_7745c5c3_Err = Promotion(d).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + for _, d := range prm { + templ_7745c5c3_Err = Promotion(d).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + 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 + }) +} + +func Footer() 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_Var18 := templ.GetChildren(ctx) + if templ_7745c5c3_Var18 == nil { + templ_7745c5c3_Var18 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + 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 + }) +}