diff --git a/src/web/src/modules/centre/components/BulkDataEntryCard.vue b/src/web/src/modules/centre/components/BulkDataEntryCard.vue new file mode 100644 index 0000000..26c781c --- /dev/null +++ b/src/web/src/modules/centre/components/BulkDataEntryCard.vue @@ -0,0 +1,205 @@ + + + + + + + + + + {{ totalCountHeader }} + + {{ dateHeader }} + + + + + + + + + + + + + + + + Visitor Origin + Daily Visitors + + + + + {{ location.name }} + + + + + + + updateLocationCategoryTotal(location, newValue)" + density="compact" + hide-details + min="0" + single-line + type="number"> + + + + + + + Save + + + + Not site selected + + + + + + diff --git a/src/web/src/modules/centre/components/DataEntry.vue b/src/web/src/modules/centre/components/DataEntry.vue index 29a0209..91249d3 100644 --- a/src/web/src/modules/centre/components/DataEntry.vue +++ b/src/web/src/modules/centre/components/DataEntry.vue @@ -1,187 +1,45 @@ - Daily Data Entry - - - - + Daily Data Entry + + + - - - - - {{ totalCountHeader }} - {{ dateHeader }} - - - - - - - - - - Visitor Origin - - Daily Totals - - - - - - {{ location.name }} - - - - +1 - +5 - -1 - -5 - - - - - {{ location.daily_total }} - - - + > - Not site selected - + + + + + + + + + - diff --git a/src/web/src/modules/centre/components/IncrementalDataEntryCard.vue b/src/web/src/modules/centre/components/IncrementalDataEntryCard.vue new file mode 100644 index 0000000..0375f32 --- /dev/null +++ b/src/web/src/modules/centre/components/IncrementalDataEntryCard.vue @@ -0,0 +1,186 @@ + + + + + + + + + {{ totalCountHeader }} + {{ dateHeader }} + + + + + + + + + + Visitor Origin + + Daily Totals + + + + + + {{ location.name }} + + + + +1 + +5 + -1 + -5 + + + + + {{ location.daily_total }} + + + + + Not site selected + + + + + + diff --git a/src/web/src/modules/centre/store/index.ts b/src/web/src/modules/centre/store/index.ts index 065d873..51c2ac6 100644 --- a/src/web/src/modules/centre/store/index.ts +++ b/src/web/src/modules/centre/store/index.ts @@ -52,7 +52,7 @@ export const useCentreStore = defineStore("centre", { async save() { const api = useApiStore(); - api + return api .secureCall("put", `${VISITORCENTRE_URL}/record-stats`, { date: this.selectedDate, site: this.selectedSite, @@ -70,9 +70,11 @@ export const useCentreStore = defineStore("centre", { this.manageSites.splice(index, 1, this.selectedSite); } } - }); - m.notify({ variant: "success", text: "Saved" }); + m.notify({ variant: "success", text: "Saved" }); + + return this.selectedSite + }); }, add(originName: string, date: string, amount: number) { diff --git a/src/web/src/modules/home/views/Reports.vue b/src/web/src/modules/home/views/Reports.vue index befcdb5..15d1bdc 100644 --- a/src/web/src/modules/home/views/Reports.vue +++ b/src/web/src/modules/home/views/Reports.vue @@ -34,7 +34,6 @@ export default { if (iframeEle) { iframeEle.addEventListener("load", function () { // Hide the loading indicator - console.log("FINISHED LOADING"); that.iFrameLoading = false; }); }