From 3bc13d64bcabf7a1a8dad614a586cda337aa2ec1 Mon Sep 17 00:00:00 2001 From: adibwp Date: Fri, 14 Jun 2024 16:51:16 +0700 Subject: [PATCH] add pic tab daftar peserta + pagination --- .../mcudetail/tabdaftarpeserta.handlers.go | 101 +++++++++++-- handlers/routes.go | 1 + .../mcudetail/tabdaftarpeserta.services.go | 63 +++++++- views/corporate/mcu/mcudetail.templ | 2 +- .../mcu/mcutab/modaldaftarpeserta_templ.go | 35 +++++ .../mcu/mcutab/tabdaftarpeserta.templ | 48 +++++- .../mcu/mcutab/tabdaftarpeserta_templ.go | 64 +++++++- .../mcu/mcutab/tabledaftarpeserta.templ | 51 ++++--- .../mcu/mcutab/tabledaftarpeserta_templ.go | 141 ++++++++++++++---- 9 files changed, 433 insertions(+), 73 deletions(-) create mode 100644 views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go diff --git a/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go b/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go index 7ea25c8..6ff09d5 100644 --- a/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go +++ b/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go @@ -1,13 +1,18 @@ package mcu_corporate_handlers import ( + "cpone/component/pagination" + "cpone/models" "cpone/utils" corporate_mcudetail "cpone/views/corporate/mcu/mcutab" + "strconv" "github.com/labstack/echo/v4" + "go.uber.org/zap" ) type TabDaftarPesertaServices interface { + GetListMcuDaftarPeserta(id string, currentpage int, rowperpage int) ([]models.ModelMcuDaftarPeserta, int, error) } type TabDaftarPesertaHandlers struct { @@ -21,21 +26,93 @@ func NewTabDaftarPesertaHandlers(tdp TabDaftarPesertaServices) *TabDaftarPeserta } func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context) error { - title := "Daftar Peserta" + logger, _ := zap.NewProduction() + // title := "Daftar Peserta" + tableID := utils.GenerateRandomID("tableid") + paginationID := utils.GenerateRandomID("paginationID") - data := []string{"Ananda Mara", "Nanda Arisu"} - table := corporate_mcudetail.TableDaftarPeserta(data, "sas012") + id := c.Param("id") + logger.Info("Params", zap.Any("id", id)) - content := corporate_mcudetail.TabDaftarPesertaScreen(table) - css := corporate_mcudetail.CSSTabDaftarPeserta() - js := corporate_mcudetail.JsTabDaftarPeserta() + dataTable, totalPage, err := tdp.TabDaftarPesertaServices.GetListMcuDaftarPeserta(id, 1, 5) + if err != nil { + return err + } + logger.Info("totalPage", zap.Any("total", totalPage)) - view := corporate_mcudetail.ShowTabDafterPeserta( - title, - content, - css, - js, + table := corporate_mcudetail.TableDaftarPeserta( + dataTable, + tableID, ) - return utils.View(c, view) + pagination := pagination.PaginationV3( + totalPage, + 1, + "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage", + paginationID, + "#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent", + "#contentlayout", + "outerHTML", "", "", + corporate_mcudetail.BeforeRequestContent(), + corporate_mcudetail.AfterRequestContent(), + ) + + clayout := corporate_mcudetail.ContentLayout( + table, + pagination, + ) + + content := corporate_mcudetail.TabDaftarPesertaScreen(tableID, paginationID, clayout) + // css := corporate_mcudetail.CSSTabDaftarPeserta() + // js := corporate_mcudetail.JsTabDaftarPeserta() + + // view := corporate_mcudetail.ShowTabDafterPeserta( + // title, + // content, + // css, + // js, + // ) + + return utils.View(c, content) +} + +func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error { + pageparam := c.QueryParam("page") + tableID := c.QueryParam("tableID") + paginationID := c.QueryParam("paginationID") + + id := c.Param("id") + + // var retval []templ.Component + page, err := strconv.Atoi(pageparam) + if err != nil { + return err + } + + tableData, totalPage, err := tdp.TabDaftarPesertaServices.GetListMcuDaftarPeserta(id, page, 5) + if err != nil { + return err + } + table := corporate_mcudetail.TableDaftarPeserta(tableData, tableID) + + pagination := pagination.PaginationV3( + totalPage, + page, + "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage", + paginationID, + "#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent", + "#contentlayout", + "outerHTML", "", "", + corporate_mcudetail.BeforeRequestContent(), + corporate_mcudetail.AfterRequestContent(), + ) + + // content := corporate_mcudetail.TabDaftarPesertaScreen(tableID, paginationID, table, pagination) + // retval = append(retval, table) + // retval = append(retval, pagination) + // return utils.ViewMulti(c, retval) + + // return utils.View(c, content) + clayout := corporate_mcudetail.ContentLayout(table, pagination) + return utils.View(c, clayout) } diff --git a/handlers/routes.go b/handlers/routes.go index a5e42d5..bcfd6a2 100644 --- a/handlers/routes.go +++ b/handlers/routes.go @@ -124,6 +124,7 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) { daftarpesertaServ := mcu_corporate_services.NewTabDaftarPesertaServices(appStore) daftarpesertaHandl := mcu_corporate_handlers.NewTabDaftarPesertaHandlers(daftarpesertaServ) corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta", daftarpesertaHandl.HandleShowTabDaftarPeserta) + corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta/changepage", daftarpesertaHandl.HandlePagination) patientHandler := corporate_handlers.NewPatientHandler(l) corp.GET("/patient", patientHandler.ShowPatient) diff --git a/services/corporate/mcudetail/tabdaftarpeserta.services.go b/services/corporate/mcudetail/tabdaftarpeserta.services.go index 181a8f5..2532fdb 100644 --- a/services/corporate/mcudetail/tabdaftarpeserta.services.go +++ b/services/corporate/mcudetail/tabdaftarpeserta.services.go @@ -1,6 +1,14 @@ package mcu_corporate_services -import "cpone/db" +import ( + "cpone/db" + "cpone/models" + dbx "cpone/package/database" + "fmt" + "math" + + "go.uber.org/zap" +) type TabDaftarPesertaServices struct { TabDaftarPesertaStore db.AppStore @@ -11,3 +19,56 @@ func NewTabDaftarPesertaServices(uStore db.AppStore) *TabDaftarPesertaServices { TabDaftarPesertaStore: uStore, } } + +func (tdps *TabDaftarPesertaServices) GetListMcuDaftarPeserta(id string, currentpage int, rowperpage int) ([]models.ModelMcuDaftarPeserta, int, error) { + logger, _ := zap.NewProduction() + var listDaftarPeserta []models.ModelMcuDaftarPeserta + var totalData int + offset := (currentpage - 1) * rowperpage + + querytotal := `SELECT COUNT(*) + FROM t_orderheader + JOIN m_patient ON T_OrderHeaderM_PatientID = M_PatientID + AND M_PatientIsActive = 'Y' + WHERE T_OrderHeaderIsActive = 'Y' AND T_OrderHeaderMgm_McuID = ?` + + if err := dbx.Handlex.Get(&totalData, querytotal, id); err != nil { + return nil, 0, fmt.Errorf("error querying database: %v", err) + } + + query := `SELECT T_OrderHeaderID, + T_OrderHeaderDate, + T_OrderHeaderLabNumber, + T_OrderHeaderM_PatientAge, + M_PatientID, + M_PatientNoReg, + M_PatientName, + M_PatientGender, + CASE + WHEN M_PatientGender = 'male' THEN 'Laki - Laki' + WHEN M_PatientGender = 'female' THEN 'Perempuan' + ELSE ' ' + END AS jenisKelamin, + M_PatientDOB, + FLOOR(DATEDIFF(CURDATE(), M_PatientDOB)/ 365.25) AS age + FROM t_orderheader + JOIN m_patient ON T_OrderHeaderM_PatientID = M_PatientID + AND M_PatientIsActive = 'Y' + WHERE T_OrderHeaderIsActive = 'Y' AND T_OrderHeaderMgm_McuID = ? + ORDER BY M_PatientName ASC + LIMIT ? OFFSET ?` + + if err := dbx.Handlex.Select(&listDaftarPeserta, query, id, rowperpage, offset); err != nil { + return nil, 0, fmt.Errorf("error querying database: %v", err) + } + totalPage := int(math.Ceil(float64(totalData) / float64(rowperpage))) + + defer logger.Sync() + logger.Info("GET DATA PESERTA", + zap.Any("id", id), + zap.Any("total data", totalData), + zap.Any("peserta", listDaftarPeserta), + ) + + return listDaftarPeserta, totalPage, nil +} diff --git a/views/corporate/mcu/mcudetail.templ b/views/corporate/mcu/mcudetail.templ index f835ab0..e1451f8 100644 --- a/views/corporate/mcu/mcudetail.templ +++ b/views/corporate/mcu/mcudetail.templ @@ -57,7 +57,7 @@ templ CSSMcuDetail( @CssKesimpulan } -templ JSMcuDetail() { +templ JSMcuDetail() { } templ ShowMcuDetail( diff --git a/views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go b/views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go new file mode 100644 index 0000000..3295c5f --- /dev/null +++ b/views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go @@ -0,0 +1,35 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package corporate_mcudetail + +//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" + +func ModalDaftarPeserta() 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 + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/views/corporate/mcu/mcutab/tabdaftarpeserta.templ b/views/corporate/mcu/mcutab/tabdaftarpeserta.templ index 9917059..ce3ce90 100644 --- a/views/corporate/mcu/mcutab/tabdaftarpeserta.templ +++ b/views/corporate/mcu/mcutab/tabdaftarpeserta.templ @@ -1,24 +1,64 @@ package corporate_mcudetail import "cpone/layout" +import "cpone/models" +import "cpone/component/customtextfield" templ TabDaftarPesertaScreen( - tablecomponent templ.Component, + tableID string, + paginationID string, + content templ.Component, ) {
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID", + Name: "tableID", + Type: "hidden", + Value: tableID}) + @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID", + Name: "paginationID", + Type: "hidden", + Value: paginationID})

