Skip to content

Commit

Permalink
add sort type
Browse files Browse the repository at this point in the history
  • Loading branch information
VovaStelmashchuk committed Sep 14, 2024
1 parent 5b0c2e1 commit b516b2a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
50 changes: 25 additions & 25 deletions database/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,62 +142,62 @@ 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,
queryName: 'taste',
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,
queryName: 'glassware',
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,
queryName: 'tags',
name: 'Інше',
items: await getTagsData(),
selectionType: 'MULTIPLE',
sortOrder: 6,
isOpen: false,
},
{
id: 2,
queryName: 'tools',
name: 'Приладдя',
items: await getToolsData(),
selectionType: 'MULTIPLE',
sortOrder: 7,
}
]
}

Expand Down
1 change: 0 additions & 1 deletion features/filters/description.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b516b2a

Please sign in to comment.