Move user to compliance complete page for submitted reports
This commit is contained in:
parent
fcd95f1a25
commit
34a136eba5
1 changed files with 9 additions and 1 deletions
|
|
@ -49,8 +49,10 @@ body > .container-fluid {
|
|||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import { computedAsync } from "@vueuse/core";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import type { Image } from "@/components/ImageUpload.vue";
|
||||
import { useRoutes } from "@/rmo/route/use";
|
||||
import { useStoreDistrict } from "@/rmo/store/district";
|
||||
import { useStoreLocal } from "@/store/local";
|
||||
import { useStoreLocation } from "@/store/location";
|
||||
|
|
@ -70,11 +72,13 @@ interface Props {
|
|||
public_id: string;
|
||||
}
|
||||
|
||||
const district = ref<District | undefined>(undefined);
|
||||
const isLoading = ref<boolean>(true);
|
||||
const isUploading = ref<boolean>(false);
|
||||
const props = defineProps<Props>();
|
||||
const report = ref<PublicReportCompliance | undefined>(undefined);
|
||||
const district = ref<District | undefined>(undefined);
|
||||
const router = useRouter();
|
||||
const routes = useRoutes();
|
||||
const storeDistrict = useStoreDistrict();
|
||||
const storeLocal = useStoreLocal();
|
||||
const storeLocation = useStoreLocation();
|
||||
|
|
@ -161,6 +165,10 @@ async function doMounted() {
|
|||
const d = await storeDistrict.byURI(r.district);
|
||||
district.value = d;
|
||||
isLoading.value = false;
|
||||
const pr = r as PublicReportCompliance;
|
||||
if (pr.submitted) {
|
||||
router.replace(routes.ComplianceComplete(r.public_id));
|
||||
}
|
||||
}
|
||||
function doPermission() {
|
||||
if (!report.value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue