Skip to content

Commit

Permalink
Merge branch 'main' into feat/updated-stats-logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Dec 12, 2024
2 parents e2080c6 + de0bf4c commit 36fa4fc
Show file tree
Hide file tree
Showing 58 changed files with 537 additions and 303 deletions.
6 changes: 3 additions & 3 deletions apps/native/app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ react {
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
reactNativeDir = file("../../../../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
codegenDir = file("../../../../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
cliFile = file("../../../../../node_modules/react-native/cli.js")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
Expand Down
4 changes: 2 additions & 2 deletions apps/native/app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ allprojects {
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
url("$rootDir/../../../../../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
url("$rootDir/../../../../../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
Expand Down
5 changes: 1 addition & 4 deletions apps/native/app/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ applyNativeModulesSettingsGradle(settings)
include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../../../../node_modules/react-native-code-push/android/app')

include ':react-native-clipboard'
project(':react-native-clipboard').projectDir = new File(rootProject.projectDir, '../../node_modules/@react-native-clipboard/clipboard/android')

include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
includeBuild('../../../../node_modules/@react-native/gradle-plugin')

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
2 changes: 1 addition & 1 deletion apps/native/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"react-native-pdf": "6.7.5",
"react-native-quick-actions": "0.3.13",
"react-native-quick-base64": "2.1.2",
"react-native-reanimated": "3.12.1",
"react-native-reanimated": "3.16.5",
"react-native-share": "10.2.1",
"react-native-spotlight-search": "2.0.0",
"react-native-svg": "15.2.0",
Expand Down
2 changes: 1 addition & 1 deletion codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ workflows:
- island-upload-keystore
groups:
- google_credentials
- firebase_credentials
- firebase_credentials_dev
vars:
<<: *shared_envs
PACKAGE_NAME: 'is.island.app.dev'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export {
IdentityApi,
NationalRegistryUserApi,
} from '@island.is/application/types'

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useLocale } from '@island.is/localization'
import { DatePickerController } from '@island.is/shared/form-fields'
import React, { FC, useCallback, useEffect, useState } from 'react'
import { Controller, useFormContext } from 'react-hook-form'
import { NO, YES } from '../../constants'
import { NO, YES } from '../../utils/constants'
import { useLazyIsHealthInsured } from '../../hooks/useLazyIsHealthInsured'
import { AccidentNotification } from '../../lib/dataSchema'
import { accidentDetails } from '../../lib/messages'
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import is from 'date-fns/locale/is'
import parseISO from 'date-fns/parseISO'
import kennitala from 'kennitala'
import React, { FC } from 'react'
import { States, YES } from '../../constants'
import { States, YES } from '../../utils/constants'
import { AccidentNotification } from '../../lib/dataSchema'
import {
accidentDetails,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export { AgreementDescription } from './AgreementDescription'
export { DateOfAccident } from './DateOfAccident'
export { FormOverview } from './FormOverview'
export { HiddenInformation } from './HiddenInformation'
export { ApplicationStatus } from './ApplicationStatus'
export { FormOverviewInReview } from './FormOverviewInReview'
export { ProxyDocument } from './ProxyDocument'
export { DescriptionWithLink } from './DescriptionWithLink'
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ import {
isRepresentativeOfCompanyOrInstitute,
} from '../../../utils'
import { AttachmentsEnum } from '../../../types'
import { FILE_SIZE_LIMIT, NO, UPLOAD_ACCEPT, YES } from '../../../constants'
import {
FILE_SIZE_LIMIT,
NO,
UPLOAD_ACCEPT,
YES,
} from '../../../utils/constants'

// Injury certificate and fatal accident section
export const attachmentsSubSection = buildSubSection({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
isRescueWorkAccident,
isStudiesAccident,
} from '../../../utils'
import { NO, YES } from '../../../constants'
import { NO, YES } from '../../../utils/constants'
import { isSportAccidentAndEmployee } from '../../../utils/isSportAccidentAndEmployee'
import {
AgricultureAccidentLocationEnum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
isGeneralWorkplaceAccident,
} from '../../../utils'
import { isSportAccidentAndEmployee } from '../../../utils/isSportAccidentAndEmployee'
import { NO, YES } from '../../../constants'
import { NO, YES } from '../../../utils/constants'

// Workmachine information only applicable to generic workplace accidents
export const workMachineSubSection = buildSubSection({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { buildSection } from '@island.is/application/core'

import { applicantInformation } from '../../lib/messages'
import { applicantInformationMultiField } from '@island.is/application/ui-forms'

export const applicantInformationSection = buildSection({
id: 'informationAboutApplicantSection',
title: applicantInformation.general.title,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ import { buildForm } from '@island.is/application/core'
import { Form, FormModes } from '@island.is/application/types'
import Logo from '../../assets/Logo'
import { application } from '../../lib/messages'

import { conclusionSection } from './conclusionSection'

import { overviewSection } from './overviewSection'
import { betaTestSection } from './betaTestSection'
import { applicantInformationSection } from './applicantInformationSection'
import { whoIsTheNotificationForSection } from './whoIsTheNotificationForSection'
import { externalDataSection } from './externalDataSection'
import { aboutTheAccidentSection } from './aboutTheAccidentSection'

export const AccidentNotificationForm: Form = buildForm({
Expand All @@ -18,8 +14,6 @@ export const AccidentNotificationForm: Form = buildForm({
logo: Logo,
mode: FormModes.DRAFT,
children: [
betaTestSection,
externalDataSection,
applicantInformationSection,
whoIsTheNotificationForSection,
aboutTheAccidentSection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '@island.is/application/core'
import { juridicalPerson } from '../../../lib/messages'
import { isReportingOnBehalfOfEmployee } from '../../../utils'
import { YES } from '../../../constants'
import { YES } from '../../../utils/constants'

export const juridicalPersonCompanySubSection = buildSubSection({
id: 'juridicalPerson.company',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
buildSubSection,
} from '@island.is/application/core'
import { error, powerOfAttorney } from '../../../lib/messages'
import { FILE_SIZE_LIMIT, UPLOAD_ACCEPT } from '../../../constants'
import { FILE_SIZE_LIMIT, UPLOAD_ACCEPT } from '../../../utils/constants'
import { isUploadNow } from '../../../utils/isUploadNow'

export const powerOfAttorneyUploadSubSection = buildSubSection({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
import { buildMultiField, buildRadioField } from '@island.is/application/core'
import { whoIsTheNotificationFor } from '../../../lib/messages'
import { WhoIsTheNotificationForEnum } from '../../../types'
import {
whoIsTheNotificationForOptions,
whoIsTheNotificationForProcureOptions,
} from '../../../utils/getWhoIstheNotificationForOptions'

export const whoIsTheNotificationForMultiField = buildMultiField({
id: 'whoIsTheNotificationFor',
title: whoIsTheNotificationFor.general.heading,
description: whoIsTheNotificationFor.general.description,
description: (application) => {
if (application.externalData.identity) {
return whoIsTheNotificationFor.general.procureDescription
}
return whoIsTheNotificationFor.general.description
},
children: [
buildRadioField({
id: 'whoIsTheNotificationFor.answer',
title: '',
width: 'half',
options: [
{
value: WhoIsTheNotificationForEnum.ME,
label: whoIsTheNotificationFor.labels.me,
},
{
value: WhoIsTheNotificationForEnum.POWEROFATTORNEY,
label: whoIsTheNotificationFor.labels.powerOfAttorney,
},
{
value: WhoIsTheNotificationForEnum.JURIDICALPERSON,
label: whoIsTheNotificationFor.labels.juridicalPerson,
},
{
value: WhoIsTheNotificationForEnum.CHILDINCUSTODY,
label: whoIsTheNotificationFor.labels.childInCustody,
},
],
condition: (_answers, externalData) => !externalData.identity,
options: whoIsTheNotificationForOptions,
}),
buildRadioField({
id: 'whoIsTheNotificationFor.answer',
title: '',
width: 'half',
condition: (_answers, externalData) => !!externalData.identity,
options: whoIsTheNotificationForProcureOptions,
}),
],
})
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
buildSubmitField,
} from '@island.is/application/core'
import { DefaultEvents, FormValue } from '@island.is/application/types'
import { FILE_SIZE_LIMIT, UPLOAD_ACCEPT } from '../../constants'
import { FILE_SIZE_LIMIT, UPLOAD_ACCEPT } from '../../utils/constants'
import { addDocuments, error } from '../../lib/messages'
import {
hasReceivedInjuryCertificate,
Expand Down
Loading

0 comments on commit 36fa4fc

Please sign in to comment.