diff --git a/handlers/public/surveymcu.handlers.go b/handlers/public/surveymcu.handlers.go index 9bed7f1..9a4ac42 100644 --- a/handlers/public/surveymcu.handlers.go +++ b/handlers/public/surveymcu.handlers.go @@ -111,7 +111,7 @@ func (lh *SurveyMcuHandler) HandlerProcessSurveyMcu(c echo.Context) error { } if "default-"+x.NameRadioButton == c.FormValue("default-"+x.NameRadioButton) && len(c.FormValue("radio-"+x.IDItemSurvey)) == 0 { - stringMessage = "Pertanyaan ke-" + x.IDItemSurvey + " wajib diisi," + stringMessage = "Pertanyaan ke-" + x.IDItemSurvey + " wajib diisi" idFormKosong = utils.GetIdSurveyMcu(x.IDItemSurvey) isFormEmpty = true hasError = true diff --git a/models/surveymcu.models.go b/models/surveymcu.models.go index a546cbe..8aef60d 100644 --- a/models/surveymcu.models.go +++ b/models/surveymcu.models.go @@ -9,9 +9,7 @@ type ItemSurveyMcu struct { IDItemSurvey string `json:"iditemsurvey"` Nomor string `json:"nomor"` Pertanyaan string `json:"pertanyaan"` - Jawaban bool `json:"jawaban"` NameRadioButton string `json:"nameradiobutton"` - Checked string `json:"checked"` ErrorMessage string `json:"errorMessage"` } diff --git a/services/public/surveymcu.services.go b/services/public/surveymcu.services.go index 5bd11a1..4078dde 100644 --- a/services/public/surveymcu.services.go +++ b/services/public/surveymcu.services.go @@ -26,13 +26,12 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model zap.String("query search", ""), ) + // radio button dataItemSurveyMcu := []models.ItemSurveyMcu{ { IDItemSurvey: "1", Nomor: "1", Pertanyaan: "Bagaimana Penilaian Sikap & Keramahan Petugas?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-1", }, @@ -40,8 +39,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "2", Nomor: "2", Pertanyaan: "Bagaimana Penilaian Penampilan Petugas?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-2", }, @@ -49,8 +46,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "3", Nomor: "3", Pertanyaan: "Bagaimana Penilaian Ketrampilan Petugas?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-3", }, @@ -58,8 +53,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "4", Nomor: "4", Pertanyaan: "Bagaimana Penilaian Pemberian Informasi Petugas?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-4", }, @@ -67,8 +60,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "5", Nomor: "5", Pertanyaan: "Bagaimana Penilaian Kelengkapan Alat?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-5", }, @@ -76,8 +67,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "6", Nomor: "6", Pertanyaan: "Bagaimana Penilaian Kelayakan Alat?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-6", }, @@ -85,8 +74,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "7", Nomor: "7", Pertanyaan: "Bagaimana Penilaian Kebersihan Ruangan?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-7", }, @@ -94,8 +81,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "8", Nomor: "8", Pertanyaan: "Bagaimana Penilaian Kebersihan Ruangan?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-8", }, @@ -103,8 +88,6 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "9", Nomor: "9", Pertanyaan: "Bagaimana Penilaian Alur Pelayanan?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-9", }, @@ -112,13 +95,12 @@ func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]model IDItemSurvey: "10", Nomor: "10", Pertanyaan: "Bagaimana Penilaian Ketepatan Waktu?", - Jawaban: false, - Checked: "", ErrorMessage: "", NameRadioButton: "radio-10", }, } + // saran dataItemSurveyMcuSaran := []models.ItemSurveyMcuSaran{ { IDItemSurveyMcuSaran: "11", diff --git a/views/public/surveymcu/surveymcu.templ b/views/public/surveymcu/surveymcu.templ index c49b13c..7f80ca5 100644 --- a/views/public/surveymcu/surveymcu.templ +++ b/views/public/surveymcu/surveymcu.templ @@ -45,7 +45,7 @@ templ MainContentSurveyMcuLayout(dataSurveyMcu []models.SurveyMcu, urlPost strin