🍱 Oppdaterer interface frontend for å matche nye felt haster og arbeidsstatus
This commit is contained in:
parent
bb4a1c1943
commit
ed908be55e
2 changed files with 21 additions and 4 deletions
|
@ -41,7 +41,13 @@ export const FeilKort = (props: IFeilKort) => {
|
||||||
active:bg-surface-active"
|
active:bg-surface-active"
|
||||||
onClick={() => setVisModal(true)}
|
onClick={() => setVisModal(true)}
|
||||||
>
|
>
|
||||||
<FeilkortHeader tittel={props.tittel} beskrivelse={props.beskrivelse} dato={props.dato}/>
|
<FeilkortHeader
|
||||||
|
tittel={props.tittel}
|
||||||
|
beskrivelse={props.beskrivelse}
|
||||||
|
dato={props.dato}
|
||||||
|
haster={props.haster}
|
||||||
|
arbeidsstatus={props.arbeidsstatus}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<FeilModal open={visModal} setOpen={setVisModal} >
|
<FeilModal open={visModal} setOpen={setVisModal} >
|
||||||
{redigeringsmodus ?
|
{redigeringsmodus ?
|
||||||
|
@ -89,7 +95,13 @@ export const FeilKort = (props: IFeilKort) => {
|
||||||
|
|
||||||
:
|
:
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<FeilkortHeader tittel={props.tittel} beskrivelse={props.beskrivelse} dato={new Date()} />
|
<FeilkortHeader
|
||||||
|
tittel={props.tittel}
|
||||||
|
beskrivelse={props.beskrivelse}
|
||||||
|
dato={props.dato}
|
||||||
|
haster={props.haster}
|
||||||
|
arbeidsstatus={props.arbeidsstatus}
|
||||||
|
/>
|
||||||
<div className="flex gap-4 items-start">
|
<div className="flex gap-4 items-start">
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
|
@ -137,7 +149,7 @@ export const FeilkortHeader = (props: IFeilmelding) => {
|
||||||
<p className="text-text-subtle mb-4">{props.dato.toDateString()}</p>
|
<p className="text-text-subtle mb-4">{props.dato.toDateString()}</p>
|
||||||
<p>{props.beskrivelse}</p>
|
<p>{props.beskrivelse}</p>
|
||||||
</div>
|
</div>
|
||||||
<TagBar haster={false}/>
|
<TagBar haster={props.haster}/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,17 @@
|
||||||
export interface IFeilmelding {
|
export interface IFeilmelding {
|
||||||
tittel: string,
|
tittel: string,
|
||||||
beskrivelse: string
|
beskrivelse: string
|
||||||
// haster: boolean
|
|
||||||
dato: Date
|
dato: Date
|
||||||
|
haster: boolean
|
||||||
|
arbeidsstatus: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Feilmelding implements IFeilmelding {
|
export class Feilmelding implements IFeilmelding {
|
||||||
tittel: string = "default tittel"
|
tittel: string = "default tittel"
|
||||||
beskrivelse: string = "default beskrivelse"
|
beskrivelse: string = "default beskrivelse"
|
||||||
dato: Date = new Date()
|
dato: Date = new Date()
|
||||||
|
haster: boolean = false
|
||||||
|
arbeidsstatus: number = 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Typescript 2.1 syntax som lar deg sende inn et JSON object og mappe det til class.
|
* Typescript 2.1 syntax som lar deg sende inn et JSON object og mappe det til class.
|
||||||
|
@ -24,6 +27,8 @@ export class Feilmelding implements IFeilmelding {
|
||||||
tittel: string,
|
tittel: string,
|
||||||
beskrivelse: string,
|
beskrivelse: string,
|
||||||
dato: Date
|
dato: Date
|
||||||
|
haster: boolean
|
||||||
|
arbeidsstatus: number
|
||||||
}) {
|
}) {
|
||||||
if (fields) Object.assign(this, fields);
|
if (fields) Object.assign(this, fields);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue