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>
17 lines
795 B
JavaScript
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)
|
|
}
|