step 2 : close add form
This commit is contained in:
@@ -477,3 +477,58 @@ func (lh *MdGroupResultHandler) HandleChangePageMdGroupResult(c echo.Context) er
|
||||
retval = append(retval, userGroupPaginationComponent)
|
||||
return utils.ViewMulti(c, retval)
|
||||
}
|
||||
|
||||
// CLOSE FORM
|
||||
func (lh *MdGroupResultHandler) HandleCloseFormAdd(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
// listItem
|
||||
dataResultMcu, err := lh.MdGroupResultServices.GetMdGroupResultResumeMcu()
|
||||
fmt.Println(dataResultMcu)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR RESULT RESUME MCU DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataResultMcu)
|
||||
return err
|
||||
}
|
||||
|
||||
// Component Dropdown MCU
|
||||
listItemResultMcuComponent := dev_mdgroupresultview.ItemDropdown(dataResultMcu, 0)
|
||||
|
||||
dialogAddBodyID := c.FormValue("dialogAddBodyID")
|
||||
newForm := dev_mdgroupresultview.BodyFormGroupResult(
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Group Result name",
|
||||
Name: "groupresultid",
|
||||
Placeholder: "Group Result name",
|
||||
Type: "hidden",
|
||||
ID: "groupresultid",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Group Result Name",
|
||||
Name: "groupresultname",
|
||||
Placeholder: "Group Result Name",
|
||||
Type: "text", ID: "groupresultname"},
|
||||
models.CustomCheckboxv1Prm{
|
||||
Label: "Group Result Flag Per Test (Dicentang Maka Ya)",
|
||||
Name: "groupresultflagpertest",
|
||||
ID: "groupresultflagpertest",
|
||||
Value: "N",
|
||||
},
|
||||
models.CustomCheckboxv1Prm{
|
||||
Label: "Group Result Flag Non Lab (Dicentang Maka Ya)",
|
||||
Name: "groupresultflagnonlab",
|
||||
ID: "groupresultflagnonlab",
|
||||
Value: "N",
|
||||
},
|
||||
models.CustomDropdownv1Prm{
|
||||
Label: "Group Result Resume MCU",
|
||||
Name: "groupresultresumemcu",
|
||||
ID: "groupresultresumemcu",
|
||||
},
|
||||
listItemResultMcuComponent,
|
||||
dialogAddBodyID, dev_mdgroupresultview.JsHideModalGroupResult(""))
|
||||
return utils.View(c, newForm)
|
||||
}
|
||||
|
||||
@@ -269,4 +269,5 @@ func SetupRoutesDev(app *echo.Echo, appStore db.AppStore) {
|
||||
dev.GET("/md/groupresultv2", devMdGRhandlers.HandleShowMdGroupResultScreen)
|
||||
dev.GET("/md/groupresultv2/filter", devMdGRhandlers.HandleFilterMdGroupResult)
|
||||
dev.GET("/md/groupresultv2/changepage", devMdGRhandlers.HandleChangePageMdGroupResult)
|
||||
dev.POST("/md/groupresultv2/closeaddform", devMdGRhandlers.HandleCloseFormAdd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user