Skip to content

Commit

Permalink
Velg tittel etter tilgjengelighet.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiklem committed Nov 1, 2024
1 parent de0da31 commit 6f11e18
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/felles/domene/stilling/Stilling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ export const hentTittelFraStilling = (stilling: Stilling) => {
return stilling.title;
}

return stilling.categoryList?.find(({ categoryType }) => categoryType === 'JANZZ')?.name || '';
const janzz = stilling.categoryList?.find(({ categoryType }) => categoryType === 'JANZZ')?.name;

const styrk = stilling.categoryList?.find(
({ categoryType }) => categoryType === 'STYRK08NAV'
)?.name;

return janzz ?? styrk ?? 'Stilling uten valgt jobbtittel';
};

export enum System {
Expand Down

0 comments on commit 6f11e18

Please sign in to comment.