testversand

This commit is contained in:
2026-02-24 01:42:30 +01:00
parent 6f7ac43a0b
commit 8801a8ba32
2 changed files with 7 additions and 5 deletions

View File

@@ -1293,8 +1293,9 @@ export function initEditor() {
    prevDlg?.showModal?.();
  }
  
  async function openSend(ctx = null) {
if (!current?.section?.is_template) {
  async function openSend(ctx = null, sectionOverride = null) {
const sectionCtx = sectionOverride || current?.section || window.__activeSection || null;
if (!sectionCtx?.is_template) {
err('Kein Template geladen');
return;
}
@@ -1537,13 +1538,14 @@ export function initEditor() {
err('Testversand: Keine ID vorhanden');
return;
}
if (!current?.section?.is_template) {
const sectionCtx = opts.section || window.__activeSection || current?.section || null;
if (!sectionCtx?.is_template) {
err('Kein Template geladen');
return;
}
window.__currentItemId = targetId;
setSendContext(targetId, opts.name || '');
openSend({ id: targetId, name: opts.name || '' });
openSend({ id: targetId, name: opts.name || '' }, sectionCtx);
};
  // Public API

View File

@@ -649,7 +649,7 @@ export async function loadList(section) {
return;
}
if (window.AdminTestSend && typeof window.AdminTestSend.open === 'function') {
window.AdminTestSend.open({ id, name: nm });
window.AdminTestSend.open({ id, name: nm, section });
} else {
toast('Testversand ist aktuell nicht verfügbar.', false);
}