Improved unmarked tag detection
This commit is contained in:
parent
ec841b9591
commit
c53a9654b5
@ -97,14 +97,19 @@
|
||||
methods: {
|
||||
strHashHSL,
|
||||
gettags(row) {
|
||||
var res = {}, matches;
|
||||
var res = {}, re, matches;
|
||||
if((row.RESOURCENAME) && (matches = row.RESOURCENAME.replace(/\W+/g, '-').replace(/^-+|-+$/g, ''))) res[matches.toLowerCase()] = matches;
|
||||
if(row.WALKIN != '0') res['walkin'] = 'WALKIN';
|
||||
if(row.CANCELLED != '0') res['cancelled'] = 'CANCELLED';
|
||||
else if(row.NOSHOW != '0') res['noshow'] = 'NOSHOW';
|
||||
else if(row.CHECKOUT) res['checkedout'] = 'CHECKEDOUT';
|
||||
else if(row.CHECKIN) res['checkedin'] = 'CHECKEDIN';
|
||||
if((row.NOTE) && (matches = row.NOTE.match(/#[0-9a-z][\w-]*/gi))) matches.reduce((acc, val) => (acc[val.substring(1).toLowerCase()] = val.substring(1), acc), res);
|
||||
if(row.NOTE) {
|
||||
re = /#([0-9a-z][\w-]*)/gi;
|
||||
while(matches = re.exec(row.NOTE)) res[matches[1].toLowerCase()] = matches[1];
|
||||
re = /Dr[\.\s]*\b([a-z][\w-]*)/gi;
|
||||
while(matches = re.exec(row.NOTE)) res[matches[1].toLowerCase()] = matches[1];
|
||||
}
|
||||
return res;
|
||||
},
|
||||
filter_conj(tags) {
|
||||
|
Loading…
Reference in New Issue
Block a user