Added TempStore to createddocuments and incominginvoices
This commit is contained in:
@@ -9,11 +9,19 @@
|
||||
placeholder="Suche..."
|
||||
class="hidden lg:block"
|
||||
@keydown.esc="$event.target.blur()"
|
||||
@change="tempStore.modifySearchString('createddocuments',searchString)"
|
||||
>
|
||||
<template #trailing>
|
||||
<UKbd value="/" />
|
||||
</template>
|
||||
</UInput>
|
||||
<UButton
|
||||
icon="i-heroicons-x-mark"
|
||||
variant="outline"
|
||||
color="rose"
|
||||
@click="clearSearchString()"
|
||||
v-if="searchString.length > 0"
|
||||
/>
|
||||
<UButton
|
||||
@click="router.push(`/createDocument/edit`)"
|
||||
>
|
||||
@@ -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(() => {
|
||||
|
||||
|
||||
@@ -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)"
|
||||
>
|
||||
<template #trailing>
|
||||
<UKbd value="/" />
|
||||
</template>
|
||||
</UInput>
|
||||
<UButton
|
||||
icon="i-heroicons-x-mark"
|
||||
variant="outline"
|
||||
color="rose"
|
||||
@click="clearSearchString()"
|
||||
v-if="searchString.length > 0"
|
||||
/>
|
||||
|
||||
<UButton @click="router.push(`/incomingInvoices/create`)">+ Beleg</UButton>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user