dialog daftar pasien

This commit is contained in:
Hanan Askarim
2024-06-14 19:57:45 +07:00
parent e6b5435337
commit 382f91c6ca
13 changed files with 1870 additions and 127 deletions

View File

@@ -0,0 +1,26 @@
package modalcomponent
templ ModalBtnPrint(modalBtnPrintID string, modalBtnPrintTitle string, btnClose templ.Component, modalBody templ.Component) {
<div
class="modal fade"
style="display: none"
id={ modalBtnPrintID }
tabindex="-1"
role="dialog"
data-backdrop="static"
aria-labelledby={ modalBtnPrintID }
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-black font-weight-bolder">{ modalBtnPrintTitle }</h5>
@btnClose
</div>
<div class="modal-body">
@modalBody
</div>
</div>
</div>
</div>
}

View File

@@ -0,0 +1,90 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.663
package modalcomponent
//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 ModalBtnPrint(modalBtnPrintID string, modalBtnPrintTitle string, btnClose templ.Component, modalBody 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 {
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=\"modal fade\" style=\"display: none\" id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(modalBtnPrintID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_btn_print.templ`, Line: 7, Col: 22}
}
_, 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("\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\" aria-labelledby=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(modalBtnPrintID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_btn_print.templ`, Line: 11, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" aria-hidden=\"true\"><div class=\"modal-dialog modal-dialog-centered\" role=\"document\"><div class=\"modal-content\"><div class=\"modal-header\"><h5 class=\"modal-title text-black font-weight-bolder\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(modalBtnPrintTitle)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_btn_print.templ`, Line: 17, Col: 79}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = btnClose.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"modal-body\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = modalBody.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div></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
})
}

View File

@@ -0,0 +1,32 @@
package modalcomponent
templ ModalPrint(modalPrintID string, modalPrintTitle string, btnClose templ.Component, modalBody templ.Component) {
<div
class="modal fade modal-print"
tabindex="-1"
id={ modalPrintID }
role="dialog"
data-backdrop="static"
aria-labelledby={ modalPrintID }
aria-hidden="true"
>
<!-- modal-print-data -->
<div
class="modal-dialog modal-dialog-centered modal-xl"
role="document"
>
<div class="modal-content">
<div class="modal-header header-print">
<h5 class="modal-print-title">{ modalPrintTitle }</h5>
<!-- <a class="btn btn-icon" data-dismiss="modal"> -->
@btnClose
</div>
<div class="modal-body">
<div>
@modalBody
</div>
</div>
</div>
</div>
</div>
}

View File

@@ -0,0 +1,90 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.663
package modalcomponent
//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 ModalPrint(modalPrintID string, modalPrintTitle string, btnClose templ.Component, modalBody 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 {
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=\"modal fade modal-print\" tabindex=\"-1\" id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(modalPrintID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_print.templ`, Line: 7, Col: 19}
}
_, 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("\" role=\"dialog\" data-backdrop=\"static\" aria-labelledby=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(modalPrintID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_print.templ`, Line: 10, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" aria-hidden=\"true\"><!-- modal-print-data --><div class=\"modal-dialog modal-dialog-centered modal-xl\" role=\"document\"><div class=\"modal-content\"><div class=\"modal-header header-print\"><h5 class=\"modal-print-title\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(modalPrintTitle)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal_print.templ`, Line: 20, Col: 52}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5><!-- <a class=\"btn btn-icon\" data-dismiss=\"modal\"> -->")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = btnClose.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"modal-body\"><div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = modalBody.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div></div></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
})
}

View File

