diff --git a/database/filters.js b/database/filters.js index 45ed6bf..18570a7 100644 --- a/database/filters.js +++ b/database/filters.js @@ -142,21 +142,13 @@ async function getAlcohole() { async function getFiltersData() { return [ - { - id: 6, - queryName: 'alcohol', - name: 'Алкоголь', - items: await getAlcohole(), - selectionType: 'MULTIPLE', - sortOrder: 2, - }, { id: 4, queryName: 'alcohol-volume', name: 'Міцність', items: await getAlcoholoVolume(), selectionType: 'SINGLE', - sortOrder: 1, + isOpen: true, }, { id: 3, @@ -164,7 +156,23 @@ async function getFiltersData() { name: 'Смак', items: await getTastes(), selectionType: 'MULTIPLE', - sortOrder: 3, + isOpen: false, + }, + { + id: 1, + queryName: 'goods', + name: 'Інгрідієнти', + items: await getGoods(), + selectionType: 'MULTIPLE', + isOpen: false, + }, + { + id: 6, + queryName: 'alcohol', + name: 'Категорія алкоголю', + items: await getAlcohole(), + selectionType: 'MULTIPLE', + isOpen: false, }, { id: 5, @@ -172,15 +180,15 @@ async function getFiltersData() { name: 'Стакан', items: await getGlasswares(), selectionType: 'SINGLE', - sortOrder: 4, + isOpen: false, }, { - id: 1, - queryName: 'goods', - name: 'Інгрідієнти', - items: await getGoods(), + id: 2, + queryName: 'tools', + name: 'Приладдя', + items: await getToolsData(), selectionType: 'MULTIPLE', - sortOrder: 5, + isOpen: false, }, { id: 0, @@ -188,16 +196,8 @@ async function getFiltersData() { name: 'Інше', items: await getTagsData(), selectionType: 'MULTIPLE', - sortOrder: 6, + isOpen: false, }, - { - id: 2, - queryName: 'tools', - name: 'Приладдя', - items: await getToolsData(), - selectionType: 'MULTIPLE', - sortOrder: 7, - } ] } diff --git a/features/filters/description.js b/features/filters/description.js index 92dce1a..bfd1b3f 100644 --- a/features/filters/description.js +++ b/features/filters/description.js @@ -61,7 +61,6 @@ class DescriptionBuilder { } async addAlchoholDescriptionIfExist(alcoholSlugs) { - console.log('alcoholSlugs', alcoholSlugs); if (alcoholSlugs?.length > 0) { const alcohols = await Database.collection('alcohol').find({ slug: { $in: alcoholSlugs } }).toArray(); if (alcohols.length > 0) {