diff --git a/src/pages/Monitor/SalesClientsTable.vue b/src/pages/Monitor/SalesClientsTable.vue
index 3f2389471..91325986c 100644
--- a/src/pages/Monitor/SalesClientsTable.vue
+++ b/src/pages/Monitor/SalesClientsTable.vue
@@ -17,6 +17,7 @@ const { t } = useI18n();
const paginateRef = ref(null);
const workersActiveOptions = ref([]);
const clientsOptions = ref([]);
+const showHeaderFilters = ref(true);
const from = ref(Date.vnNew());
const to = ref(Date.vnNew());
@@ -37,9 +38,11 @@ const filter = reactive({
},
});
+const refetch = async () => await paginateRef.value.fetch();
+
watch(dateRange, (val) => {
filter.where['v.stamp'].between = val;
- paginateRef.value.fetch();
+ refetch();
});
function exprBuilder(param, value) {
@@ -166,23 +169,35 @@ const columns = computed(() => [
:no-data-label="t('globals.noResults')"
>
-
-
+
-
+
[
name: 'date',
field: 'dated',
align: 'left',
- columnFilter: null,
+ sortable: true,
},
{
label: t('salesOrdersTable.client'),
@@ -162,8 +162,7 @@ const redirectToOrderSummary = (orderId) => {
{{ toDateFormat(row.date_send) }}
diff --git a/src/pages/Monitor/SalesTicketsTable.vue b/src/pages/Monitor/SalesTicketsTable.vue
index 222ccb9d0..6e4a99e71 100644
--- a/src/pages/Monitor/SalesTicketsTable.vue
+++ b/src/pages/Monitor/SalesTicketsTable.vue
@@ -315,7 +315,9 @@ const getBadgeAttrs = (date) => {
if (comparation < 0) return { color: 'success', 'text-color': 'black' };
return { color: 'transparent', 'text-color': 'white' };
};
+
let refreshTimer = null;
+
const autoRefreshHandler = (value) => {
if (value)
refreshTimer = setInterval(() => paginateRef.value.fetch(), DEFAULT_AUTO_REFRESH);
@@ -324,8 +326,10 @@ const autoRefreshHandler = (value) => {
refreshTimer = null;
}
};
+
const redirectToTicketSummary = (id) => {
- router.push({ name: 'TicketSummary', params: { id } });
+ const url = `#/ticket/${id}/summary`;
+ window.open(url, '_blank');
};
const stateColors = {
@@ -348,6 +352,11 @@ const formatShippedDate = (date) => {
return toDateFormat(_date);
};
+const redirectToSales = (id) => {
+ const url = `#/ticket/${id}/sale`;
+ window.open(url, '_blank');
+};
+
onMounted(async () => {
const filteredColumns = columns.value.filter((col) => col.name !== 'rowActions');
allColumnNames.value = filteredColumns.map((col) => col.name);
@@ -517,8 +526,10 @@ onMounted(async () => {
- {{ row.id }}
-
+
+ {{ row.id }}
+
+
@@ -537,8 +548,7 @@ onMounted(async () => {
{{ formatShippedDate(row.shippedDate) }}
@@ -555,7 +565,7 @@ onMounted(async () => {
v-else
:color="stateColors[row.classColor] || 'transparent'"
:text-color="stateColors[row.classColor] ? 'black' : 'white'"
- dense
+ class="q-pa-sm"
style="font-size: 14px"
>
{{ row.state }}
@@ -585,7 +595,7 @@ onMounted(async () => {
{{ toCurrency(row.totalWithVat) }}
@@ -601,7 +611,7 @@ onMounted(async () => {
class="q-mr-sm"
flat
dense
- :to="{ name: 'TicketSale', params: { id: row.id } }"
+ @click="redirectToSales(row.id)"
>
{{ t('salesTicketsTable.goToLines') }}