Skip to content

Commit 6c48dae

Browse files
committed
Filter out organisations without active bases for CreateTransferAgreement form
1 parent 6c33461 commit 6c48dae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

front/src/views/Transfers/CreateTransferAgreement/CreateTransferAgreementView.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ function CreateTransferAgreementView() {
143143
bases: globalPreferences?.availableBases,
144144
} as IBasesForOrganisationData;
145145

146+
// Filter out organisations without active bases
146147
const partnerOrganisationsWithTheirBasesData = allOrgsAndTheirBases?.filter(
147-
(organisation) => organisation.id !== globalPreferences.organisation?.id,
148+
(organisation) => (organisation.id !== globalPreferences.organisation?.id) && ((organisation.bases?.length || 0) > 0),
148149
);
149150

150151
// Handle Submission

0 commit comments

Comments
 (0)