From 5c67773287082919253882b7d176d502e7ad6137 Mon Sep 17 00:00:00 2001 From: inportb Date: Tue, 8 Aug 2023 22:34:59 -0400 Subject: [PATCH] Location lookup fixes: RPC null array handling, RPC caching, existing encounters empty resultset handling, default to existing encounters --- htdocs/ViewLocationLookup.vue | 4 ++-- htdocs/ViewLocationLookupExisting.vue | 7 +++++-- htdocs/vistax.mjs | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/ViewLocationLookup.vue b/htdocs/ViewLocationLookup.vue index 32a7d34..43f2c46 100644 --- a/htdocs/ViewLocationLookup.vue +++ b/htdocs/ViewLocationLookup.vue @@ -42,14 +42,14 @@ client: Object, dfn: String, label: String, - modelValue: String + modelValue: Object }, emits: { 'update:modelValue': Object }, data() { return { - view_new: true, + view_new: false, query: '', visits_date_begin: now, visits_date_end: now, diff --git a/htdocs/ViewLocationLookupExisting.vue b/htdocs/ViewLocationLookupExisting.vue index 4f18222..0561e11 100644 --- a/htdocs/ViewLocationLookupExisting.vue +++ b/htdocs/ViewLocationLookupExisting.vue @@ -1,6 +1,6 @@ diff --git a/htdocs/vistax.mjs b/htdocs/vistax.mjs index 85da7f8..f1b6ae6 100644 --- a/htdocs/vistax.mjs +++ b/htdocs/vistax.mjs @@ -339,11 +339,11 @@ export function Client(cid, secret) { this.ORWPCE_NOTEVSTR = aflow((...args) => this.call({ method: 'ORWPCE_NOTEVSTR', context: ['OR CPRS GUI CHART'], ttl: 86400, stale: true }, ...args), d_log, d_unwrap); this.ORWPCE_DELETE = aflow((...args) => this.call({ method: 'ORWPCE_DELETE', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); - this.ORWCV_VST = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWCV_VST', ...args), d_log, d_unwrap, f_split('^', 'apptinfo', 'datetime', 'location', 'status'))); + this.ORWCV_VST = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWCV_VST', ...args), d_log, d_unwrap, d_parse_array, f_split('^', 'apptinfo', 'datetime', 'location', 'status'))); this.ORWU_NEWPERS = memoized(aflow((...args) => this.call({ method: 'ORWU_NEWPERS', context: ['OR CPRS GUI CHART'], ttl: 86400, stale: true }, ...args), d_log, d_unwrap, f_split('^', 'DUZ', 'name', 'description'))); this.ORWU_VALIDSIG = memoized(aflow((...args) => this.call({ method: 'ORWU_VALIDSIG', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap)); - this.ORWU1_NEWLOC = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWU1_NEWLOC', ...args), d_log, d_unwrap, f_split('^', 'IEN', 'name'))); + this.ORWU1_NEWLOC = memoized(aflow((...args) => this.call({ method: 'ORWU1_NEWLOC', context: ['OR CPRS GUI CHART'], ttl: 86400, stale: true }, ...args), d_log, d_unwrap, f_split('^', 'IEN', 'name'))); this.ORWDX_DGNM = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWDX_DGNM', ...args), d_log, d_unwrap)); this.ORWDX_DGRP = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWDX_DGRP', ...args), d_log, d_unwrap));