Skip to content

Commit

Permalink
Merge branch 'main' into feat/skilavottord-handle-unregister-vehicles
Browse files Browse the repository at this point in the history
  • Loading branch information
birkirkristmunds authored Sep 9, 2024
2 parents 0ffdfc3 + 3aa0c69 commit 8018de0
Show file tree
Hide file tree
Showing 337 changed files with 12,232 additions and 5,018 deletions.
4 changes: 4 additions & 0 deletions apps/api/infra/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import {
OfficialJournalOfIceland,
OfficialJournalOfIcelandApplication,
Frigg,
HealthDirectorateOrganDonation,
HealthDirectorateVaccination,
} from '../../../infra/src/dsl/xroad'

export const serviceSetup = (services: {
Expand Down Expand Up @@ -427,6 +429,8 @@ export const serviceSetup = (services: {
OfficialJournalOfIceland,
OfficialJournalOfIcelandApplication,
Frigg,
HealthDirectorateOrganDonation,
HealthDirectorateVaccination,
)
.files({ filename: 'islyklar.p12', env: 'ISLYKILL_CERT' })
.ingress({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
NestInterceptor,
} from '@nestjs/common'

import { isRequestCase } from '@island.is/judicial-system/types'

import { getIndictmentInfo } from '../../case/interceptors/case.transformer'
import { CaseListEntry } from '../models/caseList.model'

Expand All @@ -27,21 +29,28 @@ export class CaseListInterceptor implements NestInterceptor {
return next.handle().pipe(
map((cases: CaseListEntry[]) => {
return cases.map((theCase) => {
if (isRequestCase(theCase.type)) {
return {
...theCase,
isValidToDateInThePast: theCase.validToDate
? Date.now() > new Date(theCase.validToDate).getTime()
: theCase.isValidToDateInThePast,
appealedDate: getAppealedDate(
theCase.prosecutorPostponedAppealDate,
theCase.accusedPostponedAppealDate,
),
}
}

const indictmentInfo = getIndictmentInfo(
theCase.indictmentRulingDecision,
theCase.rulingDate,
theCase.type,
theCase.defendants,
theCase.eventLogs,
)

return {
...theCase,
isValidToDateInThePast: theCase.validToDate
? Date.now() > new Date(theCase.validToDate).getTime()
: theCase.isValidToDateInThePast,
appealedDate: getAppealedDate(
theCase.prosecutorPostponedAppealDate,
theCase.accusedPostponedAppealDate,
),
...indictmentInfo,
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ export class CaseListEntry {
@Field(() => Boolean, { nullable: true })
readonly indictmentVerdictViewedByAll?: boolean

@Field(() => String, { nullable: true })
readonly indictmentVerdictAppealDeadline?: string
@Field(() => Boolean, { nullable: true })
readonly indictmentVerdictAppealDeadlineExpired?: boolean

@Field(() => IndictmentDecision, { nullable: true })
readonly indictmentDecision?: IndictmentDecision
Expand Down
Loading

0 comments on commit 8018de0

Please sign in to comment.