Skip to content

Commit

Permalink
chore(as): Remove dead code (#6142)
Browse files Browse the repository at this point in the history
* Removes unused application

* Removes joint custody from core files

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Rikkiabb and kodiakhq[bot] authored Jan 6, 2022
1 parent 80457d2 commit 34fe46f
Show file tree
Hide file tree
Showing 53 changed files with 1 addition and 2,434 deletions.
1 change: 0 additions & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@
- [Family Matters Applications](libs/application/templates/family-matters/README.md)
- [Children Residence Change Template](libs/application/templates/family-matters/children-residence-change/README.md)
- [Family Matters Core](libs/application/templates/family-matters/core/README.md)
- [Joint Custody Agreement Template](libs/application/templates/family-matters/joint-custody-agreement/README.md)
- [Application Templates Funding Government Projects](libs/application/templates/funding-government-projects/README.md)
- [General Petitions](libs/application/templates/general-petition/README.md)
- [Health Insurance](libs/application/templates/health-insurance/README.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ import {
import { AwsService } from './aws.service'
import { getOtherParentInformation } from '@island.is/application/templates/family-matters-core/utils'
import { CRCApplication } from '@island.is/application/templates/children-residence-change'
import { JCAApplication } from '@island.is/application/templates/joint-custody-agreement'
import type { ApplicationConfig } from '../application.configuration'
import { APPLICATION_CONFIG } from '../application.configuration'
import {
generateJointCustodyPdf,
generateResidenceChangePdf,
} from './pdfGenerators'
import { generateResidenceChangePdf } from './pdfGenerators'

@Injectable()
export class FileService {
Expand Down Expand Up @@ -120,9 +116,6 @@ export class FileService {
case PdfTypes.CHILDREN_RESIDENCE_CHANGE: {
return await generateResidenceChangePdf(application as CRCApplication)
}
case PdfTypes.JOINT_CUSTODY_AGREEMENT: {
return await generateJointCustodyPdf(application as JCAApplication)
}
}
}

Expand Down Expand Up @@ -182,31 +175,6 @@ export class FileService {
name,
}
}
case PdfTypes.JOINT_CUSTODY_AGREEMENT: {
const { answers, externalData, state } = application as JCAApplication
const { nationalRegistry } = externalData
const isParentA = state === 'draft'
const applicant = nationalRegistry?.data
const parentB = getOtherParentInformation(
applicant.children,
answers.selectedChildren,
)
const { name, phoneNumber } = isParentA
? {
name: applicant.fullName,
phoneNumber: answers.parentA.phoneNumber,
}
: {
name: parentB.fullName,
phoneNumber: answers.parentB.phoneNumber,
}

return {
phoneNumber,
title: 'Sameiginleg forsjá barns',
name,
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './jointCustody'
export * from './residenceChange'

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ export const PdfConstants = {

export const BucketTypePrefix: KeyMapping<PdfTypes, string> = {
ChildrenResidenceChange: 'children-residence-change',
JointCustodyAgreement: 'joint-custody-agreement',
}

export const DokobitFileName: KeyMapping<PdfTypes, string> = {
ChildrenResidenceChange: 'Logheimilisbreyting-barns.pdf',
JointCustodyAgreement: 'Sameiginleg-forsja.pdf',
}

export const DokobitErrorCodes = {
Expand Down
5 changes: 0 additions & 5 deletions libs/application/core/src/types/ApplicationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export enum ApplicationTypes {
INSTITUTION_COLLABORATION = 'InstitutionCollaboration',
FUNDING_GOVERNMENT_PROJECTS = 'FundingGovernmentProjects',
PUBLIC_DEBT_PAYMENT_PLAN = 'PublicDebtPaymentPlan',
JOINT_CUSTODY_AGREEMENT = 'JointCustodyAgreement',
COMPLAINTS_TO_ALTHINGI_OMBUDSMAN = 'ComplaintsToAlthingiOmbudsman',
ACCIDENT_NOTIFICATION = 'AccidentNotification',
GENERAL_PETITION = 'GeneralPetitionService',
Expand Down Expand Up @@ -72,10 +71,6 @@ export const ApplicationConfigurations = {
slug: 'greidsludreifing-skulda',
translation: 'pdpp.application',
},
[ApplicationTypes.JOINT_CUSTODY_AGREEMENT]: {
slug: 'forsja-barns',
translation: 'jca.application',
},
[ApplicationTypes.COMPLAINTS_TO_ALTHINGI_OMBUDSMAN]: {
slug: 'kvortun-til-umbodsmanns-althingis',
translation: 'ctao.application',
Expand Down
1 change: 0 additions & 1 deletion libs/application/core/src/types/PdfTypes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export enum PdfTypes {
CHILDREN_RESIDENCE_CHANGE = 'ChildrenResidenceChange',
JOINT_CUSTODY_AGREEMENT = 'JointCustodyAgreement',
}
2 changes: 0 additions & 2 deletions libs/application/template-loader/src/lib/templateLoaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ const templates: Record<ApplicationTypes, () => Promise<unknown>> = {
import('@island.is/application/templates/funding-government-projects'),
[ApplicationTypes.PUBLIC_DEBT_PAYMENT_PLAN]: () =>
import('@island.is/application/templates/public-debt-payment-plan'),
[ApplicationTypes.JOINT_CUSTODY_AGREEMENT]: () =>
import('@island.is/application/templates/joint-custody-agreement'),
[ApplicationTypes.COMPLAINTS_TO_ALTHINGI_OMBUDSMAN]: () =>
import('@island.is/application/templates/complaints-to-althingi-ombudsman'),
[ApplicationTypes.ACCIDENT_NOTIFICATION]: () =>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 34fe46f

Please sign in to comment.