step 8 : templ and handling submit except saran mcu
This commit is contained in:
24
utils/surveymcu.utils.go
Normal file
24
utils/surveymcu.utils.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package utils
|
||||
|
||||
import "cpone/models"
|
||||
|
||||
func GetIdSurveyMcu(id string) string {
|
||||
return id
|
||||
}
|
||||
|
||||
func ConcatHxIncludeSurveyMcu(data []models.ItemSurveyMcu) string {
|
||||
var stringx string
|
||||
|
||||
if len(data) > 0 {
|
||||
for i, v := range data {
|
||||
if i > 0 {
|
||||
stringx += ", "
|
||||
}
|
||||
stringx += "[name='radio-" + v.IDItemSurvey + "'], [name='default-radio-" + v.IDItemSurvey + "'], [name='id-radio']"
|
||||
}
|
||||
}
|
||||
|
||||
stringx += ",[name='saranMcu']"
|
||||
|
||||
return stringx
|
||||
}
|
||||
Reference in New Issue
Block a user