Added TempStore to createddocuments and incominginvoices
This commit is contained in:
@@ -9,11 +9,19 @@
|
|||||||
placeholder="Suche..."
|
placeholder="Suche..."
|
||||||
class="hidden lg:block"
|
class="hidden lg:block"
|
||||||
@keydown.esc="$event.target.blur()"
|
@keydown.esc="$event.target.blur()"
|
||||||
|
@change="tempStore.modifySearchString('createddocuments',searchString)"
|
||||||
>
|
>
|
||||||
<template #trailing>
|
<template #trailing>
|
||||||
<UKbd value="/" />
|
<UKbd value="/" />
|
||||||
</template>
|
</template>
|
||||||
</UInput>
|
</UInput>
|
||||||
|
<UButton
|
||||||
|
icon="i-heroicons-x-mark"
|
||||||
|
variant="outline"
|
||||||
|
color="rose"
|
||||||
|
@click="clearSearchString()"
|
||||||
|
v-if="searchString.length > 0"
|
||||||
|
/>
|
||||||
<UButton
|
<UButton
|
||||||
@click="router.push(`/createDocument/edit`)"
|
@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 selectedFilters = ref([])
|
||||||
const filteredRows = computed(() => {
|
const filteredRows = computed(() => {
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ defineShortcuts({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
|
const tempStore = useTempStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const sum = useSum()
|
const sum = useSum()
|
||||||
@@ -91,7 +92,12 @@ const selectedColumns = ref(templateColumns)
|
|||||||
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
|
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(() => {
|
const filteredRows = computed(() => {
|
||||||
let filteredItems = useSearch(searchString.value, items.value)
|
let filteredItems = useSearch(searchString.value, items.value)
|
||||||
|
|
||||||
@@ -143,11 +149,19 @@ const selectIncomingInvoice = (invoice) => {
|
|||||||
placeholder="Suche..."
|
placeholder="Suche..."
|
||||||
class="hidden lg:block"
|
class="hidden lg:block"
|
||||||
@keydown.esc="$event.target.blur()"
|
@keydown.esc="$event.target.blur()"
|
||||||
|
@change="tempStore.modifySearchString('incominginvoices',searchString)"
|
||||||
>
|
>
|
||||||
<template #trailing>
|
<template #trailing>
|
||||||
<UKbd value="/" />
|
<UKbd value="/" />
|
||||||
</template>
|
</template>
|
||||||
</UInput>
|
</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>
|
<UButton @click="router.push(`/incomingInvoices/create`)">+ Beleg</UButton>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user