step 8 : templ and handling submit except saran mcu

This commit is contained in:
sindhu
2024-05-21 16:11:20 +07:00
parent 7d6e8cc687
commit 79d736884e
7 changed files with 1035 additions and 0 deletions

24
utils/surveymcu.utils.go Normal file
View 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
}