Skip to content

Commit

Permalink
Merge pull request #200 from bcgov/feature/new-permitslist
Browse files Browse the repository at this point in the history
Update submitted applications page
  • Loading branch information
kyle1morel authored Dec 3, 2024
2 parents 1b738d0 + 8db2599 commit d7b36d0
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 147 deletions.
26 changes: 14 additions & 12 deletions frontend/src/components/common/StatusPill.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,20 @@ const getState = computed(() => {
</script>

<template>
<div
v-tooltip="{ value: getState?.toolTip, modifier: toolTipDirection }"
class="flex justify-content-center align-items-center auth-indicator"
:class="[getState?.badgeClass]"
>
<font-awesome-icon
v-if="getState?.iconString"
class="icon-detail"
:class="[getState?.iconClass]"
:icon="getState?.iconString"
/>
<span class="text-color">{{ authStatus }}</span>
<div class="flex">
<div
v-tooltip="{ value: getState?.toolTip, modifier: toolTipDirection }"
class="flex justify-content-center align-items-center auth-indicator"
:class="[getState?.badgeClass]"
>
<font-awesome-icon
v-if="getState?.iconString"
class="icon-detail"
:class="[getState?.iconClass]"
:icon="getState?.iconString"
/>
<span class="text-color">{{ authStatus }}</span>
</div>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/housing/projects/ProjectsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const selection: Ref<Submission | undefined> = ref(undefined);
/>
<Column
field="applicationStatus"
header="Activity state"
header="Project state"
:sortable="true"
style="min-width: 150px"
/>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/permit/PermitModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand All @@ -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'),
Expand Down Expand Up @@ -201,7 +201,7 @@ async function onSubmit(data: PermitForm, { resetForm }) {
<Dropdown
class="col-12 lg:col-6"
name="status"
label="Permit state"
label="Application stage"
:options="PERMIT_STATUS_LIST"
/>
<Calendar
Expand Down
18 changes: 8 additions & 10 deletions frontend/src/components/permit/PermitStatusDescriptionModal.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
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<boolean>('visible');
</script>
Expand Down Expand Up @@ -47,50 +47,48 @@ const visible = defineModel<boolean>('visible');
<div class="flex">
<StatusPill :auth-status="PermitAuthorizationStatus.IN_REVIEW" />
</div>
<div class="mt-2">The application is currently active.</div>
<div class="mt-2">{{ PermitAuthorizationStatusDescriptions.IN_REVIEW }}</div>
</div>
<div class="my-4">
<div class="flex">
<StatusPill :auth-status="PermitAuthorizationStatus.PENDING" />
</div>
<div class="mt-2">
The application is currently pending the applicant’s action in response to the reviewing authority’s request.
{{ PermitAuthorizationStatusDescriptions.PENDING }}
</div>
</div>
<div class="my-4">
<div class="flex">
<StatusPill :auth-status="PermitAuthorizationStatus.ABANDONED" />
</div>
<div class="mt-2">The application has been abandoned by the applicant.</div>
<div class="mt-2">{{ PermitAuthorizationStatusDescriptions.ABANDONED }}</div>
</div>
<div class="my-4">
<div class="flex">
<StatusPill :auth-status="PermitAuthorizationStatus.WITHDRAWN" />
</div>
<div class="mt-2">The application has been withdrawn by the applicant.</div>
<div class="mt-2">{{ PermitAuthorizationStatusDescriptions.WITHDRAWN }}</div>
</div>
<div class="my-4">
<div class="flex">
<StatusPill :auth-status="PermitAuthorizationStatus.CANCELLED" />
</div>
<div class="mt-2">The application has been cancelled by the reviewing authority.</div>
<div class="mt-2">{{ PermitAuthorizationStatusDescriptions.CANCELLED }}</div>
</div>
<div class="my-4">
<div class="flex">
<StatusPill :auth-status="PermitAuthorizationStatus.DENIED" />
</div>
<div class="mt-2">
The application has completed the review process, however, the reviewing authority has decided not to approve
the application.
{{ PermitAuthorizationStatusDescriptions.DENIED }}
</div>
</div>
<div class="my-4">
<div class="flex">
<StatusPill :auth-status="PermitAuthorizationStatus.ISSUED" />
</div>
<div class="mt-2">
The application has successfully completed the review process. A positive final decision has been granted to the
applicant.
{{ PermitAuthorizationStatusDescriptions.ISSUED }}
</div>
</div>
</Dialog>
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/utils/constants/housing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ export const PROJECT_RELATIONSHIP_LIST = [
];

export const PERMIT_AUTHORIZATION_STATUS_LIST = [
PermitAuthorizationStatus.ISSUED,
PermitAuthorizationStatus.PENDING,
PermitAuthorizationStatus.NONE,
PermitAuthorizationStatus.IN_REVIEW,
PermitAuthorizationStatus.PENDING,
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.TECHNICAL_REVIEW,
PermitStatus.PENDING
PermitStatus.PENDING,
PermitStatus.COMPLETED
];

export const PROJECT_LOCATION_LIST = [ProjectLocation.STREET_ADDRESS, ProjectLocation.LOCATION_COORDINATES];
Expand Down
Loading

0 comments on commit d7b36d0

Please sign in to comment.