diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue
index a3b64d264b..621e2acfc8 100644
--- a/src/components/VnTable/VnTable.vue
+++ b/src/components/VnTable/VnTable.vue
@@ -639,18 +639,10 @@ function handleOnDataSaved(_) {
:key="col?.id"
class="text-center"
>
-
- {{
- rows.reduce(
- (sum, currentRow) => sum + currentRow[col.name],
- 0
- )
- }}
-
+
diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue
index 79a79c383a..37101dafea 100644
--- a/src/components/ui/VnPaginate.vue
+++ b/src/components/ui/VnPaginate.vue
@@ -131,9 +131,8 @@ async function fetch(params) {
useArrayData(props.dataKey, params);
arrayData.reset(['filter.skip', 'skip']);
await arrayData.fetch({ append: false });
- if (!store.hasMoreData) {
- isLoading.value = false;
- }
+ if (!store.hasMoreData) isLoading.value = false;
+
emit('onFetch', store.data);
return store.data;
}
diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss
index aeac483be4..9f7c628488 100644
--- a/src/css/quasar.variables.scss
+++ b/src/css/quasar.variables.scss
@@ -36,7 +36,6 @@ $color-font-secondary: #777;
.bg-success {
background-color: $positive;
}
-
.bg-notice {
background-color: $info;
}
diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue
index 379be1d2f6..58a5c2e1bc 100644
--- a/src/pages/Entry/Card/EntrySummary.vue
+++ b/src/pages/Entry/Card/EntrySummary.vue
@@ -10,6 +10,7 @@ import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.v
import { toDate, toCurrency } from 'src/filters';
import { getUrl } from 'src/composables/getUrl';
import axios from 'axios';
+import FetchedTags from 'src/components/ui/FetchedTags.vue';
const route = useRoute();
const { t } = useI18n();
@@ -163,7 +164,7 @@ const fetchEntryBuys = async () => {
>
-
+
{
{
{
>
-
+
{{ col.value }}
diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue
index 7c4354b653..61c430b236 100644
--- a/src/pages/Entry/EntryLatestBuys.vue
+++ b/src/pages/Entry/EntryLatestBuys.vue
@@ -1,16 +1,17 @@
diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue
index 5027ad5117..fa4b1e6b62 100644
--- a/src/pages/Entry/EntryStockBought.vue
+++ b/src/pages/Entry/EntryStockBought.vue
@@ -56,7 +56,7 @@ const columns = [
summation: true,
},
{
- align: 'left',
+ align: 'center',
label: t('Bought'),
name: 'bought',
summation: true,
@@ -129,6 +129,18 @@ const setUserParams = async ({ dated }) => {
function openDialog() {
travelDialogRef.value = true;
}
+
+function setFooter(data) {
+ const footer = {
+ bought: 0,
+ reserve: 0,
+ };
+ data.forEach((row) => {
+ footer.bought += row?.bought;
+ footer.reserve += row?.reserve;
+ });
+ tableRef.value.footer = footer;
+}
@@ -203,6 +215,7 @@ function openDialog() {
order="reserve DESC"
:right-search="false"
:is-editable="true"
+ @on-fetch="(data) => setFooter(data)"
:create="{
urlCreate: 'StockBoughts',
title: t('Reserve some space'),
@@ -223,11 +236,31 @@ function openDialog() {
+
+
+ {{ row?.bought }}
+
+
+
+
+ {{ tableRef.footer.reserve }}
+
+
+
+
+ {{ tableRef.footer.bought }}
+
+
-
es:
diff --git a/src/pages/Entry/EntryStockBoughtDetail.vue b/src/pages/Entry/EntryStockBoughtDetail.vue
index 9489c2362e..cdcd283819 100644
--- a/src/pages/Entry/EntryStockBoughtDetail.vue
+++ b/src/pages/Entry/EntryStockBoughtDetail.vue
@@ -81,7 +81,13 @@ const columns = [
auto-load
>
-
+
@@ -103,10 +109,10 @@ const columns = [
.container {
max-width: 50vw;
overflow: auto;
- display: flex;
justify-content: center;
align-items: center;
margin: auto;
+ background-color: var(--vn-section-color);
}