-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4557 from navikt/bedriftsmeny
bedriftsmeny
- Loading branch information
Showing
22 changed files
with
270 additions
and
154 deletions.
There are no files selected for viewing
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,5 @@ | ||
import { ArrangorflateService } from "@mr/api-client"; | ||
|
||
export async function hentArrangortilgangerForBruker() { | ||
return ArrangorflateService.getArrangorerInnloggetBrukerHarTilgangTil(); | ||
} |
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
33 changes: 33 additions & 0 deletions
33
frontend/arrangor-flate/app/components/arrangorvelger/Arrangorvelger.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,33 @@ | ||
import { Select } from "@navikt/ds-react"; | ||
import { useNavigate } from "@remix-run/react"; | ||
import { useOrgnrFromUrl } from "../../utils"; | ||
import { Arrangor } from "@mr/api-client"; | ||
|
||
interface Props { | ||
arrangorer: Arrangor[]; | ||
} | ||
|
||
export function Arrangorvelger({ arrangorer }: Props) { | ||
const navigate = useNavigate(); | ||
const currentOrgnr = useOrgnrFromUrl(); | ||
|
||
const alfabetisk = (a: Arrangor, b: Arrangor) => a.navn.localeCompare(b.navn); | ||
|
||
return ( | ||
<Select | ||
defaultValue={currentOrgnr} | ||
label="Velg arrangør du vil representere" | ||
hideLabel | ||
name="orgnr" | ||
onChange={(e) => { | ||
navigate(`${e.target.value}/refusjonskrav`); | ||
}} | ||
> | ||
{arrangorer.sort(alfabetisk).map((arrangor) => ( | ||
<option key={arrangor.organisasjonsnummer} value={arrangor.organisasjonsnummer}> | ||
{arrangor.navn} - {arrangor.organisasjonsnummer} | ||
</option> | ||
))} | ||
</Select> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const internalNavigation = (orgnr: string) => { | ||
return { | ||
root: "/", | ||
refusjonskravliste: `/${orgnr}/refusjonskrav`, | ||
forDuBegynner: (id: string) => `/${orgnr}/refusjonskrav/${id}/for-du-begynner`, | ||
beregning: (id: string) => `/${orgnr}/refusjonskrav/${id}/beregning`, | ||
bekreft: (id: string) => `/${orgnr}/refusjonskrav/${id}/bekreft`, | ||
kvittering: (id: string) => `/${orgnr}/refusjonskrav/${id}/kvittering`, | ||
tilsagn: (id: string) => `/${orgnr}/tilsagn/${id}`, | ||
}; | ||
}; |
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
File renamed without changes.
Oops, something went wrong.