changes
This commit is contained in:
@@ -7,7 +7,7 @@ const props = defineProps({
|
||||
viewMode: String,
|
||||
});
|
||||
|
||||
const { $dayjs } = useNuxtApp();
|
||||
const { $getdata, $dayjs } = useNuxtApp();
|
||||
const { invoices } = inject("orders");
|
||||
|
||||
const statuses = [
|
||||
@@ -51,16 +51,11 @@ const paymentStatuses = [
|
||||
},
|
||||
];
|
||||
|
||||
const employees = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Trần Thị B",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "Hoàng Văn E",
|
||||
},
|
||||
];
|
||||
const employees = ref([]);
|
||||
|
||||
onMounted(async () => {
|
||||
employees.value = await $getdata("Staff");
|
||||
});
|
||||
|
||||
const input = ref();
|
||||
const dateRange = ref({
|
||||
@@ -99,7 +94,7 @@ const filteredInvoices = computed(() => {
|
||||
const filteredByDates = filteredByEmployees.filter((order) => {
|
||||
if (!dateRange.value) return true;
|
||||
const from = $dayjs(dateRange.value.from || 0);
|
||||
const to = $dayjs(dateRange.value.to || undefined);
|
||||
const to = $dayjs(dateRange.value.to || undefined).endOf("day");
|
||||
const createTime = $dayjs(order.create_time);
|
||||
return createTime.isSameOrAfter(from) && createTime.isSameOrBefore(to);
|
||||
});
|
||||
@@ -123,10 +118,7 @@ function toggleStatus(id) {
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
v-if="true"
|
||||
class="card"
|
||||
>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="is-flex is-gap-2 is-align-items-center">
|
||||
<div class="field is-flex-grow-1 m-0">
|
||||
@@ -167,7 +159,7 @@ function toggleStatus(id) {
|
||||
</div>
|
||||
<div class="select">
|
||||
<select v-model="selectedPaymentStatus">
|
||||
<option :value="undefined">Phương thức thanh toán</option>
|
||||
<option :value="undefined">Thanh toán</option>
|
||||
<option
|
||||
v-for="paymentStatus in paymentStatuses"
|
||||
:key="paymentStatus.id"
|
||||
@@ -185,7 +177,7 @@ function toggleStatus(id) {
|
||||
:key="employee.id"
|
||||
:value="employee.id"
|
||||
>
|
||||
{{ employee.name }}
|
||||
{{ employee.fullname }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user