From 69c44a538737278d570f638415c9c99ada36bcab Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 25 Feb 2022 00:41:54 +0000 Subject: [PATCH] --- .../components/dash-labor-hours-personal.vue | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/ayanova/src/components/dash-labor-hours-personal.vue b/ayanova/src/components/dash-labor-hours-personal.vue index ae84403c..a02327d1 100644 --- a/ayanova/src/components/dash-labor-hours-personal.vue +++ b/ayanova/src/components/dash-labor-hours-personal.vue @@ -4,7 +4,7 @@ :show-context-button="true" :update-frequency="600000" v-bind="[$props, $attrs]" - @dash-refresh="loadData" + @dash-refresh="getDataFromApi()" @dash-context="showContext()" v-on="$listeners" > @@ -136,19 +136,22 @@ ORDER BY timeframe ASC */ - // try { - // this.errorMessage = null; - // const res = await window.$gz.api.post("schedule/personal", { - // view: 1 - // }); - // if (res.error) { - // this.errorMessage = res.error; - // } else { - // //for later - // } - // } catch (error) { - // this.errorMessage = error.toString(); - // } + try { + this.errorMessage = null; + const res = await window.$gz.api.post("kpi", { + name: "WorkOrderItemLaborQuantitySummary", + + criteria: JSON.stringify({ test: 12, blah: "blahbittyblahblahblah" }), + clientTimeStamp: window.$gz.locale.clientLocalZoneTimeStamp() + }); + if (res.error) { + this.errorMessage = res.error; + } else { + console.log(res); + } + } catch (error) { + this.errorMessage = error.toString(); + } } } };