From d0b9566af853d494377254e40b1b4db37cc36395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingrid=20Foss=C3=A5?= Date: Thu, 22 Feb 2024 15:16:26 +0100 Subject: [PATCH] =?UTF-8?q?Gjer=20at=20m=C3=A5nadsnamn=20i=20m=C3=B8teplan?= =?UTF-8?q?en=20kjem=20p=C3=A5=20norsk=20sj=C3=B8lv=20om=20brukaren=20har?= =?UTF-8?q?=20engelsk=20operativsystem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dette gjer at språket vert litt meir konsekvent, før hadde vi overskrifter som "Mandag 23. march". Co-authored-by: Mathias Sundt Müller --- src/minoversikt/moteplan/moteplan.css | 3 +++ src/minoversikt/moteplan/motetabell.tsx | 3 +-- src/utils/dato-utils.ts | 22 ---------------------- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/minoversikt/moteplan/moteplan.css b/src/minoversikt/moteplan/moteplan.css index bcc838953..a64d6325a 100644 --- a/src/minoversikt/moteplan/moteplan.css +++ b/src/minoversikt/moteplan/moteplan.css @@ -29,6 +29,9 @@ .veilarbportefoljeflatefs .moteplan_tittel { margin-left: 0.75rem; } +.veilarbportefoljeflatefs .moteplan_tittel:first-letter { + text-transform: capitalize; +} .veilarbportefoljeflatefs .moteplan_tabell_tittelrad th { padding-bottom: 0 !important; font-size: 1rem; diff --git a/src/minoversikt/moteplan/motetabell.tsx b/src/minoversikt/moteplan/motetabell.tsx index 3eb9e050c..655bcd1ee 100644 --- a/src/minoversikt/moteplan/motetabell.tsx +++ b/src/minoversikt/moteplan/motetabell.tsx @@ -1,4 +1,3 @@ -import {dagFraDato} from '../../utils/dato-utils'; import {Heading, Loader, Table} from '@navikt/ds-react'; import * as React from 'react'; import {MoteData} from './moteplan'; @@ -14,7 +13,7 @@ function MoteTabell({dato, moter, enhetId}: MoteTabellProps) { return (
  • - {dagFraDato(dato)} {dato.getDate()}. {dato.toLocaleString('default', {month: 'long'})} + {dato.toLocaleString(['no'], {weekday: 'long', day: 'numeric', month: 'long'})} diff --git a/src/utils/dato-utils.ts b/src/utils/dato-utils.ts index 4955fcbf0..6f3bef457 100755 --- a/src/utils/dato-utils.ts +++ b/src/utils/dato-utils.ts @@ -177,28 +177,6 @@ export function oppfolgingStartetDato(dato: string): Maybe { return oppfolgingStartetDato < tidligsteDato ? tidligsteDato : oppfolgingStartetDato; } -export function dagFraDato(dato: Date): string { - const i = dato.getDay(); - switch (i) { - case 0: - return 'Søndag'; - case 1: - return 'Mandag'; - case 2: - return 'Tirsdag'; - case 3: - return 'Onsdag'; - case 4: - return 'Torsdag'; - case 5: - return 'Fredag'; - case 6: - return 'Lørdag'; - default: - return '...'; - } -} - export function hentSkjermetInfo( egenAnsatt: boolean | undefined, skjermetTil: string | undefined