From 5d8afb872226cb4437e831da09563172cd891ad2 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Fri, 3 May 2019 11:43:28 +0800 Subject: [PATCH] multiple po and invoice fix --- .../assets/js/pages/admin/booking/completed.vue | 14 +++++++------- resources/assets/js/pages/booking/completed.vue | 10 ++++------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/resources/assets/js/pages/admin/booking/completed.vue b/resources/assets/js/pages/admin/booking/completed.vue index f39495c7..b737e18a 100644 --- a/resources/assets/js/pages/admin/booking/completed.vue +++ b/resources/assets/js/pages/admin/booking/completed.vue @@ -43,7 +43,7 @@
- +

Download


@@ -62,7 +62,7 @@
- +

Download


@@ -293,7 +293,7 @@ - +

Download

@@ -397,11 +397,11 @@ }) }, methods: { - getExtension(path) { - return path.slice(-3); + getExtension(path){ + let index = path.lastIndexOf('.') + 1; + return path.slice(index); }, - isImage(path) { - return false; + isImage(path){ var ext = this.getExtension(path); return ext === 'jpg' || ext === 'jpeg' || ext === 'bmp' || ext === 'png'; }, diff --git a/resources/assets/js/pages/booking/completed.vue b/resources/assets/js/pages/booking/completed.vue index 7ac8d0e6..bd1b305d 100644 --- a/resources/assets/js/pages/booking/completed.vue +++ b/resources/assets/js/pages/booking/completed.vue @@ -14,7 +14,7 @@
- +

Download


@@ -28,7 +28,7 @@
- +

Download


@@ -42,7 +42,7 @@
- +

Download


@@ -108,7 +108,7 @@
@@ -205,8 +205,6 @@ export default { }, isImage(path){ var ext = this.getExtension(path); - console.log(path); - console.log(ext); return ext === 'jpg' || ext === 'jpeg' || ext === 'bmp' || ext === 'png'; }, getURL(path){