-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into j-s/spokesperson-access
- Loading branch information
Showing
335 changed files
with
9,567 additions
and
4,191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react' | ||
|
||
const RSSIcon = ( | ||
props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>, | ||
) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="16" | ||
height="16" | ||
enableBackground="new 0 0 512 512" | ||
version="1.1" | ||
viewBox="0 0 512 512" | ||
xmlSpace="preserve" | ||
{...props} | ||
> | ||
<g> | ||
<rect | ||
width="512" | ||
height="512" | ||
x="-512" | ||
y="-512" | ||
fill="#ea7819" | ||
fillOpacity="1" | ||
stroke="none" | ||
rx="70" | ||
ry="70" | ||
transform="scale(-1)" | ||
></rect> | ||
<path | ||
fill="#fff" | ||
d="M81.056 267.05c43.705 0 84.79 17.072 115.665 48.124 30.931 31.051 47.961 72.411 47.961 116.44h67.35c0-127.885-103.62-231.921-230.976-231.921v67.357zm.106-119.4c155.76 0 282.488 127.42 282.488 284.049H431C431 237.925 274.054 80.301 81.162 80.301v67.35zm93.135 236.998c0 25.757-20.892 46.649-46.649 46.649-25.756 0-46.648-20.885-46.648-46.649C81 358.878 101.885 338 127.641 338c25.757 0 46.656 20.878 46.656 46.648z" | ||
></path> | ||
</g> | ||
</svg> | ||
) | ||
} | ||
|
||
export default RSSIcon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default as HeroImage } from './HeroImage' | ||
export { default as RSSIcon } from './RSSFeedIcon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { NextApiRequest } from 'next' | ||
import initApollo from '../../graphql/client' | ||
import { SUB_GET_CASES } from '../../graphql/queries.graphql' | ||
import { SubGetCasesQuery } from '../../graphql/queries.graphql.generated' | ||
import { SUB_PAGE_SIZE, SUB_STATUSES_TO_FETCH } from '../../utils/consts/consts' | ||
|
||
type CaseItem = { | ||
id?: number | null | ||
caseNumber?: string | null | ||
name?: string | null | ||
institutionName?: string | null | ||
policyAreaName?: string | null | ||
} | ||
|
||
export default async function handler(req: NextApiRequest, res) { | ||
const client = initApollo() | ||
try { | ||
const { | ||
data: { consultationPortalGetCases }, | ||
} = await client.query<SubGetCasesQuery>({ | ||
query: SUB_GET_CASES, | ||
variables: { | ||
input: { | ||
caseStatuses: SUB_STATUSES_TO_FETCH, | ||
pageSize: SUB_PAGE_SIZE, | ||
}, | ||
}, | ||
}) | ||
|
||
const host: string = req.headers.host | ||
const protocol = `http${host.startsWith('localhost') ? '' : 's'}://` | ||
const baseUrl = `${protocol}${host}` | ||
|
||
const getCases = (post: CaseItem) => { | ||
return `<item> | ||
<title>${post.name}</title> | ||
<description>${post.name}</description> | ||
<link>${baseUrl}/samradsgatt/mal/${post.id}</link> | ||
</item>` | ||
} | ||
|
||
const feed = `<?xml version="1.0" encoding="UTF-8" ?> | ||
<rss version="2.0"> | ||
<channel> | ||
<title>Samráðsgátt - Áskriftir RSS Veita</title> | ||
<description>Island.is</description> | ||
${consultationPortalGetCases.cases.map((i) => getCases(i)).join('')} | ||
</channel> | ||
</rss>` | ||
|
||
res.set('Content-Type', 'text/xml;charset=UTF-8') | ||
return res.status(200).send(feed) | ||
} catch (error) { | ||
if (error.networkError) { | ||
res.status(500).send('Network error') | ||
return | ||
} else { | ||
res.status(500).send('Internal Server Error') | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/financial-aid/web-veita/src/components/Profile/ApplicationProfile.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
apps/judicial-system/backend/migrations/20241011090000-update-defendant.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
module.exports = { | ||
up: (queryInterface, Sequelize) => { | ||
return queryInterface.sequelize.transaction(async (t) => { | ||
await queryInterface.addColumn( | ||
'defendant', | ||
'requested_defender_choice', | ||
{ | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
}, | ||
{ transaction: t }, | ||
) | ||
await queryInterface.addColumn( | ||
'defendant', | ||
'requested_defender_national_id', | ||
{ | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
}, | ||
{ transaction: t }, | ||
) | ||
await queryInterface.addColumn( | ||
'defendant', | ||
'requested_defender_name', | ||
{ | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
}, | ||
{ transaction: t }, | ||
) | ||
|
||
await queryInterface.sequelize.query( | ||
`UPDATE "defendant" SET requested_defender_choice = defender_choice`, | ||
{ transaction: t }, | ||
) | ||
|
||
await queryInterface.sequelize.query( | ||
`UPDATE "defendant" SET requested_defender_national_id = defender_national_id`, | ||
{ transaction: t }, | ||
) | ||
|
||
await queryInterface.sequelize.query( | ||
`UPDATE "defendant" SET requested_defender_name = defender_name`, | ||
{ transaction: t }, | ||
) | ||
}) | ||
}, | ||
down: (queryInterface) => { | ||
return queryInterface.sequelize.transaction(async (t) => { | ||
await queryInterface.removeColumn( | ||
'defendant', | ||
'requested_defender_choice', | ||
{ | ||
transaction: t, | ||
}, | ||
) | ||
await queryInterface.removeColumn( | ||
'defendant', | ||
'requested_defender_national_id', | ||
{ | ||
transaction: t, | ||
}, | ||
) | ||
await queryInterface.removeColumn( | ||
'defendant', | ||
'requested_defender_name', | ||
{ | ||
transaction: t, | ||
}, | ||
) | ||
}) | ||
}, | ||
} |
Oops, something went wrong.