diff --git a/src/lib/tables.js b/src/lib/tables.js old mode 100644 new mode 100755 index e21083b..7d41b57 --- a/src/lib/tables.js +++ b/src/lib/tables.js @@ -296,6 +296,59 @@ export const TABLES = { fetchRelated: [], }, + 'prompt-styles': { + label: 'Prompt Styles', + icon: '🎨', + endpoint: '/prompt-styles', + statusField: null, + primaryLabel: 'text_en', + columns: ['type', 'themenfeld_id', 'text_en'], + linkedFields: {}, + editableFields: { + type: { type: 'select', options: ['fix', 'atmosphere', 'setting'] }, + themenfeld_id: { type: 'text' }, + text_en: { type: 'textarea' }, + }, + fetchRelated: [], + }, + + 'picture-jobs': { + label: 'Picture Jobs', + icon: '🖼️⚙️', + endpoint: '/picture-jobs', + statusField: 'status', + primaryLabel: 'id', + columns: ['id', 'status', 'kategorie_id', 'prompt_fix', 'prompt_atmosphere', 'prompt_setting', 'picture_id', 'created_at'], + linkedFields: { + kategorie_id: 'categories', + prompt_fix: 'prompt-styles', + prompt_atmosphere: 'prompt-styles', + prompt_setting: 'prompt-styles', + picture_id: 'pictures', + }, + editableFields: { + status: { type: 'select', options: ['pending', 'generating', 'done', 'failed'] }, + prompt_final: { type: 'textarea' }, + kategorie_id: { type: 'text' }, + prompt_fix: { type: 'text' }, + prompt_atmosphere: { type: 'text' }, + prompt_setting: { type: 'text' }, + picture_id: { type: 'text' }, + }, + fetchRelated: [ + { + key: 'words', + label: 'Wörter', + endpoint: id => `/picture-jobs/${id}/words`, + display: w => w.titel_de || w.id, + targetTable: 'words', + linkEndpoint: (id, targetId) => `/picture-jobs/${id}/words/${targetId}`, + searchEndpoint: '/words', + searchLabel: w => w.titel_de || w.id, + }, + ], + }, + 'tts-settings': { label: 'TTS-Stimmen', icon: '🗣️',