From 472ee0fd538ed320024715787d7401e1cc3d9f27 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Thu, 31 Jul 2025 17:52:17 +0200 Subject: [PATCH] Added TempStore to createddocuments and incominginvoices --- pages/createDocument/index.vue | 15 ++++++++++++++- pages/incomingInvoices/index.vue | 16 +++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/pages/createDocument/index.vue b/pages/createDocument/index.vue index f35a073..89d54a1 100644 --- a/pages/createDocument/index.vue +++ b/pages/createDocument/index.vue @@ -9,11 +9,19 @@ placeholder="Suche..." class="hidden lg:block" @keydown.esc="$event.target.blur()" + @change="tempStore.modifySearchString('createddocuments',searchString)" > + @@ -295,7 +303,12 @@ const displayCurrency = (value, currency = "€") => { } -const searchString = ref('') +const searchString = ref(tempStore.searchStrings['createddocuments'] ||'') + +const clearSearchString = () => { + tempStore.clearSearchString('createddocuments') + searchString.value = '' +} const selectedFilters = ref([]) const filteredRows = computed(() => { diff --git a/pages/incomingInvoices/index.vue b/pages/incomingInvoices/index.vue index 8d7ea0e..397e9b8 100644 --- a/pages/incomingInvoices/index.vue +++ b/pages/incomingInvoices/index.vue @@ -37,6 +37,7 @@ defineShortcuts({ }) const dataStore = useDataStore() +const tempStore = useTempStore() const router = useRouter() const sum = useSum() @@ -91,7 +92,12 @@ const selectedColumns = ref(templateColumns) const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column))) -const searchString = ref('') +const searchString = ref(tempStore.searchStrings['incominginvoices'] ||'') + +const clearSearchString = () => { + tempStore.clearSearchString('incominginvoices') + searchString.value = '' +} const filteredRows = computed(() => { let filteredItems = useSearch(searchString.value, items.value) @@ -143,11 +149,19 @@ const selectIncomingInvoice = (invoice) => { placeholder="Suche..." class="hidden lg:block" @keydown.esc="$event.target.blur()" + @change="tempStore.modifySearchString('incominginvoices',searchString)" > + + Beleg