refaktoryzacja service api.
wydzielenie mockow. dodanie parsowania wyszukiwania
This commit is contained in:
@@ -78,7 +78,7 @@ import { useProductsStore } from 'src/stores/productsStore'
|
||||
|
||||
const productsStore = useProductsStore()
|
||||
const uiStore = useUiStore()
|
||||
const searchQuery = ref(productsStore.filters.search)
|
||||
const searchQuery = ref(productsStore.searchQuery)
|
||||
const activeMonth = ref('all')
|
||||
|
||||
const monthFilters = [
|
||||
@@ -98,7 +98,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
watch(searchQuery, (value) => {
|
||||
productsStore.setFilters({ search: value })
|
||||
productsStore.setSearchQuery(value)
|
||||
})
|
||||
|
||||
function openAdvancedSearch() {
|
||||
@@ -135,7 +135,7 @@ function openProductionStatuses({ product, partType } = {}) {
|
||||
}
|
||||
|
||||
function applySearch() {
|
||||
productsStore.applyFilters({ search: searchQuery.value })
|
||||
productsStore.applySearch(searchQuery.value)
|
||||
}
|
||||
|
||||
function selectMonth(month) {
|
||||
|
||||
Reference in New Issue
Block a user