@@ -64,3 +64,174 @@ func (mdp *McuDaftarPesertaHandler) HandleShowMcuDaftarPeserta(c echo.Context) e
return utils.View(c, view)
}
func (mdp *McuDaftarPesertaHandler) HandleShowModalMcuDaftarPeserta(c echo.Context) error {
title := "Daftar Peserta"
DialogBtnPrintID := utils.GenerateRandomID("DialogBtnPrintID")
DialogBtnPrintBodyID := utils.GenerateRandomID("DialogBtnPrintBodyID")
dialogPrintLabID := utils.GenerateRandomID("dialogPrintLabID")
dialogPrintLabBodyID := utils.GenerateRandomID("dialogPrintLabBodyID")
dialogPrintNonLabID := utils.GenerateRandomID("dialogPrintNonLabID")
dialogPrintFisikID := utils.GenerateRandomID("dialogPrintFisikID")
dialogPrintResumeID := utils.GenerateRandomID("dialogPrintResumeID")
dialogBtnPrintBodyCmp := dev_mcudaftarpeserta.BodyBtnPrint(
DialogBtnPrintID,
dialogPrintLabID,
DialogBtnPrintBodyID,
"Hasil Lab",
dialogPrintNonLabID,
"Hasil Non Lab",
dialogPrintFisikID,
"Hasil Fisik",
dialogPrintResumeID,
"Resume Individu",
"/dev/mcudaftarpeserta/opendialoglab",
"#"+dialogPrintLabBodyID,
"outerHTML",
"#dialogPrintLabBodyID, #DialogBtnPrintBodyID, #DialogBtnPrintID, #dialogPrintLabID, #dialogPrintNonLabID, #dialogPrintFisikID, #dialogPrintResumeID",
dev_mcudaftarpeserta.JsHideModalBtnPrint(""),
)
btnCloseModalCmp := dev_mcudaftarpeserta.BtnPrintClose(
"/dev/mcudaftarpeserta/closebtnprint",
"#"+DialogBtnPrintBodyID,
"outerHTML",
DialogBtnPrintID,
)
titleNameBtnPrint := "Abraham Kurniawan - 21304"
modalBtnPrintComponent := dev_mcudaftarpeserta.ButtoPrintnModalCmp(
models.ModelButtonPrintComponent{
IDComponent: "dialogbtn",
HxTarget: "#" + DialogBtnPrintBodyID,
HxSwap: "outerHTML",
HxInclude: "#DialogBtnPrintID, #DialogBtnPrintBodyID, #dialogPrintLabID, #dialogPrintNonLabID, #dialogPrintFisikID, #dialogPrintResumeID",
ModalBtnPrintID: DialogBtnPrintID,
ModalBtnPrintTitle: titleNameBtnPrint,
DialogBody: dialogBtnPrintBodyCmp,
ButtonClose: btnCloseModalCmp,
},
)
// modal component print
dialogPrintBodyCmp := dev_mcudaftarpeserta.BodyPrintComponent(
dialogPrintLabID,
dev_mcudaftarpeserta.JsHideModalPrintLab(""),
)
btnClosePrintCmp := dev_mcudaftarpeserta.PrintClose(
"/dev/mcudaftarpeserta/closeprintlab",
"#"+dialogPrintLabBodyID,
"outerHTML",
)
modalPrintComponent := dev_mcudaftarpeserta.PrintComponent(
models.ModelPrintComponent{
IDComponent: "dialogprintbodylab1",
HxTarget: "#" + dialogPrintLabBodyID,
HxSwap: "outerHTML",
HxInclude: "#dialogPrintLabBodyID, #DialogBtnPrintID, #DialogBtnPrintBodyID, #dialogPrintLabID, #dialogPrintNonLabID, #dialogPrintFisikID, #dialogPrintResumeID",
ModalPrintID: dialogPrintLabID,
ModalPrintTitle: "Hasil Cetak Lab",
DialogBody: dialogPrintBodyCmp,
ButtonClose: btnClosePrintCmp,
},
)
content := dev_mcudaftarpeserta.ModalMcuDaftarPesertaScreen(
DialogBtnPrintID,
DialogBtnPrintBodyID,
dialogPrintLabID,
dialogPrintLabBodyID,
dialogPrintNonLabID,
dialogPrintFisikID,
dialogPrintResumeID,
"/dev/mcudaftarpeserta/opendialog",
"#"+DialogBtnPrintBodyID,
"outerHTML",
"#DialogBtnPrintBodyID, #DialogBtnPrintID, #dialogPrintLabID, #dialogPrintNonLabID, #dialogPrintFisikID, #dialogPrintResumeID",
2,
modalBtnPrintComponent,
modalPrintComponent)
css := dev_mcudaftarpeserta.CSSMcuDaftarPeserta()
js := dev_mcudaftarpeserta.JsMcuDaftarPeserta()
view := dev_mcudaftarpeserta.ShowMcuDafterPeserta(
title,
content,
css,
js,
)
return utils.View(c, view)
}
func (mdp *McuDaftarPesertaHandler) HandleOpenBtnPrint(c echo.Context) error {
DialogBtnPrintID := c.QueryParam("DialogBtnPrintID")
DialogBtnPrintBodyID := c.QueryParam("DialogBtnPrintBodyID")
dialogPrintLabID := c.QueryParam("dialogPrintLabID")
dialogPrintNonLabID := c.QueryParam("dialogPrintNonLabID")
dialogPrintFisikID := c.QueryParam("dialogPrintFisikID")
dialogPrintResumeID := c.QueryParam("dialogPrintResumeID")
newDialog := dev_mcudaftarpeserta.BodyBtnPrint(
DialogBtnPrintID,
dialogPrintLabID,
DialogBtnPrintBodyID,
"Hasil Lab",
dialogPrintNonLabID,
"Hasil Non Lab",
dialogPrintFisikID,
"Hasil Fisik",
dialogPrintResumeID,
"Resume Individu",
"/dev/mcudaftarpeserta/opendialoglab",
"#dialogprintbodylab1",
"outerHTML",
"#dialogprintbodylab1, #DialogBtnPrintBodyID, #DialogBtnPrintID, #dialogPrintLabID, #dialogPrintNonLabID, #dialogPrintFisikID, #dialogPrintResumeID",
dev_mcudaftarpeserta.JsShowModalBtnPrint("#"+DialogBtnPrintID),
)
return utils.View(c, newDialog)
}
func (mdp *McuDaftarPesertaHandler) HandleCloseBtnPrint(c echo.Context) error {
// DialogBtnPrintID := c.QueryParam("DialogBtnPrintID")
DialogBtnPrintID := c.FormValue("DialogBtnPrintID")
DialogBtnPrintBodyID := c.FormValue("DialogBtnPrintBodyID")
dialogPrintLabID := c.FormValue("dialogPrintLabID")
dialogPrintNonLabID := c.FormValue("dialogPrintNonLabID")
dialogPrintFisikID := c.FormValue("dialogPrintFisikID")
dialogPrintResumeID := c.FormValue("dialogPrintResumeID")
newDialog := dev_mcudaftarpeserta.BodyBtnPrint(
DialogBtnPrintID,
dialogPrintLabID,
DialogBtnPrintBodyID,
"Hasil Lab",
dialogPrintNonLabID,
"Hasil Non Lab",
dialogPrintFisikID,
"Hasil Fisik",
dialogPrintResumeID,
"Resume Individu",
"/dev/mcudaftarpeserta/opendialoglab",
"#dialogprintbodylab1",
"outerHTML",
"#dialogprintbodylab1, #DialogBtnPrintBodyID, #DialogBtnPrintID, #dialogPrintLabID, #dialogPrintNonLabID, #dialogPrintFisikID, #dialogPrintResumeID",
dev_mcudaftarpeserta.JsHideModalBtnPrint(""),
)
return utils.View(c, newDialog)
}
// lab
func (mdp *McuDaftarPesertaHandler) HandleOpenLab(c echo.Context) error {
dialogPrintLabID := c.QueryParam("dialogPrintLabID")
newDialog := dev_mcudaftarpeserta.BodyPrintComponent(
"dialogprintbodylab1",
dev_mcudaftarpeserta.JsHideModalBtnPrint("#"+dialogPrintLabID),
)
return utils.View(c, newDialog)
}

