Merge pull request 'Allow empty clause value when operator is NE or CONTAINS' (#83) from issue-82 into main
Reviewed-on: #83
This commit is contained in:
commit
9a0b9573d5
|
@ -980,15 +980,18 @@ export class EditorComponent implements OnInit, AfterViewInit {
|
|||
|
||||
// Apply licence rows limitation if exists, it is only affecting data
|
||||
// which will be send to SAS
|
||||
const strippedCsvArrayData = csvArrayData.slice(0, this.licenceState.value.submit_rows_limit)
|
||||
const strippedCsvArrayData = csvArrayData.slice(
|
||||
0,
|
||||
this.licenceState.value.submit_rows_limit
|
||||
)
|
||||
// To submit to sas service, we need clean version of CSV of file
|
||||
// attached. XLSX will do the parsing and heavy lifting
|
||||
// First we create worksheet of json (data we extracted)
|
||||
let ws = XLSX.utils.json_to_sheet(strippedCsvArrayData, {
|
||||
skipHeader: true
|
||||
});
|
||||
})
|
||||
// create CSV to be uploaded from worksheet
|
||||
let csvContentClean = XLSX.utils.sheet_to_csv(ws);
|
||||
let csvContentClean = XLSX.utils.sheet_to_csv(ws)
|
||||
// Prepend headers
|
||||
csvContentClean = csvArrayHeaders.join(',') + '\n' + csvContentClean
|
||||
|
||||
|
|
|
@ -878,17 +878,25 @@ export class QueryComponent
|
|||
*/
|
||||
public hasInvalidCluase(clauses: any): boolean {
|
||||
for (let clause of clauses) {
|
||||
clause['invalidClause'] = false
|
||||
|
||||
if (
|
||||
clause.variable === null ||
|
||||
clause.operator === null ||
|
||||
clause.value === null ||
|
||||
clause.value === ''
|
||||
clause.value === '' &&
|
||||
!(clause.operator === 'NE' || clause.operator === 'CONTAINS')
|
||||
) {
|
||||
clause['invalidClause'] = true
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
if (
|
||||
clause.variable === null ||
|
||||
clause.operator === null ||
|
||||
clause.value === null
|
||||
) {
|
||||
clause['invalidClause'] = true
|
||||
|
||||
return true
|
||||
} else {
|
||||
clause['invalidClause'] = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,4 +18,4 @@ In any case, you must not make any such use of this software as to develop softw
|
|||
UNLESS EXPRESSLY AGREED OTHERWISE, 4GL APPS PROVIDES THIS SOFTWARE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO LEGAL THEORY, SHALL 4GL APPS BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM USE OR INABILITY TO USE THIS SOFTWARE.
|
||||
|
||||
|
||||
`
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue
Block a user