diff --git a/.eslintrc.js b/.eslintrc.js
index 203973d..813ee5b 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -29,5 +29,14 @@ module.exports = {
},
],
"vue/multi-word-component-names": "off",
+ "new-cap": [
+ "error",
+ {
+ newIsCap: true,
+ capIsNew: false,
+ properties: true,
+ newIsCapExceptions: ["jsPDF"],
+ },
+ ],
},
}
diff --git a/components/ReceiptComponent.vue b/components/ReceiptComponent.vue
new file mode 100644
index 0000000..ace84c7
--- /dev/null
+++ b/components/ReceiptComponent.vue
@@ -0,0 +1,119 @@
+
+
+
+
+
+ Bitcart AI
+
+
+
+
+
+
+ Invoice ID
+
+ {{ invoice.id }}
+
+
+
+
+ Order ID
+
+ {{ invoice.order_id }}
+
+
+
+
+ Store ID
+
+ {{ invoice.store_id }}
+
+
+
+
+ Total Amount
+
+ {{ invoice.price }}
+ {{ invoice.currency }}
+
+
+
+ Sent Amount
+
+ {{ invoice.sent_amount + " " + invoice.currency }}
+
+
+
+ Total Fiat
+
+ {{ payment.amount + " " + payment.currency.toUpperCase() }}
+
+
+
+ Exchange Rate
+
+ {{ payment.rate_str }}
+
+
+
+ Amount Due
+
+ {{ invoice.sent_amount }} {{ invoice.currency }}
+
+
+
+
+ Date
+
+ {{ invoice.paid_date.substring(0, 19).replace("T", " ") }}
+
+
+
+
+
+
+
+
diff --git a/nuxt.config.js b/nuxt.config.js
index 3926c3c..fb9762f 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -71,6 +71,7 @@ export default {
"~/plugins/eventbus.js",
{ src: "~/plugins/imageinput.js", mode: "client" },
{ src: "~/plugins/datetimepicker.js", mode: "client" },
+ { src: "~/plugins/vue-html2pdf.js", mode: "client" },
"~/plugins/vueQR.js",
],
/*
diff --git a/package.json b/package.json
index 6033810..ed0c4a4 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,8 @@
"js-cookie": "^3.0.5",
"nuxt-start": "^2.15.1",
"socks-proxy-agent": "^8.0.0",
- "vuex-persistedstate": "^4.1.0"
+ "vuex-persistedstate": "^4.1.0",
+ "vue-html2pdf": "^1.8.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.16.5",
diff --git a/pages/i/_id.vue b/pages/i/_id.vue
index e7c0392..21bae68 100644
--- a/pages/i/_id.vue
+++ b/pages/i/_id.vue
@@ -55,6 +55,32 @@
{{ texts[status].text }}
+
+
+
+
+
+
+
+
+ Print
+
@@ -63,13 +89,16 @@