-
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.
chore(service-portal): No scope notifications (#15053)
* no scope notifications * remove unused * Add alt texg * Minor refactor --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
af29933
commit 760c6bb
Showing
7 changed files
with
118 additions
and
36 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
apps/service-portal/src/components/DocumentsEmpty/DocumentsEmpty.css.ts
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,13 @@ | ||
import { theme } from '@island.is/island-ui/theme' | ||
import { style } from '@vanilla-extract/css' | ||
|
||
export const lock = style({ | ||
position: 'absolute', | ||
zIndex: 1, | ||
top: theme.spacing[2], | ||
right: theme.spacing[3], | ||
}) | ||
|
||
export const img = style({ | ||
height: 180, | ||
}) |
59 changes: 59 additions & 0 deletions
59
apps/service-portal/src/components/DocumentsEmpty/DocumentsEmpty.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Box, Icon, Text } from '@island.is/island-ui/core' | ||
import { useLocale } from '@island.is/localization' | ||
import { m } from '@island.is/service-portal/core' | ||
import * as styles from './DocumentsEmpty.css' | ||
|
||
interface Props { | ||
hasDelegationAccess: boolean | ||
} | ||
|
||
export const DocumentsEmpty = ({ hasDelegationAccess }: Props) => { | ||
const { formatMessage } = useLocale() | ||
|
||
return ( | ||
<Box | ||
display="flex" | ||
flexDirection="column" | ||
paddingTop={2} | ||
justifyContent="center" | ||
alignItems="center" | ||
rowGap={2} | ||
paddingX={2} | ||
> | ||
<Text variant="h4"> | ||
{hasDelegationAccess | ||
? formatMessage(m.emptyDocumentsList) | ||
: formatMessage(m.accessNeeded)} | ||
</Text> | ||
{!hasDelegationAccess && ( | ||
<Text textAlign="center" whiteSpace="preLine"> | ||
{formatMessage(m.accessDeniedText)} | ||
</Text> | ||
)} | ||
<Box paddingTop={2}> | ||
{ | ||
<img | ||
src={ | ||
hasDelegationAccess | ||
? './assets/images/nodata.svg' | ||
: './assets/images/jobsGrid.svg' | ||
} | ||
alt="No access" | ||
className={styles.img} | ||
/> | ||
} | ||
</Box> | ||
{!hasDelegationAccess && ( | ||
<Icon | ||
color="blue600" | ||
type="outline" | ||
icon="lockClosed" | ||
size="small" | ||
className={styles.lock} | ||
/> | ||
)} | ||
</Box> | ||
) | ||
} | ||
|
||
export default DocumentsEmpty |
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