This commit is contained in:
2025-10-20 10:41:58 +02:00
parent 553ffbac98
commit ea09fed557

View File

@@ -468,11 +468,14 @@
} }
}, },
areAllFieldsFilled(configData) { areAllFieldsFilled(configData) {
const checkFields = (data) => { const checkFields = (data, ignoreKeys = []) => {
for (const key in data) { for (const key in data) {
if (ignoreKeys.includes(key)) continue;
const value = data[key]; const value = data[key];
if (typeof value === 'object') {
if (!checkFields(value)) { if (typeof value === 'object' && value !== null) {
if (!checkFields(value, ignoreKeys)) {
return false; return false;
} }
} else if (value === '' || value === null || value === undefined) { } else if (value === '' || value === null || value === undefined) {
@@ -484,11 +487,14 @@
return true; return true;
}; };
return checkFields(configData); // przekazujemy klucze, które należy zignorować
return checkFields(configData, ['step_3_extra']);
}, },
checkFields() { checkFields() {
return this.areAllFieldsFilled(this.configData); return this.areAllFieldsFilled(this.configData);
}, },
resetAllFields() { resetAllFields() {
const stack = [this.configData]; const stack = [this.configData];