client md dokter

This commit is contained in:
sindhu
2024-05-09 13:06:49 +07:00
parent 20387e14ab
commit 504bec64a2
5 changed files with 216 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package client_handlers
import (
"cpone/utils"
client_mddokter "cpone/views/client/mddokter"
"github.com/labstack/echo/v4"
)
type MdDokterService interface {
}
func NewMdDokterHandler(us MdDokterService) *MdDokterHandler {
return &MdDokterHandler{
MdDokterService: us,
}
}
type MdDokterHandler struct {
MdDokterService MdDokterService
}
func (uh *MdDokterHandler) ShowMdDokter(c echo.Context) error {
helo := client_mddokter.Show()
return utils.View(c, helo)
}

View File

@@ -88,4 +88,8 @@ func SetupRoutesClient(app *echo.Echo, appStore db.AppStore) {
lpasien := client_services.NewServicesMdPasien(appStore)
lhpasien := client_handlers.NewMdPasienHandler(lpasien)
public.GET("/md/pasien", lhpasien.ShowMdPasien)
ldokter := client_services.NewServicesMdDokter(appStore)
lhdokter := client_handlers.NewMdDokterHandler(ldokter)
public.GET("/md/dokter", lhdokter.ShowMdDokter)
}

View File

@@ -0,0 +1,15 @@
package client_services
import "cpone/db"
type ServicesMdDokter struct {
MdDokterStore db.AppStore
}
func NewServicesMdDokter(uStore db.AppStore) *ServicesMdDokter {
return &ServicesMdDokter{
MdDokterStore: uStore,
}
}

View File

@@ -0,0 +1,40 @@
package client_mddokter
import (
"cpone/component/under_development"
"cpone/layout"
)
templ Content() {
<div class="bg-white h-100">
@under_development.UnderDevelopment()
</div>
}
templ Css() {
<style>
.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 Js() {
}
templ Show() {
@layout.PlaygroundLayout("Client Md Dokter", Css(), Js()) {
@Content()
}
}

View File

@@ -0,0 +1,131 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.663
package client_mddokter
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import "context"
import "io"
import "bytes"
import (
"cpone/component/under_development"
"cpone/layout"
)
func Content() 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=\"bg-white h-100\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = under_development.UnderDevelopment().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 Css() 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("<style>\r\n\t\t .underdev {\r\n font-family: \"Public Sans\";\r\n font-size: 64px;\r\n font-style: normal;\r\n font-weight: 700;\r\n line-height: normal;\r\n }\r\n .underdevsub {\r\n font-family: \"Public Sans\";\r\n font-size: 26px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: normal;\r\n }\r\n\t</style>")
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 Js() templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
if templ_7745c5c3_Var3 == nil {
templ_7745c5c3_Var3 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
return templ_7745c5c3_Err
})
}
func Show() templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
if templ_7745c5c3_Var4 == nil {
templ_7745c5c3_Var4 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Var5 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
templ_7745c5c3_Err = Content().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer)
}
return templ_7745c5c3_Err
})
templ_7745c5c3_Err = layout.PlaygroundLayout("Client Md Dokter", Css(), Js()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
return templ_7745c5c3_Err
})
}