From 0dcfb8bb7529d98b71ec7253aae9523eb3437bfb Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 17 Mar 2023 17:12:27 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20badge=20?= =?UTF-8?q?=E0=B9=80=E0=B8=9B=E0=B9=87=E0=B8=99=20tap=20=E0=B9=81=E0=B8=AA?= =?UTF-8?q?=E0=B8=94=E0=B8=87=E0=B8=84=E0=B9=88=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_exam/components/ExamPayment.vue | 123 +++++++----------- 1 file changed, 47 insertions(+), 76 deletions(-) diff --git a/src/modules/01_exam/components/ExamPayment.vue b/src/modules/01_exam/components/ExamPayment.vue index 1cd8d90..39b42fe 100644 --- a/src/modules/01_exam/components/ExamPayment.vue +++ b/src/modules/01_exam/components/ExamPayment.vue @@ -1,56 +1,28 @@ @@ -78,41 +50,44 @@ import { log } from 'console' import { defineComponent, ref, Ref } from 'vue' import { onMounted } from 'vue' import { ComponentRef } from '@vue/runtime-core' +const status = ref('') + +const img = ref('https://cdn-icons-png.flaticon.com/512/2496/2496846.png') -const img1 = ref('https://cdn-icons-png.flaticon.com/512/2496/2496846.png') -const img2 = ref('') const uploadImg = (file: any) => { - img1.value = - 'https://s359.kapook.com/r/600/auto/pagebuilder/ba154685-db18-4ac7-b318-a4a2b15b9d4c.jpg' - img2.value = 'https://f.ptcdn.info/914/078/000/rkq4y4prgcMlHAUfb3h-o.jpg' - console.log('string') + // img.value = + // 'https://s359.kapook.com/r/600/auto/pagebuilder/ba154685-db18-4ac7-b318-a4a2b15b9d4c.jpg' + img.value = + 'https://www.bangkokbank.com/-/media/feature/page-content/bbl-corporate/image-carousel-slides/digital-banking/bualuang-mbanking/how-to-use/payment/others/7_en.png' } -const badgeOutline = ref(true) -const badgeColor = ref('blue') -const badgeLabel = ref('รออัปโหลดหลักฐานชำระเงิน') + const slide = ref(1) -function updateBadge(): void { - badgeColor.value = 'orange' - badgeLabel.value = 'รอการตรวจสอบ' +const setStatus = (val: string) => { + status.value = val } -function updateBadgeReject(): void { - badgeColor.value = 'red' - badgeLabel.value = 'หลักฐานการชำระเงินผิดพลาด' -} -function updateBadgeSuceed(): void { - badgeColor.value = 'primary' - badgeLabel.value = 'ตรวจสอบเเล้ว' -} -function removeSlide(slide: Ref, carouselRef: ComponentRef): void { - // Get the current index of the slide - const currentSlide = slide.value - // Remove the current slide from the array - carouselRef.value.removeSlide(currentSlide) - - // If the current slide was the last one, go back one slide - if (slide.value === carouselRef.value.slides.length) { - slide.value -= 1 +const getClass = (val: string) => { + switch (val) { + case 'processing': + return 'bg-lime-12' + case 'rejected': + return 'bg-deep-orange-4' + case 'success': + return 'bg-green-12' + default: + return 'bg-blue-grey-2' + } +} +const message = (val: string) => { + switch (val) { + case 'processing': + return 'รอการตรวจสอบ' + case 'rejected': + return 'หลักฐานการชำระเงินผิดพลาด' + case 'success': + return 'ตรวจสอบเเล้ว' + default: + return 'รออัปโหลดหลักฐานชำระเงิน' } } @@ -121,8 +96,4 @@ function removeSlide(slide: Ref, carouselRef: ComponentRef): void { .q-img { margin: 0 auto; } -.my-carousel { - width: 100%; /* Set the width to 100% of the parent container */ - height: 500px; /* Set the height to the desired value */ -} From 4aea4f3d86f699330c4a0cc03570111ad7ea9f53 Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 17 Mar 2023 17:35:37 +0700 Subject: [PATCH 2/2] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=80?= =?UTF-8?q?=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=20rejected=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/01_exam/components/ExamPayment.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/modules/01_exam/components/ExamPayment.vue b/src/modules/01_exam/components/ExamPayment.vue index 39b42fe..1bf88ac 100644 --- a/src/modules/01_exam/components/ExamPayment.vue +++ b/src/modules/01_exam/components/ExamPayment.vue @@ -1,9 +1,13 @@