Skip to content

Commit

Permalink
Merge pull request #99 from bcgov/feature/help-tab
Browse files Browse the repository at this point in the history
New Help tab
  • Loading branch information
kyle1morel authored Jun 25, 2024
2 parents 8180d00 + 503f938 commit 9969488
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
38 changes: 38 additions & 0 deletions frontend/src/components/layout/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { onMounted, ref } from 'vue';
import { Menubar } from '@/lib/primevue';
import { Permissions, default as PermissionService } from '@/services/permissionService';
import { PCNS_CONTACT } from '@/utils/constants/application';
import { HOUSING_CONTACT } from '@/utils/constants/housing';
import { RouteName } from '@/utils/enums/application';
import type { Ref } from 'vue';
Expand All @@ -14,6 +16,7 @@ type NavItem = {
public?: boolean;
access?: string;
items?: Array<NavItem>;
mailTo?: string;
};
// State
Expand Down Expand Up @@ -67,6 +70,27 @@ onMounted(() => {
label: 'Developer',
route: RouteName.DEVELOPER,
access: Permissions.NAVIGATION_DEVELOPER
},
{
label: 'Help',
items: [
{
label: 'Contact a Navigator',
mailTo: `mailto:${HOUSING_CONTACT.email}?subject=${HOUSING_CONTACT.subject}`,
access: Permissions.NAVIGATION_HOUSING_INTAKE
},
{
label: 'Report a problem',
mailTo: `mailto:${PCNS_CONTACT.email}?subject=${PCNS_CONTACT.subject}`,
public: true
},
{
label: 'User Guide',
route: RouteName.HOUSING_GUIDE,
access: Permissions.NAVIGATION_HOUSING_INTAKE
}
],
public: true
}
];
});
Expand All @@ -91,6 +115,13 @@ onMounted(() => {
<span class="flex">{{ item.label }}</span>
</a>
</router-link>
<a
v-else-if="item.mailTo"
:href="item.mailTo"
class="mail-link"
>
<span class="flex">{{ item.label }}</span>
</a>
<a
v-else
:href="item.url"
Expand Down Expand Up @@ -151,6 +182,13 @@ onMounted(() => {
border-radius: 0;
}
.mail-link {
padding: 0.5rem 0.8rem 0.7rem 0.8rem;
&:hover {
background-color: #5a7da9;
}
}
ul {
display: flex;
flex-direction: row;
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ const routes: Array<RouteRecordRaw> = [
meta: {
access: [Permissions.NAVIGATION_HOUSING_SUBMISSIONS, Permissions.NAVIGATION_HOUSING_SUBMISSIONS_SUB]
}
},
{
path: '/guide',
name: RouteName.HOUSING_GUIDE,
component: () => import('@/views/ComingSoon.vue'),
meta: { access: Permissions.NAVIGATION_HOUSING }
}
]
},
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/utils/constants/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export const ACCESS_ROLES_LIST = [

export const DELIMITER = '/';

export const PCNS_CONTACT = {
email: '[email protected]',
subject: 'Reporting an Issue with PCNS'
};

export const SYSTEM_USER = NIL;

export const YES_NO_LIST = [BasicResponse.YES, BasicResponse.NO];
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/utils/constants/housing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export const ENQUIRY_TYPE_LIST = [
SubmissionType.INAPPLICABLE
];

export const HOUSING_CONTACT = {
email: '[email protected]',
subject: 'Assistance with Permit Connect Navigator Service'
};

export const INTAKE_STATUS_LIST = [IntakeStatus.SUBMITTED, IntakeStatus.ASSIGNED, IntakeStatus.COMPLETED];

export const NOTE_TYPE_LIST = [NoteType.GENERAL, NoteType.BRING_FORWARD, NoteType.ENQUIRY, NoteType.ROADMAP];
Expand Down
1 change: 1 addition & 0 deletions frontend/src/utils/enums/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export enum RouteName {
HOUSING = 'housing',
HOUSING_ENQUIRY = 'housing_enquiry',
HOUSING_ENQUIRY_INTAKE = 'housing_enquiry_intake',
HOUSING_GUIDE = 'housing_guide',
HOUSING_SUBMISSION = 'housing_submission',
HOUSING_SUBMISSION_INTAKE = 'housing_submission_intake',
HOUSING_SUBMISSIONS = 'housing_submissions',
Expand Down

0 comments on commit 9969488

Please sign in to comment.