Skip to content

Commit

Permalink
Merge branch 'main' into chore/dsl-typing
Browse files Browse the repository at this point in the history
  • Loading branch information
AndesKrrrrrrrrrrr authored Oct 15, 2024
2 parents a2098ca + 420313d commit 40e5061
Show file tree
Hide file tree
Showing 255 changed files with 7,919 additions and 3,670 deletions.
2 changes: 2 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Empty config file so defaults will be respected instead of users' own global config
# (prevent directory traversal)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ import {
import { DocumentsScope } from '@island.is/auth/scopes'
import { DocumentClient } from '@island.is/clients/documents'
import { AuditService } from '@island.is/nest/audit'
import { Controller, Header, Param, Post, Res, UseGuards } from '@nestjs/common'
import {
Controller,
Header,
Param,
Post,
Res,
UseGuards,
Query,
} from '@nestjs/common'
import { ApiOkResponse, ApiTags } from '@nestjs/swagger'
import { Response } from 'express'

Expand All @@ -32,6 +40,7 @@ export class DocumentController {
@Param('pdfId') pdfId: string,
@CurrentUser() user: User,
@Res() res: Response,
@Query('action') action: string,
) {
const rawDocumentDTO = await this.documentClient.customersDocument({
kennitala: user.nationalId,
Expand All @@ -54,7 +63,9 @@ export class DocumentController {
res.header('Content-length', buffer.length.toString())
res.header(
'Content-Disposition',
`inline; filename=${rawDocumentDTO.fileName}.pdf`,
`${action === 'download' ? 'attachment' : 'inline'}; filename=${
rawDocumentDTO.fileName
}.pdf`,
)
res.header('Pragma: no-cache')
res.header('Cache-Control: no-cache')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
'RULING',
'MODIFIED',
'REVOKED',
'DEFENDER_ASSIGNED',
'ADVOCATE_ASSIGNED', // Changed value
'DEFENDANTS_NOT_UPDATED_AT_COURT',
'APPEAL_TO_COURT_OF_APPEALS',
Expand Down
2 changes: 1 addition & 1 deletion apps/native/app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode getMyVersionCode(143)
versionName "1.4.4"
versionName "1.4.5"
manifestPlaceholders = [
appAuthRedirectScheme: "is.island.app" // project.config.get("BUNDLE_ID_ANDROID")
]
Expand Down
2 changes: 1 addition & 1 deletion apps/native/app/ios/IslandApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.4</string>
<string>1.4.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
Binary file added apps/native/app/src/assets/icons/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/native/app/src/assets/icons/download@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/native/app/src/assets/icons/download@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/native/app/src/assets/icons/external-open.png
Binary file not shown.
Binary file removed apps/native/app/src/assets/icons/external-open@2x.png
Binary file not shown.
Binary file removed apps/native/app/src/assets/icons/external-open@3x.png
Binary file not shown.
Binary file added apps/native/app/src/assets/icons/health.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/native/app/src/assets/icons/health@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/native/app/src/assets/icons/health@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/native/app/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ export const config = {
'@island.is/finance/schedule:read',
'@island.is/licenses:barcode',
'@island.is/auth/passkeys',
'@island.is/health/healthcare',
'@island.is/health/payments',
'@island.is/health/rights-status',
'@island.is/health/medicines',
'@island.is/health/vaccinations',
'@island.is/health/organ-donation',
'@island.is/licenses:barcode',
'@island.is/auth/passkeys',
],
cognitoUrl: 'https://cognito.shared.devland.is/login',
cognitoClientId: 'bre6r7d5e7imkcgbt7et1kqlc',
Expand Down
16 changes: 16 additions & 0 deletions apps/native/app/src/graphql/fragments/document.fragment.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ fragment ListDocument on DocumentV2 {
opened
categoryId
bookmarked
isUrgent
actions {
type
title
icon
data
}
alert {
title
data
}
confirmation {
title
data
icon
}
sender {
id
name
Expand Down
37 changes: 37 additions & 0 deletions apps/native/app/src/graphql/queries/health.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
query GetHealthInsuranceOverview {
rightsPortalInsuranceOverview {
isInsured
explanation
from
status {
display
code
}
maximumPayment
}
}

query GetHealthCenter($input: RightsPortalHealthCenterHistoryInput) {
rightsPortalHealthCenterRegistrationHistory(input: $input) {
current {
healthCenterName
doctor
}
}
}

query GetPaymentOverview($input: RightsPortalPaymentOverviewInput!) {
rightsPortalPaymentOverview(input: $input) {
items {
credit
debt
}
}
}

query GetPaymentStatus {
rightsPortalCopaymentStatus {
maximumPayment
maximumMonthlyPayment
}
}
4 changes: 2 additions & 2 deletions apps/native/app/src/graphql/queries/inbox.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ query GetDocumentsCategoriesAndSenders {
}
}

query GetDocument($input: DocumentInput!) {
documentV2(input: $input) {
query GetDocument($input: DocumentInput!, $locale: String) {
documentV2(input: $input, locale: $locale) {
...ListDocument
content {
type
Expand Down
6 changes: 6 additions & 0 deletions apps/native/app/src/hooks/use-locale.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { usePreferencesStore } from '../stores/preferences-store'

export const useLocale = () => {
const locale = usePreferencesStore(({ locale }) => locale)
return locale === 'is-IS' ? 'is' : 'en'
}
32 changes: 29 additions & 3 deletions apps/native/app/src/messages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const en: TranslatedMessages = {
'home.onboardingModule.card2':
'The app’s purpose is to provide faster access to your documents, applications, and other dealings with governmental institutions.',
'home.onboardingModule.card3':
'If you have comments or suggestions about something that is missing or that could be improved, feel free to contact us via email at',
'If you have comments or suggestions about something that is missing or that could be improved, feel free to contact us via email at island@island.is',
'home.onboardingModule.card4':
'We encourage our users to read Digital Iceland’s privacy policy on',
'home.vehicleModule.summary':
Expand Down Expand Up @@ -207,13 +207,14 @@ export const en: TranslatedMessages = {
'inbox.emptyListTitle': 'There are currently no documents',
'inbox.emptyListDescription':
'When you receive electronic documents from the government, they will appear here.',

'inbox.markAllAsReadPromptTitle': 'Do you want to mark all as read?',
'inbox.markAllAsReadPromptDescription': 'This action cannot be undone',
'inbox.markAllAsReadPromptCancel': 'Cancel',
'inbox.markAllAsReadPromptConfirm': 'Mark all as read',
'inbox.cardNoInboxDocuments':
'When you receive mail in your mailbox, it will appear here.',
'inbox.urgent': 'Urgent',
'inbox.openDocument': 'Open document',

// inbox filters
'inboxFilters.screenTitle': 'Filter documents',
Expand Down Expand Up @@ -344,7 +345,8 @@ export const en: TranslatedMessages = {
'profile.vehicles': 'Vehicles',
'profile.assets': 'Assets',
'profile.finance': 'Finance',
'profile.airDiscount': 'Air discount scheme',
'profile.airDiscount': 'Air discount',
'profile.health': 'Health',

// vehicles
'vehicles.screenTitle': 'Vehicles',
Expand Down Expand Up @@ -592,6 +594,9 @@ export const en: TranslatedMessages = {
'You are opening Island.is in a browser. Do you want to create a passkey to sign in automatically with the app?',
'passkeys.headingSubtitle':
'Do you want to create a passkey to sign in automatically with the app?',
'passkeys.settings':
'In settings it is always possible to delete or add a passkey',
'passkeys.furtherInformation': 'More about passkeys',
'passkeys.createButton': 'Create a passkey',
'passkeys.skipButton': 'Skip',
'passkeys.errorRegistering': 'Error',
Expand All @@ -603,4 +608,25 @@ export const en: TranslatedMessages = {
'You are about to use an old version of the Island.is app. Please update the app to be able to continue.',
'updateApp.button': 'Update',
'updateApp.buttonSkip': 'Skip',

// health
'health.overview.screenTitle': 'Health',
'health.overview.title': 'My health',
'health.overview.description':
'Here you can find your health data, health center and health insurance.',
'health.overview.healthCenter': 'Health center',
'health.overview.noHealthCenterRegistered': 'No health center registered',
'health.overview.physician': 'Physician',
'health.overview.noPhysicianRegistered': 'No doctor registered',
'health.overview.statusOfRights': 'Status of rights',
'health.overview.insuredFrom': 'Insured from',
'health.overview.status': 'Status',
'health.overview.notInsured': 'You do not have health insurance',
'health.overview.coPayments': 'Co-payment',
'health.overview.maxMonthlyPayment': 'Max monthly payment',
'health.overview.paymentLimit': 'Payment Limit',
'health.overview.paymentCredit': 'Credit',
'health.overview.paymentDebt': 'Debt',
'health.overview.therapy': 'Therapy',
'health.overview.aidsAndNutrition': 'Aids and nutrition',
}
29 changes: 28 additions & 1 deletion apps/native/app/src/messages/is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const is = {
'home.onboardingModule.card2':
'Markmiðið með appinu er að þú hafir í hendi þér það sem þú þarfnast hverju sinni í samskiptum við hið opinbera.',
'home.onboardingModule.card3':
'Hafir þú athugasemdir eða ábendingar um eitthvað sem vantar eða sem má betur fara viljum við gjarnan fá frá þér línu á',
'Hafir þú athugasemdir eða ábendingar um eitthvað sem vantar eða sem má betur fara viljum við gjarnan fá frá þér línu á island@island.is',
'home.onboardingModule.card4':
'Notendum er bent á að kynna sér stefnu Stafræns Íslands um meðferð persónuupplýsinga á',
'home.vehicleModule.summary':
Expand Down Expand Up @@ -213,6 +213,8 @@ export const is = {
'inbox.markAllAsReadPromptConfirm': 'Merkja lesið',
'inbox.cardNoInboxDocuments':
'Þegar þú færð sendan póst í pósthólfið þá birtist hann hér.',
'inbox.urgent': 'Áríðandi',
'inbox.openDocument': 'Opna erindi',

// inbox filters
'inboxFilters.screenTitle': 'Sía skjöl',
Expand Down Expand Up @@ -248,6 +250,7 @@ export const is = {
'profile.assets': 'Fasteignir',
'profile.finance': 'Fjármál',
'profile.airDiscount': 'Loftbrú',
'profile.health': 'Heilsa',

// vehicles
'vehicles.screenTitle': 'Ökutæki',
Expand Down Expand Up @@ -591,6 +594,9 @@ export const is = {
'Þú ert að fara að opna Ísland.is í vafra. Viltu búa til aðgangslykil til að skrá þig inn sjálfkrafa með appinu?',
'passkeys.headingSubtitle':
'Viltu búa til aðgangslykil til að skrá þig inn sjálfkrafa með appinu?',
'passkeys.settings':
'Undir stillingum er alltaf hægt að eyða eða búa til aðgangslykil',
'passkeys.furtherInformation': 'Nánar um aðgangslykla',
'passkeys.createButton': 'Búa til aðgangslykil',
'passkeys.skipButton': 'Sleppa',
'passkeys.errorRegistering': 'Villa',
Expand All @@ -602,4 +608,25 @@ export const is = {
'Þú ert að fara að nota gamla útgáfu af Ísland.is appinu. Vinsamlegast uppfærðu appið til að halda áfram.',
'updateApp.button': 'Uppfæra',
'updateApp.buttonSkip': 'Sleppa',

// health
'health.overview.screenTitle': 'Heilsa',
'health.overview.title': 'Heilsan mín',
'health.overview.description':
'Hér finnur þú þín heilsufarsgögn, heilsugæslu og sjúkratryggingar',
'health.overview.healthCenter': 'Heilsugæsla',
'health.overview.noHealthCenterRegistered': 'Engin heilsugæsla skráð',
'health.overview.physician': 'Heimilislæknir',
'health.overview.noPhysicianRegistered': 'Enginn læknir skráður',
'health.overview.statusOfRights': 'Réttindastaða',
'health.overview.insuredFrom': 'Sjúkratrygging frá',
'health.overview.status': 'Staða',
'health.overview.notInsured': 'Þú ert ekki með sjúkratryggingu',
'health.overview.coPayments': 'Greiðsluþáttaka',
'health.overview.maxMonthlyPayment': 'Hámarksgreiðslan þín á mánuði',
'health.overview.paymentLimit': 'Greiðslumark',
'health.overview.paymentCredit': 'Inneign',
'health.overview.paymentDebt': 'Skuld',
'health.overview.therapy': 'Þjálfun',
'health.overview.aidsAndNutrition': 'Hjálpartæki og næring',
}
6 changes: 4 additions & 2 deletions apps/native/app/src/screens/air-discount/air-discount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Typography,
} from '@ui'
import React from 'react'
import { SafeAreaView, ScrollView, View } from 'react-native'
import { Image, SafeAreaView, ScrollView, View } from 'react-native'
import { NavigationFunctionComponent } from 'react-native-navigation'
import { FormattedMessage, useIntl } from 'react-intl'
import styled, { useTheme } from 'styled-components/native'
Expand All @@ -22,6 +22,7 @@ import { AirDiscountCard } from '@ui/lib/card/air-discount-card'
import { Bullet } from '@ui/lib/bullet/bullet'
import { useConnectivityIndicator } from '../../hooks/use-connectivity-indicator'
import { AirfaresUsageTable } from './airfares-usage-table'
import externalLinkIcon from '../../assets/icons/external-link.png'

const BulletList = styled.View`
margin-vertical: 12px;
Expand Down Expand Up @@ -152,7 +153,8 @@ export const AirDiscountScreen: NavigationFunctionComponent = ({
<FormattedMessage
id="airDiscount.tosLinkText"
defaultMessage="Notendaskilmálar"
/>
/>{' '}
<Image source={externalLinkIcon} />
</LinkText>
</Link>
</TOSLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from '../../graphql/types/schema'
import { createNavigationOptionHooks } from '../../hooks/create-navigation-option-hooks'
import { useConnectivityIndicator } from '../../hooks/use-connectivity-indicator'
import { useLocale } from '../../hooks/use-locale'
import { ApplicationsList } from './components/applications-list'
import { usePreferencesStore } from '../../stores/preferences-store'

const { useNavigationOptions, getNavigationOptions } =
createNavigationOptionHooks(
Expand All @@ -33,7 +33,6 @@ export const ApplicationsCompletedScreen: NavigationFunctionComponent = ({
}) => {
useNavigationOptions(componentId)
const [refetching, setRefetching] = useState(false)
const { locale } = usePreferencesStore()

const applicationsRes = useListApplicationsQuery({
variables: {
Expand All @@ -44,7 +43,7 @@ export const ApplicationsCompletedScreen: NavigationFunctionComponent = ({
ApplicationResponseDtoStatusEnum.Approved,
],
},
locale: locale === 'is-IS' ? 'is' : 'en',
locale: useLocale(),
},
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from '../../graphql/types/schema'
import { createNavigationOptionHooks } from '../../hooks/create-navigation-option-hooks'
import { useConnectivityIndicator } from '../../hooks/use-connectivity-indicator'
import { useLocale } from '../../hooks/use-locale'
import { ApplicationsList } from './components/applications-list'
import { usePreferencesStore } from '../../stores/preferences-store'

const { useNavigationOptions, getNavigationOptions } =
createNavigationOptionHooks(
Expand All @@ -33,14 +33,13 @@ export const ApplicationsInProgressScreen: NavigationFunctionComponent = ({
}) => {
useNavigationOptions(componentId)
const [refetching, setRefetching] = useState(false)
const { locale } = usePreferencesStore()

const applicationsRes = useListApplicationsQuery({
variables: {
input: {
status: [ApplicationResponseDtoStatusEnum.Inprogress],
},
locale: locale === 'is-IS' ? 'is' : 'en',
locale: useLocale(),
},
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from '../../graphql/types/schema'
import { createNavigationOptionHooks } from '../../hooks/create-navigation-option-hooks'
import { useConnectivityIndicator } from '../../hooks/use-connectivity-indicator'
import { useLocale } from '../../hooks/use-locale'
import { ApplicationsList } from './components/applications-list'
import { usePreferencesStore } from '../../stores/preferences-store'

const { useNavigationOptions, getNavigationOptions } =
createNavigationOptionHooks(
Expand All @@ -33,14 +33,13 @@ export const ApplicationsIncompleteScreen: NavigationFunctionComponent = ({
}) => {
useNavigationOptions(componentId)
const [refetching, setRefetching] = useState(false)
const { locale } = usePreferencesStore()

const applicationsRes = useListApplicationsQuery({
variables: {
input: {
status: [ApplicationResponseDtoStatusEnum.Draft],
},
locale: locale === 'is-IS' ? 'is' : 'en',
locale: useLocale(),
},
})

Expand Down
Loading

0 comments on commit 40e5061

Please sign in to comment.