View File

@@ -370,4 +370,9 @@ func SetupRoutesDev(app *echo.Echo, appStore db.AppStore) {
devMcuDaftarPesertaServices := dev_services.NewMcuDaftarPesertaServices(appStore)
devMcuDaftarPesertaHandler := dev_handlers.NewMcuDaftarPeserta(devMcuDaftarPesertaServices)
dev.GET("/mcudaftarpeserta/:id", devMcuDaftarPesertaHandler.HandleGetMcuDaftarPeserta)
dev.GET("/mcudaftarpeserta", devMcuDaftarPesertaHandler.HandleShowModalMcuDaftarPeserta)
dev.GET("/mcudaftarpeserta/opendialog", devMcuDaftarPesertaHandler.HandleOpenBtnPrint)
dev.POST("/mcudaftarpeserta/closebtnprint", devMcuDaftarPesertaHandler.HandleCloseBtnPrint)
dev.GET("/mcudaftarpeserta/opendialoglab", devMcuDaftarPesertaHandler.HandleOpenLab)
}

View File

@@ -1,5 +1,7 @@
package models
import "github.com/a-h/templ"
type ModelMcuDaftarPeserta struct {
T_OrderHeaderID string `db:"T_OrderHeaderID"`
T_OrderHeaderDate string `db:"T_OrderHeaderDate"`
@@ -13,3 +15,27 @@ type ModelMcuDaftarPeserta struct {
M_PatientDOB string `db:"M_PatientDOB"`
Age string `db:"age"`
}
type ModelButtonPrintComponent struct {
IDComponent string
Link string
HxTarget string
HxSwap string
HxInclude string
ModalBtnPrintID string
ModalBtnPrintTitle string
DialogBody templ.Component
ButtonClose templ.Component
}
type ModelPrintComponent struct {
IDComponent string
Link string
HxTarget string
HxSwap string
HxInclude string
ModalPrintID string
ModalPrintTitle string
DialogBody templ.Component
ButtonClose templ.Component
}

View File

@@ -1,134 +1,419 @@
package dev_mcudaftarpeserta
import "cpone/layout"
import "cpone/models"
import "cpone/component/customtextfield"
import "strconv"
templ McuDaftarPesertaScreen() {
<div>
<table class="table table-hover table-borderless">
<thead>
<tr>
<th scope="col" width="5%">NO LAB</th>
<th scope="col" width="25%">NAMA</th>
<th scope="col" width="10%">JENIS KELAMIN</th>
<th scope="col" width="10%">UMUR</th>
<th scope="col" width="35%">KESIMPULAN</th>
<th scope="col" width="15%" s>AKSI</th>
</tr>
</thead>
<tbody>
<tr>
<td>21304</td>
<td>Abraham Kurniawan</td>
<td>Laki - Laki</td>
<td>24</td>
<td>
<div class="row">
<div class="col-2">
<span class="label-text fit"> Fit </span>
<!-- <span class="label label-inline label-text"> FIT </span> -->
</div>
<div class="col-10 kesimpulan-desc"></div>
</div>
</td>
<td>
<div>
<a
class="btn btn-icon"
onclick="ShowModal('Abraham Kurniawan','21304')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:document-text"
></span>
</a>
<a href="mcu/hasil-lab.html" class="btn btn-icon">
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:pencil"
></span>
</a>
<a
class="btn btn-icon"
onclick="ShowModalAkses('Abraham@gmail.com','Abraham Kurniawan','unchecked')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons:shield-exclamation-16-solid"
></span>
</a>
</div>
</td>
</tr>
<tr>
<td>21305</td>
<td>Anastasia Claudia</td>
<td>Perempuan</td>
<td>24</td>
<td>
<div class="row">
<div class="col-2 col-xl-2 col-lg-2 col-md-12 col-sm-12">
<span class="label-text unfit"> Unfit </span>
<!-- <span class="label label-inline label-text"> FIT </span> -->
</div>
<div
class="col-10 col-xl-10 col-lg-10 col-md-12 col-sm-12 kesimpulan-desc"
>
Anti HBs (Positif : 752), Cholesterol sedikit meningkat
(218), LDL Cholesterol Direct meningkat (173)
</div>
</div>
</td>
<td>
<div>
<!-- data-target="#exampleModalSizeLg" -->
<a
class="btn btn-icon"
data-toggle="modal"
onclick="ShowModal('Anastasia Claudia', '21305')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:document-text"
></span>
</a>
<a href="mcu/hasil-lab.html" class="btn btn-icon">
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:pencil"
></span>
</a>
<a
class="btn btn-icon"
onclick="ShowModalAkses('Anastasia@gmail.com','Anastasia Claudia','checked')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons:shield-exclamation-16-solid"
></span>
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<table class="table table-hover table-borderless">
<thead>
<tr>
<th scope="col" width="5%">NO LAB</th>
<th scope="col" width="25%">NAMA</th>
<th scope="col" width="10%">JENIS KELAMIN</th>
<th scope="col" width="10%">UMUR</th>
<th scope="col" width="35%">KESIMPULAN</th>
<th scope="col" width="15%" s>AKSI</th>
</tr>
</thead>
<tbody>
<tr>
<td>21304</td>
<td>Abraham Kurniawan</td>
<td>Laki - Laki</td>
<td>24</td>
<td>
<div class="row">
<div class="col-2">
<span class="label-text fit">Fit </span>
<!-- <span class="label label-inline label-text"> FIT </span> -->
</div>
<div class="col-10 kesimpulan-desc"></div>
</div>
</td>
<td>
<div>
<a
class="btn btn-icon"
onclick="ShowModal('Abraham Kurniawan','21304')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:document-text"
></span>
</a>
<a href="mcu/hasil-lab.html" class="btn btn-icon">
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:pencil"
></span>
</a>
<a
class="btn btn-icon"
onclick="ShowModalAkses('Abraham@gmail.com','Abraham Kurniawan','unchecked')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons:shield-exclamation-16-solid"
></span>
</a>
</div>
</td>
</tr>
<tr>
<td>21305</td>
<td>Anastasia Claudia</td>
<td>Perempuan</td>
<td>24</td>
<td>
<div class="row">
<div class="col-2 col-xl-2 col-lg-2 col-md-12 col-sm-12">
<span class="label-text unfit">Unfit </span>
<!-- <span class="label label-inline label-text"> FIT </span> -->
</div>
<div
class="col-10 col-xl-10 col-lg-10 col-md-12 col-sm-12 kesimpulan-desc"
>
Anti HBs (Positif : 752), Cholesterol sedikit meningkat
(218), LDL Cholesterol Direct meningkat (173)
</div>
</div>
</td>
<td>
<div>
<!-- data-target="#exampleModalSizeLg" -->
<a
class="btn btn-icon"
data-toggle="modal"
onclick="ShowModal('Anastasia Claudia', '21305')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:document-text"
></span>
</a>
<a href="mcu/hasil-lab.html" class="btn btn-icon">
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:pencil"
></span>
</a>
<a
class="btn btn-icon"
onclick="ShowModalAkses('Anastasia@gmail.com','Anastasia Claudia','checked')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons:shield-exclamation-16-solid"
></span>
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
}
templ ModalMcuDaftarPesertaScreen(
DialogBtnPrintID string,
DialogBtnPrintBodyID string,
dialogPrintLabID string,
dialogPrintLabBodyID string,
dialogPrintNonLabID string,
dialogPrintFisikID string,
dialogPrintResumeID string,
hxGetBtnPrint string,
hxTargetBtnPrint string,
hxSwapBtnPrint string,
hxIncludeBtnPrint string,
id int,
modalBtnPrint templ.Component,
modalPrint templ.Component,
) {
<div class="container-fluid">
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "DialogBtnPrintID",
Name: "DialogBtnPrintID",
Type: "hidden",
Value: DialogBtnPrintID})
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "DialogBtnPrintBodyID",
Name: "DialogBtnPrintBodyID",
Type: "hidden",
Value: DialogBtnPrintBodyID})
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogPrintLabID",
Name: "dialogPrintLabID",
Type: "hidden",
Value: dialogPrintLabID})
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogPrintLabBodyID",
Name: "dialogPrintLabBodyID",
Type: "hidden",
Value: dialogPrintLabBodyID})
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogPrintNonLabID",
Name: "dialogPrintNonLabID",
Type: "hidden",
Value: dialogPrintNonLabID})
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogPrintFisikID",
Name: "dialogPrintFisikID",
Type: "hidden",
Value: dialogPrintFisikID})
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogPrintResumeID",
Name: "dialogPrintResumeID",
Type: "hidden",
Value: dialogPrintResumeID})
<a
type="button"
class="col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-danger mb-2 btn-sm"
hx-get={ hxGetBtnPrint + "?id=" + strconv.Itoa(id) }
hx-target={ hxTargetBtnPrint }
hx-swap={ hxSwapBtnPrint }
hx-include={ hxIncludeBtnPrint }
hx-indicator={ "#spnredt" + strconv.Itoa(id) }
>
<span id={ "spnredt" + strconv.Itoa(id) } class="htmx-indicator spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
Button cetak
</a>
@modalBtnPrint
@modalPrint
</div>
}
templ CSSMcuDaftarPeserta() {
<link
rel="stylesheet"
href="assets/css/googlefont/poppins.css"
/>
<link
rel="stylesheet"
href="assets/css/googlefont/publicsans.css"
/>
<link
rel="stylesheet"
href="assets/css/googlefont/roboto.css"
/>
<style>
#canvas {
/* overflow-x: scroll; */
margin: 40px 10vw 40px 10vw;
}
#title {
font-weight: 600;
}
.breadcrumb {
background-color: white;
padding: 0px 0px !important;
padding-left: 0 !important;
}
.breadcrumb-item a {
color: #3f4254;
font-family: Poppins;
font-size: 13px;
font-style: normal;
font-weight: 500;
line-height: 21px;
}
.breadcrumb-item.active {
color: #b5b5c3;
font-family: Poppins;
font-size: 13px;
font-style: normal;
font-weight: 500;
line-height: 21px;
}
.nav-tabs {
border-bottom: 0px solid #000000 !important;
}
.nav-link {
color: #637381;
font-family: Public Sans;
font-size: 14px;
font-style: normal;
font-weight: 600;
line-height: 22px;
text-align: center;
}
.nav-link.active {
color: #212b36 !important; /* Warna teks untuk tab yang aktif */
border-bottom: 2px solid #0c518c !important; /* Garis bawah untuk tab yang aktif */
font-family: Public Sans;
font-size: 14px;
font-style: normal;
font-weight: 600;
line-height: 22px;
text-align: center;
}
th {
color: #637381;
font-family: Roboto;
font-weight: 700 !important;
font-size: 14px !important;
padding-bottom: 5px !important;
padding-left: 1px !important;
border-bottom: 1pt dashed #e4e6ef !important;
}
tr {
border-bottom: 1pt dashed #e4e6ef !important;
font-family: Roboto;
}
td {
color: #0e1e28;
font-family: Roboto;
font-style: normal;
font-weight: 500 !important;
font-size: 16px !important;
line-height: 30px; /* 187.5% */
letter-spacing: -0.32px;
padding-left: 1px !important;
padding-top: 16px !important;
padding-bottom: 16px !important;
}
thead {
border-bottom: 1pt dashed #e4e6ef !important;
}
.kesimpulan-desc {
color: #0e1e28;
font-family: Roboto;
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: normal;
letter-spacing: -0.24px;
}
.label-text {
background-color: grey;
color: black;
padding: 5px 20px 5px 20px !important;
border-radius: 6px;
font-family: Poppins !important;
font-size: 11px !important;
font-style: normal !important;
font-weight: 500 !important;
line-height: normal !important;
}
.label-text.fit {
background: #c9f7f5;
color: #1bc5bd;
padding: 5px 20px 5px 20px !important;
border-radius: 6px;
font-family: Poppins !important;
font-size: 11px !important;
font-style: normal !important;
font-weight: 500 !important;
line-height: normal !important;
}
.label-text.unfit {
background: #fff4de;
color: #ffa800;
padding: 5px 20px 5px 20px !important;
border-radius: 6px;
font-family: Poppins !important;
font-size: 11px !important;
font-style: normal !important;
font-weight: 500 !important;
line-height: normal !important;
}
.iconify-btn {
color: #637381 !important;
width: 23px !important;
height: 23px !important;
margin-right: 1em;
}
.iconify-btn-blue {
color: #0c518c !important;
width: 23px !important;
height: 23px !important;
margin-right: 1em;
}
.modal-header {
border-bottom: none !important;
}
.modal-title {
font-family: "Public Sans" !important;
font-size: 18px !important;
font-style: normal !important;
font-weight: 700 !important;
line-height: 28px !important;
}
.modal-dialog {
border-radius: 8px;
}
.btn-print {
border-radius: 6px !important;
background-color: #f5f8fa !important;
font-family: Roboto;
font-size: 14px;
margin-bottom: 12px;
font-style: normal;
font-weight: 500;
line-height: normal;
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
}
.modal-xl {
border-radius: 6px !important;
max-width: 90vw !important;
max-height: 95vh !important;
width: 90vw !important;
height: 95vh !important;
}
.header-print {
background-color: #d9d9d9;
}
.modal-print-title {
color: #000;
font-family: "Open Sans";
font-size: 28px;
font-style: normal;
font-weight: 700;
line-height: normal;
}
.close-print {
color: red !important;
width: 30px !important;
height: 30px !important;
}
.form-label {
font-family: Poppins !important;
font-size: 14px !important;
font-style: normal !important;
font-weight: 600 !important;
line-height: 24px !important; /* 171.429% */
}
.form-input {
font-family: Poppins !important;
font-size: 16px !important;
font-style: normal !important;
font-weight: 400 !important;
line-height: 24px !important;
}
.btn-text {
font-family: "Public Sans";
font-size: 14px;
font-style: normal;
font-weight: 700;
line-height: 24px;
}
</style>
}
templ JsMcuDaftarPeserta() {
}
templ ShowMcuDafterPeserta(
title string,
cmp templ.Component,
css templ.Component,
js templ.Component,
title string,
cmp templ.Component,
css templ.Component,
js templ.Component,
) {
@layout.PlaygroundLayout(title, css, js) {
@cmp
}
}
@layout.PlaygroundLayout(title, css, js) {
@cmp
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,119 @@
package dev_mcudaftarpeserta
import "cpone/models"
import "cpone/component/modal"
templ ButtoPrintnModalCmp(data models.ModelButtonPrintComponent) {
<div
class=""
id={ data.IDComponent }
hx-target={ data.HxTarget }
hx-swap={ data.HxSwap }
hx-include={ data.HxInclude }
>
@modalcomponent.ModalBtnPrint(data.ModalBtnPrintID,
data.ModalBtnPrintTitle,
data.ButtonClose,
data.DialogBody,
)
</div>
}
templ BodyBtnPrint(
DialogBtnPrintID string,
dialogPrintLabID string,
componentID string,
ButtonName string,
dialogPrintNonLabID string,
ButtonNameNonLab string,
dialogPrintFisikID string,
ButtonNameFisik string,
dialogPrintResumeID string,
ButtonNameResume string,
hxGetPrintLab string,
hxTargetPrintLab string,
hxSwapPrintLab string,
hxIncludePrintLab string,
hxOnLoad templ.ComponentScript) {
<div id={ componentID } hx-on::load={ hxOnLoad }>
<button
hx-get={ hxGetPrintLab }
hx-target={ hxTargetPrintLab }
hx-swap={ hxSwapPrintLab }
hx-include={ hxIncludePrintLab }
hx-on::after-request={ JsHideModalBtnPrint(DialogBtnPrintID) }
type="button"
class="btn btn-text btn-lg btn-print"
>
<span class="btn-print-text">{ ButtonName }</span>
<a class="btn btn-icon">
<span
class="iconify iconify-btn-blue"
data-icon="fluent:arrow-circle-right-12-filled"
></span>
</a>
</button>
<button
data-target={ "#" + dialogPrintNonLabID }
type="button"
class="btn btn-text btn-lg btn-print"
>
<span class="btn-print-text">{ ButtonNameNonLab }</span>
<a class="btn btn-icon">
<span
class="iconify iconify-btn-blue"
data-icon="fluent:arrow-circle-right-12-filled"
></span>
</a>
</button>
<button
data-target={ "#" + dialogPrintFisikID }
type="button"
class="btn btn-text btn-lg btn-print"
>
<span class="btn-print-text">{ ButtonNameFisik }</span>
<a class="btn btn-icon">
<span
class="iconify iconify-btn-blue"
data-icon="fluent:arrow-circle-right-12-filled"
></span>
</a>
</button>
<button
data-target={ "#" + dialogPrintResumeID }
type="button"
class="btn btn-text btn-lg btn-print"
>
<span class="btn-print-text">{ ButtonNameResume }</span>
<a class="btn btn-icon">
<span
class="iconify iconify-btn-blue"
data-icon="fluent:arrow-circle-right-12-filled"
></span>
</a>
</button>
</div>
}
script JsHideModalBtnPrint(DialogBtnPrintID string) {
$(DialogBtnPrintID).modal('hide')
}
script JsShowModalBtnPrint(DialogBtnPrintID string) {
$(DialogBtnPrintID).modal('show')
}
templ BtnPrintClose(LinkClose string, targetClose string, hxSwapClose string, DialogBtnPrintID string) {
<button
hx-post={ LinkClose }
hx-target={ targetClose }
hx-swap={ hxSwapClose }
type="button"
hx-on::after-request={ JsHideModalBtnPrint(DialogBtnPrintID) }
class="close"
data-dismiss="modal"
aria-label="Close"
>
<i aria-hidden="true" class="ki ki-close"></i>
</button>
}

View File

@@ -0,0 +1,423 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.663
package dev_mcudaftarpeserta
//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"
import "cpone/component/modal"
func ButtoPrintnModalCmp(data models.ModelButtonPrintComponent) 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=\"\" id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(data.IDComponent)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 9, Col: 23}
}
_, 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("\" hx-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(data.HxTarget)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 10, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(data.HxSwap)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 11, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-include=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(data.HxInclude)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 12, Col: 29}
}
_, 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
}
templ_7745c5c3_Err = modalcomponent.ModalBtnPrint(data.ModalBtnPrintID,
data.ModalBtnPrintTitle,
data.ButtonClose,
data.DialogBody,
).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 BodyBtnPrint(
DialogBtnPrintID string,
dialogPrintLabID string,
componentID string,
ButtonName string,
dialogPrintNonLabID string,
ButtonNameNonLab string,
dialogPrintFisikID string,
ButtonNameFisik string,
dialogPrintResumeID string,
ButtonNameResume string,
hxGetPrintLab string,
hxTargetPrintLab string,
hxSwapPrintLab string,
hxIncludePrintLab 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_Var6 := templ.GetChildren(ctx)
if templ_7745c5c3_Var6 == nil {
templ_7745c5c3_Var6 = 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("<div id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(componentID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 38, Col: 22}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-on::load=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 templ.ComponentScript = hxOnLoad
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8.Call)
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 = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, JsHideModalBtnPrint(DialogBtnPrintID))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button hx-get=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetPrintLab)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 40, Col: 25}
}
_, 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("\" hx-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetPrintLab)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 41, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapPrintLab)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 42, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-include=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludePrintLab)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 43, Col: 33}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-on::after-request=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 templ.ComponentScript = JsHideModalBtnPrint(DialogBtnPrintID)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13.Call)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"button\" class=\"btn btn-text btn-lg btn-print\"><span class=\"btn-print-text\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(ButtonName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 48, Col: 44}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span> <a class=\"btn btn-icon\"><span class=\"iconify iconify-btn-blue\" data-icon=\"fluent:arrow-circle-right-12-filled\"></span></a></button> <button data-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialogPrintNonLabID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 57, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"button\" class=\"btn btn-text btn-lg btn-print\"><span class=\"btn-print-text\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(ButtonNameNonLab)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 61, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span> <a class=\"btn btn-icon\"><span class=\"iconify iconify-btn-blue\" data-icon=\"fluent:arrow-circle-right-12-filled\"></span></a></button> <button data-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialogPrintFisikID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 70, Col: 41}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"button\" class=\"btn btn-text btn-lg btn-print\"><span class=\"btn-print-text\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(ButtonNameFisik)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 74, Col: 49}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span> <a class=\"btn btn-icon\"><span class=\"iconify iconify-btn-blue\" data-icon=\"fluent:arrow-circle-right-12-filled\"></span></a></button> <button data-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialogPrintResumeID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 83, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"button\" class=\"btn btn-text btn-lg btn-print\"><span class=\"btn-print-text\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(ButtonNameResume)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 87, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span> <a class=\"btn btn-icon\"><span class=\"iconify iconify-btn-blue\" data-icon=\"fluent:arrow-circle-right-12-filled\"></span></a></button></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 JsHideModalBtnPrint(DialogBtnPrintID string) templ.ComponentScript {
return templ.ComponentScript{
Name: `__templ_JsHideModalBtnPrint_769c`,
Function: `function __templ_JsHideModalBtnPrint_769c(DialogBtnPrintID){$(DialogBtnPrintID).modal('hide')
}`,
Call: templ.SafeScript(`__templ_JsHideModalBtnPrint_769c`, DialogBtnPrintID),
CallInline: templ.SafeScriptInline(`__templ_JsHideModalBtnPrint_769c`, DialogBtnPrintID),
}
}
func JsShowModalBtnPrint(DialogBtnPrintID string) templ.ComponentScript {
return templ.ComponentScript{
Name: `__templ_JsShowModalBtnPrint_5fd9`,
Function: `function __templ_JsShowModalBtnPrint_5fd9(DialogBtnPrintID){$(DialogBtnPrintID).modal('show')
}`,
Call: templ.SafeScript(`__templ_JsShowModalBtnPrint_5fd9`, DialogBtnPrintID),
CallInline: templ.SafeScriptInline(`__templ_JsShowModalBtnPrint_5fd9`, DialogBtnPrintID),
}
}
func BtnPrintClose(LinkClose string, targetClose string, hxSwapClose string, DialogBtnPrintID 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_Var21 := templ.GetChildren(ctx)
if templ_7745c5c3_Var21 == nil {
templ_7745c5c3_Var21 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, JsHideModalBtnPrint(DialogBtnPrintID))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button hx-post=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 108, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 109, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalbuttonprint.templ`, Line: 110, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"button\" hx-on::after-request=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var25 templ.ComponentScript = JsHideModalBtnPrint(DialogBtnPrintID)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25.Call)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><i aria-hidden=\"true\" class=\"ki ki-close\"></i></button>")
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
})
}

View File

@@ -0,0 +1,50 @@
package dev_mcudaftarpeserta
import "cpone/models"
import "cpone/component/modal"
templ PrintComponent(data models.ModelPrintComponent) {
<div
class=""
id={ data.IDComponent }
hx-target={ data.HxTarget }
hx-swap={ data.HxSwap }
hx-include={ data.HxInclude }
>
@modalcomponent.ModalPrint(data.ModalPrintID,
data.ModalPrintTitle,
data.ButtonClose,
data.DialogBody)
</div>
}
script JsHideModalPrintLab(dialogPrintLabID string) {
$(dialogPrintLabID).modal('hide')
}
script JsShowModalPrintLab(dialogPrintLabID string) {
$(dialogPrintLabID).modal('show')
}
templ BodyPrintComponent(
componentID string,
hxOnLoad templ.ComponentScript,
) {
<div id={ componentID } hx-on::load={ hxOnLoad }>
<object data="https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_001.rptdesign&__format=pdf&PID=2&username=adhi&tm=1717726294764" type="application/pdf" width="100%" height="100%"></object>
</div>
}
templ PrintClose(LinkClose string, targetClose string, hxSwapClose string) {
<button
hx-post={ LinkClose }
hx-target={ targetClose }
hx-swap={ hxSwapClose }
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<i aria-hidden="true" class="ki ki-close"></i>
</button>
}

View File

@@ -0,0 +1,237 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.663
package dev_mcudaftarpeserta
//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"
import "cpone/component/modal"
func PrintComponent(data models.ModelPrintComponent) 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=\"\" id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(data.IDComponent)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 9, Col: 23}
}
_, 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("\" hx-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(data.HxTarget)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 10, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(data.HxSwap)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 11, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-include=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(data.HxInclude)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 12, Col: 29}
}
_, 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
}
templ_7745c5c3_Err = modalcomponent.ModalPrint(data.ModalPrintID,
data.ModalPrintTitle,
data.ButtonClose,
data.DialogBody).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 JsHideModalPrintLab(dialogPrintLabID string) templ.ComponentScript {
return templ.ComponentScript{
Name: `__templ_JsHideModalPrintLab_2356`,
Function: `function __templ_JsHideModalPrintLab_2356(dialogPrintLabID){$(dialogPrintLabID).modal('hide')
}`,
Call: templ.SafeScript(`__templ_JsHideModalPrintLab_2356`, dialogPrintLabID),
CallInline: templ.SafeScriptInline(`__templ_JsHideModalPrintLab_2356`, dialogPrintLabID),
}
}
func JsShowModalPrintLab(dialogPrintLabID string) templ.ComponentScript {
return templ.ComponentScript{
Name: `__templ_JsShowModalPrintLab_aa2b`,
Function: `function __templ_JsShowModalPrintLab_aa2b(dialogPrintLabID){$(dialogPrintLabID).modal('show')
}`,
Call: templ.SafeScript(`__templ_JsShowModalPrintLab_aa2b`, dialogPrintLabID),
CallInline: templ.SafeScriptInline(`__templ_JsShowModalPrintLab_aa2b`, dialogPrintLabID),
}
}
func BodyPrintComponent(
componentID 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_Var6 := templ.GetChildren(ctx)
if templ_7745c5c3_Var6 == nil {
templ_7745c5c3_Var6 = 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("<div id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(componentID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 33, Col: 22}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-on::load=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 templ.ComponentScript = hxOnLoad
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8.Call)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><object data=\"https://devcpone.aplikasi.web.id/birt/run?__report=report/one/mcu/rpt_mcu_graph_001.rptdesign&amp;__format=pdf&amp;PID=2&amp;username=adhi&amp;tm=1717726294764\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></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 PrintClose(LinkClose string, targetClose string, hxSwapClose 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_Var9 := templ.GetChildren(ctx)
if templ_7745c5c3_Var9 == nil {
templ_7745c5c3_Var9 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button hx-post=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 40, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 41, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mcu\daftarpeserta\modalprint.templ`, Line: 42, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><i aria-hidden=\"true\" class=\"ki ki-close\"></i></button>")
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
})
}