Skip to content

Commit

Permalink
- Added the ability to customise which tags are filtered out from vis…
Browse files Browse the repository at this point in the history
…its on the Dashboard (3)
  • Loading branch information
hardiesoft committed Feb 11, 2025
1 parent 90b789f commit 5107903
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions browse-next/src/views/DashboardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,11 @@ const loadVisits = async () => {
}
};
const reloadDashboard = async () => {
await Promise.all([loadLocations(), loadVisits()]);
const reloadDashboard = async (nextProject) => {
console.log("Reloading dashboard", nextProject);
if (nextProject) {
await Promise.all([loadLocations(), loadVisits()]);
}
};
watch(timePeriodDays, loadVisits);
Expand All @@ -294,9 +297,7 @@ const loadedRouteName = ref<string>("");
onBeforeMount(async () => {
loadedRouteName.value = route.name as string;
console.log("Loaded route name", loadedRouteName.value);
if (!classifications.value) {
await getClassifications();
}
await getClassifications();
});
// TODO - Use this to show which stations *could* have had recordings, but may have had no activity.
const locationsWithOnlineOrActiveDevicesInSelectedTimeWindow = computed<
Expand Down Expand Up @@ -359,7 +360,9 @@ const canonicalLatLngForActiveLocations = canonicalLatLngForLocations(
provide(latLngForActiveLocations, canonicalLatLngForActiveLocations);
onMounted(async () => {
await reloadDashboard();
if (currentProject.value) {
await reloadDashboard(currentProject.value);
}
// Load visits for time period.
// Get species summary.
});
Expand Down

0 comments on commit 5107903

Please sign in to comment.