From 989009e33dcb44dbb5ccb526fa6cb508114c0558 Mon Sep 17 00:00:00 2001 From: Wilson Wong Date: Fri, 22 Nov 2024 18:00:19 -0800 Subject: [PATCH 1/3] Update submitted applications page --- frontend/src/components/common/StatusPill.vue | 26 +-- .../housing/projects/ProjectsList.vue | 2 +- .../src/components/permit/PermitModal.vue | 8 +- .../permit/PermitStatusDescriptionModal.vue | 18 +- frontend/src/utils/constants/housing.ts | 12 +- .../src/views/housing/project/ProjectView.vue | 170 ++++++++---------- 6 files changed, 104 insertions(+), 132 deletions(-) diff --git a/frontend/src/components/common/StatusPill.vue b/frontend/src/components/common/StatusPill.vue index 140f26cb..991f11ce 100644 --- a/frontend/src/components/common/StatusPill.vue +++ b/frontend/src/components/common/StatusPill.vue @@ -66,18 +66,20 @@ const getState = computed(() => { diff --git a/frontend/src/components/housing/projects/ProjectsList.vue b/frontend/src/components/housing/projects/ProjectsList.vue index 40cafa45..677e3f5d 100644 --- a/frontend/src/components/housing/projects/ProjectsList.vue +++ b/frontend/src/components/housing/projects/ProjectsList.vue @@ -62,7 +62,7 @@ const selection: Ref = ref(undefined); /> diff --git a/frontend/src/components/permit/PermitModal.vue b/frontend/src/components/permit/PermitModal.vue index 3cfee971..3ee73d6c 100644 --- a/frontend/src/components/permit/PermitModal.vue +++ b/frontend/src/components/permit/PermitModal.vue @@ -9,7 +9,7 @@ import { Button, Dialog, useConfirm, useToast } from '@/lib/primevue'; import { permitService } from '@/services'; import { useSubmissionStore, useTypeStore } from '@/store'; import { PERMIT_AUTHORIZATION_STATUS_LIST, PERMIT_NEEDED_LIST, PERMIT_STATUS_LIST } from '@/utils/constants/housing'; -import { PermitStatus } from '@/utils/enums/housing'; +import { PermitAuthorizationStatus, PermitStatus } from '@/utils/enums/housing'; import type { DropdownChangeEvent } from 'primevue/dropdown'; import type { Ref } from 'vue'; @@ -41,7 +41,7 @@ let initialFormValues: PermitForm = { agency: permitType.value?.agency, trackingId: permit?.trackingId, businessDomain: permitType.value?.businessDomain, - authStatus: permit?.authStatus, + authStatus: permit?.authStatus ?? PermitAuthorizationStatus.NONE, statusLastVerified: permit?.statusLastVerified ? new Date(permit.statusLastVerified) : undefined, sourceSystem: permitType.value?.sourceSystem ?? permitType.value?.sourceSystemAcronym, submittedDate: permit?.submittedDate ? new Date(permit.submittedDate) : undefined, @@ -53,7 +53,7 @@ let initialFormValues: PermitForm = { const formSchema = object({ permitType: object().required().label('Permit'), needed: string().required().label('Needed'), - status: string().required().oneOf(PERMIT_STATUS_LIST).label('Permit state'), + status: string().required().oneOf(PERMIT_STATUS_LIST).label('Application stage'), agency: string().required().label('Agency'), businessDomain: string().label('Business domain'), authStatus: string().required().oneOf(PERMIT_AUTHORIZATION_STATUS_LIST).label('Authorization status'), @@ -201,7 +201,7 @@ async function onSubmit(data: PermitForm, { resetForm }) { import StatusPill from '@/components/common/StatusPill.vue'; import { Dialog } from '@/lib/primevue'; -import { PermitAuthorizationStatus } from '@/utils/enums/housing'; +import { PermitAuthorizationStatus, PermitAuthorizationStatusDescriptions } from '@/utils/enums/housing'; const visible = defineModel('visible'); @@ -47,41 +47,40 @@ const visible = defineModel('visible');
-
The application is currently active.
+
{{ PermitAuthorizationStatusDescriptions.IN_REVIEW }}
- The application is currently pending the applicant’s action in response to the reviewing authority’s request. + {{ PermitAuthorizationStatusDescriptions.PENDING }}
-
The application has been abandoned by the applicant.
+
{{ PermitAuthorizationStatusDescriptions.ABANDONED }}
-
The application has been withdrawn by the applicant.
+
{{ PermitAuthorizationStatusDescriptions.WITHDRAWN }}
-
The application has been cancelled by the reviewing authority.
+
{{ PermitAuthorizationStatusDescriptions.CANCELLED }}
- The application has completed the review process, however, the reviewing authority has decided not to approve - the application. + {{ PermitAuthorizationStatusDescriptions.DENIED }}
@@ -89,8 +88,7 @@ const visible = defineModel('visible');
- The application has successfully completed the review process. A positive final decision has been granted to the - applicant. + {{ PermitAuthorizationStatusDescriptions.ISSUED }}
diff --git a/frontend/src/utils/constants/housing.ts b/frontend/src/utils/constants/housing.ts index 3f90d233..378e81c4 100644 --- a/frontend/src/utils/constants/housing.ts +++ b/frontend/src/utils/constants/housing.ts @@ -85,24 +85,24 @@ export const PROJECT_RELATIONSHIP_LIST = [ ]; export const PERMIT_AUTHORIZATION_STATUS_LIST = [ - PermitAuthorizationStatus.ISSUED, + PermitAuthorizationStatus.NONE, PermitAuthorizationStatus.PENDING, PermitAuthorizationStatus.IN_REVIEW, + PermitAuthorizationStatus.ISSUED, PermitAuthorizationStatus.DENIED, PermitAuthorizationStatus.CANCELLED, PermitAuthorizationStatus.WITHDRAWN, - PermitAuthorizationStatus.ABANDONED, - PermitAuthorizationStatus.NONE + PermitAuthorizationStatus.ABANDONED ]; export const PERMIT_NEEDED_LIST = [PermitNeeded.YES, PermitNeeded.UNDER_INVESTIGATION, PermitNeeded.NO]; export const PERMIT_STATUS_LIST = [ PermitStatus.NEW, - PermitStatus.APPLIED, - PermitStatus.COMPLETED, + PermitStatus.PENDING, PermitStatus.TECHNICAL_REVIEW, - PermitStatus.PENDING + PermitStatus.APPLIED, + PermitStatus.COMPLETED ]; export const PROJECT_LOCATION_LIST = [ProjectLocation.STREET_ADDRESS, ProjectLocation.LOCATION_COORDINATES]; diff --git a/frontend/src/views/housing/project/ProjectView.vue b/frontend/src/views/housing/project/ProjectView.vue index b5cc1227..9163f252 100644 --- a/frontend/src/views/housing/project/ProjectView.vue +++ b/frontend/src/views/housing/project/ProjectView.vue @@ -6,11 +6,11 @@ import { useRouter } from 'vue-router'; import Breadcrumb from '@/components/common/Breadcrumb.vue'; import CreateEnquiryDialog from '@/components/housing/projects/CreateEnquiryDialog.vue'; import ProjectPermitModal from '@/components/housing/projects/ProjectPermitModal.vue'; +import StatusPill from '@/components/common/StatusPill.vue'; import { Accordion, AccordionTab, Button, Card, Divider, useToast } from '@/lib/primevue'; import { BasicResponse, RouteName } from '@/utils/enums/application'; import { PermitAuthorizationStatus, PermitNeeded, PermitStatus } from '@/utils/enums/housing'; import { formatDate } from '@/utils/formatters'; -import { toKebabCase } from '@/utils/utils'; import { enquiryService, permitService, submissionService, userService } from '@/services'; import { useSubmissionStore, useTypeStore } from '@/store'; @@ -78,17 +78,17 @@ const permitsNotNeeded = computed(() => { const permitsSubmitted: ComputedRef> = computed(() => { let firstFilter = permitFilter({ permitNeeded: PermitNeeded.YES, - permitStatus: PermitStatus.APPLIED, permits: getPermits.value, permitTypes: getPermitTypes.value }); - let secondFilter = permitFilter({ - permitNeeded: PermitNeeded.YES, - permitStatus: PermitStatus.COMPLETED, - permits: getPermits.value, - permitTypes: getPermitTypes.value - }); - return firstFilter.concat(secondFilter).sort(permitNameSortFcn).sort(permitBusinessSortFcn); + + return firstFilter + .filter((item) => { + if (item.authStatus === PermitAuthorizationStatus.NONE || item.status === PermitStatus.NEW) return false; + return true; + }) + .sort(permitNameSortFcn) + .sort(permitBusinessSortFcn); }); // Actions @@ -124,12 +124,6 @@ function permitFilter(config: PermitFilterConfig) { return returnArray.filter((pt) => !!pt) as Array; } -function displayTrackerStatus(authStatus: string | undefined, permitState: string | undefined): string | undefined { - if (permitState === PermitStatus.APPLIED && authStatus === PermitAuthorizationStatus.NONE) return 'Submitted'; - - return authStatus; -} - function handleDialogClose() { enquiryConfirmationId.value = undefined; } @@ -178,7 +172,7 @@ onMounted(async () => { try { const activityId = submissionValue.activityId; - const permitsValue = (await permitService.listPermits({ activityId })).data; + const permitsValue = (await permitService.listPermits({ activityId, includeNotes: true })).data; submissionStore.setPermits(permitsValue); } catch { toast.error('Unable to load permits for this project, please try again later'); @@ -246,10 +240,10 @@ onMounted(async () => { { :key="permit.permitId" class="m-0" > - {{ permit.businessDomain }}: {{ permit.name }} + {{ permit.name }}

Submitted applications

You will see your permit applications here once submitted. @@ -290,42 +284,44 @@ onMounted(async () => { " > @@ -357,6 +353,16 @@ a { text-decoration: underline; } +.ellipsis-icon { + cursor: pointer; + width: 1.5rem; + color: #255a90; + + &:hover { + color: #053662; + } +} + .empty-block { background-color: $app-grey; } @@ -364,75 +370,44 @@ a { max-height: 2rem; } -.authIndicator { - height: 30px; - width: 100px; - text-align: center; - line-height: 30px; - font-size: 0.9rem; -} - -.in-review, -.submitted { - background-color: none; - color: $app-green; - border-radius: 1rem; - border-color: $app-green; - border-style: solid; - border-width: 1px; -} - -.completed, -.issued { - background-color: $app-green; - color: white; - border-radius: 1rem; - border-color: $app-green; - border-style: solid; - border-width: 1px; -} - -.denied { - background-color: $app-error; - color: white; - border-radius: 1rem; - border-color: $app-error; - border-style: solid; - border-width: 1px; -} - -.pending { - background-color: none; - color: $app-error; - border-radius: 1rem; - border-color: $app-error; - border-style: solid; - border-width: 1px; -} - .permit-card { border-color: $app-proj-white-one; border-style: solid; border-width: 1px; box-shadow: 4px 4px 4px 0px $app-proj-black; - padding: 1.76rem 2rem 1.76rem 2rem; - margin-bottom: 1rem; &:hover { background-color: $app-grey; } } .permit-data { - overflow: hidden; + overflow: auto; + word-break: break-word; text-overflow: ellipsis; } -.sub-label { - color: $app-proj-grey-one; - font-size: 0.8rem; - margin-top: 1rem; +.label-field { + color: #474543; + font-family: 'BC Sans'; + font-size: 0.75rem; + margin-bottom: 0.5rem; } +.label-date { + color: #2d2d2d; + font-family: 'BC Sans'; + font-size: 0.75rem; + font-style: italic; + font-weight: 700; +} + +.label-verified { + color: #474543; + font-family: 'BC Sans'; + font-size: 0.75rem; + font-style: italic; + font-weight: 400; +} :deep(.p-accordion-content) { padding: 4rem 4rem 4rem 4rem; border-style: none; @@ -467,10 +442,7 @@ a { } :deep(.p-card-body) { - padding-top: 0rem; - padding-bottom: 0rem; - padding-left: 1.5rem; - padding-right: 1.5 rem; + padding: 1.5rem; } :deep(.p-card-content) { From 53b9cf19149020839fc18fc9abc96a32042100ee Mon Sep 17 00:00:00 2001 From: Wilson Wong Date: Mon, 25 Nov 2024 16:50:19 -0800 Subject: [PATCH 2/3] Minor styling fixes, reorder dropdown options, fix latest updates Minor styling fixes Reorder Permit Auth Status in dropdowns Reorder Permit Status in dropdowns Fix bug with permit note --- frontend/src/utils/constants/housing.ts | 6 +-- .../src/views/housing/project/ProjectView.vue | 37 ++++++++++++------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/frontend/src/utils/constants/housing.ts b/frontend/src/utils/constants/housing.ts index 378e81c4..dab0b4ec 100644 --- a/frontend/src/utils/constants/housing.ts +++ b/frontend/src/utils/constants/housing.ts @@ -86,8 +86,8 @@ export const PROJECT_RELATIONSHIP_LIST = [ export const PERMIT_AUTHORIZATION_STATUS_LIST = [ PermitAuthorizationStatus.NONE, - PermitAuthorizationStatus.PENDING, PermitAuthorizationStatus.IN_REVIEW, + PermitAuthorizationStatus.PENDING, PermitAuthorizationStatus.ISSUED, PermitAuthorizationStatus.DENIED, PermitAuthorizationStatus.CANCELLED, @@ -99,9 +99,9 @@ export const PERMIT_NEEDED_LIST = [PermitNeeded.YES, PermitNeeded.UNDER_INVESTIG export const PERMIT_STATUS_LIST = [ PermitStatus.NEW, - PermitStatus.PENDING, - PermitStatus.TECHNICAL_REVIEW, PermitStatus.APPLIED, + PermitStatus.TECHNICAL_REVIEW, + PermitStatus.PENDING, PermitStatus.COMPLETED ]; diff --git a/frontend/src/views/housing/project/ProjectView.vue b/frontend/src/views/housing/project/ProjectView.vue index 9163f252..56a54ee8 100644 --- a/frontend/src/views/housing/project/ProjectView.vue +++ b/frontend/src/views/housing/project/ProjectView.vue @@ -91,6 +91,14 @@ const permitsSubmitted: ComputedRef> = computed(() => { .sort(permitBusinessSortFcn); }); +const permitsUnderinvestigation: ComputedRef> = computed(() => { + return permitFilter({ + permitNeeded: PermitNeeded.UNDER_INVESTIGATION, + permits: getPermits.value, + permitTypes: getPermitTypes.value + }); +}); + // Actions const router = useRouter(); const toast = useToast(); @@ -214,7 +222,8 @@ onMounted(async () => {
@@ -231,16 +240,23 @@ onMounted(async () => {

Required permits

We are investigating the permits required for this project.
+
+ All the necessary permits have been submitted at this time. If additional permits are required as the project + progresses, we will update them here. +