Daftar Peserta

- @tablecomponent +
+ @content +
+
+ Loading... +
+
+
+
} templ CSSTabDaftarPeserta() { - } templ JsTabDaftarPeserta() { - +} + +script BeforeRequestContent() { + const loadingParent = document.getElementById("loading-parent"); + const loadingChild = document.getElementById("loading-child"); + const loadingSpinner = document.getElementById("loading-spinner"); + + loadingParent.classList.add("overlay"); + loadingParent.classList.add("overlay-block"); + loadingChild.classList.add("overlay-layer"); + loadingSpinner.classList.remove("d-none"); +} + +script AfterRequestContent() { + const loadingParent = document.getElementById("loading-parent"); + const loadingChild = document.getElementById("loading-child"); + const loadingSpinner = document.getElementById("loading-spinner"); + + loadingParent.classList.remove("overlay"); + loadingParent.classList.remove("overlay-block"); + loadingChild.classList.remove("overlay-layer"); + loadingSpinner.classList.add("d-none"); } templ ShowTabDafterPeserta( diff --git a/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go b/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go index c5f2f6a..7a401aa 100644 --- a/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go +++ b/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go @@ -11,9 +11,13 @@ import "io" import "bytes" import "cpone/layout" +import "cpone/models" +import "cpone/component/customtextfield" func TabDaftarPesertaScreen( - tablecomponent templ.Component, + tableID string, + paginationID string, + content templ.Component, ) templ.Component { return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) @@ -27,15 +31,33 @@ func TabDaftarPesertaScreen( templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Daftar Peserta

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = tablecomponent.Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID", + Name: "tableID", + Type: "hidden", + Value: tableID}).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID", + Name: "paginationID", + Type: "hidden", + Value: paginationID}).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Daftar Peserta

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = content.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Loading...
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -86,6 +108,40 @@ func JsTabDaftarPeserta() templ.Component { }) } +func BeforeRequestContent() templ.ComponentScript { + return templ.ComponentScript{ + Name: `__templ_BeforeRequestContent_5717`, + Function: `function __templ_BeforeRequestContent_5717(){const loadingParent = document.getElementById("loading-parent"); + const loadingChild = document.getElementById("loading-child"); + const loadingSpinner = document.getElementById("loading-spinner"); + + loadingParent.classList.add("overlay"); + loadingParent.classList.add("overlay-block"); + loadingChild.classList.add("overlay-layer"); + loadingSpinner.classList.remove("d-none"); +}`, + Call: templ.SafeScript(`__templ_BeforeRequestContent_5717`), + CallInline: templ.SafeScriptInline(`__templ_BeforeRequestContent_5717`), + } +} + +func AfterRequestContent() templ.ComponentScript { + return templ.ComponentScript{ + Name: `__templ_AfterRequestContent_848c`, + Function: `function __templ_AfterRequestContent_848c(){const loadingParent = document.getElementById("loading-parent"); + const loadingChild = document.getElementById("loading-child"); + const loadingSpinner = document.getElementById("loading-spinner"); + + loadingParent.classList.remove("overlay"); + loadingParent.classList.remove("overlay-block"); + loadingChild.classList.remove("overlay-layer"); + loadingSpinner.classList.add("d-none"); +}`, + Call: templ.SafeScript(`__templ_AfterRequestContent_848c`), + CallInline: templ.SafeScriptInline(`__templ_AfterRequestContent_848c`), + } +} + func ShowTabDafterPeserta( title string, cmp templ.Component, diff --git a/views/corporate/mcu/mcutab/tabledaftarpeserta.templ b/views/corporate/mcu/mcutab/tabledaftarpeserta.templ index 30bd0db..4d0f1ae 100644 --- a/views/corporate/mcu/mcutab/tabledaftarpeserta.templ +++ b/views/corporate/mcu/mcutab/tabledaftarpeserta.templ @@ -1,9 +1,21 @@ package corporate_mcudetail import "cpone/component/table" +import "cpone/models" + + +templ ContentLayout( + tablecomponent templ.Component, + paginationtable templ.Component, +) { +
+ @tablecomponent + @paginationtable +
+} templ TableDaftarPeserta( - data []string, + data []models.ModelMcuDaftarPeserta, tableID string, ) {
@@ -13,7 +25,7 @@ templ TableDaftarPeserta(
} -templ ItemRow(data []string) { +templ ItemRow(data []models.ModelMcuDaftarPeserta) { if len(data) == 0 { Data Tidak Ditemukan @@ -21,26 +33,27 @@ templ ItemRow(data []string) { } for _, v := range data { - 123123 - { v } - Perempuan - 24 + { v.T_OrderHeaderLabNumber } + { v.M_PatientName } + { v.M_PatientGender } + { v.Age } -
-
- if v == "Nanda Arisu" { - Unfit - } else { - Fit - } -
-
- Lorem Ipsum In Dolor Ad Sasum Mara Naka Adhum In Horem -
-
+ //
+ //
+ // if v. == "Nanda Arisu" { + // Unfit + // } else { + // Fit + // } + //
+ //
+ // Lorem Ipsum In Dolor Ad Sasum Mara Naka Adhum In Horem + //
+ //
+ - - @ItemAction("1") + @ItemAction(v.M_PatientID) } diff --git a/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go b/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go index a14511f..e44b863 100644 --- a/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go +++ b/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go @@ -11,10 +11,11 @@ import "io" import "bytes" import "cpone/component/table" +import "cpone/models" -func TableDaftarPeserta( - data []string, - tableID string, +func ContentLayout( + tablecomponent templ.Component, + paginationtable templ.Component, ) templ.Component { return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) @@ -28,16 +29,68 @@ func TableDaftarPeserta( templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, AfterRequestContent()) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = tablecomponent.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = paginationtable.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func TableDaftarPeserta( + data []models.ModelMcuDaftarPeserta, + tableID 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_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
123123") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var4 string - templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(v) + var templ_7745c5c3_Var6 string + templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(v.T_OrderHeaderLabNumber) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 25, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 36, Col: 42} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Perempuan24
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - if v == "Nanda Arisu" { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Unfit") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } else { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Fit") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } + var templ_7745c5c3_Var7 string + templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_PatientName) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 37, Col: 33} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Lorem Ipsum In Dolor Ad Sasum Mara Naka Adhum In Horem\r
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = ItemAction("1").Render(ctx, templ_7745c5c3_Buffer) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var8 string + templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_PatientGender) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 38, Col: 35} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var9 string + templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(v.Age) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 39, Col: 23} + } + _, 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("-\r") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = ItemAction(v.M_PatientID).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -140,9 +217,9 @@ func ItemAction( defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var5 := templ.GetChildren(ctx) - if templ_7745c5c3_Var5 == nil { - templ_7745c5c3_Var5 = templ.NopComponent + 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("
")