diff --git a/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go b/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go
index 6ff09d5..5b2dbbf 100644
--- a/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go
+++ b/handlers/corporate/mcudetail/tabdaftarpeserta.handlers.go
@@ -27,9 +27,11 @@ func NewTabDaftarPesertaHandlers(tdp TabDaftarPesertaServices) *TabDaftarPeserta
func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context) error {
logger, _ := zap.NewProduction()
- // title := "Daftar Peserta"
+ title := "Daftar Report"
tableID := utils.GenerateRandomID("tableid")
paginationID := utils.GenerateRandomID("paginationID")
+ dialogReportID := utils.GenerateRandomID("dialogreportid")
+ dialogReportBodyID := utils.GenerateRandomID("dialogreportbodyid")
id := c.Param("id")
logger.Info("Params", zap.Any("id", id))
@@ -43,6 +45,10 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
table := corporate_mcudetail.TableDaftarPeserta(
dataTable,
tableID,
+ "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openreport",
+ "#"+dialogReportBodyID,
+ "#tableID, #paginationID, #dialogReportID, #dialogReportBodyID",
+ "outerHTML",
)
pagination := pagination.PaginationV3(
@@ -50,7 +56,7 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
1,
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage",
paginationID,
- "#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
+ "#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #dialogReportID, #dialogReportBodyID",
"#contentlayout",
"outerHTML", "", "",
corporate_mcudetail.BeforeRequestContent(),
@@ -62,7 +68,38 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
pagination,
)
- content := corporate_mcudetail.TabDaftarPesertaScreen(tableID, paginationID, clayout)
+ bodymodal := corporate_mcudetail.ModalBody(
+ dialogReportBodyID,
+ corporate_mcudetail.JsShowModal(""),
+ )
+
+ closemodal := corporate_mcudetail.ModalClose(
+ "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closereport",
+ "#"+dialogReportBodyID,
+ "outerHTML",
+ "#"+dialogReportID,
+ )
+
+ modaldialog := corporate_mcudetail.DialogReport(
+ "",
+ "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialogreport",
+ "#"+dialogReportBodyID,
+ "outerHTML",
+ "#tableID, #paginationID, #dialogReportID, #dialogReportBodyID"+paginationID,
+ dialogReportID,
+ title,
+ bodymodal,
+ closemodal,
+ )
+
+ content := corporate_mcudetail.TabDaftarPesertaScreen(
+ tableID,
+ paginationID,
+ dialogReportID,
+ dialogReportBodyID,
+ clayout,
+ modaldialog,
+ )
// css := corporate_mcudetail.CSSTabDaftarPeserta()
// js := corporate_mcudetail.JsTabDaftarPeserta()
@@ -80,6 +117,8 @@ func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error {
pageparam := c.QueryParam("page")
tableID := c.QueryParam("tableID")
paginationID := c.QueryParam("paginationID")
+ // dialogReportID := c.QueryParam("dialogReportID")
+ dialogReportBodyID := c.QueryParam("dialogReportBodyID")
id := c.Param("id")
@@ -93,14 +132,21 @@ func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error {
if err != nil {
return err
}
- table := corporate_mcudetail.TableDaftarPeserta(tableData, tableID)
+ table := corporate_mcudetail.TableDaftarPeserta(
+ tableData,
+ tableID,
+ "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openreport",
+ "#"+dialogReportBodyID,
+ "#tableID, #paginationID, #dialogReportID, #dialogReportBodyID",
+ "outerHTML",
+ )
pagination := pagination.PaginationV3(
totalPage,
page,
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage",
paginationID,
- "#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
+ "#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #dialogReportID, #dialogReportBodyID",
"#contentlayout",
"outerHTML", "", "",
corporate_mcudetail.BeforeRequestContent(),
@@ -116,3 +162,19 @@ func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error {
clayout := corporate_mcudetail.ContentLayout(table, pagination)
return utils.View(c, clayout)
}
+
+func (tdp *TabDaftarPesertaHandlers) HandleOpenReportDialog(c echo.Context) error {
+ logger, _ := zap.NewProduction()
+
+ idx := c.QueryParam("idx")
+ dialogReportID := c.QueryParam("dialogReportID")
+ dialogReportBodyID := c.QueryParam("dialogReportBodyID")
+ logger.Info("params", zap.Any("idx", idx))
+
+ modalbody := corporate_mcudetail.ModalBody(
+ dialogReportBodyID,
+ corporate_mcudetail.JsShowModal("#"+dialogReportID),
+ )
+
+ return utils.View(c, modalbody)
+}
diff --git a/handlers/corporate/patient.handlers.go b/handlers/corporate/patient.handlers.go
index 6bba2f9..664e86b 100644
--- a/handlers/corporate/patient.handlers.go
+++ b/handlers/corporate/patient.handlers.go
@@ -152,7 +152,7 @@ func (ph *PatientHandler) HandleChangePage(c echo.Context) error {
listID,
"/corp/dashboard_pat/open",
"#"+dialogBodyID,
- "#listID, #paginationID, #dialogID",
+ "#listID, #paginationID, #dialogID, ",
"outerHTML",
)
diff --git a/handlers/public/landingpage.handlers.go b/handlers/public/landingpage.handlers.go
index 53e1da0..bbf56a0 100644
--- a/handlers/public/landingpage.handlers.go
+++ b/handlers/public/landingpage.handlers.go
@@ -57,7 +57,7 @@ func (uh *LandingPageHandler) ShowLandingPage(c echo.Context) error {
)
// fmt.Printf("%+v\n", udata)
- helo := public_landingpage.ShowLandingPage("Hello World",
+ helo := public_landingpage.ShowLandingPage("HOME",
public_landingpage.MainLandingPage(public_landingpage.ListMedicalService(udata),
public_landingpage.ListAdvantage(adData), public_landingpage.ListPromotion(lpData),
public_landingpage.FooterSection(ftNav)),
diff --git a/handlers/routes.go b/handlers/routes.go
index 1a9ca8b..41aee9e 100644
--- a/handlers/routes.go
+++ b/handlers/routes.go
@@ -125,6 +125,7 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.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)
+ corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta/openreport", daftarpesertaHandl.HandleOpenReportDialog)
patienServices := corporate_services.NewPatientServices(appStore)
patientHandler := corporate_handlers.NewPatientHandler(patienServices)
diff --git a/views/corporate/mcu/mcutab/modaldaftarpeserta.templ b/views/corporate/mcu/mcutab/modaldaftarpeserta.templ
index 5102abe..d8431f2 100644
--- a/views/corporate/mcu/mcutab/modaldaftarpeserta.templ
+++ b/views/corporate/mcu/mcutab/modaldaftarpeserta.templ
@@ -1,7 +1,86 @@
package corporate_mcudetail
-templ ModalDaftarPeserta() {
-
-
+import "cpone/component/modal"
+
+templ DialogReport(
+ IDComponent string,
+ postLink string,
+ hxTarget string,
+ hxSwap string,
+ hxInclude string,
+ modalID string,
+ modalTitle string,
+ modalBody templ.Component,
+ modalClose templ.Component,
+) {
+
+
+ @modalcomponent.ModalViewXL(modalID,
+ modalTitle,
+ modalBody,
+ modalClose,
+ )
+
+}
+
+templ ModalBody(
+ IDComponent string,
+ hxOnLoad templ.ComponentScript,
+) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+script JsHideModal(modalID string) {
+ $(modalID).modal('hide');
+}
+
+script JsShowModal(modalID string) {
+ $(modalID).modal('show');
+}
+
+templ ModalClose(LinkClose string, hxTarget string, hxSwap string, modalID string) {
+
}
\ No newline at end of file
diff --git a/views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go b/views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go
index 3295c5f..6203fed 100644
--- a/views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go
+++ b/views/corporate/mcu/mcutab/modaldaftarpeserta_templ.go
@@ -10,7 +10,19 @@ import "context"
import "io"
import "bytes"
-func ModalDaftarPeserta() templ.Component {
+import "cpone/component/modal"
+
+func DialogReport(
+ IDComponent string,
+ postLink string,
+ hxTarget string,
+ hxSwap string,
+ hxInclude string,
+ modalID string,
+ modalTitle string,
+ modalBody templ.Component,
+ modalClose 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)
if !templ_7745c5c3_IsBuffer {
@@ -23,7 +35,207 @@ func ModalDaftarPeserta() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = modalcomponent.ModalViewXL(modalID,
+ modalTitle,
+ modalBody,
+ modalClose,
+ ).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 ModalBody(
+ IDComponent string,
+ hxOnLoad templ.ComponentScript,
+) 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_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hxOnLoad)
+ 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 JsHideModal(modalID string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_JsHideModal_5a6b`,
+ Function: `function __templ_JsHideModal_5a6b(modalID){$(modalID).modal('hide');
+}`,
+ Call: templ.SafeScript(`__templ_JsHideModal_5a6b`, modalID),
+ CallInline: templ.SafeScriptInline(`__templ_JsHideModal_5a6b`, modalID),
+ }
+}
+
+func JsShowModal(modalID string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_JsShowModal_3767`,
+ Function: `function __templ_JsShowModal_3767(modalID){$(modalID).modal('show');
+}`,
+ Call: templ.SafeScript(`__templ_JsShowModal_3767`, modalID),
+ CallInline: templ.SafeScriptInline(`__templ_JsShowModal_3767`, modalID),
+ }
+}
+
+func ModalClose(LinkClose string, hxTarget string, hxSwap string, modalID 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_Var11 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var11 == nil {
+ templ_7745c5c3_Var11 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, JsHideModal(modalID))
+ 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
}
diff --git a/views/corporate/mcu/mcutab/tabdaftarpeserta.templ b/views/corporate/mcu/mcutab/tabdaftarpeserta.templ
index ce3ce90..3dd2106 100644
--- a/views/corporate/mcu/mcutab/tabdaftarpeserta.templ
+++ b/views/corporate/mcu/mcutab/tabdaftarpeserta.templ
@@ -7,7 +7,10 @@ import "cpone/component/customtextfield"
templ TabDaftarPesertaScreen(
tableID string,
paginationID string,
+ dialogReportID string,
+ dialogReportBodyID string,
content templ.Component,
+ dialogReport templ.Component,
) {
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
@@ -18,11 +21,20 @@ templ TabDaftarPesertaScreen(
Name: "paginationID",
Type: "hidden",
Value: paginationID})
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogReportID",
+ Name: "dialogReportID",
+ Type: "hidden",
+ Value: dialogReportID})
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogReportBodyID",
+ Name: "dialogReportBodyID",
+ Type: "hidden",
+ Value: dialogReportBodyID})
Daftar Peserta
@content
+ @dialogReport
Loading...
diff --git a/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go b/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go
index 7a401aa..86cb315 100644
--- a/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go
+++ b/views/corporate/mcu/mcutab/tabdaftarpeserta_templ.go
@@ -17,7 +17,10 @@ import "cpone/component/customtextfield"
func TabDaftarPesertaScreen(
tableID string,
paginationID string,
+ dialogReportID string,
+ dialogReportBodyID string,
content templ.Component,
+ dialogReport 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)
@@ -49,6 +52,20 @@ func TabDaftarPesertaScreen(
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+ templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogReportID",
+ Name: "dialogReportID",
+ Type: "hidden",
+ Value: dialogReportID}).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogReportBodyID",
+ Name: "dialogReportBodyID",
+ Type: "hidden",
+ Value: dialogReportBodyID}).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
@@ -57,6 +74,10 @@ func TabDaftarPesertaScreen(
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
+ templ_7745c5c3_Err = dialogReport.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
diff --git a/views/corporate/mcu/mcutab/tabledaftarpeserta.templ b/views/corporate/mcu/mcutab/tabledaftarpeserta.templ
index 4d0f1ae..8da3a31 100644
--- a/views/corporate/mcu/mcutab/tabledaftarpeserta.templ
+++ b/views/corporate/mcu/mcutab/tabledaftarpeserta.templ
@@ -17,15 +17,30 @@ templ ContentLayout(
templ TableDaftarPeserta(
data []models.ModelMcuDaftarPeserta,
tableID string,
+ hxGet string,
+ hxTarget string,
+ hxInclude string,
+ hxSwap string,
) {
@tablecomponent.TableV3([]string{"NOLAB", "NAMA", "JENIS KELAMIN", "UMUR", "KESIMPULAN", "AKSI"},
[]string{"10%","20%","10%","10%","30%","20%"},
- ItemRow(data))
+ ItemRow(data,
+ hxGet,
+ hxTarget,
+ hxInclude,
+ hxSwap,
+ ))
}
-templ ItemRow(data []models.ModelMcuDaftarPeserta) {
+templ ItemRow(
+ data []models.ModelMcuDaftarPeserta,
+ hxGet string,
+ hxTarget string,
+ hxInclude string,
+ hxSwap string,
+) {
if len(data) == 0 {
| Data Tidak Ditemukan |
@@ -53,7 +68,12 @@ templ ItemRow(data []models.ModelMcuDaftarPeserta) {
-
- @ItemAction(v.M_PatientID)
+ @ItemAction(v.M_PatientID,
+ hxGet,
+ hxTarget,
+ hxInclude,
+ hxSwap,
+ )
|
}
@@ -61,10 +81,19 @@ templ ItemRow(data []models.ModelMcuDaftarPeserta) {
templ ItemAction(
id string,
+ hxGet string,
+ hxTarget string,
+ hxInclude string,
+ hxSwap string,
) {
diff --git a/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go b/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go
index e44b863..0940af6 100644
--- a/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go
+++ b/views/corporate/mcu/mcutab/tabledaftarpeserta_templ.go
@@ -68,6 +68,10 @@ func ContentLayout(
func TableDaftarPeserta(
data []models.ModelMcuDaftarPeserta,
tableID string,
+ hxGet string,
+ hxTarget string,
+ hxInclude string,
+ hxSwap 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)
@@ -88,7 +92,7 @@ func TableDaftarPeserta(
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(tableID)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 21, Col: 21}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 25, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -100,7 +104,12 @@ func TableDaftarPeserta(
}
templ_7745c5c3_Err = tablecomponent.TableV3([]string{"NOLAB", "NAMA", "JENIS KELAMIN", "UMUR", "KESIMPULAN", "AKSI"},
[]string{"10%", "20%", "10%", "10%", "30%", "20%"},
- ItemRow(data)).Render(ctx, templ_7745c5c3_Buffer)
+ ItemRow(data,
+ hxGet,
+ hxTarget,
+ hxInclude,
+ hxSwap,
+ )).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -115,7 +124,13 @@ func TableDaftarPeserta(
})
}
-func ItemRow(data []models.ModelMcuDaftarPeserta) templ.Component {
+func ItemRow(
+ data []models.ModelMcuDaftarPeserta,
+ hxGet string,
+ hxTarget string,
+ hxInclude string,
+ hxSwap 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 {
@@ -142,7 +157,7 @@ func ItemRow(data []models.ModelMcuDaftarPeserta) templ.Component {
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: 36, Col: 42}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 51, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -155,7 +170,7 @@ func ItemRow(data []models.ModelMcuDaftarPeserta) templ.Component {
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}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 52, Col: 33}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -168,7 +183,7 @@ func ItemRow(data []models.ModelMcuDaftarPeserta) templ.Component {
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}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 53, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -181,7 +196,7 @@ func ItemRow(data []models.ModelMcuDaftarPeserta) templ.Component {
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}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 54, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -191,7 +206,12 @@ func ItemRow(data []models.ModelMcuDaftarPeserta) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = ItemAction(v.M_PatientID).Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = ItemAction(v.M_PatientID,
+ hxGet,
+ hxTarget,
+ hxInclude,
+ hxSwap,
+ ).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -209,6 +229,10 @@ func ItemRow(data []models.ModelMcuDaftarPeserta) templ.Component {
func ItemAction(
id string,
+ hxGet string,
+ hxTarget string,
+ hxInclude string,
+ hxSwap 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)
@@ -222,7 +246,59 @@ func ItemAction(
templ_7745c5c3_Var10 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/views/corporate/patient/patient.templ b/views/corporate/patient/patient.templ
index 9f916fd..51b61c8 100644
--- a/views/corporate/patient/patient.templ
+++ b/views/corporate/patient/patient.templ
@@ -105,79 +105,7 @@ script AfterRequestContent() {
loadingSpinner.classList.add("d-none");
}
-templ JSDashboardPat() {
-
+templ JSDashboardPat() {
}
templ ShowDashboardPat(
diff --git a/views/corporate/patient/patient_templ.go b/views/corporate/patient/patient_templ.go
index d933516..2efc8c8 100644
--- a/views/corporate/patient/patient_templ.go
+++ b/views/corporate/patient/patient_templ.go
@@ -176,10 +176,6 @@ func JSDashboardPat() templ.Component {
templ_7745c5c3_Var3 = 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)
}