step 10 : remove unused field in struct

This commit is contained in:
sindhu
2024-05-22 09:40:01 +07:00
parent 445d238426
commit 69074143af
5 changed files with 5 additions and 25 deletions

View File

@@ -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

View File

@@ -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"`
}

View File

@@ -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",

View File

@@ -45,7 +45,7 @@ templ MainContentSurveyMcuLayout(dataSurveyMcu []models.SurveyMcu, urlPost strin
<h5
class="title-pertanyaan text-black no-margin-padding flex-number"
>
{ k.Nomor }&nbsp;
{ k.Nomor }.&nbsp;
</h5>
<h5
class="title-pertanyaan text-black no-margin-padding flex-question"

View File

@@ -70,7 +70,7 @@ func MainContentSurveyMcuLayout(dataSurveyMcu []models.SurveyMcu, urlPost string
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("&nbsp;\r</h5><h5 class=\"title-pertanyaan text-black no-margin-padding flex-question\">")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(".&nbsp;\r</h5><h5 class=\"title-pertanyaan text-black no-margin-padding flex-question\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}