Skip to content

Commit

Permalink
update save actions (#969)
Browse files Browse the repository at this point in the history
Co-authored-by: jbukhari <[email protected]>
  • Loading branch information
jbukhari and jbukhari authored Feb 8, 2023
1 parent ded69b0 commit 03e8319
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions dlx_rest/static/js/jmarc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,10 +1151,10 @@ export class Jmarc {
.replaceAll("*", ".*");
}

let rx = new RegExp(regex);
let rx = new RegExp(regex, 'i'); // case insensitive

for (let subfield of subfields) {
if (subfield.value.match(rx)) {
if (subfield.value.match(rx)) {
return true
}
}
Expand All @@ -1167,6 +1167,9 @@ export class Jmarc {
case "":
last_bool = evaluate(this, tag, sub, value);
break
case "NOT":
last_bool = ! evaluate(this, tag, sub, value);
break
case "AND":
last_bool = last_bool && evaluate(this, tag, sub, value);
break
Expand Down
6 changes: 3 additions & 3 deletions dlx_rest/static/js/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1447,14 +1447,14 @@ export const validationData = {
"089__b:B01 AND 191:*/DEC/*": {"a": "Documents and Publications", "b": "Resolutions and Decisions", "c": "Decisions"},
"089__b:B17 OR 191:*/PRST/*": {"a": "Documents and Publications", "b": "Resolutions and Decisions", "c": "Presidential Statements"},
"089__b:B01 AND NOT 989__b:Resolutions and Decisions": {"a": "Documents and Publications", "b": "Resolutions and Decisions"},
"089__b:B15 AND 089__b:B16 AND NOT 245:*letter*from the Secretary-General*": {"a": "Documents and Publications", "b": "Reports", "c": "Secretary-General's Reports"},
"089__b:B15 AND 089__b:B16 AND NOT 245:/letter.*from the Secretary-General/": {"a": "Documents and Publications", "b": "Reports", "c": "Secretary-General's Reports"},
"089__b:B04": {"a": "Documents and Publications", "b": "Reports", "c": "Annual and Sessional Reports"},
"089__b:B14 AND NOT 089__b:B04": {"a": "Documents and Publications", "b": "Reports", "c": "Periodic Reports"},
"089__b:B16 AND 245:Report AND NOT 989__b:Reports": {"a": "Documents and Publications", "b": "Reports"},
"089__b:B16 AND 245:*Report* AND NOT 989__b:Reports": {"a": "Documents and Publications", "b": "Reports"},
"191__a:*/PV.*": {"a": "Documents and Publications", "b": "Meeting Records", "c": "Verbatim Records"},
"191__a:*/SR.*": {"a": "Documents and Publications", "b": "Meeting Records", "c": "Summary Records"},
"089__b:B03 AND NOT 989__b:Meeting Records": {"a": "Documents and Publications", "b": "Meeting Records"},
"089__b:B15 AND NOT 245:Report* AND NOT 989__b:Secretary-General's*": {"a": "Documents and Publications", "b": "Letters and Notes Verbales", "c": "Secretary-General's Letters"},
"089__b:B15 AND NOT 245:Report* AND NOT 989__c:Secretary-General's*": {"a": "Documents and Publications", "b": "Letters and Notes Verbales", "c": "Secretary-General's Letters"},
"089__b:B18 AND NOT 989__b:Letters*": {"a": "Documents and Publications", "b": "Letters and Notes Verbales"},
"020:* OR 022:* OR 079:* OR 089__b:B13": {"a": "Documents and Publications", "b": "Publications"},
"089__b:B08": {"a": "Documents and Publications", "b": "Draft Reports"},
Expand Down

0 comments on commit 03e8319

Please sign in to comment.