Skip to content

Commit

Permalink
hide status tracker and show housing dropdown for navs
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaytkbabu committed Jul 10, 2024
1 parent 2556a54 commit a69da0e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/layout/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ onMounted(() => {
{
label: 'Status of application/permit',
route: RouteName.COMING_SOON,
access: Permissions.NAVIGATION_HOUSING
access: Permissions.NAVIGATION_HOUSING_STATUS_TRACKER
}
],
access: Permissions.NAVIGATION_HOUSING
access: Permissions.NAVIGATION_HOUSING_DROPDOWN
},
{
label: 'Submissions',
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/services/permissionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ export enum Permissions {
HOUSING_SUBMISSION_DELETE = 'housing.submission.delete',

NAVIGATION_HOUSING = 'housing',
NAVIGATION_HOUSING_DROPDOWN = 'housing.dropdown',
NAVIGATION_HOUSING_ENQUIRY = 'housing.enquiry',
NAVIGATION_HOUSING_INTAKE = 'housing.intake',
NAVIGATION_HOUSING_SUBMISSION = 'housing.submission',
NAVIGATION_HOUSING_SUBMISSIONS = 'housing.submissions',
NAVIGATION_HOUSING_SUBMISSIONS_SUB = 'housing.submissions.sub',
NAVIGATION_HOUSING_STATUS_TRACKER = 'housing.status.tracker',
NAVIGATION_HOUSING_USER_MANAGEMENT = 'housing.usermanagement',
NAVIGATION_DEVELOPER = 'developer',

Expand All @@ -38,7 +40,10 @@ const PermissionMap = [

Permissions.HOUSING_SUBMISSION_READ,

Permissions.NAVIGATION_HOUSING_DROPDOWN,
Permissions.NAVIGATION_HOUSING_ENQUIRY,
Permissions.NAVIGATION_HOUSING_INTAKE,
Permissions.NAVIGATION_HOUSING_STATUS_TRACKER,
Permissions.NAVIGATION_HOUSING_SUBMISSION,
Permissions.NAVIGATION_HOUSING_SUBMISSIONS,
Permissions.NAVIGATION_HOUSING_USER_MANAGEMENT
Expand All @@ -58,7 +63,10 @@ const PermissionMap = [
Permissions.HOUSING_SUBMISSION_UPDATE,
Permissions.HOUSING_SUBMISSION_DELETE,

Permissions.NAVIGATION_HOUSING_DROPDOWN,
Permissions.NAVIGATION_HOUSING_ENQUIRY,
Permissions.NAVIGATION_HOUSING_INTAKE,
Permissions.NAVIGATION_HOUSING_STATUS_TRACKER,
Permissions.NAVIGATION_HOUSING_SUBMISSION,
Permissions.NAVIGATION_HOUSING_SUBMISSIONS
]
Expand All @@ -77,6 +85,7 @@ const PermissionMap = [
Permissions.HOUSING_SUBMISSION_DELETE,

Permissions.NAVIGATION_HOUSING,
Permissions.NAVIGATION_HOUSING_DROPDOWN,
Permissions.NAVIGATION_HOUSING_ENQUIRY,
Permissions.NAVIGATION_HOUSING_INTAKE,
Permissions.NAVIGATION_HOUSING_SUBMISSION,
Expand All @@ -97,7 +106,10 @@ const PermissionMap = [
Permissions.HOUSING_SUBMISSION_UPDATE,
Permissions.HOUSING_SUBMISSION_DELETE,

Permissions.NAVIGATION_HOUSING_DROPDOWN,
Permissions.NAVIGATION_HOUSING_ENQUIRY,
Permissions.NAVIGATION_HOUSING_INTAKE,
Permissions.NAVIGATION_HOUSING_STATUS_TRACKER,
Permissions.NAVIGATION_HOUSING_SUBMISSION,
Permissions.NAVIGATION_HOUSING_SUBMISSIONS,
Permissions.NAVIGATION_HOUSING_USER_MANAGEMENT
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/views/housing/HousingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
import { ref } from 'vue';
import { Button } from '@/lib/primevue';
import { Permissions, default as PermissionService } from '@/services/permissionService';
import { RouteName } from '@/utils/enums/application';
const permissionService = new PermissionService();
const items = ref([
{
top: 'Start a new project investigation with a Navigator',
Expand All @@ -25,7 +28,8 @@ const items = ref([
{
top: 'Check the status of your applications and/or permits',
icon: 'fa-bars-progress',
route: RouteName.COMING_SOON
route: RouteName.COMING_SOON,
access: Permissions.NAVIGATION_HOUSING_STATUS_TRACKER
}
]);
</script>
Expand All @@ -49,6 +53,7 @@ const items = ref([
class="flex justify-content-center mb-5"
>
<router-link
v-if="item.access ? permissionService.can(item.access) : true"
v-slot="{ href, navigate }"
:to="{ name: item.route }"
custom
Expand Down

0 comments on commit a69da0e

Please sign in to comment.