diff --git a/src/components/ui/VnSubToolbar.vue b/src/components/ui/VnSubToolbar.vue
new file mode 100644
index 000000000..81a1820f1
--- /dev/null
+++ b/src/components/ui/VnSubToolbar.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue
index a8c832967..b6c948c96 100644
--- a/src/pages/Claim/Card/ClaimCard.vue
+++ b/src/pages/Claim/Card/ClaimCard.vue
@@ -7,8 +7,8 @@ import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import ClaimDescriptor from './ClaimDescriptor.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
-import { onMounted } from 'vue';
const stateStore = useStateStore();
const { t } = useI18n();
const route = useRoute();
@@ -41,11 +41,7 @@ const entityId = computed(() => {
-
-
-
-
-
+
diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue
index fa7fb123f..e7f67bcc2 100644
--- a/src/pages/Claim/Card/ClaimLines.vue
+++ b/src/pages/Claim/Card/ClaimLines.vue
@@ -43,17 +43,20 @@ async function onFetchClaim(data) {
fetchMana();
}
-const amount = ref(0);
-const amountClaimed = ref(0);
+const amount = ref();
+const amountClaimed = ref();
async function onFetch(rows) {
+ amount.value = 0;
+ amountClaimed.value = 0;
if (!rows || !rows.length) return;
+
amount.value = rows.reduce(
- (acumulator, { sale }) => acumulator + sale.price * sale.quantity,
+ (accumulator, { sale }) => accumulator + sale.price * sale.quantity,
0
);
amountClaimed.value = rows.reduce(
- (acumulator, line) => acumulator + line.sale.price * line.quantity,
+ (accumulator, line) => accumulator + line.sale.price * line.quantity,
0
);
}
@@ -189,6 +192,7 @@ function showImportDialog() {
save-url="ClaimBeginnings/crud"
:filter="linesFilter"
@on-fetch="onFetch"
+ @save-changes="onFetch"
v-model:selected="selected"
:default-save="false"
:default-reset="false"
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
index d24eb3ef2..bfab4b9e1 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
@@ -4,6 +4,7 @@ import { useStateStore } from 'stores/useStateStore';
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
import LeftMenu from 'components/LeftMenu.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const stateStore = useStateStore();
const { t } = useI18n();
@@ -26,11 +27,7 @@ const { t } = useI18n();
-
-
-
-
-
+
diff --git a/src/pages/Shelving/Card/ShelvingForm.vue b/src/pages/Shelving/Card/ShelvingForm.vue
index e30ac1939..9740e3664 100644
--- a/src/pages/Shelving/Card/ShelvingForm.vue
+++ b/src/pages/Shelving/Card/ShelvingForm.vue
@@ -5,6 +5,7 @@ import { useRoute } from 'vue-router';
import VnRow from 'components/ui/VnRow.vue';
import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const { t } = useI18n();
const route = useRoute();
@@ -15,7 +16,7 @@ const defaultInitialData = {
priority: 0,
code: null,
isRecyclable: false,
-}
+};
const parkingFilter = { fields: ['id', 'code'] };
const parkingList = ref([]);
@@ -58,11 +59,7 @@ const shelvingFilter = {
};
-
-
-
-
-
+
{
const isMounted = ref(false);
const leftDrawer = ref(false);
const rightDrawer = ref(false);
+ const subToolbar = ref(false);
function toggleLeftDrawer() {
leftDrawer.value = !leftDrawer.value;
@@ -14,6 +15,10 @@ export const useStateStore = defineStore('stateStore', () => {
rightDrawer.value = !rightDrawer.value;
}
+ function toggleSubToolbar() {
+ subToolbar.value = !subToolbar.value;
+ }
+
function setMounted() {
isMounted.value = true;
}
@@ -31,10 +36,7 @@ export const useStateStore = defineStore('stateStore', () => {
}
function isSubToolbarShown() {
- return (
- !!document.querySelector('#st-data') &&
- !!document.querySelector('#st-actions')
- );
+ return subToolbar.value;
}
return {
@@ -47,5 +49,6 @@ export const useStateStore = defineStore('stateStore', () => {
isLeftDrawerShown,
isRightDrawerShown,
isSubToolbarShown,
+ toggleSubToolbar,
};
});