add detail pemeriksaan
This commit is contained in:
@@ -36,8 +36,10 @@ templ Navbaruserprofile(dataUser models.User) {
|
||||
<a
|
||||
class="btn btn-sm btn-light-primary font-weight-bolder py-2 px-5 block"
|
||||
hx-get="/login/signout"
|
||||
hx-indicator=".logoutloading"
|
||||
style="width: 100%"
|
||||
>
|
||||
<span class="htmx-indicator spinner-border spinner-border-sm logoutloading" role="status" aria-hidden="true"></span>
|
||||
Sign Out
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@ func Navbaruserprofile(dataUser models.User) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!--end::Header--><!--begin::Separator--><div class=\"separator separator-dashed my-7\"></div><div class=\"navi mt-2\"><a class=\"btn btn-sm btn-light-primary font-weight-bolder py-2 px-5 block\" style=\"width: 100%\" data-toggle=\"modal\" data-target=\"#modal-ganti-pass\">Change Password\r</a></div><div class=\"navi mt-2\"><a class=\"btn btn-sm btn-light-primary font-weight-bolder py-2 px-5 block\" hx-get=\"/login/signout\" style=\"width: 100%\">Sign Out\r</a></div></div><!--end::Content--></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!--end::Header--><!--begin::Separator--><div class=\"separator separator-dashed my-7\"></div><div class=\"navi mt-2\"><a class=\"btn btn-sm btn-light-primary font-weight-bolder py-2 px-5 block\" style=\"width: 100%\" data-toggle=\"modal\" data-target=\"#modal-ganti-pass\">Change Password\r</a></div><div class=\"navi mt-2\"><a class=\"btn btn-sm btn-light-primary font-weight-bolder py-2 px-5 block\" hx-get=\"/login/signout\" hx-indicator=\".logoutloading\" style=\"width: 100%\"><span class=\"htmx-indicator spinner-border spinner-border-sm logoutloading\" role=\"status\" aria-hidden=\"true\"></span> Sign Out\r</a></div></div><!--end::Content--></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -68,7 +68,7 @@ func ProfileHeader(dataUser models.User) templ.Component {
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.UserFullName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 59, Col: 27}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 61, Col: 27}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -81,7 +81,7 @@ func ProfileHeader(dataUser models.User) templ.Component {
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.UserPosition)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 62, Col: 27}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 64, Col: 27}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
||||
@@ -20,6 +20,8 @@ type TabDaftarPesertaServices interface {
|
||||
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 {
|
||||
@@ -47,6 +49,9 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
|
||||
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))
|
||||
|
||||
@@ -66,6 +71,10 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
|
||||
"#"+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(
|
||||
@@ -165,13 +174,13 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password",
|
||||
Name: "akunpesertapass",
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassid",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ketik ulang password",
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
@@ -200,12 +209,46 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
|
||||
"outerHTML",
|
||||
"#tableID, #paginationID, #dialogAkunID, #contentlayout, #dialogAkunBodyID, #dialogGenPassID, #dialogGenPassBodyID, #dialogReportID, #dialogReportBodyID, #currpage"+paginationID,
|
||||
dialogAkunID,
|
||||
"Ubah Password Akun Peserta",
|
||||
"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,
|
||||
@@ -215,10 +258,13 @@ func (tdp *TabDaftarPesertaHandlers) HandleShowTabDaftarPeserta(c echo.Context)
|
||||
dialogGeneratePassBodyID,
|
||||
dialogAkunID,
|
||||
dialogAkunBodyID,
|
||||
dialogDetailID,
|
||||
dialogDetailBodyID,
|
||||
clayout,
|
||||
modaldialog,
|
||||
modalGenPass,
|
||||
dialogAkunView,
|
||||
modalDetail,
|
||||
)
|
||||
|
||||
return utils.View(c, content)
|
||||
@@ -231,6 +277,7 @@ func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error {
|
||||
|
||||
dialogReportBodyID := c.QueryParam("dialogReportBodyID")
|
||||
dialogAkunBodyID := c.QueryParam("dialogAkunBodyID")
|
||||
dialogDetailBodyID := c.QueryParam("dialogDetailBodyID")
|
||||
|
||||
id := c.Param("id")
|
||||
|
||||
@@ -255,6 +302,10 @@ func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error {
|
||||
"#"+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(
|
||||
@@ -262,7 +313,7 @@ func (tdp *TabDaftarPesertaHandlers) HandlePagination(c echo.Context) error {
|
||||
page,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID, #dialogReportID, #dialogReportBodyID, #currPage"+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(),
|
||||
@@ -419,13 +470,13 @@ func (tdp *TabDaftarPesertaHandlers) HandleOpenViewAkun(c echo.Context) error {
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password Akun",
|
||||
Name: "akunpesertapass",
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassid",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ketik ulang password",
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
@@ -455,16 +506,18 @@ func (tdp *TabDaftarPesertaHandlers) HandleOpenViewAkun(c echo.Context) error {
|
||||
Value: akun.AuthPatientEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password Akun",
|
||||
Name: "akunpesertapass",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassid",
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ketik ulang password",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan ulang password baru",
|
||||
},
|
||||
corporate_mcudetail.JsShowModal("#"+dialogAkunID),
|
||||
)
|
||||
@@ -495,13 +548,13 @@ func (tdp *TabDaftarPesertaHandlers) HandleCloseViewAkun(c echo.Context) error {
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password Akun",
|
||||
Name: "akunpesertapass",
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassid",
|
||||
ID: "akunpesertapassnewid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ketik ulang password",
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
@@ -514,6 +567,9 @@ func (tdp *TabDaftarPesertaHandlers) HandleCloseViewAkun(c echo.Context) error {
|
||||
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")
|
||||
@@ -521,39 +577,34 @@ func (tdp *TabDaftarPesertaHandlers) HandleAkun(c echo.Context) error {
|
||||
|
||||
akunID := c.FormValue("akunpesertaid")
|
||||
akunEmail := c.FormValue("akunpesertaemail")
|
||||
akunPass := c.FormValue("akunpesertapass")
|
||||
akunPasscek := c.FormValue("akunpesertapasscek")
|
||||
oldPass := c.FormValue("akunpesertapassold")
|
||||
newPass := c.FormValue("akunpesertapassnew")
|
||||
newPasscek := c.FormValue("akunpesertapasscek")
|
||||
|
||||
formValidation := ""
|
||||
emailValidation := ""
|
||||
passValidation := ""
|
||||
pass2Validation := ""
|
||||
newValidation := ""
|
||||
cekValidation := ""
|
||||
|
||||
if strings.TrimSpace(akunEmail) == "" {
|
||||
formValidation = "Email tidak boleh kosong"
|
||||
emailValidation = "Email tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(akunPass) == "" {
|
||||
if strings.TrimSpace(newPass) == "" {
|
||||
formValidation = "Password tidak boleh kosong"
|
||||
passValidation = "Password tidak boleh kosong"
|
||||
newValidation = "Password tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(akunPasscek) == "" {
|
||||
if strings.TrimSpace(newPasscek) == "" {
|
||||
formValidation = "Password tidak boleh kosong"
|
||||
pass2Validation = "Password tidak boleh kosong"
|
||||
cekValidation = "Password tidak boleh kosong"
|
||||
}
|
||||
if strings.TrimSpace(akunEmail) == "" && strings.TrimSpace(akunPass) == "" && strings.TrimSpace(akunPasscek) == "" {
|
||||
formValidation = "Email dan Password tidak boleh kosong"
|
||||
emailValidation = "Email tidak boleh kosong"
|
||||
passValidation = "Password tidak boleh kosong"
|
||||
pass2Validation = "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(akunPass) != strings.TrimSpace(akunPasscek) {
|
||||
if strings.TrimSpace(newPass) != strings.TrimSpace(newPasscek) {
|
||||
formValidation = "Password tidak sama"
|
||||
passValidation = "Password tidak sama"
|
||||
pass2Validation = "Password tidak sama"
|
||||
newValidation = "Password tidak sama"
|
||||
cekValidation = "Password tidak sama"
|
||||
}
|
||||
|
||||
if formValidation != "" || emailValidation != "" || passValidation != "" || pass2Validation != "" {
|
||||
if formValidation != "" || newValidation != "" || cekValidation != "" {
|
||||
dialogAkunBody := corporate_mcudetail.ModalViewAkunBody(
|
||||
dialogAkunBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
@@ -565,28 +616,27 @@ func (tdp *TabDaftarPesertaHandlers) HandleAkun(c echo.Context) error {
|
||||
Value: akunID,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akunEmail,
|
||||
ErrorMsg: emailValidation,
|
||||
Label: "Email Akun",
|
||||
Name: "akunpesertaemail",
|
||||
Type: "text",
|
||||
ID: "akunpesertaemailid",
|
||||
Value: akunEmail,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password Akun",
|
||||
Name: "akunpesertapass",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassid",
|
||||
Value: akunPass,
|
||||
ErrorMsg: passValidation,
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
ErrorMsg: newValidation,
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ketik ulang password",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Value: akunPasscek,
|
||||
ErrorMsg: pass2Validation,
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan ulang password baru",
|
||||
ErrorMsg: cekValidation,
|
||||
},
|
||||
corporate_mcudetail.JsShowModal(""),
|
||||
)
|
||||
@@ -595,6 +645,51 @@ func (tdp *TabDaftarPesertaHandlers) HandleAkun(c echo.Context) error {
|
||||
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{
|
||||
@@ -611,26 +706,31 @@ func (tdp *TabDaftarPesertaHandlers) HandleAkun(c echo.Context) error {
|
||||
ID: "akunpesertaemailid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Password Akun",
|
||||
Name: "akunpesertapass",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassid",
|
||||
Label: "Password baru",
|
||||
Name: "akunpesertapassnew",
|
||||
Type: "password",
|
||||
ID: "akunpesertapassnewid",
|
||||
Placeholder: "Masukan password baru",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Ketik ulang password",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Label: "Ulangi password baru",
|
||||
Name: "akunpesertapasscek",
|
||||
Type: "password",
|
||||
ID: "akunpesertapasscekid",
|
||||
Placeholder: "Masukan ulang password baru",
|
||||
},
|
||||
corporate_mcudetail.JsHideModal("#"+dialogAkunID),
|
||||
)
|
||||
return utils.View(c, dialogAkunBody)
|
||||
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")
|
||||
@@ -656,6 +756,10 @@ func (tdp *TabDaftarPesertaHandlers) HandleContentReload(c echo.Context) error {
|
||||
"#"+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(
|
||||
@@ -663,7 +767,7 @@ func (tdp *TabDaftarPesertaHandlers) HandleContentReload(c echo.Context) error {
|
||||
currpage,
|
||||
"/corp/dashboard_pic/detail/"+id+"/tabdaftarpeserta/changepage",
|
||||
paginationID,
|
||||
"#tableID, #paginationID, #loading-parent, #loading-child, #loading-spinner, #loadingcontent, #dialogGenPassID, #dialogGenPassBodyID, #dialogAkunID, #dialogAkunBodyID, #dialogReportID, #dialogReportBodyID, #currPage"+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(),
|
||||
@@ -673,3 +777,29 @@ func (tdp *TabDaftarPesertaHandlers) HandleContentReload(c echo.Context) error {
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) {
|
||||
corp.POST("/dashboard_pic/detail/:id/tabdaftarpeserta/closeviewakun", daftarpesertaHandl.HandleCloseViewAkun)
|
||||
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)
|
||||
|
||||
// tab keuangan
|
||||
keuanganService := mcu_corporate_services.NewTabKeuanganServices(appStore)
|
||||
|
||||
@@ -14,7 +14,8 @@ type ModelMcuDaftarPeserta struct {
|
||||
Age string `db:"age"`
|
||||
AuthPatientEmail string `db:"authPatientEmail"`
|
||||
AuthPatientIsActive string `db:"authPatientIsActive"`
|
||||
Nama_Paket string `db:"nama_paket"`
|
||||
Test_Paket string `db:"test_paket"`
|
||||
List_Paket string `db:"list_paket"`
|
||||
}
|
||||
|
||||
type SoResultEntryReportModel struct {
|
||||
@@ -84,3 +85,20 @@ type ResumeMCU struct {
|
||||
Mcu_ResumeID string `db:"Mcu_ResumeID"`
|
||||
Datetime string `db:"Datetime"`
|
||||
}
|
||||
|
||||
type DetailPaketMCU struct {
|
||||
T_OrderDetailOrderT_PacketID string `db:"T_OrderDetailOrderT_PacketID"`
|
||||
T_OrderDetailOrderT_PacketName string `db:"T_OrderDetailOrderT_PacketName"`
|
||||
T_TestName string `db:"T_TestName"`
|
||||
}
|
||||
|
||||
type DetailTestMCU struct {
|
||||
T_OrderDetailOrderT_TestID string `db:"T_OrderDetailOrderT_TestID"`
|
||||
T_OrderDetailOrderT_TestName string `db:"T_OrderDetailOrderT_TestName"`
|
||||
}
|
||||
|
||||
type TableTestPaket struct {
|
||||
Nomor int
|
||||
NamaTest string
|
||||
NamaPaket string
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"io"
|
||||
"math"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
"go.uber.org/zap"
|
||||
@@ -42,34 +43,39 @@ func (tdps *TabDaftarPesertaServices) GetListDaftarPesertaMCU(id string, current
|
||||
}
|
||||
|
||||
query := `
|
||||
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'
|
||||
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,
|
||||
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 nama_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 = ?
|
||||
END AS jenisKelamin,
|
||||
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 = ?
|
||||
) x
|
||||
GROUP BY T_OrderHeaderID
|
||||
ORDER BY T_OrderHeaderLabNumber ASC
|
||||
LIMIT ? OFFSET ?
|
||||
`
|
||||
@@ -82,6 +88,62 @@ func (tdps *TabDaftarPesertaServices) GetListDaftarPesertaMCU(id string, current
|
||||
return listDaftarPeserta, totalPage, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) DetailTestdanPaket(orderheaderID string) ([]models.TableTestPaket, error) {
|
||||
var listPaket []models.DetailPaketMCU
|
||||
var listTest []models.DetailTestMCU
|
||||
var ret []models.TableTestPaket
|
||||
|
||||
// get list test name
|
||||
qr := `
|
||||
SELECT
|
||||
T_OrderDetailOrderT_TestID,
|
||||
T_OrderDetailOrderT_TestName
|
||||
FROM t_orderdetailorder
|
||||
WHERE T_OrderDetailOrderT_OrderHeaderID = ?
|
||||
AND T_OrderDetailOrderIsActive = 'Y'
|
||||
AND T_OrderDetailOrderIsPacket = 'N'
|
||||
`
|
||||
if err := dbx.Handlex.Select(&listTest, qr, orderheaderID); err != nil {
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// get detail paket
|
||||
q := `
|
||||
SELECT
|
||||
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'
|
||||
`
|
||||
if err := dbx.Handlex.Select(&listPaket, q, orderheaderID); err != nil {
|
||||
return ret, err
|
||||
}
|
||||
|
||||
nomor := 1
|
||||
for _, d := range listTest {
|
||||
ret = append(ret, models.TableTestPaket{
|
||||
Nomor: nomor,
|
||||
NamaTest: d.T_OrderDetailOrderT_TestName,
|
||||
NamaPaket: d.T_OrderDetailOrderT_TestName,
|
||||
})
|
||||
nomor++
|
||||
}
|
||||
|
||||
for _, d := range listPaket {
|
||||
ret = append(ret, models.TableTestPaket{
|
||||
Nomor: nomor,
|
||||
NamaTest: d.T_TestName,
|
||||
NamaPaket: d.T_OrderDetailOrderT_PacketName,
|
||||
})
|
||||
nomor++
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) GenerataPasswordMCU(mgmMCUID string, host string) (models.GeneratePasswordResponse, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret models.GeneratePasswordResponse
|
||||
@@ -109,7 +171,7 @@ func (tdps *TabDaftarPesertaServices) GenerataPasswordMCU(mgmMCUID string, host
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) GetAkunPeserta(patientID string) (models.AuthPatient, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
// logger, _ := zap.NewProduction()
|
||||
var ret models.AuthPatient
|
||||
|
||||
q := `
|
||||
@@ -126,7 +188,49 @@ func (tdps *TabDaftarPesertaServices) GetAkunPeserta(patientID string) (models.A
|
||||
if err := dbx.Handlex.Get(&ret, q, patientID); err != nil {
|
||||
return ret, fmt.Errorf("error get akun peserta")
|
||||
}
|
||||
logger.Info("response", zap.Any("data", ret))
|
||||
// logger.Info("response", zap.Any("data", ret))
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (tdps *TabDaftarPesertaServices) ResetPasswordPeserta(token string, newPassword string, email string, authuserid string) (models.ResponseStatus, error) {
|
||||
var ret models.ResponseStatus
|
||||
|
||||
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)
|
||||
|
||||
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()
|
||||
|
||||
resp, err := io.ReadAll(req.Body)
|
||||
if err != nil {
|
||||
ret = models.ResponseStatus{
|
||||
Status: "ERR",
|
||||
Message: "error read response",
|
||||
}
|
||||
return ret, err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(resp, &ret)
|
||||
if err != nil {
|
||||
ret = models.ResponseStatus{
|
||||
Status: "ERR",
|
||||
Message: "error unmarshal response",
|
||||
}
|
||||
return ret, err
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
@@ -104,14 +104,14 @@ templ ModalViewAkunBody(
|
||||
IDComponent string,
|
||||
akunID models.CustomTextFieldv2Prm,
|
||||
akunEmail models.CustomTextFieldv2Prm,
|
||||
akunPass models.CustomTextFieldv2Prm,
|
||||
akunPassCek 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(akunPass)
|
||||
@customtextfield.CustomTextFieldv2(akunPassCek)
|
||||
@customtextfield.CustomTextFieldv2(newPass)
|
||||
@customtextfield.CustomTextFieldv2(newPassCek)
|
||||
</div>
|
||||
}
|
||||
@@ -325,8 +325,8 @@ func ModalViewAkunBody(
|
||||
IDComponent string,
|
||||
akunID models.CustomTextFieldv2Prm,
|
||||
akunEmail models.CustomTextFieldv2Prm,
|
||||
akunPass models.CustomTextFieldv2Prm,
|
||||
akunPassCek 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) {
|
||||
@@ -379,11 +379,11 @@ func ModalViewAkunBody(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(akunPass).Render(ctx, templ_7745c5c3_Buffer)
|
||||
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(akunPassCek).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(newPassCek).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -13,10 +13,13 @@ templ TabDaftarPesertaScreen(
|
||||
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",
|
||||
@@ -51,6 +54,14 @@ templ TabDaftarPesertaScreen(
|
||||
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>
|
||||
@@ -75,6 +86,7 @@ templ TabDaftarPesertaScreen(
|
||||
@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>
|
||||
|
||||
@@ -23,10 +23,13 @@ func TabDaftarPesertaScreen(
|
||||
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,
|
||||
) 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)
|
||||
@@ -100,6 +103,20 @@ func TabDaftarPesertaScreen(
|
||||
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)
|
||||
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)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<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=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -107,7 +124,7 @@ func TabDaftarPesertaScreen(
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialogGenPassID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabdaftarpeserta.templ`, Line: 66, Col: 58}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabdaftarpeserta.templ`, Line: 77, Col: 58}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -133,6 +150,10 @@ func TabDaftarPesertaScreen(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = dialogDetail.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>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
|
||||
@@ -2,6 +2,7 @@ package corporate_mcudetail
|
||||
|
||||
import "cpone/component/table"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
|
||||
templ ContentLayout(
|
||||
@@ -25,6 +26,10 @@ templ TableDaftarPeserta(
|
||||
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"},
|
||||
@@ -38,6 +43,10 @@ templ TableDaftarPeserta(
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
))
|
||||
</div>
|
||||
}
|
||||
@@ -52,6 +61,10 @@ templ ItemRow(
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail string,
|
||||
) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
@@ -64,7 +77,7 @@ templ ItemRow(
|
||||
<td>{ v.M_PatientName }</td>
|
||||
<td>{ v.JenisKelamin }</td>
|
||||
<td>{ v.Age }</td>
|
||||
<td>{ v.Nama_Paket }</td>
|
||||
<td>{ v.List_Paket }</td>
|
||||
<td>
|
||||
@ItemAction(v,
|
||||
hxGetRpt,
|
||||
@@ -75,6 +88,10 @@ templ ItemRow(
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
@@ -91,17 +108,33 @@ templ ItemAction(
|
||||
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 }
|
||||
hx-include={ hxIncludeRpt }
|
||||
title="Laporan MCU"
|
||||
>
|
||||
<i class="flaticon-doc"></i>
|
||||
<i class="flaticon2-file"></i>
|
||||
</a>
|
||||
if data.AuthPatientEmail != "none" {
|
||||
<a
|
||||
@@ -111,6 +144,7 @@ templ ItemAction(
|
||||
hx-target={ hxTargetAcc }
|
||||
hx-swap={ hxSwapAcc }
|
||||
hx-include={ hxIncludeAcc }
|
||||
title="Ganti password peserta"
|
||||
>
|
||||
<i class="flaticon2-edit"></i>
|
||||
</a>
|
||||
@@ -126,10 +160,34 @@ templ ItemAction(
|
||||
<i class="flaticon2-edit"></i>
|
||||
</a>
|
||||
}
|
||||
// <a
|
||||
// class="btn btn-icon"
|
||||
// >
|
||||
// <i class="la la-shield icon-xl"></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>
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import "bytes"
|
||||
|
||||
import "cpone/component/table"
|
||||
import "cpone/models"
|
||||
import "strconv"
|
||||
|
||||
func ContentLayout(
|
||||
tablecomponent templ.Component,
|
||||
@@ -76,6 +77,10 @@ func TableDaftarPeserta(
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail 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)
|
||||
@@ -96,7 +101,7 @@ func TableDaftarPeserta(
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(tableID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 29, Col: 21}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 34, Col: 21}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -117,6 +122,10 @@ func TableDaftarPeserta(
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
)).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -142,6 +151,10 @@ func ItemRow(
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail 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 +182,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: 63, Col: 42}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 76, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -182,7 +195,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: 64, Col: 33}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 77, Col: 33}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -195,7 +208,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: 65, Col: 32}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 78, Col: 32}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -208,7 +221,7 @@ func ItemRow(
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(v.Age)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 66, Col: 23}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 79, Col: 23}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -219,9 +232,9 @@ func ItemRow(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(v.Nama_Paket)
|
||||
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: 67, Col: 30}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 80, Col: 30}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -240,6 +253,10 @@ func ItemRow(
|
||||
hxTargetAcc,
|
||||
hxIncludeAcc,
|
||||
hxSwapAcc,
|
||||
hxGetDetail,
|
||||
hxTargetDetail,
|
||||
hxIncludeDetail,
|
||||
hxSwapDetail,
|
||||
).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -266,6 +283,10 @@ func ItemAction(
|
||||
hxTargetAcc string,
|
||||
hxIncludeAcc string,
|
||||
hxSwapAcc string,
|
||||
hxGetDetail string,
|
||||
hxTargetDetail string,
|
||||
hxIncludeDetail string,
|
||||
hxSwapDetail 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)
|
||||
@@ -279,14 +300,14 @@ func ItemAction(
|
||||
templ_7745c5c3_Var11 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"row px-5 d-flex justify-content-around\"><a type=\"button\" class=\"btn btn-icon\" hx-get=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"row px-5 d-flex justify-content-around\"><a type=\"button\" class=\"btn btn-icon\" title=\"Detail test dan paket\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetRpt + "?idx=" + data.T_OrderHeaderID)
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetDetail + "?idx=" + data.T_OrderHeaderID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 99, Col: 61}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 121, Col: 64}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -297,9 +318,9 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetRpt)
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetDetail)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 100, Col: 35}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 122, Col: 38}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -310,9 +331,9 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapRpt)
|
||||
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: 101, Col: 31}
|
||||
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 {
|
||||
@@ -323,15 +344,67 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeRpt)
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeDetail)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 102, Col: 37}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 124, Col: 40}
|
||||
}
|
||||
_, 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=\"flaticon-doc\"></i></a> ")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><i class=\"flaticon2-list-1\"></i></a> <a type=\"button\" class=\"btn btn-icon\" 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)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 131, Col: 61}
|
||||
}
|
||||
_, 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("\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetRpt)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 132, Col: 35}
|
||||
}
|
||||
_, 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)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 134, Col: 37}
|
||||
}
|
||||
_, 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> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -340,67 +413,10 @@ func ItemAction(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, 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: 110, Col: 64}
|
||||
}
|
||||
_, 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("\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, 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: 111, Col: 39}
|
||||
}
|
||||
_, 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(hxSwapAcc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 112, Col: 35}
|
||||
}
|
||||
_, 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(hxIncludeAcc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 113, 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("\"><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=\"")
|
||||
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: 121, Col: 64}
|
||||
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 {
|
||||
@@ -413,7 +429,7 @@ func ItemAction(
|
||||
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: 122, Col: 39}
|
||||
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 {
|
||||
@@ -426,7 +442,7 @@ func ItemAction(
|
||||
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: 123, Col: 35}
|
||||
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 {
|
||||
@@ -439,12 +455,69 @@ func ItemAction(
|
||||
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: 124, Col: 41}
|
||||
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=\"")
|
||||
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)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 155, Col: 64}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var25 string
|
||||
templ_7745c5c3_Var25, 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: 156, Col: 39}
|
||||
}
|
||||
_, 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)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\mcu\mcutab\tabledaftarpeserta.templ`, Line: 158, Col: 41}
|
||||
}
|
||||
_, 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>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -460,3 +533,113 @@ func ItemAction(
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func TableDetailMCU(
|
||||
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 {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var28 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var28 == nil {
|
||||
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;\">")
|
||||
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),
|
||||
).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 DetailRow(
|
||||
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 {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var29 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var29 == nil {
|
||||
templ_7745c5c3_Var29 = templ.NopComponent
|
||||
}
|
||||
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>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
for _, v := range data {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
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}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
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_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}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
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_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}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||
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
|
||||
}
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -110,10 +110,12 @@ templ FormSignin(
|
||||
hx-post="/login/signin"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#kt_login"
|
||||
hx-indicator=".loginloading"
|
||||
type="button"
|
||||
id="kt_login_signin_submit"
|
||||
class="btn btn-block font-weight-bolder text-white font-size-h6 px-8 py-4 my-3 mr-3 mt-5 btn-primary"
|
||||
>
|
||||
<span class="htmx-indicator spinner-border spinner-border-sm loginloading" role="status" aria-hidden="true"></span>
|
||||
Sign In
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@ func FormSignin(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!--begin::Action--><div class=\"pb-lg-0 pb-5 pt-5\"><button hx-post=\"/login/signin\" hx-swap=\"outerHTML\" hx-target=\"#kt_login\" type=\"button\" id=\"kt_login_signin_submit\" class=\"btn btn-block font-weight-bolder text-white font-size-h6 px-8 py-4 my-3 mr-3 mt-5 btn-primary\">Sign In\r</button></div><!--end::Action--></form>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!--begin::Action--><div class=\"pb-lg-0 pb-5 pt-5\"><button hx-post=\"/login/signin\" hx-swap=\"outerHTML\" hx-target=\"#kt_login\" hx-indicator=\".loginloading\" type=\"button\" id=\"kt_login_signin_submit\" class=\"btn btn-block font-weight-bolder text-white font-size-h6 px-8 py-4 my-3 mr-3 mt-5 btn-primary\"><span class=\"htmx-indicator spinner-border spinner-border-sm loginloading\" role=\"status\" aria-hidden=\"true\"></span> Sign In\r</button></div><!--end::Action--></form>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user