From d9d8b75ab6c9734eb73fa21a245610aeb0318acd Mon Sep 17 00:00:00 2001 From: Eusebio Date: Wed, 7 May 2025 14:03:31 +0200 Subject: [PATCH] Add tax return form layout --- apps/services/auth/ids-api/src/openapi.yaml | 4 +- .../src/openapi.yaml | 4 +- .../personal-representative/src/openapi.yaml | 10 +- .../endorsements/api/src/openapi.yaml | 4 +- .../user-notification/src/openapi.yaml | 4 +- apps/tax/pages/_app.tsx | 17 +-- apps/tax/pages/tax/index.tsx | 121 ++++++++++++++++++ apps/tax/screens/Home.tsx | 5 +- apps/tax/screens/Layouts/FormStepsLayout.tsx | 33 +++++ .../Slice/AccordionSlice/AccordionSlice.tsx | 2 +- 10 files changed, 175 insertions(+), 29 deletions(-) create mode 100644 apps/tax/pages/tax/index.tsx create mode 100644 apps/tax/screens/Layouts/FormStepsLayout.tsx diff --git a/apps/services/auth/ids-api/src/openapi.yaml b/apps/services/auth/ids-api/src/openapi.yaml index 9384b979..0a8601fd 100644 --- a/apps/services/auth/ids-api/src/openapi.yaml +++ b/apps/services/auth/ids-api/src/openapi.yaml @@ -2360,7 +2360,7 @@ components: expiration: format: date-time type: string - example: 2025-05-08T07:40:13.069Z + example: 2025-05-08T09:53:30.554Z consumedTime: format: date-time type: string @@ -2413,7 +2413,7 @@ components: expiration: format: date-time type: string - example: 2025-05-08T07:40:13.132Z + example: 2025-05-08T09:53:30.612Z consumedTime: type: object data: diff --git a/apps/services/auth/personal-representative-public/src/openapi.yaml b/apps/services/auth/personal-representative-public/src/openapi.yaml index ea625109..7c3cd31b 100644 --- a/apps/services/auth/personal-representative-public/src/openapi.yaml +++ b/apps/services/auth/personal-representative-public/src/openapi.yaml @@ -343,11 +343,11 @@ components: validFrom: format: date-time type: string - example: 2025-05-06T07:40:07.938Z + example: 2025-05-06T09:53:25.263Z validTo: format: date-time type: string - example: 2025-05-08T07:40:07.938Z + example: 2025-05-08T09:53:25.263Z required: - code - description diff --git a/apps/services/auth/personal-representative/src/openapi.yaml b/apps/services/auth/personal-representative/src/openapi.yaml index 95e12525..7825b91e 100644 --- a/apps/services/auth/personal-representative/src/openapi.yaml +++ b/apps/services/auth/personal-representative/src/openapi.yaml @@ -1032,11 +1032,11 @@ components: validFrom: format: date-time type: string - example: 2025-05-06T07:40:11.453Z + example: 2025-05-06T09:53:29.098Z validTo: format: date-time type: string - example: 2025-05-08T07:40:11.453Z + example: 2025-05-08T09:53:29.098Z required: - code - description @@ -1135,7 +1135,7 @@ components: validTo: format: date-time type: string - example: 2025-05-08T07:40:11.441Z + example: 2025-05-08T09:53:29.087Z rights: example: >- [{code:"health", description:"health descr", validFrom:"xx.yy.zzzz", @@ -1222,7 +1222,7 @@ components: validTo: format: date-time type: string - example: 2025-05-08T07:40:11.444Z + example: 2025-05-08T09:53:29.090Z rightCodes: example: '["health", "finance"]' description: >- @@ -1254,7 +1254,7 @@ components: validTo: format: date-time type: string - example: 2025-05-08T07:40:11.450Z + example: 2025-05-08T09:53:29.096Z required: - code - name diff --git a/apps/services/endorsements/api/src/openapi.yaml b/apps/services/endorsements/api/src/openapi.yaml index 91a5fb49..147fdace 100644 --- a/apps/services/endorsements/api/src/openapi.yaml +++ b/apps/services/endorsements/api/src/openapi.yaml @@ -1054,11 +1054,11 @@ components: openedDate: format: date-time type: string - default: 2025-05-07T07:37:58.838Z + default: 2025-05-07T09:51:13.496Z closedDate: format: date-time type: string - default: 2025-06-07T07:37:58.838Z + default: 2025-06-07T09:51:13.496Z adminLock: type: boolean default: false diff --git a/apps/services/user-notification/src/openapi.yaml b/apps/services/user-notification/src/openapi.yaml index f1d0e6ec..b9abb16e 100644 --- a/apps/services/user-notification/src/openapi.yaml +++ b/apps/services/user-notification/src/openapi.yaml @@ -806,11 +806,11 @@ components: created: format: date-time type: string - example: '2025-05-07T07:37:52.399Z' + example: '2025-05-07T09:51:06.931Z' updated: format: date-time type: string - example: '2025-05-07T07:37:52.399Z' + example: '2025-05-07T09:51:06.931Z' read: type: boolean example: false diff --git a/apps/tax/pages/_app.tsx b/apps/tax/pages/_app.tsx index deb084a1..e0d17af3 100644 --- a/apps/tax/pages/_app.tsx +++ b/apps/tax/pages/_app.tsx @@ -1,5 +1,7 @@ -import Head from 'next/head' import React, { FC } from 'react' +import Head from 'next/head' + +import { Header } from '@island.is/tax/components' const Layout: FC> = ({ children }) => { return ( @@ -7,6 +9,7 @@ const Layout: FC> = ({ children }) => { Ísland.is +
{children} ) @@ -20,16 +23,4 @@ const SupportApplication: any = ({ Component, pageProps }) => { ) } -SupportApplication.getInitialProps = async (appContext) => { - const { Component, ctx } = appContext - const customContext = { - ...ctx, - } - const pageProps = (await Component.getInitialProps(customContext)) as any - - return { - pageProps, - } -} - export default SupportApplication \ No newline at end of file diff --git a/apps/tax/pages/tax/index.tsx b/apps/tax/pages/tax/index.tsx new file mode 100644 index 00000000..fa393bc7 --- /dev/null +++ b/apps/tax/pages/tax/index.tsx @@ -0,0 +1,121 @@ +import React from 'react' + +import { + Box, + Button, + Checkbox, + FormStepperV2, + Icon, + Section, + Text, +} from '@island.is/island-ui/core' +import FormStepsLayout from '@island.is/tax/screens/Layouts/FormStepsLayout' + +export async function getServerSideProps() { + const taxData = { + country: 'test', + vatRate: 10, + description: 'test', + } + + return { + props: { + taxInfo: taxData, + }, + } +} + +const Tax = ({ taxInfo }) => { + return ( + + , +
, +
, +
, +
, +
, +
, + ]} + /> + + } + > + + + Gagnaöflun + + + + + + Eftirfarandi gögn verða sótt rafrænt + + + + + Persónupplýsingar + + + Upplýsingar frá Þjóðskrá um nafn, kennitölu og lögheimili. + + + Netfang og símanúmer + + + Upplýsingar frá Mínum síðum á Ísland.is um netfang og símanúmer. + + + Upplýsingar frá Skattinum + + + Upplýsingar um ráðstöfun persónuafsláttar og greiðslur í lífeyrissjóð + verður sótt til Skattsins. + + + + + + + + + + + + + + ) +} + +export default Tax diff --git a/apps/tax/screens/Home.tsx b/apps/tax/screens/Home.tsx index d8129085..f2b40c5a 100644 --- a/apps/tax/screens/Home.tsx +++ b/apps/tax/screens/Home.tsx @@ -1,3 +1,5 @@ +import router from 'next/router' + import { Accordion, AccordionItem, @@ -14,14 +16,12 @@ import { Stack, Text, } from '@island.is/island-ui/core' -import { Header } from '@island.is/tax/components' import SidebarLayout from '@island.is/tax/screens/Layouts/SidebarLayout' const Home = () => { return (
-
@@ -185,6 +185,7 @@ const Home = () => { cta={{ label: 'Sækja um', variant: 'primary', + onClick: () => router.push('tax') }} heading="Umsókn um atvinnuleysisbætur" headingVariant="h3" diff --git a/apps/tax/screens/Layouts/FormStepsLayout.tsx b/apps/tax/screens/Layouts/FormStepsLayout.tsx new file mode 100644 index 00000000..5a5bb468 --- /dev/null +++ b/apps/tax/screens/Layouts/FormStepsLayout.tsx @@ -0,0 +1,33 @@ +import React, { FC, ReactNode } from 'react' + +import { + Box, + GridColumn, + GridContainer, + GridRow, +} from '@island.is/island-ui/core' + +interface FormStepsLayoutProps { + sidebarContent: ReactNode +} + +export const FormStepsLayout: FC< + React.PropsWithChildren +> = ({ sidebarContent, children }) => { + return ( + + + + + {children} + + + {sidebarContent} + + + + + ) +} + +export default FormStepsLayout diff --git a/apps/web/components/Organization/Slice/AccordionSlice/AccordionSlice.tsx b/apps/web/components/Organization/Slice/AccordionSlice/AccordionSlice.tsx index 60377814..6b36b5fb 100644 --- a/apps/web/components/Organization/Slice/AccordionSlice/AccordionSlice.tsx +++ b/apps/web/components/Organization/Slice/AccordionSlice/AccordionSlice.tsx @@ -84,7 +84,7 @@ export const AccordionSlice: React.FC> = ({ (item.content?.[0] as Html)?.document?.content?.[0] ?.content?.[0]?.value } - cta={{ + label: item.link?.text ?? 'Default', icon: 'arrowForward', onClick: () => {