Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(inao): move applications into inao folder #15967

Merged
merged 6 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

1 change: 1 addition & 0 deletions libs/application/templates/inao/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Applications for the Icelandic National Audit Office, Ríkisendurskoðun
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nx/react", "../../../../.eslintrc.json"],
"extends": ["plugin:@nx/react", "../../../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable */
export default {
displayName: 'financial-statement-cemetery',
preset: '../../../../jest.preset.js',
preset: '../../../../../jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory:
'../../../../coverage/libs/application/templates/financial-statement-cemetery',
'../../../../../coverage/libs/application/templates/inao/financial-statement-cemetery',
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "financial-statement-cemetery",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/application/templates/financial-statement-cemetery/src",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/application/templates/inao/financial-statement-cemetery/src",
"projectType": "library",
"tags": ["scope:application-system", "lib:application-system"],
"generators": {},
Expand All @@ -12,14 +12,14 @@
"extract-strings": {
"executor": "nx:run-commands",
"options": {
"command": "yarn ts-node -P libs/localization/tsconfig.lib.json libs/localization/scripts/extract 'libs/application/templates/financial-statement-cemetery/src/lib/messages.ts'"
"command": "yarn ts-node -P libs/localization/tsconfig.lib.json libs/localization/scripts/extract 'libs/application/templates/inao/financial-statement-cemetery/src/lib/messages.ts'"
jonnigs marked this conversation as resolved.
Show resolved Hide resolved
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/application/templates/financial-statement-cemetery/jest.config.ts"
"jestConfig": "libs/application/templates/inao/financial-statement-cemetery/jest.config.ts"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { Box, GridColumn, GridRow, Text } from '@island.is/island-ui/core'

import { m } from '../../lib/messages'
import { ValueLine } from '../CemeteryOverview/ValueLine'
import {
sectionColumn,
starterColumnStyle,
} from '../CemeteryOverview/overviewStyles.css'
import { ValueLine } from './ValueLine'
import { sectionColumn, starterColumnStyle } from './overviewStyles.css'
import { useLocale } from '@island.is/localization'
import { FinancialStatementCemetery } from '../../lib/dataSchema'
import { formatCurrency } from '../../utils/helpers'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ interface PropTypes extends FieldBaseProps {
export const Success = ({ application }: PropTypes) => {
const { answers, externalData } = application
const applicationAnswers = application.answers as FinancialStatementCemetery
const userType = getCurrentUserType(answers, externalData)
const { formatMessage } = useLocale()

const getDescriptionText = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FinancialStatementCemeteryTemplate from './lib/financialStatementCemeteryTemplate'

export const getDataProviders = () => import('./dataProviders/')
export const getFields = () => import('./fields/')
export const getDataProviders = () => import('./dataProviders')
export const getFields = () => import('./fields')

export default FinancialStatementCemeteryTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"types": ["node"]
},
"files": [
"../../../../node_modules/@nx/react/typings/cssmodule.d.ts",
"../../../../node_modules/@nx/react/typings/image.d.ts"
"../../../../../node_modules/@nx/react/typings/cssmodule.d.ts",
"../../../../../node_modules/@nx/react/typings/image.d.ts"
],
"exclude": [
"jest.config.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nx/react", "../../../../.eslintrc.json"],
"extends": ["plugin:@nx/react", "../../../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
preset: './jest.preset.js',
rootDir: '../../../..',
roots: [__dirname],
/* eslint-disable */
export default {
displayName: 'application-templates-financial-statment-individual-election',
preset: '../../../../../jest.preset.js',
transform: {
'^.+\\.[tj]sx?$': [
'babel-jest',
Expand All @@ -10,6 +10,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory:
'<rootDir>/coverage/libs/application/templates/financial-statement-individual-election',
displayName: 'application-templates-financial-statment-individual-election',
'../../../../coverage/libs/application/templates/inao/financial-statement-individual-election',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "fiancial-statement-individual-election",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/application/templates/inao/fiancial-statement-individual-election/src",
"projectType": "library",
"tags": ["lib:js", "scope:application-system"],
"targets": {
"lint": {
"executor": "@nx/eslint:lint"
},
"extract-strings": {
"executor": "nx:run-commands",
"options": {
"command": "yarn ts-node -P libs/localization/tsconfig.lib.json libs/localization/scripts/extract libs/application/templates/inao/financial-statement-individual-election/src/lib/messages.ts"
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/application/templates/inao/financial-statement-individual-election/jest.config.ts"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ import { ElectionSelect } from './ElectionSelect'
import { IncomeLimitFields } from './IncomeLimitFields'
import { m } from '../../lib/utils/messages'

export const ElectionsInfoFields = ({
application,
}: {
application: Application
}) => {
export const ElectionsInfoFields = () => {
const [state, dispatch] = useReducer(electionReducer, electionInitialState)
const { getValues, setValue } = useFormContext()
const values = getValues()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
buildTextField,
} from '@island.is/application/core'
import { m } from '../../../lib/utils/messages'
import { ABOUTIDS } from '../../../lib/utils/constants'
import { Application, UserProfile } from '@island.is/application/types'
import { Identity } from '@island.is/api/schema'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FinancialStatementIndividualElectionTemplate from './lib/financial-statement-individual-election'

export const getDataProviders = () => import('./dataProviders/')
export const getDataProviders = () => import('./dataProviders')
export const getFields = () => import('./fields')

export default FinancialStatementIndividualElectionTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"path": "./tsconfig.spec.json"
}
],
"extends": "../../../../tsconfig.base.json"
"extends": "../../../../../tsconfig.base.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"types": ["node"]
},
"files": [
"../../../../node_modules/@nx/react/typings/cssmodule.d.ts",
"../../../../node_modules/@nx/react/typings/image.d.ts"
"../../../../../node_modules/@nx/react/typings/cssmodule.d.ts",
"../../../../../node_modules/@nx/react/typings/image.d.ts"
],
"exclude": ["/**/*.spec.ts", "/**/*.spec.tsx"],
"include": ["/**/*.js", "/**/*.jsx", "/**/*.ts", "/**/*.tsx"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
"outDir": "../../../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,13 @@
"libs/application/templates/financial-aid/src/index.ts"
],
"@island.is/application/templates/financial-statement-cemetery": [
"libs/application/templates/financial-statement-cemetery/src/index.ts"
"libs/application/templates/inao/financial-statement-cemetery/src/index.ts"
],
"@island.is/application/templates/financial-statement-individual-election": [
"libs/application/templates/financial-statement-individual-election/src/index.ts"
"libs/application/templates/inao/financial-statement-individual-election/src/index.ts"
],
"@island.is/application/templates/financial-statement-individual-election/types": [
"libs/application/templates/financial-statement-individual-election/src/types/types.ts"
"libs/application/templates/inao/financial-statement-individual-election/src/types/types.ts"
],
"@island.is/application/templates/financial-statements-inao": [
"libs/application/templates/financial-statements-inao/src/index.ts"
Expand Down