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