diff --git a/components/Header.vue b/components/Header.vue index ad23fa4..7530363 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -8,7 +8,7 @@ strong i {{$store.state.store.name}} .navbar-end.is-flex-touch - .navbar-item + .navbar-item(v-if="$store.state.store?.checkout_settings?.pos_screen_enabled") .field p.control a.button.is-light(@click="openPOS") diff --git a/pages/pos.vue b/pages/pos.vue index 69fac19..c066b39 100644 --- a/pages/pos.vue +++ b/pages/pos.vue @@ -89,6 +89,14 @@ import mixins from "@/utils/mixins" export default { mixins: [mixins], + async asyncData({ store, redirect }) { + try { + await store.dispatch("syncStats") + } catch (e) {} + if (!store.state.store?.checkout_settings?.pos_screen_enabled) { + return redirect("/") + } + }, data() { return { items: { diff --git a/version.js b/version.js index 3ee65be..7dd23d2 100644 --- a/version.js +++ b/version.js @@ -1,3 +1,3 @@ -const VERSION = "0.7.4.0" +const VERSION = "0.7.4.1" export default VERSION