These changes are meant to make it possible for new events that come in to immediately render in the components that depend on them.
This commit is contained in:
parent
74ef9a8b3a
commit
cecb9ef0f0
5 changed files with 92 additions and 59 deletions
|
|
@ -144,6 +144,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted } from "vue";
|
||||
import { computedAsync } from "@vueuse/core";
|
||||
import MapMultipoint from "@/components/MapMultipoint.vue";
|
||||
import TimeRelative from "@/components/TimeRelative.vue";
|
||||
|
|
@ -151,6 +152,7 @@ import PublicReportCardCompliance from "@/components/PublicReportCardCompliance.
|
|||
import PublicReportCardNuisance from "@/components/PublicReportCardNuisance.vue";
|
||||
import PublicReportCardWater from "@/components/PublicReportCardWater.vue";
|
||||
import { formatAddress } from "@/format";
|
||||
import { log } from "@/log";
|
||||
import { useStoreResource } from "@/store/resource";
|
||||
import {
|
||||
PublicReport,
|
||||
|
|
@ -169,10 +171,15 @@ const emit = defineEmits<Emits>();
|
|||
const props = defineProps<Props>();
|
||||
const storeResource = useStoreResource();
|
||||
|
||||
const report = computedAsync(() => {
|
||||
return storeResource.publicreport.byURI(props.reportURI);
|
||||
const report = computed(() => {
|
||||
const result = storeResource.publicreport.byURI.get(props.reportURI);
|
||||
log.info("geting computed resource", props.reportURI, result);
|
||||
return result;
|
||||
});
|
||||
function openPhotoViewer(index: number) {
|
||||
emit("viewImage", index);
|
||||
}
|
||||
onMounted(async () => {
|
||||
await storeResource.publicreport.fetchByURI(props.reportURI);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue