Skip to content

Commit

Permalink
Renamer tjeneste til Min CV, og bytter ingresser (#84)
Browse files Browse the repository at this point in the history
* Renamer tjeneste til Min CV, og bytter ingresser

* deploy:dev
  • Loading branch information
V1adau authored Nov 13, 2024
1 parent 1230db7 commit 9093116
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .nais/dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ingress:
- "https://arbeidsplassen.intern.dev.nav.no/personbruker"
- "https://cv.ansatt.dev.nav.no/personbruker"
- "https://arbeidsplassen.intern.dev.nav.no/min-cv"
- "https://www.ansatt.dev.nav.no/min-cv"
next_public_environment: "dev"
pam_cv_api_audience: "dev-gcp:teampam:pam-cv-api-gcp"
pam_eures_cv_eksport_audience: "dev-gcp:teampam:pam-eures-cv-eksport"
Expand Down
6 changes: 3 additions & 3 deletions .nais/nais.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ spec:
image: {{ image }}
port: 8095
liveness:
path: /personbruker/api/internal/isAlive
path: /min-cv/api/internal/isAlive
initialDelay: 10
readiness:
path: /personbruker/api/internal/isReady
path: /min-cv/api/internal/isReady
initialDelay: 10
replicas:
min: 2
Expand All @@ -38,7 +38,7 @@ spec:
enabled: true
prometheus:
enabled: true
path: /personbruker/api/internal/metrics
path: /min-cv/api/internal/metrics
ingresses:
{{#each ingress as |url|}}
- {{url}}
Expand Down
2 changes: 1 addition & 1 deletion .nais/prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ingress:
- "https://arbeidsplassen.nav.no/personbruker"
- "https://www.nav.no/min-cv"
next_public_environment: "prod"
pam_cv_api_audience: "prod-gcp:teampam:pam-cv-api-gcp"
pam_eures_cv_eksport_audience: "prod-gcp:teampam:pam-eures-cv-eksport"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $ npm run setup_dependencies # Starter docker-containere for wonderwall, redis o
$ npm run dev # Kjører dev
```

Da kan du nå applikasjonen med innlogging på [http://localhost:3000/personbruker](http://localhost:3000/personbruker). Bruk testbruker `04010100653`.
Da kan du nå applikasjonen med innlogging på [http://localhost:3000/min-cv](http://localhost:3000/min-cv). Bruk testbruker `04010100653`.

> [!TIP]
> Selve applikasjonen kjører på http://localhost:3001, men siden alle requester må routes gjennom Wonderwall som kjører på port 3000 vil det fortsatt være https://localhost:3000 som gjelder
Expand Down Expand Up @@ -55,7 +55,7 @@ For å kunne hente @navikt-pakker via npm er du nødt til å gjøre følgende:

### Teste i safari

Safari har strengere regler enn andre browsere for å sette cookies for localhost, og derfor fungerer vanligvis ikke wonderwall med Safari. Dersom man vil teste i safari må man gå inn i `docker-compose.yml` og fjerne "#" fremst i linja
Safari har strengere regler enn andre browsere for å sette cookies for localhost, og derfor fungerer vanligvis ikke wonderwall med Safari. Dersom man vil teste i safari må man gå inn i `docker-compose.yml` og fjerne "#" fremst i følgende linje

```
# --cookie.secure=false # Fjern '#' på denne linjen for å kunne bruke wonderwall i safari
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
--upstream-host=docker.host:3001
--log-level=info
--bind-address=0.0.0.0:3000
--ingress=http://localhost:3000/personbruker
--ingress=http://localhost:3000/min-cv
--openid.well-known-url=http://host.docker.internal:8237/idporten/.well-known/openid-configuration
--openid.client-id=local-idporten-client-id
--openid.post-logout-redirect-uri=http://localhost:3000/
Expand Down
2 changes: 1 addition & 1 deletion mocks/mirage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { samtykkeEuresMock } from "./samtykkeEuresMock";
import { arbeidsforholdMock } from "./arbeidsforholdMock";

createServer({
namespace: "/personbruker",
namespace: "/min-cv",
logging: false,
routes() {
this.get("/api/samtykke/eures", samtykkeEuresMock);
Expand Down
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import("next").NextConfig} */
const nextConfig = {
basePath: "/personbruker",
basePath: "/min-cv",
output: "standalone",
webpack: (config, options) => {
config.resolve.alias["fs"] = "pdfkit/js/virtual-fs.js";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "DEV_URL=http://localhost:3000/personbruker next dev -p 3001",
"dev": "DEV_URL=http://localhost:3000/min-cv next dev -p 3001",
"build": "next build",
"start": "next start",
"test": "jest --passWithNoTests",
Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/components/Feilside.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const FeilsideÅrsak = Object.freeze({
tekst: "Du er ikke logget inn. Min CV er en innlogget tjeneste. Vennligst logg inn, eller gå tilbake til Nav.no.",
},
LOGGET_UT: {
tittel: "Du er blitt logget ut",
tittel: "Du har blitt logget ut",
tekst: "Du har blitt logget ut på grunn av inaktivitet. Vennligst logg inn igjen, eller gå tilbake til Nav.no.",
},
});
2 changes: 1 addition & 1 deletion src/app/_common/components/HeaderPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BodyShort, Box, Detail, Heading, Hide, HStack, Show, Skeleton, Tag, VSt
import { formatterFullDatoMedFallback } from "@/app/_common/utils/stringUtils";
import { usePerson } from "@/app/_common/hooks/swr/usePerson";

function HeaderPanel({ title = "Din CV", visTag = true }) {
function HeaderPanel({ title = "Min CV", visTag = true }) {
const { personalia } = usePerson();

const navn = personalia ? `${personalia?.fornavn} ${personalia?.etternavn}`.toUpperCase() : null;
Expand Down
5 changes: 1 addition & 4 deletions src/app/_common/hooks/swr/useBekreftTidligereCv.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ export const useBekreftTidligereCv = () => {
return true;
};

const { data, error, isLoading } = useSWR(
bekreft ? `/personbruker/api/samtykke/bekreft_tidligere_cv` : null,
fetcher,
);
const { data, error, isLoading } = useSWR(bekreft ? `/min-cv/api/samtykke/bekreft_tidligere_cv` : null, fetcher);

if (data === true) setBekreft(false);

Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/useCv.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getAPI } from "@/app/_common/utils/fetchUtils";
import { useErInnlogget } from "@/app/_common/hooks/swr/useErInnlogget";
import { usePerson } from "@/app/_common/hooks/swr/usePerson";

export const CV_KEY = "/personbruker/api/cv";
export const CV_KEY = "/min-cv/api/cv";

export const useCv = () => {
const { erInnlogget } = useErInnlogget();
Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/useErInnlogget.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const useErInnlogget = () => {
throw error;
};

const { data, error, isLoading } = useSWR("/personbruker/api/isAuthenticated", fetcher, {
const { data, error, isLoading } = useSWR("/min-cv/api/isAuthenticated", fetcher, {
refreshInterval: 60 * 1000,
});

Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/useHentArbeidsforhold.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const useHentArbeidsforhold = ({ oppdateringLaster, triggerOppdatering })
return data;
};

const { data, error, isLoading } = useSWR(skalHenteData ? `/personbruker/api/arbeidsforhold` : null, fetcher);
const { data, error, isLoading } = useSWR(skalHenteData ? `/min-cv/api/arbeidsforhold` : null, fetcher);

return {
aaregSuksess: !!data && !error,
Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/useHentEuresSamtykke.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { simpleApiRequest } from "@/app/_common/utils/fetchUtils";

export const useHentEuresSamtykke = () => {
const fetcher = async (url) => (await simpleApiRequest(url, "GET")).ok;
const { data, error, isLoading } = useSWR(`/personbruker/api/samtykke/eures`, fetcher);
const { data, error, isLoading } = useSWR(`/min-cv/api/samtykke/eures`, fetcher);

return {
delerEures: data,
Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/useOppdaterPersonaliaNoCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useOppdaterPersonaliaNoCache = () => {
}
};

const url = "personbruker/api/personalia";
const url = "/min-cv/api/personalia";
const { trigger, data, error, isMutating } = useSWRMutation(url, fetcher, { revalidate: false });

const triggerOppdatering = (body) => trigger({ body });
Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/useOppdaterSettHjemmel.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const useOppdaterSettHjemmel = (skalOppdatere) => {
return true;
};

const { data, error, isLoading } = useSWR(skalOppdatere ? `/personbruker/api/samtykke` : null, fetcher);
const { data, error, isLoading } = useSWR(skalOppdatere ? `/min-cv/api/samtykke` : null, fetcher);

return {
settHjemmelSuksess: data,
Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/usePerson.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import useSWR from "swr";
import { getAPI } from "@/app/_common/utils/fetchUtils";
import { useErInnlogget } from "@/app/_common/hooks/swr/useErInnlogget";

export const PERSON_KEY = "/personbruker/api/person";
export const PERSON_KEY = "/min-cv/api/person";

export const usePerson = () => {
const { erInnlogget } = useErInnlogget();
Expand Down
2 changes: 1 addition & 1 deletion src/app/_common/hooks/swr/useTypeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const useTypeahead = (type, visningsfelt, forhåndshentet, alleredeValgte
const skalHente = type === TypeaheadEnum.SPRÅK || typeaheadverdi?.length >= 2;
const query = type !== TypeaheadEnum.SPRÅK ? encodeURIComponent(typeaheadverdi) : "";

const url = skalHente ? `/personbruker/api/typeahead/${type}/${query}` : null;
const url = skalHente ? `/min-cv/api/typeahead/${type}/${query}` : null;

const { data, error, isLoading } = useSWR(url, fetcher, { fallbackData: [] });

Expand Down
4 changes: 2 additions & 2 deletions src/app/_common/utils/dekoratør.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const dekoratørProps = {
url: "/minside",
},
{
title: "Din CV",
url: "/personbruker",
title: "Min CV",
url: "/min-cv",
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function RootLayout({ children }) {
return (
<html lang="no">
<head>
<title>Din CV - nav.no</title>
<title>Min CV - nav.no</title>
{HeadAssets}
</head>
<body className={sourceSansPro.className}>
Expand Down
4 changes: 2 additions & 2 deletions src/app/not-found.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function NotFound() {
<HStack className={styles.notFoundHeaderContainer}>
<Pictogram />
<Heading level="1" size="large">
Din CV
Min CV
</Heading>
</HStack>
</Box>
Expand All @@ -25,7 +25,7 @@ export default function NotFound() {

<HStack className={styles.notFoundHStack}>
<Link
href={`${arbeidsplassenBaseUrl}/personbruker`}
href={`${arbeidsplassenBaseUrl}/min-cv`}
className={[styles.notFoundButton, styles.notFoundButtonPrimary]}
>
Tilbake til CV
Expand Down

0 comments on commit 9093116

Please sign in to comment.