Skip to content
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
4 changes: 2 additions & 2 deletions apps/services/auth/ids-api/src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ components:
expiration:
format: date-time
type: string
example: 2025-05-08T09:53:30.554Z
example: 2025-05-09T07:13:23.068Z
consumedTime:
format: date-time
type: string
Expand Down Expand Up @@ -2413,7 +2413,7 @@ components:
expiration:
format: date-time
type: string
example: 2025-05-08T09:53:30.612Z
example: 2025-05-09T07:13:23.125Z
consumedTime:
type: object
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ components:
validFrom:
format: date-time
type: string
example: 2025-05-06T09:53:25.263Z
example: 2025-05-07T07:13:17.918Z
validTo:
format: date-time
type: string
example: 2025-05-08T09:53:25.263Z
example: 2025-05-09T07:13:17.918Z
required:
- code
- description
Expand Down
10 changes: 5 additions & 5 deletions apps/services/auth/personal-representative/src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1032,11 +1032,11 @@ components:
validFrom:
format: date-time
type: string
example: 2025-05-06T09:53:29.098Z
example: 2025-05-07T07:13:21.877Z
validTo:
format: date-time
type: string
example: 2025-05-08T09:53:29.098Z
example: 2025-05-09T07:13:21.877Z
required:
- code
- description
Expand Down Expand Up @@ -1135,7 +1135,7 @@ components:
validTo:
format: date-time
type: string
example: 2025-05-08T09:53:29.087Z
example: 2025-05-09T07:13:21.867Z
rights:
example: >-
[{code:"health", description:"health descr", validFrom:"xx.yy.zzzz",
Expand Down Expand Up @@ -1222,7 +1222,7 @@ components:
validTo:
format: date-time
type: string
example: 2025-05-08T09:53:29.090Z
example: 2025-05-09T07:13:21.869Z
rightCodes:
example: '["health", "finance"]'
description: >-
Expand Down Expand Up @@ -1254,7 +1254,7 @@ components:
validTo:
format: date-time
type: string
example: 2025-05-08T09:53:29.096Z
example: 2025-05-09T07:13:21.874Z
required:
- code
- name
Expand Down
4 changes: 2 additions & 2 deletions apps/services/endorsements/api/src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1054,11 +1054,11 @@ components:
openedDate:
format: date-time
type: string
default: 2025-05-07T09:51:13.496Z
default: 2025-05-08T07:11:05.497Z
closedDate:
format: date-time
type: string
default: 2025-06-07T09:51:13.496Z
default: 2025-06-08T07:11:05.497Z
adminLock:
type: boolean
default: false
Expand Down
4 changes: 2 additions & 2 deletions apps/services/user-notification/src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,11 @@ components:
created:
format: date-time
type: string
example: '2025-05-07T09:51:06.931Z'
example: '2025-05-08T07:10:59.050Z'
updated:
format: date-time
type: string
example: '2025-05-07T09:51:06.931Z'
example: '2025-05-08T07:10:59.050Z'
read:
type: boolean
example: false
Expand Down
1 change: 1 addition & 0 deletions apps/tax/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export const PRELOADED_FONTS = [
'/fonts/ibm-plex-sans-v7-latin-500.woff2',
'/fonts/ibm-plex-sans-v7-latin-600.woff2',
]
export const REQUIRED_ERROR_MESSAGE = 'nauðsynlegur reitur'
64 changes: 42 additions & 22 deletions apps/tax/pages/login/index.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
import React from 'react'
import React, {useState} from 'react'
import router from 'next/router'
import {
useLazyQuery,
} from "@apollo/client";

import { AlertMessage, Box, Button, Checkbox, Input, Link, Logo, Text } from '@island.is/island-ui/core'
import { formWrapper } from '@island.is/tax/screens/Tax/login/Login.css'

export async function getServerSideProps() {
const taxData = {
country: 'test',
vatRate: 10,
description: 'test',
}
import {GetUserByPhoneQuery} from '../../graphql/schema'
import { withApollo } from "../../graphql/withApollo";
import {
GET_USER_BY_PHONE_QUERY,
} from "../../screens/queries";

const Login = () => {
const [phone, setPhone] = useState('');
const [isError, setIsError] = useState(false);

const [fetchUser] = useLazyQuery<GetUserByPhoneQuery>(GET_USER_BY_PHONE_QUERY);

return {
props: {
taxInfo: taxData,
},
const onLogin = async () => {
const result = await fetchUser({
variables: {
phone,
},
});
if (result.data) {
localStorage.setItem('session_token', result.data.userByPhone.id);
void router.push('tax');
} else {
setIsError(true);
}
}
}

const Login = ({ loginInfo }) => {
return (
<Box className={formWrapper}>
<Box
Expand Down Expand Up @@ -52,20 +66,26 @@ const Login = ({ loginInfo }) => {
<Text fontWeight="light" color="dark400" paddingTop={1} paddingBottom={4}>
á mínar síður Ísland.is
</Text>
<Box width='full' paddingX={7}>
<AlertMessage
type="error"
message="Notandi finnst ekki"
/>
</Box>
{
isError && (
<Box width='full' paddingX={7}>
<AlertMessage
type="error"
message="Notandi finnst ekki"
/>
</Box>
)
}
<Box paddingTop={[2]} width='full' paddingX={7}>
<Input
backgroundColor="blue"
label="Símanúmer"
name=""
size="sm"
placeholder="000-0000"
type="number"
type="tel"
value={phone}
onChange={(e) => setPhone(e.target.value)}
/>
</Box>
<Box paddingTop={[4]}>
Expand All @@ -78,7 +98,7 @@ const Login = ({ loginInfo }) => {
colorScheme="default"
fluid
variant="primary"
onClick={() => router.push('tax')}
onClick={onLogin}
>
Auðkenna
</Button>
Expand Down Expand Up @@ -133,4 +153,4 @@ const Login = ({ loginInfo }) => {
)
}

export default Login
export default withApollo(Login);
8 changes: 1 addition & 7 deletions apps/tax/pages/tax/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ import React, { useState } from 'react'

import { Box, FormStepperV2, Section } from '@island.is/island-ui/core'
import FormStepsLayout from '@island.is/tax/screens/Layouts/FormStepsLayout'
import StepFive from '@island.is/tax/screens/Tax/steps/StepFive'
import StepFour from '@island.is/tax/screens/Tax/steps/StepFour'
import StepOne from '@island.is/tax/screens/Tax/steps/StepOne'
import StepSeven from '@island.is/tax/screens/Tax/steps/StepSeven'
import StepSix from '@island.is/tax/screens/Tax/steps/StepSix'
import StepThree from '@island.is/tax/screens/Tax/steps/StepThree'
import StepTwo from '@island.is/tax/screens/Tax/steps/StepTwo'
import { StepFive, StepFour, StepOne, StepSeven, StepSix, StepThree, StepTwo } from '@island.is/tax/screens/Tax/steps'

const steps = [
{ title: 'Gagnaöflun', index: 0 },
Expand Down
9 changes: 5 additions & 4 deletions apps/tax/screens/Tax/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { Box, Button } from '@island.is/island-ui/core'

type ButtonProps = {
onForward: () => void
onBackward: () => void
onBackward: () => void,
isLastStep?: boolean,
}

const Buttons = ({ onForward, onBackward }: ButtonProps) => {
const Buttons = ({ onForward, onBackward, isLastStep }: ButtonProps) => {
return (
<Box display="flex" justifyContent="spaceBetween" marginTop={6}>
<Box display="flex" justifyContent="spaceBetween" marginTop={10}>
<Button
colorScheme="destructive"
variant="ghost"
Expand All @@ -24,7 +25,7 @@ const Buttons = ({ onForward, onBackward }: ButtonProps) => {
icon="arrowForward"
onClick={() => onForward()}
>
Halda áfram
{isLastStep ? 'Senda inn' : 'Halda áfram'}
</Button>
</Box>
)
Expand Down
Loading
Loading