-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement credit/discard view #22
Conversation
so that it doesn't need to be calculated in javascript
getting the `user_id` and `prison_id` from the /users/<me>/ api endpint
this is no longer required as `prison_id` and `user_id` is stored in request.user
This changes the transaction batch view to being a FormView so that we can validate and manage the it easily. Saving the form will credit the selected transactions and discard the rest. Saving the form passing discard='1' will discard all the transactions.
@SteveMarshall @matharden a review/merge pls? |
|
||
|
||
class ProcessTransactionBatchForm(forms.Form): | ||
transactions = forms.MultipleChoiceField(choices=(), required=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really neat way of representing the list of transactions 👍
So that we can test all credit/discard cases.
Looks good to me; @matharden, this is going into your branch, so can you review/merge? |
b1ac8a1
to
ba7e644
Compare
This branch needs to be rebased again |
@marcofucci I got a |
@matharden the problem somehow happens when using gulp serve and runserver at the same time, that is, when you log into To fix that, just remove all the cookies for the domain localhost and it should work fine. |
75ec91d
to
a965c0c
Compare
Will rebase and PR from master |
This changes the transaction batch view to being a FormView so that we can
validate and manage the it easily.
Saving the form will credit the selected transactions and discard the rest.
Saving the form passing discard='1' will discard all the transactions.