Skip to content

Commit

Permalink
Merge pull request ytgov#27 from icefoganalytics/main
Browse files Browse the repository at this point in the history
More offline
  • Loading branch information
datajohnson authored Jul 27, 2024
2 parents 42acb04 + 4082d05 commit c03eaba
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
6 changes: 1 addition & 5 deletions web/src/components/incident/CreateCompletePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@
</v-form>
</template>

<script setup>
import { ref } from "vue";
const eventType = ref(null);
</script>
<script setup></script>
36 changes: 36 additions & 0 deletions web/src/components/incident/CreateCompletePageOffline.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<template>
<h1 class="text-h4">Report Complete</h1>
<!-- <p class="text-body-2">
Personal information is collected under the Workers' Safety and Compensation Act, Section #, for the purposes of
Incident investigation and corrective action. For further information, contant the Director of Health, Safety &
Wellbeing at 867-332-5974
</p> -->

<v-form class="mt-6">
<section>
<v-card class="default">
<v-card-item class="py-4 px-6 mb-2 bg-sun">
<h4 class="text-h6">Thank you!</h4>
</v-card-item>
<v-card-text>
<p class="text-body-1 mb-5 mt-5">
Your submission has been received and you will recieve email notifications regarding the status of this
submission.
</p>
<p class="text-body-1 mb-5 mt-5">
At any time, you can also view your previously submitted reports on this site.
</p>

<div class="d-flex flex-wrap">
<v-btn color="primary" to="/" class="mr-5 mb-0">Go back home</v-btn>
<v-btn color="warning" to="/report-an-incident-offline" variant="tonal" class="mb-0"
>Submit another report</v-btn
>
</div>
</v-card-text>
</v-card>
</section>
</v-form>
</template>

<script setup></script>
2 changes: 1 addition & 1 deletion web/src/components/incident/CreatePageOffline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async function saveReport() {
console.log("SAVING OFFLINE REPORT", report.value);
await addReportOffline(report.value).then(() => {
router.push("/report-an-incident/complete");
router.push("/report-an-incident-offline/complete");
});
}
</script>
15 changes: 14 additions & 1 deletion web/src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ const routes: RouteRecordRaw[] = [
path: "report-an-incident/complete",
component: () => import("@/components/incident/CreateCompletePage.vue"),
},
{
path: "report-an-incident-offline/complete",
component: () => import("@/components/incident/CreateCompletePageOffline.vue"),
meta: {
requiresAuth: false,
},
},
{
path: "reports/:id",
component: () => import("@/components/incident/DetailsPage.vue"),
Expand All @@ -42,6 +49,9 @@ const routes: RouteRecordRaw[] = [
{
path: "sign-in",
component: () => import("@/modules/authentication/views/SignIn.vue"),
meta: {
requiresAuth: false,
},
},

...adminRoutes,
Expand All @@ -50,6 +60,9 @@ const routes: RouteRecordRaw[] = [
path: "/:pathMatch(.*)*",
name: "Not Found",
component: () => import("@/views/NotFound.vue"),
meta: {
requiresAuth: false,
},
},
],
},
Expand Down Expand Up @@ -91,7 +104,7 @@ router.beforeEach(async (to) => {
console.log("requires Admin");
return u.isSystemAdmin; */
return false
return false;
}

console.log(" route allowed");
Expand Down

0 comments on commit c03eaba

Please sign in to comment.