Skip to content

Commit

Permalink
feat: update home page with initiative links, add back button to indi…
Browse files Browse the repository at this point in the history
…vidual submission page
  • Loading branch information
wilwong89 committed Jan 29, 2024
1 parent 353bd11 commit e0004f5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 68 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/layout/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { getIsAuthenticated } = storeToRefs(useAuthStore());
<router-link :to="{ name: RouteNames.HOME }">Home</router-link>
</li>
<li v-if="getIsAuthenticated">
<router-link :to="{ name: RouteNames.INITIATIVES }">Initiatives</router-link>
<router-link :to="{ name: RouteNames.INITIATIVES }">Submissions</router-link>
</li>
</ol>
</template>
Expand Down
84 changes: 17 additions & 67 deletions frontend/src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,49 +1,20 @@
<script setup lang="ts">
import { Message } from '@/lib/primevue';
import { storeToRefs } from 'pinia';
import { useRouter } from 'vue-router';
import { useConfigStore } from '@/store';
import { Button, Message } from '@/lib/primevue';
import { RouteNames } from '@/utils/constants';
import { useAuthStore, useConfigStore } from '@/store';
// Store
const { getConfig } = storeToRefs(useConfigStore());
const { getIsAuthenticated } = storeToRefs(useAuthStore());
// Actions
const frontEcosystem: Array<{ text: string; href: string }> = [
{
text: 'Vue 3',
href: 'https://vuejs.org/'
},
{
text: 'Pinia',
href: 'https://pinia.vuejs.org/'
},
{
text: 'PrimeVue',
href: 'https://primevue.org/'
},
{
text: 'Vitest',
href: 'https://vitest.dev/'
}
];
const router = useRouter();
const backEcosystem: Array<{ text: string; href: string }> = [
{
text: 'Express',
href: 'https://expressjs.com/'
},
{
text: 'Jest',
href: 'https://jestjs.io/'
}
];
const languagesEcosystem: Array<{ text: string; href: string }> = [
{
text: 'TypeScript',
href: 'https://www.typescriptlang.org/'
}
];
const toSubmissions = (): void => {
router.push({ name: RouteNames.SUBMISSIONS });
};
</script>

<template>
Expand All @@ -56,35 +27,14 @@ const languagesEcosystem: Array<{ text: string; href: string }> = [

<div class="text-center">
<h1 class="font-bold">Welcome to the PermitConnect Navigator Service!</h1>
<h2>Frontend Ecosystem</h2>
<a
v-for="(eco, i) in frontEcosystem"
:key="i"
:href="eco.href"
class="mx-3"
target="_blank"
>
{{ eco.text }}
</a>
<h2>Backend Ecosystem</h2>
<a
v-for="(eco, i) in backEcosystem"
:key="i"
:href="eco.href"
class="mx-3"
target="_blank"
>
{{ eco.text }}
</a>
<h2>Languages</h2>
<a
v-for="(eco, i) in languagesEcosystem"
:key="i"
:href="eco.href"
class="mx-3"
target="_blank"
</div>
<div>
<h2>Choose an Initiative:</h2>
<Button
:disabled="!getIsAuthenticated"
@click="toSubmissions"
>
{{ eco.text }}
</a>
Housing
</Button>
</div>
</template>
8 changes: 8 additions & 0 deletions frontend/src/views/SubmissionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import PermitModal from '@/components/permit/PermitModal.vue';
import FileUpload from '@/components/file/FileUpload.vue';
import SubmissionForm from '@/components/submission/SubmissionForm.vue';
import { Button, TabPanel, TabView, useToast } from '@/lib/primevue';
import { RouteNames } from '@/utils/constants';
import { chefsService, documentService, permitService } from '@/services';
import type { Ref } from 'vue';
Expand Down Expand Up @@ -62,6 +63,13 @@ onMounted(async () => {
</script>

<template>
<router-link :to="{ name: RouteNames.SUBMISSIONS }">
<font-awesome-icon
icon="fa fa-arrow-circle-left"
class="mr-1"
/>
<span>Back to Submissions</span>
</router-link>
<h1>Activity submission</h1>

<TabView>
Expand Down

0 comments on commit e0004f5

Please sign in to comment.