From d13384ab64557a239d8ea0234350fd9a0a84ecf3 Mon Sep 17 00:00:00 2001 From: sindhu Date: Sat, 25 May 2024 13:29:52 +0700 Subject: [PATCH] step 2 : add data group result with form validation --- .../customcheckbox/customcheckboxv1.templ | 8 +- .../customcheckbox/customcheckboxv1_templ.go | 107 +++-- handlers/dev/groupresult.handlers.go | 425 +++++++++++++++++- handlers/routes.go | 4 + models/customcheckbox.models.go | 2 +- services/dev/groupresult.services.go | 89 ++++ views/dev/groupresult/groupresult.templ | 11 +- views/dev/groupresult/groupresult_templ.go | 227 ++++++---- .../dev/groupresult/modaladdgroupresult.templ | 111 +++++ .../groupresult/modaladdgroupresult_templ.go | 329 ++++++++++++++ 10 files changed, 1178 insertions(+), 135 deletions(-) create mode 100644 views/dev/groupresult/modaladdgroupresult.templ create mode 100644 views/dev/groupresult/modaladdgroupresult_templ.go diff --git a/component/customcheckbox/customcheckboxv1.templ b/component/customcheckbox/customcheckboxv1.templ index 012aed8..cac9ce4 100644 --- a/component/customcheckbox/customcheckboxv1.templ +++ b/component/customcheckbox/customcheckboxv1.templ @@ -1,12 +1,18 @@ package customcheckbox +import "cpone/models" + templ MainCustomCheckboxInput(inp models.CustomCheckboxv1Prm) {
diff --git a/component/customcheckbox/customcheckboxv1_templ.go b/component/customcheckbox/customcheckboxv1_templ.go index 90c936b..7c154a4 100644 --- a/component/customcheckbox/customcheckboxv1_templ.go +++ b/component/customcheckbox/customcheckboxv1_templ.go @@ -10,6 +10,8 @@ import "context" import "io" import "bytes" +import "cpone/models" + func MainCustomCheckboxInput(inp models.CustomCheckboxv1Prm) 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) @@ -30,48 +32,89 @@ func MainCustomCheckboxInput(inp models.CustomCheckboxv1Prm) 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: `component\customcheckbox\customcheckboxv1.templ`, Line: 6, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customcheckbox\customcheckboxv1.templ`, Line: 8, Col: 21} } _, 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("