Skip to content

Commit

Permalink
Fixed applied permits verified date issues
Browse files Browse the repository at this point in the history
  • Loading branch information
qhanson55 committed Dec 4, 2024
1 parent cc9b501 commit 1c0ed84
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import type { Ref } from 'vue';
import type { AutoCompleteCompleteEvent } from 'primevue/autocomplete';
import type { DropdownChangeEvent } from 'primevue/dropdown';
import type { IInputEvent } from '@/interfaces';
import type { Document, Permit, SubmissionIntake } from '@/types';
import type { Document, IntakeAppliedPermit, Permit, SubmissionIntake } from '@/types';
import type { GenericObject } from 'vee-validate';
// Types
Expand Down Expand Up @@ -462,7 +462,15 @@ onBeforeMount(async () => {
if (draftId) {
response = (await submissionService.getDraft(draftId)).data;
initialFormValues.value = { ...response.data, activityId: response.activityId };
initialFormValues.value = {
...response.data,
activityId: response.activityId,
appliedPermits: response.data.appliedPermits.map((x: IntakeAppliedPermit) => ({
...x,
statusLastVerified: x.statusLastVerified ? new Date(x.statusLastVerified) : undefined
}))
};
if (response.activityId) {
documents = (await documentService.listDocuments(response.activityId)).data;
Expand Down Expand Up @@ -1549,6 +1557,7 @@ onBeforeMount(async () => {
:name="`appliedPermits[${idx}].statusLastVerified`"
:disabled="!editable"
placeholder="Status last verified"
:max-date="new Date()"
/>
<div class="flex align-items-center ml-2 mb-3">
<Button
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/types/IntakeAppliedPermit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { IStamps } from '@/interfaces';

export type IntakeAppliedPermit = {
permitTypeId?: number;
statusLastVerified?: string;
trackingId?: string;
} & Partial<IStamps>;
1 change: 1 addition & 0 deletions frontend/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type { Email } from './Email';
export type { Enquiry } from './Enquiry';
export type { Group } from './Group';
export type { IdentityProvider } from './IdentityProvider';
export type { IntakeAppliedPermit } from './IntakeAppliedPermit';
export type { IDIRAttribute } from './IDIRAttribute';
export type { ListPermitsOptions } from './ListPermitsOptions';
export type { Note } from './Note';
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/views/permit/PermitStatusView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,6 @@ onBeforeMount(async () => {
icon="fa-circle-question"
@click="descriptionModalVisible = true"
/>
<!-- <div :onclick="(descriptionModalVisible = true)">
<font-awesome-icon
class="status-description-icon"
icon="fa-circle-question"
/>
</div> -->
</div>
<div class="status-verified-message">
<div v-if="permit?.statusLastVerified">
Expand Down

0 comments on commit 1c0ed84

Please sign in to comment.