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">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref } from "vue";
|
import { computed, onMounted, ref } from "vue";
|
||||||
import { computedAsync } from "@vueuse/core";
|
import { computedAsync } from "@vueuse/core";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import type { Image } from "@/components/ImageUpload.vue";
|
import type { Image } from "@/components/ImageUpload.vue";
|
||||||
|
import { useRoutes } from "@/rmo/route/use";
|
||||||
import { useStoreDistrict } from "@/rmo/store/district";
|
import { useStoreDistrict } from "@/rmo/store/district";
|
||||||
import { useStoreLocal } from "@/store/local";
|
import { useStoreLocal } from "@/store/local";
|
||||||
import { useStoreLocation } from "@/store/location";
|
import { useStoreLocation } from "@/store/location";
|
||||||
|
|
@ -70,11 +72,13 @@ interface Props {
|
||||||
public_id: string;
|
public_id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const district = ref<District | undefined>(undefined);
|
||||||
const isLoading = ref<boolean>(true);
|
const isLoading = ref<boolean>(true);
|
||||||
const isUploading = ref<boolean>(false);
|
const isUploading = ref<boolean>(false);
|
||||||
const props = defineProps<Props>();
|
const props = defineProps<Props>();
|
||||||
const report = ref<PublicReportCompliance | undefined>(undefined);
|
const report = ref<PublicReportCompliance | undefined>(undefined);
|
||||||
const district = ref<District | undefined>(undefined);
|
const router = useRouter();
|
||||||
|
const routes = useRoutes();
|
||||||
const storeDistrict = useStoreDistrict();
|
const storeDistrict = useStoreDistrict();
|
||||||
const storeLocal = useStoreLocal();
|
const storeLocal = useStoreLocal();
|
||||||
const storeLocation = useStoreLocation();
|
const storeLocation = useStoreLocation();
|
||||||
|
|
@ -161,6 +165,10 @@ async function doMounted() {
|
||||||
const d = await storeDistrict.byURI(r.district);
|
const d = await storeDistrict.byURI(r.district);
|
||||||
district.value = d;
|
district.value = d;
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
|
const pr = r as PublicReportCompliance;
|
||||||
|
if (pr.submitted) {
|
||||||
|
router.replace(routes.ComplianceComplete(r.public_id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function doPermission() {
|
function doPermission() {
|
||||||
if (!report.value) {
|
if (!report.value) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue