Skip to content

Commit

Permalink
remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Sep 20, 2024
1 parent 3368494 commit 5c00a77
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 24 deletions.
5 changes: 2 additions & 3 deletions examples/prototypeApplication/data/landDrainageConsent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {PrototypeApplication} from '../../../types/schemas/prototypeApplication';
import { MaintenanceContact } from '../../../types/schemas/prototypeApplication/data/Applicant';

const version = process.env['VERSION'] || '@next';

Expand Down Expand Up @@ -47,7 +46,7 @@ export const landDrainageConsentPrototype: PrototypeApplication = {
last: 'of Mortain',
},
email: '[email protected]',
phone: { primary: '012345678901' },
phone: {primary: '012345678901'},
},
},
{
Expand All @@ -64,7 +63,7 @@ export const landDrainageConsentPrototype: PrototypeApplication = {
last: 'De Leybourne',
},
email: '[email protected]',
phone: { primary: '098765432109' },
phone: {primary: '098765432109'},
company: {
name: "The Barons' Revolt",
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {PrototypeApplication} from '../../../../types/schemas/prototypeApplication';
import { PPApplicant } from '../../../../types/schemas/prototypeApplication/data/Applicant';
import {PPApplicant} from '../../../../types/schemas/prototypeApplication/data/Applicant';

const version = process.env['VERSION'] || '@next';

Expand Down Expand Up @@ -53,7 +53,7 @@ export const planningPermissionMajorPrototype: PrototypeApplication = {
declaration: {
accurate: true,
},
} as PPApplicant["ownership"],
} as PPApplicant['ownership'],
agent: {
name: {
first: 'Andy',
Expand Down
48 changes: 47 additions & 1 deletion examples/prototypeApplication/landDrainageConsent.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,53 @@
},
"siteContact": {
"role": "applicant"
}
},
"ownership": {
"interest": "other"
},
"maintenanceContact": [
{
"when": "duringConstruction",
"address": {
"line1": "Pevensey Castle",
"town": "Pevensey",
"postcode": "PE737SY"
},
"contact": {
"name": {
"title": "Count",
"first": "Robert",
"last": "of Mortain"
},
"email": "[email protected]",
"phone": {
"primary": "012345678901"
}
}
},
{
"when": "afterConstruction",
"address": {
"line1": "Dover Castle",
"town": "Dover",
"postcode": "DO737CA"
},
"contact": {
"name": {
"title": "Baron",
"first": "Roger",
"last": "De Leybourne"
},
"email": "[email protected]",
"phone": {
"primary": "098765432109"
},
"company": {
"name": "The Barons' Revolt"
}
}
}
]
},
"property": {
"address": {
Expand Down
36 changes: 18 additions & 18 deletions types/schemas/prototypeApplication/data/Applicant.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Date, Email } from '../../../shared/utils';
import { PrimaryApplicationType } from '../enums/ApplicationType';
import { UserRoles } from './User';
import {Date, Email} from '../../../shared/utils';
import {PrimaryApplicationType} from '../enums/ApplicationType';
import {UserRoles} from './User';

export type ApplicantBase = BaseApplicant | Agent;

Expand All @@ -23,10 +23,10 @@ export interface Agent extends BaseApplicant {
/**
* @description Contact information for the agent or proxy
*/
agent: ContactDetails & { address: UserAddress };
agent: ContactDetails & {address: UserAddress};
}

export type SiteContact = { role: UserRoles } | SiteContactOther;
export type SiteContact = {role: UserRoles} | SiteContactOther;

export interface SiteContactOther {
role: 'other';
Expand Down Expand Up @@ -60,7 +60,7 @@ export type UserAddress = {
};

export type ApplicantAddress =
| { sameAsSiteAddress: true }
| {sameAsSiteAddress: true}
| ApplicantAddressNotSameSite;

export interface ApplicantAddressNotSameSite extends UserAddress {
Expand Down Expand Up @@ -90,9 +90,9 @@ export interface OwnersNoticeDate extends BaseOwners {

export type MaintenanceContacts = {
when:
| 'duringConstruction'
| 'afterConstruction'
| 'duringAndAfterConstruction';
| 'duringConstruction'
| 'afterConstruction'
| 'duringAndAfterConstruction';
address: UserAddress;
contact: ContactDetails;
}[];
Expand All @@ -102,11 +102,11 @@ export type LDCApplicant = ApplicantBase & {
* @description Information about the property owners, if different than the applicant
*/
ownership:
| { interest: Extract<OwnershipInterest, 'owner'> }
| {
interest: OwnershipInterest; // `Exclude<OwnershipInterest, "owner">` ? But I think you can be co owner & report other owners?
owners: (OwnersNoticeGiven | OwnersNoNoticeGiven)[];
};
| {interest: Extract<OwnershipInterest, 'owner'>}
| {
interest: OwnershipInterest; // `Exclude<OwnershipInterest, "owner">` ? But I think you can be co owner & report other owners?
owners: (OwnersNoticeGiven | OwnersNoNoticeGiven)[];
};
};

export type PPApplicant = ApplicantBase & {
Expand Down Expand Up @@ -153,10 +153,10 @@ export type PPApplicant = ApplicantBase & {
export type LandDrainageConsentApplicant = ApplicantBase & {
ownership: {
interest: OwnershipInterest | 'owner.sole' | 'owner.co';
}
};
/** @description Contact information for the person(s) responsible for maintenace while the works are carried out */
maintenanceContact?: MaintenanceContacts;
}
};

/**
* TypeMap of PrimaryApplicationTypes to their specific Applicant models
Expand All @@ -173,5 +173,5 @@ interface ApplicantVariants {
*/
export type Applicant<TPrimary extends PrimaryApplicationType> =
TPrimary extends keyof ApplicantVariants
? ApplicantVariants[TPrimary]
: ApplicantBase;
? ApplicantVariants[TPrimary]
: ApplicantBase;

0 comments on commit 5c00a77

Please sign in to comment.