Compare commits
3 Commits
main
...
release/de
| Author | SHA1 | Date | |
|---|---|---|---|
| f8ad467b3d | |||
| ce4ff29591 | |||
| 8094de70cc |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ config.yaml
|
||||
restapi.rest
|
||||
cpone.db
|
||||
coba.Http
|
||||
.vscode/
|
||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"liveServer.settings.port": 5501
|
||||
}
|
||||
@@ -60,8 +60,10 @@ func main() {
|
||||
handlers.SetupRoutesCorporate(app, appStore)
|
||||
// SETUP ROUT CLIENT
|
||||
handlers.SetupRoutesClient(app, appStore)
|
||||
|
||||
// SETUP ROUT DEV
|
||||
handlers.SetupRoutesDev(app, appStore)
|
||||
// handlers.SetupRoutesDev(app, appStore)
|
||||
|
||||
app.Logger.Fatal(app.Start(":5000"))
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu"
|
||||
corporate_tabmcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
corporate_kesimpulan "cpone/views/corporate/mcu/mcutab/kesimpulan"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/labstack/echo/v4"
|
||||
@@ -60,19 +60,19 @@ func (mcud *McuDetailHandler) HandlerShowMcuDetailScreen(c echo.Context) error {
|
||||
sidbaruser := sidebaruserprofile.Navbaruserprofile(user)
|
||||
|
||||
// test := []models.McuTabModels{}
|
||||
tabname, err := mcud.McuDetailServices.GetTabNameList(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// tabname, err := mcud.McuDetailServices.GetTabNameList(id)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// logger.Info("List tab name", zap.Any("tav", tabname))
|
||||
|
||||
content := corporate_mcudetail.McuDetailScreen(
|
||||
breadcrumb,
|
||||
// corporate_mcudetail.TabViewMcuDetail(id),
|
||||
corporate_mcudetail.McuDetailTabView(id, tabname),
|
||||
corporate_mcudetail.TabViewMcuDetail(id),
|
||||
// corporate_mcudetail.McuDetailTabView(id, tabname),
|
||||
)
|
||||
css := corporate_mcudetail.CSSMcuDetail(
|
||||
corporate_tabmcudetail.CssKesimpulan(),
|
||||
corporate_kesimpulan.CSSKesimpulan(),
|
||||
)
|
||||
js := corporate_mcudetail.JSMcuDetail()
|
||||
|
||||
|
||||
748
handlers/corporate/mcudetail/tabdaftarpeserta.handler.go
Normal file
748
handlers/corporate/mcudetail/tabdaftarpeserta.handler.go
Normal file
@@ -0,0 +1,748 @@
|
||||
package mcu_corporate_handlers
|
||||
|
||||
import (
|
||||
"cpone/component/pagination"
|
||||
customtoastv2 "cpone/component/toastbootstrap"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_daftarpeserta "cpone/views/corporate/mcu/mcutab/daftarpeserta"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/labstack/echo/v4"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type TabDaftarPesertaServices interface {
|
||||
SearchDaftarPesertaMCU(mcuID string, keyword string, page int, perPage int) ([]models.ModelMcuDaftarPeserta, int, error)
|
||||
GenerataPasswordMCU(mgmMCUID string, host string) (models.GeneratePasswordResponse, error)
|
||||
GetAkunPeserta(patientID string) (models.AuthPatient, error)
|
||||
GetListReportPesertaV4(orderheaderID string, staffname string) ([]models.TabViewReportMcu, error)
|
||||
GetListReportPesertaV5(orderheaderID string, mcuid string, staffname string) ([]models.TabViewReportMcu, error)
|
||||
ResetPasswordPeserta(token string, newPassword string, email string, authuserid string) (models.ResponseStatus, error)
|
||||
DetailTestdanPaket(orderheaderID string) ([]models.TableTestPaket, error)
|
||||
GetListAttachmentFile(orderheaderID string) ([]models.AttachmentFIle, error)
|
||||
}
|
||||
|
||||
type TabDaftarPesertaHandlers struct {
|
||||
TabDaftarPesertaServices TabDaftarPesertaServices
|
||||
}
|
||||
|
||||
func NewTabDaftarPesertaHandlers(tdp TabDaftarPesertaServices) *TabDaftarPesertaHandlers {
|
||||
return &TabDaftarPesertaHandlers{TabDaftarPesertaServices: tdp}
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
table_id := utils.GenerateRandomID("table-id")
|
||||
pagination_id := utils.GenerateRandomID("pagination-id")
|
||||
|
||||
dialog_rpt_id := utils.GenerateRandomID("dialog-rpt-id")
|
||||
dialog_rptbody_id := utils.GenerateRandomID("dialog-rptbody-id")
|
||||
|
||||
dialog_akun_id := utils.GenerateRandomID("dialog-akun-id")
|
||||
dialog_akunbody_id := utils.GenerateRandomID("dialog-akunbody-id")
|
||||
|
||||
dialog_password_id := utils.GenerateRandomID("dialog-password-id")
|
||||
dialog_passbody_id := utils.GenerateRandomID("dialog-passbody-id")
|
||||
|
||||
dialog_attach_id := utils.GenerateRandomID("dialog-attach-id")
|
||||
dialog_attachbody_id := utils.GenerateRandomID("dialog-attachbody-id")
|
||||
|
||||
dialog_paket_id := utils.GenerateRandomID("dialog-paket-id")
|
||||
dialog_paketbody_id := utils.GenerateRandomID("dialog-paketbody-id")
|
||||
|
||||
id := c.Param("id")
|
||||
logger.Info("mgm_mcu", zap.Any("id", id))
|
||||
|
||||
data_peserta, total_peserta, err := tdp.TabDaftarPesertaServices.SearchDaftarPesertaMCU(id, "", 1, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
hxinclude := "#search-daftar-peserta, #table-id, #pagination-id, #dialog-rpt-id, #dialog-rptbody-id, #dialog-akun-id, #dialog-akunbody-id, #dialog-password-id, #dialog-passbody-id, #dialog-attach-id, #dialog-attachbody-id, #dialog-paket-id, #dialog-paketbody-id"
|
||||
table := corporate_daftarpeserta.Table_DaftarPeserta(
|
||||
data_peserta, table_id,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openreport",
|
||||
"#"+dialog_rptbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/opendetail",
|
||||
"#"+dialog_paketbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openviewakun",
|
||||
"#"+dialog_akunbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openattachment",
|
||||
"#"+dialog_attachbody_id, hxinclude, "outerHTML",
|
||||
)
|
||||
page := pagination.PaginationV3(
|
||||
total_peserta, 1, "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage", pagination_id,
|
||||
"#search-daftar-peserta, #loading-parent, #loading-child, #loading-spinner, #loadingcontent"+hxinclude,
|
||||
"#content-dp", "outerHTML", "", "", corporate_daftarpeserta.BeforeRequestContent(), corporate_daftarpeserta.AfterRequestContent(),
|
||||
)
|
||||
dp_layout := corporate_daftarpeserta.Content(table, page)
|
||||
|
||||
filtercomp := corporate_daftarpeserta.Filter_DaftarPeserta(
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/filter",
|
||||
"#content-dp",
|
||||
"#search-daftar-peserta, #loading-parent, #loading-child, #loading-spinner, #loadingcontent"+hxinclude,
|
||||
"outerHTML", "input changed delay:500ms", corporate_daftarpeserta.BeforeRequestContent(), corporate_daftarpeserta.AfterRequestContent(),
|
||||
)
|
||||
|
||||
// dialog rpt peserta
|
||||
l_rpt := []models.TabViewReportMcu{}
|
||||
t_rpt := corporate_daftarpeserta.Tab_RPT(l_rpt)
|
||||
body_rpt := corporate_daftarpeserta.Body_RPT(dialog_rptbody_id, t_rpt, corporate_daftarpeserta.JSShowModal(""))
|
||||
close_rpt := corporate_daftarpeserta.Close_Modal("#" + dialog_rpt_id)
|
||||
aksi_rpt := corporate_daftarpeserta.Aksi_Modal("", "", "", "", true)
|
||||
dialog_rpt := corporate_daftarpeserta.Dialog_DaftarPeserta(
|
||||
"rptform", "xl",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialogreport",
|
||||
"#"+dialog_rptbody_id, "outerHTML", hxinclude, dialog_rpt_id,
|
||||
"Daftar RPT", body_rpt, close_rpt, aksi_rpt,
|
||||
)
|
||||
|
||||
// dialog generate password peserta
|
||||
text := "Apakah anda yakin untuk me-generate password untuk seluruh peserta"
|
||||
body_genpass := corporate_daftarpeserta.Body_GenPass(dialog_passbody_id, text, corporate_daftarpeserta.JSShowModal(""))
|
||||
close_genpass := corporate_daftarpeserta.Close_Modal("#" + dialog_password_id)
|
||||
aksi_genpass := corporate_daftarpeserta.Aksi_Modal(
|
||||
"#"+dialog_password_id,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closegenpass",
|
||||
"#"+dialog_passbody_id, "outerHTML", false,
|
||||
)
|
||||
dialog_genpass := corporate_daftarpeserta.Dialog_DaftarPeserta(
|
||||
"genpassform", "",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialoggenpass",
|
||||
"#"+dialog_passbody_id, "outerHTML", hxinclude,
|
||||
dialog_password_id, "Generate Passsword Akun Peserta",
|
||||
body_genpass, close_genpass, aksi_genpass,
|
||||
)
|
||||
|
||||
// dialog reset akun peserta
|
||||
body_acc := corporate_daftarpeserta.Body_Account(
|
||||
dialog_akunbody_id,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_daftarpeserta.JSShowModal(""),
|
||||
)
|
||||
close_acc := corporate_daftarpeserta.Close_Modal("#" + dialog_akun_id)
|
||||
aksi_acc := corporate_daftarpeserta.Aksi_Modal(
|
||||
"#"+dialog_akun_id,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closeviewakun",
|
||||
"#"+dialog_akunbody_id, "outerHTML", false,
|
||||
)
|
||||
dialog_acc := corporate_daftarpeserta.Dialog_DaftarPeserta(
|
||||
"akunform", "",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/viewakun",
|
||||
"#"+dialog_akunbody_id, "outerHTML", hxinclude,
|
||||
dialog_akun_id, "Reset Password Akun Peserta", body_acc, close_acc, aksi_acc,
|
||||
)
|
||||
|
||||
// dialog detail paket dan test peserta
|
||||
l_detail, err := tdp.TabDaftarPesertaServices.DetailTestdanPaket("")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t_detail := corporate_daftarpeserta.Table_DetailPaket(l_detail)
|
||||
body_paket := corporate_daftarpeserta.Body_Detail(dialog_paketbody_id, t_detail, corporate_daftarpeserta.JSShowModal(""))
|
||||
close_paket := corporate_daftarpeserta.Close_Modal("#" + dialog_paket_id)
|
||||
aksi_paket := corporate_daftarpeserta.Aksi_Modal(
|
||||
"#"+dialog_paket_id,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closedetail",
|
||||
"#"+dialog_paketbody_id, "outerHTML", true,
|
||||
)
|
||||
|
||||
dialog_paket := corporate_daftarpeserta.Dialog_DaftarPeserta(
|
||||
"detailpaketform", "xl",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialogdetail",
|
||||
"#"+dialog_paketbody_id, "outerHTML", hxinclude,
|
||||
dialog_paket_id, "Detail Pemeriksaan", body_paket, close_paket, aksi_paket,
|
||||
)
|
||||
|
||||
// dialog file attachment peserta
|
||||
l_file, err := tdp.TabDaftarPesertaServices.GetListAttachmentFile("")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t_file := corporate_daftarpeserta.Tab_Attachment(l_file)
|
||||
body_file := corporate_daftarpeserta.Body_Attachment(dialog_attachbody_id, t_file, corporate_daftarpeserta.JSShowModal(""))
|
||||
close_file := corporate_daftarpeserta.Close_Modal("#" + dialog_attach_id)
|
||||
aksi_file := corporate_daftarpeserta.Aksi_Modal(
|
||||
"#"+dialog_attach_id,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closeattachment",
|
||||
"#"+dialog_attachbody_id, "outerHTML", true,
|
||||
)
|
||||
|
||||
dialog_file := corporate_daftarpeserta.Dialog_DaftarPeserta(
|
||||
"attachmentform", "xl",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialogattachment",
|
||||
"#"+dialog_attachbody_id, "outerHTML", hxinclude,
|
||||
dialog_attach_id, "Detail Attachment", body_file, close_file, aksi_file,
|
||||
)
|
||||
|
||||
tabdaftarpeserta := corporate_daftarpeserta.DaftarPesertaScreen(
|
||||
table_id,
|
||||
pagination_id,
|
||||
dialog_rpt_id,
|
||||
dialog_rptbody_id,
|
||||
dialog_rpt,
|
||||
dialog_akun_id,
|
||||
dialog_akunbody_id,
|
||||
dialog_acc,
|
||||
dialog_password_id,
|
||||
dialog_passbody_id,
|
||||
dialog_genpass,
|
||||
dialog_paket_id,
|
||||
dialog_paketbody_id,
|
||||
dialog_paket,
|
||||
dialog_attach_id,
|
||||
dialog_attachbody_id,
|
||||
dialog_file,
|
||||
dp_layout,
|
||||
filtercomp,
|
||||
)
|
||||
|
||||
return utils.View(c, tabdaftarpeserta)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error {
|
||||
pageparam := c.QueryParam("page")
|
||||
table_id := c.QueryParam("table-id")
|
||||
pagination_id := c.QueryParam("pagination-id")
|
||||
keyword := c.QueryParam("searchdp")
|
||||
|
||||
mcu_id := c.Param("id")
|
||||
|
||||
dialog_rptbody_id := c.QueryParam("dialog-rptbody-id")
|
||||
dialog_paketbody_id := c.QueryParam("dialog-paketbody-id")
|
||||
dialog_akunbody_id := c.QueryParam("dialog-akunbody-id")
|
||||
dialog_attachbody_id := c.QueryParam("dialog-attachbody-id")
|
||||
|
||||
page, err := strconv.Atoi(pageparam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
peserta, total, err := tdp.TabDaftarPesertaServices.SearchDaftarPesertaMCU(mcu_id, keyword, page, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
hxinclude := "#search-daftar-peserta, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #table-id, #pagination-id, #dialog-rpt-id, #dialog-rptbody-id, #dialog-akun-id, #dialog-akunbody-id, #dialog-password-id, #dialog-passbody-id, #dialog-attach-id, #dialog-attachbody-id, #dialog-paket-id, #dialog-paketbody-id"
|
||||
table := corporate_daftarpeserta.Table_DaftarPeserta(
|
||||
peserta, table_id,
|
||||
"/corp/dashboard_pic/detail/"+mcu_id+"/tabdaftarpeserta/openreport",
|
||||
"#"+dialog_rptbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+mcu_id+"/tabdaftarpeserta/opendetail",
|
||||
"#"+dialog_paketbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+mcu_id+"/tabdaftarpeserta/openviewakun",
|
||||
"#"+dialog_akunbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+mcu_id+"/tabdaftarpeserta/openattachment",
|
||||
"#"+dialog_attachbody_id, hxinclude, "outerHTML",
|
||||
)
|
||||
|
||||
paginat := pagination.PaginationV3(
|
||||
total, page, "/corp/dashboard_pic/detail/"+mcu_id+"/tabdaftarpeserta/changepage", pagination_id,
|
||||
hxinclude, "#content-dp", "outerHTML", "", "", corporate_daftarpeserta.BeforeRequestContent(), corporate_daftarpeserta.AfterRequestContent(),
|
||||
)
|
||||
|
||||
layout := corporate_daftarpeserta.Content(table, paginat)
|
||||
return utils.View(c, layout)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleFilter(c echo.Context) error {
|
||||
keyword := c.QueryParam("searchdp")
|
||||
mcuid := c.Param("id")
|
||||
table_id := c.QueryParam("table-id")
|
||||
paginat_id := c.QueryParam("pagination-id")
|
||||
|
||||
dialog_rptbody_id := c.QueryParam("dialog-rptbody-id")
|
||||
dialog_paketbody_id := c.QueryParam("dialog-paketbody-id")
|
||||
dialog_akunbody_id := c.QueryParam("dialog-akunbody-id")
|
||||
dialog_attachbody_id := c.QueryParam("dialog-attachbody-id")
|
||||
|
||||
peserta, total, err := tdp.TabDaftarPesertaServices.SearchDaftarPesertaMCU(mcuid, keyword, 1, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
hxinclude := "#search-daftar-peserta, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #table-id, #pagination-id, #dialog-rpt-id, #dialog-rptbody-id, #dialog-akun-id, #dialog-akunbody-id, #dialog-password-id, #dialog-passbody-id, #dialog-attach-id, #dialog-attachbody-id, #dialog-paket-id, #dialog-paketbody-id"
|
||||
table := corporate_daftarpeserta.Table_DaftarPeserta(
|
||||
peserta, table_id,
|
||||
"/corp/dashboard_pic/detail/"+mcuid+"/tabdaftarpeserta/openreport",
|
||||
"#"+dialog_rptbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+mcuid+"/tabdaftarpeserta/opendetail",
|
||||
"#"+dialog_paketbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+mcuid+"/tabdaftarpeserta/openviewakun",
|
||||
"#"+dialog_akunbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+mcuid+"/tabdaftarpeserta/openattachment",
|
||||
"#"+dialog_attachbody_id, hxinclude, "outerHTML",
|
||||
)
|
||||
|
||||
paginat := pagination.PaginationV3(
|
||||
total, 1, "/corp/dashboard_pic/detail/"+mcuid+"/tabdaftarpeserta/changepage", paginat_id,
|
||||
hxinclude, "#content-dp", "outerHTML", "", "", corporate_daftarpeserta.BeforeRequestContent(), corporate_daftarpeserta.AfterRequestContent(),
|
||||
)
|
||||
|
||||
content := corporate_daftarpeserta.Content(table, paginat)
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleOpenReportDialog(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
user_token := c.Get("user").(*jwt.Token)
|
||||
claims := user_token.Claims.(jwt.MapClaims)
|
||||
staffname := claims["M_StaffName"].(string)
|
||||
|
||||
mcuid := c.Param("id")
|
||||
orderheaderid := c.QueryParam("idx")
|
||||
dialog_rpt_id := c.QueryParam("dialog-rpt-id")
|
||||
dialog_rptbody_id := c.QueryParam("dialog-rptbody-id")
|
||||
logger.Info("show rpt by: ", zap.Any("orderheaderid", orderheaderid))
|
||||
|
||||
// rpt_dialog, err := tdp.TabDaftarPesertaServices.GetListReportPesertaV4(orderheaderid, staffname)
|
||||
rpt_dialog, err := tdp.TabDaftarPesertaServices.GetListReportPesertaV5(orderheaderid, mcuid, staffname)
|
||||
if err != nil {
|
||||
logger.Error("Error get rpt", zap.Any("error: ", err))
|
||||
tab := corporate_daftarpeserta.Tab_RPT([]models.TabViewReportMcu{})
|
||||
mod := corporate_daftarpeserta.Body_RPT(dialog_rptbody_id, tab, corporate_daftarpeserta.JSShowModal("#"+dialog_rpt_id))
|
||||
return utils.View(c, mod)
|
||||
}
|
||||
|
||||
comp := corporate_daftarpeserta.Tab_RPT(rpt_dialog)
|
||||
body := corporate_daftarpeserta.Body_RPT(dialog_rptbody_id, comp, corporate_daftarpeserta.JSShowModal("#"+dialog_rpt_id))
|
||||
return utils.View(c, body)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleDialogGenPass(c echo.Context) error {
|
||||
id := c.Param("id")
|
||||
|
||||
dialog_rpt_id := c.QueryParam("dialog-rpt-id")
|
||||
dialog_rptbody_id := c.QueryParam("dialog-rptbody-id")
|
||||
|
||||
dialog_paket_id := c.QueryParam("dialog-paket-id")
|
||||
dialog_paketbody_id := c.QueryParam("dialog-paketbody-id")
|
||||
|
||||
dialog_akun_id := c.QueryParam("dialog-akun-id")
|
||||
dialog_akunbody_id := c.QueryParam("dialog-akunbody-id")
|
||||
|
||||
dialog_attach_id := c.QueryParam("dialog-attach-id")
|
||||
dialog_attachbody_id := c.QueryParam("dialog-attachbody-id")
|
||||
|
||||
dialog_password_id := c.FormValue("dialog-password-id")
|
||||
dialog_passbody_id := c.FormValue("dialog-passbody-id")
|
||||
|
||||
table_id := c.FormValue("table-id")
|
||||
paginat_id := c.FormValue("pagination-id")
|
||||
pageparam := c.FormValue("currpage" + paginat_id)
|
||||
|
||||
msg := "Apakah anda yakin untuk me-generate password untuk seluruh peserta"
|
||||
resp, err := tdp.TabDaftarPesertaServices.GenerataPasswordMCU(id, "")
|
||||
if err != nil {
|
||||
body_pass := corporate_daftarpeserta.Body_GenPass(dialog_passbody_id, msg, corporate_daftarpeserta.JSShowModal(""))
|
||||
toast := customtoastv2.CustomToastV2Show("Warning", "Gagal generate password peserta", "warning")
|
||||
ret := []templ.Component{toast, body_pass}
|
||||
return utils.ViewMulti(c, ret)
|
||||
}
|
||||
|
||||
if resp.Status != "OK" {
|
||||
body_pass := corporate_daftarpeserta.Body_GenPass(dialog_passbody_id, msg, corporate_daftarpeserta.JSShowModal(""))
|
||||
toast := customtoastv2.CustomToastV2Show("Warning", "Gagal generate password peserta", "warning")
|
||||
ret := []templ.Component{toast, body_pass}
|
||||
return utils.ViewMulti(c, ret)
|
||||
}
|
||||
|
||||
aa := "/corp/dashboard_pic/detail/" + id + "/tabdaftarpeserta/reload?page=" + pageparam
|
||||
bb := "&table-id=" + table_id
|
||||
cc := "&pagination-id=" + paginat_id
|
||||
dd := "&dialog-rpt-id=" + dialog_rpt_id
|
||||
ee := "&dialog-rptbody-id=" + dialog_rptbody_id
|
||||
ff := "&dialog-password-id=" + dialog_password_id
|
||||
gg := "&dialog-passbody-id=" + dialog_passbody_id
|
||||
hh := "&dialog-akun-id=" + dialog_akun_id
|
||||
ii := "&dialog-akunbody-id=" + dialog_akunbody_id
|
||||
jj := "&dialog-attach-id=" + dialog_attach_id + "&dialog-attachbody-id=" + dialog_attachbody_id
|
||||
kk := "&dialog-paket-id=" + dialog_paket_id + "&dialog-paketbody-id" + dialog_paketbody_id
|
||||
ll := "&currpage" + paginat_id + "=" + pageparam
|
||||
link := aa + bb + cc + dd + ee + ff + gg + hh + ii + jj + kk + ll
|
||||
|
||||
body_pass := corporate_daftarpeserta.Body_GenPass(dialog_passbody_id, msg, corporate_daftarpeserta.JSGenPassReload("#"+dialog_password_id, link))
|
||||
|
||||
msg = "Success generate password.\n" + resp.Message + " password, telah dikirim melalui email peserta"
|
||||
toastt := customtoastv2.CustomToastV2Show("Success", msg, "success")
|
||||
ret := []templ.Component{toastt, body_pass}
|
||||
return utils.ViewMulti(c, ret)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleCloseDialogGenPass(c echo.Context) error {
|
||||
dialog_password_id := c.FormValue("dialog-password-id")
|
||||
dialog_passbody_id := c.FormValue("dialog-passbody-id")
|
||||
|
||||
msg := "Apakah anda yakin untuk me-generate password untuk seluruh peserta"
|
||||
body_pass := corporate_daftarpeserta.Body_GenPass(dialog_passbody_id, msg, corporate_daftarpeserta.JSHideModal("#"+dialog_password_id))
|
||||
return utils.View(c, body_pass)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleContentReload(c echo.Context) error {
|
||||
id := c.Param("id")
|
||||
keyword := c.FormValue("searchdp")
|
||||
|
||||
dialog_rptbody_id := c.QueryParam("dialog-rptbody-id")
|
||||
dialog_paketbody_id := c.QueryParam("dialog-paketbody-id")
|
||||
dialog_akunbody_id := c.QueryParam("dialog-akunbody-id")
|
||||
dialog_attachbody_id := c.QueryParam("dialog-attachbody-id")
|
||||
|
||||
table_id := c.FormValue("table-id")
|
||||
pagination_id := c.FormValue("pagination-id")
|
||||
pageparam := c.FormValue("currpage" + pagination_id)
|
||||
currpage, err := strconv.Atoi(pageparam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
peserta, total, err := tdp.TabDaftarPesertaServices.SearchDaftarPesertaMCU(id, keyword, currpage, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
hxinclude := "#search-daftar-peserta, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #table-id, #pagination-id, #dialog-rpt-id, #dialog-rptbody-id, #dialog-akun-id, #dialog-akunbody-id, #dialog-password-id, #dialog-passbody-id, #dialog-attach-id, #dialog-attachbody-id, #dialog-paket-id, #dialog-paketbody-id"
|
||||
table := corporate_daftarpeserta.Table_DaftarPeserta(
|
||||
peserta, table_id,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openreport",
|
||||
"#"+dialog_rptbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/opendetail",
|
||||
"#"+dialog_paketbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openviewakun",
|
||||
"#"+dialog_akunbody_id, hxinclude, "outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openattachment",
|
||||
"#"+dialog_attachbody_id, hxinclude, "outerHTML",
|
||||
)
|
||||
|
||||
pagination := pagination.PaginationV3(
|
||||
total, currpage, "/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage", pagination_id,
|
||||
hxinclude, "#content-dp", "outerHTML", "", "", corporate_daftarpeserta.BeforeRequestContent(), corporate_daftarpeserta.AfterRequestContent(),
|
||||
)
|
||||
|
||||
clayout := corporate_daftarpeserta.Content(table, pagination)
|
||||
return utils.View(c, clayout)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleOpenViewAkun(c echo.Context) error {
|
||||
patient_id := c.QueryParam("patid")
|
||||
dialog_akun_id := c.QueryParam("dialog-akun-id")
|
||||
dialog_akunbody_id := c.QueryParam("dialog-akunbody-id")
|
||||
|
||||
akun, err := tdp.TabDaftarPesertaServices.GetAkunPeserta(patient_id)
|
||||
if err != nil {
|
||||
body := corporate_daftarpeserta.Body_Account(
|
||||
dialog_akunbody_id,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_daftarpeserta.JSShowModal(""),
|
||||
)
|
||||
toast := customtoastv2.CustomToastV2Show("Warning", "Gagal mengambil data peserta", "warning")
|
||||
ret := []templ.Component{toast, body}
|
||||
return utils.ViewMulti(c, ret)
|
||||
}
|
||||
|
||||
body := corporate_daftarpeserta.Body_Account(
|
||||
dialog_akunbody_id,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
Value: strconv.Itoa(akun.AuthPatientID),
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akun.AuthPatientEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan password baru",
|
||||
},
|
||||
corporate_daftarpeserta.JSShowModal("#"+dialog_akun_id),
|
||||
)
|
||||
return utils.View(c, body)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleCloseViewAkun(c echo.Context) error {
|
||||
dialog_akun_id := c.QueryParam("dialog-akun-id")
|
||||
dialog_akunbody_id := c.QueryParam("dialog-akunbody-id")
|
||||
|
||||
body := corporate_daftarpeserta.Body_Account(
|
||||
dialog_akunbody_id,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_daftarpeserta.JSHideModal("#"+dialog_akun_id),
|
||||
)
|
||||
return utils.View(c, body)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleAkun(c echo.Context) error {
|
||||
user_token := c.Get("user").(*jwt.Token)
|
||||
token := user_token.Raw
|
||||
|
||||
// patient_id := c.QueryParam("patid")
|
||||
dialog_akun_id := c.QueryParam("dialog-akun-id")
|
||||
dialog_akunbody_id := c.QueryParam("dialog-akunbody-id")
|
||||
|
||||
akunID := c.FormValue("akunpesertaid")
|
||||
akunEmail := c.FormValue("akunpesertaemail")
|
||||
newPass := c.FormValue("akunpesertapassnew")
|
||||
newPasscek := c.FormValue("akunpesertapasscek")
|
||||
|
||||
formValidation := ""
|
||||
newValidation := ""
|
||||
cekValidation := ""
|
||||
|
||||
if strings.TrimSpace(newPass) == "" {
|
||||
formValidation = "Password tidak boleh kosong"
|
||||
newValidation = "Password tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(newPasscek) == "" {
|
||||
formValidation = "Password tidak boleh kosong"
|
||||
cekValidation = "Password tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(newPass) == "" && strings.TrimSpace(newPasscek) == "" {
|
||||
formValidation = "Password baru tidak boleh kosong"
|
||||
newValidation = "Password baru tidak boleh kosong"
|
||||
cekValidation = "Password baru tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(newPass) != strings.TrimSpace(newPasscek) {
|
||||
formValidation = "Password tidak sama"
|
||||
newValidation = "Password tidak sama"
|
||||
cekValidation = "Password tidak sama"
|
||||
}
|
||||
|
||||
if formValidation != "" || newValidation != "" || cekValidation != "" {
|
||||
body := corporate_daftarpeserta.Body_Account(
|
||||
dialog_akunbody_id,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
Value: akunID,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akunEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
ErrorMsg: newValidation,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
ErrorMsg: cekValidation,
|
||||
},
|
||||
corporate_daftarpeserta.JSShowModal(""),
|
||||
)
|
||||
toast := customtoastv2.CustomToastV2Show("Warning", formValidation, "warning")
|
||||
ret := []templ.Component{toast, body}
|
||||
return utils.ViewMulti(c, ret)
|
||||
}
|
||||
|
||||
resp, err := tdp.TabDaftarPesertaServices.ResetPasswordPeserta(token, newPass, akunEmail, akunID)
|
||||
body_err := corporate_daftarpeserta.Body_Account(
|
||||
dialog_akunbody_id,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
Value: akunID,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akunEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_daftarpeserta.JSShowModal(""),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
toastt := customtoastv2.CustomToastV2Show("Warning", err.Error(), "warning")
|
||||
return utils.ViewMulti(c, []templ.Component{toastt, body_err})
|
||||
}
|
||||
|
||||
if resp.Status == "ERR" {
|
||||
toastt := customtoastv2.CustomToastV2Show("Warning", resp.Message, "warning")
|
||||
return utils.ViewMulti(c, []templ.Component{toastt, body_err})
|
||||
}
|
||||
|
||||
body_scs := corporate_daftarpeserta.Body_Account(
|
||||
dialog_akunbody_id,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_daftarpeserta.JSHideModal("#"+dialog_akun_id),
|
||||
)
|
||||
toasttt := customtoastv2.CustomToastV2Show("Success", "Berhasil reset password peserta", "success")
|
||||
return utils.ViewMulti(c, []templ.Component{toasttt, body_scs})
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleOpenDetail(c echo.Context) error {
|
||||
idx := c.QueryParam("idx")
|
||||
dialog_paket_id := c.QueryParam("dialog-paket-id")
|
||||
dialog_paketbody_id := c.QueryParam("dialog-paketbody-id")
|
||||
|
||||
paket, err := tdp.TabDaftarPesertaServices.DetailTestdanPaket(idx)
|
||||
if err != nil {
|
||||
toastt := customtoastv2.CustomToastV2Show("Warning", "error get data", "error")
|
||||
tab := corporate_daftarpeserta.Table_DetailPaket([]models.TableTestPaket{})
|
||||
mod := corporate_daftarpeserta.Body_Detail(dialog_paketbody_id, tab, corporate_daftarpeserta.JSHideModal("#"+dialog_paket_id))
|
||||
return utils.ViewMulti(c, []templ.Component{toastt, mod})
|
||||
}
|
||||
|
||||
table := corporate_daftarpeserta.Table_DetailPaket(paket)
|
||||
body := corporate_daftarpeserta.Body_Detail(dialog_paketbody_id, table, corporate_daftarpeserta.JSShowModal("#"+dialog_paket_id))
|
||||
return utils.View(c, body)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleOpenAttachmentFile(c echo.Context) error {
|
||||
idx := c.QueryParam("idx")
|
||||
dialog_attach_id := c.QueryParam("dialog-attach-id")
|
||||
dialog_attachbody_id := c.QueryParam("dialog-attachbody-id")
|
||||
|
||||
file, err := tdp.TabDaftarPesertaServices.GetListAttachmentFile(idx)
|
||||
if err != nil {
|
||||
toastt := customtoastv2.CustomToastV2Show("Error", "error get data", "error")
|
||||
tab := corporate_daftarpeserta.Tab_Attachment([]models.AttachmentFIle{})
|
||||
mod := corporate_daftarpeserta.Body_Attachment(dialog_attachbody_id, tab, corporate_daftarpeserta.JSHideModal("#"+dialog_attach_id))
|
||||
return utils.ViewMulti(c, []templ.Component{toastt, mod})
|
||||
}
|
||||
|
||||
tab := corporate_daftarpeserta.Tab_Attachment(file)
|
||||
body := corporate_daftarpeserta.Body_Attachment(dialog_attachbody_id, tab, corporate_daftarpeserta.JSShowModal("#"+dialog_attach_id))
|
||||
return utils.View(c, body)
|
||||
}
|
||||
@@ -1,805 +0,0 @@
|
||||
package mcu_corporate_handlers
|
||||
|
||||
import (
|
||||
"cpone/component/pagination"
|
||||
customtoastv2 "cpone/component/toastbootstrap"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/labstack/echo/v4"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type TabDaftarPesertaServices interface {
|
||||
GetListDaftarPesertaMCU(id string, currentpage int, rowperpage int) ([]models.ModelMcuDaftarPeserta, int, error)
|
||||
GenerataPasswordMCU(mgmMCUID string, host string) (models.GeneratePasswordResponse, error)
|
||||
GetAkunPeserta(patientID string) (models.AuthPatient, error)
|
||||
GetListReportPesertaV4(orderheaderID string, staffname string) ([]models.TabViewReportMcu, error)
|
||||
ResetPasswordPeserta(token string, newPassword string, email string, authuserid string) (models.ResponseStatus, error)
|
||||
DetailTestdanPaket(orderheaderID string) ([]models.TableTestPaket, error)
|
||||
}
|
||||
|
||||
type TabDaftarPesertaHandlers struct {
|
||||
TabDaftarPesertaServices TabDaftarPesertaServices
|
||||
}
|
||||
|
||||
func NewTabDaftarPesertaHandlers(tdp TabDaftarPesertaServices) *TabDaftarPesertaHandlers {
|
||||
return &TabDaftarPesertaHandlers{
|
||||
TabDaftarPesertaServices: tdp,
|
||||
}
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
title := "Daftar Report"
|
||||
tableID := utils.GenerateRandomID("tableid")
|
||||
paginationID := utils.GenerateRandomID("paginationID")
|
||||
|
||||
dialogReportID := utils.GenerateRandomID("dialogreportid")
|
||||
dialogReportBodyID := utils.GenerateRandomID("dialogreportbodyid")
|
||||
|
||||
dialogGeneratePassID := utils.GenerateRandomID("generatepasswordID")
|
||||
dialogGeneratePassBodyID := utils.GenerateRandomID("generatepasswordBodyID")
|
||||
|
||||
dialogAkunID := utils.GenerateRandomID("dialogakunID")
|
||||
dialogAkunBodyID := utils.GenerateRandomID("dialogakunbodyID")
|
||||
|
||||
dialogDetailID := utils.GenerateRandomID("dialogdetailID")
|
||||
dialogDetailBodyID := utils.GenerateRandomID("dialogdetailBodyID")
|
||||
|
||||
id := c.Param("id")
|
||||
logger.Info("Params", zap.Any("id", id))
|
||||
|
||||
dataTable, totalPage, err := tdp.TabDaftarPesertaServices.GetListDaftarPesertaMCU(id, 1, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
table := corporate_mcudetail.TableDaftarPeserta(
|
||||
dataTable,
|
||||
tableID,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openreport",
|
||||
"#"+dialogReportBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID",
|
||||
"outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openviewakun",
|
||||
"#"+dialogAkunBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID",
|
||||
"outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/opendetail",
|
||||
"#"+dialogDetailBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID, #dialogDetailID, #dialogDetailBodyID",
|
||||
"outerHTML",
|
||||
)
|
||||
|
||||
pagination := pagination.PaginationV3(
|
||||
totalPage,
|
||||
1,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID",
|
||||
"#contentlayout",
|
||||
"outerHTML", "", "",
|
||||
corporate_mcudetail.BeforeRequestContent(),
|
||||
corporate_mcudetail.AfterRequestContent(),
|
||||
)
|
||||
|
||||
clayout := corporate_mcudetail.ContentLayout(
|
||||
table,
|
||||
pagination,
|
||||
)
|
||||
|
||||
// modal dialog tab rpt
|
||||
tabData := []models.TabViewReportMcu{}
|
||||
tabview := corporate_mcudetail.TabReportView(tabData)
|
||||
|
||||
bodymodal := corporate_mcudetail.ModalRptBody(
|
||||
dialogReportBodyID,
|
||||
tabview,
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
|
||||
closemodal := corporate_mcudetail.ModalClose(
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closereport",
|
||||
"#"+dialogReportBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogReportID,
|
||||
)
|
||||
|
||||
modaldialog := corporate_mcudetail.DialogReport(
|
||||
"generatepasswordform",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialogreport",
|
||||
"#"+dialogReportBodyID,
|
||||
"outerHTML",
|
||||
"#tableID, #paginationID, #dialogAkunID, #dialogAkunBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogReportID, #dialogReportBodyID"+paginationID,
|
||||
dialogReportID,
|
||||
title,
|
||||
bodymodal,
|
||||
closemodal,
|
||||
)
|
||||
|
||||
// dialog generate password
|
||||
modalGenPassBody := corporate_mcudetail.ModalGenPassBody(
|
||||
dialogGeneratePassBodyID,
|
||||
"Apakah anda yakin untuk men-generate password untuk seluruh karyawan",
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
|
||||
closeGenPass := corporate_mcudetail.ModalClose(
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closegenpass",
|
||||
"#"+dialogGeneratePassBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogGeneratePassID,
|
||||
)
|
||||
|
||||
actionGenPass := corporate_mcudetail.ModalGenPassAction(
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closegenpass",
|
||||
"#"+dialogGeneratePassBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogGeneratePassID,
|
||||
)
|
||||
|
||||
modalGenPass := corporate_mcudetail.DialogGeneratePass(
|
||||
"",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialoggenpass",
|
||||
"#"+dialogGeneratePassBodyID,
|
||||
"outerHTML",
|
||||
"#tableID, #paginationID, #contentlayout, #dialogAkunID, #dialogAkunBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogReportID, #dialogReportBodyID, #currpage"+paginationID,
|
||||
dialogGeneratePassID,
|
||||
"Generate Password MCU",
|
||||
modalGenPassBody,
|
||||
closeGenPass,
|
||||
actionGenPass,
|
||||
)
|
||||
|
||||
// dialog view akun
|
||||
dialogAkunBody := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Placeholder: "ID Akun Peserta",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
|
||||
dialogAkunClose := corporate_mcudetail.ModalClose(
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closeviewakun",
|
||||
"#"+dialogAkunBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogAkunID,
|
||||
)
|
||||
|
||||
dialogAkunAction := corporate_mcudetail.ModalGenPassAction(
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closeviewakun",
|
||||
"#"+dialogAkunBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogAkunID,
|
||||
)
|
||||
|
||||
dialogAkunView := corporate_mcudetail.DialogGeneratePass(
|
||||
"viewakunform",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/viewakun",
|
||||
"#"+dialogAkunBodyID,
|
||||
"outerHTML",
|
||||
"#tableID, #paginationID, #dialogAkunID, #contentlayout, #dialogAkunBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogReportID, #dialogReportBodyID, #currpage"+paginationID,
|
||||
dialogAkunID,
|
||||
"Reset Password Akun Peserta",
|
||||
dialogAkunBody,
|
||||
dialogAkunClose,
|
||||
dialogAkunAction,
|
||||
)
|
||||
|
||||
// dialog detali pemeriksaan
|
||||
|
||||
detailData, err := tdp.TabDaftarPesertaServices.DetailTestdanPaket("")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
detailTable := corporate_mcudetail.TableDetailMCU(detailData)
|
||||
|
||||
dialodDetailBody := corporate_mcudetail.ModalRptBody(
|
||||
dialogDetailBodyID,
|
||||
detailTable,
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
|
||||
closeDetail := corporate_mcudetail.ModalClose(
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/closedetail",
|
||||
"#"+dialogDetailBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogDetailID,
|
||||
)
|
||||
|
||||
modalDetail := corporate_mcudetail.DialogReport(
|
||||
"detailmcu",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/dialogdetail",
|
||||
"#"+dialogDetailBodyID,
|
||||
"outerHTML",
|
||||
"#tableID, #paginationID, #dialogAkunID, #dialogAkunBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogReportID, #dialogReportBodyID"+paginationID,
|
||||
dialogDetailID,
|
||||
"Detail Pemeriksaan",
|
||||
dialodDetailBody,
|
||||
closeDetail,
|
||||
)
|
||||
|
||||
content := corporate_mcudetail.TabDaftarPesertaScreen(
|
||||
tableID,
|
||||
paginationID,
|
||||
dialogReportID,
|
||||
dialogReportBodyID,
|
||||
dialogGeneratePassID,
|
||||
dialogGeneratePassBodyID,
|
||||
dialogAkunID,
|
||||
dialogAkunBodyID,
|
||||
dialogDetailID,
|
||||
dialogDetailBodyID,
|
||||
clayout,
|
||||
modaldialog,
|
||||
modalGenPass,
|
||||
dialogAkunView,
|
||||
modalDetail,
|
||||
)
|
||||
|
||||
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")
|
||||
|
||||
dialogReportBodyID := c.QueryParam("dialogReportBodyID")
|
||||
dialogAkunBodyID := c.QueryParam("dialogAkunBodyID")
|
||||
dialogDetailBodyID := c.QueryParam("dialogDetailBodyID")
|
||||
|
||||
id := c.Param("id")
|
||||
|
||||
// var retval []templ.Component
|
||||
page, err := strconv.Atoi(pageparam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tableData, totalPage, err := tdp.TabDaftarPesertaServices.GetListDaftarPesertaMCU(id, page, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
table := corporate_mcudetail.TableDaftarPeserta(
|
||||
tableData,
|
||||
tableID,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openreport",
|
||||
"#"+dialogReportBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID",
|
||||
"outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openviewakun",
|
||||
"#"+dialogAkunBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID",
|
||||
"outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/opendetail",
|
||||
"#"+dialogDetailBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID, #dialogDetailID, #dialogDetailBodyID",
|
||||
"outerHTML",
|
||||
)
|
||||
|
||||
pagination := pagination.PaginationV3(
|
||||
totalPage,
|
||||
page,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #dialogDetailID, #dialogDetailBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID, #dialogReportID, #dialogReportBodyID, #currPage"+paginationID,
|
||||
"#contentlayout",
|
||||
"outerHTML", "", "",
|
||||
corporate_mcudetail.BeforeRequestContent(),
|
||||
corporate_mcudetail.AfterRequestContent(),
|
||||
)
|
||||
|
||||
clayout := corporate_mcudetail.ContentLayout(table, pagination)
|
||||
return utils.View(c, clayout)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleOpenReportDialog(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
userCok := c.Get("user").(*jwt.Token)
|
||||
claims := userCok.Claims.(jwt.MapClaims)
|
||||
staffname := claims["M_StaffName"].(string)
|
||||
|
||||
idx := c.QueryParam("idx")
|
||||
dialogReportID := c.QueryParam("dialogReportID")
|
||||
dialogReportBodyID := c.QueryParam("dialogReportBodyID")
|
||||
logger.Info("params", zap.Any("idx", idx))
|
||||
|
||||
tabdatav3, err := tdp.TabDaftarPesertaServices.GetListReportPesertaV4(idx, staffname)
|
||||
if err != nil {
|
||||
logger.Info("error", zap.Any("err", err))
|
||||
tab := corporate_mcudetail.TabReportView([]models.TabViewReportMcu{})
|
||||
mod := corporate_mcudetail.ModalRptBody(
|
||||
dialogReportBodyID,
|
||||
tab,
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
return utils.View(c, mod)
|
||||
}
|
||||
|
||||
logger.Info("resp new data", zap.Any("data", tabdatav3))
|
||||
|
||||
tabcomponent := corporate_mcudetail.TabReportView(tabdatav3)
|
||||
|
||||
modalbody := corporate_mcudetail.ModalRptBody(
|
||||
dialogReportBodyID,
|
||||
tabcomponent,
|
||||
corporate_mcudetail.JsShowModal("#"+dialogReportID),
|
||||
)
|
||||
|
||||
return utils.View(c, modalbody)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleCloseDialogGenPass(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
id := c.Param("id")
|
||||
dialogGenPassID := c.FormValue("dialogGenPassID")
|
||||
dialogGenPassBodyID := c.FormValue("dialogGenPassBodyID")
|
||||
logger.Info("param", zap.Any("id", id))
|
||||
|
||||
modalDialogGenPass := corporate_mcudetail.ModalGenPassBody(
|
||||
dialogGenPassBodyID,
|
||||
"Apakah anda yakin untuk men-generate password untuk seluruh karyawan",
|
||||
corporate_mcudetail.JsHideModal("#"+dialogGenPassID),
|
||||
)
|
||||
|
||||
return utils.View(c, modalDialogGenPass)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleDialogGenPass(c echo.Context) error {
|
||||
// logger, _ := zap.NewProduction()
|
||||
host := c.Request().Host
|
||||
id := c.Param("id")
|
||||
|
||||
dialogGenPassID := c.FormValue("dialogGenPassID")
|
||||
dialogGenPassBodyID := c.FormValue("dialogGenPassBodyID")
|
||||
dialogReportID := c.FormValue("dialogReportID")
|
||||
dialogReportBodyID := c.FormValue("dialogReportBodyID")
|
||||
dialogAkunID := c.FormValue("dialogAkunID")
|
||||
dialogAkunBodyID := c.FormValue("dialogAkunBodyID")
|
||||
|
||||
tableID := c.FormValue("tableID")
|
||||
paginationID := c.FormValue("paginationID")
|
||||
pageparam := c.FormValue("currpage" + paginationID)
|
||||
|
||||
// generate pasword
|
||||
resp, err := tdp.TabDaftarPesertaServices.GenerataPasswordMCU(id, host)
|
||||
if err != nil {
|
||||
modalDialogGenPass := corporate_mcudetail.ModalGenPassBody(
|
||||
dialogGenPassBodyID,
|
||||
"Apakah anda yakin untuk men-generate password untuk seluruh karyawan",
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
toastwarning := customtoastv2.CustomToastV2Show("Warning", "Gagal generate password", "warning")
|
||||
retVal := []templ.Component{toastwarning, modalDialogGenPass}
|
||||
return utils.ViewMulti(c, retVal)
|
||||
}
|
||||
|
||||
if resp.Status != "OK" {
|
||||
modalDialogGenPass := corporate_mcudetail.ModalGenPassBody(
|
||||
dialogGenPassBodyID,
|
||||
"Apakah anda yakin untuk men-generate password untuk seluruh karyawan",
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
toastwarning := customtoastv2.CustomToastV2Show("Warning", "Gagal generate password MCU", "warning")
|
||||
retVal := []templ.Component{toastwarning, modalDialogGenPass}
|
||||
return utils.ViewMulti(c, retVal)
|
||||
}
|
||||
|
||||
aa := "/corp/dashboard_pic/detail/" + id + "/tabdaftarpeserta/reload?page=" + pageparam
|
||||
bb := "&tableID=" + tableID
|
||||
cc := "&paginationID=" + paginationID
|
||||
dd := "&dialogReportID=" + dialogReportID
|
||||
ee := "&dialogReportBodyID=" + dialogReportBodyID
|
||||
ff := "&dialogGenPassID=" + dialogGenPassID
|
||||
gg := "&dialogGenPassBodyID=" + dialogGenPassBodyID
|
||||
hh := "&dialogAkunID=" + dialogAkunID
|
||||
ii := "&dialogAkunBodyID=" + dialogAkunBodyID
|
||||
jj := "&currpage" + paginationID + "=" + pageparam
|
||||
link := aa + bb + cc + dd + ee + ff + gg + hh + ii + jj
|
||||
|
||||
modalDialogGenPass := corporate_mcudetail.ModalGenPassBody(
|
||||
dialogGenPassBodyID,
|
||||
"Apakah anda yakin untuk men-generate password untuk seluruh karyawan",
|
||||
// corporate_mcudetail.JsHideModal("#"+dialogGenPassID),
|
||||
corporate_mcudetail.JsGenPassReload("#"+dialogGenPassID, link),
|
||||
)
|
||||
|
||||
message := "Success generate password.\n" + "resp.Message" + " password, telah dikirim melalui email peserta"
|
||||
toastSuccess := customtoastv2.CustomToastV2Show("Success", message, "success")
|
||||
retVal := []templ.Component{toastSuccess, modalDialogGenPass}
|
||||
return utils.ViewMulti(c, retVal)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleOpenViewAkun(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
patientID := c.QueryParam("patid")
|
||||
dialogAkunID := c.QueryParam("dialogAkunID")
|
||||
dialogAkunBodyID := c.QueryParam("dialogAkunBodyID")
|
||||
logger.Info("params", zap.Any("patid", patientID))
|
||||
|
||||
akun, err := tdp.TabDaftarPesertaServices.GetAkunPeserta(patientID)
|
||||
if err != nil {
|
||||
dialogAkunBody := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Placeholder: "ID Akun Peserta",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
Value: patientID,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_mcudetail.JsShowModal("#"+dialogAkunID),
|
||||
)
|
||||
toastwarning := customtoastv2.CustomToastV2Show("Warning", "Gagal generate password MCU", "warning")
|
||||
retval := []templ.Component{toastwarning, dialogAkunBody}
|
||||
return utils.ViewMulti(c, retval)
|
||||
}
|
||||
|
||||
dialogAkunBody := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Placeholder: "ID Akun Peserta",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
Value: strconv.Itoa(akun.AuthPatientID),
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akun.AuthPatientEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan ulang password baru",
|
||||
},
|
||||
corporate_mcudetail.JsShowModal("#"+dialogAkunID),
|
||||
)
|
||||
return utils.View(c, dialogAkunBody)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleCloseViewAkun(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
patientID := c.FormValue("akunpesertaid")
|
||||
dialogAkunID := c.FormValue("dialogAkunID")
|
||||
dialogAkunBodyID := c.FormValue("dialogAkunBodyID")
|
||||
logger.Info("params", zap.Any("patid", patientID))
|
||||
|
||||
dialogAkunBody := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Placeholder: "ID Akun Peserta",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
},
|
||||
corporate_mcudetail.JsHideModal("#"+dialogAkunID),
|
||||
)
|
||||
return utils.View(c, dialogAkunBody)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleAkun(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
userToken := c.Get("user").(*jwt.Token)
|
||||
token := userToken.Raw
|
||||
|
||||
patientID := c.FormValue("akunpesertaid")
|
||||
dialogAkunID := c.FormValue("dialogAkunID")
|
||||
dialogAkunBodyID := c.FormValue("dialogAkunBodyID")
|
||||
logger.Info("params", zap.Any("patid", patientID))
|
||||
|
||||
akunID := c.FormValue("akunpesertaid")
|
||||
akunEmail := c.FormValue("akunpesertaemail")
|
||||
oldPass := c.FormValue("akunpesertapassold")
|
||||
newPass := c.FormValue("akunpesertapassnew")
|
||||
newPasscek := c.FormValue("akunpesertapasscek")
|
||||
|
||||
formValidation := ""
|
||||
newValidation := ""
|
||||
cekValidation := ""
|
||||
|
||||
if strings.TrimSpace(newPass) == "" {
|
||||
formValidation = "Password tidak boleh kosong"
|
||||
newValidation = "Password tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(newPasscek) == "" {
|
||||
formValidation = "Password tidak boleh kosong"
|
||||
cekValidation = "Password tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(oldPass) == "" && strings.TrimSpace(newPass) == "" && strings.TrimSpace(newPasscek) == "" {
|
||||
formValidation = "Password lama dan baru tidak boleh kosong"
|
||||
newValidation = "Password baru tidak boleh kosong"
|
||||
cekValidation = "Password baru tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(newPass) != strings.TrimSpace(newPasscek) {
|
||||
formValidation = "Password tidak sama"
|
||||
newValidation = "Password tidak sama"
|
||||
cekValidation = "Password tidak sama"
|
||||
}
|
||||
|
||||
if formValidation != "" || newValidation != "" || cekValidation != "" {
|
||||
dialogAkunBody := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Placeholder: "ID Akun Peserta",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
Value: akunID,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akunEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
ErrorMsg: newValidation,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan ulang password baru",
|
||||
ErrorMsg: cekValidation,
|
||||
},
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
toastwarning := customtoastv2.CustomToastV2Show("Warning", formValidation, "warning")
|
||||
retVal := []templ.Component{toastwarning, dialogAkunBody}
|
||||
return utils.ViewMulti(c, retVal)
|
||||
}
|
||||
|
||||
resp, err := tdp.TabDaftarPesertaServices.ResetPasswordPeserta(token, newPass, akunEmail, akunID)
|
||||
dialogAkunErr := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Placeholder: "ID Akun Peserta",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
Value: akunID,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akunEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan ulang password baru",
|
||||
},
|
||||
corporate_mcudetail.JsHideModal(""),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
toastwarning := customtoastv2.CustomToastV2Show("Warning", err.Error(), "warning")
|
||||
return utils.ViewMulti(c, []templ.Component{toastwarning, dialogAkunErr})
|
||||
}
|
||||
|
||||
if resp.Status == "ERR" {
|
||||
toastwarning := customtoastv2.CustomToastV2Show("Warning", resp.Message, "warning")
|
||||
return utils.ViewMulti(c, []templ.Component{toastwarning, dialogAkunErr})
|
||||
}
|
||||
|
||||
dialogAkunBody := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "ID Akun Peserta",
|
||||
Name: "akunpesertaid",
|
||||
Placeholder: "ID Akun Peserta",
|
||||
Type: "hidden",
|
||||
ID: "akunpesertaidid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan ulang password baru",
|
||||
},
|
||||
corporate_mcudetail.JsHideModal("#"+dialogAkunID),
|
||||
)
|
||||
toastwarning := customtoastv2.CustomToastV2Show("Success", "Berhasil reset password peserta: "+akunEmail, "success")
|
||||
retVal := []templ.Component{toastwarning, dialogAkunBody}
|
||||
return utils.ViewMulti(c, retVal)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleContentReload(c echo.Context) error {
|
||||
id := c.Param("id")
|
||||
dialogReportBodyID := c.FormValue("dialogReportBodyID")
|
||||
dialogAkunBodyID := c.FormValue("dialogAkunBodyID")
|
||||
dialogDetailBodyID := c.FormValue("dialogDetailBodyID")
|
||||
|
||||
tableID := c.FormValue("tableID")
|
||||
paginationID := c.FormValue("paginationID")
|
||||
pageparam := c.FormValue("currpage" + paginationID)
|
||||
currpage, err := strconv.Atoi(pageparam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tableData, totalPage, err := tdp.TabDaftarPesertaServices.GetListDaftarPesertaMCU(id, currpage, 10)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
table := corporate_mcudetail.TableDaftarPeserta(
|
||||
tableData,
|
||||
tableID,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openreport",
|
||||
"#"+dialogReportBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID",
|
||||
"outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/openviewakun",
|
||||
"#"+dialogAkunBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID",
|
||||
"outerHTML",
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/opendetail",
|
||||
"#"+dialogDetailBodyID,
|
||||
"#tableID, #paginationID, #dialogReportID, #dialogReportBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID, #dialogDetailID, #dialogDetailBodyID",
|
||||
"outerHTML",
|
||||
)
|
||||
|
||||
pagination := pagination.PaginationV3(
|
||||
totalPage,
|
||||
currpage,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID, #dialogReportID, #dialogReportBodyID, #dialogDetailID, #dialogDetailBodyID, #currPage"+paginationID,
|
||||
"#contentlayout",
|
||||
"outerHTML", "", "",
|
||||
corporate_mcudetail.BeforeRequestContent(),
|
||||
corporate_mcudetail.AfterRequestContent(),
|
||||
)
|
||||
|
||||
clayout := corporate_mcudetail.ContentLayout(table, pagination)
|
||||
return utils.View(c, clayout)
|
||||
}
|
||||
|
||||
func (tdp *TabDaftarPesertaHandlers) HandleOpenDetail(c echo.Context) error {
|
||||
idx := c.QueryParam("idx")
|
||||
dialogDetailID := c.QueryParam("dialogDetailID")
|
||||
dialogDetailBodyID := c.QueryParam("dialogDetailBodyID")
|
||||
|
||||
detailData, err := tdp.TabDaftarPesertaServices.DetailTestdanPaket(idx)
|
||||
if err != nil {
|
||||
tab := corporate_mcudetail.TableDetailMCU([]models.TableTestPaket{})
|
||||
mod := corporate_mcudetail.ModalRptBody(
|
||||
dialogDetailBodyID,
|
||||
tab,
|
||||
corporate_mcudetail.JsShowModal("#"+dialogDetailID),
|
||||
)
|
||||
return utils.View(c, mod)
|
||||
}
|
||||
|
||||
tablecomponent := corporate_mcudetail.TableDetailMCU(detailData)
|
||||
detailBody := corporate_mcudetail.ModalRptBody(
|
||||
dialogDetailBodyID,
|
||||
tablecomponent,
|
||||
corporate_mcudetail.JsShowModal("#"+dialogDetailID),
|
||||
)
|
||||
|
||||
return utils.View(c, detailBody)
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"cpone/component/chart"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
corporate_kelainanfisik "cpone/views/corporate/mcu/mcutab/kelainanfisik"
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
@@ -66,11 +66,6 @@ func (tkf *TabKelainanFisikHandler) HandleShowTabKelainanFisik(c echo.Context) e
|
||||
))
|
||||
}
|
||||
|
||||
content := corporate_mcudetail.Tabkelainanfisik(
|
||||
chartsxs,
|
||||
chartsmd,
|
||||
chartslg,
|
||||
)
|
||||
|
||||
content := corporate_kelainanfisik.KelainanFisikScreen(chartsxs, chartsmd, chartslg)
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"cpone/component/chart"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
corporate_kelainanglobal "cpone/views/corporate/mcu/mcutab/kelainanglobal"
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
@@ -57,11 +57,6 @@ func (tkg *TabKelainanGlobalHandler) HandleShowTabKelainanGlobal(c echo.Context)
|
||||
))
|
||||
}
|
||||
|
||||
content := corporate_mcudetail.TabKelainanGlobal(
|
||||
chartsxs,
|
||||
chartsmd,
|
||||
chartslg,
|
||||
)
|
||||
|
||||
content := corporate_kelainanglobal.KelainanGlobal_Screen(chartsxs, chartsmd, chartslg)
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ import (
|
||||
"cpone/component/chart"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
|
||||
corporate_kelainanlab "cpone/views/corporate/mcu/mcutab/kelainanlab"
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
@@ -61,11 +62,7 @@ func (tkl *TabKelainanLabHandler) HandleShowTabKelainanLab(c echo.Context) error
|
||||
))
|
||||
}
|
||||
|
||||
content := corporate_mcudetail.TabKelainanLab(
|
||||
chartsxs,
|
||||
chartsmd,
|
||||
chartslg,
|
||||
)
|
||||
content := corporate_kelainanlab.KelainanLabScreen(chartsxs, chartsmd, chartslg)
|
||||
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"cpone/component/chart"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
corporate_kelainannonlab "cpone/views/corporate/mcu/mcutab/kelainannonlab"
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
@@ -60,11 +60,6 @@ func (tknl *TabKelainanNonLabHandler) HandleShowTabKelainanNonLab(c echo.Context
|
||||
))
|
||||
}
|
||||
|
||||
content := corporate_mcudetail.TabKelainanNonLab(
|
||||
chartsxs,
|
||||
chartsmd,
|
||||
chartslg,
|
||||
)
|
||||
|
||||
content := corporate_kelainannonlab.KelainanNonlabScreen(chartsxs, chartsmd, chartslg)
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"cpone/component/chart"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
corporate_kepesertaan "cpone/views/corporate/mcu/mcutab/kepesertaan"
|
||||
"strings"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
@@ -63,11 +63,6 @@ func (tkh *TabKepersertaanHandler) HandleShowTabKepesertaan(c echo.Context) erro
|
||||
))
|
||||
}
|
||||
|
||||
content := corporate_mcudetail.TabKepesertaan(
|
||||
chartsxs,
|
||||
chartsmd,
|
||||
chartslg,
|
||||
)
|
||||
|
||||
content := corporate_kepesertaan.KepesertaanScreen(chartsxs, chartsmd, chartslg)
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package mcu_corporate_handlers
|
||||
import (
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
corporate_kesimpulan "cpone/views/corporate/mcu/mcutab/kesimpulan"
|
||||
"fmt"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
@@ -32,7 +32,7 @@ func NewTabKesimpulanHandler(us TabKesimpulanServices) *TabKesimpulanHandler {
|
||||
func (tkh *TabKesimpulanHandler) HandleShowTabKesimpulanScreen(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
tableID := utils.GenerateRandomID("tablebody")
|
||||
tableID := utils.GenerateRandomID("table-id")
|
||||
id := c.Param("id")
|
||||
|
||||
dataLab, err := tkh.TabKesimpulanServices.GetListKesimpulanLabV2(id)
|
||||
@@ -44,7 +44,8 @@ func (tkh *TabKesimpulanHandler) HandleShowTabKesimpulanScreen(c echo.Context) e
|
||||
fmt.Println(dataLab)
|
||||
return err
|
||||
}
|
||||
tableComponentLab := corporate_mcudetail.CardTableKesimpulan("3 Kelainan Pemeriksaan Lab terbesar :", dataLab, tableID)
|
||||
// tableComponentLab := corporate_mcudetail.CardTableKesimpulan("3 Kelainan Pemeriksaan Lab terbesar :", dataLab, tableID)
|
||||
tableComponentLab := corporate_kesimpulan.Table_Kesimpulan("3 Kelainan Pemeriksaan Lab terbesar :", dataLab, tableID)
|
||||
|
||||
dataNonLab, err := tkh.TabKesimpulanServices.GetListKesimpulanNonLabV2(id)
|
||||
if err != nil {
|
||||
@@ -55,7 +56,7 @@ func (tkh *TabKesimpulanHandler) HandleShowTabKesimpulanScreen(c echo.Context) e
|
||||
fmt.Println(dataNonLab)
|
||||
return err
|
||||
}
|
||||
tableComponentNonLab := corporate_mcudetail.CardTableKesimpulan("3 Kelainan Pemeriksaan Non Lab terbesar :", dataNonLab, tableID)
|
||||
tableComponentNonLab := corporate_kesimpulan.Table_Kesimpulan("3 Kelainan Pemeriksaan Non Lab terbesar :", dataNonLab, tableID)
|
||||
|
||||
dataFisik, err := tkh.TabKesimpulanServices.GetListKesimpulanFisikV2(id)
|
||||
if err != nil {
|
||||
@@ -66,14 +67,16 @@ func (tkh *TabKesimpulanHandler) HandleShowTabKesimpulanScreen(c echo.Context) e
|
||||
fmt.Println(dataFisik)
|
||||
return err
|
||||
}
|
||||
tableComponentFisik := corporate_mcudetail.CardTableKesimpulan("3 Kelainan Pemeriksaan Fisik terbesar :", dataFisik, tableID)
|
||||
tableComponentFisik := corporate_kesimpulan.Table_Kesimpulan("3 Kelainan Pemeriksaan Fisik terbesar :", dataFisik, tableID)
|
||||
|
||||
content := corporate_mcudetail.MainKesimpulan(
|
||||
tableID,
|
||||
tableComponentLab,
|
||||
tableComponentNonLab,
|
||||
tableComponentFisik,
|
||||
)
|
||||
// content := corporate_mcudetail.MainKesimpulan(
|
||||
// tableID,
|
||||
// tableComponentLab,
|
||||
// tableComponentNonLab,
|
||||
// tableComponentFisik,
|
||||
// )
|
||||
|
||||
content := corporate_kesimpulan.KesimpulanScreen(tableID, tableComponentLab, tableComponentNonLab, tableComponentFisik)
|
||||
|
||||
return utils.View(c, content)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"cpone/component/pagination"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
corporate_mcudetail "cpone/views/corporate/mcu/mcutab"
|
||||
corporate_keuangan "cpone/views/corporate/mcu/mcutab/keuangan"
|
||||
"strconv"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
@@ -30,8 +30,8 @@ func NewTabKeuanganHandler(tk TabKeuanganServices) *TabKeuanganHandler {
|
||||
func (tk *TabKeuanganHandler) HandleShowTabKeuangan(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
logger.Info("handler keuangan")
|
||||
tableID := utils.GenerateRandomID("tableID")
|
||||
paginationID := utils.GenerateRandomID("paginationID")
|
||||
tableID := utils.GenerateRandomID("table-id")
|
||||
paginationID := utils.GenerateRandomID("pagination-id")
|
||||
|
||||
id := c.Param("id")
|
||||
logger.Info("Params", zap.Any("id", id))
|
||||
@@ -43,18 +43,18 @@ func (tk *TabKeuanganHandler) HandleShowTabKeuangan(c echo.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
tablecompo := corporate_mcudetail.TableKeuangan(dataTable, tableID)
|
||||
tablecompo := corporate_keuangan.Table_Keuangan(dataTable, tableID)
|
||||
|
||||
pagination := pagination.PaginationV3(
|
||||
totalPage,
|
||||
1,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabkeuangan/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
|
||||
"#tabdanpagi",
|
||||
"#table-id, #pagination-id, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
|
||||
"#content-uang",
|
||||
"outerHTML", "", "",
|
||||
corporate_mcudetail.BeforeRequestContent(),
|
||||
corporate_mcudetail.AfterRequestContent(),
|
||||
corporate_keuangan.BeforeRequestContent(),
|
||||
corporate_keuangan.AfterRequestContent(),
|
||||
)
|
||||
|
||||
totalOrder, err := tk.TabKeuanganServices.GetTotalOrderKeuangan(id)
|
||||
@@ -76,19 +76,10 @@ func (tk *TabKeuanganHandler) HandleShowTabKeuangan(c echo.Context) error {
|
||||
totalPelunasan := utils.FormatRibuan(int(totalBill.TotalPelunasan))
|
||||
totalHutang := utils.FormatRibuan(int(totalBill.TotalHutang))
|
||||
|
||||
content := corporate_mcudetail.TabKeuanganScreen(
|
||||
tableID,
|
||||
paginationID,
|
||||
corporate_mcudetail.KeuanganCard(
|
||||
totalOrderF,
|
||||
totalTagihan,
|
||||
totalPelunasan,
|
||||
totalHutang,
|
||||
),
|
||||
corporate_mcudetail.TableAndPagination(
|
||||
tablecompo,
|
||||
pagination,
|
||||
),
|
||||
content := corporate_keuangan.Tab_Keuangan(
|
||||
tableID, paginationID,
|
||||
corporate_keuangan.Summary_Card(totalOrderF, totalTagihan, totalPelunasan, totalHutang),
|
||||
corporate_keuangan.Content(tablecompo, pagination),
|
||||
)
|
||||
|
||||
return utils.View(c, content)
|
||||
@@ -96,8 +87,8 @@ func (tk *TabKeuanganHandler) HandleShowTabKeuangan(c echo.Context) error {
|
||||
|
||||
func (tk *TabKeuanganHandler) HandleChangePage(c echo.Context) error {
|
||||
pageparam := c.QueryParam("page")
|
||||
tableID := c.QueryParam("tableID")
|
||||
paginationID := c.QueryParam("paginationID")
|
||||
tableID := c.QueryParam("table-id")
|
||||
paginationID := c.QueryParam("pagination-id")
|
||||
|
||||
id := c.Param("id")
|
||||
|
||||
@@ -111,19 +102,19 @@ func (tk *TabKeuanganHandler) HandleChangePage(c echo.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
tablecomp := corporate_mcudetail.TableKeuangan(tableData, tableID)
|
||||
tablecomp := corporate_keuangan.Table_Keuangan(tableData, tableID)
|
||||
pagination := pagination.PaginationV3(
|
||||
totalPage,
|
||||
page,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabkeuangan/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
|
||||
"#tabdanpagi",
|
||||
"#table-id, #pagination-id, #loading-parent, #loading-child, #loading-spinner, #loadingcontent",
|
||||
"#content-uang",
|
||||
"outerHTML", "", "",
|
||||
corporate_mcudetail.BeforeRequestContent(),
|
||||
corporate_mcudetail.AfterRequestContent(),
|
||||
corporate_keuangan.BeforeRequestContent(),
|
||||
corporate_keuangan.AfterRequestContent(),
|
||||
)
|
||||
|
||||
tabdanpagi := corporate_mcudetail.TableAndPagination(tablecomp, pagination)
|
||||
tabdanpagi := corporate_keuangan.Content(tablecomp, pagination)
|
||||
return utils.View(c, tabdanpagi)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ import (
|
||||
)
|
||||
|
||||
type LoginService interface {
|
||||
MultiSignIn(username string, password string, host string) (models.Response, error)
|
||||
CheckIsAccountCpone(email string) (string, error)
|
||||
CheckAccountHasLocation(email string) (bool, error)
|
||||
MultiSignInV2(username string, password string) (models.Response, error)
|
||||
}
|
||||
|
||||
func NewLoginHandler(us LoginService) *LoginHandler {
|
||||
@@ -36,13 +38,13 @@ func (lh *LoginHandler) HandlerShowLogin(c echo.Context) error {
|
||||
|
||||
func (lh *LoginHandler) HandleSignIn(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
host := c.Request().Host
|
||||
// host := c.Request().Host
|
||||
username := c.FormValue("username")
|
||||
password := c.FormValue("password")
|
||||
defer logger.Sync()
|
||||
logger.Info("Params", zap.Any("username", username), zap.Any("pass", password))
|
||||
|
||||
resp, err := lh.LoginService.MultiSignIn(username, password, host)
|
||||
resp, err := lh.LoginService.MultiSignInV2(username, password)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("Error", zap.Any("error multi signin", err))
|
||||
@@ -189,3 +191,159 @@ func (lh *LoginHandler) HandleAutoLoginPage(c echo.Context) error {
|
||||
c.Response().Header().Set("HX-Trigger", "script")
|
||||
return c.String(http.StatusOK, redirect)
|
||||
}
|
||||
|
||||
func (lh *LoginHandler) HandleSignInV2(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
username := c.FormValue("username")
|
||||
password := c.FormValue("password")
|
||||
defer logger.Sync()
|
||||
|
||||
utype, err := lh.LoginService.CheckIsAccountCpone(username)
|
||||
if err != nil {
|
||||
logger.Info("[ERROR]", zap.Any("error check type account : ", err))
|
||||
|
||||
si := public_login.ShowLogin("Login", public_login.MainLogin(false), public_login.CssLogin(), public_login.JsLogin())
|
||||
return utils.View(c, si)
|
||||
}
|
||||
|
||||
// logger.Info("[INFO]", zap.Any("type account : ", utype))
|
||||
// if utype == "cpone" {
|
||||
if utype != "" {
|
||||
url := "/one-ui/test/vuex/one-login-v2"
|
||||
c.Response().Header().Set("HX-Redirect", url)
|
||||
return c.String(http.StatusOK, utype)
|
||||
}
|
||||
|
||||
// resp, err := lh.LoginService.MultiSignIn(username, password, "")
|
||||
resp, err := lh.LoginService.MultiSignInV2(username, password)
|
||||
if err != nil {
|
||||
logger.Info("[ERROR]", zap.Any("error multi sigin: ", err))
|
||||
|
||||
si := public_login.ShowLogin("Login", public_login.MainLogin(false), public_login.CssLogin(), public_login.JsLogin())
|
||||
return utils.View(c, si)
|
||||
}
|
||||
|
||||
if resp.Status == "ERR" {
|
||||
logger.Info("[ERROR]", zap.Any("error: ", resp.Status))
|
||||
|
||||
si := public_login.ShowLogin("Login", public_login.MainLogin(false), public_login.CssLogin(), public_login.JsLogin())
|
||||
return utils.View(c, si)
|
||||
}
|
||||
defer logger.Sync()
|
||||
|
||||
var url string
|
||||
switch resp.Data.Type {
|
||||
case "pic":
|
||||
url = "/corp/dashboard_pic"
|
||||
case "patient":
|
||||
url = "/corp/dashboard_pat"
|
||||
default:
|
||||
url = "/one-ui"
|
||||
}
|
||||
|
||||
user, err := json.Marshal(resp.Data.User)
|
||||
if err != nil {
|
||||
logger.Info("Error", zap.Error(err))
|
||||
|
||||
si := public_login.ShowLogin("Login ", public_login.MainLogin(false), public_login.CssLogin(), public_login.JsLogin())
|
||||
return utils.View(c, si)
|
||||
}
|
||||
|
||||
cookie := new(http.Cookie)
|
||||
cookie.Name = "token"
|
||||
cookie.Value = resp.Data.Token
|
||||
cookie.Path = "/"
|
||||
cookie.HttpOnly = true
|
||||
c.SetCookie(cookie)
|
||||
|
||||
user_str := string(user)
|
||||
store := `
|
||||
<script>
|
||||
console.log("store token");
|
||||
const token = "` + resp.Data.Token + `";
|
||||
const user = JSON.stringify(` + user_str + `);
|
||||
localStorage.setItem("token", token);
|
||||
localStorage.setItem("user", user);
|
||||
|
||||
htmx.on("htmx:configRequest", (e)=> {
|
||||
e.detail.headers["Authorization"] = "Bearer ` + resp.Data.Token + `"
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
htmx.ajax('GET', '/login/redirect?url=` + url + `')
|
||||
}, 200)
|
||||
</script>
|
||||
`
|
||||
|
||||
c.Response().Header().Set("HX-Trigger", "script")
|
||||
return c.String(http.StatusOK, store)
|
||||
}
|
||||
|
||||
func (lh *LoginHandler) HandleSignInV3(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
username := c.FormValue("username")
|
||||
password := c.FormValue("password")
|
||||
|
||||
// check is type cpone and exist in location
|
||||
resp, err := lh.LoginService.MultiSignInV2(username, password)
|
||||
if err != nil {
|
||||
logger.Error("[ERROR]", zap.Any("multi signin process: ", err))
|
||||
ret := public_login.ShowLogin("Login", public_login.MainLogin(false), public_login.CssLogin(), public_login.JsLogin())
|
||||
return utils.View(c, ret)
|
||||
}
|
||||
|
||||
if resp.Status == "ERR" {
|
||||
logger.Error("[ERROR]", zap.Any("response signin process error: ", resp.Status))
|
||||
ret := public_login.ShowLogin("Login", public_login.MainLogin(false), public_login.CssLogin(), public_login.JsLogin())
|
||||
return utils.View(c, ret)
|
||||
}
|
||||
defer logger.Sync()
|
||||
|
||||
var url string
|
||||
switch resp.Data.Type {
|
||||
case "pic":
|
||||
url = "/corp/dashboard_pic"
|
||||
case "patient":
|
||||
url = "/corp/dashboard_pat"
|
||||
default:
|
||||
url = "/one-ui"
|
||||
}
|
||||
|
||||
user, err := json.Marshal(resp.Data.User)
|
||||
if err != nil {
|
||||
logger.Error("[ERROR]", zap.Any("process marshal response user", err))
|
||||
ret := public_login.ShowLogin("Login", public_login.MainLogin(false), public_login.CssLogin(), public_login.JsLogin())
|
||||
return utils.View(c, ret)
|
||||
}
|
||||
|
||||
cookie := new(http.Cookie)
|
||||
cookie.Name = "token"
|
||||
cookie.Value = resp.Data.Token
|
||||
cookie.Path = "/"
|
||||
cookie.HttpOnly = true
|
||||
c.SetCookie(cookie)
|
||||
|
||||
user_str := string(user)
|
||||
// logger.Info("[INFO]", zap.Any("user data ", user_str))
|
||||
store := `
|
||||
<script>
|
||||
console.log("store token");
|
||||
const token = "` + resp.Data.Token + `";
|
||||
const user = JSON.stringify(` + user_str + `);
|
||||
localStorage.setItem("token", token);
|
||||
localStorage.setItem("user", user);
|
||||
|
||||
htmx.on("htmx:configRequest", (e)=> {
|
||||
e.detail.headers["Authorization"] = "Bearer ` + resp.Data.Token + `"
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
htmx.ajax('GET', '/login/redirect?url=` + url + `')
|
||||
}, 200)
|
||||
</script>
|
||||
`
|
||||
c.Response().Header().Set("HX-Trigger", "script")
|
||||
return c.String(http.StatusOK, store)
|
||||
}
|
||||
|
||||
@@ -78,7 +78,13 @@ func SetupRoutesPublic(app *echo.Echo, appStore db.AppStore) {
|
||||
loginServ := public_services.NewServicesLogin(appStore)
|
||||
loginHadlr := public_handlers.NewLoginHandler(loginServ)
|
||||
public.GET("login", loginHadlr.HandlerShowLogin)
|
||||
public.POST("login/signin", loginHadlr.HandleSignIn)
|
||||
|
||||
// ver cpone
|
||||
// public.POST("login/signin", loginHadlr.HandleSignIn)
|
||||
|
||||
// ver devcpone
|
||||
public.POST("login/signin", loginHadlr.HandleSignInV3)
|
||||
|
||||
public.GET("login/redirect", loginHadlr.HandleRedirect)
|
||||
public.GET("login/signout", loginHadlr.HandleSignOut)
|
||||
public.POST("login/autologin", loginHadlr.HandleAutoLoginPage, auth.IsAlreadyLogin)
|
||||
@@ -173,6 +179,8 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) {
|
||||
corp.POST("/dashboard_pic/detail/:id/tabdaftarpeserta/viewakun", daftarpesertaHandl.HandleAkun)
|
||||
corp.POST("/dashboard_pic/detail/:id/tabdaftarpeserta/reload", daftarpesertaHandl.HandleContentReload)
|
||||
corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta/opendetail", daftarpesertaHandl.HandleOpenDetail)
|
||||
corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta/filter", daftarpesertaHandl.HandleFilter)
|
||||
corp.GET("/dashboard_pic/detail/:id/tabdaftarpeserta/openattachment", daftarpesertaHandl.HandleOpenAttachmentFile)
|
||||
|
||||
// tab keuangan
|
||||
keuanganService := mcu_corporate_services.NewTabKeuanganServices(appStore)
|
||||
|
||||
@@ -76,6 +76,8 @@ type Response struct {
|
||||
MUserGroupDashboard string `json:"M_UserGroupDashboard"`
|
||||
MUserDefaultTSampleStationID string `json:"M_UserDefaultT_SampleStationID"`
|
||||
MStaffName string `json:"M_StaffName"`
|
||||
MBranchID string `json:"M_BranchID"`
|
||||
MBranchName string `json:"M_BranchName"`
|
||||
IsCourier string `json:"is_courier"`
|
||||
TimeAutologout string `json:"time_autologout"`
|
||||
IP string `json:"ip"`
|
||||
|
||||
@@ -102,3 +102,9 @@ type TableTestPaket struct {
|
||||
NamaTest string
|
||||
NamaPaket string
|
||||
}
|
||||
|
||||
type AttachmentFIle struct {
|
||||
File_AttachmentID int `db:"File_AttachmentID"`
|
||||
File_AttachmentFileName string `db:"File_AttachmentFileName"`
|
||||
Link string
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package corporate_services
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"cpone/db"
|
||||
"cpone/models"
|
||||
"cpone/package/config"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
type AccountService struct {
|
||||
@@ -25,12 +25,14 @@ func (as *AccountService) ChangePasswordPIC(host string, token string, currPassw
|
||||
|
||||
uri := "https://" + config.Data.Get("servername") + "/one-api/mockup/system/menu/change_password_pic"
|
||||
|
||||
params := url.Values{}
|
||||
params.Add("new", newPassword)
|
||||
params.Add("old", currPassword)
|
||||
params.Add("token", token)
|
||||
params, _ := json.Marshal(map[string]string{
|
||||
"new": newPassword,
|
||||
"old": currPassword,
|
||||
"token": token,
|
||||
})
|
||||
paramsBody := bytes.NewBuffer(params)
|
||||
|
||||
req, err := http.PostForm(uri, params)
|
||||
req, err := http.Post(uri, "application/json", paramsBody)
|
||||
if err != nil {
|
||||
ret = models.ResponseStatus{
|
||||
Status: "ERR",
|
||||
@@ -66,12 +68,29 @@ func (as *AccountService) ChangePasswordPAT(token string, currPassword string, n
|
||||
|
||||
uri := "https://" + config.Data.Get("servername") + "/one-api/mockup/system/menu/change_password_pat"
|
||||
|
||||
params := url.Values{}
|
||||
params.Add("new", newPassword)
|
||||
params.Add("old", currPassword)
|
||||
params.Add("token", token)
|
||||
// params := url.Values{}
|
||||
// params.Add("new", newPassword)
|
||||
// params.Add("old", currPassword)
|
||||
// params.Add("token", token)
|
||||
|
||||
req, err := http.PostForm(uri, params)
|
||||
// req, err := http.PostForm(uri, params)
|
||||
// if err != nil {
|
||||
// ret = models.ResponseStatus{
|
||||
// Status: "ERR",
|
||||
// Message: "error request change password",
|
||||
// }
|
||||
// return ret, err
|
||||
// }
|
||||
// defer req.Body.Close()
|
||||
|
||||
params, _ := json.Marshal(map[string]string{
|
||||
"new": newPassword,
|
||||
"old": currPassword,
|
||||
"token": token,
|
||||
})
|
||||
paramsBody := bytes.NewBuffer(params)
|
||||
|
||||
req, err := http.Post(uri, "application/json", paramsBody)
|
||||
if err != nil {
|
||||
ret = models.ResponseStatus{
|
||||
Status: "ERR",
|
||||
|
||||
@@ -107,17 +107,7 @@ func (ea *DashboardPicServices) ListingDashboardPic(email string, search string,
|
||||
|
||||
prmLabel := "%" + search + "%"
|
||||
offset := (currentpage - 1) * rowperpage
|
||||
// q := `
|
||||
// SELECT COUNT(*)
|
||||
// FROM mgm_mcu
|
||||
// WHERE Mgm_McuIsActive = 'Y'
|
||||
// AND Mgm_McuLabel LIKE ?
|
||||
// AND Mgm_McuStartDate >= ?
|
||||
// AND Mgm_McuEndDate <= ?
|
||||
// `
|
||||
// if err := dbx.Handlex.Get(&totalData, q, prmLabel, startdate, enddate); err != nil {
|
||||
// return nil, 0, fmt.Errorf("error query get total data: %v", err)
|
||||
// }
|
||||
|
||||
logger.Info("Params", zap.Any("email", email))
|
||||
q := `
|
||||
SELECT
|
||||
|
||||
@@ -6,12 +6,13 @@ import (
|
||||
"cpone/models"
|
||||
"cpone/package/config"
|
||||
dbx "cpone/package/database"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
"go.uber.org/zap"
|
||||
@@ -60,7 +61,7 @@ func (tdps *TabDaftarPesertaServices) GetListDaftarPesertaMCU(id string, current
|
||||
WHEN M_PatientGender = 'female' THEN 'Perempuan'
|
||||
ELSE ' '
|
||||
END AS jenisKelamin,
|
||||
M_PatientDOB,
|
||||
DATE_FORMAT(M_PatientDOB, '%d %M %Y') AS M_PatientDOB,
|
||||
FLOOR(DATEDIFF(CURDATE(), M_PatientDOB)/ 365.25) AS age,
|
||||
IFNULL(authPatientEmail, "none") AS authPatientEmail,
|
||||
IFNULL(authPatientIsActive, "N") AS authPatientIsActive,
|
||||
@@ -88,6 +89,98 @@ func (tdps *TabDaftarPesertaServices) GetListDaftarPesertaMCU(id string, current
|
||||
return listDaftarPeserta, totalPage, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) SearchDaftarPesertaMCU(mcuID string, keyword string, page int, perPage int) ([]models.ModelMcuDaftarPeserta, int, error) {
|
||||
var listDaftarPeserta []models.ModelMcuDaftarPeserta
|
||||
var totalData int
|
||||
|
||||
prmWord := "%" + keyword + "%"
|
||||
offset := (page - 1) * perPage
|
||||
|
||||
sqlt := `
|
||||
SELECT COUNT(*) as total
|
||||
FROM (
|
||||
SELECT
|
||||
T_OrderHeaderID,
|
||||
T_OrderHeaderDate,
|
||||
IFNULL(T_OrderHeaderLabNumber, 0) AS 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,
|
||||
DATE_FORMAT(M_PatientDOB, '%d %M %Y') AS M_PatientDOB,
|
||||
FLOOR(DATEDIFF(CURDATE(), M_PatientDOB)/ 365.25) AS age,
|
||||
IFNULL(authPatientEmail, "none") AS authPatientEmail,
|
||||
IFNULL(authPatientIsActive, "N") AS authPatientIsActive,
|
||||
CASE
|
||||
WHEN T_OrderDetailOrderIsPacket = 'Y' THEN T_OrderDetailOrderT_PacketName
|
||||
ELSE T_OrderDetailOrderT_TestName
|
||||
END AS test_paket
|
||||
FROM t_orderheader
|
||||
JOIN m_patient ON T_OrderHeaderM_PatientID = M_PatientID AND M_PatientIsActive = 'Y'
|
||||
JOIN t_orderdetailorder ON T_OrderDetailOrderT_OrderHeaderID = T_OrderHeaderID
|
||||
AND T_OrderDetailOrderIsActive = 'Y'
|
||||
LEFT JOIN auth_patient ON M_PatientID = authPatientM_PatientID AND authPatientIsActive = 'Y'
|
||||
WHERE T_OrderHeaderIsActive = 'Y' AND T_OrderHeaderMgm_McuID = ? AND (M_PatientName LIKE ? OR M_PatientNIP LIKE ?)
|
||||
GROUP BY T_OrderHeaderID
|
||||
)x
|
||||
`
|
||||
if err := dbx.Handlex.Get(&totalData, sqlt, mcuID, prmWord, prmWord); err != nil {
|
||||
return listDaftarPeserta, 0, fmt.Errorf("error querying database: %v", err)
|
||||
}
|
||||
|
||||
sql := `
|
||||
SELECT *,
|
||||
GROUP_CONCAT(test_paket) as list_paket
|
||||
FROM (
|
||||
SELECT
|
||||
T_OrderHeaderID,
|
||||
T_OrderHeaderDate,
|
||||
IFNULL(T_OrderHeaderLabNumber, 0) AS 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,
|
||||
DATE_FORMAT(M_PatientDOB, '%d %M %Y') AS M_PatientDOB,
|
||||
FLOOR(DATEDIFF(CURDATE(), M_PatientDOB)/ 365.25) AS age,
|
||||
IFNULL(authPatientEmail, "none") AS authPatientEmail,
|
||||
IFNULL(authPatientIsActive, "N") AS authPatientIsActive,
|
||||
CASE
|
||||
WHEN T_OrderDetailOrderIsPacket = 'Y' THEN T_OrderDetailOrderT_PacketName
|
||||
ELSE T_OrderDetailOrderT_TestName
|
||||
END AS test_paket
|
||||
FROM t_orderheader
|
||||
JOIN m_patient ON T_OrderHeaderM_PatientID = M_PatientID AND M_PatientIsActive = 'Y'
|
||||
JOIN t_orderdetailorder ON T_OrderDetailOrderT_OrderHeaderID = T_OrderHeaderID
|
||||
AND T_OrderDetailOrderIsActive = 'Y'
|
||||
LEFT JOIN auth_patient ON M_PatientID = authPatientM_PatientID AND authPatientIsActive = 'Y'
|
||||
WHERE T_OrderHeaderIsActive = 'Y' AND T_OrderHeaderMgm_McuID = ?
|
||||
AND (M_PatientName LIKE ? OR M_PatientNIP LIKE ?)
|
||||
) x
|
||||
GROUP BY T_OrderHeaderID
|
||||
ORDER BY T_OrderHeaderLabNumber ASC
|
||||
LIMIT ? OFFSET ?
|
||||
`
|
||||
if err := dbx.Handlex.Select(&listDaftarPeserta, sql, mcuID, prmWord, prmWord, perPage, offset); err != nil {
|
||||
return listDaftarPeserta, 0, fmt.Errorf("error querying database: %v", err)
|
||||
}
|
||||
|
||||
totalPage := int(math.Ceil(float64(totalData) / float64(perPage)))
|
||||
|
||||
return listDaftarPeserta, totalPage, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) DetailTestdanPaket(orderheaderID string) ([]models.TableTestPaket, error) {
|
||||
var listPaket []models.DetailPaketMCU
|
||||
var listTest []models.DetailTestMCU
|
||||
@@ -109,14 +202,15 @@ func (tdps *TabDaftarPesertaServices) DetailTestdanPaket(orderheaderID string) (
|
||||
|
||||
// get detail paket
|
||||
q := `
|
||||
SELECT
|
||||
SELECT DISTINCT
|
||||
T_OrderDetailOrderT_PacketID,
|
||||
T_OrderDetailOrderT_PacketName,
|
||||
T_TestName
|
||||
FROM t_orderdetailorder
|
||||
JOIN t_packetdetail ON T_PacketDetailT_PacketID = T_OrderDetailOrderT_PacketID AND T_PacketDetailIsActive = 'Y'
|
||||
JOIN t_test ON T_TestName = T_PacketDetailT_TestID AND T_TestIsActive = 'Y'
|
||||
WHERE T_OrderDetailOrderT_OrderHeaderID = ? AND T_OrderDetailOrderIsActive = 'Y'
|
||||
JOIN t_packet ON T_PacketID = T_OrderDetailOrderT_PacketID
|
||||
JOIN t_packetdetail ON T_PacketDetailT_PacketID = T_PacketID
|
||||
JOIN t_test ON T_PacketDetailT_TestID = T_TestID
|
||||
WHERE T_OrderDetailOrderT_OrderHeaderID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Select(&listPaket, q, orderheaderID); err != nil {
|
||||
return ret, err
|
||||
@@ -198,13 +292,15 @@ func (tdps *TabDaftarPesertaServices) ResetPasswordPeserta(token string, newPass
|
||||
|
||||
uri := "https://" + config.Data.Get("servername") + "/one-api/mockup/system/menu/reset_password_pat"
|
||||
|
||||
params := url.Values{}
|
||||
params.Add("new", newPassword)
|
||||
params.Add("email", email)
|
||||
params.Add("authuserid", authuserid)
|
||||
params.Add("token", token)
|
||||
params, _ := json.Marshal(map[string]string{
|
||||
"new": newPassword,
|
||||
"email": email,
|
||||
"authuserid": authuserid,
|
||||
"token": token,
|
||||
})
|
||||
paramsBody := bytes.NewBuffer(params)
|
||||
|
||||
req, err := http.PostForm(uri, params)
|
||||
resp, err := http.Post(uri, "application/json", paramsBody)
|
||||
if err != nil {
|
||||
ret = models.ResponseStatus{
|
||||
Status: "ERR",
|
||||
@@ -212,9 +308,9 @@ func (tdps *TabDaftarPesertaServices) ResetPasswordPeserta(token string, newPass
|
||||
}
|
||||
return ret, err
|
||||
}
|
||||
defer req.Body.Close()
|
||||
defer resp.Body.Close()
|
||||
|
||||
resp, err := io.ReadAll(req.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
ret = models.ResponseStatus{
|
||||
Status: "ERR",
|
||||
@@ -223,7 +319,7 @@ func (tdps *TabDaftarPesertaServices) ResetPasswordPeserta(token string, newPass
|
||||
return ret, err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(resp, &ret)
|
||||
err = json.Unmarshal(body, &ret)
|
||||
if err != nil {
|
||||
ret = models.ResponseStatus{
|
||||
Status: "ERR",
|
||||
@@ -235,106 +331,6 @@ func (tdps *TabDaftarPesertaServices) ResetPasswordPeserta(token string, newPass
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) GetListReportPesertaV2(orderheaderID string, host string) ([]models.TabViewReportMcu, error) {
|
||||
var returnTabRpt []models.TabViewReportMcu
|
||||
var SoResultData []models.SoResultEntryReportModel
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
So_ResultEntryID,
|
||||
So_ResultEntryT_OrderHeaderID,
|
||||
So_ResultEntryNonlab_TemplateID,
|
||||
So_ResultEntryNonlab_TemplateName,
|
||||
DATE_FORMAT(NOW(), '%y%m%d%H%i%s') AS Datetime
|
||||
FROM so_resultentry
|
||||
WHERE So_ResultEntryT_OrderHeaderID = ?
|
||||
AND So_ResultEntryIsActive = 'Y'
|
||||
ORDER BY So_ResultEntryNonlab_TemplateID
|
||||
`
|
||||
if err := dbx.Handlex.Select(&SoResultData, q, orderheaderID); err != nil {
|
||||
return returnTabRpt, fmt.Errorf("error get so result data non lab: %v", err)
|
||||
}
|
||||
|
||||
mapSoResult := map[string]int{}
|
||||
for _, so := range SoResultData {
|
||||
switch so.So_ResultEntryNonlab_TemplateName {
|
||||
case "ECG":
|
||||
mapSoResult["Elektromedik"] = so.So_ResultEntryID
|
||||
case "Thorax PA":
|
||||
mapSoResult["Radiologi"] = so.So_ResultEntryID
|
||||
case "Fisik Umum", "Fisik Umum K3":
|
||||
mapSoResult["Fisik"] = so.So_ResultEntryID
|
||||
default:
|
||||
mapSoResult[so.So_ResultEntryNonlab_TemplateName] = so.So_ResultEntryID
|
||||
}
|
||||
}
|
||||
|
||||
var GroupResultOrder []models.GroupResultOrderModel
|
||||
q = `
|
||||
SELECT
|
||||
gr.Group_ResultID,
|
||||
gr.Group_ResultName,
|
||||
gr.Group_ResultResumeMcu,
|
||||
gr.Group_ResultUrl,
|
||||
gr.Group_ResultIsOrderHeader,
|
||||
gro.Group_ResultOrderOrder,
|
||||
DATE_FORMAT(NOW(), '%y%m%d%H%i%s') AS Datetime
|
||||
FROM t_orderdetail todtl
|
||||
JOIN t_test tt ON todtl.T_OrderDetailT_TestID = tt.T_TestID
|
||||
AND tt.T_TestIsActive = 'Y'
|
||||
JOIN group_resultdetail grd ON tt.T_TestID = grd.Group_ResultDetailT_TestID
|
||||
AND grd.Group_ResultDetailIsActive = 'Y'
|
||||
JOIN group_result gr ON grd.Group_ResultDetailGroup_ResultID = gr.Group_ResultID
|
||||
AND gr.Group_ResultIsActive = 'Y'
|
||||
JOIN group_resultorder gro ON gro.Group_ResultOrderGroup_ResultID = gr.Group_ResultID
|
||||
AND Group_ResultOrderIsActive = 'Y'
|
||||
WHERE todtl.T_OrderDetailT_OrderHeaderID = ?
|
||||
AND todtl.T_OrderDetailIsActive = 'Y'
|
||||
GROUP BY gr.Group_ResultID
|
||||
ORDER BY gro.Group_ResultOrderOrder
|
||||
`
|
||||
if err := dbx.Handlex.Select(&GroupResultOrder, q, orderheaderID); err != nil {
|
||||
return returnTabRpt, fmt.Errorf("error get group result order: %v", err)
|
||||
}
|
||||
|
||||
for _, d := range GroupResultOrder {
|
||||
var urlMap map[string]string
|
||||
if err := json.Unmarshal([]byte(d.Group_ResultUrl), &urlMap); err != nil {
|
||||
return returnTabRpt, fmt.Errorf("error parsing json: %v", err)
|
||||
}
|
||||
|
||||
if d.Group_ResultIsOrderHeader == "N" {
|
||||
if d.Group_ResultResumeMcu == "FISIK" {
|
||||
soResultID := strconv.Itoa(mapSoResult["Fisik"])
|
||||
for key, value := range urlMap {
|
||||
returnTabRpt = append(returnTabRpt, models.TabViewReportMcu{
|
||||
Name: key,
|
||||
Link: value + soResultID + "&tm=" + d.Datetime,
|
||||
})
|
||||
}
|
||||
}
|
||||
if d.Group_ResultResumeMcu == "NONLAB" {
|
||||
soResultID := strconv.Itoa(mapSoResult[d.Group_ResultName])
|
||||
for key, value := range urlMap {
|
||||
returnTabRpt = append(returnTabRpt, models.TabViewReportMcu{
|
||||
Name: key,
|
||||
Link: value + soResultID + "&tm=" + d.Datetime,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for _, value := range urlMap {
|
||||
returnTabRpt = append(returnTabRpt, models.TabViewReportMcu{
|
||||
Name: d.Group_ResultName,
|
||||
Link: value + orderheaderID + "&tm=" + d.Datetime,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnTabRpt, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) GetListReportPesertaV3(orderheaderID string, staffname string) ([]models.TabViewReportMcu, error) {
|
||||
var returnTab []models.TabViewReportMcu
|
||||
var GroupResultOrder []models.GroupResultOrderModel
|
||||
@@ -449,11 +445,10 @@ func (tdps *TabDaftarPesertaServices) GetListReportPesertaV3(orderheaderID strin
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) GetListReportPesertaV4(orderheaderID string, staffname string) ([]models.TabViewReportMcu, error) {
|
||||
var returnTab []models.TabViewReportMcu
|
||||
|
||||
var profile_patient models.PatientMCU
|
||||
lab_rpt := ""
|
||||
|
||||
sql := `
|
||||
sql_prof := `
|
||||
SELECT
|
||||
toh.T_OrderHeaderID,
|
||||
toh.T_OrderHeaderLabNumber,
|
||||
@@ -465,8 +460,12 @@ func (tdps *TabDaftarPesertaServices) GetListReportPesertaV4(orderheaderID strin
|
||||
AND mp.M_PatientIsActive = 'Y'
|
||||
WHERE toh.T_OrderHeaderID = ? AND toh.T_OrderHeaderIsActive = 'Y'
|
||||
`
|
||||
if err := dbx.Handlex.Get(&profile_patient, sql, orderheaderID); err != nil {
|
||||
return returnTab, fmt.Errorf("error get group result order: %v", err)
|
||||
if err := dbx.Handlex.Get(&profile_patient, sql_prof, orderheaderID); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
profile_patient = models.PatientMCU{}
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get group result order: %v", err)
|
||||
}
|
||||
}
|
||||
if profile_patient.T_OrderHeaderLabNumber != "" {
|
||||
lab_rpt = "/birt/frameset?__report=report/one/lab/rpt_test_portal.rptdesign&__format=pdf&PID=" + profile_patient.T_OrderHeaderID + "&tm=" + profile_patient.Datetime + "&username=" + staffname
|
||||
@@ -526,13 +525,18 @@ func (tdps *TabDaftarPesertaServices) GetListReportPesertaV4(orderheaderID strin
|
||||
T_OrderDetailT_OrderHeaderID = ? AND Group_ResultName <> 'Tanpa Hasil'
|
||||
`
|
||||
if err := dbx.Handlex.Select(&so_data_rpt, sql_rpt, orderheaderID, orderheaderID, orderheaderID); err != nil {
|
||||
return returnTab, fmt.Errorf("error get data so_id: %v", err)
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
so_data_rpt = []models.SoRptData{}
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get data so_id: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
for _, d := range so_data_rpt {
|
||||
switch d.Rpt_name {
|
||||
case "Pemeriksaan Fisik":
|
||||
fisik = "/birt/frameset?__report=report/one/mcu/mcu_fisik_history_v2_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
// fisik = "/birt/run?__report=report/one/mcu/mcu_fisik_history_v2_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Rontgen":
|
||||
rontgen = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_xray_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Audiometri":
|
||||
@@ -561,7 +565,11 @@ func (tdps *TabDaftarPesertaServices) GetListReportPesertaV4(orderheaderID strin
|
||||
AND Mcu_ResumeIsActive = 'Y' AND Mcu_ResumeStatus = 'VAL'
|
||||
`
|
||||
if err := dbx.Handlex.Get(&ResumeData, sql_resume, orderheaderID); err != nil {
|
||||
return returnTab, fmt.Errorf("error get data resume id: %v", err)
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
ResumeData = models.ResumeMCU{}
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get data resume id: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if ResumeData.Mcu_ResumeID != "" {
|
||||
@@ -599,3 +607,316 @@ func (tdps *TabDaftarPesertaServices) GetListReportPesertaV4(orderheaderID strin
|
||||
|
||||
return returnTab, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) GetListReportPesertaV5(orderheaderID string, mcuid string, staffname string) ([]models.TabViewReportMcu, error) {
|
||||
var returnTab []models.TabViewReportMcu
|
||||
var profile_patient models.PatientMCU
|
||||
|
||||
var tahunan_mcu int
|
||||
sqlmgm := `
|
||||
SELECT Mgm_McuReportHasil
|
||||
FROM mgm_mcu
|
||||
WHERE Mgm_McuID = ?
|
||||
`
|
||||
if err := dbx.Handlex.Get(&tahunan_mcu, sqlmgm, mcuid); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
tahunan_mcu = 1
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get type tahunan mcur: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
lab_rpt := ""
|
||||
sql_prof := `
|
||||
SELECT
|
||||
toh.T_OrderHeaderID,
|
||||
toh.T_OrderHeaderLabNumber,
|
||||
mp.M_PatientID,
|
||||
mp.M_PatientName,
|
||||
DATE_FORMAT(NOW(), '%y%m%d%H%i%s') AS Datetime
|
||||
FROM t_orderheader toh
|
||||
JOIN m_patient mp ON toh.T_OrderHeaderM_PatientID = mp.M_PatientID
|
||||
AND mp.M_PatientIsActive = 'Y'
|
||||
WHERE toh.T_OrderHeaderID = ? AND toh.T_OrderHeaderIsActive = 'Y'
|
||||
`
|
||||
if err := dbx.Handlex.Get(&profile_patient, sql_prof, orderheaderID); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
profile_patient = models.PatientMCU{}
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get group result order: %v", err)
|
||||
}
|
||||
}
|
||||
if profile_patient.T_OrderHeaderLabNumber != "" {
|
||||
if tahunan_mcu != 1 {
|
||||
lab_rpt = "/birt/frameset?__report=report/one/lab/rpt_test_history_portal.rptdesign&__format=pdf&PID=" + profile_patient.T_OrderHeaderID + "&tm=" + profile_patient.Datetime + "&username=" + staffname
|
||||
} else {
|
||||
lab_rpt = "/birt/frameset?__report=report/one/lab/rpt_test_portal.rptdesign&__format=pdf&PID=" + profile_patient.T_OrderHeaderID + "&tm=" + profile_patient.Datetime + "&username=" + staffname
|
||||
}
|
||||
}
|
||||
|
||||
var so_data_rpt []models.SoRptData
|
||||
fisik := ""
|
||||
rontgen := ""
|
||||
ekg := ""
|
||||
audiometri := ""
|
||||
spirometri := ""
|
||||
treadmill := ""
|
||||
papsmear := ""
|
||||
mikro := ""
|
||||
usg := ""
|
||||
sds := ""
|
||||
|
||||
sql_rpt := `
|
||||
SELECT DISTINCT group_resultName as rpt_name,
|
||||
IFNULL(So_ResultEntryID,0) as so_id,
|
||||
T_OrderDetailT_OrderHeaderID as order_id,
|
||||
DATE_FORMAT(NOW(), '%y%m%d%H%i%s') AS Datetime
|
||||
FROM t_orderdetail
|
||||
JOIN t_test ON T_OrderDetailT_TestID = T_TestID
|
||||
JOIN group_resultdetail ON Group_ResultDetailT_TestID = T_TestID
|
||||
JOIN group_result ON Group_ResultID = Group_ResultDetailGroup_ResultID AND
|
||||
Group_ResultFlagPerTest = 'N' AND Group_ResultName <> 'LAB' AND Group_ResultFlagNonLab = 'N'
|
||||
LEFT JOIN so_resultentry ON So_ResultEntryT_OrderDetailID = T_OrderDetailID AND So_ResultEntryIsActive = 'Y'
|
||||
WHERE
|
||||
T_OrderDetailT_OrderHeaderID = ? AND Group_ResultName <> 'Tanpa Hasil'
|
||||
UNION
|
||||
SELECT DISTINCT group_resultName as rpt_name,
|
||||
IFNULL(So_ResultEntryID,0) as so_id,
|
||||
T_OrderDetailT_OrderHeaderID as order_id,
|
||||
DATE_FORMAT(NOW(), '%y%m%d%H%i%s') AS Datetime
|
||||
FROM t_orderdetail
|
||||
JOIN t_test ON T_OrderDetailT_TestID = T_TestID
|
||||
JOIN t_samplingso ON T_SamplingSoT_OrderHeaderID = T_OrderDetailT_OrderHeaderID AND
|
||||
T_SamplingSoT_TestID = T_TestID
|
||||
JOIN group_resultdetail ON Group_ResultDetailT_TestID = T_TestID
|
||||
JOIN group_result ON Group_ResultID = Group_ResultDetailGroup_ResultID AND
|
||||
Group_ResultFlagPerTest = 'N' AND Group_ResultName <> 'LAB' AND Group_ResultFlagNonLab = 'Y'
|
||||
LEFT JOIN so_resultentry ON So_ResultEntryT_OrderDetailID = T_OrderDetailID AND So_ResultEntryIsActive = 'Y'
|
||||
WHERE
|
||||
T_OrderDetailT_OrderHeaderID = ? AND Group_ResultName <> 'Tanpa Hasil'
|
||||
UNION
|
||||
SELECT DISTINCT T_TestName as rpt_name,
|
||||
IFNULL(So_ResultEntryID,0) as so_id,
|
||||
T_OrderDetailT_OrderHeaderID as order_id,
|
||||
DATE_FORMAT(NOW(), '%y%m%d%H%i%s') AS Datetime
|
||||
FROM t_orderdetail
|
||||
JOIN t_test ON T_OrderDetailT_TestID = T_TestID AND T_TestName NOT IN ('Visus Mata','Buta Warna','Pemeriksaan Lapang Pandang')
|
||||
JOIN t_samplingso ON T_SamplingSoT_OrderHeaderID = T_OrderDetailT_OrderHeaderID AND
|
||||
T_SamplingSoT_TestID = T_TestID
|
||||
JOIN group_resultdetail ON Group_ResultDetailT_TestID = T_TestID
|
||||
JOIN group_result ON Group_ResultID = Group_ResultDetailGroup_ResultID AND
|
||||
Group_ResultFlagPerTest = 'Y' AND Group_ResultFlagNonLab = 'Y'
|
||||
LEFT JOIN so_resultentry ON So_ResultEntryT_OrderDetailID = T_OrderDetailID AND So_ResultEntryIsActive = 'Y'
|
||||
WHERE
|
||||
T_OrderDetailT_OrderHeaderID = ? AND Group_ResultName <> 'Tanpa Hasil'
|
||||
`
|
||||
if err := dbx.Handlex.Select(&so_data_rpt, sql_rpt, orderheaderID, orderheaderID, orderheaderID); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
so_data_rpt = []models.SoRptData{}
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get data so_id: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
for _, d := range so_data_rpt {
|
||||
if tahunan_mcu != 1 {
|
||||
switch d.Rpt_name {
|
||||
case "Pemeriksaan Fisik":
|
||||
// fisik = "/birt/frameset?__report=report/one/mcu/mcu_fisik_history_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
fisik = "/birt/run?__report=report/one/mcu/mcu_fisik_history_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Rontgen":
|
||||
rontgen = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_radiology_2_annual_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Audiometri":
|
||||
audiometri = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_audiometri_2_annual_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Spirometri":
|
||||
spirometri = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_spirometri_2_annual_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "ECG":
|
||||
ekg = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_ecg_2_annual_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Treadmill":
|
||||
treadmill = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_treadmill_2_annual_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Papsmear":
|
||||
papsmear = "/birt/frameset?__report=report/one/lab/rpt_test_papsmear_history_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.Order_id + "&tm=" + d.Datetime
|
||||
case "Mikro":
|
||||
mikro = "/birt/run?__report=report/one/lab/rpt_test_mikro_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.Order_id + "&tm=" + d.Datetime
|
||||
case "USG", "USG Abdominal Aorta", "USG Upp & Low Abdomen":
|
||||
usg = "/birt/run?__report=report/one/lab/rpt_hasil_so_usg_2_annual_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "SDS":
|
||||
if d.So_id != "0" {
|
||||
tipval := ""
|
||||
tpe := `SELECT So_ResultEntrySDSTypeValue as tipval
|
||||
FROM so_resultentrysds_type WHERE So_ResultEntrySDSTypeSo_ResultEntryID = ?
|
||||
AND So_ResultEntrySDSTypeIsActive = 'Y' LIMIT 1`
|
||||
if err := dbx.Handlex.Get(&tipval, tpe, d.So_id); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get sds type value : %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if tipval != "" {
|
||||
sds = "/birt/run?__report=report/one/lab/rpt_hasil_so_sds.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&PType=" + tipval + "&tm=" + d.Datetime
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch d.Rpt_name {
|
||||
case "Pemeriksaan Fisik":
|
||||
// fisik = "/birt/frameset?__report=report/one/mcu/mcu_fisik_history_v2_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
fisik = "/birt/run?__report=report/one/mcu/mcu_fisik_history_v2_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Rontgen":
|
||||
rontgen = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_xray_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Audiometri":
|
||||
audiometri = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_audiometri_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Spirometri":
|
||||
spirometri = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_spirometri_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "ECG":
|
||||
ekg = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_ecg_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Treadmill":
|
||||
treadmill = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_treadmill_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Papsmear":
|
||||
papsmear = "/birt/frameset?__report=report/one/lab/rpt_test_papsmear_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.Order_id + "&tm=" + d.Datetime
|
||||
case "Mikro":
|
||||
mikro = "/birt/run?__report=report/one/lab/rpt_test_mikro_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.Order_id + "&tm=" + d.Datetime
|
||||
case "USG", "USG Abdominal Aorta", "USG Upp & Low Abdomen":
|
||||
usg = "/birt/run?__report=report/one/lab/rpt_hasil_so_usg_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "SDS":
|
||||
if d.So_id != "0" {
|
||||
tipval := ""
|
||||
tpe := `SELECT So_ResultEntrySDSTypeValue as tipval
|
||||
FROM so_resultentrysds_type WHERE So_ResultEntrySDSTypeSo_ResultEntryID = ?
|
||||
AND So_ResultEntrySDSTypeIsActive = 'Y' LIMIT 1`
|
||||
if err := dbx.Handlex.Get(&tipval, tpe, d.So_id); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get sds type value : %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if tipval != "" {
|
||||
sds = "/birt/run?__report=report/one/lab/rpt_hasil_so_sds_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&PType=" + tipval + "&tm=" + d.Datetime
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var ResumeData models.ResumeMCU
|
||||
kesimpulan := ""
|
||||
// cover := ""
|
||||
|
||||
sql_resume := `
|
||||
SELECT
|
||||
Mcu_ResumeID,
|
||||
DATE_FORMAT(NOW(), '%y%m%d%H%i%s') AS Datetime
|
||||
FROM mcu_resume
|
||||
WHERE Mcu_ResumeT_OrderHeaderID = ?
|
||||
AND Mcu_ResumeIsActive = 'Y' AND Mcu_ResumeStatus = 'VAL'
|
||||
`
|
||||
if err := dbx.Handlex.Get(&ResumeData, sql_resume, orderheaderID); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
ResumeData = models.ResumeMCU{}
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get data resume id: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if ResumeData.Mcu_ResumeID != "" {
|
||||
if tahunan_mcu != 1 {
|
||||
kesimpulan = "/birt/frameset?__report=report/one/mcu/rpt_mcu_saran_kesimpulan_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + ResumeData.Mcu_ResumeID + "&tm=" + ResumeData.Datetime
|
||||
} else {
|
||||
kesimpulan = "/birt/frameset?__report=report/one/mcu/rpt_mcu_saran_kesimpulan_v2_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + ResumeData.Mcu_ResumeID + "&tm=" + ResumeData.Datetime
|
||||
}
|
||||
// cover = "/birt/frameset?__report=report/one/mcu/rpt_mcu_resume_cover_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + ResumeData.Mcu_ResumeID + "&tm=" + ResumeData.Datetime
|
||||
}
|
||||
|
||||
additional := ""
|
||||
if fisik == "" {
|
||||
id_add := ""
|
||||
sql_additional := `SELECT So_ResultEntryID FROM t_orderdetail
|
||||
JOIN so_resultentry ON So_ResultEntryT_OrderDetailID = T_OrderDetailID AND So_ResultEntryIsActive = 'Y'
|
||||
WHERE T_OrderDetailT_OrderHeaderID = ? AND T_OrderDetailIsActive = 'Y' AND T_OrderDetailT_TestID IN (2571,2573,3450,2572) LIMIT 1`
|
||||
if err := dbx.Handlex.Get(&id_add, sql_additional, orderheaderID); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
|
||||
} else {
|
||||
return returnTab, fmt.Errorf("error get additional rpt: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if id_add != "" {
|
||||
if tahunan_mcu != 1 {
|
||||
additional = "/birt/run?__report=report/one/mcu/mcu_fisik_ttbbmata_history_portal.rptdesign&__format=pdf&username=" + staffname + "&PType=fisik&PID=" + id_add + "&PLang=1&tm="
|
||||
} else {
|
||||
additional = "/birt/run?__report=report/one/mcu/mcu_fisik_ttbbmata_portal.rptdesign&__format=pdf&username=" + staffname + "&PType=fisik&PID=" + id_add + "&PLang=1&tm="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if fisik != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Fisik", Link: fisik})
|
||||
}
|
||||
if rontgen != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Rontgen", Link: rontgen})
|
||||
}
|
||||
if usg != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "USG", Link: usg})
|
||||
}
|
||||
if ekg != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Elektromedik", Link: ekg})
|
||||
}
|
||||
if audiometri != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Audiometri", Link: audiometri})
|
||||
}
|
||||
if spirometri != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Spirometri", Link: spirometri})
|
||||
}
|
||||
if treadmill != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Treadmill", Link: treadmill})
|
||||
}
|
||||
if sds != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "SDS", Link: sds})
|
||||
}
|
||||
if kesimpulan != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Kesimpulan", Link: kesimpulan})
|
||||
}
|
||||
if lab_rpt != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Lab", Link: lab_rpt})
|
||||
}
|
||||
if papsmear != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Papsmear", Link: papsmear})
|
||||
}
|
||||
if mikro != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Mikro", Link: mikro})
|
||||
}
|
||||
if additional != "" {
|
||||
returnTab = append(returnTab, models.TabViewReportMcu{Name: "Tambahan", Link: additional})
|
||||
}
|
||||
|
||||
return returnTab, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) GetListAttachmentFile(orderheaderID string) ([]models.AttachmentFIle, error) {
|
||||
list_file := []models.AttachmentFIle{}
|
||||
|
||||
sql := `
|
||||
SELECT
|
||||
File_AttachmentID,
|
||||
File_AttachmentFileName
|
||||
FROM t_orderheader
|
||||
JOIN file_attachment ON File_AttachmentT_OrderHeaderID = T_OrderHeaderID
|
||||
AND T_OrderHeaderID = ? AND File_AttachmentIsActive = 'Y'
|
||||
ORDER BY File_AttachmentID ASC`
|
||||
|
||||
if err := dbx.Handlex.Select(&list_file, sql, orderheaderID); err != nil {
|
||||
return list_file, err
|
||||
}
|
||||
|
||||
url := "/one-media/one-files/"
|
||||
for i, v := range list_file {
|
||||
list_file[i].Link = url + v.File_AttachmentFileName
|
||||
}
|
||||
|
||||
return list_file, nil
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ func (tkf *TabKelainanFisikServices) GetKelainanFisikPresentase(mcuID string) (m
|
||||
count(distinct T_OrderHeaderID) as total
|
||||
FROM t_kelainan_fisik
|
||||
JOIN t_orderheader ON T_KelainanFiskT_OrderHeaderID = T_OrderHeaderID
|
||||
JOIN mcu_summaryfisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
JOIN mcu_summaryfisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
Mcu_SummaryFisikID NOT IN (63,67,68,69,70,71,72,73)
|
||||
join mcu_kelainan on Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID
|
||||
join mcu_kelainangroup on Mcu_KelainanMcu_KelainanGroupID = Mcu_KelainanGroupID
|
||||
@@ -267,7 +267,7 @@ func (tkf *TabKelainanFisikServices) GetKelainanFisikBMI(mcuID string) (models.P
|
||||
FROM mcu_kelainan
|
||||
JOIN mcu_summaryfisik ON Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID AND
|
||||
Mcu_SummaryFisikIsActive = 'Y'
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
T_KelainanFiskIsActive= 'Y'
|
||||
LEFT JOIN t_orderheader orderkel ON T_KelainanFiskT_OrderHeaderID = orderkel.T_OrderHeaderID AND
|
||||
orderkel.T_OrderHeaderIsActive = 'Y' AND orderkel.T_OrderHeaderMgm_McuID = ?
|
||||
@@ -325,7 +325,7 @@ func (tkf *TabKelainanFisikServices) GetKelainanFisikHipertensi(mcuID string) (m
|
||||
FROM mcu_kelainan
|
||||
JOIN mcu_summaryfisik ON Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID AND
|
||||
Mcu_SummaryFisikIsActive = 'Y'
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
T_KelainanFiskIsActive= 'Y'
|
||||
LEFT JOIN t_orderheader orderkel ON T_KelainanFiskT_OrderHeaderID = orderkel.T_OrderHeaderID AND
|
||||
orderkel.T_OrderHeaderIsActive = 'Y' AND orderkel.T_OrderHeaderMgm_McuID = ?
|
||||
@@ -381,7 +381,7 @@ func (tkf *TabKelainanFisikServices) GetKelainanFisikRefraksi(mcuID string) (mod
|
||||
FROM mcu_kelainan
|
||||
JOIN mcu_summaryfisik ON Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID AND
|
||||
Mcu_SummaryFisikIsActive = 'Y'
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
T_KelainanFiskIsActive= 'Y'
|
||||
LEFT JOIN t_orderheader orderkel ON T_KelainanFiskT_OrderHeaderID = orderkel.T_OrderHeaderID AND
|
||||
orderkel.T_OrderHeaderIsActive = 'Y' AND orderkel.T_OrderHeaderMgm_McuID = ?
|
||||
@@ -435,7 +435,7 @@ func (tkf *TabKelainanFisikServices) GetKelFisikAlkohol(mcuID string) (models.Pi
|
||||
FROM mcu_kelainan
|
||||
JOIN mcu_summaryfisik ON Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID AND
|
||||
Mcu_KelainanIsActive = 'Y' AND Mcu_KelainanID IN (117,118,119)
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
T_KelainanFiskIsActive = 'Y'
|
||||
LEFT JOIN so_resultentry ON T_KelainanFiskSo_ResultEntryID = So_ResultEntryID AND
|
||||
So_ResultEntryIsActive = 'Y'
|
||||
@@ -482,7 +482,7 @@ func (tkf *TabKelainanFisikServices) GetKelFisikMerokok(mcuID string) (models.Pi
|
||||
FROM mcu_kelainan
|
||||
JOIN mcu_summaryfisik ON Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID AND
|
||||
Mcu_KelainanIsActive = 'Y' AND Mcu_KelainanID IN (120,121,122)
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
T_KelainanFiskIsActive = 'Y'
|
||||
LEFT JOIN so_resultentry ON T_KelainanFiskSo_ResultEntryID = So_ResultEntryID AND
|
||||
So_ResultEntryIsActive = 'Y'
|
||||
@@ -528,7 +528,7 @@ func (tkf *TabKelainanFisikServices) GetKelFisikOlahraga(mcuID string) (models.P
|
||||
FROM mcu_kelainan
|
||||
JOIN mcu_summaryfisik ON Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID AND
|
||||
Mcu_KelainanIsActive = 'Y' AND Mcu_KelainanID IN (123,124)
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
LEFT JOIN t_kelainan_fisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
T_KelainanFiskIsActive = 'Y'
|
||||
LEFT JOIN so_resultentry ON T_KelainanFiskSo_ResultEntryID = So_ResultEntryID AND
|
||||
So_ResultEntryIsActive = 'Y'
|
||||
|
||||
@@ -267,7 +267,7 @@ func (tkg *TabKelainanGlobalServices) GetKelainanGlobalV2(mcuID string) (models.
|
||||
count(distinct T_OrderHeaderID) as Total
|
||||
FROM t_kelainan_fisik
|
||||
JOIN t_orderheader ON T_KelainanFiskT_OrderHeaderID = T_OrderHeaderID
|
||||
JOIN mcu_summaryfisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
JOIN mcu_summaryfisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
Mcu_SummaryFisikID NOT IN (63,67,68,69,70,71,72,73)
|
||||
join mcu_kelainan on Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID
|
||||
join mcu_kelainangroup on Mcu_KelainanMcu_KelainanGroupID = Mcu_KelainanGroupID
|
||||
|
||||
@@ -289,7 +289,7 @@ func (tks *TabKesimpulanServices) GetListKesimpulanFisikV2(id string) ([]models.
|
||||
count(distinct T_OrderHeaderID) as total
|
||||
FROM t_kelainan_fisik
|
||||
JOIN t_orderheader ON T_KelainanFiskT_OrderHeaderID = T_OrderHeaderID
|
||||
JOIN mcu_summaryfisik ON T_KelainanFiskMcu_SummaryFisikID = Mcu_SummaryFisikID AND
|
||||
JOIN mcu_summaryfisik ON T_KelainanFiskMcu_FisikSummaryID = Mcu_SummaryFisikID AND
|
||||
Mcu_SummaryFisikID NOT IN (63,67,68,69,70,71,72,73)
|
||||
join mcu_kelainan on Mcu_SummaryFisikMcu_KelainanID = Mcu_KelainanID
|
||||
join mcu_kelainangroup on Mcu_KelainanMcu_KelainanGroupID = Mcu_KelainanGroupID
|
||||
|
||||
@@ -303,6 +303,7 @@ func (sp *PatientServices) GetListReportPesertaV4(orderheaderID string, staffnam
|
||||
switch d.Rpt_name {
|
||||
case "Pemeriksaan Fisik":
|
||||
fisik = "/birt/frameset?__report=report/one/mcu/mcu_fisik_history_v2_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
// fisik = "/birt/run?__report=report/one/mcu/mcu_fisik_history_v2_portal.rptdesign&__format=pdf&PType=fisik&PLang=1&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Rontgen":
|
||||
rontgen = "/birt/frameset?__report=report/one/lab/rpt_hasil_so_xray_portal.rptdesign&__format=pdf&username=" + staffname + "&PID=" + d.So_id + "&tm=" + d.Datetime
|
||||
case "Audiometri":
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package public_services
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"cpone/db"
|
||||
"cpone/models"
|
||||
"cpone/package/config"
|
||||
dbx "cpone/package/database"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@@ -23,37 +26,76 @@ func NewServicesLogin(uStore db.AppStore) *ServicesLogin {
|
||||
}
|
||||
}
|
||||
|
||||
func (ls *ServicesLogin) MultiSignIn(username string, password string, host string) (models.Response, error) {
|
||||
func (ls *ServicesLogin) MultiSignInV2(username string, password string) (models.Response, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret models.Response
|
||||
|
||||
uri := "https://" + config.Data.Get("servername") + "/one-api/v1/system/auth/multi_login"
|
||||
// uri := "https://" + config.Data.Get("servername") + "/one-api/v1/system/auth_v2/multi_login"
|
||||
uri := "https://" + config.Data.Get("servername") + "/one-api/v1/system/auth_v2/multi_login_v2"
|
||||
|
||||
params := url.Values{}
|
||||
params.Add("username", username)
|
||||
params.Add("password", password)
|
||||
params, _ := json.Marshal(map[string]string{
|
||||
"username": username,
|
||||
"password": password,
|
||||
})
|
||||
paramsBody := bytes.NewBuffer(params)
|
||||
|
||||
resp, err := http.PostForm(uri, params)
|
||||
resp, err := http.Post(uri, "application/json", paramsBody)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("error request post", zap.Any("error", err))
|
||||
logger.Error("[ERROR]", zap.Any("error request login ", err))
|
||||
return ret, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("error read body", zap.Any("error", err))
|
||||
logger.Error("[ERROR]", zap.Any("error read body response ", err))
|
||||
return ret, err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(body, &ret)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("error parse body", zap.Any("error", err))
|
||||
logger.Error("[ERROR]", zap.Any("error unmarshal response ", err))
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// logger.Info("[INFO]", zap.Any("success sign in ", &ret))
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (ls *ServicesLogin) CheckIsAccountCpone(email string) (string, error) {
|
||||
var usr_type string
|
||||
|
||||
q := `
|
||||
SELECT M_UserEmail
|
||||
FROM m_user
|
||||
WHERE M_UserEmail = ? AND M_UserIsActive = 'Y'
|
||||
`
|
||||
if err := dbx.Handlex.Get(&usr_type, q, email); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return "", nil
|
||||
}
|
||||
return "", err
|
||||
}
|
||||
|
||||
return usr_type, nil
|
||||
}
|
||||
|
||||
func (ls *ServicesLogin) CheckAccountHasLocation(email string) (bool, error) {
|
||||
var placeholder string
|
||||
|
||||
sqla := `SELECT
|
||||
M_UserEmail
|
||||
FROM m_user
|
||||
JOIN m_userlocation ON M_UserLocationM_UserID = M_UserID
|
||||
WHERE M_UserEmail = ?
|
||||
AND M_UserIsActive = 'Y'
|
||||
`
|
||||
if err := dbx.Handlex.Get(&placeholder, sqla, email); err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
17
views/corporate/mcu/mcutab/daftarpeserta/filter.templ
Normal file
17
views/corporate/mcu/mcutab/daftarpeserta/filter.templ
Normal file
@@ -0,0 +1,17 @@
|
||||
package corporate_daftarpeserta
|
||||
|
||||
templ Filter_DaftarPeserta(
|
||||
hx_get string, hx_target string, hx_include string, hx_swap string,
|
||||
hx_trigger string, hx_before templ.ComponentScript, hx_after templ.ComponentScript,
|
||||
) {
|
||||
<div class="row pt-8 align-items-center">
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 mb-2">
|
||||
<input
|
||||
id="search-daftar-peserta" type="text" placeholder="Cari nama peserta atau NIP"
|
||||
name="searchdp" class="form-control form-control-lg bg-field border-0 rounded-lg"
|
||||
hx-get={ hx_get } hx-target={ hx_target } hx-include={ hx_include } hx-swap={ hx_swap }
|
||||
hx-trigger={ hx_trigger } hx-on::before-request={ hx_before } hx-on::after-request={ hx_after }
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
129
views/corporate/mcu/mcutab/daftarpeserta/filter_templ.go
Normal file
129
views/corporate/mcu/mcutab/daftarpeserta/filter_templ.go
Normal file
@@ -0,0 +1,129 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_daftarpeserta
|
||||
|
||||
//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 Filter_DaftarPeserta(
|
||||
hx_get string, hx_target string, hx_include string, hx_swap string,
|
||||
hx_trigger string, hx_before templ.ComponentScript, hx_after 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_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=\"row pt-8 align-items-center\"><div class=\"col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 mb-2\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hx_before, hx_after)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<input id=\"search-daftar-peserta\" type=\"text\" placeholder=\"Cari nama peserta atau NIP\" name=\"searchdp\" class=\"form-control form-control-lg bg-field border-0 rounded-lg\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hx_get)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\filter.templ`, Line: 12, Col: 31}
|
||||
}
|
||||
_, 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(hx_target)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\filter.templ`, Line: 12, Col: 55}
|
||||
}
|
||||
_, 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-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hx_include)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\filter.templ`, Line: 12, Col: 81}
|
||||
}
|
||||
_, 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-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hx_swap)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\filter.templ`, Line: 12, Col: 101}
|
||||
}
|
||||
_, 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("\" hx-trigger=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(hx_trigger)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\filter.templ`, Line: 13, Col: 39}
|
||||
}
|
||||
_, 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("\" hx-on::before-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 templ.ComponentScript = hx_before
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var7.Call)
|
||||
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_Var8 templ.ComponentScript = hx_after
|
||||
_, 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("\"></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
|
||||
})
|
||||
}
|
||||
92
views/corporate/mcu/mcutab/daftarpeserta/modal.templ
Normal file
92
views/corporate/mcu/mcutab/daftarpeserta/modal.templ
Normal file
@@ -0,0 +1,92 @@
|
||||
package corporate_daftarpeserta
|
||||
|
||||
import "cpone/component/modal"
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
templ Dialog_DaftarPeserta(
|
||||
component_id string, size string,
|
||||
hx_post string, hx_target string, hx_swap string, hx_include string,
|
||||
modal_id string, modal_title string, modal_body templ.Component,
|
||||
modal_close templ.Component, modal_aksi templ.Component,
|
||||
) {
|
||||
<div>
|
||||
<form
|
||||
id={ component_id } class="form"
|
||||
hx-post={ hx_post } hx-target={ hx_target }
|
||||
hx-swap={ hx_swap } hx-inclide={ hx_include } hx-indicator=".formloading"
|
||||
>
|
||||
if size == "xl" {
|
||||
@modalcomponent.ModalXL(modal_id, modal_title, modal_body, modal_aksi, modal_close)
|
||||
} else {
|
||||
@modalcomponent.Modal(modal_id, modal_title, modal_body, modal_aksi, modal_close)
|
||||
}
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Body_GenPass(component_id string, message string, hx_onload templ.ComponentScript) {
|
||||
<div id={ component_id } hx-on::load={ hx_onload }>
|
||||
<p>{ message }</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Body_Account(
|
||||
component_id string,
|
||||
acc_id models.CustomTextFieldv2Prm,
|
||||
acc_email models.CustomTextFieldv2Prm,
|
||||
pass models.CustomTextFieldv2Prm,
|
||||
pass_cek models.CustomTextFieldv2Prm,
|
||||
hx_onload templ.ComponentScript,
|
||||
) {
|
||||
<div id={ component_id } hx-on::load={ hx_onload }>
|
||||
@customtextfield.CustomTextFieldv2(acc_id)
|
||||
@customtextfield.CustomTextFieldv2(acc_email)
|
||||
@customtextfield.CustomTextFieldv2(pass)
|
||||
@customtextfield.CustomTextFieldv2(pass_cek)
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Body_RPT(component_id string, list_rpt templ.Component, hx_onload templ.ComponentScript) {
|
||||
<div id={ component_id } hx-on::load={ hx_onload }>
|
||||
@list_rpt
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Body_Detail(component_id string, table_detail templ.Component, hx_onload templ.ComponentScript) {
|
||||
<div id={ component_id } hx-on::load={ hx_onload }>
|
||||
@table_detail
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Body_Attachment(component_id string, list_atc templ.Component, hx_onload templ.ComponentScript) {
|
||||
<div id={ component_id } hx-on::load={ hx_onload }>
|
||||
@list_atc
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Close_Modal(modal_id string) {
|
||||
<button
|
||||
type="button" class="close" data-dismiss="modal"
|
||||
aria-label="Close" hx-on::after-request={ JSHideModal(modal_id) }
|
||||
> <i aria-hidden="true" class="ki ki-close"></i> </button>
|
||||
}
|
||||
|
||||
templ Aksi_Modal(modal_id string, hx_post string, hx_target string, hx_swap string, blank bool) {
|
||||
<div>
|
||||
if !blank {
|
||||
<button
|
||||
type="button" class="btn btn-outline-secondary font-weight-bolder rounded-lg mr-4 btncancel"
|
||||
data-dismiss="modal" hx-indicator=".cancelloading" hx-on::after-request={ JSHideModal(modal_id) }
|
||||
hx-post={ hx_post } hx-target={ hx_target } hx-swap={ hx_swap }
|
||||
>
|
||||
<span class="htmx-indicator spinner-border spinner-border-sm cancelloading" role="status" aria-hidden="true"></span>
|
||||
Batal
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary btn-shadow font-weight-bold rounded-lg btnsimpan">
|
||||
<span class="htmx-indicator spinner-border spinner-border-sm formloading" role="status" aria-hidden="true"></span>
|
||||
Yakin
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
561
views/corporate/mcu/mcutab/daftarpeserta/modal_templ.go
Normal file
561
views/corporate/mcu/mcutab/daftarpeserta/modal_templ.go
Normal file
@@ -0,0 +1,561 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_daftarpeserta
|
||||
|
||||
//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/component/modal"
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
func Dialog_DaftarPeserta(
|
||||
component_id string, size string,
|
||||
hx_post string, hx_target string, hx_swap string, hx_include string,
|
||||
modal_id string, modal_title string, modal_body templ.Component,
|
||||
modal_close templ.Component, modal_aksi 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><form id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(component_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 15, Col: 29}
|
||||
}
|
||||
_, 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("\" class=\"form\" hx-post=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hx_post)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 16, Col: 29}
|
||||
}
|
||||
_, 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-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hx_target)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 16, Col: 53}
|
||||
}
|
||||
_, 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-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hx_swap)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 17, 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("\" hx-inclide=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(hx_include)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 17, Col: 55}
|
||||
}
|
||||
_, 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("\" hx-indicator=\".formloading\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if size == "xl" {
|
||||
templ_7745c5c3_Err = modalcomponent.ModalXL(modal_id, modal_title, modal_body, modal_aksi, modal_close).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
templ_7745c5c3_Err = modalcomponent.Modal(modal_id, modal_title, modal_body, modal_aksi, modal_close).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</form></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 Body_GenPass(component_id string, message string, hx_onload 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_Var7 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var7 == nil {
|
||||
templ_7745c5c3_Var7 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hx_onload)
|
||||
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_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(component_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 29, Col: 26}
|
||||
}
|
||||
_, 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("\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 templ.ComponentScript = hx_onload
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><p>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 30, Col: 20}
|
||||
}
|
||||
_, 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("</p></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 Body_Account(
|
||||
component_id string,
|
||||
acc_id models.CustomTextFieldv2Prm,
|
||||
acc_email models.CustomTextFieldv2Prm,
|
||||
pass models.CustomTextFieldv2Prm,
|
||||
pass_cek models.CustomTextFieldv2Prm,
|
||||
hx_onload 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_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, hx_onload)
|
||||
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_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(component_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 42, Col: 26}
|
||||
}
|
||||
_, 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::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 templ.ComponentScript = hx_onload
|
||||
_, 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("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(acc_id).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(acc_email).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(pass).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(pass_cek).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 Body_RPT(component_id string, list_rpt templ.Component, hx_onload 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_Var14 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var14 == nil {
|
||||
templ_7745c5c3_Var14 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hx_onload)
|
||||
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_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(component_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 51, Col: 26}
|
||||
}
|
||||
_, 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("\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 templ.ComponentScript = hx_onload
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16.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 = list_rpt.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 Body_Detail(component_id string, table_detail templ.Component, hx_onload 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_Var17 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var17 == nil {
|
||||
templ_7745c5c3_Var17 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hx_onload)
|
||||
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_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(component_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 57, Col: 26}
|
||||
}
|
||||
_, 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("\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var19 templ.ComponentScript = hx_onload
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19.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 = table_detail.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 Body_Attachment(component_id string, list_atc templ.Component, hx_onload 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_Var20 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var20 == nil {
|
||||
templ_7745c5c3_Var20 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hx_onload)
|
||||
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_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(component_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 63, Col: 26}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
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_Var22 templ.ComponentScript = hx_onload
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22.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 = list_atc.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 Close_Modal(modal_id 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_Var23 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var23 == nil {
|
||||
templ_7745c5c3_Var23 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, JSHideModal(modal_id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\" hx-on::after-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var24 templ.ComponentScript = JSHideModal(modal_id)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><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
|
||||
})
|
||||
}
|
||||
|
||||
func Aksi_Modal(modal_id string, hx_post string, hx_target string, hx_swap string, blank bool) 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_Var25 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var25 == nil {
|
||||
templ_7745c5c3_Var25 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if !blank {
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, JSHideModal(modal_id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button type=\"button\" class=\"btn btn-outline-secondary font-weight-bolder rounded-lg mr-4 btncancel\" data-dismiss=\"modal\" hx-indicator=\".cancelloading\" hx-on::after-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var26 templ.ComponentScript = JSHideModal(modal_id)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-post=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(hx_post)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 81, Col: 33}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||
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_Var28 string
|
||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(hx_target)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 81, Col: 57}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||
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_Var29 string
|
||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(hx_swap)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\modal.templ`, Line: 81, Col: 77}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><span class=\"htmx-indicator spinner-border spinner-border-sm cancelloading\" role=\"status\" aria-hidden=\"true\"></span> Batal\r</button> <button type=\"submit\" class=\"btn btn-primary btn-shadow font-weight-bold rounded-lg btnsimpan\"><span class=\"htmx-indicator spinner-border spinner-border-sm formloading\" role=\"status\" aria-hidden=\"true\"></span> Yakin\r</button>")
|
||||
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
|
||||
})
|
||||
}
|
||||
61
views/corporate/mcu/mcutab/daftarpeserta/script.templ
Normal file
61
views/corporate/mcu/mcutab/daftarpeserta/script.templ
Normal file
@@ -0,0 +1,61 @@
|
||||
package corporate_daftarpeserta
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
script JSHideModal(modal_id string) {
|
||||
$(modal_id).modal('hide');
|
||||
}
|
||||
|
||||
script JSShowModal(modal_id string) {
|
||||
$(modal_id).modal('show');
|
||||
}
|
||||
|
||||
script JSGenPassReload(modal_id string, link string) {
|
||||
$(modal_id).modal('hide');
|
||||
htmx.ajax('POST', link, {target:'#content-dp', swap:'outerHTML'});
|
||||
}
|
||||
|
||||
script HandleFormBeforeRequest() {
|
||||
const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
script HandleFormAfterRequest() {
|
||||
const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].removeAttribute('disabled');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].removeAttribute('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
109
views/corporate/mcu/mcutab/daftarpeserta/script_templ.go
Normal file
109
views/corporate/mcu/mcutab/daftarpeserta/script_templ.go
Normal file
@@ -0,0 +1,109 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_daftarpeserta
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
|
||||
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_077f`,
|
||||
Function: `function __templ_AfterRequestContent_077f(){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_077f`),
|
||||
CallInline: templ.SafeScriptInline(`__templ_AfterRequestContent_077f`),
|
||||
}
|
||||
}
|
||||
|
||||
func JSHideModal(modal_id string) templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_JSHideModal_6635`,
|
||||
Function: `function __templ_JSHideModal_6635(modal_id){$(modal_id).modal('hide');
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_JSHideModal_6635`, modal_id),
|
||||
CallInline: templ.SafeScriptInline(`__templ_JSHideModal_6635`, modal_id),
|
||||
}
|
||||
}
|
||||
|
||||
func JSShowModal(modal_id string) templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_JSShowModal_f662`,
|
||||
Function: `function __templ_JSShowModal_f662(modal_id){$(modal_id).modal('show');
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_JSShowModal_f662`, modal_id),
|
||||
CallInline: templ.SafeScriptInline(`__templ_JSShowModal_f662`, modal_id),
|
||||
}
|
||||
}
|
||||
|
||||
func JSGenPassReload(modal_id string, link string) templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_JSGenPassReload_f8af`,
|
||||
Function: `function __templ_JSGenPassReload_f8af(modal_id, link){$(modal_id).modal('hide');
|
||||
htmx.ajax('POST', link, {target:'#content-dp', swap:'outerHTML'});
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_JSGenPassReload_f8af`, modal_id, link),
|
||||
CallInline: templ.SafeScriptInline(`__templ_JSGenPassReload_f8af`, modal_id, link),
|
||||
}
|
||||
}
|
||||
|
||||
func HandleFormBeforeRequest() templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_HandleFormBeforeRequest_2881`,
|
||||
Function: `function __templ_HandleFormBeforeRequest_2881(){const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_HandleFormBeforeRequest_2881`),
|
||||
CallInline: templ.SafeScriptInline(`__templ_HandleFormBeforeRequest_2881`),
|
||||
}
|
||||
}
|
||||
|
||||
func HandleFormAfterRequest() templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_HandleFormAfterRequest_568b`,
|
||||
Function: `function __templ_HandleFormAfterRequest_568b(){const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].removeAttribute('disabled');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].removeAttribute('disabled');
|
||||
}
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_HandleFormAfterRequest_568b`),
|
||||
CallInline: templ.SafeScriptInline(`__templ_HandleFormAfterRequest_568b`),
|
||||
}
|
||||
}
|
||||
79
views/corporate/mcu/mcutab/daftarpeserta/tablayout.templ
Normal file
79
views/corporate/mcu/mcutab/daftarpeserta/tablayout.templ
Normal file
@@ -0,0 +1,79 @@
|
||||
package corporate_daftarpeserta
|
||||
|
||||
import "cpone/layout"
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
templ DaftarPesertaScreen(
|
||||
table_id string, pagination_id string,
|
||||
dialog_RPT_id string, dialog_RPTBody_id string, dialog_RPT templ.Component,
|
||||
dialog_Akun_id string, dialog_AkunBody_id string, dialog_Akun templ.Component,
|
||||
dialog_GenPassword_id string, dialog_GenPasswordBody_id string, dialog_GenPassword templ.Component,
|
||||
dialog_DetailPaket_id string, dialog_DetailPaketBody_id string, dialog_Detailpaket templ.Component,
|
||||
dialog_Attachment_id string, dialog_AttachmentBody_id string, dialog_Attachment templ.Component,
|
||||
content templ.Component, filter_content templ.Component,
|
||||
) {
|
||||
<div class="container-fluid">
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "table-id", Name: "table-id", Type: "hidden", Value: table_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "pagination-id", Name: "pagination-id", Type: "hidden", Value: pagination_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-rpt-id", Name: "dialog-rpt-id", Type: "hidden", Value: dialog_RPT_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-rptbody-id", Name: "dialog-rptbody-id", Type: "hidden", Value: dialog_RPTBody_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-akun-id", Name: "dialog-akun-id", Type: "hidden", Value: dialog_Akun_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-akunbody-id", Name: "dialog-akunbody-id", Type: "hidden", Value: dialog_AkunBody_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-password-id", Name: "dialog-password-id", Type: "hidden", Value: dialog_GenPassword_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-passbody-id", Name: "dialog-passbody-id", Type: "hidden", Value: dialog_GenPasswordBody_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-attach-id", Name: "dialog-attach-id", Type: "hidden", Value: dialog_Attachment_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-attachbody-id", Name: "dialog-attachbody-id", Type: "hidden", Value: dialog_AttachmentBody_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-paket-id", Name: "dialog-paket-id", Type: "hidden", Value: dialog_DetailPaket_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-paketbody-id", Name: "dialog-paketbody-id", Type: "hidden", Value: dialog_DetailPaketBody_id})
|
||||
<div class="row align-items-center justify-content-center py-10">
|
||||
<div class="col-md-2 col-sm-12 p-0"></div>
|
||||
<div class="col-md-8 col-sm-12 p-0">
|
||||
<h2 class="title text-black" style="margin-bottom: 0; text-align: center;">Daftar Peserta</h2>
|
||||
</div>
|
||||
<div class="col-md-2 d-none d-lg-block d-xl-block d-md-block d-sm-none">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target={"#" + dialog_GenPassword_id }>Generate Password</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@filter_content
|
||||
<div id="loading-parent" class="rounded">
|
||||
@content
|
||||
<div id="loading-child" class="rounded bg-transparent">
|
||||
<div id="loading-spinner" class="spinner-border text-primary d-none" style="width: 3rem; height: 3rem;" role="status">
|
||||
<span class="sr-only">Loading....</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingcontent"></div>
|
||||
</div>
|
||||
@dialog_GenPassword
|
||||
@dialog_Akun
|
||||
@dialog_RPT
|
||||
@dialog_Detailpaket
|
||||
@dialog_Attachment
|
||||
</div>
|
||||
}
|
||||
|
||||
templ CSS_DaftarPeserta() {
|
||||
<style>
|
||||
.container-rpt {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
templ JS_DaftarPeserta() {}
|
||||
|
||||
templ ShowDaftarPeserta(
|
||||
title string,
|
||||
component templ.Component,
|
||||
css templ.Component,
|
||||
js templ.Component,
|
||||
) {
|
||||
@layout.PlaygroundLayout(title, css, js) {
|
||||
@component
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_daftarpeserta
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -11,25 +11,17 @@ import "io"
|
||||
import "bytes"
|
||||
|
||||
import "cpone/layout"
|
||||
import "cpone/models"
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
func TabDaftarPesertaScreen(
|
||||
tableID string,
|
||||
paginationID string,
|
||||
dialogReportID string,
|
||||
dialogReportBodyID string,
|
||||
dialogGenPassID string,
|
||||
dialogGenPassBodyID string,
|
||||
dialogAkunID string,
|
||||
dialogAkunBodyID string,
|
||||
dialogDetailID string,
|
||||
dialogDetailBodyID string,
|
||||
content templ.Component,
|
||||
dialogReport templ.Component,
|
||||
dialogGenPass templ.Component,
|
||||
dialogViewAkun templ.Component,
|
||||
dialogDetail templ.Component,
|
||||
func DaftarPesertaScreen(
|
||||
table_id string, pagination_id string,
|
||||
dialog_RPT_id string, dialog_RPTBody_id string, dialog_RPT templ.Component,
|
||||
dialog_Akun_id string, dialog_AkunBody_id string, dialog_Akun templ.Component,
|
||||
dialog_GenPassword_id string, dialog_GenPasswordBody_id string, dialog_GenPassword templ.Component,
|
||||
dialog_DetailPaket_id string, dialog_DetailPaketBody_id string, dialog_Detailpaket templ.Component,
|
||||
dialog_Attachment_id string, dialog_AttachmentBody_id string, dialog_Attachment templ.Component,
|
||||
content templ.Component, filter_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)
|
||||
@@ -47,73 +39,51 @@ func TabDaftarPesertaScreen(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "table-id", Name: "table-id", Type: "hidden", Value: table_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
|
||||
Name: "paginationID",
|
||||
Type: "hidden",
|
||||
Value: paginationID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "pagination-id", Name: "pagination-id", Type: "hidden", Value: pagination_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
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)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-rpt-id", Name: "dialog-rpt-id", Type: "hidden", Value: dialog_RPT_id}).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)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-rptbody-id", Name: "dialog-rptbody-id", Type: "hidden", Value: dialog_RPTBody_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogGenPassID",
|
||||
Name: "dialogGenPassID",
|
||||
Type: "hidden",
|
||||
Value: dialogGenPassID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-akun-id", Name: "dialog-akun-id", Type: "hidden", Value: dialog_Akun_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogGenPassBodyID",
|
||||
Name: "dialogGenPassBodyID",
|
||||
Type: "hidden",
|
||||
Value: dialogGenPassBodyID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-akunbody-id", Name: "dialog-akunbody-id", Type: "hidden", Value: dialog_AkunBody_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogAkunID",
|
||||
Name: "dialogAkunID",
|
||||
Type: "hidden",
|
||||
Value: dialogAkunID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-password-id", Name: "dialog-password-id", Type: "hidden", Value: dialog_GenPassword_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogAkunBodyID",
|
||||
Name: "dialogAkunBodyID",
|
||||
Type: "hidden",
|
||||
Value: dialogAkunBodyID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-passbody-id", Name: "dialog-passbody-id", Type: "hidden", Value: dialog_GenPasswordBody_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogDetailID",
|
||||
Name: "dialogDetailID",
|
||||
Type: "hidden",
|
||||
Value: dialogDetailID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-attach-id", Name: "dialog-attach-id", Type: "hidden", Value: dialog_Attachment_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogDetailBodyID",
|
||||
Name: "dialogDetailBodyID",
|
||||
Type: "hidden",
|
||||
Value: dialogDetailBodyID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-attachbody-id", Name: "dialog-attachbody-id", Type: "hidden", Value: dialog_AttachmentBody_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-paket-id", Name: "dialog-paket-id", Type: "hidden", Value: dialog_DetailPaket_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialog-paketbody-id", Name: "dialog-paketbody-id", Type: "hidden", Value: dialog_DetailPaketBody_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -122,15 +92,23 @@ func TabDaftarPesertaScreen(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialogGenPassID)
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialog_GenPassword_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabdaftarpeserta.templ`, Line: 77, Col: 58}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\tablayout.templ`, Line: 36, Col: 126}
|
||||
}
|
||||
_, 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("\">Generate Password\r</button></div></div></div><div id=\"loading-parent\" class=\"rounded\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">Generate Password</button></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = filter_content.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"loading-parent\" class=\"rounded\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -138,23 +116,31 @@ func TabDaftarPesertaScreen(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = dialogReport.Render(ctx, templ_7745c5c3_Buffer)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"loading-child\" class=\"rounded bg-transparent\"><div id=\"loading-spinner\" class=\"spinner-border text-primary d-none\" style=\"width: 3rem; height: 3rem;\" role=\"status\"><span class=\"sr-only\">Loading....</span></div></div><div id=\"loadingcontent\"></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = dialogGenPass.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = dialog_GenPassword.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = dialogViewAkun.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = dialog_Akun.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = dialogDetail.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = dialog_RPT.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"loading-child\" class=\"rounded bg-transparent\"><div id=\"loading-spinner\" class=\"spinner-border text-primary d-none\" style=\"width: 3rem; height: 3rem;\" role=\"status\"><span class=\"sr-only\">Loading...</span></div></div></div><div id=\"loadingcontent\"></div></div>")
|
||||
templ_7745c5c3_Err = dialog_Detailpaket.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = dialog_Attachment.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
|
||||
}
|
||||
@@ -165,7 +151,7 @@ func TabDaftarPesertaScreen(
|
||||
})
|
||||
}
|
||||
|
||||
func CSSTabDaftarPeserta() templ.Component {
|
||||
func CSS_DaftarPeserta() 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 {
|
||||
@@ -189,7 +175,7 @@ func CSSTabDaftarPeserta() templ.Component {
|
||||
})
|
||||
}
|
||||
|
||||
func JsTabDaftarPeserta() templ.Component {
|
||||
func JS_DaftarPeserta() 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 {
|
||||
@@ -209,43 +195,9 @@ 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(
|
||||
func ShowDaftarPeserta(
|
||||
title string,
|
||||
cmp templ.Component,
|
||||
component templ.Component,
|
||||
css templ.Component,
|
||||
js templ.Component,
|
||||
) templ.Component {
|
||||
@@ -267,7 +219,7 @@ func ShowTabDafterPeserta(
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
templ_7745c5c3_Err = cmp.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = component.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
184
views/corporate/mcu/mcutab/daftarpeserta/table.templ
Normal file
184
views/corporate/mcu/mcutab/daftarpeserta/table.templ
Normal file
@@ -0,0 +1,184 @@
|
||||
package corporate_daftarpeserta
|
||||
|
||||
import "cpone/component/table"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
templ Content(tabledp templ.Component, paginationdp templ.Component) {
|
||||
<div id="content-dp" hx-on::load={ AfterRequestContent() }>
|
||||
@tabledp
|
||||
@paginationdp
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Table_DaftarPeserta(
|
||||
data []models.ModelMcuDaftarPeserta, table_id string,
|
||||
hx_get_rpt string, hx_target_rpt string, hx_include_rpt string, hx_swap_rpt string,
|
||||
hx_get_dtl string, hx_target_dtl string, hx_include_dtl string, hx_swap_dtl string,
|
||||
hx_get_acc string, hx_target_acc string, hx_include_acc string, hx_swap_acc string,
|
||||
hx_get_atc string, hx_target_atc string, hx_include_atc string, hx_swap_atc string,
|
||||
) {
|
||||
<div id={ table_id }>
|
||||
@tablecomponent.TableV3([]string{"NOMOR LAB", "NAMA", "JENIS KELAMIN", "TANGGAL LAHIR", "NAMA PAKET", "AKSI"},
|
||||
[]string{"15%","20%","15%","15%","20%","15%"},
|
||||
ItemRow(data,
|
||||
hx_get_rpt, hx_target_rpt, hx_include_rpt, hx_swap_rpt,
|
||||
hx_get_dtl, hx_target_dtl, hx_include_dtl, hx_swap_dtl,
|
||||
hx_get_acc, hx_target_acc, hx_include_acc, hx_swap_acc,
|
||||
hx_get_atc, hx_target_atc, hx_include_atc, hx_swap_atc,
|
||||
),
|
||||
)
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ItemRow(data []models.ModelMcuDaftarPeserta,
|
||||
hx_get_rpt string, hx_target_rpt string, hx_include_rpt string, hx_swap_rpt string,
|
||||
hx_get_dtl string, hx_target_dtl string, hx_include_dtl string, hx_swap_dtl string,
|
||||
hx_get_acc string, hx_target_acc string, hx_include_acc string, hx_swap_acc string,
|
||||
hx_get_atc string, hx_target_atc string, hx_include_atc string, hx_swap_atc string,
|
||||
) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="6" class="text-center"> Data Tidak Ditemukan </td>
|
||||
</tr>
|
||||
}
|
||||
for _, v := range data {
|
||||
<tr>
|
||||
<td>{ v.T_OrderHeaderLabNumber }</td>
|
||||
<td>{ v.M_PatientName }</td>
|
||||
<td>{ v.JenisKelamin }</td>
|
||||
<td>{ v.M_PatientDOB }</td>
|
||||
<td>{ v.List_Paket }</td>
|
||||
<td>@ItemAksi(v,
|
||||
hx_get_rpt, hx_target_rpt, hx_include_rpt, hx_swap_rpt,
|
||||
hx_get_dtl, hx_target_dtl, hx_include_dtl, hx_swap_dtl,
|
||||
hx_get_acc, hx_target_acc, hx_include_acc, hx_swap_acc,
|
||||
hx_get_atc, hx_target_atc, hx_include_atc, hx_swap_atc,
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
templ ItemAksi(
|
||||
data models.ModelMcuDaftarPeserta,
|
||||
hx_get_rpt string, hx_target_rpt string, hx_include_rpt string, hx_swap_rpt string,
|
||||
hx_get_dtl string, hx_target_dtl string, hx_include_dtl string, hx_swap_dtl string,
|
||||
hx_get_acc string, hx_target_acc string, hx_include_acc string, hx_swap_acc string,
|
||||
hx_get_atc string, hx_target_atc string, hx_include_atc string, hx_swap_atc string,
|
||||
) {
|
||||
<div class="row px-5 d-flex justify-content-around">
|
||||
<a
|
||||
type="button" class="btn btn-icon" title="Detail test dan paket"
|
||||
hx-get={ hx_get_dtl + "?idx=" + data.T_OrderHeaderID } hx-target={ hx_target_dtl }
|
||||
hx-include={ hx_include_dtl } hx-swap={ hx_swap_dtl }
|
||||
><i class="flaticon2-list-1"></i></a>
|
||||
<a
|
||||
type="button" class="btn btn-icon" title="Detail RPT MCU"
|
||||
hx-get={ hx_get_rpt + "?idx=" + data.T_OrderHeaderID } hx-target={ hx_target_rpt }
|
||||
hx-include={ hx_include_rpt } hx-swap={ hx_swap_rpt }
|
||||
><i class="flaticon2-file"></i></a>
|
||||
<a
|
||||
type="button" class="btn btn-icon" title="Detail Attachment"
|
||||
hx-get={ hx_get_atc + "?idx=" + data.T_OrderHeaderID } hx-target={ hx_target_atc }
|
||||
hx-include={ hx_include_atc } hx-swap={ hx_swap_atc }
|
||||
><i class="flaticon-folder-1"></i></a>
|
||||
if data.AuthPatientEmail != "none" {
|
||||
<a
|
||||
type="button" class="btn btn-icon" title="Detail Akun"
|
||||
hx-get={ hx_get_acc + "?patid=" + data.M_PatientID } hx-target={ hx_target_acc }
|
||||
hx-include={ hx_include_acc } hx-swap={ hx_swap_acc }
|
||||
><i class="flaticon-user-settings"></i></a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Table_DetailPaket(data []models.TableTestPaket) {
|
||||
<div id="table-detail-paket" style="max-height: 700px; overflow-y: auto;">
|
||||
@tablecomponent.TableV3([]string{"NOMOR", "NAMA TEST", "NAMA PAKET"},
|
||||
[]string{"20%", "40%", "40%"},
|
||||
Detail_ItemRow(data),
|
||||
)
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Detail_ItemRow(data []models.TableTestPaket) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="3" class="text-center"> Data Tidak Ditemukan </td>
|
||||
</tr>
|
||||
}
|
||||
for _, v := range data {
|
||||
<tr>
|
||||
<td>{ strconv.Itoa(v.Nomor) }</td>
|
||||
<td>{ v.NamaTest }</td>
|
||||
<td>{ v.NamaPaket }</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
templ Tab_RPT(data []models.TabViewReportMcu) {
|
||||
<div class="container-rpt">
|
||||
<ul class="nav nav-tabs nav-tabs-line">
|
||||
for i, v := range data {
|
||||
if i == 0 {
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href={templ.URL("#kt_tab_pat_" + strconv.Itoa(i))}>{ v.Name }</a>
|
||||
</li>
|
||||
} else {
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href={templ.URL("#kt_tab_pat_" + strconv.Itoa(i))}>{ v.Name }</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content mt-5" id="patTabContent">
|
||||
for i, v := range data {
|
||||
if i == 0 {
|
||||
<div class="tab-pane fade show active" id={"kt_tab_pat_" + strconv.Itoa(i)} role="tabpanel" aria-labelledby={"kt_tab_pat_" + strconv.Itoa(i)} style="height: 700px;">
|
||||
<object data={ v.Link } type="application/pdf" width="100%" height="100%"></object>
|
||||
</div>
|
||||
} else {
|
||||
<div class="tab-pane fade show" id={"kt_tab_pat_" + strconv.Itoa(i)} role="tabpanel" aria-labelledby={"kt_tab_pat_" + strconv.Itoa(i)} style="height: 700px;">
|
||||
<object data={ v.Link } type="application/pdf" width="100%" height="100%"></object>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Tab_Attachment(data []models.AttachmentFIle) {
|
||||
<div class="container-rpt">
|
||||
<ul class="nav nav-tabs nav-tabs-line">
|
||||
for i, v := range data {
|
||||
// if i == 0 {
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href={templ.URL("#kt_tab_atc_" + strconv.Itoa(i))}>{ v.File_AttachmentFileName }</a>
|
||||
// </li>
|
||||
// } else {
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href={templ.URL("#kt_tab_atc_" + strconv.Itoa(i))}>{ v.File_AttachmentFileName }</a>
|
||||
</li>
|
||||
// }
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content mt-5" id="atcTabContent" style="min-height: 700px;">
|
||||
if len(data) == 0 {
|
||||
<div style="min-height: 350px;"></div>
|
||||
<h3 class="text-center">Tidak ada file</h3>
|
||||
}
|
||||
for i, v := range data {
|
||||
// if i == 0 {
|
||||
// <div class="tab-pane fade show" id={"kt_tab_atc_" + strconv.Itoa(i)} role="tabpanel" aria-labelledby={"kt_tab_atc_" + strconv.Itoa(i)} style="height: 700px;">
|
||||
// <object data={ v.Link } type="application/pdf" width="100%" height="100%"></object>
|
||||
// </div>
|
||||
// } else {
|
||||
<div class="tab-pane fade show" id={"kt_tab_atc_" + strconv.Itoa(i)} role="tabpanel" aria-labelledby={"kt_tab_atc_" + strconv.Itoa(i)} style="height: 700px;">
|
||||
<object data={ v.Link } type="application/pdf" width="100%" height="100%"></object>
|
||||
</div>
|
||||
// }
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_daftarpeserta
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -14,10 +14,7 @@ import "cpone/component/table"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
func ContentLayout(
|
||||
tablecomponent templ.Component,
|
||||
paginationtable templ.Component,
|
||||
) templ.Component {
|
||||
func Content(tabledp templ.Component, paginationdp 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 {
|
||||
@@ -34,7 +31,7 @@ func ContentLayout(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"contentlayout\" hx-on::load=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"content-dp\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -47,11 +44,11 @@ func ContentLayout(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = tabledp.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = paginationtable.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = paginationdp.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -66,21 +63,12 @@ func ContentLayout(
|
||||
})
|
||||
}
|
||||
|
||||
func TableDaftarPeserta(
|
||||
data []models.ModelMcuDaftarPeserta,
|
||||
tableID string,
|
||||
hxGetRpt string,
|
||||
hxTargetRpt string,
|
||||
hxIncludeRpt string,
|
||||
hxSwapRpt string,
|
||||
hxGetAcc string,
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail string,
|
||||
func Table_DaftarPeserta(
|
||||
data []models.ModelMcuDaftarPeserta, table_id string,
|
||||
hx_get_rpt string, hx_target_rpt string, hx_include_rpt string, hx_swap_rpt string,
|
||||
hx_get_dtl string, hx_target_dtl string, hx_include_dtl string, hx_swap_dtl string,
|
||||
hx_get_acc string, hx_target_acc string, hx_include_acc string, hx_swap_acc string,
|
||||
hx_get_atc string, hx_target_atc string, hx_include_atc string, hx_swap_atc 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)
|
||||
@@ -99,9 +87,9 @@ func TableDaftarPeserta(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(tableID)
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(table_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 34, Col: 21}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 21, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -111,22 +99,15 @@ func TableDaftarPeserta(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.TableV3([]string{"NOMOR LAB", "NAMA", "JENIS KELAMIN", "UMUR", "NAMA PAKET", "AKSI"},
|
||||
[]string{"15%", "20%", "10%", "10%", "30%", "15%"},
|
||||
templ_7745c5c3_Err = tablecomponent.TableV3([]string{"NOMOR LAB", "NAMA", "JENIS KELAMIN", "TANGGAL LAHIR", "NAMA PAKET", "AKSI"},
|
||||
[]string{"15%", "20%", "15%", "15%", "20%", "15%"},
|
||||
ItemRow(data,
|
||||
hxGetRpt,
|
||||
hxTargetRpt,
|
||||
hxIncludeRpt,
|
||||
hxSwapRpt,
|
||||
hxGetAcc,
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
)).Render(ctx, templ_7745c5c3_Buffer)
|
||||
hx_get_rpt, hx_target_rpt, hx_include_rpt, hx_swap_rpt,
|
||||
hx_get_dtl, hx_target_dtl, hx_include_dtl, hx_swap_dtl,
|
||||
hx_get_acc, hx_target_acc, hx_include_acc, hx_swap_acc,
|
||||
hx_get_atc, hx_target_atc, hx_include_atc, hx_swap_atc,
|
||||
),
|
||||
).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -141,20 +122,11 @@ func TableDaftarPeserta(
|
||||
})
|
||||
}
|
||||
|
||||
func ItemRow(
|
||||
data []models.ModelMcuDaftarPeserta,
|
||||
hxGetRpt string,
|
||||
hxTargetRpt string,
|
||||
hxIncludeRpt string,
|
||||
hxSwapRpt string,
|
||||
hxGetAcc string,
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail string,
|
||||
func ItemRow(data []models.ModelMcuDaftarPeserta,
|
||||
hx_get_rpt string, hx_target_rpt string, hx_include_rpt string, hx_swap_rpt string,
|
||||
hx_get_dtl string, hx_target_dtl string, hx_include_dtl string, hx_swap_dtl string,
|
||||
hx_get_acc string, hx_target_acc string, hx_include_acc string, hx_swap_acc string,
|
||||
hx_get_atc string, hx_target_atc string, hx_include_atc string, hx_swap_atc 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)
|
||||
@@ -169,7 +141,7 @@ func ItemRow(
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if len(data) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td colspan=\"6\" class=\"text-center\">Data Tidak Ditemukan</td></tr>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td colspan=\"6\" class=\"text-center\">Data Tidak Ditemukan </td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -182,7 +154,7 @@ func ItemRow(
|
||||
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: 76, Col: 42}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 47, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -195,7 +167,7 @@ func ItemRow(
|
||||
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: 77, Col: 33}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 48, Col: 33}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -208,7 +180,7 @@ func ItemRow(
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(v.JenisKelamin)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 78, Col: 32}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 49, Col: 32}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -219,9 +191,9 @@ func ItemRow(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(v.Age)
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_PatientDOB)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 79, Col: 23}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 50, Col: 32}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -234,7 +206,7 @@ func ItemRow(
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(v.List_Paket)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 80, Col: 30}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 51, Col: 30}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -244,19 +216,11 @@ func ItemRow(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ItemAction(v,
|
||||
hxGetRpt,
|
||||
hxTargetRpt,
|
||||
hxIncludeRpt,
|
||||
hxSwapRpt,
|
||||
hxGetAcc,
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
templ_7745c5c3_Err = ItemAksi(v,
|
||||
hx_get_rpt, hx_target_rpt, hx_include_rpt, hx_swap_rpt,
|
||||
hx_get_dtl, hx_target_dtl, hx_include_dtl, hx_swap_dtl,
|
||||
hx_get_acc, hx_target_acc, hx_include_acc, hx_swap_acc,
|
||||
hx_get_atc, hx_target_atc, hx_include_atc, hx_swap_atc,
|
||||
).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -273,20 +237,12 @@ func ItemRow(
|
||||
})
|
||||
}
|
||||
|
||||
func ItemAction(
|
||||
func ItemAksi(
|
||||
data models.ModelMcuDaftarPeserta,
|
||||
hxGetRpt string,
|
||||
hxTargetRpt string,
|
||||
hxIncludeRpt string,
|
||||
hxSwapRpt string,
|
||||
hxGetAcc string,
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail string,
|
||||
hx_get_rpt string, hx_target_rpt string, hx_include_rpt string, hx_swap_rpt string,
|
||||
hx_get_dtl string, hx_target_dtl string, hx_include_dtl string, hx_swap_dtl string,
|
||||
hx_get_acc string, hx_target_acc string, hx_include_acc string, hx_swap_acc string,
|
||||
hx_get_atc string, hx_target_atc string, hx_include_atc string, hx_swap_atc 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)
|
||||
@@ -305,9 +261,9 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetDetail + "?idx=" + data.T_OrderHeaderID)
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(hx_get_dtl + "?idx=" + data.T_OrderHeaderID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 121, Col: 64}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 73, Col: 64}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -318,48 +274,48 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetDetail)
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(hx_target_dtl)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 122, Col: 38}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 73, Col: 92}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
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_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapDetail)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 123, Col: 34}
|
||||
}
|
||||
_, 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("\" hx-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeDetail)
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(hx_include_dtl)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 124, Col: 40}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 74, Col: 39}
|
||||
}
|
||||
_, 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("\" hx-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(hx_swap_dtl)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 74, Col: 63}
|
||||
}
|
||||
_, 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("\"><i class=\"flaticon2-list-1\"></i></a> <a type=\"button\" class=\"btn btn-icon\" hx-get=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><i class=\"flaticon2-list-1\"></i></a> <a type=\"button\" class=\"btn btn-icon\" title=\"Detail RPT MCU\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetRpt + "?idx=" + data.T_OrderHeaderID)
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(hx_get_rpt + "?idx=" + data.T_OrderHeaderID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 131, Col: 61}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 78, Col: 64}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -370,110 +326,105 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetRpt)
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(hx_target_rpt)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 132, Col: 35}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 78, Col: 92}
|
||||
}
|
||||
_, 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("\" hx-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapRpt)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 133, Col: 31}
|
||||
}
|
||||
_, 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("\" hx-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeRpt)
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(hx_include_rpt)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 134, Col: 37}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 79, Col: 39}
|
||||
}
|
||||
_, 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("\" hx-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(hx_swap_rpt)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 79, Col: 63}
|
||||
}
|
||||
_, 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("\" title=\"Laporan MCU\"><i class=\"flaticon2-file\"></i></a> ")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><i class=\"flaticon2-file\"></i></a> <a type=\"button\" class=\"btn btn-icon\" title=\"Detail Attachment\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(hx_get_atc + "?idx=" + data.T_OrderHeaderID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 83, Col: 64}
|
||||
}
|
||||
_, 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("\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(hx_target_atc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 83, Col: 92}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
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_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(hx_include_atc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 84, Col: 39}
|
||||
}
|
||||
_, 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-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(hx_swap_atc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 84, Col: 63}
|
||||
}
|
||||
_, 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("\"><i class=\"flaticon-folder-1\"></i></a> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if data.AuthPatientEmail != "none" {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a type=\"button\" class=\"btn btn-icon\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetAcc + "?patid=" + data.M_PatientID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 143, Col: 64}
|
||||
}
|
||||
_, 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("\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetAcc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 144, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
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_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapAcc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 145, Col: 35}
|
||||
}
|
||||
_, 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-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeAcc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 146, Col: 41}
|
||||
}
|
||||
_, 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("\" title=\"Ganti password peserta\"><i class=\"flaticon2-edit\"></i></a>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a type=\"button\" class=\"btn btn-icon d-none\" hx-get=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a type=\"button\" class=\"btn btn-icon\" title=\"Detail Akun\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var24 string
|
||||
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetAcc + "?patid=" + data.M_PatientID)
|
||||
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(hx_get_acc + "?patid=" + data.M_PatientID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 155, Col: 64}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 89, Col: 66}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -484,41 +435,41 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var25 string
|
||||
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetAcc)
|
||||
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(hx_target_acc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 156, Col: 39}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 89, Col: 94}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
||||
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_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapAcc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 157, Col: 35}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
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_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeAcc)
|
||||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(hx_include_acc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 158, Col: 41}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 90, Col: 43}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
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_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(hx_swap_acc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 90, Col: 67}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><i class=\"flaticon2-edit\"></i></a>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><i class=\"flaticon-user-settings\"></i></a>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -534,9 +485,7 @@ func ItemAction(
|
||||
})
|
||||
}
|
||||
|
||||
func TableDetailMCU(
|
||||
data []models.TableTestPaket,
|
||||
) templ.Component {
|
||||
func Table_DetailPaket(data []models.TableTestPaket) 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 {
|
||||
@@ -549,13 +498,13 @@ func TableDetailMCU(
|
||||
templ_7745c5c3_Var28 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"table-detail-mcu\" style=\"max-height: 700px; overflow-y: auto;\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"table-detail-paket\" style=\"max-height: 700px; overflow-y: auto;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.TableV3([]string{"NOMOR", "NAMA TEST", "NAMA PAKET"},
|
||||
[]string{"20%", "40%", "40%"},
|
||||
DetailRow(data),
|
||||
Detail_ItemRow(data),
|
||||
).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -571,9 +520,7 @@ func TableDetailMCU(
|
||||
})
|
||||
}
|
||||
|
||||
func DetailRow(
|
||||
data []models.TableTestPaket,
|
||||
) templ.Component {
|
||||
func Detail_ItemRow(data []models.TableTestPaket) 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 {
|
||||
@@ -587,7 +534,7 @@ func DetailRow(
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if len(data) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td colspan=\"3\" class=\"text-center\">Data Tidak Ditemukan</td></tr>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td colspan=\"3\" class=\"text-center\">Data Tidak Ditemukan </td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -600,7 +547,7 @@ func DetailRow(
|
||||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(v.Nomor))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 188, Col: 39}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 113, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -613,7 +560,7 @@ func DetailRow(
|
||||
var templ_7745c5c3_Var31 string
|
||||
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(v.NamaTest)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 189, Col: 28}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 114, Col: 28}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -626,7 +573,7 @@ func DetailRow(
|
||||
var templ_7745c5c3_Var32 string
|
||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(v.NamaPaket)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 190, Col: 29}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 115, Col: 29}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -643,3 +590,294 @@ func DetailRow(
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Tab_RPT(data []models.TabViewReportMcu) 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_Var33 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var33 == nil {
|
||||
templ_7745c5c3_Var33 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-rpt\"><ul class=\"nav nav-tabs nav-tabs-line\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for i, v := range data {
|
||||
if i == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li class=\"nav-item\"><a class=\"nav-link active\" data-toggle=\"tab\" href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var34 templ.SafeURL = templ.URL("#kt_tab_pat_" + strconv.Itoa(i))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var34)))
|
||||
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_Var35 string
|
||||
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(v.Name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 126, Col: 128}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var36 templ.SafeURL = templ.URL("#kt_tab_pat_" + strconv.Itoa(i))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var36)))
|
||||
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_Var37 string
|
||||
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(v.Name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 130, Col: 121}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul></div><div class=\"tab-content mt-5\" id=\"patTabContent\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for i, v := range data {
|
||||
if i == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"tab-pane fade show active\" id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var38 string
|
||||
templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 139, Col: 90}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" role=\"tabpanel\" aria-labelledby=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var39 string
|
||||
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 139, Col: 156}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"height: 700px;\"><object data=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var40 string
|
||||
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(v.Link)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 140, Col: 41}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"tab-pane fade show\" id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var41 string
|
||||
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 143, Col: 83}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" role=\"tabpanel\" aria-labelledby=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var42 string
|
||||
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 143, Col: 149}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"height: 700px;\"><object data=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var43 string
|
||||
templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(v.Link)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 144, Col: 41}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div>")
|
||||
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 Tab_Attachment(data []models.AttachmentFIle) 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_Var44 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var44 == nil {
|
||||
templ_7745c5c3_Var44 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-rpt\"><ul class=\"nav nav-tabs nav-tabs-line\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for i, v := range data {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var45 templ.SafeURL = templ.URL("#kt_tab_atc_" + strconv.Itoa(i))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var45)))
|
||||
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_Var46 string
|
||||
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(v.File_AttachmentFileName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 161, Col: 140}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul></div><div class=\"tab-content mt-5\" id=\"atcTabContent\" style=\"min-height: 700px;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if len(data) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div style=\"min-height: 350px;\"></div><h3 class=\"text-center\">Tidak ada file</h3>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
for i, v := range data {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <div class=\"tab-pane fade show\" id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var47 string
|
||||
templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_atc_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 178, Col: 83}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" role=\"tabpanel\" aria-labelledby=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var48 string
|
||||
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_atc_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 178, Col: 149}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"height: 700px;\"><object data=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var49 string
|
||||
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(v.Link)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\daftarpeserta\table.templ`, Line: 179, Col: 41}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div>")
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -1,10 +1,6 @@
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainanfisik
|
||||
|
||||
templ Tabkelainanfisik(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) {
|
||||
templ KelainanFisikScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []templ.Component) {
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0;">Data Kelainan Fisik</h2>
|
||||
@@ -13,9 +9,9 @@ templ Tabkelainanfisik(
|
||||
// xs
|
||||
<div class="d-xs-block d-sm-block d-md-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -24,9 +20,9 @@ templ Tabkelainanfisik(
|
||||
// md
|
||||
<div class="d-none d-md-block d-lg-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -35,12 +31,20 @@ templ Tabkelainanfisik(
|
||||
// lg
|
||||
<div class="d-none d-lg-block">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
<div class="m-4" style="width: 47%;">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Chart_Card(chart templ.Component) {
|
||||
<div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;">
|
||||
<div class="d-flex flex-column pt-8" style="width: 100%;">
|
||||
@chart
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainanfisik
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -10,11 +10,7 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
func Tabkelainanfisik(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) templ.Component {
|
||||
func KelainanFisikScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []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 {
|
||||
@@ -31,12 +27,12 @@ func Tabkelainanfisik(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -49,12 +45,12 @@ func Tabkelainanfisik(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -67,12 +63,12 @@ func Tabkelainanfisik(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"m-4\" style=\"width: 47%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -91,3 +87,35 @@ func Tabkelainanfisik(
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Chart_Card(chart 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_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card shadow p-4\" style=\"display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;\"><div class=\"d-flex flex-column pt-8\" style=\"width: 100%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = chart.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</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
|
||||
})
|
||||
}
|
||||
@@ -1,21 +1,17 @@
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainanglobal
|
||||
|
||||
templ TabKelainanGlobal(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) {
|
||||
templ KelainanGlobal_Screen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []templ.Component) {
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0;">Data Kelainan Global</h2>
|
||||
</div>
|
||||
|
||||
|
||||
// xs
|
||||
<div class="d-xs-block d-sm-block d-md-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -24,9 +20,9 @@ templ TabKelainanGlobal(
|
||||
// md
|
||||
<div class="d-none d-md-block d-lg-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -35,12 +31,20 @@ templ TabKelainanGlobal(
|
||||
// lg
|
||||
<div class="d-none d-lg-block">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
<div class="m-4" style="width: 100%;">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Chart_Card(chart templ.Component) {
|
||||
<div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;">
|
||||
<div class="d-flex flex-column pt-8" style="width: 100%;">
|
||||
@chart
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainanglobal
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -10,11 +10,7 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
func TabKelainanGlobal(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) templ.Component {
|
||||
func KelainanGlobal_Screen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []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 {
|
||||
@@ -31,12 +27,12 @@ func TabKelainanGlobal(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -49,12 +45,12 @@ func TabKelainanGlobal(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -67,12 +63,12 @@ func TabKelainanGlobal(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"m-4\" style=\"width: 100%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -91,3 +87,35 @@ func TabKelainanGlobal(
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Chart_Card(chart 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_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card shadow p-4\" style=\"display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;\"><div class=\"d-flex flex-column pt-8\" style=\"width: 100%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = chart.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</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
|
||||
})
|
||||
}
|
||||
@@ -1,21 +1,17 @@
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainanlab
|
||||
|
||||
templ TabKelainanLab(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) {
|
||||
templ KelainanLabScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []templ.Component) {
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0;">Data Kelainan Lab</h2>
|
||||
</div>
|
||||
|
||||
|
||||
// xs
|
||||
<div class="d-xs-block d-sm-block d-md-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -24,9 +20,9 @@ templ TabKelainanLab(
|
||||
// md
|
||||
<div class="d-none d-md-block d-lg-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -35,21 +31,20 @@ templ TabKelainanLab(
|
||||
// lg
|
||||
<div class="d-none d-lg-block">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartslg {
|
||||
// if i == 0 {
|
||||
// <div class="col-12 my-4">
|
||||
// @ChartCard(c)
|
||||
// </div>
|
||||
// } else {
|
||||
// <div class="col-6 my-4">
|
||||
// @ChartCard(c)
|
||||
// </div>
|
||||
// }
|
||||
for _, v := range chart_lg {
|
||||
<div class="m-4" style="width: 47%;">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Chart_Card(chart templ.Component) {
|
||||
<div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;">
|
||||
<div class="d-flex flex-column pt-8" style="width: 100%;">
|
||||
@chart
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainanlab
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -10,11 +10,7 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
func TabKelainanLab(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) templ.Component {
|
||||
func KelainanLabScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []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 {
|
||||
@@ -31,12 +27,12 @@ func TabKelainanLab(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -49,12 +45,12 @@ func TabKelainanLab(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -67,12 +63,12 @@ func TabKelainanLab(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartslg {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <div class=\"m-4\" style=\"width: 47%;\">")
|
||||
for _, v := range chart_lg {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"m-4\" style=\"width: 47%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -91,3 +87,35 @@ func TabKelainanLab(
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Chart_Card(chart 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_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card shadow p-4\" style=\"display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;\"><div class=\"d-flex flex-column pt-8\" style=\"width: 100%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = chart.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</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
|
||||
})
|
||||
}
|
||||
@@ -1,21 +1,17 @@
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainannonlab
|
||||
|
||||
templ TabKelainanNonLab(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) {
|
||||
templ KelainanNonlabScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []templ.Component) {
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0;">Data Kelainan Non Lab</h2>
|
||||
</div>
|
||||
|
||||
|
||||
// xs
|
||||
<div class="d-xs-block d-sm-block d-md-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -24,9 +20,9 @@ templ TabKelainanNonLab(
|
||||
// md
|
||||
<div class="d-none d-md-block d-lg-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -35,12 +31,20 @@ templ TabKelainanNonLab(
|
||||
// lg
|
||||
<div class="d-none d-lg-block">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
<div class="m-4" style="width: 47%;">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Chart_Card(chart templ.Component) {
|
||||
<div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;">
|
||||
<div class="d-flex flex-column pt-8" style="width: 100%;">
|
||||
@chart
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_kelainannonlab
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -10,11 +10,7 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
func TabKelainanNonLab(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) templ.Component {
|
||||
func KelainanNonlabScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []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 {
|
||||
@@ -31,12 +27,12 @@ func TabKelainanNonLab(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -49,12 +45,12 @@ func TabKelainanNonLab(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -67,12 +63,12 @@ func TabKelainanNonLab(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"m-4\" style=\"width: 47%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -91,3 +87,35 @@ func TabKelainanNonLab(
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Chart_Card(chart 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_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card shadow p-4\" style=\"display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;\"><div class=\"d-flex flex-column pt-8\" style=\"width: 100%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = chart.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</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
|
||||
})
|
||||
}
|
||||
@@ -1,10 +1,6 @@
|
||||
package corporate_mcudetail
|
||||
package corporate_kepesertaan
|
||||
|
||||
templ TabKepesertaan(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) {
|
||||
templ KepesertaanScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []templ.Component) {
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0;">Data Kepesertaan MCU</h2>
|
||||
@@ -13,20 +9,20 @@ templ TabKepesertaan(
|
||||
// xs
|
||||
<div class="d-xs-block d-sm-block d-md-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
// md
|
||||
<div class="d-none d-md-block d-lg-none">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
<div class="col-12 my-4">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -35,9 +31,9 @@ templ TabKepesertaan(
|
||||
// lg
|
||||
<div class="d-none d-lg-block">
|
||||
<div class="row justify-content-center">
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
<div class="m-4" style="width: 47%;">
|
||||
@ChartCard(c)
|
||||
@Chart_Card(v)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -45,12 +41,10 @@ templ TabKepesertaan(
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ChartCard(
|
||||
charts templ.Component,
|
||||
) {
|
||||
templ Chart_Card(chart templ.Component) {
|
||||
<div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;">
|
||||
<div class="d-flex flex-column pt-8" style="width: 100%;">
|
||||
@charts
|
||||
@chart
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_kepesertaan
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -10,11 +10,7 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
func TabKepesertaan(
|
||||
chartsxs []templ.Component,
|
||||
chartsmd []templ.Component,
|
||||
chartslg []templ.Component,
|
||||
) templ.Component {
|
||||
func KepesertaanScreen(chart_xs []templ.Component, chart_md []templ.Component, chart_lg []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 {
|
||||
@@ -31,12 +27,12 @@ func TabKepesertaan(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsxs {
|
||||
for _, v := range chart_xs {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -49,12 +45,12 @@ func TabKepesertaan(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartsmd {
|
||||
for _, v := range chart_md {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -67,12 +63,12 @@ func TabKepesertaan(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, c := range chartslg {
|
||||
for _, v := range chart_lg {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"m-4\" style=\"width: 47%;\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ChartCard(c).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Chart_Card(v).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -92,9 +88,7 @@ func TabKepesertaan(
|
||||
})
|
||||
}
|
||||
|
||||
func ChartCard(
|
||||
charts templ.Component,
|
||||
) templ.Component {
|
||||
func Chart_Card(chart 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 {
|
||||
@@ -111,7 +105,7 @@ func ChartCard(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = charts.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = chart.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
53
views/corporate/mcu/mcutab/kesimpulan/tablayout.templ
Normal file
53
views/corporate/mcu/mcutab/kesimpulan/tablayout.templ
Normal file
@@ -0,0 +1,53 @@
|
||||
package corporate_kesimpulan
|
||||
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
templ KesimpulanScreen(
|
||||
table_id string, content_lab templ.Component,
|
||||
content_nonlab templ.Component, content_fisik templ.Component,
|
||||
) {
|
||||
<div class="container-fluid">
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "table-id", Name: "table-id", Type: "hidden", Value: table_id})
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0;"> Kesimpulan </h2>
|
||||
</div>
|
||||
<div id="loading-parent" class="rounded">
|
||||
@content_lab
|
||||
@content_nonlab
|
||||
@content_fisik
|
||||
<div id="loading-child" class="rounded bg-transparent">
|
||||
<div id="loading-spinner" class="spinner-border text-primary d-none">
|
||||
<span class="sr-only">Loading....</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingcontent"></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ CSSKesimpulan() {
|
||||
<style>
|
||||
.dot-text {
|
||||
position: relative;
|
||||
padding-left: 1.5em; /* Menambahkan padding untuk memberi ruang pada titik */
|
||||
}
|
||||
|
||||
.dot-text::before {
|
||||
content: "•"; /* Menambahkan titik di depan teks */
|
||||
position: absolute;
|
||||
left: 1em; /* Atur posisi titik */
|
||||
top: 0;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
.information-title {
|
||||
color: #0e1e28;
|
||||
font-family: Poppins;
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
line-height: normal;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_kesimpulan
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -10,16 +10,12 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
import (
|
||||
"cpone/component/customtextfield"
|
||||
"cpone/models"
|
||||
)
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
func MainKesimpulan(
|
||||
tableID string,
|
||||
tablecontent templ.Component,
|
||||
tablecontentnonlab templ.Component,
|
||||
tablecontentfisik templ.Component,
|
||||
func KesimpulanScreen(
|
||||
table_id string, content_lab templ.Component,
|
||||
content_nonlab templ.Component, content_fisik 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)
|
||||
@@ -37,30 +33,27 @@ func MainKesimpulan(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "table-id", Name: "table-id", Type: "hidden", Value: table_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Kesimpulan</h2></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Kesimpulan </h2></div><div id=\"loading-parent\" class=\"rounded\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecontent.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = content_lab.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecontentnonlab.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = content_nonlab.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecontentfisik.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = content_fisik.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"loading-child\" class=\"rounded bg-transparent\"><div id=\"loading-spinner\" class=\"spinner-border text-primary d-none\"><span class=\"sr-only\">Loading....</span></div></div></div><div id=\"loadingcontent\"></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -71,7 +64,7 @@ func MainKesimpulan(
|
||||
})
|
||||
}
|
||||
|
||||
func CssKesimpulan() templ.Component {
|
||||
func CSSKesimpulan() 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 {
|
||||
@@ -84,7 +77,7 @@ func CssKesimpulan() templ.Component {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<style>\r\n .dot-text {\r\n position: relative;\r\n padding-left: 1.5em; /* Menambahkan padding untuk memberi ruang pada titik */\r\n }\r\n\r\n .dot-text::before {\r\n content: \"•\"; /* Menambahkan titik di depan teks */\r\n position: absolute;\r\n left: 1em; /* Atur posisi titik */\r\n top: 0;\r\n transform: translateX(-100%);\r\n }\r\n\r\n .information-title {\r\n color: #0e1e28;\r\n font-family: Poppins;\r\n font-size: 20px;\r\n font-style: normal;\r\n font-weight: 600;\r\n line-height: normal;\r\n } \r\n </style>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<style>\r\n .dot-text {\r\n position: relative;\r\n padding-left: 1.5em; /* Menambahkan padding untuk memberi ruang pada titik */\r\n }\r\n\r\n .dot-text::before {\r\n content: \"•\"; /* Menambahkan titik di depan teks */\r\n position: absolute;\r\n left: 1em; /* Atur posisi titik */\r\n top: 0;\r\n transform: translateX(-100%);\r\n }\r\n\r\n .information-title {\r\n color: #0e1e28;\r\n font-family: Poppins;\r\n font-size: 20px;\r\n font-style: normal;\r\n font-weight: 600;\r\n line-height: normal;\r\n }\r\n </style>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -94,23 +87,3 @@ func CssKesimpulan() templ.Component {
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func JsKesimpulan() 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)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
35
views/corporate/mcu/mcutab/kesimpulan/table.templ
Normal file
35
views/corporate/mcu/mcutab/kesimpulan/table.templ
Normal file
@@ -0,0 +1,35 @@
|
||||
package corporate_kesimpulan
|
||||
|
||||
import (
|
||||
"cpone/component/table"
|
||||
"cpone/models"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
templ Table_Kesimpulan(title string, data []models.ModelKesimpulanLab, table_id string) {
|
||||
<div class="card card-custom gutter-b" style="border-radius: 20px;">
|
||||
<div style="padding-top: 12px;">
|
||||
<h3 class="card-label dot-text text-black">{ title }</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id={ table_id }>
|
||||
@tablecomponent.TableV3([]string{"NO", "PEMERIKSAAN", "PRESENTASE"}, []string{"5%", "70%", "25%"}, Row_Kesimpulan(data))
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Row_Kesimpulan(data []models.ModelKesimpulanLab) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">Data Tidak Ditemukan</td>
|
||||
</tr>
|
||||
}
|
||||
for i, v := range data {
|
||||
<tr>
|
||||
<td>{ strconv.Itoa(i + 1) }</td>
|
||||
<td>{ v.Test }</td>
|
||||
<td>{ v.Total }</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_kesimpulan
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func CardTableKesimpulan(title string, data []models.ModelKesimpulanLab, tableID string) templ.Component {
|
||||
func Table_Kesimpulan(title string, data []models.ModelKesimpulanLab, table_id 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 {
|
||||
@@ -29,24 +29,37 @@ func CardTableKesimpulan(title string, data []models.ModelKesimpulanLab, tableID
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card card-custom gutter-b\" style=\"border-radius: 20px\"><div style=\"padding-top: 12px\"><h3 class=\"card-label dot-text text-black\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card card-custom gutter-b\" style=\"border-radius: 20px;\"><div style=\"padding-top: 12px;\"><h3 class=\"card-label dot-text text-black\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkesimpulantable.templ`, Line: 13, Col: 11}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\kesimpulan\table.templ`, Line: 12, Col: 62}
|
||||
}
|
||||
_, 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("</h3></div><div class=\"card-body\"><div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></div><div class=\"card-body\"><div id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = TableKesimpulan(data, tableID).Render(ctx, templ_7745c5c3_Buffer)
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(table_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\kesimpulan\table.templ`, Line: 15, Col: 30}
|
||||
}
|
||||
_, 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("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.TableV3([]string{"NO", "PEMERIKSAAN", "PRESENTASE"}, []string{"5%", "70%", "25%"}, Row_Kesimpulan(data)).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -61,8 +74,7 @@ func CardTableKesimpulan(title string, data []models.ModelKesimpulanLab, tableID
|
||||
})
|
||||
}
|
||||
|
||||
func TableKesimpulan(data []models.ModelKesimpulanLab,
|
||||
tableID string) templ.Component {
|
||||
func Row_Kesimpulan(data []models.ModelKesimpulanLab) 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 {
|
||||
@@ -70,57 +82,9 @@ func TableKesimpulan(data []models.ModelKesimpulanLab,
|
||||
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("<div id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
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\tabkesimpulantable.templ`, Line: 26, Col: 18}
|
||||
}
|
||||
_, 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("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.TableV3([]string{"NO", "PEMERIKSAAN", "PERSENTASE"},
|
||||
[]string{"5%", "70%", "25%"},
|
||||
RowKesimpulan(data),
|
||||
).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 RowKesimpulan(data []models.ModelKesimpulanLab) 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_Var5 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var5 == nil {
|
||||
templ_7745c5c3_Var5 = templ.NopComponent
|
||||
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var4 == nil {
|
||||
templ_7745c5c3_Var4 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if len(data) == 0 {
|
||||
@@ -129,15 +93,28 @@ func RowKesimpulan(data []models.ModelKesimpulanLab) templ.Component {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
for idx, v := range data {
|
||||
for i, v := range data {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(idx + 1))
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i + 1))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkesimpulantable.templ`, Line: 42, Col: 30}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\kesimpulan\table.templ`, Line: 30, Col: 37}
|
||||
}
|
||||
_, 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("</td><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(v.Test)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\kesimpulan\table.templ`, Line: 31, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -148,27 +125,14 @@ func RowKesimpulan(data []models.ModelKesimpulanLab) templ.Component {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(v.Test)
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(v.Total)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkesimpulantable.templ`, Line: 43, Col: 15}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\kesimpulan\table.templ`, Line: 32, Col: 25}
|
||||
}
|
||||
_, 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("</td><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(v.Total)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkesimpulantable.templ`, Line: 44, Col: 16}
|
||||
}
|
||||
_, 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("</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
23
views/corporate/mcu/mcutab/keuangan/script.templ
Normal file
23
views/corporate/mcu/mcutab/keuangan/script.templ
Normal file
@@ -0,0 +1,23 @@
|
||||
package corporate_keuangan
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
42
views/corporate/mcu/mcutab/keuangan/script_templ.go
Normal file
42
views/corporate/mcu/mcutab/keuangan/script_templ.go
Normal file
@@ -0,0 +1,42 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_keuangan
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
|
||||
func AfterRequestContent() templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_AfterRequestContent_077f`,
|
||||
Function: `function __templ_AfterRequestContent_077f(){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_077f`),
|
||||
CallInline: templ.SafeScriptInline(`__templ_AfterRequestContent_077f`),
|
||||
}
|
||||
}
|
||||
|
||||
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`),
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,23 @@
|
||||
package corporate_mcudetail
|
||||
package corporate_keuangan
|
||||
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
templ TabKeuanganScreen(
|
||||
tableID string,
|
||||
paginationID string,
|
||||
totalcardcomponent templ.Component,
|
||||
tableandpagination templ.Component,
|
||||
templ Tab_Keuangan(
|
||||
table_id string, pagination_id string,
|
||||
summary_card templ.Component, content templ.Component,
|
||||
) {
|
||||
<div class="container-fluid">
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID,
|
||||
})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
|
||||
Name: "paginationID",
|
||||
Type: "hidden",
|
||||
Value: paginationID,
|
||||
})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "table-id", Name: "table-id", Type: "hidden", Value: table_id})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "pagination-id", Name: "pagination-id", Type: "hidden", Value: pagination_id})
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0">Keuangan</h2>
|
||||
<h2 class="title text-black" style="margin-bottom: 0;">Keuangan</h2>
|
||||
</div>
|
||||
<div id="loading-parent" class="rounded">
|
||||
@totalcardcomponent
|
||||
@tableandpagination
|
||||
@summary_card
|
||||
@content
|
||||
<div id="loading-child" class="rounded bg-transparent">
|
||||
<div id="loading-spinner" class="spinner-border text-primary d-none" style="width: 3rem; height: 3rem;" role="status">
|
||||
<div id="loading-spinner" class="spinner-border text-primary d-none">
|
||||
<span class="sr-only">Loading....</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,18 +26,13 @@ templ TabKeuanganScreen(
|
||||
</div>
|
||||
}
|
||||
|
||||
templ KeuanganCard(
|
||||
totalOrder string,
|
||||
totalTagihan string,
|
||||
totalPelunasan string,
|
||||
totalHutang string,
|
||||
) {
|
||||
templ Summary_Card(total_order string, total_tagihan string, total_lunas string, total_hutang string) {
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="card bg-primary-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Order</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalOrder }</h1>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ total_order }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,7 +40,7 @@ templ KeuanganCard(
|
||||
<div class="card bg-warning-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Tagihan</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalTagihan }</h1>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ total_tagihan }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,7 +48,7 @@ templ KeuanganCard(
|
||||
<div class="card bg-success-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Pelunasan</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalPelunasan }</h1>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ total_lunas }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,9 +56,9 @@ templ KeuanganCard(
|
||||
<div class="card bg-danger-transparent shadow p-4">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Hutang</h3>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ totalHutang }</h1>
|
||||
<h1 class="font-weight-bolder ml-auto mt-4">{ total_hutang }</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_keuangan
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -13,11 +13,9 @@ import "bytes"
|
||||
import "cpone/component/customtextfield"
|
||||
import "cpone/models"
|
||||
|
||||
func TabKeuanganScreen(
|
||||
tableID string,
|
||||
paginationID string,
|
||||
totalcardcomponent templ.Component,
|
||||
tableandpagination templ.Component,
|
||||
func Tab_Keuangan(
|
||||
table_id string, pagination_id string,
|
||||
summary_card templ.Component, 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)
|
||||
@@ -35,35 +33,27 @@ func TabKeuanganScreen(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID,
|
||||
}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "table-id", Name: "table-id", Type: "hidden", Value: table_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
|
||||
Name: "paginationID",
|
||||
Type: "hidden",
|
||||
Value: paginationID,
|
||||
}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "pagination-id", Name: "pagination-id", Type: "hidden", Value: pagination_id}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0\">Keuangan</h2></div><div id=\"loading-parent\" class=\"rounded\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Keuangan</h2></div><div id=\"loading-parent\" class=\"rounded\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = totalcardcomponent.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = summary_card.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tableandpagination.Render(ctx, templ_7745c5c3_Buffer)
|
||||
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("<div id=\"loading-child\" class=\"rounded bg-transparent\"><div id=\"loading-spinner\" class=\"spinner-border text-primary d-none\" style=\"width: 3rem; height: 3rem;\" role=\"status\"><span class=\"sr-only\">Loading....</span></div></div></div><div id=\"loadingcontent\"></div></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"loading-child\" class=\"rounded bg-transparent\"><div id=\"loading-spinner\" class=\"spinner-border text-primary d-none\"><span class=\"sr-only\">Loading....</span></div></div></div><div id=\"loadingcontent\"></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -74,12 +64,7 @@ func TabKeuanganScreen(
|
||||
})
|
||||
}
|
||||
|
||||
func KeuanganCard(
|
||||
totalOrder string,
|
||||
totalTagihan string,
|
||||
totalPelunasan string,
|
||||
totalHutang string,
|
||||
) templ.Component {
|
||||
func Summary_Card(total_order string, total_tagihan string, total_lunas string, total_hutang 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 {
|
||||
@@ -97,9 +82,9 @@ func KeuanganCard(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(totalOrder)
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(total_order)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 50, Col: 76}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\tablayout.templ`, Line: 35, Col: 77}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -110,9 +95,9 @@ func KeuanganCard(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(totalTagihan)
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(total_tagihan)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 58, Col: 78}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\tablayout.templ`, Line: 43, Col: 79}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -123,9 +108,9 @@ func KeuanganCard(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(totalPelunasan)
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(total_lunas)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 66, Col: 80}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\tablayout.templ`, Line: 51, Col: 77}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -136,9 +121,9 @@ func KeuanganCard(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(totalHutang)
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(total_hutang)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabkeuangan.templ`, Line: 74, Col: 77}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\tablayout.templ`, Line: 59, Col: 78}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -1,30 +1,24 @@
|
||||
package corporate_mcudetail
|
||||
package corporate_keuangan
|
||||
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
import "cpone/utils"
|
||||
|
||||
templ TableAndPagination(
|
||||
tablecomponent templ.Component,
|
||||
paginationcomp templ.Component,
|
||||
) {
|
||||
<div id="tabdanpagi" hx-on::load={ AfterRequestContent() }>
|
||||
@tablecomponent
|
||||
templ Content(tablecomp templ.Component, paginationcomp templ.Component) {
|
||||
<div id="content-uang" hx-on::load={ AfterRequestContent() }>
|
||||
@tablecomp
|
||||
@paginationcomp
|
||||
</div>
|
||||
}
|
||||
|
||||
templ TableKeuangan(
|
||||
data []models.KeuanganModel,
|
||||
tableID string,
|
||||
) {
|
||||
<div id={tableID} class="mt-8">
|
||||
templ Table_Keuangan(data []models.KeuanganModel, table_id string) {
|
||||
<div id={ table_id } class="mt-8">
|
||||
<table class="table table-hover table-bordered">
|
||||
<thead>
|
||||
<tr class="rounded-lg bg-header-table">
|
||||
<th scope="col" class="text-center col-5" colspan="3"><h4>TAGIHAN</h4></th>
|
||||
<th scope="col" class="text-center col-4" colspan="2"><h4>PELUNASAN</h4></th>
|
||||
<th scope="col" class="text-center col-3" rowspan="2" style="vertical-align: middle;"><h4>SISA</h4></th>
|
||||
<th scope="col" class="text-center col-5" rowspan="2" style="vertical-align: middle;"><h4>SISA</h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">No/Tgl</th>
|
||||
@@ -35,19 +29,13 @@ templ TableKeuangan(
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@RowKeuangan(data)
|
||||
@Row_Keuangan(data)
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
|
||||
// note
|
||||
// row pelunasan -> row tagihan rowspan=len(tab pelunasan)
|
||||
// row sisa ikut ke row pertama tagihan
|
||||
|
||||
templ RowKeuangan(
|
||||
data []models.KeuanganModel,
|
||||
) {
|
||||
templ Row_Keuangan(data []models.KeuanganModel) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">Data Tidak Ditemukan</td>
|
||||
@@ -104,7 +92,7 @@ templ RowKeuangan(
|
||||
</td>
|
||||
<td class="text-center">{ utils.FormatRibuan(int(v.BillPayment[i].F_BillPaymentAmount)) }</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package corporate_mcudetail
|
||||
package corporate_keuangan
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
@@ -14,10 +14,7 @@ import "cpone/models"
|
||||
import "strconv"
|
||||
import "cpone/utils"
|
||||
|
||||
func TableAndPagination(
|
||||
tablecomponent templ.Component,
|
||||
paginationcomp templ.Component,
|
||||
) templ.Component {
|
||||
func Content(tablecomp templ.Component, paginationcomp 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 {
|
||||
@@ -34,7 +31,7 @@ func TableAndPagination(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"tabdanpagi\" hx-on::load=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"content-uang\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -47,7 +44,7 @@ func TableAndPagination(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = tablecomp.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -66,10 +63,7 @@ func TableAndPagination(
|
||||
})
|
||||
}
|
||||
|
||||
func TableKeuangan(
|
||||
data []models.KeuanganModel,
|
||||
tableID string,
|
||||
) templ.Component {
|
||||
func Table_Keuangan(data []models.KeuanganModel, table_id 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 {
|
||||
@@ -87,19 +81,19 @@ func TableKeuangan(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(tableID)
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(table_id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 21, Col: 20}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 15, Col: 22}
|
||||
}
|
||||
_, 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("\" class=\"mt-8\"><table class=\"table table-hover table-bordered\"><thead><tr class=\"rounded-lg bg-header-table\"><th scope=\"col\" class=\"text-center col-5\" colspan=\"3\"><h4>TAGIHAN</h4></th><th scope=\"col\" class=\"text-center col-4\" colspan=\"2\"><h4>PELUNASAN</h4></th><th scope=\"col\" class=\"text-center col-3\" rowspan=\"2\" style=\"vertical-align: middle;\"><h4>SISA</h4></th></tr><tr><th scope=\"col\" class=\"text-center\">No/Tgl</th><th scope=\"col\" class=\"text-center\">Tgl Jatuh Tempo</th><th scope=\"col\" class=\"text-center\">Jumlah</th><th scope=\"col\" class=\"text-center\">No/Tgl</th><th scope=\"col\" class=\"text-center\">Jumlah</th></tr></thead> <tbody>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"mt-8\"><table class=\"table table-hover table-bordered\"><thead><tr class=\"rounded-lg bg-header-table\"><th scope=\"col\" class=\"text-center col-5\" colspan=\"3\"><h4>TAGIHAN</h4></th><th scope=\"col\" class=\"text-center col-4\" colspan=\"2\"><h4>PELUNASAN</h4></th><th scope=\"col\" class=\"text-center col-5\" rowspan=\"2\" style=\"vertical-align: middle;\"><h4>SISA</h4></th></tr><tr><th scope=\"col\" class=\"text-center\">No/Tgl</th><th scope=\"col\" class=\"text-center\">Tgl Jatuh Tempo</th><th scope=\"col\" class=\"text-center\">Jumlah</th><th scope=\"col\" class=\"text-center\">No/Tgl</th><th scope=\"col\" class=\"text-center\">Jumlah</th></tr></thead> <tbody>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = RowKeuangan(data).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Row_Keuangan(data).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -114,12 +108,7 @@ func TableKeuangan(
|
||||
})
|
||||
}
|
||||
|
||||
// note
|
||||
// row pelunasan -> row tagihan rowspan=len(tab pelunasan)
|
||||
// row sisa ikut ke row pertama tagihan
|
||||
func RowKeuangan(
|
||||
data []models.KeuanganModel,
|
||||
) templ.Component {
|
||||
func Row_Keuangan(data []models.KeuanganModel) 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 {
|
||||
@@ -147,7 +136,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillNo)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 60, Col: 37}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 48, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -160,7 +149,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillCreated)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 61, Col: 42}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 49, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -173,7 +162,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillDueDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 63, Col: 57}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 51, Col: 57}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -186,7 +175,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(v.F_BillTotal))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 64, Col: 75}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 52, Col: 75}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -199,7 +188,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(v.F_BillUnpaid))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 67, Col: 76}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 55, Col: 76}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -217,7 +206,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 71, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 59, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -230,7 +219,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillNo)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 72, Col: 37}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 60, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -243,7 +232,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillCreated)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 73, Col: 42}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 61, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -256,7 +245,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 75, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 63, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -269,7 +258,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillDueDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 75, Col: 102}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 63, Col: 102}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -282,7 +271,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 76, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 64, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -295,7 +284,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(v.F_BillTotal))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 76, Col: 120}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 64, Col: 120}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -308,7 +297,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentNumber)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 78, Col: 63}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 66, Col: 63}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -321,7 +310,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 79, Col: 61}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 67, Col: 61}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -334,7 +323,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(int(v.BillPayment[0].F_BillPaymentAmount)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 81, Col: 103}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 69, Col: 103}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -347,7 +336,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 82, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 70, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -360,7 +349,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(v.F_BillUnpaid))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 82, Col: 121}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 70, Col: 121}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -378,7 +367,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 86, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 74, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -391,7 +380,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var24 string
|
||||
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillNo)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 87, Col: 37}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 75, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -404,7 +393,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var25 string
|
||||
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillCreated)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 88, Col: 42}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 76, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -417,7 +406,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 90, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 78, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -430,7 +419,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(v.F_BillDueDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 90, Col: 102}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 78, Col: 102}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -443,7 +432,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var28 string
|
||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 91, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 79, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -456,7 +445,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var29 string
|
||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(v.F_BillTotal))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 91, Col: 120}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 79, Col: 120}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -469,7 +458,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentNumber)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 93, Col: 63}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 81, Col: 63}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -482,7 +471,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var31 string
|
||||
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[0].F_BillPaymentDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 94, Col: 61}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 82, Col: 61}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -495,7 +484,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var32 string
|
||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(int(v.BillPayment[0].F_BillPaymentAmount)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 96, Col: 103}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 84, Col: 103}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -508,7 +497,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var33 string
|
||||
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(len(v.BillPayment)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 97, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 85, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -521,7 +510,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var34 string
|
||||
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(v.F_BillUnpaid))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 97, Col: 121}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 85, Col: 121}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -539,7 +528,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var35 string
|
||||
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[i].F_BillPaymentNumber)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 102, Col: 67}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 90, Col: 67}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -552,7 +541,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var36 string
|
||||
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(v.BillPayment[i].F_BillPaymentDate)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 103, Col: 65}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 91, Col: 65}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -565,7 +554,7 @@ func RowKeuangan(
|
||||
var templ_7745c5c3_Var37 string
|
||||
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(utils.FormatRibuan(int(v.BillPayment[i].F_BillPaymentAmount)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tablekeuangan.templ`, Line: 105, Col: 107}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\keuangan\table.templ`, Line: 93, Col: 107}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -1,93 +0,0 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
import "cpone/component/modal"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
templ DialogReport(
|
||||
IDComponent string,
|
||||
postLink string,
|
||||
hxTarget string,
|
||||
hxSwap string,
|
||||
hxInclude string,
|
||||
modalID string,
|
||||
modalTitle string,
|
||||
modalBody templ.Component,
|
||||
modalClose templ.Component,
|
||||
) {
|
||||
<div class="">
|
||||
<div
|
||||
id={ IDComponent }
|
||||
hx-include={ hxInclude }
|
||||
>
|
||||
@modalcomponent.ModalViewXL(modalID,
|
||||
modalTitle,
|
||||
modalBody,
|
||||
modalClose,
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ModalRptBody(
|
||||
IDComponent string,
|
||||
tabComponent templ.Component,
|
||||
hxOnLoad templ.ComponentScript,
|
||||
) {
|
||||
<div id={ IDComponent } hx-on::load={ hxOnLoad }>
|
||||
@tabComponent
|
||||
</div>
|
||||
}
|
||||
|
||||
script JsHideModal(modalID string) {
|
||||
$(modalID).modal('hide');
|
||||
}
|
||||
|
||||
script JsShowModal(modalID string) {
|
||||
$(modalID).modal('show');
|
||||
}
|
||||
|
||||
templ ModalClose(LinkClose string, hxTarget string, hxSwap string, modalID string) {
|
||||
<button
|
||||
type="button"
|
||||
hx-on::after-request={ JsHideModal(modalID) }
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<i aria-hidden="true" class="ki ki-close"></i>
|
||||
</button>
|
||||
}
|
||||
|
||||
templ TabReportView(
|
||||
datamcu []models.TabViewReportMcu,
|
||||
) {
|
||||
<div class="container-rpt">
|
||||
<ul class="nav nav-tabs nav-tabs-line">
|
||||
for i, v := range datamcu {
|
||||
if i == 0 {
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href={templ.URL("#kt_tab_pat_" + strconv.Itoa(i))}>{ v.Name }</a>
|
||||
</li>
|
||||
} else {
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href={templ.URL("#kt_tab_pat_" + strconv.Itoa(i))}>{ v.Name }</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content mt-5" id="patTabContent">
|
||||
for i, v := range datamcu {
|
||||
if i == 0 {
|
||||
<div class="tab-pane fade show active" id={"kt_tab_pat_" + strconv.Itoa(i)} role="tabpanel" aria-labelledby={"kt_tab_pat_" + strconv.Itoa(i)} style="height: 700px;">
|
||||
<object data={ v.Link } type="application/pdf" width="100%" height="100%"></object>
|
||||
</div>
|
||||
} else {
|
||||
<div class="tab-pane fade show" id={"kt_tab_pat_" + strconv.Itoa(i)} role="tabpanel" aria-labelledby={"kt_tab_pat_" + strconv.Itoa(i)} style="height: 700px;">
|
||||
<object data={ v.Link } type="application/pdf" width="100%" height="100%"></object>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -1,388 +0,0 @@
|
||||
// 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"
|
||||
|
||||
import "cpone/component/modal"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
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 {
|
||||
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=\"\"><div id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(IDComponent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 20, Col: 28}
|
||||
}
|
||||
_, 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-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hxInclude)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 21, Col: 34}
|
||||
}
|
||||
_, 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("\">")
|
||||
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("</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
|
||||
})
|
||||
}
|
||||
|
||||
func ModalRptBody(
|
||||
IDComponent string,
|
||||
tabComponent templ.Component,
|
||||
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("<div id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(IDComponent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 37, Col: 25}
|
||||
}
|
||||
_, 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("\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 templ.ComponentScript = hxOnLoad
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6.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 = tabComponent.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 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_Var7 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var7 == nil {
|
||||
templ_7745c5c3_Var7 = 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("<button type=\"button\" hx-on::after-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 templ.ComponentScript = JsHideModal(modalID)
|
||||
_, 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("\" 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
|
||||
})
|
||||
}
|
||||
|
||||
func TabReportView(
|
||||
datamcu []models.TabViewReportMcu,
|
||||
) 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("<div class=\"container-rpt\"><ul class=\"nav nav-tabs nav-tabs-line\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for i, v := range datamcu {
|
||||
if i == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li class=\"nav-item\"><a class=\"nav-link active\" data-toggle=\"tab\" href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 templ.SafeURL = templ.URL("#kt_tab_pat_" + strconv.Itoa(i))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var10)))
|
||||
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_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(v.Name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 70, Col: 128}
|
||||
}
|
||||
_, 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("</a></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 templ.SafeURL = templ.URL("#kt_tab_pat_" + strconv.Itoa(i))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var12)))
|
||||
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_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(v.Name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 74, Col: 121}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul></div><div class=\"tab-content mt-5\" id=\"patTabContent\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for i, v := range datamcu {
|
||||
if i == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"tab-pane fade show active\" id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 83, Col: 90}
|
||||
}
|
||||
_, 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("\" role=\"tabpanel\" aria-labelledby=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 83, Col: 156}
|
||||
}
|
||||
_, 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("\" style=\"height: 700px;\"><object data=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(v.Link)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 84, Col: 41}
|
||||
}
|
||||
_, 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("\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"tab-pane fade show\" id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 87, Col: 83}
|
||||
}
|
||||
_, 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("\" role=\"tabpanel\" aria-labelledby=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs("kt_tab_pat_" + strconv.Itoa(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 87, Col: 149}
|
||||
}
|
||||
_, 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("\" style=\"height: 700px;\"><object data=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(v.Link)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modaldaftarpeserta.templ`, Line: 88, Col: 41}
|
||||
}
|
||||
_, 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=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div>")
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
import "cpone/component/modal"
|
||||
import "cpone/models"
|
||||
import "cpone/component/customtextfield"
|
||||
|
||||
templ DialogGeneratePass(
|
||||
IDComponent string,
|
||||
postLink string,
|
||||
hxTarget string,
|
||||
hxSwap string,
|
||||
hxInclude string,
|
||||
modalID string,
|
||||
modalTitle string,
|
||||
modalBody templ.Component,
|
||||
modalClose templ.Component,
|
||||
modalAction templ.Component,
|
||||
) {
|
||||
<div>
|
||||
<form
|
||||
id={ IDComponent }
|
||||
class="form"
|
||||
hx-post={ postLink }
|
||||
hx-target={ hxTarget }
|
||||
hx-swap={ hxSwap }
|
||||
hx-include={ hxInclude }
|
||||
hx-indicator=".formloading"
|
||||
>
|
||||
@modalcomponent.Modal(modalID,
|
||||
modalTitle,
|
||||
modalBody,
|
||||
modalAction,
|
||||
modalClose,
|
||||
)
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
|
||||
script HandleFormBeforeRequest() {
|
||||
const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
script HandleFormAfterRequest() {
|
||||
const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].removeAttribute('disabled');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].removeAttribute('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
templ ModalGenPassBody(
|
||||
IDComponent string,
|
||||
message string,
|
||||
hxOnLoad templ.ComponentScript,
|
||||
) {
|
||||
<div id={ IDComponent } hx-on::load={ hxOnLoad }>
|
||||
<p>{ message }</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ModalGenPassAction(LinkClose string, targetClose string, hxSwapClose string, modalID string) {
|
||||
<div>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-secondary font-weight-bolder rounded-lg mr-4 btncancel"
|
||||
data-dismiss="modal"
|
||||
hx-on::after-request={ JsHideModal(modalID) }
|
||||
hx-post={ LinkClose }
|
||||
hx-target={ targetClose }
|
||||
hx-swap={ hxSwapClose }
|
||||
hx-indicator=".cancelloading"
|
||||
>
|
||||
<span class="htmx-indicator spinner-border spinner-border-sm cancelloading" role="status" aria-hidden="true"></span>
|
||||
Batal
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary btn-shadow font-weight-bold rounded-lg btnsimpan"
|
||||
>
|
||||
<span class="htmx-indicator spinner-border spinner-border-sm formloading" role="status" aria-hidden="true"></span>
|
||||
Yakin
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
script JsGenPassReload(modalID string, link string) {
|
||||
$(modalID).modal('hide');
|
||||
htmx.ajax('POST', link, {target:'#contentlayout', swap:'outerHTML'});
|
||||
}
|
||||
|
||||
templ ModalViewAkunBody(
|
||||
IDComponent string,
|
||||
akunID models.CustomTextFieldv2Prm,
|
||||
akunEmail models.CustomTextFieldv2Prm,
|
||||
newPass models.CustomTextFieldv2Prm,
|
||||
newPassCek models.CustomTextFieldv2Prm,
|
||||
hxOnLoad templ.ComponentScript,
|
||||
) {
|
||||
<div id={ IDComponent } hx-on::load={ hxOnLoad }>
|
||||
@customtextfield.CustomTextFieldv2(akunID)
|
||||
@customtextfield.CustomTextFieldv2(akunEmail)
|
||||
@customtextfield.CustomTextFieldv2(newPass)
|
||||
@customtextfield.CustomTextFieldv2(newPassCek)
|
||||
</div>
|
||||
}
|
||||
@@ -1,399 +0,0 @@
|
||||
// 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"
|
||||
|
||||
import "cpone/component/modal"
|
||||
import "cpone/models"
|
||||
import "cpone/component/customtextfield"
|
||||
|
||||
func DialogGeneratePass(
|
||||
IDComponent string,
|
||||
postLink string,
|
||||
hxTarget string,
|
||||
hxSwap string,
|
||||
hxInclude string,
|
||||
modalID string,
|
||||
modalTitle string,
|
||||
modalBody templ.Component,
|
||||
modalClose templ.Component,
|
||||
modalAction 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><form id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(IDComponent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 21, Col: 28}
|
||||
}
|
||||
_, 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("\" class=\"form\" hx-post=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(postLink)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 23, Col: 30}
|
||||
}
|
||||
_, 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-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hxTarget)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 24, Col: 32}
|
||||
}
|
||||
_, 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-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwap)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 25, Col: 28}
|
||||
}
|
||||
_, 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("\" hx-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(hxInclude)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 26, Col: 34}
|
||||
}
|
||||
_, 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("\" hx-indicator=\".formloading\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = modalcomponent.Modal(modalID,
|
||||
modalTitle,
|
||||
modalBody,
|
||||
modalAction,
|
||||
modalClose,
|
||||
).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</form></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 HandleFormBeforeRequest() templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_HandleFormBeforeRequest_21b5`,
|
||||
Function: `function __templ_HandleFormBeforeRequest_21b5(){const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].setAttribute('disabled', 'true');
|
||||
}
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_HandleFormBeforeRequest_21b5`),
|
||||
CallInline: templ.SafeScriptInline(`__templ_HandleFormBeforeRequest_21b5`),
|
||||
}
|
||||
}
|
||||
|
||||
func HandleFormAfterRequest() templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_HandleFormAfterRequest_568b`,
|
||||
Function: `function __templ_HandleFormAfterRequest_568b(){const btnCancel = document.querySelectorAll('.btncancel');
|
||||
const btnSimpan = document.querySelectorAll('.btnsimpan');
|
||||
|
||||
for (let i = 0; i < btnCancel.length; i++) {
|
||||
btnCancel[i].removeAttribute('disabled');
|
||||
}
|
||||
for (let i = 0; i < btnSimpan.length; i++) {
|
||||
btnSimpan[i].removeAttribute('disabled');
|
||||
}
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_HandleFormAfterRequest_568b`),
|
||||
CallInline: templ.SafeScriptInline(`__templ_HandleFormAfterRequest_568b`),
|
||||
}
|
||||
}
|
||||
|
||||
func ModalGenPassBody(
|
||||
IDComponent string,
|
||||
message 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_Var7 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var7 == nil {
|
||||
templ_7745c5c3_Var7 = 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_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(IDComponent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 68, Col: 25}
|
||||
}
|
||||
_, 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("\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 templ.ComponentScript = hxOnLoad
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><p>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 69, Col: 20}
|
||||
}
|
||||
_, 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("</p></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 ModalGenPassAction(LinkClose string, targetClose string, hxSwapClose 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_7745c5c3_Buffer.WriteString("<div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
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("<button type=\"button\" class=\"btn btn-outline-secondary font-weight-bolder rounded-lg mr-4 btncancel\" data-dismiss=\"modal\" hx-on::after-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 templ.ComponentScript = JsHideModal(modalID)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-post=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 80, Col: 31}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
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_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 81, Col: 35}
|
||||
}
|
||||
_, 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("\" hx-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 82, Col: 33}
|
||||
}
|
||||
_, 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("\" hx-indicator=\".cancelloading\"><span class=\"htmx-indicator spinner-border spinner-border-sm cancelloading\" role=\"status\" aria-hidden=\"true\"></span> Batal\r</button> <button type=\"submit\" class=\"btn btn-primary btn-shadow font-weight-bold rounded-lg btnsimpan\"><span class=\"htmx-indicator spinner-border spinner-border-sm formloading\" role=\"status\" aria-hidden=\"true\"></span> Yakin\r</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 JsGenPassReload(modalID string, link string) templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_JsGenPassReload_f5ca`,
|
||||
Function: `function __templ_JsGenPassReload_f5ca(modalID, link){$(modalID).modal('hide');
|
||||
htmx.ajax('POST', link, {target:'#contentlayout', swap:'outerHTML'});
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_JsGenPassReload_f5ca`, modalID, link),
|
||||
CallInline: templ.SafeScriptInline(`__templ_JsGenPassReload_f5ca`, modalID, link),
|
||||
}
|
||||
}
|
||||
|
||||
func ModalViewAkunBody(
|
||||
IDComponent string,
|
||||
akunID models.CustomTextFieldv2Prm,
|
||||
akunEmail models.CustomTextFieldv2Prm,
|
||||
newPass models.CustomTextFieldv2Prm,
|
||||
newPassCek models.CustomTextFieldv2Prm,
|
||||
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_Var16 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var16 == nil {
|
||||
templ_7745c5c3_Var16 = 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_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(IDComponent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\modalgeneratepass.templ`, Line: 111, Col: 25}
|
||||
}
|
||||
_, 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("\" hx-on::load=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var18 templ.ComponentScript = hxOnLoad
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18.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 = customtextfield.CustomTextFieldv2(akunID).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(akunEmail).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(newPass).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(newPassCek).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
|
||||
})
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
import "cpone/layout"
|
||||
import "cpone/models"
|
||||
import "cpone/component/customtextfield"
|
||||
|
||||
templ TabDaftarPesertaScreen(
|
||||
tableID string,
|
||||
paginationID string,
|
||||
dialogReportID string,
|
||||
dialogReportBodyID string,
|
||||
dialogGenPassID string,
|
||||
dialogGenPassBodyID string,
|
||||
dialogAkunID string,
|
||||
dialogAkunBodyID string,
|
||||
dialogDetailID string,
|
||||
dialogDetailBodyID string,
|
||||
content templ.Component,
|
||||
dialogReport templ.Component,
|
||||
dialogGenPass templ.Component,
|
||||
dialogViewAkun templ.Component,
|
||||
dialogDetail templ.Component,
|
||||
) {
|
||||
<div class="container-fluid">
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
|
||||
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})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogGenPassID",
|
||||
Name: "dialogGenPassID",
|
||||
Type: "hidden",
|
||||
Value: dialogGenPassID})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogGenPassBodyID",
|
||||
Name: "dialogGenPassBodyID",
|
||||
Type: "hidden",
|
||||
Value: dialogGenPassBodyID})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogAkunID",
|
||||
Name: "dialogAkunID",
|
||||
Type: "hidden",
|
||||
Value: dialogAkunID})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogAkunBodyID",
|
||||
Name: "dialogAkunBodyID",
|
||||
Type: "hidden",
|
||||
Value: dialogAkunBodyID})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogDetailID",
|
||||
Name: "dialogDetailID",
|
||||
Type: "hidden",
|
||||
Value: dialogDetailID})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogDetailBodyID",
|
||||
Name: "dialogDetailBodyID",
|
||||
Type: "hidden",
|
||||
Value: dialogDetailBodyID})
|
||||
<div class="row align-items-center justify-content-center py-10">
|
||||
<div class="col-md-2 col-sm-12 p-0">
|
||||
</div>
|
||||
<div class="col-md-8 col-sm-12 p-0">
|
||||
<h2 class="title text-black" style="margin-bottom: 0; text-align: center;">Daftar Peserta</h2>
|
||||
</div>
|
||||
<div class="col-md-2 d-none d-lg-block d-xl-block d-md-block d-sm-none">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target={"#" + dialogGenPassID}
|
||||
>
|
||||
Generate Password
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loading-parent" class="rounded">
|
||||
@content
|
||||
@dialogReport
|
||||
@dialogGenPass
|
||||
@dialogViewAkun
|
||||
@dialogDetail
|
||||
<div id="loading-child" class="rounded bg-transparent">
|
||||
<div id="loading-spinner" class="spinner-border text-primary d-none" style="width: 3rem; height: 3rem;" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingcontent"></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ CSSTabDaftarPeserta() {
|
||||
<style>
|
||||
.container-rpt {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
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(
|
||||
title string,
|
||||
cmp templ.Component,
|
||||
css templ.Component,
|
||||
js templ.Component,
|
||||
) {
|
||||
@layout.PlaygroundLayout(title, css, js) {
|
||||
@cmp
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
import (
|
||||
"cpone/component/customtextfield"
|
||||
"cpone/models"
|
||||
)
|
||||
|
||||
templ MainKesimpulan(
|
||||
tableID string,
|
||||
tablecontent templ.Component,
|
||||
tablecontentnonlab templ.Component,
|
||||
tablecontentfisik templ.Component,
|
||||
) {
|
||||
<div class="container-fluid">
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
|
||||
Name: "tableID",
|
||||
Type: "hidden",
|
||||
Value: tableID})
|
||||
<div class="d-flex justify-content-center py-10">
|
||||
<h2 class="title text-black" style="margin-bottom: 0;">Kesimpulan</h2>
|
||||
</div>
|
||||
@tablecontent
|
||||
@tablecontentnonlab
|
||||
@tablecontentfisik
|
||||
</div>
|
||||
}
|
||||
|
||||
templ CssKesimpulan() {
|
||||
<style>
|
||||
.dot-text {
|
||||
position: relative;
|
||||
padding-left: 1.5em; /* Menambahkan padding untuk memberi ruang pada titik */
|
||||
}
|
||||
|
||||
.dot-text::before {
|
||||
content: "•"; /* Menambahkan titik di depan teks */
|
||||
position: absolute;
|
||||
left: 1em; /* Atur posisi titik */
|
||||
top: 0;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
.information-title {
|
||||
color: #0e1e28;
|
||||
font-family: Poppins;
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
line-height: normal;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
templ JsKesimpulan() {
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
import (
|
||||
"cpone/component/table"
|
||||
"cpone/models"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
templ CardTableKesimpulan(title string, data []models.ModelKesimpulanLab, tableID string) {
|
||||
<div class="card card-custom gutter-b" style="border-radius: 20px">
|
||||
<div style="padding-top: 12px">
|
||||
<h3 class="card-label dot-text text-black">
|
||||
{ title }
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
@TableKesimpulan(data, tableID)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ TableKesimpulan(data []models.ModelKesimpulanLab,
|
||||
tableID string) {
|
||||
<div id={ tableID }>
|
||||
@tablecomponent.TableV3([]string{"NO", "PEMERIKSAAN", "PERSENTASE"},
|
||||
[]string{"5%", "70%", "25%"},
|
||||
RowKesimpulan(data),
|
||||
)
|
||||
</div>
|
||||
}
|
||||
|
||||
templ RowKesimpulan(data []models.ModelKesimpulanLab) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">Data Tidak Ditemukan</td>
|
||||
</tr>
|
||||
}
|
||||
for idx, v := range data {
|
||||
<tr>
|
||||
<td>{ strconv.Itoa(idx + 1) }</td>
|
||||
<td>{ v.Test }</td>
|
||||
<td>{ v.Total }</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
@@ -1,193 +0,0 @@
|
||||
package corporate_mcudetail
|
||||
|
||||
import "cpone/component/table"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
|
||||
templ ContentLayout(
|
||||
tablecomponent templ.Component,
|
||||
paginationtable templ.Component,
|
||||
) {
|
||||
<div id="contentlayout" hx-on::load={ AfterRequestContent() }>
|
||||
@tablecomponent
|
||||
@paginationtable
|
||||
</div>
|
||||
}
|
||||
|
||||
templ TableDaftarPeserta(
|
||||
data []models.ModelMcuDaftarPeserta,
|
||||
tableID string,
|
||||
hxGetRpt string,
|
||||
hxTargetRpt string,
|
||||
hxIncludeRpt string,
|
||||
hxSwapRpt string,
|
||||
hxGetAcc string,
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail string,
|
||||
) {
|
||||
<div id={ tableID }>
|
||||
@tablecomponent.TableV3([]string{"NOMOR LAB", "NAMA", "JENIS KELAMIN", "UMUR", "NAMA PAKET", "AKSI"},
|
||||
[]string{"15%","20%","10%","10%","30%","15%"},
|
||||
ItemRow(data,
|
||||
hxGetRpt,
|
||||
hxTargetRpt,
|
||||
hxIncludeRpt,
|
||||
hxSwapRpt,
|
||||
hxGetAcc,
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
))
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ItemRow(
|
||||
data []models.ModelMcuDaftarPeserta,
|
||||
hxGetRpt string,
|
||||
hxTargetRpt string,
|
||||
hxIncludeRpt string,
|
||||
hxSwapRpt string,
|
||||
hxGetAcc string,
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail string,
|
||||
) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">Data Tidak Ditemukan</td>
|
||||
</tr>
|
||||
}
|
||||
for _, v := range data {
|
||||
<tr>
|
||||
<td>{ v.T_OrderHeaderLabNumber }</td>
|
||||
<td>{ v.M_PatientName }</td>
|
||||
<td>{ v.JenisKelamin }</td>
|
||||
<td>{ v.Age }</td>
|
||||
<td>{ v.List_Paket }</td>
|
||||
<td>
|
||||
@ItemAction(v,
|
||||
hxGetRpt,
|
||||
hxTargetRpt,
|
||||
hxIncludeRpt,
|
||||
hxSwapRpt,
|
||||
hxGetAcc,
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
templ ItemAction(
|
||||
data models.ModelMcuDaftarPeserta,
|
||||
hxGetRpt string,
|
||||
hxTargetRpt string,
|
||||
hxIncludeRpt string,
|
||||
hxSwapRpt string,
|
||||
hxGetAcc string,
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail string,
|
||||
) {
|
||||
<div class="row px-5 d-flex justify-content-around">
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-icon"
|
||||
title="Detail test dan paket"
|
||||
hx-get={ hxGetDetail +"?idx=" + data.T_OrderHeaderID }
|
||||
hx-target={ hxTargetDetail }
|
||||
hx-swap={ hxSwapDetail }
|
||||
hx-include={ hxIncludeDetail }
|
||||
>
|
||||
<i class="flaticon2-list-1"></i>
|
||||
</a>
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-icon"
|
||||
hx-get={ hxGetRpt +"?idx=" + data.T_OrderHeaderID }
|
||||
hx-target={ hxTargetRpt }
|
||||
hx-swap={ hxSwapRpt }
|
||||
hx-include={ hxIncludeRpt }
|
||||
title="Laporan MCU"
|
||||
>
|
||||
<i class="flaticon2-file"></i>
|
||||
</a>
|
||||
if data.AuthPatientEmail != "none" {
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-icon"
|
||||
hx-get={ hxGetAcc + "?patid=" + data.M_PatientID }
|
||||
hx-target={ hxTargetAcc }
|
||||
hx-swap={ hxSwapAcc }
|
||||
hx-include={ hxIncludeAcc }
|
||||
title="Ganti password peserta"
|
||||
>
|
||||
<i class="flaticon2-edit"></i>
|
||||
</a>
|
||||
} else {
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-icon d-none"
|
||||
hx-get={ hxGetAcc + "?patid=" + data.M_PatientID }
|
||||
hx-target={ hxTargetAcc }
|
||||
hx-swap={ hxSwapAcc }
|
||||
hx-include={ hxIncludeAcc }
|
||||
>
|
||||
<i class="flaticon2-edit"></i>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
templ TableDetailMCU(
|
||||
data []models.TableTestPaket,
|
||||
) {
|
||||
<div id="table-detail-mcu" style="max-height: 700px; overflow-y: auto;">
|
||||
@tablecomponent.TableV3([]string{"NOMOR", "NAMA TEST", "NAMA PAKET"},
|
||||
[]string{"20%","40%","40%"},
|
||||
DetailRow(data),
|
||||
)
|
||||
</div>
|
||||
}
|
||||
|
||||
templ DetailRow(
|
||||
data []models.TableTestPaket,
|
||||
) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">Data Tidak Ditemukan</td>
|
||||
</tr>
|
||||
}
|
||||
for _, v := range data {
|
||||
<tr>
|
||||
<td>{ strconv.Itoa(v.Nomor) }</td>
|
||||
<td>{ v.NamaTest }</td>
|
||||
<td>{ v.NamaPaket }</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
@@ -5,86 +5,86 @@ templ TabViewMcuDetail(
|
||||
) {
|
||||
<div>
|
||||
<ul class="nav nav-tabs nav-tabs-line">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#kt_tab_pane_1" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkepesertaan"} hx-target="#tabkepesertaan" hx-trigger="load" hx-indicator=".kepesertaanloading">Peserta</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_2" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainanglobal"} hx-target="#tabkelainanglobal" hx-trigger="load" hx-indicator=".globalloading">Kelainan global</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_3" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainanlab"} hx-target="#tabkelainanlab" hx-trigger="load" hx-indicator=".labloading">Kelainan Lab</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_4" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainannonlab"} hx-target="#tabkelainannonlab" hx-trigger="load" hx-indicator=".nonlabloading">kelainan Non Lab</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_5" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainanfisik"} hx-target="#tabkelainanfisik" hx-trigger="load" hx-indicator=".fisikloading">kelainan Fisik</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_6" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkesimpulan"} hx-target="#tabkesimpulan" hx-indicator=".kesimpulanloading">Kesimpulan</a>
|
||||
</li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link active" data-toggle="tab" href="#kt_tab_pane_1" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkepesertaan"} hx-target="#tabkepesertaan" hx-trigger="load" hx-indicator=".kepesertaanloading">Peserta</a>
|
||||
// </li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href="#kt_tab_pane_2" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainanglobal"} hx-target="#tabkelainanglobal" hx-trigger="load" hx-indicator=".globalloading">Kelainan global</a>
|
||||
// </li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href="#kt_tab_pane_3" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainanlab"} hx-target="#tabkelainanlab" hx-trigger="load" hx-indicator=".labloading">Kelainan Lab</a>
|
||||
// </li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href="#kt_tab_pane_4" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainannonlab"} hx-target="#tabkelainannonlab" hx-trigger="load" hx-indicator=".nonlabloading">kelainan Non Lab</a>
|
||||
// </li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href="#kt_tab_pane_5" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkelainanfisik"} hx-target="#tabkelainanfisik" hx-trigger="load" hx-indicator=".fisikloading">kelainan Fisik</a>
|
||||
// </li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href="#kt_tab_pane_6" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkesimpulan"} hx-target="#tabkesimpulan" hx-indicator=".kesimpulanloading">Kesimpulan</a>
|
||||
// </li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_7" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabdaftarpeserta"} hx-target="#tabdaftarpeserta" hx-indicator=".daftperloading">Daftar Peserta</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_8">Executive Summary</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#kt_tab_pane_9" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkeuangan"} hx-target="#tabkeuangan" hx-indicator=".uangloading">Keuangan</a>
|
||||
</li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href="#kt_tab_pane_8">Executive Summary</a>
|
||||
// </li>
|
||||
// <li class="nav-item">
|
||||
// <a class="nav-link" data-toggle="tab" href="#kt_tab_pane_9" hx-get={"/corp/dashboard_pic/detail/" + id +"/tabkeuangan"} hx-target="#tabkeuangan" hx-indicator=".uangloading">Keuangan</a>
|
||||
// </li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content mt-5" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="kt_tab_pane_1" role="tabpanel" aria-labelledby="kt_tab_pane_1">
|
||||
<div id="tabkepesertaan"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg kepesertaanloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_2" role="tabpanel" aria-labelledby="kt_tab_pane_2">
|
||||
<div id="tabkelainanglobal"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg globalloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_3" role="tabpanel" aria-labelledby="kt_tab_pane_3">
|
||||
<div id="tabkelainanlab"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg labloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_4" role="tabpanel" aria-labelledby="kt_tab_pane_4" style="height: 800px;">
|
||||
<div id="tabkelainannonlab"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg nonlabloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_5" role="tabpanel" aria-labelledby="kt_tab_pane_5">
|
||||
<div id="tabkelainanfisik"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg fisikloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_6" role="tabpanel" aria-labelledby="kt_tab_pane_6">
|
||||
<div id="tabkesimpulan"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg kesimpulanloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
// <div class="tab-pane fade show active" id="kt_tab_pane_1" role="tabpanel" aria-labelledby="kt_tab_pane_1">
|
||||
// <div id="tabkepesertaan"></div>
|
||||
// <div style="display: flex; justify-content: center; align-items: center;">
|
||||
// <span class="htmx-indicator spinner-border spinner-border-lg kepesertaanloading" role="status" aria-hidden="true"></span>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="tab-pane fade" id="kt_tab_pane_2" role="tabpanel" aria-labelledby="kt_tab_pane_2">
|
||||
// <div id="tabkelainanglobal"></div>
|
||||
// <div style="display: flex; justify-content: center; align-items: center;">
|
||||
// <span class="htmx-indicator spinner-border spinner-border-lg globalloading" role="status" aria-hidden="true"></span>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="tab-pane fade" id="kt_tab_pane_3" role="tabpanel" aria-labelledby="kt_tab_pane_3">
|
||||
// <div id="tabkelainanlab"></div>
|
||||
// <div style="display: flex; justify-content: center; align-items: center;">
|
||||
// <span class="htmx-indicator spinner-border spinner-border-lg labloading" role="status" aria-hidden="true"></span>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="tab-pane fade" id="kt_tab_pane_4" role="tabpanel" aria-labelledby="kt_tab_pane_4" style="height: 800px;">
|
||||
// <div id="tabkelainannonlab"></div>
|
||||
// <div style="display: flex; justify-content: center; align-items: center;">
|
||||
// <span class="htmx-indicator spinner-border spinner-border-lg nonlabloading" role="status" aria-hidden="true"></span>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="tab-pane fade" id="kt_tab_pane_5" role="tabpanel" aria-labelledby="kt_tab_pane_5">
|
||||
// <div id="tabkelainanfisik"></div>
|
||||
// <div style="display: flex; justify-content: center; align-items: center;">
|
||||
// <span class="htmx-indicator spinner-border spinner-border-lg fisikloading" role="status" aria-hidden="true"></span>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="tab-pane fade" id="kt_tab_pane_6" role="tabpanel" aria-labelledby="kt_tab_pane_6">
|
||||
// <div id="tabkesimpulan"></div>
|
||||
// <div style="display: flex; justify-content: center; align-items: center;">
|
||||
// <span class="htmx-indicator spinner-border spinner-border-lg kesimpulanloading" role="status" aria-hidden="true"></span>
|
||||
// </div>
|
||||
// </div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_7" role="tabpanel" aria-labelledby="kt_tab_pane_7">
|
||||
<div id="tabdaftarpeserta"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg daftperloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_8" role="tabpanel" aria-labelledby="kt_tab_pane_8" style="height: 800px;">
|
||||
<object data={"/birt/run?__report=report/one/mcu/rpt_executive_summary_mcu_001.rptdesign&__format=pdf&PID="+id+"&username=admin&tm=1722914077866"} type="application/pdf" width="100%" height="100%"></object>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="kt_tab_pane_9" role="tabpanel" aria-labelledby="kt_tab_pane_9">
|
||||
<div id="tabkeuangan"></div>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<span class="htmx-indicator spinner-border spinner-border-lg uangloading" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
// <div class="tab-pane fade" id="kt_tab_pane_8" role="tabpanel" aria-labelledby="kt_tab_pane_8" style="height: 800px;">
|
||||
// <object data={"/birt/run?__report=report/one/mcu/rpt_executive_summary_mcu_001.rptdesign&__format=pdf&PID="+id+"&username=admin&tm=1722914077866"} type="application/pdf" width="100%" height="100%"></object>
|
||||
// </div>
|
||||
// <div class="tab-pane fade" id="kt_tab_pane_9" role="tabpanel" aria-labelledby="kt_tab_pane_9">
|
||||
// <div id="tabkeuangan"></div>
|
||||
// <div style="display: flex; justify-content: center; align-items: center;">
|
||||
// <span class="htmx-indicator spinner-border spinner-border-lg uangloading" role="status" aria-hidden="true"></span>
|
||||
// </div>
|
||||
// </div>
|
||||
</div>
|
||||
}
|
||||
@@ -25,124 +25,20 @@ func TabViewMcuDetail(
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><ul class=\"nav nav-tabs nav-tabs-line\"><li class=\"nav-item\"><a class=\"nav-link active\" data-toggle=\"tab\" href=\"#kt_tab_pane_1\" hx-get=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><ul class=\"nav nav-tabs nav-tabs-line\"><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_7\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkepesertaan")
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabdaftarpeserta")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 9, Col: 132}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 27, Col: 127}
|
||||
}
|
||||
_, 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=\"#tabkepesertaan\" hx-trigger=\"load\" hx-indicator=\".kepesertaanloading\">Peserta</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_2\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkelainanglobal")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 12, Col: 128}
|
||||
}
|
||||
_, 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-target=\"#tabkelainanglobal\" hx-trigger=\"load\" hx-indicator=\".globalloading\">Kelainan global</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_3\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkelainanlab")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 15, Col: 125}
|
||||
}
|
||||
_, 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-target=\"#tabkelainanlab\" hx-trigger=\"load\" hx-indicator=\".labloading\">Kelainan Lab</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_4\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkelainannonlab")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 18, Col: 128}
|
||||
}
|
||||
_, 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("\" hx-target=\"#tabkelainannonlab\" hx-trigger=\"load\" hx-indicator=\".nonlabloading\">kelainan Non Lab</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_5\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkelainanfisik")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 21, Col: 127}
|
||||
}
|
||||
_, 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("\" hx-target=\"#tabkelainanfisik\" hx-trigger=\"load\" hx-indicator=\".fisikloading\">kelainan Fisik</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_6\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkesimpulan")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 24, Col: 124}
|
||||
}
|
||||
_, 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-target=\"#tabkesimpulan\" hx-indicator=\".kesimpulanloading\">Kesimpulan</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_7\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabdaftarpeserta")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 27, Col: 127}
|
||||
}
|
||||
_, 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("\" hx-target=\"#tabdaftarpeserta\" hx-indicator=\".daftperloading\">Daftar Peserta</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_8\">Executive Summary</a></li><li class=\"nav-item\"><a class=\"nav-link\" data-toggle=\"tab\" href=\"#kt_tab_pane_9\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("/corp/dashboard_pic/detail/" + id + "/tabkeuangan")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 33, Col: 122}
|
||||
}
|
||||
_, 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=\"#tabkeuangan\" hx-indicator=\".uangloading\">Keuangan</a></li></ul></div><div class=\"tab-content mt-5\" id=\"myTabContent\"><div class=\"tab-pane fade show active\" id=\"kt_tab_pane_1\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_1\"><div id=\"tabkepesertaan\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg kepesertaanloading\" role=\"status\" aria-hidden=\"true\"></span></div></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_2\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_2\"><div id=\"tabkelainanglobal\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg globalloading\" role=\"status\" aria-hidden=\"true\"></span></div></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_3\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_3\"><div id=\"tabkelainanlab\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg labloading\" role=\"status\" aria-hidden=\"true\"></span></div></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_4\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_4\" style=\"height: 800px;\"><div id=\"tabkelainannonlab\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg nonlabloading\" role=\"status\" aria-hidden=\"true\"></span></div></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_5\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_5\"><div id=\"tabkelainanfisik\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg fisikloading\" role=\"status\" aria-hidden=\"true\"></span></div></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_6\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_6\"><div id=\"tabkesimpulan\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg kesimpulanloading\" role=\"status\" aria-hidden=\"true\"></span></div></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_7\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_7\"><div id=\"tabdaftarpeserta\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg daftperloading\" role=\"status\" aria-hidden=\"true\"></span></div></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_8\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_8\" style=\"height: 800px;\"><object data=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("/birt/run?__report=report/one/mcu/rpt_executive_summary_mcu_001.rptdesign&__format=pdf&PID=" + id + "&username=admin&tm=1722914077866")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutabview.templ`, Line: 81, Col: 148}
|
||||
}
|
||||
_, 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("\" type=\"application/pdf\" width=\"100%\" height=\"100%\"></object></div><div class=\"tab-pane fade\" id=\"kt_tab_pane_9\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_9\"><div id=\"tabkeuangan\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg uangloading\" role=\"status\" aria-hidden=\"true\"></span></div></div></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"#tabdaftarpeserta\" hx-indicator=\".daftperloading\">Daftar Peserta</a></li></ul></div><div class=\"tab-content mt-5\" id=\"myTabContent\"><div class=\"tab-pane fade\" id=\"kt_tab_pane_7\" role=\"tabpanel\" aria-labelledby=\"kt_tab_pane_7\"><div id=\"tabdaftarpeserta\"></div><div style=\"display: flex; justify-content: center; align-items: center;\"><span class=\"htmx-indicator spinner-border spinner-border-lg daftperloading\" role=\"status\" aria-hidden=\"true\"></span></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user