Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(new-primary-school): Add mock users for testing application hotfix #17220

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { TemplateApiModuleActionProps } from '../../../types'
import { BaseTemplateApiService } from '../../base-template-api.service'
import { transformApplicationToNewPrimarySchoolDTO } from './new-primary-school.utils'
import { isRunningOnEnvironment } from '@island.is/shared/utils'
import { isRunningInProduction } from '../parental-leave/constants'

@Injectable()
export class NewPrimarySchoolService extends BaseTemplateApiService {
Expand All @@ -38,6 +39,66 @@ export class NewPrimarySchoolService extends BaseTemplateApiService {
}

async getChildren({ auth }: TemplateApiModuleActionProps) {
if (!isRunningInProduction) {
helgifr marked this conversation as resolved.
Show resolved Hide resolved
if (auth.nationalId === '0101303019') {
return [
{
nationalId: '1111111119',
fullName: 'Stubbur Maack',
genderCode: '3',
livesWithApplicant: true,
livesWithBothParents: true,
},
]
}
if (auth.nationalId === '0101302989') {
return [
{
nationalId: '2222222229',
fullName: 'Stúfur Maack ',
genderCode: '3',
livesWithApplicant: true,
livesWithBothParents: true,
otherParent: {
nationalId: '0101302399',
fullName: 'Gervimaður Færeyjar',
address: {
streetName: 'Hvassaleiti 5',
postalCode: '103',
city: 'Reykjavík',
municipalityCode: '0000',
},
genderCode: '2',
},
},
{
nationalId: '5555555559',
fullName: 'Bína Maack ',
genderCode: '4',
livesWithApplicant: true,
livesWithBothParents: true,
},
{
nationalId: '6666666669',
fullName: 'Snúður Maack',
genderCode: '3',
livesWithApplicant: true,
livesWithBothParents: true,
},
]
}
if (auth.nationalId === '0101304929') {
return [
{
nationalId: '6666666669',
fullName: 'Snúður Maack',
genderCode: '3',
livesWithApplicant: true,
livesWithBothParents: true,
},
]
}
}
const children =
await this.nationalRegistryService.getChildrenCustodyInformation(auth)

Expand Down
Loading