opencollective-api icon indicating copy to clipboard operation
opencollective-api copied to clipboard

Allow host to turn on or off expense types for collectives

Open danielsum opened this issue 3 years ago • 3 comments

Resolve https://github.com/opencollective/opencollective/issues/5525

Description

Here are the PR related to this issue : https://github.com/opencollective/opencollective/issues/5525

As discussed, the options to override the expenseTypes setting at the collective level is on stand by but I have already handled that at the Api level. I have also added a graphql test to test wrong expense type post.

Screenshots

dad_-_New_expense_-_Open_Collective

danielsum avatar Jul 20 '22 15:07 danielsum

Resolved the two items above, added tests, and completed the feature by also looking for the flag on the parent collective. We'll need to implement this one in the frontend too.

Betree avatar Jul 26 '22 09:07 Betree

Hi @Betree , yes for the testing I didn't have the time to finish the testing in the afternoon as in the morning I had this overheat cpu issue and have to join some friends in the afternoon. But let me know if you want me to finish the PR 👍

danielsum avatar Jul 26 '22 10:07 danielsum

Introduced a new supportedExpenseTypes field to have a generic way to check this & centralize the logic in the API

Betree avatar Jul 26 '22 11:07 Betree