// Template Import/Export Functions function exportTemplates() { if (customTemplates.length === 0) { alert('Sie haben keine eigenen Templates zum Exportieren!'); return; } const exportData = { templates: customTemplates, exported_at: new Date().toISOString(), version: '1.0' }; const blob = new Blob([JSON.stringify(exportData, null, 2)], { type: 'application/json' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'scma-templates-export.json'; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); alert(`${customTemplates.length} Template(s) erfolgreich exportiert!`); } function importTemplates() { const input = document.createElement('input'); input.type = 'file'; input.accept = '.json'; input.onchange = function(event) { const file = event.target.files[0]; if (file) { const reader = new FileReader(); reader.onload = function(e) { try { const importData = JSON.parse(e.target.result); if (importData.templates && Array.isArray(importData.templates)) { if (confirm(`${importData.templates.length} Template(s) importieren? Vorhandene Templates mit gleichen Namen werden überschrieben.`)) { // Merge imported templates importData.templates.forEach(importedTemplate => { const existingIndex = customTemplates.findIndex(t => t.name === importedTemplate.name); if (existingIndex >= 0) { // Update existing template customTemplates[existingIndex] = { ...importedTemplate, id: customTemplates[existingIndex].id, // Keep original ID imported: new Date().toISOString() }; } else { // Add new template customTemplates.push({ ...importedTemplate, id: 'imported_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9), imported: new Date().toISOString() }); } }); saveCustomTemplates(); alert('Templates erfolgreich importiert!'); // Refresh template list if modal is open const templateList = document.getElementById('templateList'); if (templateList) { switchTemplateCategory('custom'); } } } else { alert('Ungültiges Template-Format!'); } } catch (error) { alert('Fehler beim Importieren der Templates: ' + error.message); } }; reader.readAsText(file); } }; input.click(); } // Predefined Template Loaders function createTemplateComponent(type, properties) { const component = { id: 'comp_' + (++componentCounter), type: type, properties: { ...getDefaultProperties(type), ...properties } }; return component; } function loadBasicECommerceTemplate() { // Clear current data Object.keys(scmaData).forEach(key => { scmaData[key] = []; }); componentCounter = 0; // Artikel Tab scmaData.artikel = [ createTemplateComponent('checkbox', { name: 'import_enabled', title: 'Auftragsimport aktivieren', default_value: true }), createTemplateComponent('select', { name: 'import_interval', title: 'Importintervall', options: ['5 Minuten', '15 Minuten', '1 Stunde'], required: true }) ]; // Einstellungen Tab scmaData.einstellungen = [ createTemplateComponent('section', { title: 'API-Verbindung', description: 'Konfiguration der API-Verbindung', icon: '🔗' }), createTemplateComponent('text_input', { name: 'api_url', title: 'API-URL', placeholder: 'https://api.beispiel.de', required: true }), createTemplateComponent('password', { name: 'api_key', title: 'API-Schlüssel', required: true }), createTemplateComponent('button', { title: 'Verbindung testen', style: 'primary', action: 'test_connection' }) ]; } function loadShopifyAdvancedTemplate() { Object.keys(scmaData).forEach(key => { scmaData[key] = []; }); componentCounter = 0; // Artikel Tab scmaData.artikel = [ createTemplateComponent('section', { title: 'Shopify Produktsynchronisation', description: 'Erweiterte Einstellungen für Shopify-Produkte', icon: '🛍️' }), createTemplateComponent('checkbox', { name: 'sync_variants', title: 'Produktvarianten synchronisieren', default_value: true }), createTemplateComponent('checkbox', { name: 'sync_images', title: 'Produktbilder synchronisieren', default_value: true }), createTemplateComponent('mapping_table', { name: 'product_field_mapping', title: 'Produktfeld-Mapping', description: 'Zuordnung zwischen Xentral und Shopify Feldern' }) ]; // Preise Tab scmaData.preise = [ createTemplateComponent('section', { title: 'Shopify Preissynchronisation', description: 'Preismanagement für Shopify', icon: '💰' }), createTemplateComponent('checkbox', { name: 'price_sync_enabled', title: 'PreissynchronComponent('section', { title: 'Artikelsynchronisation', description: 'Grundeinstellungen für die Produktsynchronisation', icon: '📦' }), createTemplateComponent('checkbox', { name: 'sync_enabled', title: 'Artikelsynchronisation aktivieren', default_value: true }), createTemplateComponent('select', { name: 'sync_interval', title: 'Synchronisationsintervall', options: ['5 Minuten', '15 Minuten', '1 Stunde', 'Täglich'], required: true }) ]; // Aufträge Tab scmaData.auftrag = [ createTemplateComponent('section', { title: 'Auftragsimport', description: 'Konfiguration des automatischen Auftragsimports', icon: '🛒' }), createTemplate SCMA UI Builder - Xentral Connect
🔧 SCMA UI Builder
Komponenten
Drag & Drop Elemente
Layout
📋 Section
🗂️ Fieldset
Eingabefelder
📝 Text Input
📄 Textarea
📋 Dropdown
☑️ Checkbox
🔢 Number Input
🔐 Password
Erweitert
🔗 Mapping Table
🔘 Button
🎯

SCMA Interface Designer

Ziehen Sie Komponenten aus der linken Palette hierher, um Ihre SCMA-Oberfläche zu gestalten

⚙️ Eigenschaften

Wählen Sie eine Komponente aus, um deren Eigenschaften zu bearbeiten