diff --git a/resources/views/modules/form/index-mitigasi-edit.blade.php b/resources/views/modules/form/index-mitigasi-edit.blade.php index eff4b3b..bb0bb5f 100644 --- a/resources/views/modules/form/index-mitigasi-edit.blade.php +++ b/resources/views/modules/form/index-mitigasi-edit.blade.php @@ -1172,429 +1172,6 @@ (subKategori || sessionSubKategori); } - // function loadQuestion(mitigation_id) { - // $('#section4').show(); - // $('#accordion-4').html('
Loading...
'); - - // $.get(base_url+'/mitigasi/form-mitigasi-question', { mitigation_id }) - // .done(data => { - // if (!data || !data.length) { - // $('#accordion-4').html( - // 'Pertanyaan tidak tersedia.
' - // ); - // return; - // } - // window.lastQuestionData = data; - - // const answers = window.sessionActivityForms || {}; - // const questionMap = {}; - // const childMap = {}; - // data.forEach(q => { - // questionMap[q.sequence] = q; - // if (q.ad_sequence) { - // if (!childMap[q.ad_sequence]) childMap[q.ad_sequence] = []; - // childMap[q.ad_sequence].push(q.sequence); - // } - // }); - - // function getAnswer(seq, idx = 0) { - // const arr = answers[`activity_data_${seq}`]; - // return arr && arr.length > idx ? arr[idx] : ''; - // } - // function getUnit(seq, idx = 0) { - // const arr = answers[`unit_${seq}`]; - // if (Array.isArray(arr)) return arr.length > idx ? arr[idx] : ''; - // return typeof arr === 'string' ? arr : ''; - // } - - // let multiQs = data.filter(q => q.is_multiple || q.group === 'MULTIPLE' || q.type === 'multiple'); - - // const methodQuestion = data.find(q => q.type === 'method'); - // const methodSequence = methodQuestion?.sequence; - // let methodAnswer = ''; - // if (methodSequence) { - // const methodAnswers = answers[`activity_data_${methodSequence}`]; - // if (Array.isArray(methodAnswers) && methodAnswers.length > 0) { - // methodAnswer = methodAnswers[0]; - // } - // } - - // function makeRow(q, idx, showRemove, value) { - // let inputEl = ""; - // value = value || ''; - // if (q.type === 'text') { - // inputEl = ``; - // } else if (q.type === 'form' || q.type === 'method') { - // console.log(value); - // inputEl = ` - // - // `; - // } else { - // console.log(value); - // console.log(typeof(value)); - // console.log(q.choices); - // console.log(q.choices.map(c => value === c)); - // inputEl = ``; - // } - - // const removeBtn = showRemove - // ? `` - // : ``; - - // return ` - //${data[0].activity_desc}
- // ${allHtml} - // ${multipleLayout} - //Terjadi kesalahan saat memuat pertanyaan.
' - // ); - // }); - // } - function loadQuestion(mitigation_id) { $('#section4').show(); $('#accordion-4').html('Loading...
');