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

Konvertert til .tsx og lagt til intro #620

Merged
merged 2 commits into from
Oct 22, 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
2 changes: 0 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@
"browserslist": "^4.21.4",
"d3": "^7.8.2",
"dayjs": "^1.11.7",
"dompurify": "^3.1.7",
"exceljs": "^4.3.0",
"framer-motion": "^10.12.4",
"http-proxy-middleware": "^2.0.6",
"marked": "^14.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-image": "^4.1.0",
Expand Down
17 changes: 0 additions & 17 deletions apps/web/public/markdown/Administration.md

This file was deleted.

7 changes: 0 additions & 7 deletions apps/web/public/markdown/Communication.md

This file was deleted.

23 changes: 0 additions & 23 deletions apps/web/public/markdown/MyEmployment.md

This file was deleted.

15 changes: 0 additions & 15 deletions apps/web/public/markdown/Other.md

This file was deleted.

26 changes: 0 additions & 26 deletions apps/web/src/pages/start/MarkdownContent.tsx

This file was deleted.

47 changes: 12 additions & 35 deletions apps/web/src/pages/start/StartPage.tsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,17 @@
import { useEffect, useState } from 'react'
import { useEffect } from 'react'
import { Grid } from '@mui/material'
import { useMatomo } from '@jonkoops/matomo-tracker-react'
import { pageTitle } from '../../utils/pagetitle'
import MarkdownContent from './MarkdownContent'
import IntroCard from './cards/IntroCard'
import LinksCard from './cards/LinksCard'
import { employmentLinks } from './cards/MyEmployment'
import { communicationLinks } from './cards/Communication'
import { administrationLinks } from './cards/Administration'
import { otherLinks } from './cards/Other'

