Display current line value for non-empty field in case of dependency
issues
This commit is contained in:
parent
50f682dbc2
commit
65fa859490
|
@ -122,6 +122,8 @@ class CsvxmlValidator {
|
||||||
let dependencies = this.fieldList[header].dependsOn;
|
let dependencies = this.fieldList[header].dependsOn;
|
||||||
for (let dep of dependencies) {
|
for (let dep of dependencies) {
|
||||||
if (headers.includes(dep) === false) {
|
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");
|
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) {
|
for (let dependency of dependencies) {
|
||||||
if (line[dependency] === '') {
|
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
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||||
<link rel="stylesheet" type="text/css" href="assets/css/csvxml.min.css?64087fbae5a12" />
|
<link rel="stylesheet" type="text/css" href="assets/css/csvxml.min.css?6456e9fe94a0c" />
|
||||||
<link rel="manifest" href="/manifest.json" />
|
<link rel="manifest" href="/manifest.json" />
|
||||||
<meta name="theme-color" content="#aa4400" />
|
<meta name="theme-color" content="#aa4400" />
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="loading">
|
<body class="loading">
|
||||||
|
|
||||||
<script src="assets/js/csvxmlV2.min.js?64087fbae5a14" type="text/javascript" async></script>
|
<script src="assets/js/csvxmlV2.min.js?6456e9fe94a0f" type="text/javascript" async></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user