()
| 2327 | bodyEl.appendChild(container); |
| 2328 | |
| 2329 | const loadSubmissions = async () => { |
| 2330 | countEl.textContent = 'Loading...'; |
| 2331 | listEl.textContent = ''; |
| 2332 | |
| 2333 | try { |
| 2334 | const submissions = await fetchPortalSubmissions(slug); |
| 2335 | renderPortalSubmissionsList(listEl, countEl, submissions); |
| 2336 | return submissions; |
| 2337 | } catch (err) { |
| 2338 | console.error(err); |
| 2339 | countEl.textContent = 'Error loading submissions'; |
| 2340 | const errMsg = (err && err.message) ? err.message : err; |
| 2341 | showToast(t('admin_portal_submissions_load_error', { error: errMsg })); |
| 2342 | return []; |
| 2343 | } |
| 2344 | }; |
| 2345 | |
| 2346 | loadBtn.addEventListener('click', () => { |
| 2347 | loadSubmissions(); |
no test coverage detected