Skip to content

Commit

Permalink
TSFF-289: Kunne avslå ekstra omsorgsdager for barn over 18 år (#6463)
Browse files Browse the repository at this point in the history
* Legg til aldersvilkår for kronisk syk

* Legg til manglende komma

* Bruk const, ikke var
  • Loading branch information
audunel authored Aug 12, 2024
1 parent b8aada1 commit c04d082
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
4 changes: 4 additions & 0 deletions _mocks/featureToggles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export const featureTogglesFactory = () => [
key: 'AKSJONSPUNKT_9015',
value: process.env.VITE_AKSJONSPUNKT_9015,
},
{
key: "ALDERSVILKAR_KRONISK_SYK",
value: process.env.VITE_ALDERSVILKAR_KRONISK_SYK
},
{
key: 'FRITEKST_REDIGERING',
value: process.env.VITE_FRITEKST_REDIGERING,
Expand Down
2 changes: 2 additions & 0 deletions deploy/dev-fss-k9saksbehandling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ spec:
value: "true"
- name: AKSJONSPUNKT_9015
value: "true"
- name: ALDERSVILKAR_KRONISK_SYK
value: "false"
- name: FRITEKST_REDIGERING
value: "true"
- name: INKLUDER_KALENDER_PILS
Expand Down
2 changes: 2 additions & 0 deletions deploy/prod-fss-k9saksbehandling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ spec:
value: "true"
- name: AKSJONSPUNKT_9015
value: "true"
- name: ALDERSVILKAR_KRONISK_SYK
value: "false"
- name: FRITEKST_REDIGERING
value: "true"
- name: INKLUDER_KALENDER_PILS
Expand Down
1 change: 1 addition & 0 deletions envDir/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ VITE_LOS_MARKER_BEHANDLING=true
VITE_LOS_MARKER_BEHANDLING_SUBMIT=true
VITE_AKSJONSPUNKT_9014=true
VITE_AKSJONSPUNKT_9015=true
VITE_ALDERSVILKAR_KRONISK_SYK=true
VITE_FRITEKST_REDIGERING=true
VITE_FIX_SOKNADSFRIST_KALENDER_OG_READONLY=true
VITE_INKLUDER_KALENDER_PILS=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const UtvidetRettProsess = ({
const [prosessStegPaneler, valgtPanel, formaterteProsessStegPaneler] = prosessStegHooks.useProsessStegPaneler(
prosessStegUtvidetRettPanelDefinisjoner(
fagsak.sakstype.kode === fagsakYtelseType.OMSORGSPENGER_ALENE_OM_OMSORGEN,
fagsak.sakstype.kode === fagsakYtelseType.OMSORGSPENGER_KRONISK_SYKT_BARN,
featureToggles,
),
dataTilUtledingAvFpPaneler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@ import AlderProsessStegPanelDef from './prosessStegPaneler/AlderProsessStegPanel

const prosessStegUtvidetRettPanelDefinisjoner = (
erFagytelseTypeAleneOmOmsorgen: boolean,
erFagytelseTypeKroniskSyk: boolean,
featureToggles: FeatureToggles,
) => {
if (featureToggles.AKSJONSPUNKT_9015)
return erFagytelseTypeAleneOmOmsorgen
if (featureToggles.AKSJONSPUNKT_9015) {
const visAlderProsessSteg = erFagytelseTypeAleneOmOmsorgen || (erFagytelseTypeKroniskSyk && featureToggles.ALDERSVILKAR_KRONISK_SYK);

return visAlderProsessSteg
? [
new AlderProsessStegPanelDef(),
new InngangsvilkarProsessStegPanelDef(),
new UtvidetRettProsessStegPanelDef(erFagytelseTypeAleneOmOmsorgen),
new VedtakProsessStegPanelDef(),
]
new AlderProsessStegPanelDef(),
new InngangsvilkarProsessStegPanelDef(),
new UtvidetRettProsessStegPanelDef(erFagytelseTypeAleneOmOmsorgen),
new VedtakProsessStegPanelDef(),
]
: [
new InngangsvilkarProsessStegPanelDef(),
new UtvidetRettProsessStegPanelDef(erFagytelseTypeAleneOmOmsorgen),
new VedtakProsessStegPanelDef(),
];
new InngangsvilkarProsessStegPanelDef(),
new UtvidetRettProsessStegPanelDef(erFagytelseTypeAleneOmOmsorgen),
new VedtakProsessStegPanelDef(),
];
}

return [
new InngangsvilkarProsessStegPanelDef(),
Expand Down

0 comments on commit c04d082

Please sign in to comment.