Compare commits

..

3 Commits

Author SHA1 Message Date
2b7ae75cc3 Fix persistent schedule view filter 2023-05-01 17:20:40 -04:00
f0dcabe6b8 Improved unmarked tag detection 2023-05-01 17:19:52 -04:00
0ccf124cf0 Fix broken connection detection 2023-05-01 17:17:44 -04:00
2 changed files with 9 additions and 3 deletions

View File

@ -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) {
@ -130,6 +135,7 @@
this.$watch(
() => (this.client, this.selection, this.date_begin, this.date_end, {}),
debounce(async () => {
this.filter = {};
window.clearTimeout(this.timer);
this.update();
}, 500)

View File

@ -463,7 +463,7 @@ Client.fromCookie = async function(secret, defaulthost='vista.northport.med.va.g
console.log('Using saved secret and connection', secret);
var cid = localstate.cid;
var client = Client.fromID(cid, secret);
if((await vista.call(cid, { method: 'XWB_IM_HERE', ttl: 30, id: Date.now() })).result == '1') {
if((await vista.call(cid, { method: 'XWB_IM_HERE', ttl: 0, stale: false, id: Date.now() })).result == '1') {
var server = await client.serverinfo();
if((host[0] == server.result.host) && (host[1] == server.result.port)) {
localstate.host = host.join(':');