✨ Saker som meldes inn kan merkes som haster fra innmelding
This commit is contained in:
		
							parent
							
								
									01a84cdce9
								
							
						
					
					
						commit
						34e8cd145b
					
				
					 1 changed files with 11 additions and 3 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";
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,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 = () => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,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: null
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        axios.post("/api/nyfeil", payload, {
 | 
					        axios.post("/api/nyfeil", payload, {
 | 
				
			||||||
| 
						 | 
					@ -85,7 +86,14 @@ export default function Feil() {
 | 
				
			||||||
                            onChange={e => setBeskrivelse(e.target.value)}
 | 
					                            onChange={e => setBeskrivelse(e.target.value)}
 | 
				
			||||||
                        />
 | 
					                        />
 | 
				
			||||||
                        <BildeOpplastning/>
 | 
					                        <BildeOpplastning/>
 | 
				
			||||||
 | 
					                        <Switch 
 | 
				
			||||||
 | 
					                            onClick={() => setHaster(!haster)}
 | 
				
			||||||
 | 
					                        >
 | 
				
			||||||
 | 
					                            Saken Haster
 | 
				
			||||||
 | 
					                        </Switch>
 | 
				
			||||||
                    </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