Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utbedre tildel oppgave - preprod #2868

Merged
merged 7 commits into from
Aug 19, 2024
Merged

Conversation

gunnsteingarmo
Copy link
Contributor

@gunnsteingarmo gunnsteingarmo commented Aug 15, 2024

Hvorfor er denne endringen nødvendig? ✨

  • Bruker toast til å vise om en oppgave har blitt tildelt
  • Bedre skjuling av komponenten TildelOppgave
image image

… Skal ikke vise komponenten for tildeling av oppgave når den har blitt tatt over.
@gunnsteingarmo gunnsteingarmo requested a review from a team as a code owner August 15, 2024 12:48
@gunnsteingarmo gunnsteingarmo changed the title Drøye sjekk tildel oppgave Utbedre tildel oppgave - preprod Aug 15, 2024
};

const sjekkOmDetHarGåttMistTiSekunderSidenBehandlingBleOpprettet = (
const sjekkOmDetHarGåttMistEttMinuttSidenBehandlingenBleOpprettet = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvorfor trenger vi denne sjekken?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Når en behandling har blitt opprettet tar det litt tid før ansvarlig saksbehandler blir satt - derfor er ikke sjekken med ansvarlig alltid nok.

settOppgaveTilSaksbehandler()
.then(() => {
hentAnsvarligSaksbehandler.rerun();
settHarTildetOppgave(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvorfor trengs denne? Burde ikke hentAnsvarligSaksbehandler.rerun() være nok?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Den er nødvendig fordi erTilordnetOgInnloggetSaksbehandlerDenSamme ikke blir oppdatert med engang - det finnes sikkert andre måter å gjøre det på, men syntes at denne var enklest.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skjønner, tenkte ikke over den...

@@ -48,6 +48,18 @@ export const Toast: React.FC = () => {
<AlertSuccess>{toastTilTekst[toast]}</AlertSuccess>
</ContainerTopMiddle>
);
case EToast.TILDEL_OPPGAVE_VELlYKKET:
return (
<ContainerTopMiddle>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

case EToast.TILDEL_OPPGAVE_FEILET:
return (
<ContainerTopMiddle>
<AlertError>{toastTilTekst[toast]}</AlertError>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bør vi heller gi ut en fornuftig feilmelding under knappen istedenfor feilmelding i toast?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enig - jeg ble litt for ivrig med toasten her 🍞

navigate(`/behandling/${behandlingId}/arsak-revurdering`);
})
.catch((error) => {
console.error(error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvis vi får inn Ressurs her så kan vi plukke ut feilmeldingen og sette en tilstand som viser den frem.

Men husk å nulle ut feilmelding når man trykker på tildel-knappen :)

…er feilmelding med alert i stedet for toast.
Copy link
Contributor

@charliemidtlyng charliemidtlyng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ser bra ut nå!

@gunnsteingarmo gunnsteingarmo merged commit 4dcdf5c into main Aug 19, 2024
1 check passed
@gunnsteingarmo gunnsteingarmo deleted the drøye-sjekk-tildel-oppgave branch August 19, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants