Separaten Output-Ordner für INVRPT → VDA 4913 Konvertierungen hinzufügen
Der eingehende Watcher nutzt denselben Input-Ordner für alle Dateitypen, schreibt INVRPT-Konvertierungen nun aber in einen konfigurierbaren separaten Output-Ordner. Bleibt das Feld leer, wird der Standard- Output-Ordner als Fallback verwendet (abwärtskompatibel). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
10
main.js
10
main.js
@@ -15,7 +15,7 @@ const edifactValidator = require('./js/edifact-validator');
|
||||
let mainWindow = null;
|
||||
let watcher = null;
|
||||
let watcherPaused = false;
|
||||
let watcherConfig = { inputDir: '', outputDir: '', mode: 'auto' };
|
||||
let watcherConfig = { inputDir: '', outputDir: '', invrptOutputDir: '', mode: 'auto' };
|
||||
|
||||
let outboundWatcher = null;
|
||||
let outboundWatcherPaused = false;
|
||||
@@ -116,8 +116,8 @@ function loadSettings() {
|
||||
}
|
||||
} catch (e) { console.error('Settings load error:', e); }
|
||||
return {
|
||||
inputDir: '', outputDir: '', mode: 'auto',
|
||||
outboundInputDir: '', outboundOutputDir: '', mode: 'auto',
|
||||
inputDir: '', outputDir: '', invrptOutputDir: '', mode: 'auto',
|
||||
outboundInputDir: '', outboundOutputDir: '',
|
||||
werksInputDir: '', werksOutputDir: ''
|
||||
};
|
||||
}
|
||||
@@ -219,6 +219,7 @@ ipcMain.handle('start-watcher', (_, config) => {
|
||||
|
||||
const inputDir = watcherConfig.inputDir;
|
||||
const outputDir = watcherConfig.outputDir;
|
||||
const invrptOutputDir = watcherConfig.invrptOutputDir || '';
|
||||
|
||||
if (!inputDir || !outputDir) {
|
||||
return { error: 'Input- und Output-Ordner müssen angegeben werden.' };
|
||||
@@ -293,7 +294,8 @@ ipcMain.handle('start-watcher', (_, config) => {
|
||||
filePath,
|
||||
fileName,
|
||||
content,
|
||||
outputDir
|
||||
outputDir,
|
||||
invrptOutputDir
|
||||
});
|
||||
|
||||
console.log(`[Watcher] Sent to renderer: ${fileName} (${content.length} bytes)`);
|
||||
|
||||
Reference in New Issue
Block a user