refactor structure

This commit is contained in:
Sas Andy
2024-05-08 15:26:14 +07:00
parent ac97487b9b
commit 9ae7e495c6
100 changed files with 2337 additions and 447 deletions

View File

@@ -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"))
}

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -1,6 +1,6 @@
package customtextfield
import "github.com/emarifer/go-templ-project-structure/models"
import "cpone/models"
templ CustomTextFieldv2(inp models.CustomTextFieldv2Prm) {
<div class="form-group">

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -1,6 +1,6 @@
package sidebaruserprofile
import "github.com/emarifer/go-templ-project-structure/models"
import "cpone/models"
templ Navbaruserprofile(dataUser models.User) {
<div id="kt_quick_user" class="offcanvas offcanvas-right p-10">

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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
}

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/emarifer/go-templ-project-structure
module cpone
go 1.21.0

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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
}

View File

@@ -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 {

View File

@@ -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
}

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -0,0 +1,131 @@
package landingpage
import (
services "cpone/services/dev"
)
templ FooterContact() {
<div class="text-white d-flex flex-row mb-3">
<!-- style="display: flex; flex-direction: row; color: white;align-items: start; margin-bottom: 24px;" -->
<div class="mr-3 mt-1">
<i
class="fas fa-map-marker-alt marker footer-icon text-warning"
></i>
</div>
<div class="flex-grow-1">
// <p class="footer-sub-title text-grey">
// { alamat }
// </p>
<p class="footer-sub-title text-grey">
Jl. Cipaku I No.5, RT.2/RW.4, Petogogan, Kec. Kby. Baru, Kota
Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12170
</p>
</div>
</div>
<div class="d-flex flex-row">
<div class="mr-3 mt-1">
<i class="fas fa-phone footer-icon text-warning"></i>
</div>
<div class="flex-grow-1">
// for _, d := range phone {
// <p class="footer-sub-title text-grey">{ d }</p>
// }
<p class="footer-sub-title text-grey">021-7392345</p>
<p class="footer-sub-title text-grey">021-2702525</p>
<p class="footer-sub-title text-grey">021-7255080</p>
</div>
</div>
}
templ FooterNav(title string, data []services.FooterSubNav) {
<div class="col-md col-lg mb-5">
<h4 class="footer-title text-white mb-6">{ title }</h4>
for _, d := range data {
<div>
<a class="footer-sub-title text-grey" href={ templ.SafeURL(d.FootSubNavLink) }>{ d.FootSubNavTitle }</a>
</div>
}
</div>
}
templ FooterSection(navlist []services.FooterNav) {
<footer class="wrapper-custom bg-black pb-25 pt-25 mt-25">
// HP
<div class="d-xs-block d-sm-block d-md-none">
<div class="row mb-5">
<div class="col-md col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
<div class="mt-5">
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
</div>
// End HP
// Tablet
<div class="d-none d-md-block d-lg-none">
<div class="row mb-5">
<div class="col-md col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
<div class="col-md col-lg">
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
</div>
// End Tablet
// Dekstop
<div class="d-none d-lg-block">
<div class="row mb-5">
<div class="col-md-12 col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
// End Dekstop
<div class="garis bg-grey"></div>
<div class="row mt-4">
<div class="col-md-6">
<p class="footer-sub-title text-grey">
© Copyright 2024. Organized PT SADHANA ABIYASA SAMPOERNA (Privacy
Policy)
</p>
</div>
<div class="col-md-6 text-right">
<p class="footer-icons">
<a href="#" class="mr-3"><i class="fab fa-whatsapp"></i></a>
<a href="#" class="mr-3"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</p>
</div>
</div>
</footer>
}

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -1,7 +1,7 @@
package login
import (
"github.com/emarifer/go-templ-project-structure/views/layout"
"cpone/layout"
)
templ MainLogin() {

View File

@@ -11,7 +11,7 @@ import "io"
import "bytes"
import (
"github.com/emarifer/go-templ-project-structure/views/layout"
"cpone/layout"
)
func MainLogin() templ.Component {

View File

@@ -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) {
<div class="container-fluid">
<div class="row align-items-center mb-10">

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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) {
<!-- title -->
<div class="row justify-content-center">
<div class="col-lg-8 col-xxl-8 col-md-10 text-center" style="margin-bottom: 40px;">
@chart.ShowChart(idDiv, udata)
@chart.ShowChart(idDiv, udata)
</div>
</div>
}

View File

@@ -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 {

View File

@@ -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"
)

View File

@@ -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 {

View File

@@ -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"
)

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -2,7 +2,7 @@ package xsample
import "strconv"
import (
"github.com/emarifer/go-templ-project-structure/views/layout"
"cpone/layout"
)
templ Counts(counter int) {

View File

@@ -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 {

View File

@@ -1,7 +1,7 @@
package xsample
import (
"github.com/emarifer/go-templ-project-structure/views/layout"
"cpone/layout"
)
templ HelloWorld(title string) {

View File

@@ -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 {

View File

@@ -1,132 +0,0 @@
package landingpage
import "github.com/emarifer/go-templ-project-structure/services"
templ FooterContact() {
<div class="text-white d-flex flex-row mb-3">
<!-- style="display: flex; flex-direction: row; color: white;align-items: start; margin-bottom: 24px;" -->
<div class="mr-3 mt-1">
<i
class="fas fa-map-marker-alt marker footer-icon text-warning"
></i>
</div>
<div class="flex-grow-1">
// <p class="footer-sub-title text-grey">
// { alamat }
// </p>
<p class="footer-sub-title text-grey">
Jl. Cipaku I No.5, RT.2/RW.4, Petogogan, Kec. Kby. Baru, Kota
Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12170
</p>
</div>
</div>
<div class="d-flex flex-row">
<div class="mr-3 mt-1">
<i class="fas fa-phone footer-icon text-warning"></i>
</div>
<div class="flex-grow-1">
// for _, d := range phone {
// <p class="footer-sub-title text-grey">{ d }</p>
// }
<p class="footer-sub-title text-grey">021-7392345</p>
<p class="footer-sub-title text-grey">021-2702525</p>
<p class="footer-sub-title text-grey">021-7255080</p>
</div>
</div>
}
templ FooterNav(title string, data []services.FooterSubNav) {
<div class="col-md col-lg mb-5">
<h4 class="footer-title text-white mb-6">{ title }</h4>
for _, d := range data {
<div>
<a class="footer-sub-title text-grey" href={ templ.SafeURL(d.FootSubNavLink) }>{ d.FootSubNavTitle }</a>
</div>
}
</div>
}
templ FooterSection(navlist []services.FooterNav) {
<footer class="wrapper-custom bg-black pb-25 pt-25 mt-25">
// HP
<div class="d-xs-block d-sm-block d-md-none">
<div class="row mb-5">
<div class="col-md col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
<div class="mt-5">
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
</div>
// End HP
// Tablet
<div class="d-none d-md-block d-lg-none">
<div class="row mb-5">
<div class="col-md col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
<div class="col-md col-lg">
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
</div>
// End Tablet
// Dekstop
<div class="d-none d-lg-block">
<div class="row mb-5">
<div class="col-md-12 col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
// End Dekstop
<div class="garis bg-grey"></div>
<div class="row mt-4">
<div class="col-md-6">
<p class="footer-sub-title text-grey">
© Copyright 2024. Organized PT SADHANA ABIYASA SAMPOERNA (Privacy
Policy)
</p>
</div>
<div class="col-md-6 text-right">
<p class="footer-icons">
<a href="#" class="mr-3"><i class="fab fa-whatsapp"></i></a>
<a href="#" class="mr-3"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</p>
</div>
</div>
</footer>
}

View File

@@ -0,0 +1,131 @@
package public_landingpage
import (
services "cpone/services/public"
)
templ FooterContact() {
<div class="text-white d-flex flex-row mb-3">
<!-- style="display: flex; flex-direction: row; color: white;align-items: start; margin-bottom: 24px;" -->
<div class="mr-3 mt-1">
<i
class="fas fa-map-marker-alt marker footer-icon text-warning"
></i>
</div>
<div class="flex-grow-1">
// <p class="footer-sub-title text-grey">
// { alamat }
// </p>
<p class="footer-sub-title text-grey">
Jl. Cipaku I No.5, RT.2/RW.4, Petogogan, Kec. Kby. Baru, Kota
Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12170
</p>
</div>
</div>
<div class="d-flex flex-row">
<div class="mr-3 mt-1">
<i class="fas fa-phone footer-icon text-warning"></i>
</div>
<div class="flex-grow-1">
// for _, d := range phone {
// <p class="footer-sub-title text-grey">{ d }</p>
// }
<p class="footer-sub-title text-grey">021-7392345</p>
<p class="footer-sub-title text-grey">021-2702525</p>
<p class="footer-sub-title text-grey">021-7255080</p>
</div>
</div>
}
templ FooterNav(title string, data []services.FooterSubNav) {
<div class="col-md col-lg mb-5">
<h4 class="footer-title text-white mb-6">{ title }</h4>
for _, d := range data {
<div>
<a class="footer-sub-title text-grey" href={ templ.SafeURL(d.FootSubNavLink) }>{ d.FootSubNavTitle }</a>
</div>
}
</div>
}
templ FooterSection(navlist []services.FooterNav) {
<footer class="wrapper-custom bg-black pb-25 pt-25 mt-25">
// HP
<div class="d-xs-block d-sm-block d-md-none">
<div class="row mb-5">
<div class="col-md col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
<div class="mt-5">
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
</div>
// End HP
// Tablet
<div class="d-none d-md-block d-lg-none">
<div class="row mb-5">
<div class="col-md col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
<div class="col-md col-lg">
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
</div>
// End Tablet
// Dekstop
<div class="d-none d-lg-block">
<div class="row mb-5">
<div class="col-md-12 col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
@FooterContact()
</div>
for _, d := range navlist {
@FooterNav(d.FooterNavTitle, d.FooteSubNav)
}
</div>
</div>
// End Dekstop
<div class="garis bg-grey"></div>
<div class="row mt-4">
<div class="col-md-6">
<p class="footer-sub-title text-grey">
© Copyright 2024. Organized PT SADHANA ABIYASA SAMPOERNA (Privacy
Policy)
</p>
</div>
<div class="col-md-6 text-right">
<p class="footer-icons">
<a href="#" class="mr-3"><i class="fab fa-whatsapp"></i></a>
<a href="#" class="mr-3"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</p>
</div>
</div>
</footer>
}

View File

@@ -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("<div class=\"text-white d-flex flex-row mb-3\"><!-- style=\"display: flex; flex-direction: row; color: white;align-items: start; margin-bottom: 24px;\" --><div class=\"mr-3 mt-1\"><i class=\"fas fa-map-marker-alt marker footer-icon text-warning\"></i></div><div class=\"flex-grow-1\"><p class=\"footer-sub-title text-grey\">Jl. Cipaku I No.5, RT.2/RW.4, Petogogan, Kec. Kby. Baru, Kota\r Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12170\r</p></div></div><div class=\"d-flex flex-row\"><div class=\"mr-3 mt-1\"><i class=\"fas fa-phone footer-icon text-warning\"></i></div><div class=\"flex-grow-1\"><p class=\"footer-sub-title text-grey\">021-7392345</p><p class=\"footer-sub-title text-grey\">021-2702525</p><p class=\"footer-sub-title text-grey\">021-7255080</p></div></div>")
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("<div class=\"col-md col-lg mb-5\"><h4 class=\"footer-title text-white mb-6\">")
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("</h4>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, d := range data {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><a class=\"footer-sub-title text-grey\" href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 templ.SafeURL = templ.SafeURL(d.FootSubNavLink)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(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
}
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\public\landingpage\footer.templ`, Line: 45, Col: 102}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
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("<footer class=\"wrapper-custom bg-black pb-25 pt-25 mt-25\"><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"row mb-5\"><div class=\"col-md col-lg\"><img src=\"asset-corporate-portal/media/landingpage/logo.png\" class=\"logo-footer\" width=\"126\" height=\"40\" alt=\"Your Brand\">")
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("</div><div class=\"mt-5\">")
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("</div></div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"row mb-5\"><div class=\"col-md col-lg\"><img src=\"asset-corporate-portal/media/landingpage/logo.png\" class=\"logo-footer\" width=\"126\" height=\"40\" alt=\"Your Brand\">")
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("</div><div class=\"col-md col-lg\">")
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("</div></div></div><div class=\"d-none d-lg-block\"><div class=\"row mb-5\"><div class=\"col-md-12 col-lg\"><img src=\"asset-corporate-portal/media/landingpage/logo.png\" class=\"logo-footer\" width=\"126\" height=\"40\" alt=\"Your Brand\">")
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("</div>")
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("</div></div><div class=\"garis bg-grey\"></div><div class=\"row mt-4\"><div class=\"col-md-6\"><p class=\"footer-sub-title text-grey\">© Copyright 2024. Organized PT SADHANA ABIYASA SAMPOERNA (Privacy\r Policy)\r</p></div><div class=\"col-md-6 text-right\"><p class=\"footer-icons\"><a href=\"#\" class=\"mr-3\"><i class=\"fab fa-whatsapp\"></i></a> <a href=\"#\" class=\"mr-3\"><i class=\"fab fa-facebook\"></i></a> <a href=\"#\"><i class=\"fab fa-instagram\"></i></a></p></div></div></footer>")
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
})
}

View File

@@ -0,0 +1,354 @@
package public_landingpage
import (
"cpone/layout"
)
templ MainLandingPage(medicalServiceComponent templ.Component, listAdvantageComponent templ.Component, listPromotion templ.Component, footer templ.Component) {
<div class="wrapper-custom mb-25">
<!-- Navbar Start -->
<nav
class="navbar navbar-expand-sm navbar-expand-lg navbar-lp justify-content-between"
>
<a class="navbar-brand" href="#">
<img
src="/asset-corporate-portal/media/landingpage/logo.png"
width="126"
height="40"
class="d-inline-block align-top"
alt="Your Brand"
/>
</a>
<button type="button" class="btn btn-lg btn-primary btn-pill">
<span class="title">Login</span>
</button>
</nav>
<!-- Navbar End -->
<!-- jumbotron START -->
<!-- <div class="jumbotron jumbotron-lp d-none d-lg-block"> -->
@HeaderCard()
<!-- jumbotron END -->
<!-- Our Medical Service START -->
<div class="row">
@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.")
</div>
@medicalServiceComponent
<!-- Our Medical Service END -->
<!-- Why Westerindo START belum fix di ukuran < 1400 -->
<div class="container p-0 mt-5 ">
<div class="row">
@HeaderSection("Why Westerindo", "With a dedicated team of professionals were committed to providing medical attention tailored to your needs, ensuring a journey to optimal health and vitality.")
</div>
@listAdvantageComponent
</div>
<!-- Why Westerindo END -->
<!-- Promotion START -->
<div class="container mt-4">
<div class="row">
@HeaderSection("Promotions", "Seize This Opportunity to Enhance Your Health")
</div>
@listPromotion
</div>
<!-- Promotion END -->
<!-- footer START -->
@footer
<!-- footer END -->
</div>
}
templ CssLandingPage() {
<link
rel="stylesheet"
href="assets/css/googlefont/poppins.css"
/>
<link
rel="stylesheet"
href="assets/css/googlefont/publicsans.css"
/>
<link
rel="stylesheet"
href="assets/css/googlefont/roboto.css"
/>
<!-- slick -->
<link
rel="stylesheet"
type="text/css"
href="assets/css/slick/slick.css"
/>
<link
rel="stylesheet"
type="text/css"
href="assets/css/slick/slick-theme.css"
/>
<style>
body {
background-color: white;
/* padding-right: 100px;
padding-left: 100px; */
}
.navbar-lp {
padding-top: 40px;
padding-bottom: 40px;
}
.jumbotron-lp {
border-radius: 32px;
/* background: #3B4F9F; */
}
.title {
/* color: #FFF; */
font-family: Poppins;
font-size: 15px;
/* font-size: 1vw; */
font-style: normal;
font-weight: 700;
}
.title-jumbotron-sm {
/* color: #FFF; */
font-family: Poppins;
font-size: 32px;
/* font-size: 3vw; */
font-style: normal;
font-weight: 600;
}
.title-jumbotron-md {
/* color: #FFF; */
font-family: Poppins;
font-size: 42px;
/* font-size: 3vw; */
font-style: normal;
font-weight: 600;
}
.title-jumbotron {
/* color: #FFF; */
font-family: Poppins;
font-size: 52px;
/* font-size: 3vw; */
font-style: normal;
font-weight: 600;
}
.sub-title-jumbotron {
/* color: #FFF; */
font-family: Poppins;
font-size: 16px;
/* font-size: 1vw; */
font-style: normal;
font-weight: 400;
}
.btn-login {
border-radius: 40px;
/* background-color: #3B4F9F; */
box-shadow: 0px 8px 16px 0px rgba(59, 79, 159, 0.24);
}
.title-get-started {
/* color: #0C518C; */
font-family: Poppins;
font-size: 20px;
/* font-size: 1vw; */
font-style: normal;
font-weight: 700;
}
.custom-button-get-started {
border-radius: 40px;
/* background-color: #FFF; */
box-shadow: 0px 8px 16px 0px rgba(12, 81, 140, 0.24);
padding: 20px;
margin-top: 44px;
justify-content: center;
align-items: center;
width: 242px;
}
.title-section {
/* color: #000; */
font-family: Poppins;
font-size: 40px;
/* font-size: 3vw; */
font-style: normal;
font-weight: 600;
line-height: 80px;
margin-bottom: 16px;
}
.sub-title-section {
/* color: #212B36; */
font-family: Poppins;
font-size: 20px;
/* font-size: 1.5vw; */
font-style: normal;
font-weight: 400;
line-height: 36px;
}
.custom-card-lp {
border-radius: 24px;
border: 1px solid #d9d9d9;
margin-top: 40px;
}
.title-fs-20 {
/* color: #0E1E28; */
font-family: Poppins;
font-size: 20px;
/* font-size: 1.5vw; */
font-style: normal;
/* font-weight: 500; */
line-height: 36px;
}
.sub-title-fs-12 {
/* color: #0E1E28; */
font-family: Poppins;
font-size: 12px;
/* font-size: 0.9vw; */
font-style: normal;
font-weight: 400;
line-height: 20px;
margin-bottom: 16px;
}
.icon-container {
display: inline-block;
border-radius: 8px;
margin-bottom: 16px;
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
}
.link-learn-more {
/* color: #3B4F9F; */
font-family: Poppins;
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: normal;
text-decoration: none;
}
.wrapper-custom {
/* background: #1B1D1F; */
padding-left: 10vw;
padding-right: 10vw;
}
.media-left-icon {
width: 40px;
height: 40px;
}
.footer-title {
/* color: #FFF; */
font-family: Poppins;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 20px;
}
.footer-sub-title {
/* color: #C3C4C5; */
font-family: Poppins;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}
.logo-footer {
margin-bottom: 24px;
margin-top: -20px;
}
.garis {
/* background: #C3C4C5; */
height: 0.2px;
}
.card-footer {
background-color: transparent !important;
border: none;
}
.slick-prev:before,
.slick-next:before {
color: var(--primarybg);
}
.img-header {
object-fit: contain;
}
.underdev {
font-family: "Public Sans";
font-size: 64px;
font-style: normal;
font-weight: 700;
line-height: normal;
}
.underdevsub {
font-family: "Public Sans";
font-size: 26px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
</style>
}
templ JsLandingPage() {
<!-- SCRIPT -->
<script type="text/javascript" src="assets/js/slick/slick.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
// lg
$(".responsive-lg").slick({
dots: false,
autoplay: true,
autoplaySpeed: 2000,
infinite: true,
lazyLoad: "ondemand",
slidesToShow: 3,
slidesToScroll: 3,
nextArrow: '<button type="button" class="slick-next">Next</button>',
prevArrow:
'<button type="button" class="slick-prev">Previous</button>',
});
// md
$(".responsive-md").slick({
dots: false,
autoplay: true,
autoplaySpeed: 2000,
infinite: true,
lazyLoad: "ondemand",
slidesToShow: 2,
slidesToScroll: 2,
});
// sm
$(".responsive-sm").slick({
dots: false,
autoplay: true,
autoplaySpeed: 2000,
infinite: true,
lazyLoad: "ondemand",
slidesToShow: 1,
slidesToScroll: 1,
});
});
</script>
<!-- SCRIPT -->
}
templ ShowLandingPage(title string, cmp templ.Component, css templ.Component, js templ.Component) {
@layout.PlaygroundLayout(title, css, js) {
@cmp
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,307 @@
package public_landingpage
import (
services "cpone/services/public"
)
templ MedicalService(title string, desciption string, icon string, link string) {
<div class="col-lg-4">
<!-- 1 -->
<div class="card custom-card-lp mr-6">
<div class="card-body">
<div class="icon-container bg-primary-transparent">
<span
class="iconify text-primary w-20 h-20"
data-icon={ icon }
></span>
</div>
<h5 class="card-title title-fs-20">{ title }</h5>
<p class="card-text sub-title-fs-12">
{ desciption }
</p>
</div>
<div class="card-footer">
<a href={ templ.SafeURL(link) } class="link-learn-more text-primary">
Learn More
<span
class="iconify text-primary w-20 h-20"
data-icon="eva:arrow-forward-outline"
></span>
</a>
</div>
</div>
</div>
}
templ ListMedicalService(medserData []services.ClientService) {
<div class="row responsive-sm d-xs-block d-sm-block d-md-none">
for _, d := range medserData {
@MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink)
}
</div>
<div class="row responsive-md d-none d-md-block d-lg-none">
for _, d := range medserData {
@MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink)
}
</div>
<div class="row responsive-lg d-none d-lg-block">
for _, d := range medserData {
@MedicalService(d.ClientServiceName, d.ClientServiceDescription, d.ClientServiceIcon, d.ClientServiceLink)
}
</div>
}
templ HeaderSection(title string, desc string) {
<div class="col-md-12 text-left">
<h2 class="title-section text-black">{ title }</h2>
<p class="sub-title-section text-black">
{ desc }
</p>
</div>
}
templ Advantage(title string, desc string) {
<div class="row flex-grow-1">
<div class="media">
<div class="media-left">
<span
class="iconify text-primary media-left-icon"
data-icon="mingcute:certificate-line"
></span>
</div>
<div class="media-body">
<h4 class="title-fs-20 text-black ml-4">{ title }</h4>
<p class="sub-title-fs-12 text-black ml-4">
{ desc }
</p>
</div>
</div>
</div>
}
templ ListAdvantage(adData []services.AdvantageClient) {
<div class="row mt-5">
<div class="col-md-6">
<img
src="/asset-corporate-portal/media/landingpage/why_westerindo_right.png"
alt="Your Brand"
class="align-top w-100 h-100 pt-4 pb-4"
/>
</div>
<div class="col-md-6 d-flex flex-column">
for _, d := range adData {
@Advantage(d.AdvantageClientName, d.AdvantageClientDesc)
}
</div>
</div>
}
templ HeaderCard() {
// Hp
<div class="jumbotron bg-primary d-xs-block d-sm-block d-md-none">
<div class="container">
<div class="row">
<div class="col-sm-12 mb-3 d-flex justify-content-sm-end">
<div class="d-flex m-1 align-items-center">
<img
src="/asset-corporate-portal/media/landingpage/jumbotron_left.png"
class="img-fluid w-100 h-100 img-header"
alt="Your Brand"
/>
</div>
</div>
<div class="col-sm-12 d-flex flex-column">
<div class="mb-3">
<h1 class="title-jumbotron-sm text-white">
Invest in Your Well-being with Our Comprehensive Medical
Check-Up
</h1>
<p class="sub-title-jumbotron text-white">
Elevate your health journey with our thorough medical
assessments, empowering you to take proactive steps towards a
healthier, happier life.
</p>
<button type="button" class="btn btn-lg btn-pill bg-white">
<span class="title-get-started">Get Started</span>
</button>
</div>
<div class="mt-auto"></div>
</div>
</div>
</div>
</div>
// End Hp
// Tablet
<div class="jumbotron bg-primary d-none d-md-block d-lg-none">
<div class="container">
<div class="row">
<div class="col-md-12 mb-3 d-flex justify-content-md-end">
<div class="d-flex m-1 align-items-center">
<img
src="/asset-corporate-portal/media/landingpage/jumbotron_left.png"
class="img-fluid w-100 h-100 img-header"
alt="Your Brand"
/>
</div>
</div>
<div class="col-md-12 d-flex flex-column">
<div class="mb-3">
<h1 class="title-jumbotron-md text-white">
Invest in Your Well-being with Our Comprehensive Medical
Check-Up
</h1>
<p class="sub-title-jumbotron text-white">
Elevate your health journey with our thorough medical
assessments, empowering you to take proactive steps towards a
healthier, happier life.
</p>
<button type="button" class="btn btn-lg btn-pill bg-white">
<span class="title-get-started">Get Started</span>
</button>
</div>
<div class="mt-auto"></div>
</div>
</div>
</div>
</div>
// End Tablet
// Dekstop
<div class="jumbotron bg-primary d-none d-lg-block">
<div class="container">
<div class="row">
<div class="col-md-8 d-flex flex-column">
<div class="mb-3">
<h1 class="title-jumbotron text-white">
Invest in Your Well-being with Our Comprehensive Medical
Check-Up
</h1>
<p class="sub-title-jumbotron text-white">
Elevate your health journey with our thorough medical
assessments, empowering you to take proactive steps towards a
healthier, happier life.
</p>
<button type="button" class="btn btn-lg btn-pill bg-white">
<span class="title-get-started">Get Started</span>
</button>
</div>
<div class="mt-auto"></div>
</div>
<div class="col-md-4 d-flex justify-content-md-end">
<!-- style="
flex: 2;
margin: 10px;
display: flex;
align-items: center;
" -->
<div class="d-flex m-1o align-items-center">
<img
src="/asset-corporate-portal/media/landingpage/jumbotron_left.png"
class="img-fluid w-100 h-100 img-header"
alt="Your Brand"
/>
</div>
</div>
</div>
</div>
</div>
// End Dekstop
}
templ Promotion(prm services.Promotion) {
<div class="col-md-4 mt-2">
<img
src={ prm.PromotionAsset }
class="img-fluid"
alt="Your Brand"
/>
</div>
}
templ ListPromotion(prm []services.Promotion) {
<div class="row responsive-sm d-xs-block d-sm-block d-md-none">
for _, d := range prm {
@Promotion(d)
}
</div>
<div class="row responsive-md d-none d-md-block d-lg-none">
for _, d := range prm {
@Promotion(d)
}
</div>
<div class="row responsive-lg d-none d-lg-block d-xl-block">
for _, d := range prm {
@Promotion(d)
}
</div>
}
templ Footer() {
<footer class="wrapper-custom bg-black pb-25 pt-25 mt-25">
<div class="row mb-5">
<div class="col-md-12 col-lg">
<img
src="asset-corporate-portal/media/landingpage/logo.png"
class="logo-footer"
width="126"
height="40"
alt="Your Brand"
/>
<div class="text-white d-flex flex-row mb-3">
<!-- style="display: flex; flex-direction: row; color: white;align-items: start; margin-bottom: 24px;" -->
<div class="mr-3 mt-1">
<i
class="fas fa-map-marker-alt marker footer-icon text-warning"
></i>
</div>
<div class="flex-grow-1">
<p class="footer-sub-title text-grey">
Jl. Cipaku I No.5, RT.2/RW.4, Petogogan, Kec. Kby. Baru, Kota
Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12170
</p>
</div>
</div>
<div class="d-flex flex-row">
<div class="mr-3 mt-1">
<i class="fas fa-phone footer-icon text-warning"></i>
</div>
<div class="flex-grow-1">
<p class="footer-sub-title text-grey">021-7392345</p>
<p class="footer-sub-title text-grey">021-2702525</p>
<p class="footer-sub-title text-grey">021-7255080</p>
</div>
</div>
</div>
<div class="col-md col-lg">
<h4 class="footer-title text-white mb-3">Dashboard</h4>
<p class="footer-sub-title text-grey">
Employee Medical Health Analytic Clinic Admission
</p>
</div>
<div class="col-md col-lg">
<h4 class="footer-title text-white">Benefit</h4>
</div>
<div class="col-md col-lg">
<h4 class="footer-title text-white">Finance & Claims</h4>
</div>
<div class="col-md col-lg">
<h4 class="footer-title text-white">Membership</h4>
</div>
</div>
<div class="garis bg-grey"></div>
<div class="row mt-4">
<div class="col-md-6">
<p class="footer-sub-title text-grey">
© Copyright 2024. Organized PT SADHANA ABIYASA SAMPOERNA (Privacy
Policy)
</p>
</div>
<div class="col-md-6 text-right">
<p class="footer-icons">
<a href="#" class="mr-3"><i class="fab fa-whatsapp"></i></a>
<a href="#" class="mr-3"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</p>
</div>
</div>
</footer>
}

View File

@@ -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("<div class=\"col-lg-4\"><!-- 1 --><div class=\"card custom-card-lp mr-6\"><div class=\"card-body\"><div class=\"icon-container bg-primary-transparent\"><span class=\"iconify text-primary w-20 h-20\" data-icon=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
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\public\landingpage\medicalservice.templ`, Line: 15, Col: 22}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></span></div><h5 class=\"card-title title-fs-20\">")
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("</h5><p class=\"card-text sub-title-fs-12\">")
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("</p></div><div class=\"card-footer\"><a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 templ.SafeURL = templ.SafeURL(link)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var5)))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"link-learn-more text-primary\">Learn More\r <span class=\"iconify text-primary w-20 h-20\" data-icon=\"eva:arrow-forward-outline\"></span></a></div></div></div>")
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("<div class=\"row responsive-sm d-xs-block d-sm-block d-md-none\">")
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("</div><div class=\"row responsive-md d-none d-md-block d-lg-none\">")
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("</div><div class=\"row responsive-lg d-none d-lg-block\">")
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("</div>")
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("<div class=\"col-md-12 text-left\"><h2 class=\"title-section text-black\">")
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("</h2><p class=\"sub-title-section text-black\">")
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("</p></div>")
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("<div class=\"row flex-grow-1\"><div class=\"media\"><div class=\"media-left\"><span class=\"iconify text-primary media-left-icon\" data-icon=\"mingcute:certificate-line\"></span></div><div class=\"media-body\"><h4 class=\"title-fs-20 text-black ml-4\">")
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("</h4><p class=\"sub-title-fs-12 text-black ml-4\">")
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("</p></div></div></div>")
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("<div class=\"row mt-5\"><div class=\"col-md-6\"><img src=\"/asset-corporate-portal/media/landingpage/why_westerindo_right.png\" alt=\"Your Brand\" class=\"align-top w-100 h-100 pt-4 pb-4\"></div><div class=\"col-md-6 d-flex flex-column\">")
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("</div></div>")
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("<div class=\"jumbotron bg-primary d-xs-block d-sm-block d-md-none\"><div class=\"container\"><div class=\"row\"><div class=\"col-sm-12 mb-3 d-flex justify-content-sm-end\"><div class=\"d-flex m-1 align-items-center\"><img src=\"/asset-corporate-portal/media/landingpage/jumbotron_left.png\" class=\"img-fluid w-100 h-100 img-header\" alt=\"Your Brand\"></div></div><div class=\"col-sm-12 d-flex flex-column\"><div class=\"mb-3\"><h1 class=\"title-jumbotron-sm text-white\">Invest in Your Well-being with Our Comprehensive Medical\r Check-Up\r</h1><p class=\"sub-title-jumbotron text-white\">Elevate your health journey with our thorough medical\r assessments, empowering you to take proactive steps towards a\r healthier, happier life.\r</p><button type=\"button\" class=\"btn btn-lg btn-pill bg-white\"><span class=\"title-get-started\">Get Started</span></button></div><div class=\"mt-auto\"></div></div></div></div></div><div class=\"jumbotron bg-primary d-none d-md-block d-lg-none\"><div class=\"container\"><div class=\"row\"><div class=\"col-md-12 mb-3 d-flex justify-content-md-end\"><div class=\"d-flex m-1 align-items-center\"><img src=\"/asset-corporate-portal/media/landingpage/jumbotron_left.png\" class=\"img-fluid w-100 h-100 img-header\" alt=\"Your Brand\"></div></div><div class=\"col-md-12 d-flex flex-column\"><div class=\"mb-3\"><h1 class=\"title-jumbotron-md text-white\">Invest in Your Well-being with Our Comprehensive Medical\r Check-Up\r</h1><p class=\"sub-title-jumbotron text-white\">Elevate your health journey with our thorough medical\r assessments, empowering you to take proactive steps towards a\r healthier, happier life.\r</p><button type=\"button\" class=\"btn btn-lg btn-pill bg-white\"><span class=\"title-get-started\">Get Started</span></button></div><div class=\"mt-auto\"></div></div></div></div></div><div class=\"jumbotron bg-primary d-none d-lg-block\"><div class=\"container\"><div class=\"row\"><div class=\"col-md-8 d-flex flex-column\"><div class=\"mb-3\"><h1 class=\"title-jumbotron text-white\">Invest in Your Well-being with Our Comprehensive Medical\r Check-Up\r</h1><p class=\"sub-title-jumbotron text-white\">Elevate your health journey with our thorough medical\r assessments, empowering you to take proactive steps towards a\r healthier, happier life.\r</p><button type=\"button\" class=\"btn btn-lg btn-pill bg-white\"><span class=\"title-get-started\">Get Started</span></button></div><div class=\"mt-auto\"></div></div><div class=\"col-md-4 d-flex justify-content-md-end\"><!-- style=\"\r\n flex: 2;\r\n margin: 10px;\r\n display: flex;\r\n align-items: center;\r\n \" --><div class=\"d-flex m-1o align-items-center\"><img src=\"/asset-corporate-portal/media/landingpage/jumbotron_left.png\" class=\"img-fluid w-100 h-100 img-header\" alt=\"Your Brand\"></div></div></div></div></div>")
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("<div class=\"col-md-4 mt-2\"><img src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
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\public\landingpage\medicalservice.templ`, Line: 213, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"img-fluid\" alt=\"Your Brand\"></div>")
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("<div class=\"row responsive-sm d-xs-block d-sm-block d-md-none\">")
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("</div><div class=\"row responsive-md d-none d-md-block d-lg-none\">")
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("</div><div class=\"row responsive-lg d-none d-lg-block d-xl-block\">")
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("</div>")
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("<footer class=\"wrapper-custom bg-black pb-25 pt-25 mt-25\"><div class=\"row mb-5\"><div class=\"col-md-12 col-lg\"><img src=\"asset-corporate-portal/media/landingpage/logo.png\" class=\"logo-footer\" width=\"126\" height=\"40\" alt=\"Your Brand\"><div class=\"text-white d-flex flex-row mb-3\"><!-- style=\"display: flex; flex-direction: row; color: white;align-items: start; margin-bottom: 24px;\" --><div class=\"mr-3 mt-1\"><i class=\"fas fa-map-marker-alt marker footer-icon text-warning\"></i></div><div class=\"flex-grow-1\"><p class=\"footer-sub-title text-grey\">Jl. Cipaku I No.5, RT.2/RW.4, Petogogan, Kec. Kby. Baru, Kota\r Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12170\r</p></div></div><div class=\"d-flex flex-row\"><div class=\"mr-3 mt-1\"><i class=\"fas fa-phone footer-icon text-warning\"></i></div><div class=\"flex-grow-1\"><p class=\"footer-sub-title text-grey\">021-7392345</p><p class=\"footer-sub-title text-grey\">021-2702525</p><p class=\"footer-sub-title text-grey\">021-7255080</p></div></div></div><div class=\"col-md col-lg\"><h4 class=\"footer-title text-white mb-3\">Dashboard</h4><p class=\"footer-sub-title text-grey\">Employee Medical Health Analytic Clinic Admission\r</p></div><div class=\"col-md col-lg\"><h4 class=\"footer-title text-white\">Benefit</h4></div><div class=\"col-md col-lg\"><h4 class=\"footer-title text-white\">Finance & Claims</h4></div><div class=\"col-md col-lg\"><h4 class=\"footer-title text-white\">Membership</h4></div></div><div class=\"garis bg-grey\"></div><div class=\"row mt-4\"><div class=\"col-md-6\"><p class=\"footer-sub-title text-grey\">© Copyright 2024. Organized PT SADHANA ABIYASA SAMPOERNA (Privacy\r Policy)\r</p></div><div class=\"col-md-6 text-right\"><p class=\"footer-icons\"><a href=\"#\" class=\"mr-3\"><i class=\"fab fa-whatsapp\"></i></a> <a href=\"#\" class=\"mr-3\"><i class=\"fab fa-facebook\"></i></a> <a href=\"#\"><i class=\"fab fa-instagram\"></i></a></p></div></div></footer>")
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
})
}