From b04e3e8e44a30c9554f17ba1025802c100c1fb1e Mon Sep 17 00:00:00 2001 From: sindhu Date: Tue, 28 May 2024 10:14:41 +0700 Subject: [PATCH] custom radio button inline and getTerminology in appservice --- .../customradiobuttoninline.templ | 22 +++++ .../customradiobuttoninline_templ.go | 89 +++++++++++++++++++ services/app.services.go | 2 +- 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 component/customradiobutton/customradiobuttoninline.templ create mode 100644 component/customradiobutton/customradiobuttoninline_templ.go diff --git a/component/customradiobutton/customradiobuttoninline.templ b/component/customradiobutton/customradiobuttoninline.templ new file mode 100644 index 0000000..56cea5d --- /dev/null +++ b/component/customradiobutton/customradiobuttoninline.templ @@ -0,0 +1,22 @@ +package customradiobuttoninline + +import "cpone/models" + +templ MainCustomRadioButtonInput(inp models.CustomRadioButtonv1Prm) { +
+ +
+
+
+ +
+
+
+
+ { inp.ErrorMsg } +
+
+} diff --git a/component/customradiobutton/customradiobuttoninline_templ.go b/component/customradiobutton/customradiobuttoninline_templ.go new file mode 100644 index 0000000..5d3aac4 --- /dev/null +++ b/component/customradiobutton/customradiobuttoninline_templ.go @@ -0,0 +1,89 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package customradiobuttoninline + +//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/models" + +func MainCustomRadioButtonInput(inp models.CustomRadioButtonv1Prm) templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 string + templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(inp.ErrorMsg) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customradiobutton\customradiobuttoninline.templ`, Line: 19, Col: 17} + } + _, 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("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/services/app.services.go b/services/app.services.go index 5a55470..148b881 100644 --- a/services/app.services.go +++ b/services/app.services.go @@ -515,6 +515,6 @@ func GetUserLogin() (models.User, error) { return a, nil } -func GetTerminology(code string, codeSystem string) { +func GetTerminology(attributePath string, codeSystem string) { }