Skip to content

Commit 6cdff79

Browse files
committed
Fix switch
1 parent 397aa37 commit 6cdff79

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

frontend/src/views/ProgrammingView/ProgrammingPrescriptionList/ProgrammingPrescriptionListHeader.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -182,26 +182,24 @@ const ProgrammingPrescriptionListHeader = ({
182182
showCheckedHint={false}
183183
/>
184184
)}
185-
{hasDepartmentalView ||
185+
{(hasDepartmentalView ||
186186
(hasRegionalView &&
187-
programmingPlan.distributionKind === 'REGIONAL' && (
188-
<ToggleSwitch
189-
label={
190-
<span className="no-wrap">Laboratoire à attribuer</span>
191-
}
192-
inputTitle="Filtrer les prélèvements avec laboratoire à attribuer"
193-
checked={prescriptionFilters.missingLaboratory ?? false}
194-
onChange={(checked) => {
195-
dispatch(
196-
prescriptionsSlice.actions.changePrescriptionFilters({
197-
...prescriptionFilters,
198-
missingLaboratory: checked
199-
})
200-
);
201-
}}
202-
showCheckedHint={false}
203-
/>
204-
))}
187+
programmingPlan.distributionKind === 'REGIONAL')) && (
188+
<ToggleSwitch
189+
label={<span className="no-wrap">Laboratoire à attribuer</span>}
190+
inputTitle="Filtrer les prélèvements avec laboratoire à attribuer"
191+
checked={prescriptionFilters.missingLaboratory ?? false}
192+
onChange={(checked) => {
193+
dispatch(
194+
prescriptionsSlice.actions.changePrescriptionFilters({
195+
...prescriptionFilters,
196+
missingLaboratory: checked
197+
})
198+
);
199+
}}
200+
showCheckedHint={false}
201+
/>
202+
)}
205203
</div>
206204
{hasGroupedUpdatePermission && !isGroupedUpdate && (
207205
<Button

0 commit comments

Comments
 (0)