Update class ใน payment

Update class ใน payment กับ upload ให้ดักจับชื่อ files
This commit is contained in:
AnandaTon 2023-03-21 12:05:29 +07:00
parent c2658b4594
commit b19660a3bf
2 changed files with 8 additions and 7 deletions

View file

@ -2,10 +2,10 @@
<div>
<q-card class="my-card q-mb-sm" bordered>
<q-card-actions class="q-pa-md text-left row justify-center" :class="getClass(status)">
<div class="text-bold col-12" :style="{ color: getFontColor(status) }">
<div class="text-bold col-12" :class="getFontColor(status)">
{{ message(status) }}
</div>
<div class="col-12" v-if="status === 'rejected'" :style="{ color: getFontColor(status) }">
<div class="col-12" v-if="status === 'rejected'" :class="getFontColor(status)">
<li>{{ rejectMessage }}</li>
</div>
<!-- <q-space /> -->
@ -106,7 +106,7 @@ const getClass = (val: string) => {
case 'rejected':
return 'bg-red-2'
case 'success':
return 'bg-light-green-11'
return 'bg-light-green-3'
default:
return 'bg-light-blue-1'
}
@ -126,13 +126,13 @@ const message = (val: string) => {
const getFontColor = (val: string) => {
switch (val) {
case 'processing':
return 'orange'
return 'text-orange'
case 'rejected':
return 'red'
return 'text-red-12'
case 'success':
return 'green'
return 'text-green'
default:
return 'blue'
return 'text-blue'
}
}
console.log(getFontColor)

View file

@ -116,6 +116,7 @@ onMounted(async () => {
})
const fileUpload = async (file: any) => {
name.value = file[0].name
return {
url: 'http://localhost:4444/upload',
method: 'POST'