Skip to content

Conversation

berinhard
Copy link
Contributor

My strategy with this PR is to change the default model form used by SponsorBenefitInline by a custom one. The new form has only two fields, one to pick the sponsorship benefit and another to select the internal value for the sponsor benefit. The form differs creation vs update operation and there are unit tests covering these operations.

@ewdurbin here's how the inline forms are looking like now:

Screenshot from 2020-12-22 11-51-19

This PR also adds permissions control on this inline as well. To keep it simple, I did this by implementing a property to flag if the sponsorship is or isn't open for changes. For now if an application was approved or rejected, it can't be edited anymore. I think this plus an admin action to roll back the sponsorship to an "editable" state makes the internal's state control more solid and less prune to errors.

Once this PR gets merged into master, we can update this logic in #1702 because, let's imagine we want to edit an approved sponsorship which already has a draft version for the statement of work. There are more operations needed in this scenario (delete the SoW for example) that I think we have to talk about.

@berinhard berinhard requested a review from ewdurbin December 22, 2020 15:01
@ewdurbin ewdurbin merged commit be0e8b7 into master Dec 22, 2020
@ewdurbin ewdurbin deleted the topic/admin-edit-sponsor-benefits branch December 22, 2020 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants