Skip to content

Commit

Permalink
Merge branch 'main' into regulations-admin/bugfixing-regs
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored May 15, 2024
2 parents d8aae29 + 08e214d commit 7eb900c
Show file tree
Hide file tree
Showing 133 changed files with 1,183 additions and 2,022 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ codemagic.yaml
/libs/clients/license-client/ @island-is/hugsmidjan @island-is/aranja
/libs/clients/intellectual-properties/ @island-is/hugsmidjan
/libs/clients/islykill/ @island-is/hugsmidjan
/libs/clients/national-registry/v1/ @island-is/hugsmidjan
/libs/clients/national-registry/v3/ @island-is/hugsmidjan
/libs/clients/district-commissioners-licenses/ @island-is/hugsmidjan
/libs/clients/regulations/ @island-is/hugsmidjan
Expand Down
10 changes: 0 additions & 10 deletions apps/api/infra/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { json, ref, service, ServiceBuilder } from '../../../infra/src/dsl/dsl'
import { settings } from '../../../infra/src/dsl/settings'
import {
AdrAndMachine,
Base,
Expand Down Expand Up @@ -198,12 +197,6 @@ export const serviceSetup = (services: {
prod: 'https://samradapi.island.is',
},
FISKISTOFA_ZENTER_CLIENT_ID: '1114',
SOFFIA_SOAP_URL: {
dev: ref((h) => h.svc('https://soffiaprufa.skra.is')),
staging: ref((h) => h.svc('https://soffiaprufa.skra.is')),
prod: ref((h) => h.svc('https://soffia2.skra.is')),
local: ref((h) => h.svc('https://localhost:8443')),
},
HSN_WEB_FORM_ID: '1dimJFHLFYtnhoYEA3JxRK',
SESSIONS_API_URL: ref((h) => `http://${h.svc(services.sessionsApi)}`),
AUTH_ADMIN_API_PATHS: {
Expand Down Expand Up @@ -288,12 +281,9 @@ export const serviceSetup = (services: {
'/k8s/api/REGULATIONS_FILE_UPLOAD_KEY_PUBLISH',
REGULATIONS_FILE_UPLOAD_KEY_PRESIGNED:
'/k8s/api/REGULATIONS_FILE_UPLOAD_KEY_PRESIGNED',
SOFFIA_HOST_URL: '/k8s/api/SOFFIA_HOST_URL',
CONTENTFUL_ACCESS_TOKEN: '/k8s/api/CONTENTFUL_ACCESS_TOKEN',
ZENDESK_CONTACT_FORM_EMAIL: '/k8s/api/ZENDESK_CONTACT_FORM_EMAIL',
ZENDESK_CONTACT_FORM_TOKEN: '/k8s/api/ZENDESK_CONTACT_FORM_TOKEN',
SOFFIA_USER: settings.SOFFIA_USER,
SOFFIA_PASS: settings.SOFFIA_PASS,
POSTHOLF_CLIENTID: '/k8s/documents/POSTHOLF_CLIENTID',
POSTHOLF_CLIENT_SECRET: '/k8s/documents/POSTHOLF_CLIENT_SECRET',
POSTHOLF_TOKEN_URL: '/k8s/documents/POSTHOLF_TOKEN_URL',
Expand Down
6 changes: 1 addition & 5 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@
"dev": {
"executor": "nx:run-commands",
"options": {
"commands": [
"./scripts/run-xroad-proxy.sh",
"./scripts/run-soffia-proxy.sh",
"yarn start api"
],
"commands": ["./scripts/run-xroad-proxy.sh", "yarn start api"],
"parallel": true
}
},
Expand Down
2 changes: 0 additions & 2 deletions apps/api/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ import {
MachineDigitalLicenseClientConfig,
} from '@island.is/clients/license-client'
import { MunicipalitiesFinancialAidConfig } from '@island.is/clients/municipalities-financial-aid'
import { NationalRegistrySoffiaClientConfig } from '@island.is/clients/national-registry-v1'
import { NationalRegistryClientConfig } from '@island.is/clients/national-registry-v2'
import { NationalRegistryV3ClientConfig } from '@island.is/clients/national-registry-v3'
import { PassportsClientConfig } from '@island.is/clients/passports'
Expand Down Expand Up @@ -331,7 +330,6 @@ const environment = getConfig
PCardClientConfig,
DistrictCommissionersLicensesClientConfig,
AdrAndMachineLicenseClientConfig,
NationalRegistrySoffiaClientConfig,
NationalRegistryV3ClientConfig,
FirearmLicenseClientConfig,
DisabilityLicenseClientConfig,
Expand Down
12 changes: 0 additions & 12 deletions apps/api/src/app/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ const prodConfig = () => ({
fileStorage: {
uploadBucket: process.env.FILE_STORAGE_UPLOAD_BUCKET,
},
nationalRegistry: {
baseSoapUrl: process.env.SOFFIA_SOAP_URL,
user: process.env.SOFFIA_USER,
password: process.env.SOFFIA_PASS,
host: process.env.SOFFIA_HOST_URL,
},
healthInsurance: {
wsdlUrl: process.env.XROAD_HEALTH_INSURANCE_WSDLURL,
baseUrl: process.env.XROAD_BASE_PATH,
Expand Down Expand Up @@ -148,12 +142,6 @@ const devConfig = () => ({
fileStorage: {
uploadBucket: process.env.FILE_STORAGE_UPLOAD_BUCKET,
},
nationalRegistry: {
baseSoapUrl: 'https://localhost:8443',
user: process.env.SOFFIA_USER ?? '',
password: process.env.SOFFIA_PASS ?? '',
host: 'soffiaprufa.skra.is',
},
healthInsurance: {
wsdlUrl:
process.env.XROAD_HEALTH_INSURANCE_WSDLURL ??
Expand Down
3 changes: 1 addition & 2 deletions apps/application-system/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@
"commands": [
"yarn nx run api:dev",
"yarn nx run services-user-profile:dev",
"yarn start application-system-api",
"scripts/run-soffia-proxy.sh"
"yarn start application-system-api"
],
"parallel": true
}
Expand Down
12 changes: 0 additions & 12 deletions apps/application-system/api/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ const devConfig = {
userProfile: {
serviceBasePath: 'http://localhost:3366',
},
nationalRegistry: {
baseSoapUrl: 'https://localhost:8443',
user: process.env.SOFFIA_USER ?? '',
password: process.env.SOFFIA_PASS ?? '',
host: 'soffiaprufa.skra.is',
},
islykill: {
cert: process.env.ISLYKILL_CERT,
passphrase: process.env.ISLYKILL_SERVICE_PASSPHRASE,
Expand Down Expand Up @@ -156,12 +150,6 @@ const prodConfig = {
userProfile: {
serviceBasePath: process.env.SERVICE_USER_PROFILE_URL,
},
nationalRegistry: {
baseSoapUrl: process.env.SOFFIA_SOAP_URL,
user: process.env.SOFFIA_USER,
password: process.env.SOFFIA_PASS,
host: process.env.SOFFIA_HOST_URL,
},
islykill: {
cert: process.env.ISLYKILL_CERT,
passphrase: process.env.ISLYKILL_SERVICE_PASSPHRASE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { service, ServiceBuilder } from '../../../infra/src/dsl/dsl'
import { Base, NationalRegistry } from '../../../infra/src/dsl/xroad'
import { settings } from '../../../infra/src/dsl/settings'

export const serviceSetup = (): ServiceBuilder<'external-contracts-tests'> => {
return service('external-contracts-tests')
Expand All @@ -11,12 +10,7 @@ export const serviceSetup = (): ServiceBuilder<'external-contracts-tests'> => {
prod: { schedule: '0 11 * * *' },
})
.env({})
.secrets({
SOFFIA_SOAP_URL: '/k8s/api/SOFFIA_SOAP_URL',
SOFFIA_HOST_URL: '/k8s/api/SOFFIA_HOST_URL',
SOFFIA_USER: settings.SOFFIA_USER,
SOFFIA_PASS: settings.SOFFIA_PASS,
})
.secrets({})
.resources({
limits: {
cpu: '1',
Expand Down
3 changes: 0 additions & 3 deletions apps/external-contracts-tests/main.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
import * as testSuites from './test-suites/'

console.log('Forcing esbuild visit to testSuites:', testSuites)
1 change: 0 additions & 1 deletion apps/external-contracts-tests/test-suites/index.ts

This file was deleted.

25 changes: 0 additions & 25 deletions apps/external-contracts-tests/test-suites/soffia.spec.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
getApplicant,
getApplicantMoreInfo,
getApplicantSpouse,
getChildrenInfo,
getDirectTaxPayments,
getNationalRegistryInfo,
} from '@island.is/financial-aid-web/veita/src/utils/applicationHelper'
Expand Down Expand Up @@ -141,6 +142,8 @@ const ApplicationProfile = ({

const nationalRegistryInfo = getNationalRegistryInfo(application)

const childrenInfo = getChildrenInfo(application)

const modalInfo = getAidAmountModalInfo(
calculationsModal.type,
aidAmount,
Expand Down Expand Up @@ -206,17 +209,11 @@ const ApplicationProfile = ({
/>

<CollapsibleProfileUnit
heading="Upplýsingar um staðgreiðslu"
info={getDirectTaxPayments(applicantDirectPayments)}
className={`contentUp delay-75`}
heading="Þjóðskrá"
info={nationalRegistryInfo}
className={`contentUp delay-125`}
isPrint={isPrint}
>
{getDirectTaxPaymentsContent(
applicantDirectPayments,
application.hasFetchedDirectTaxPayment,
application.created,
)}
</CollapsibleProfileUnit>
/>

{showSpouseData[application.familyStatus] && (
<>
Expand All @@ -242,16 +239,31 @@ const ApplicationProfile = ({
</>
)}

{childrenInfo?.length > 0 && (
<CollapsibleProfileUnit
heading="Börn"
info={childrenInfo}
className={`contentUp delay-125`}
isPrint={isPrint}
/>
)}

<CollapsibleProfileUnit
heading="Umsóknarferli"
info={applicantMoreInfo}
className={`contentUp delay-125`}
heading="Upplýsingar um staðgreiðslu"
info={getDirectTaxPayments(applicantDirectPayments)}
className={`contentUp delay-75`}
isPrint={isPrint}
/>
>
{getDirectTaxPaymentsContent(
applicantDirectPayments,
application.hasFetchedDirectTaxPayment,
application.created,
)}
</CollapsibleProfileUnit>

<CollapsibleProfileUnit
heading="Þjóðskrá"
info={nationalRegistryInfo}
heading="Umsóknarferli"
info={applicantMoreInfo}
className={`contentUp delay-125`}
isPrint={isPrint}
/>
Expand Down
29 changes: 29 additions & 0 deletions apps/financial-aid/web-veita/src/utils/applicationHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,35 @@ export const getNationalRegistryInfo = (application: Application) => {
]
}

export const getChildrenInfo = (application: Application) => {
if (!application.children) {
return []
}

const allChildren = application.children.map((child) => {
return [
{
title: 'Nafn',
content: child.name,
},
{
title: 'Kennitala',
content: formatNationalId(child.nationalId),
},
{
title: 'Skólastofnun',
content: child.school,
},
{
title: '',
content: '',
},
]
})

return allChildren.flat()
}

export const getApplicantSpouse = (application: Application) => {
return [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
'use strict'

const replaceEnum = require('sequelize-replace-enum-postgres').default

module.exports = {
async up(queryInterface) {
return replaceEnum({
queryInterface,
tableName: 'case_file',
columnName: 'category',
newValues: [
'COURT_RECORD',
'RULING',
'COVER_LETTER',
'INDICTMENT',
'CRIMINAL_RECORD',
'COST_BREAKDOWN',
'CASE_FILE',
'PROSECUTOR_APPEAL_BRIEF',
'DEFENDANT_APPEAL_BRIEF',
'PROSECUTOR_APPEAL_BRIEF_CASE_FILE',
'DEFENDANT_APPEAL_BRIEF_CASE_FILE',
'PROSECUTOR_APPEAL_STATEMENT',
'DEFENDANT_APPEAL_STATEMENT',
'PROSECUTOR_APPEAL_STATEMENT_CASE_FILE',
'DEFENDANT_APPEAL_STATEMENT_CASE_FILE',
'PROSECUTOR_APPEAL_CASE_FILE',
'DEFENDANT_APPEAL_CASE_FILE',
'APPEAL_COURT_RECORD',
'APPEAL_RULING',
'CRIMINAL_RECORD_UPDATE', // new value
],
})
},

async down(queryInterface) {
return replaceEnum({
queryInterface,
tableName: 'case_file',
columnName: 'category',
newValues: [
'COURT_RECORD',
'RULING',
'COVER_LETTER',
'INDICTMENT',
'CRIMINAL_RECORD',
'COST_BREAKDOWN',
'CASE_FILE',
'PROSECUTOR_APPEAL_BRIEF',
'DEFENDANT_APPEAL_BRIEF',
'PROSECUTOR_APPEAL_BRIEF_CASE_FILE',
'DEFENDANT_APPEAL_BRIEF_CASE_FILE',
'PROSECUTOR_APPEAL_STATEMENT',
'DEFENDANT_APPEAL_STATEMENT',
'PROSECUTOR_APPEAL_STATEMENT_CASE_FILE',
'DEFENDANT_APPEAL_STATEMENT_CASE_FILE',
'PROSECUTOR_APPEAL_CASE_FILE',
'DEFENDANT_APPEAL_CASE_FILE',
'APPEAL_COURT_RECORD',
'APPEAL_RULING',
],
})
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,17 @@ export class NotificationService {
)
}

if (theCase.defenderEmail) {
promises.push(
this.sendEmail(
subject,
html,
theCase.defenderName,
theCase.defenderEmail,
),
)
}

const recipients = await Promise.all(promises)

return this.recordNotification(
Expand Down
6 changes: 6 additions & 0 deletions apps/judicial-system/web/messages/Core/titles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ export const titles = {
description:
'Notaður sem titill fyrir Niðurstaða úrskurðar skjá hjá dómstólum í ákærum',
},
completed: {
id: 'judicial.system.core:titles.court.indictments.completed',
defaultMessage: 'Máli lokið - Réttarvörslugátt',
description:
'Notaður sem titill fyrir Máli lokið skjá hjá dómstólum í ákærum',
},
}),
},
defender: {
Expand Down
3 changes: 3 additions & 0 deletions apps/judicial-system/web/pages/domur/akaera/lokid/[id].ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Completed from '@island.is/judicial-system-web/src/routes/Court/Indictments/Completed/Completed'

export default Completed
Loading

0 comments on commit 7eb900c

Please sign in to comment.