Mapa s trasami letu u eventu, drobna uprava vizualu eventu

This commit is contained in:
Michal Kváček
2024-02-28 09:41:15 +01:00
parent 92678ec829
commit 7a45a0133e
14 changed files with 211 additions and 84 deletions
+2 -9
View File
@@ -5,6 +5,7 @@ import AvatarFromPhoto from "components/avatars/AvatarFromPhoto.vue";
import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleton.vue";
import {computed} from "vue";
import LoadMoreList from "components/LoadMoreList.vue";
import {pluralize} from "../../composables/utils";
const props = defineProps({
items: {
@@ -37,16 +38,8 @@ const routeDetail = (flight) => {
else
return {name: "flightDetail", params: {id: flight.id}}
};
const pluralize = (count, singular, plural, pluralMore) => {
if (count === 1) return singular;
else if (count < 5) return plural;
else return pluralMore;
}
const loadMoreCount = computed(() => {
const remaining = props.totalItemsCount - props.items.length;
return Math.min(props.itemsPerPage, remaining);
return Math.min(props.itemsPerPage, props.totalItemsCount - props.items.length);
});
</script>