Display current line value for non-empty field in case of dependency
issues
This commit is contained in:
@ -122,6 +122,8 @@ class CsvxmlValidator {
|
||||
let dependencies = this.fieldList[header].dependsOn;
|
||||
for (let dep of dependencies) {
|
||||
if (headers.includes(dep) === false) {
|
||||
console.error("Dependency issue at column " + header + ": Corresponding column " + dep + " is missing");
|
||||
console.log(headers);
|
||||
this.errors.dependentColumns.push("Dependency issue at column " + header + ": Corresponding column " + dep + " is missing");
|
||||
}
|
||||
}
|
||||
@ -139,7 +141,9 @@ class CsvxmlValidator {
|
||||
|
||||
for (let dependency of dependencies) {
|
||||
if (line[dependency] === '') {
|
||||
this.errors.dependentColumns.push("Dependency issue at column " + fieldName + ": Corresponding column " + dependency + " is empty");
|
||||
console.error("Dependency issue at column " + fieldName + ": Corresponding column " + dependency + " is missing");
|
||||
console.log(line);
|
||||
this.errors.dependentColumns.push("Dependency issue at column " + fieldName + " (current value: " + line[fieldName] + "): Corresponding column " + dependency + " is empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
public/assets/js/csvxmlV2.min.js
vendored
2
public/assets/js/csvxmlV2.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user