export default function StartPage() {
const { trackPageView } = useMatomo()

const [administrationMD, setAdministrationMD] = useState('')
const [communicationMD, setCommunicationMD] = useState('')
const [employmentMD, setEmploymentMD] = useState('')
const [otherMD, setOtherMD] = useState('')

useEffect(() => {
fetch('/markdown/Administration.md')
.then((response) => response.text())
.then((text) => setAdministrationMD(text))
}, [])

useEffect(() => {
fetch('/markdown/Communication.md')
.then((response) => response.text())
.then((text) => setCommunicationMD(text))
}, [])

useEffect(() => {
fetch('/markdown/MyEmployment.md')
.then((response) => response.text())
.then((text) => setEmploymentMD(text))
}, [])

useEffect(() => {
fetch('/markdown/Other.md')
.then((response) => response.text())
.then((text) => setOtherMD(text))
}, [])

useEffect(() => {
trackPageView({
documentTitle: 'Start',
Expand All @@ -45,10 +21,11 @@ export default function StartPage() {

return (
<Grid container spacing={2} alignItems={'stretch'}>
<MarkdownContent title="Administrasjon" markdown={administrationMD} />
<MarkdownContent title="Kommunikasjon" markdown={communicationMD} />
<MarkdownContent title="Min ansettelse" markdown={employmentMD} />
<MarkdownContent title="Annet" markdown={otherMD} />
<IntroCard />
<LinksCard title="Administrasjon" links={administrationLinks} />
<LinksCard title="Kommunikasjon" links={communicationLinks} />
<LinksCard title="Min ansettelse" links={employmentLinks} />
<LinksCard title="Annet" links={otherLinks} />
</Grid>
)
}
14 changes: 14 additions & 0 deletions apps/web/src/pages/start/cards/Administration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const administrationLinks = [
{ title: 'Timeføring', href: 'https://timer.knowit.no/' },
{ title: 'Utlegg', href: 'https://knowit.unit4cloud.no/' },
{ title: 'Kalender', href: 'http://kalender.knowit.no/' },
{ title: '1password', href: 'https://knowit.1password.eu' },
{ title: 'Kantine', href: 'https://tullin.munu.shop/' },

{ title: 'Helpit', href: 'https://helpit.knowit.se/' },
{
title: 'Print',
href: 'https://knowit.sharepoint.com/sites/groupcommon/itsupport/SitePages/Knowit--Printix.aspx?web=1&CT=1728381612322&OR=OWA-NT-Mail&CID=cb86ef7f-3f5c-8826-7c08-88a0c6d6b79f',
},
{ title: 'Brandbook for Knowit', href: 'https://knowit.se/brandbook/' },
]
5 changes: 5 additions & 0 deletions apps/web/src/pages/start/cards/Communication.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const communicationLinks = [
{ title: 'Epost', href: 'http://epost.knowit.no/' },
{ title: 'Knowit Slack', href: 'https://knowit.slack.com' },
{ title: 'Objectnet Slack', href: 'https://knowitobjectnet.slack.com/' },
]
17 changes: 17 additions & 0 deletions apps/web/src/pages/start/cards/IntroCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { GridItemHeader } from '../../../components/gridItem/GridItemHeader'
import { GridItemContent } from '../../../components/gridItem/GridItemContent'
import { GridItem } from '../../../components/gridItem/GridItem'

const IntroCard = () => {
return (
<GridItem fullSize={true}>
<GridItemHeader title={'Velkommen'} />
<GridItemContent>
Her finner du raskt og enkelt oversikt over de mest brukte lenkene vi
bruker i det daglige. Savner du noe, så ikke nøl med å si ifra.
</GridItemContent>
</GridItem>
)
}

export default IntroCard
29 changes: 29 additions & 0 deletions apps/web/src/pages/start/cards/LinksCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { GridItem } from '../../../components/gridItem/GridItem'
import { GridItemHeader } from '../../../components/gridItem/GridItemHeader'
import { GridItemContent } from '../../../components/gridItem/GridItemContent'
import { styled } from '@mui/material/styles'

const LinkStyled = styled('a')(({ theme }) => ({
color: theme.palette.text.primary,
}))

const LinksCard = ({ title, links }) => {
return (
<GridItem>
<GridItemHeader title={title} />
<GridItemContent>
{links.map(function (link, index) {
return (
<div>
<LinkStyled key={index} href={link.href} target="_blank">
{link.title}
</LinkStyled>
</div>
)
})}
</GridItemContent>
</GridItem>
)
}

export default LinksCard
28 changes: 28 additions & 0 deletions apps/web/src/pages/start/cards/MyEmployment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export const employmentLinks = [
{
title: 'Profilbilder',
href: 'https://knowit.sharepoint.com/teams/profilbilder/Pictures/Forms/Ansatt.aspx?id=%2Fteams%2Fprofilbilder%2FPictures%2FAnsatt%2FKnowit%20Objectnet&viewid=32518de6%2Dc021%2D43e9%2D9418%2D9807285ba4f0',
},
{ title: 'CVPartner', href: 'https://cv.knowit.no/' },
{
title: 'Hvordan skrive CV',
href: 'https://knowit.sharepoint.com/sites/Org-320-internal/SitePages/How-to-articles.aspx',
},
{ title: 'Seatit', href: 'https://seatit.knowit.no/' },
{ title: 'Kompetansekartlegging', href: 'https://kompetanse.knowit.no/' },
{
title: 'Personalhåndbok',
href: 'https://handbooks.simployer.com/nb-no/handbook/104949',
},
{ title: 'Simployer', href: 'https://my.simployer.com/' },
{ title: 'Forsikring', href: 'https://www.gjensidige.no/' },
{ title: 'Eyr', href: 'https://eyr.md/no/' },
{
title: 'Firmahytter',
href: 'https://booking.minfirmahytte.no/vacation-rentals',
},
{
title: 'Telefon-abonnement for familie',
href: 'https://knowit.sharepoint.com/sites/Org-320-internal/SitePages/Telenor-mobilabonnement-for-familie.aspx',
},
]
25 changes: 25 additions & 0 deletions apps/web/src/pages/start/cards/Other.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export const otherLinks = [
{
title: 'Bedriftskonti',
href: 'https://knowit.sharepoint.com/sites/Org-320-internal/SitePages/Bedriftskontoer-(bedriftskonti)-og-mat.aspx',
},
{
title: 'Objectnet på Sharepoint',
href: 'https://knowit.sharepoint.com/sites/Org-320-internal',
},
{
title: 'Fagrommet på Sharepoint',
href: 'https://knowit.sharepoint.com/sites/Local-320-fagrommet',
},
{
title: 'Bedriftidrettslag',
href: 'https://knowit.sharepoint.com/:u:/r/sites/Local-320-aktiviteter/SitePages/Bedriftsidrettslag.aspx?csf=1&=&web=1&e=18ZzpQ',
},
{ title: 'Hva Skjer?', href: 'https://hvaskjer.knowit.no/' },

{ title: 'Objectnet github', href: 'https://github.com/Knowit-Objectnet' },
{
title: 'Knowit github',
href: 'https://github.com/knowit',
},
]
18 changes: 0 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11407,13 +11407,6 @@ __metadata:
languageName: node
linkType: hard

"dompurify@npm:^3.1.7":
version: 3.1.7
resolution: "dompurify@npm:3.1.7"
checksum: 0a9b811bbc94f3dba60cf6486962362b0f1a5b4ab789f5e1cbd4749b6ba1a1fad190a677a962dc8850ce28764424765fe425e9d6508e4e93ba648ef15d54bc24
languageName: node
linkType: hard

"domutils@npm:^1.7.0":
version: 1.7.0
resolution: "domutils@npm:1.7.0"
Expand Down Expand Up @@ -16010,15 +16003,6 @@ __metadata:
languageName: node
linkType: hard

"marked@npm:^14.1.2":
version: 14.1.2
resolution: "marked@npm:14.1.2"
bin:
marked: bin/marked.js
checksum: 47636a6c4edd2ccfa682826ff139292900a9e179812a4ed8a8007fcb34cab662659e5c27565f5250c82409ee0f8cd3c0c1c23b448bb453c5f3d71d510a75b437
languageName: node
linkType: hard

"mdn-data@npm:2.0.14":
version: 2.0.14
resolution: "mdn-data@npm:2.0.14"
Expand Down Expand Up @@ -21593,14 +21577,12 @@ __metadata:
cross-env: ^7.0.3
d3: ^7.8.2
dayjs: ^1.11.7
dompurify: ^3.1.7
dotenv: ^16.0.3
eslint-plugin-react: ^7.31.11
eslint-plugin-react-hooks: ^4.6.0
exceljs: ^4.3.0
framer-motion: ^10.12.4
http-proxy-middleware: ^2.0.6
marked: ^14.1.2
react: ^18.2.0
react-dom: ^18.2.0
react-image: ^4.1.0
Expand Down
Loading