Skip to content

Commit

Permalink
Merge branch 'main' into j-s/defender-filter-court-date
Browse files Browse the repository at this point in the history
  • Loading branch information
unakb committed Dec 13, 2024
2 parents 830a673 + c13fd91 commit f009f43
Show file tree
Hide file tree
Showing 155 changed files with 2,804 additions and 1,759 deletions.
780 changes: 394 additions & 386 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ export class CourtService {
try {
const subject = `${courtName} - ${courtCaseNumber} - upplýsingar`

const sanitizedPoliceCaseNumber = policeCaseNumber?.replace(/-/g, '')
policeCaseNumber = policeCaseNumber?.replace(/-/g, '')

const content = JSON.stringify({
receivedByCourtDate,
indictmentDate,
sanitizedPoliceCaseNumber,
policeCaseNumber,
subtypes,
defendants,
prosecutor,
Expand Down
31 changes: 23 additions & 8 deletions apps/judicial-system/web/src/routes/Shared/Cases/PrisonCases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { useIntl } from 'react-intl'
import partition from 'lodash/partition'

import { AlertMessage, Box, Tag, Text } from '@island.is/island-ui/core'
import { capitalize } from '@island.is/judicial-system/formatters'
import {
capitalize,
districtCourtAbbreviation,
} from '@island.is/judicial-system/formatters'
import {
core,
errors,
Expand Down Expand Up @@ -166,6 +169,10 @@ export const PrisonCases: FC = () => {
thead={[
{
title: formatMessage(tables.caseNumber),
sortable: {
isSortable: true,
key: 'courtCaseNumber',
},
},
{
title: capitalize(formatMessage(core.defendant, { suffix: 'i' })),
Expand All @@ -182,13 +189,21 @@ export const PrisonCases: FC = () => {
data={cases}
columns={[
{
cell: (row) => (
<CourtCaseNumber
courtCaseNumber={row.courtCaseNumber ?? ''}
policeCaseNumbers={row.policeCaseNumbers ?? []}
appealCaseNumber={row.appealCaseNumber ?? ''}
/>
),
cell: (row) => {
const courtAbbreviation = districtCourtAbbreviation(
row.court?.name,
)

return (
<CourtCaseNumber
courtCaseNumber={`${
courtAbbreviation ? `${courtAbbreviation}: ` : ''
}${row.courtCaseNumber ?? ''}`}
policeCaseNumbers={row.policeCaseNumbers ?? []}
appealCaseNumber={row.appealCaseNumber ?? ''}
/>
)
},
},
{
cell: (row) => <DefendantInfo defendants={row.defendants} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ query PrisonCases {
role
active
}
court {
id
name
}
prosecutor {
id
created
Expand Down
70 changes: 68 additions & 2 deletions apps/native/app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,73 @@ PODS:
- React-Core
- RNQuickAction (0.3.13):
- React
- RNReanimated (3.12.1):
- RNReanimated (3.16.5):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNReanimated/reanimated (= 3.16.5)
- RNReanimated/worklets (= 3.16.5)
- Yoga
- RNReanimated/reanimated (3.16.5):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNReanimated/reanimated/apple (= 3.16.5)
- Yoga
- RNReanimated/reanimated/apple (3.16.5):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNReanimated/worklets (3.16.5):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -2030,7 +2096,7 @@ SPEC CHECKSUMS:
RNInAppBrowser: e36d6935517101ccba0e875bac8ad7b0cb655364
RNKeychain: ff836453cba46938e0e9e4c22e43d43fa2c90333
RNQuickAction: 6d404a869dc872cde841ad3147416a670d13fa93
RNReanimated: d093daf3973a7ee9f77c10a9337e10390b2969e2
RNReanimated: 73acffa7201bc9caee34b6f26878342cc9d8ab47
RNShare: 0fad69ae2d71de9d1f7b9a43acf876886a6cb99c
RNSVG: 43b64ed39c14ce830d840903774154ca0c1f27ec
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Expand Down
5 changes: 4 additions & 1 deletion apps/native/app/src/screens/passkey/passkey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ export const PasskeyScreen: NavigationFunctionComponent<{
<TouchableOpacity
style={{ flexWrap: 'wrap' }}
onPress={() =>
openBrowser('https://island.is/adgangslyklar', componentId)
openBrowser(
'https://island.is/innskraning-umbod-og-adgangsstyring-a-island-is#innskraning-med-adgangslykli-i-island-is-appinu',
componentId,
)
}
>
<LinkText>
Expand Down
5 changes: 5 additions & 0 deletions apps/services/auth/ids-api/infra/ids-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ export const serviceSetup = (): ServiceBuilder<'services-auth-ids-api'> => {
staging: 'digitaliceland',
dev: 'digitaliceland',
},
ALSO_USE_FAKE_USER_API: {
dev: 'true',
staging: 'false',
prod: 'false',
},
})
.secrets({
ZENDESK_CONTACT_FORM_EMAIL: '/k8s/api/ZENDESK_CONTACT_FORM_EMAIL',
Expand Down
2 changes: 1 addition & 1 deletion apps/services/auth/ids-api/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { NationalRegistryV3ClientConfig } from '@island.is/clients/national-regi
import { CompanyRegistryConfig } from '@island.is/clients/rsk/company-registry'
import { SyslumennClientConfig } from '@island.is/clients/syslumenn'
import { UserProfileClientConfig } from '@island.is/clients/user-profile'
import { ZendeskServiceConfig } from '@island.is/clients/zendesk'
import { AuditModule } from '@island.is/nest/audit'
import {
ConfigModule,
Expand All @@ -35,7 +36,6 @@ import { ResourcesModule } from './resources/resources.module'
import { TranslationModule } from './translation/translation.module'
import { UserProfileModule } from './user-profile/user-profile.module'
import { UsersModule } from './users/users.module'
import { ZendeskServiceConfig } from '@island.is/clients/zendesk'

@Module({
imports: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Inject, Injectable } from '@nestjs/common'
import { Inject, Injectable, Optional } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'

import { AuthMiddleware } from '@island.is/auth-nest-tools'
import { FetchError } from '@island.is/clients/middlewares'
Expand Down Expand Up @@ -30,6 +31,7 @@ type CountryFormatter = { of: (countryCode: string) => string }

@Injectable()
export class UserProfileService {
alsoUseFakeApi: boolean
// REMOVE these ignores after upgrading to TypeScript 4.5
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand All @@ -45,7 +47,12 @@ export class UserProfileService {
private companyRegistryApi: CompanyRegistryClientService,
@Inject(LOGGER_PROVIDER)
private logger: Logger,
) {}
@Optional()
readonly configService?: ConfigService,
) {
this.alsoUseFakeApi =
configService?.get<boolean>('ALSO_USE_FAKE_USER_API') ?? false
}

userProfileApiWithAuth(auth: Auth) {
return this.userProfileApi.withMiddleware(new AuthMiddleware(auth))
Expand Down Expand Up @@ -123,6 +130,7 @@ export class UserProfileService {
const individual = await this.nationalRegistryV3.getAllDataIndividual(
auth.nationalId,
false,
this.alsoUseFakeApi,
)

if (!individual) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f009f43

Please sign in to comment.