-
Notifications
You must be signed in to change notification settings - Fork 105
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
Feat(Setting) donor management module #4837
Conversation
There are still others step on which my working in order to totally fix #4826 |
I did a functional test with Bhima_test and found that the donor creation/editing works fine. Thanks. I have not scanned the code carefully. I assume that future Pull Requests will deal with these issues:
|
061e031
to
2f29aca
Compare
I did another functional test (I did not do a detailed code review). I was able to create, edit, and delete donors. I think that the additional donor contact details will be useful. It will be hard to tell what is really needed for details until we use this in the field with actual donors, etc. However, I did find one problem: I was able to create a Donor, but when I went to Stock > Stock Entry, and selected "DONOR", I did not see my new donor in the list. |
The only thing that remains is to create a donation from find modal. I will work on that today and ask for a review just after |
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.
👍 Good job @jeremielodi most part of the work that you made work fine
I have just notice that :
- We cannot get the donation receipt from the donation modal
- There is not yet a donation module for creating donation
- We cannot populate the grid with donation data in the stock entry module
/** | ||
* Role Service | ||
* | ||
* A service wrapper for the /donors HTTP endpoint. |
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 service is for /donors
or /donations
? If it is for /donations
you could update this line
function DonorController($uibModal, Donor, Modal, Notify, uiGridConstants) { | ||
const vm = this; | ||
|
||
vm.createUpdateDonorModal = (selectedRole = {}) => { |
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.
I think this parameter is not related to role may be selectedDonor
is a better name
|
||
Donor.read() | ||
.then(roles => { | ||
vm.gridOptions.data = roles; |
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.
donors
in place of roles
will be better
@@ -0,0 +1,36 @@ | |||
angular.module('bhima.controllers') | |||
.controller('DonorAddController', DonorAddController); |
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.
It seems like the controller is not only for creation of donors, so you could rename this controller to something like : DonorCreateAndUpdateController
, DonorManagementController
, etc.
TODO: add a donor management module | ||
*/ | ||
movement.lots = Stock.processLotsFromStore(vm.stockForm.store.data, Uuid()); | ||
movement.lots = Stock.processLotsFromStore(vm.stockForm.store.data, vm.movement.entity.uuid); |
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.
👍
<div class="row"> | ||
<div class="col-xs-12"> | ||
<div | ||
id="PurchaseGrid" |
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.
The grid is not for purchase I think, maybe DonationGrid
will be better
field : 'reference', | ||
displayName : 'TABLE.COLUMNS.REFERENCE', | ||
headerCellFilter : 'translate', | ||
cellTemplate : 'modules/stock/entry/modals/templates/purchase_reference.tmpl.html', |
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.
It seems like this template is used also with purchase, do you think we can rename it ?
vm.gridApi.core.notifyDataChange(uiGridConstants.dataChange.COLUMN); | ||
} | ||
|
||
/** get purchase document */ |
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.
Is it possible to add comments about the use of Receipts.purchase
here.
Also I cannot get the receipt of donation
app.get('/donations/:uuid', donation.detail); | ||
app.put('/donations/:uuid', donation.update); | ||
app.delete('/donations/:uuid', donation.remove); | ||
|
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.
👍
</div> | ||
|
||
<div class="modal-body"> | ||
<div class="row"> |
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.
Could you remove this <div class="row">
it is not necessary
01c9da8
to
11d5c8f
Compare
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.
I did another test and the donor add/edit/delete works fine.
However, using the Donors in the Stock Entry page is confusing to me.
- When I added a new donor, and did Stock > Stock Entry, clicked on [Donor], the new Donor is not listed.
- In the pop-up dialog that comes up to select a donor, if I click the check mark for the existing Donor and click on [Submit], I return to the Stock Entry page, but no Donor is indicated in the [Donor] button AND there is still a warning at the bottom "No source selected".
- In the pop-up donor selection dialog, there is an [+] button on the top right to add a Donor (right?). However, I think there is a problem with the controls:
Notice that controls to add stock items appears. That should not be in this form. This form should just select the donor and return the the main Stock Entry page with the Donor inserted. If you click on the [Add] button, to add stock items (which you should not do in this form), you will see error messages on the underlying screen, not this dialog! So I think that the lower part (to add stock items) should be removed from this form. - Finally, is the pop-up Donor selection dialog the only place to associated a donation with a project?
What would make more sense to me (and probably be simpler for users), would be for
- The Donor selection dialog allows you to pick the donor and return to the main Stock entry form.
- The Donor would be selected and displayed in the [Donor] button.
- Two new fields would appear in the Stock Entry form:
- a task selection field (drop-down menu)
- a donation description text field
- No additional donation date field is needed (probably); I think that the date of the entry should be adequate. One could enter any other original donation dates, etc, in the Donation description field.
The field |
Yes, I saw that. And it worked for me, but I thought the process was difficult. I outlined the way that seemed more user-friendly to me in my previous post. |
Even for purshase order if you create a supplier no source will be selected in the stock entry, @mbayopanda can tell us more about this |
I agree that we can simplify this feature by having just the donor (when we click on the donation button), we have already these pieces of information (date, description, and inventories) in the stock entry form, and I am not sure if we really need the project here. |
b8b92b1
to
e9747ca
Compare
5137ff6
to
8eac0b7
Compare
@jeremielodi what is the status of this PR? |
8eac0b7
to
74c15be
Compare
74c15be
to
9a07f52
Compare
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 to bring them into master sooner. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 to bring them into master sooner. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 to bring them into master sooner. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 to bring them into master sooner. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 and add the critical await call to prevent test failures. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 and add the critical await call to prevent test failures. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 and add the critical await call to prevent test failures. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 and add the critical await call to prevent test failures. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 and add the critical await call to prevent test failures. Closes Third-Culture-Software#4919.
Cherry picked the bh-date-editor changes from Third-Culture-Software#4837 and add the critical await call to prevent test failures. Closes Third-Culture-Software#4919.
closes #4826