progress
This commit is contained in:
@@ -24,6 +24,8 @@ type MDNonLabTemplateServices interface {
|
||||
GetMDNonLabTemplateData(search string, currentPage int, rowPerPage int) ([]models.MDNonLabTemplate, int, error)
|
||||
DeleteDataMDNLT(id string) (models.MDNonLabTemplate, error)
|
||||
GetMDNonLabTemplateByID(id string) (models.MDNonLabTemplate, error)
|
||||
SaveInMemoryDetail(kode string, name string) (models.MDNonLabTemplateDetail, error)
|
||||
ListMemoryDetail() ([]models.MDNonLabTemplateDetail, error)
|
||||
}
|
||||
|
||||
type MDNonLabTemplateHandler struct {
|
||||
@@ -123,6 +125,101 @@ func (mdnlt *MDNonLabTemplateHandler) HandleShowMDNonLabTemplateScreen(c echo.Co
|
||||
dev_mdnonlabtemplateview.AfterRequestContent(),
|
||||
)
|
||||
|
||||
// modal add detail
|
||||
// detailAddID := utils.GenerateRandomID("detailaddID")
|
||||
tableDetailID := utils.GenerateRandomID("tabledetailID")
|
||||
btnAddNamaID := utils.GenerateRandomID("btnaddnamaID")
|
||||
btnAddDetailID := utils.GenerateRandomID("btnaddDetailID")
|
||||
tableDetailPaginationID := utils.GenerateRandomID("tabledetailpaginationID")
|
||||
// dialogDetailEditID := utils.GenerateRandomID("dialogeditid")
|
||||
dialogDetailEditBodyID := utils.GenerateRandomID("dialogeditbodyid")
|
||||
// dialogDetailDeleteID := utils.GenerateRandomID("dialogdeleteid")
|
||||
dialogDetailDeleteBodyID := utils.GenerateRandomID("dialogdeletebodyid")
|
||||
|
||||
btnSimpanDetail := dev_mdnonlabtemplateview.BtnAddDetail()
|
||||
var listDetaill []models.MDNonLabTemplateDetail
|
||||
tableDetail := dev_mdnonlabtemplateview.TableDetail(listDetaill,
|
||||
tableDetailID,
|
||||
"/dev/md/nonlabtemplate/detailedit",
|
||||
"#"+dialogDetailEditBodyID,
|
||||
"outerHTML",
|
||||
"#dialogDetailEditBodyID, #dialogDetailEditID, #dialogDetailDeleteBodyID, #dialogDetailDeleteID",
|
||||
"/dev/md/nonlabtemplate/detaildelete",
|
||||
"#"+dialogDetailDeleteBodyID,
|
||||
"outerHTML",
|
||||
"#dialogDetailEditBodyID, #dialogDetailEditID, #dialogDetailDeleteBodyID, #dialogDetailDeleteID",
|
||||
)
|
||||
|
||||
dialogAddBodyComp := dev_mdnonlabtemplateview.BodyFormMDNonlabTemplate(
|
||||
dialogAddBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Non Lab Template Name",
|
||||
Name: "nonlabtemplateid",
|
||||
Placeholder: "Non Lab Template Name",
|
||||
Type: "hidden",
|
||||
ID: "nonlabtemplateid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Template Name",
|
||||
Name: "nonlabtemplatename",
|
||||
Placeholder: "Template Name",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatename",
|
||||
},
|
||||
models.CustomCheckboxv1Prm{
|
||||
Name: "nonlabtemplateflag",
|
||||
ID: "nonlabtemplateflag",
|
||||
Text: "Template Fisik",
|
||||
Value: "N",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
// Label: "Template Name",
|
||||
Name: "nonlabtemplatedetailkode",
|
||||
Placeholder: "Kode",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatedetailkode",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
// Label: "Template Name",
|
||||
Name: "nonlabtemplatedetailname",
|
||||
Placeholder: "Detail Name",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatedetailname",
|
||||
},
|
||||
btnSimpanDetail,
|
||||
tableDetail,
|
||||
dev_mdnonlabtemplateview.JSHideModal(""),
|
||||
)
|
||||
|
||||
modalActioAddComp := dev_mdnonlabtemplateview.ActionFormMDNLT(
|
||||
"/dev/md/nonlabtemplate/closeaddform",
|
||||
"#"+dialogAddBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogAddID,
|
||||
)
|
||||
|
||||
btnCloseModalAdd := dev_mdnonlabtemplateview.BtnCloseFormMDNLT(
|
||||
"/dev/md/nonlabtemplate/closeaddform",
|
||||
"#"+dialogAddBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogAddID,
|
||||
)
|
||||
|
||||
modalAddFormComponent := dev_mdnonlabtemplateview.NonLabTemplateModalForm(
|
||||
models.MDNonLabTemplateForm{
|
||||
IDComponent: "formnonlabtemplate",
|
||||
Link: "/dev/md/nonlabtemplate/add",
|
||||
HxTarget: "#" + dialogAddBodyID,
|
||||
HxSwap: "outerHTML",
|
||||
HxInclude: "#tableID, #paginationID, #searchID, #dialogAddBodyID, #dialogAddID, #dialogDeleteBodyID, #dialogEditBodyID, #" + searchID + ", #currpage" + paginationID,
|
||||
ModalID: dialogAddID,
|
||||
ModalTitle: "New - Nonlab Template",
|
||||
DialogBody: dialogAddBodyComp,
|
||||
DialogAction: modalActioAddComp,
|
||||
ButtonCLose: btnCloseModalAdd,
|
||||
},
|
||||
)
|
||||
|
||||
// modal delete form
|
||||
dialogDeleteComp := dev_mdnonlabtemplateview.BodyFormMDNonlabTemplate(
|
||||
dialogDeleteBodyID,
|
||||
@@ -141,11 +238,27 @@ func (mdnlt *MDNonLabTemplateHandler) HandleShowMDNonLabTemplateScreen(c echo.Co
|
||||
ID: "nonlabtemplatename",
|
||||
},
|
||||
models.CustomCheckboxv1Prm{
|
||||
Label: "Non Lab Template Flag Fisik",
|
||||
Name: "nonlabtemplateflag",
|
||||
ID: "nonlabtemplateflag",
|
||||
Text: "Template Fisik",
|
||||
Value: "N",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
// Label: "Template Name",
|
||||
Name: "nonlabtemplatedetailkode",
|
||||
Placeholder: "Kode",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatedetailkode",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
// Label: "Template Name",
|
||||
Name: "nonlabtemplatedetailname",
|
||||
Placeholder: "Detail Name",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatedetailname",
|
||||
},
|
||||
btnSimpanDetail,
|
||||
tableDetail,
|
||||
dev_mdnonlabtemplateview.JSHideModal(""),
|
||||
)
|
||||
|
||||
@@ -188,10 +301,15 @@ func (mdnlt *MDNonLabTemplateHandler) HandleShowMDNonLabTemplateScreen(c echo.Co
|
||||
dialogEditBodyID,
|
||||
dialogDeleteID,
|
||||
dialogDeleteBodyID,
|
||||
btnAddNamaID,
|
||||
btnAddDetailID,
|
||||
tableDetailID,
|
||||
tableDetailPaginationID,
|
||||
breadcrumbComp,
|
||||
tableFilter,
|
||||
tableComp,
|
||||
tablePagination,
|
||||
modalAddFormComponent,
|
||||
modalDeleteFormComponent,
|
||||
)
|
||||
css := dev_mdnonlabtemplateview.CSSMDNonLabTemplate()
|
||||
@@ -310,6 +428,76 @@ func (mdnlt *MDNonLabTemplateHandler) HandleChangePageMDNonLabTemplate(c echo.Co
|
||||
return utils.ViewMulti(c, retval)
|
||||
}
|
||||
|
||||
// handle add
|
||||
func (mdnlt *MDNonLabTemplateHandler) HandleCloseFormAdd(c echo.Context) error {
|
||||
// logger, _ := zap.NewProduction()
|
||||
dialogAddBodyID := c.FormValue("dialogAddBodyID")
|
||||
// detailAddID := c.FormValue("detailAddID")
|
||||
|
||||
tableDetailID := utils.GenerateRandomID("tabledetailID")
|
||||
// dialogDetailEditID := utils.GenerateRandomID("dialogeditid")
|
||||
dialogDetailEditBodyID := utils.GenerateRandomID("dialogeditbodyid")
|
||||
// dialogDetailDeleteID := utils.GenerateRandomID("dialogdeleteid")
|
||||
dialogDetailDeleteBodyID := utils.GenerateRandomID("dialogdeletebodyid")
|
||||
|
||||
btnSimpanDetail := dev_mdnonlabtemplateview.BtnAddDetail()
|
||||
|
||||
var listDetaill []models.MDNonLabTemplateDetail
|
||||
tableDetail := dev_mdnonlabtemplateview.TableDetail(listDetaill,
|
||||
tableDetailID,
|
||||
"/dev/md/nonlabtemplate/detailedit",
|
||||
"#"+dialogDetailEditBodyID,
|
||||
"outerHTML",
|
||||
"#dialogDetailEditBodyID, #dialogDetailEditID, #dialogDetailDeleteBodyID, #dialogDetailDeleteID",
|
||||
"/dev/md/nonlabtemplate/detaildelete",
|
||||
"#"+dialogDetailDeleteBodyID,
|
||||
"outerHTML",
|
||||
"#dialogDetailEditBodyID, #dialogDetailEditID, #dialogDetailDeleteBodyID, #dialogDetailDeleteID",
|
||||
)
|
||||
|
||||
newForm := dev_mdnonlabtemplateview.BodyFormMDNonlabTemplate(
|
||||
dialogAddBodyID,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Non Lab Template Name",
|
||||
Name: "nonlabtemplateid",
|
||||
Placeholder: "Non Lab Template Name",
|
||||
Type: "hidden",
|
||||
ID: "nonlabtemplateid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Non Lab Template Name",
|
||||
Name: "nonlabtemplatename",
|
||||
Placeholder: "Non Lab Template Name",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatename",
|
||||
},
|
||||
models.CustomCheckboxv1Prm{
|
||||
Name: "nonlabtemplateflag",
|
||||
ID: "nonlabtemplateflag",
|
||||
Text: "Template Fisik",
|
||||
Value: "N",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
// Label: "Template Name",
|
||||
Name: "nonlabtemplatedetailkode",
|
||||
Placeholder: "Kode",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatedetailkode",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
// Label: "Template Name",
|
||||
Name: "nonlabtemplatedetailname",
|
||||
Placeholder: "Detail Name",
|
||||
Type: "text",
|
||||
ID: "nonlabtemplatedetailname",
|
||||
},
|
||||
btnSimpanDetail,
|
||||
tableDetail,
|
||||
dev_mdnonlabtemplateview.JSHideModal(""),
|
||||
)
|
||||
return utils.View(c, newForm)
|
||||
}
|
||||
|
||||
// handle delete
|
||||
func (mdnlt *MDNonLabTemplateHandler) HandleOpenFormDelete(c echo.Context) error {
|
||||
id := c.QueryParam("id")
|
||||
@@ -438,3 +626,57 @@ func (mdnlt *MDNonLabTemplateHandler) HandleDeleteMDNLT(c echo.Context) error {
|
||||
|
||||
return utils.ViewMulti(c, retVal)
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateHandler) HandleAddDetail(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
defer logger.Sync()
|
||||
|
||||
nonlabtemplatedetailkode := c.FormValue("nonlabtemplatedetailkode")
|
||||
nonlabtemplatedetailname := c.FormValue("nonlabtemplatedetailname")
|
||||
|
||||
tableDetailID := c.FormValue("tableDetailID")
|
||||
// dialogDetailEditID := utils.GenerateRandomID("dialogeditid")
|
||||
dialogDetailEditBodyID := utils.GenerateRandomID("dialogeditbodyid")
|
||||
// dialogDetailDeleteID := utils.GenerateRandomID("dialogdeleteid")
|
||||
dialogDetailDeleteBodyID := utils.GenerateRandomID("dialogdeletebodyid")
|
||||
|
||||
respAdd, err := mdnlt.MDNonLabTemplateServices.SaveInMemoryDetail(nonlabtemplatedetailkode, nonlabtemplatedetailname)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logger.Info("response save memory", zap.Any("return", respAdd))
|
||||
|
||||
updatedTable, err := mdnlt.MDNonLabTemplateServices.ListMemoryDetail()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tableComponent := dev_mdnonlabtemplateview.TableDetail(updatedTable,
|
||||
tableDetailID,
|
||||
"/dev/md/nonlabtemplate/detailedit",
|
||||
"#"+dialogDetailEditBodyID,
|
||||
"outerHTML",
|
||||
"#dialogDetailEditBodyID, #dialogDetailEditID, #dialogDetailDeleteBodyID, #dialogDetailDeleteID",
|
||||
"/dev/md/nonlabtemplate/detaildelete",
|
||||
"#"+dialogDetailDeleteBodyID,
|
||||
"outerHTML",
|
||||
"#dialogDetailEditBodyID, #dialogDetailEditID, #dialogDetailDeleteBodyID, #dialogDetailDeleteID",
|
||||
)
|
||||
|
||||
return utils.View(c, tableComponent)
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateHandler) HandleAddNama(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
nama := c.FormValue("nonlabtemplatename")
|
||||
fisik := c.FormValue("nonlabtemplateflag")
|
||||
|
||||
logger.Info("Test Button Add nama",
|
||||
zap.Any("nama", nama),
|
||||
zap.Any("flag", fisik),
|
||||
)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -287,6 +287,8 @@ func SetupRoutesDev(app *echo.Echo, appStore db.AppStore) {
|
||||
dev.GET("/md/nonlabtemplate/opendelete", devMDMRNonLabTemplateHandler.HandleOpenFormDelete)
|
||||
dev.POST("/md/nonlabtemplate/closedeleteform", devMDMRNonLabTemplateHandler.HandleCloseFormDelete)
|
||||
dev.POST("/md/nonlabtemplate/delete", devMDMRNonLabTemplateHandler.HandleDeleteMDNLT)
|
||||
dev.POST("/md/nonlabtemplate/closeaddform", devMDMRNonLabTemplateHandler.HandleCloseFormAdd)
|
||||
dev.POST("/md/nonlabtemplate/addnama", devMDMRNonLabTemplateHandler.HandleAddNama)
|
||||
|
||||
// masterdata nat unit
|
||||
devMdNatUnitServices := dev_services.NewMdNatUnitServices(appStore)
|
||||
|
||||
@@ -15,6 +15,21 @@ type MDNonLabTemplate struct {
|
||||
NonlabTemplateDeleteUserID string `db:"NonlabTemplateDeleteUserID"`
|
||||
}
|
||||
|
||||
type MDNonLabTemplateDetail struct {
|
||||
NonlabTemplateDetailID int `db:"NonlabTemplateDetailID"`
|
||||
NonlabTemplateDetailNonlabTemplateID int `db:"NonlabTemplateDetailNonlabTemplateID"`
|
||||
NonlabTemplateDetailCode string `db:"NonlabTemplateDetailCode"`
|
||||
NonlabTemplateDetailName string `db:"NonlabTemplateDetailName"`
|
||||
NonlabTemplateDetailFlagActive string `db:"NonlabTemplateDetailFlagActive"`
|
||||
NonlabTemplateDetailIsActive string `db:"NonlabTemplateDetailIsActive"`
|
||||
}
|
||||
|
||||
type InputDetailNonLabTemplate struct {
|
||||
NonLabTemplateName string `db:"NonlabTemplateName"`
|
||||
NonLabTemplateFlagFisik string `db:"NonlabTemplateFlagFisik"`
|
||||
NonLabTemplatDetail []MDNonLabTemplateDetail
|
||||
}
|
||||
|
||||
type MDNonLabTemplateForm struct {
|
||||
IDComponent string
|
||||
Link string
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
dbx "cpone/package/database"
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"go.uber.org/zap"
|
||||
@@ -13,11 +14,34 @@ import (
|
||||
|
||||
type MDNonLabTemplateServices struct {
|
||||
MDNonLabTemplateStore db.AppStore
|
||||
DetailStore []models.MDNonLabTemplateDetail
|
||||
addChan chan models.MDNonLabTemplateDetail
|
||||
delChan chan models.MDNonLabTemplateDetail
|
||||
}
|
||||
|
||||
func NewMDNonLabTemplateServices(uStore db.AppStore) *MDNonLabTemplateServices {
|
||||
return &MDNonLabTemplateServices{
|
||||
aChan := make(chan models.MDNonLabTemplateDetail)
|
||||
dChan := make(chan models.MDNonLabTemplateDetail)
|
||||
|
||||
serv := MDNonLabTemplateServices{
|
||||
MDNonLabTemplateStore: uStore,
|
||||
DetailStore: []models.MDNonLabTemplateDetail{},
|
||||
addChan: aChan,
|
||||
delChan: dChan,
|
||||
}
|
||||
|
||||
go serv.runner()
|
||||
return &serv
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateServices) runner() {
|
||||
for {
|
||||
select {
|
||||
case x := <-mdnlt.addChan:
|
||||
mdnlt.DetailStore = append(mdnlt.DetailStore, x)
|
||||
case y := <-mdnlt.delChan:
|
||||
mdnlt.DetailStore = append(mdnlt.DetailStore, y)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +136,109 @@ func (mdnlt *MDNonLabTemplateServices) GetMDNonLabTemplateByID(id string) (model
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateServices) GetListingDetailByID(id string) ([]models.MDNonLabTemplateDetail, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret []models.MDNonLabTemplateDetail
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
NonlabTemplateDetailID,
|
||||
NonlabTemplateDetailNonlabTemplateID,
|
||||
NonlabTemplateDetailCode,
|
||||
NonlabTemplateDetailName,
|
||||
NonlabTemplateDetailIsActive
|
||||
FROM nonlab_template_detail
|
||||
WHERE NonlabTemplateDetailIsActive = 'Y'
|
||||
AND NonlabTemplateDetailNonlabTemplateID = ?
|
||||
`
|
||||
|
||||
if err := dbx.Handlex.Select(&ret, q, id); err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("Error get detail",
|
||||
zap.String("ID", id),
|
||||
zap.Error(err),
|
||||
)
|
||||
return nil, fmt.Errorf("error get list detail: %v", err)
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateServices) AddDataMDNLT(input models.InputDetailNonLabTemplate) (models.MDNonLabTemplate, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret models.MDNonLabTemplate
|
||||
|
||||
// cek duplicate non lab template name
|
||||
var count int
|
||||
prm := "%" + input.NonLabTemplateName + "%"
|
||||
q := `SELECT COUNT(*) FROM nonlab_template WHERE NonlabTemplateIsActive = 'Y' AND NonlabTemplateName LIKE ?`
|
||||
err := dbx.Handlex.Get(&count, q, prm)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("cek duplicate", zap.Any("name", input.NonLabTemplateName))
|
||||
return ret, fmt.Errorf("query failed to cek duplicate")
|
||||
}
|
||||
if count > 0 {
|
||||
defer logger.Sync()
|
||||
logger.Error("duplicate data", zap.Any("name", input.NonLabTemplateName))
|
||||
return ret, fmt.Errorf("duplicate code or name")
|
||||
}
|
||||
|
||||
// insert data
|
||||
tx, err := dbx.Handlex.Beginx()
|
||||
if err != nil {
|
||||
return ret, err
|
||||
}
|
||||
defer tx.Rollback()
|
||||
|
||||
qnlt := `
|
||||
INSERT INTO nonlab_template (
|
||||
NonlabTemplateName,
|
||||
NonlabTemplateFlagFisik,
|
||||
NonlabTemplateCreated
|
||||
) VALUES (?,?,NOW());
|
||||
`
|
||||
rsp := tx.MustExec(qnlt, input.NonLabTemplateName, input.NonLabTemplateFlagFisik)
|
||||
insertedID, err := rsp.LastInsertId()
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Error("failed insert data template", zap.Any("name", input.NonLabTemplateName), zap.Any("flag fisik", input.NonLabTemplateFlagFisik))
|
||||
return ret, fmt.Errorf("query failed insert data template")
|
||||
}
|
||||
|
||||
qry, err := tx.Preparex(`
|
||||
INSERT INTO nonlab_template_detail (
|
||||
NonlabTemplateDetailNonlabTemplateID,
|
||||
NonlabTemplateDetailCode,
|
||||
NonlabTemplateDetailName,
|
||||
NonlabTemplateDetailFlagActive
|
||||
) VALUES (?,?,?,?)
|
||||
`)
|
||||
if err != nil {
|
||||
return ret, fmt.Errorf("query failed: %v", err)
|
||||
}
|
||||
defer qry.Close()
|
||||
|
||||
for _, detail := range input.NonLabTemplatDetail {
|
||||
_, err := qry.Exec(
|
||||
insertedID,
|
||||
detail.NonlabTemplateDetailCode,
|
||||
detail.NonlabTemplateDetailName,
|
||||
detail.NonlabTemplateDetailFlagActive,
|
||||
)
|
||||
if err != nil {
|
||||
return ret, fmt.Errorf("query insert detail failed: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err := tx.Commit(); err != nil {
|
||||
return ret, fmt.Errorf("commit query failed: %v", err)
|
||||
}
|
||||
|
||||
s := strconv.Itoa(int(insertedID))
|
||||
return mdnlt.GetMDNonLabTemplateByID(s)
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateServices) DeleteDataMDNLT(id string) (models.MDNonLabTemplate, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret models.MDNonLabTemplate
|
||||
@@ -133,3 +260,18 @@ func (mdnlt *MDNonLabTemplateServices) DeleteDataMDNLT(id string) (models.MDNonL
|
||||
|
||||
return mdnlt.GetMDNonLabTemplateByID(id)
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateServices) SaveInMemoryDetail(kode string, name string) (models.MDNonLabTemplateDetail, error) {
|
||||
data := models.MDNonLabTemplateDetail{
|
||||
NonlabTemplateDetailCode: kode,
|
||||
NonlabTemplateDetailName: name,
|
||||
}
|
||||
|
||||
mdnlt.addChan <- data
|
||||
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func (mdnlt *MDNonLabTemplateServices) ListMemoryDetail() ([]models.MDNonLabTemplateDetail, error) {
|
||||
return mdnlt.DetailStore, nil
|
||||
}
|
||||
|
||||
@@ -14,10 +14,15 @@ templ MDNonLabTemplateScreen(
|
||||
dialogEditBodyID string,
|
||||
dialogDeleteID string,
|
||||
dialogDeleteBodyID string,
|
||||
btnAddNamaID string,
|
||||
btnAddDetailID string,
|
||||
tableDetailID string,
|
||||
tableDetailPaginationID string,
|
||||
breadcrumb templ.Component,
|
||||
filterComponent templ.Component,
|
||||
tableComponent templ.Component,
|
||||
paginationComponent templ.Component,
|
||||
modalAddForm templ.Component,
|
||||
modalDeleteForm templ.Component,
|
||||
) {
|
||||
<div class="container-fluid">
|
||||
@@ -57,6 +62,22 @@ templ MDNonLabTemplateScreen(
|
||||
Name: "dialogDeleteBodyID",
|
||||
Type: "hidden",
|
||||
Value: dialogDeleteBodyID,})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "btnAddNamaID",
|
||||
Name: "btnAddNamaID",
|
||||
Type: "hidden",
|
||||
Value: btnAddNamaID,})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "btnAddDetailID",
|
||||
Name: "btnAddDetailID",
|
||||
Type: "hidden",
|
||||
Value: btnAddDetailID,})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableDetailID",
|
||||
Name: "tableDetailID",
|
||||
Type: "hidden",
|
||||
Value: tableDetailID,})
|
||||
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableDetailPaginationID",
|
||||
Name: "tableDetailPaginationID",
|
||||
Type: "hidden",
|
||||
Value: tableDetailPaginationID,})
|
||||
<div class="row align-items-center mb-10">
|
||||
<div class="col-md-10 col-sm-12 p-0">
|
||||
@breadcrumb
|
||||
@@ -84,6 +105,7 @@ templ MDNonLabTemplateScreen(
|
||||
<div id="loading-parent" class="rounded">
|
||||
@tableComponent
|
||||
@paginationComponent
|
||||
@modalAddForm
|
||||
@modalDeleteForm
|
||||
<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">
|
||||
|
||||
@@ -24,10 +24,15 @@ func MDNonLabTemplateScreen(
|
||||
dialogEditBodyID string,
|
||||
dialogDeleteID string,
|
||||
dialogDeleteBodyID string,
|
||||
btnAddNamaID string,
|
||||
btnAddDetailID string,
|
||||
tableDetailID string,
|
||||
tableDetailPaginationID string,
|
||||
breadcrumb templ.Component,
|
||||
filterComponent templ.Component,
|
||||
tableComponent templ.Component,
|
||||
paginationComponent templ.Component,
|
||||
modalAddForm templ.Component,
|
||||
modalDeleteForm templ.Component,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
@@ -109,6 +114,34 @@ func MDNonLabTemplateScreen(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "btnAddNamaID",
|
||||
Name: "btnAddNamaID",
|
||||
Type: "hidden",
|
||||
Value: btnAddNamaID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "btnAddDetailID",
|
||||
Name: "btnAddDetailID",
|
||||
Type: "hidden",
|
||||
Value: btnAddDetailID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableDetailID",
|
||||
Name: "tableDetailID",
|
||||
Type: "hidden",
|
||||
Value: tableDetailID}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableDetailPaginationID",
|
||||
Name: "tableDetailPaginationID",
|
||||
Type: "hidden",
|
||||
Value: tableDetailPaginationID}).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 mb-10\"><div class=\"col-md-10 col-sm-12 p-0\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -124,7 +157,7 @@ func MDNonLabTemplateScreen(
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialogAddID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplate.templ`, Line: 70, Col: 55}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplate.templ`, Line: 91, Col: 55}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -137,7 +170,7 @@ func MDNonLabTemplateScreen(
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs("#" + dialogAddID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplate.templ`, Line: 79, Col: 51}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplate.templ`, Line: 100, Col: 51}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -163,6 +196,10 @@ func MDNonLabTemplateScreen(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = modalAddForm.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = modalDeleteForm.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
|
||||
110
views/dev/mdnonlabtemplate/mdnonlabtemplatedetailtable.templ
Normal file
110
views/dev/mdnonlabtemplate/mdnonlabtemplatedetailtable.templ
Normal file
@@ -0,0 +1,110 @@
|
||||
package dev_mdnonlabtemplateview
|
||||
|
||||
import "cpone/models"
|
||||
import "cpone/component/table"
|
||||
import "strconv"
|
||||
|
||||
templ TableDetail(data []models.MDNonLabTemplateDetail,
|
||||
tableID string,
|
||||
hxGetEdit string,
|
||||
hxTargetEdit string,
|
||||
hxSwapEdit string,
|
||||
hxIncludeEdit string,
|
||||
hxGetDelete string,
|
||||
hxTargetDelete string,
|
||||
hxSwapDelete string,
|
||||
hxIncludeDelete string,
|
||||
|
||||
) {
|
||||
<div id={ tableID } hx-swap-oob="true">
|
||||
@tablecomponent.TableV3([]string{"KODE", "TEST", "AKSI"},
|
||||
[]string{"20%","60%","20%"},
|
||||
RowTableDetail(data,
|
||||
hxGetEdit,
|
||||
hxTargetEdit,
|
||||
hxSwapEdit,
|
||||
hxIncludeEdit,
|
||||
hxGetDelete,
|
||||
hxTargetDelete,
|
||||
hxSwapDelete,
|
||||
hxIncludeDelete,
|
||||
))
|
||||
</div>
|
||||
}
|
||||
|
||||
templ RowTableDetail(data []models.MDNonLabTemplateDetail,
|
||||
hxGetEdit string,
|
||||
hxTargetEdit string,
|
||||
hxSwapEdit string,
|
||||
hxIncludeEdit string,
|
||||
hxGetDelete string,
|
||||
hxTargetDelete string,
|
||||
hxSwapDelete string,
|
||||
hxIncludeDelete string,
|
||||
) {
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">Belum ada data</td>
|
||||
</tr>
|
||||
}
|
||||
for _, d := range data {
|
||||
<tr>
|
||||
<td>{ d.NonlabTemplateDetailCode }</td>
|
||||
<td>{ d.NonlabTemplateDetailName }</td>
|
||||
<td>
|
||||
@ActionTableDetail(d.NonlabTemplateDetailID,
|
||||
hxGetEdit,
|
||||
hxTargetEdit,
|
||||
hxSwapEdit,
|
||||
hxIncludeEdit,
|
||||
hxGetDelete,
|
||||
hxTargetDelete,
|
||||
hxSwapDelete,
|
||||
hxIncludeDelete,
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
templ ActionTableDetail(id int,
|
||||
hxGetEdit string,
|
||||
hxTargetEdit string,
|
||||
hxSwapEdit string,
|
||||
hxIncludeEdit string,
|
||||
hxGetDelete string,
|
||||
hxTargetDelete string,
|
||||
hxSwapDelete string,
|
||||
hxIncludeDelete string,
|
||||
) {
|
||||
<div class="row px-5 d-flex justify-content-around">
|
||||
<a
|
||||
type="button"
|
||||
class="btnactionnlt col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-tosca mb-2 btn-sm"
|
||||
hx-get={ hxGetDelete + "?id=" + strconv.Itoa(id) }
|
||||
hx-target={ hxTargetDelete }
|
||||
hx-swap={ hxSwapDelete }
|
||||
hx-include={ hxIncludeDelete }
|
||||
hx-indicator={ "#spnrdel" + strconv.Itoa(id) }
|
||||
hx-on::before-request={ HandleBeforeRequestRow(strconv.Itoa(id)) }
|
||||
hx-on::after-request={ HandleAfterRequestRow(strconv.Itoa(id)) }
|
||||
>
|
||||
<span id={ "spnrdel" + strconv.Itoa(id) } class="htmx-indicator spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
<i class="flaticon2-trash"></i>
|
||||
</a>
|
||||
<a
|
||||
type="button"
|
||||
class="btnactiongr col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-tosca mb-2 btn-sm"
|
||||
hx-get={ hxGetEdit + "?id=" + strconv.Itoa(id) }
|
||||
hx-target={ hxTargetEdit }
|
||||
hx-swap={ hxSwapEdit }
|
||||
hx-include={ hxIncludeEdit }
|
||||
hx-indicator={ "#spnredt" + strconv.Itoa(id) }
|
||||
hx-on::before-request={ HandleBeforeRequestRow(strconv.Itoa(id)) }
|
||||
hx-on::after-request={ HandleAfterRequestRow(strconv.Itoa(id)) }
|
||||
>
|
||||
<span id={ "spnredt" + strconv.Itoa(id) } class="htmx-indicator spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
Pilih
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
407
views/dev/mdnonlabtemplate/mdnonlabtemplatedetailtable_templ.go
Normal file
407
views/dev/mdnonlabtemplate/mdnonlabtemplatedetailtable_templ.go
Normal file
@@ -0,0 +1,407 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package dev_mdnonlabtemplateview
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
import "cpone/models"
|
||||
import "cpone/component/table"
|
||||
import "strconv"
|
||||
|
||||
func TableDetail(data []models.MDNonLabTemplateDetail,
|
||||
tableID string,
|
||||
hxGetEdit string,
|
||||
hxTargetEdit string,
|
||||
hxSwapEdit string,
|
||||
hxIncludeEdit string,
|
||||
hxGetDelete string,
|
||||
hxTargetDelete string,
|
||||
hxSwapDelete string,
|
||||
hxIncludeDelete 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_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 id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(tableID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 19, Col: 21}
|
||||
}
|
||||
_, 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-swap-oob=\"true\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecomponent.TableV3([]string{"KODE", "TEST", "AKSI"},
|
||||
[]string{"20%", "60%", "20%"},
|
||||
RowTableDetail(data,
|
||||
hxGetEdit,
|
||||
hxTargetEdit,
|
||||
hxSwapEdit,
|
||||
hxIncludeEdit,
|
||||
hxGetDelete,
|
||||
hxTargetDelete,
|
||||
hxSwapDelete,
|
||||
hxIncludeDelete,
|
||||
)).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 RowTableDetail(data []models.MDNonLabTemplateDetail,
|
||||
hxGetEdit string,
|
||||
hxTargetEdit string,
|
||||
hxSwapEdit string,
|
||||
hxIncludeEdit string,
|
||||
hxGetDelete string,
|
||||
hxTargetDelete string,
|
||||
hxSwapDelete string,
|
||||
hxIncludeDelete string,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var3 == nil {
|
||||
templ_7745c5c3_Var3 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if len(data) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td colspan=\"3\" class=\"text-center\">Belum ada data</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
for _, d := range data {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(d.NonlabTemplateDetailCode)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 52, Col: 44}
|
||||
}
|
||||
_, 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("</td><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(d.NonlabTemplateDetailName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 53, Col: 44}
|
||||
}
|
||||
_, 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
|
||||
}
|
||||
templ_7745c5c3_Err = ActionTableDetail(d.NonlabTemplateDetailID,
|
||||
hxGetEdit,
|
||||
hxTargetEdit,
|
||||
hxSwapEdit,
|
||||
hxIncludeEdit,
|
||||
hxGetDelete,
|
||||
hxTargetDelete,
|
||||
hxSwapDelete,
|
||||
hxIncludeDelete,
|
||||
).Render(ctx, templ_7745c5c3_Buffer)
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
func ActionTableDetail(id int,
|
||||
hxGetEdit string,
|
||||
hxTargetEdit string,
|
||||
hxSwapEdit string,
|
||||
hxIncludeEdit string,
|
||||
hxGetDelete string,
|
||||
hxTargetDelete string,
|
||||
hxSwapDelete string,
|
||||
hxIncludeDelete 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_Var6 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var6 == nil {
|
||||
templ_7745c5c3_Var6 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"row px-5 d-flex justify-content-around\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, HandleBeforeRequestRow(strconv.Itoa(id)), HandleAfterRequestRow(strconv.Itoa(id)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a type=\"button\" class=\"btnactionnlt col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-tosca mb-2 btn-sm\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetDelete + "?id=" + strconv.Itoa(id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 84, Col: 60}
|
||||
}
|
||||
_, 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=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetDelete)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 85, Col: 38}
|
||||
}
|
||||
_, 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-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapDelete)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 86, Col: 34}
|
||||
}
|
||||
_, 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-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeDelete)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 87, Col: 40}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-indicator=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs("#spnrdel" + strconv.Itoa(id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 88, Col: 56}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-on::before-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 templ.ComponentScript = HandleBeforeRequestRow(strconv.Itoa(id))
|
||||
_, 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-on::after-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 templ.ComponentScript = HandleAfterRequestRow(strconv.Itoa(id))
|
||||
_, 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("\"><span id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs("spnrdel" + strconv.Itoa(id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 92, Col: 51}
|
||||
}
|
||||
_, 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("\" class=\"htmx-indicator spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span> <i class=\"flaticon2-trash\"></i></a> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, HandleBeforeRequestRow(strconv.Itoa(id)), HandleAfterRequestRow(strconv.Itoa(id)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a type=\"button\" class=\"btnactiongr col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-tosca mb-2 btn-sm\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(hxGetEdit + "?id=" + strconv.Itoa(id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 98, Col: 49}
|
||||
}
|
||||
_, 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-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(hxTargetEdit)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 99, Col: 27}
|
||||
}
|
||||
_, 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-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapEdit)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 100, Col: 23}
|
||||
}
|
||||
_, 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-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(hxIncludeEdit)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 101, Col: 29}
|
||||
}
|
||||
_, 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-indicator=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs("#spnredt" + strconv.Itoa(id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 102, Col: 47}
|
||||
}
|
||||
_, 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("\" hx-on::before-request=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var20 templ.ComponentScript = HandleBeforeRequestRow(strconv.Itoa(id))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20.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_Var21 templ.ComponentScript = HandleAfterRequestRow(strconv.Itoa(id))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><span id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs("spnredt" + strconv.Itoa(id))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatedetailtable.templ`, Line: 106, Col: 51}
|
||||
}
|
||||
_, 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("\" class=\"htmx-indicator spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span> Pilih\r</a></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
|
||||
})
|
||||
}
|
||||
@@ -65,19 +65,64 @@ templ BodyFormMDNonlabTemplate(
|
||||
inputID models.CustomTextFieldv2Prm,
|
||||
inputName models.CustomTextFieldv2Prm,
|
||||
flagFisik models.CustomCheckboxv1Prm,
|
||||
kodeDetail models.CustomTextFieldv2Prm,
|
||||
namaDetail models.CustomTextFieldv2Prm,
|
||||
btnDetail templ.Component,
|
||||
tableDetail templ.Component,
|
||||
hxOnLoad templ.ComponentScript,
|
||||
) {
|
||||
<div id={ componentID } hx-on::load={ hxOnLoad }>
|
||||
@customtextfield.CustomTextFieldv2(inputID)
|
||||
<div class="col-8">
|
||||
@customtextfield.CustomTextFieldv2(inputName)
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
@customtextfield.CustomTextFieldv2(inputName)
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@customcheckbox.MainCustomCheckboxInput(flagFisik)
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@customcheckbox.MainCustomCheckboxInput(flagFisik)
|
||||
<div class="row align-items-center">
|
||||
<div class="col-3">
|
||||
@customtextfield.CustomTextFieldv2(kodeDetail)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
@customtextfield.CustomTextFieldv2(namaDetail)
|
||||
</div>
|
||||
<div class="col-1">
|
||||
@btnDetail
|
||||
</div>
|
||||
</div>
|
||||
<h6 class="font-weight-bold">Detail Hasil</h6>
|
||||
@tableDetail
|
||||
</div>
|
||||
}
|
||||
|
||||
templ BtnAddNama(
|
||||
btnAddNamaID string,
|
||||
) {
|
||||
<button
|
||||
type="button"
|
||||
class="btn btnaddnama btn-outline-secondary font-weight-bolder rounded-lg"
|
||||
aria-label="Add Detail"
|
||||
data-target={ "#"+btnAddNamaID }
|
||||
>
|
||||
Simpan
|
||||
</button>
|
||||
}
|
||||
|
||||
templ BtnAddDetail(
|
||||
btnAddNamaID string,
|
||||
) {
|
||||
<button
|
||||
type="button"
|
||||
class="btn btnadddetail"
|
||||
aria-label="Add Detail"
|
||||
data-targer={ "#"+btnAddNamaID }
|
||||
>
|
||||
<i aria-hidden="true" class="ki ki-solid-plus icon-2x text-primary"></i>
|
||||
</button>
|
||||
}
|
||||
|
||||
script JSHideModal(modalID string) {
|
||||
$(modalID).modal('hide')
|
||||
}
|
||||
@@ -132,7 +177,7 @@ templ BtnCloseFormMDNLT(LinkClose string, targetClose string, hxSwapClose string
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<id aria-hidden="true" class="ki ki-close"></id>
|
||||
<i aria-hidden="true" class="ki ki-close"></i>
|
||||
</button>
|
||||
}
|
||||
|
||||
|
||||
@@ -195,6 +195,10 @@ func BodyFormMDNonlabTemplate(
|
||||
inputID models.CustomTextFieldv2Prm,
|
||||
inputName models.CustomTextFieldv2Prm,
|
||||
flagFisik models.CustomCheckboxv1Prm,
|
||||
kodeDetail models.CustomTextFieldv2Prm,
|
||||
namaDetail models.CustomTextFieldv2Prm,
|
||||
btnDetail templ.Component,
|
||||
tableDetail templ.Component,
|
||||
hxOnLoad templ.ComponentScript,
|
||||
) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
@@ -220,7 +224,7 @@ func BodyFormMDNonlabTemplate(
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(componentID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 70, Col: 25}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 74, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -243,7 +247,7 @@ func BodyFormMDNonlabTemplate(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-8\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"row\"><div class=\"col-8\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -259,7 +263,102 @@ func BodyFormMDNonlabTemplate(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"row align-items-center\"><div class=\"col-3\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(kodeDetail).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"col-8\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(namaDetail).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"col-1\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = btnDetail.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><h6 class=\"font-weight-bold\">Detail Hasil</h6>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tableDetail.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 BtnAddNama(
|
||||
btnAddNamaID 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_Var12 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var12 == nil {
|
||||
templ_7745c5c3_Var12 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button type=\"button\" class=\"btn btnaddnama btn-outline-secondary font-weight-bolder rounded-lg\" aria-label=\"Add Detail\" data-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs("#" + btnAddNamaID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 107, Col: 38}
|
||||
}
|
||||
_, 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("\">Simpan\r</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 BtnAddDetail() 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_7745c5c3_Buffer.WriteString("<button type=\"button\" class=\"btn btnadddetail\" aria-label=\"Add Detail\"><i aria-hidden=\"true\" class=\"ki ki-solid-plus icon-2x text-primary\"></i></button>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -308,9 +407,9 @@ func ActionFormMDNLT(LinkClose string, targetClose string, hxSwapClose string, m
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var12 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var12 == nil {
|
||||
templ_7745c5c3_Var12 = templ.NopComponent
|
||||
templ_7745c5c3_Var15 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var15 == nil {
|
||||
templ_7745c5c3_Var15 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div>")
|
||||
@@ -325,8 +424,8 @@ func ActionFormMDNLT(LinkClose string, targetClose string, hxSwapClose string, m
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 templ.ComponentScript = JSHideModal(modalID)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13.Call)
|
||||
var templ_7745c5c3_Var16 templ.ComponentScript = JSHideModal(modalID)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -334,12 +433,12 @@ func ActionFormMDNLT(LinkClose string, targetClose string, hxSwapClose string, m
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 103, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 145, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -347,12 +446,12 @@ func ActionFormMDNLT(LinkClose string, targetClose string, hxSwapClose string, m
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 104, Col: 26}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 146, Col: 26}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -360,12 +459,12 @@ func ActionFormMDNLT(LinkClose string, targetClose string, hxSwapClose string, m
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 105, Col: 24}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 147, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -388,9 +487,9 @@ func BtnCloseFormMDNLT(LinkClose string, targetClose string, hxSwapClose string,
|
||||
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
|
||||
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, JSHideModal(modalID))
|
||||
@@ -401,12 +500,12 @@ func BtnCloseFormMDNLT(LinkClose string, targetClose string, hxSwapClose string,
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
var templ_7745c5c3_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 126, Col: 27}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 168, Col: 27}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -414,12 +513,12 @@ func BtnCloseFormMDNLT(LinkClose string, targetClose string, hxSwapClose string,
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
var templ_7745c5c3_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 127, Col: 31}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 169, Col: 31}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -427,12 +526,12 @@ func BtnCloseFormMDNLT(LinkClose string, targetClose string, hxSwapClose string,
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 128, Col: 29}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 170, Col: 29}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -440,12 +539,12 @@ func BtnCloseFormMDNLT(LinkClose string, targetClose string, hxSwapClose string,
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var21 templ.ComponentScript = JSHideModal(modalID)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21.Call)
|
||||
var templ_7745c5c3_Var24 templ.ComponentScript = JSHideModal(modalID)
|
||||
_, 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("\" class=\"close btnactcancel\" data-dismiss=\"modal\" aria-label=\"Close\"><id aria-hidden=\"true\" class=\"ki ki-close\"></id></button>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"close btnactcancel\" 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
|
||||
}
|
||||
@@ -471,9 +570,9 @@ func DeleteConfirmBody(
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var22 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var22 == nil {
|
||||
templ_7745c5c3_Var22 = templ.NopComponent
|
||||
templ_7745c5c3_Var25 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var25 == nil {
|
||||
templ_7745c5c3_Var25 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hxOnLoad)
|
||||
@@ -484,12 +583,12 @@ func DeleteConfirmBody(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(componentID)
|
||||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(componentID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 147, Col: 25}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 189, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -497,8 +596,8 @@ func DeleteConfirmBody(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var24 templ.ComponentScript = hxOnLoad
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24.Call)
|
||||
var templ_7745c5c3_Var27 templ.ComponentScript = hxOnLoad
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var27.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -506,12 +605,12 @@ func DeleteConfirmBody(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var25 string
|
||||
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||
var templ_7745c5c3_Var28 string
|
||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 148, Col: 20}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 190, Col: 20}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -524,12 +623,12 @@ func DeleteConfirmBody(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(v)
|
||||
var templ_7745c5c3_Var29 string
|
||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(v)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 153, Col: 86}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 195, Col: 86}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -547,12 +646,12 @@ func DeleteConfirmBody(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(v)
|
||||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(v)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 158, Col: 67}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 200, Col: 67}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -588,9 +687,9 @@ func ActionFormMDNLTDelete(LinkClose string, targetClose string, hxSwapClose str
|
||||
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
|
||||
templ_7745c5c3_Var31 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var31 == nil {
|
||||
templ_7745c5c3_Var31 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div>")
|
||||
@@ -605,8 +704,8 @@ func ActionFormMDNLTDelete(LinkClose string, targetClose string, hxSwapClose str
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var29 templ.ComponentScript = JSHideModal(modalID)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29.Call)
|
||||
var templ_7745c5c3_Var32 templ.ComponentScript = JSHideModal(modalID)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32.Call)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -614,12 +713,12 @@ func ActionFormMDNLTDelete(LinkClose string, targetClose string, hxSwapClose str
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
var templ_7745c5c3_Var33 string
|
||||
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 171, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 213, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -627,12 +726,12 @@ func ActionFormMDNLTDelete(LinkClose string, targetClose string, hxSwapClose str
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var31 string
|
||||
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
var templ_7745c5c3_Var34 string
|
||||
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 172, Col: 26}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 214, Col: 26}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -640,12 +739,12 @@ func ActionFormMDNLTDelete(LinkClose string, targetClose string, hxSwapClose str
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var32 string
|
||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
var templ_7745c5c3_Var35 string
|
||||
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 173, Col: 24}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mdnonlabtemplate\mdnonlabtemplatemodal.templ`, Line: 215, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ templ TableAction(
|
||||
</a>
|
||||
<a
|
||||
type="button"
|
||||
class=" btnactionnlt col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-danger mb-2 btn-sm"
|
||||
class="btnactionnlt col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-danger mb-2 btn-sm"
|
||||
hx-get={ hxGetDelete + "?id=" + strconv.Itoa(id) }
|
||||
hx-target={ hxTargetDelete }
|
||||
hx-swap={ hxSwapDelete }
|
||||
|
||||
@@ -288,7 +288,7 @@ func TableAction(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a type=\"button\" class=\" btnactionnlt col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-danger mb-2 btn-sm\" hx-get=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a type=\"button\" class=\"btnactionnlt col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-danger mb-2 btn-sm\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user