From 5c4823c4c9d9adf5e1d3e9c35693b96a291df635 Mon Sep 17 00:00:00 2001 From: MrNaif2018 Date: Mon, 3 Apr 2023 23:29:51 +0300 Subject: [PATCH] Add store POS icon --- components/Header.vue | 10 ++++++++++ pages/pos.vue | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/components/Header.vue b/components/Header.vue index d1351e2..ad23fa4 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -8,6 +8,13 @@ strong i {{$store.state.store.name}} .navbar-end.is-flex-touch + .navbar-item + .field + p.control + a.button.is-light(@click="openPOS") + span.icon.cartitem(style="width: 40px") + i.fa.fa-lg.fa-calculator + span.is-hidden-mobile POS .navbar-item .field p.control @@ -51,6 +58,9 @@ export default { }, methods: { ...mapActions(["openSidebarCart"]), + openPOS() { + this.$router.push("/pos") + }, }, } diff --git a/pages/pos.vue b/pages/pos.vue index 554f6ee..69fac19 100644 --- a/pages/pos.vue +++ b/pages/pos.vue @@ -169,7 +169,11 @@ export default { price: this.total, }) .then((res) => { - this.total = "0" + this.items = { + amount: "0", + discount: "0", + tip: "0", + } window.bitcart.onModalReceiveMessage((data) => { if (typeof data.data === "object" && "status" in data.data) { this.status = data.data.status