Files
Webklar-Kundenbereich/public/shop.js
T
ClaudeandClaude Opus 5.5 809da80c9b Shop G1: Verdrahtung #webshop, Webshop-Kachel, Bestellseite mit key und optionaler Zusammenfassung
Dashboard-Abschnitt view-webshop, shop.css und Platzhalter shop.js, app.js (Hash, Refresher, Label, Elternansicht), Kachel in funktionen.js nach shop.verfuegbar, GET /api/funktionen liefert shop.verfuegbar, funktion-bestellen.js nimmt key/name/zusammenfassung (Standard: Terminplaner unverändert).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 08:57:02 +00:00

17 lines
795 B
JavaScript

/* Webshop im Kundenbereich (ES-Modul, wird von app.js erst beim Oeffnen der Ansicht #webshop geladen).
initShop(rootEl, { projectId }): Platzhalter, bis die Huelle mit Anfrage, Bestellseite und Reitern steht (Task G2).
Fremdtext kommt nur ueber textContent in die Seite. Styles: shop.css. */
export function initShop(root, { projectId } = {}) {
if (!root) return
const wunsch = root.dataset?.wunschProjekt || projectId || ''
if (root.dataset && root.dataset.wunschProjekt) delete root.dataset.wunschProjekt
const panel = document.createElement('div')
panel.className = 'kb-panel sh-info'
if (wunsch) panel.dataset.projekt = wunsch
const text = document.createElement('p')
text.textContent = 'Webshop wird geladen …'
panel.append(text)
root.replaceChildren(panel)
}