chore: install prettier
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
order: Object,
|
||||
selected: Boolean
|
||||
selected: Boolean,
|
||||
});
|
||||
|
||||
const { $dayjs, $shortenCurrency } = useNuxtApp();
|
||||
const emit = defineEmits(['selectOrder', 'unselect'])
|
||||
const emit = defineEmits(["selectOrder", "unselect"]);
|
||||
</script>
|
||||
<template>
|
||||
<tr
|
||||
<tr
|
||||
:class="['is-clickable', selected && 'is-selected']"
|
||||
@click="selected ? emit('unselect') : emit('selectOrder', order.id)"
|
||||
>
|
||||
@@ -22,9 +22,10 @@ const emit = defineEmits(['selectOrder', 'unselect'])
|
||||
<div>
|
||||
<p>{{ order.customer__name }}</p>
|
||||
<div class="is-flex is-gap-0.5 is-align-items-center mt-1 has-text-grey">
|
||||
<Icon name="material-symbols:call-outline-rounded"
|
||||
<Icon
|
||||
name="material-symbols:call-outline-rounded"
|
||||
:size="15"
|
||||
/>
|
||||
/>
|
||||
<span class="fs-12">{{ order.customer__phone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,38 +37,52 @@ const emit = defineEmits(['selectOrder', 'unselect'])
|
||||
</div>
|
||||
</td>
|
||||
<td class="has-text-centered">
|
||||
<span :class="[
|
||||
'tag rounded-full',
|
||||
`has-background-${order.status__color}-80 has-text-${order.status__color}-25`
|
||||
]">
|
||||
<span
|
||||
:class="['tag rounded-full', `has-background-${order.status__color}-80 has-text-${order.status__color}-25`]"
|
||||
>
|
||||
{{ order.status__name }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<p :class="`has-text-${order.payment_status__color}-40`">{{ order.payment_status__name }}</p>
|
||||
<p :class="`has-text-${order.payment_status__color}-40`">
|
||||
{{ order.payment_status__name }}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p :class="`has-text-${order.delivery_status__color}-40`">{{ order.delivery_status__name }}</p>
|
||||
<p :class="`has-text-${order.delivery_status__color}-40`">
|
||||
{{ order.delivery_status__name }}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div class="is-flex is-gap-0.5">
|
||||
<Icon :size="18" name="material-symbols:calendar-month-outline-rounded" />
|
||||
<span>{{ $dayjs(order.create_time).format('L') }}</span>
|
||||
<Icon
|
||||
:size="18"
|
||||
name="material-symbols:calendar-month-outline-rounded"
|
||||
/>
|
||||
<span>{{ $dayjs(order.create_time).format("L") }}</span>
|
||||
</div>
|
||||
<p class="has-text-grey fs-12">{{ $dayjs(order.create_time).format('HH:mm') }}</p>
|
||||
<p class="has-text-grey fs-12">
|
||||
{{ $dayjs(order.create_time).format("HH:mm") }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button
|
||||
v-if="order.status__name !== 'Hoàn thành'"
|
||||
:class="[
|
||||
'button fs-12 has-text-white rounded-lg',
|
||||
order.status__name === 'Nháp' ? 'is-primary' : order.status__name === 'Đã xác nhận' ? 'is-orange' : 'is-success'
|
||||
]"
|
||||
>
|
||||
{{ order.status__name === 'Nháp' ? 'Xác nhận' : order.status__name === 'Đã xác nhận' ? 'Giao hàng' : 'Hoàn thành' }}
|
||||
</button>
|
||||
v-if="order.status__name !== 'Hoàn thành'"
|
||||
:class="[
|
||||
'button fs-12 has-text-white rounded-lg',
|
||||
order.status__name === 'Nháp'
|
||||
? 'is-primary'
|
||||
: order.status__name === 'Đã xác nhận'
|
||||
? 'is-orange'
|
||||
: 'is-success',
|
||||
]"
|
||||
>
|
||||
{{
|
||||
order.status__name === "Nháp" ? "Xác nhận" : order.status__name === "Đã xác nhận" ? "Giao hàng" : "Hoàn thành"
|
||||
}}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -80,4 +95,4 @@ td {
|
||||
vertical-align: middle;
|
||||
--bulma-table-cell-padding: 0.75em;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user