diff --git a/src/views/dashboards/userDashboard/bookings/displays/tables/OrderBookingsTable.vue b/src/views/dashboards/userDashboard/bookings/displays/tables/OrderBookingsTable.vue index f0949ad0..f3594ffa 100644 --- a/src/views/dashboards/userDashboard/bookings/displays/tables/OrderBookingsTable.vue +++ b/src/views/dashboards/userDashboard/bookings/displays/tables/OrderBookingsTable.vue @@ -281,6 +281,12 @@ const switchOnlyPending = (event) => { onOrderIdFilterChange({ target: { value: event.target.checked ? 'is null' : '*' } }); } +const switchOnlyPendingAndOnlyToday = (event) => { + onOnlyTodayFilterChange({ target: { value: event.target.checked ? new Date().toISOString().split('T')[0] : '*' } }, false); + onOrderIdFilterChange({ target: { value: event.target.checked ? 'is null' : '*' } }, false); + loadList(); +} + const isFilterApplied = () => { if (!router.currentRoute.value.path.startsWith('/admin')) { if (departmentFilter.value !== '*') { @@ -408,7 +414,7 @@ const resetVersionToNew = () => {
- +
@@ -639,6 +645,20 @@ const resetVersionToNew = () => {
+ + +
+ +
+ + +
+
+ +
+ +
+ + +
+
@@ -696,7 +757,31 @@ const resetVersionToNew = () => {

- {{ new Date(booking.datetime).toLocaleDateString('da-DK', { year: 'numeric', month: 'long', day: 'numeric' }) }} + + {{ + (() => { + const bookingDate = new Date(booking.datetime); + const today = new Date(); + const yesterday = new Date(); + yesterday.setDate(today.getDate() - 1); + if (bookingDate.toDateString() === today.toDateString()) { + return 'I dag'; + } else if (bookingDate.toDateString() === yesterday.toDateString()) { + return 'I går'; + } else { + return bookingDate.toLocaleDateString('da-DK', { year: 'numeric', month: 'long', day: 'numeric' }); + } + })() + }} + • + {{ sortedList.filter((b) => { + const bDate = new Date(b.datetime); + const bookingDate = new Date(booking.datetime); + return bDate.getFullYear() === bookingDate.getFullYear() && + bDate.getMonth() === bookingDate.getMonth() && + bDate.getDate() === bookingDate.getDate(); + }).length }} {{SessionUser.objects.order_bookings.meta.labels.multiple.toLowerCase()}} +
@@ -797,6 +882,16 @@ const resetVersionToNew = () => {
+ +
+
+ +
+