✨ Saker som meldes inn kan merkes som haster fra innmelding (#24)
Co-authored-by: Sid <93219711+SindreKjelsrud@users.noreply.github.com>
This commit is contained in:
parent
dee5b627a3
commit
efad2c5cda
1 changed files with 11 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
import "@navikt/ds-css";
|
import "@navikt/ds-css";
|
||||||
|
|
||||||
import { ArrowLeftIcon, BugIcon } from "@navikt/aksel-icons";
|
import { ArrowLeftIcon, BugIcon } from "@navikt/aksel-icons";
|
||||||
import { Alert, Button, Heading, TextField, Textarea } from "@navikt/ds-react";
|
import { Alert, Button, Heading, Switch, TextField, Textarea } from "@navikt/ds-react";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import BildeOpplastning from "../components/BildeOpplastning";
|
import BildeOpplastning from "../components/BildeOpplastning";
|
||||||
|
@ -13,7 +13,7 @@ export default function Feil() {
|
||||||
const [tittel, setTittel] = useState("");
|
const [tittel, setTittel] = useState("");
|
||||||
const [beskrivelse, setBeskrivelse] = useState("");
|
const [beskrivelse, setBeskrivelse] = useState("");
|
||||||
const [status, setStatus] = useState(0)
|
const [status, setStatus] = useState(0)
|
||||||
//const [haster, setHaster] = useState(false)
|
const [haster, setHaster] = useState(false)
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ export default function Feil() {
|
||||||
beskrivelse: beskrivelse,
|
beskrivelse: beskrivelse,
|
||||||
dato: new Date().toISOString().replace('Z', ''), // Litt wack fix, burde endres
|
dato: new Date().toISOString().replace('Z', ''), // Litt wack fix, burde endres
|
||||||
arbeidsstatus: 0,
|
arbeidsstatus: 0,
|
||||||
haster: false,
|
haster: haster,
|
||||||
kommentar: ""
|
kommentar: null
|
||||||
}
|
}
|
||||||
|
|
||||||
axios.post("/api/nyfeil", payload, {
|
axios.post("/api/nyfeil", payload, {
|
||||||
|
@ -88,8 +88,15 @@ export default function Feil() {
|
||||||
/>
|
/>
|
||||||
<Skillelinje/>
|
<Skillelinje/>
|
||||||
<BildeOpplastning/>
|
<BildeOpplastning/>
|
||||||
|
<Switch
|
||||||
|
onClick={() => setHaster(!haster)}
|
||||||
|
>
|
||||||
|
Saken Haster
|
||||||
|
</Switch>
|
||||||
<Skillelinje/>
|
<Skillelinje/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="w-1/2 flex flex-col gap-2 justify-center">
|
<div className="w-1/2 flex flex-col gap-2 justify-center">
|
||||||
{status != 0 ? handleAlerts() : <></>}
|
{status != 0 ? handleAlerts() : <></>}
|
||||||
<Button
|
<Button
|
||||||
|
|
Reference in a new issue