Update sorting
This commit is contained in:
rodič
697c94f868
revize
4d05afe592
|
@ -73,7 +73,7 @@
|
||||||
class="grid grid-cols-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 my-6 text-center text-xl"
|
class="grid grid-cols-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 my-6 text-center text-xl"
|
||||||
>
|
>
|
||||||
<CollectionList
|
<CollectionList
|
||||||
arr={data.bundle.speakers.filter((s) => !['cz', 'sk'].includes(s.country))}
|
arr={data.bundle.speakers.filter((s) => !['cz', 'sk'].includes(s.country)).sort((x, y) => (x.name > y.name ? 1 : -1))}
|
||||||
{entry}
|
{entry}
|
||||||
offer="true"
|
offer="true"
|
||||||
/>
|
/>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
class="grid grid-cols-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 my-6 text-center text-xl"
|
class="grid grid-cols-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 my-6 text-center text-xl"
|
||||||
>
|
>
|
||||||
<CollectionList
|
<CollectionList
|
||||||
arr={data.bundle.speakers.filter((s) => ['cz', 'sk'].includes(s.country))}
|
arr={data.bundle.speakers.filter((s) => ['cz', 'sk'].includes(s.country)).sort((x, y) => (x.name > y.name ? 1 : -1))}
|
||||||
{entry}
|
{entry}
|
||||||
offer="true"
|
offer="true"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -43,6 +43,12 @@
|
||||||
// return compareAsc(item.new Date(query.segment) > 0)
|
// return compareAsc(item.new Date(query.segment) > 0)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (['speakers', 'benefits', 'media-partner'].includes(type)) {
|
||||||
|
_items = _items.sort((x, y) => (x.name > y.name ? 1 : -1))
|
||||||
|
}
|
||||||
|
if (type === 'places') {
|
||||||
|
_items = _items.sort((x, y) => (x.capacity > y.capacity ? -1 : 1))
|
||||||
|
}
|
||||||
|
|
||||||
return _items;
|
return _items;
|
||||||
}
|
}
|
||||||
|
|
Načítá se…
Odkázat v novém úkolu