-
Notifications
You must be signed in to change notification settings - Fork 31
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
[#3168] - assign datapoints to assignments by name [no api included yet] #3366
Conversation
Dashboard/app/js/lib/components/devices/AssignmentsEditView/MainBody.jsx
Outdated
Show resolved
Hide resolved
.../js/lib/components/devices/AssignmentsEditView/screens/AssignDatapoints/SearchDatapoints.jsx
Outdated
Show resolved
Hide resolved
.../js/lib/components/devices/AssignmentsEditView/screens/AssignDatapoints/SearchDatapoints.jsx
Outdated
Show resolved
Hide resolved
.../js/lib/components/devices/AssignmentsEditView/screens/AssignDatapoints/SearchDatapoints.jsx
Outdated
Show resolved
Hide resolved
The code Looks good to me but I have seen there are lost of Codacy errors https://app.codacy.com/manual/Akvo/akvo-flow/pullRequest?bid=15721359&prid=4706082&utm_campaign=new_commit&utm_medium=Email&utm_source=Internal& |
@valllllll2000 they look more like repetitive formatting problems. |
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.
True. Forgot it was implemented. I'll update #3398 to match that. 👍🏼 |
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.
So as a general comment, try to think of the datastructure that is relevant.. in this case the relevant one is the DataPointAssignment
which contains the surveyAssignmentId
, deviceId
and the list of datapoints that are assigned to a particular device. The DataPointAssignment
has a once to one correspondence with a device for each SurveyAssignment.
The code we are trying to write is operating on that datastructure. We enter a SurveyAssignmemt
and in there when we select a device, we then start to manipulate a DataPointAssignment
that is attached to that SurveyAssignmemnt
.
With each datapoint that we select, the manipulation is to add or remove a datapointId
top the list of ids in the DataPointAssignment
. This basic idea should come through when reading the code. So in the code for instance, there should be a DataPointAssignment
.
Dashboard/app/js/lib/components/devices/AssignmentsEditView/MainBody.jsx
Outdated
Show resolved
Hide resolved
.../js/lib/components/devices/AssignmentsEditView/screens/AssignDatapoints/SearchDatapoints.jsx
Outdated
Show resolved
Hide resolved
Dashboard/app/js/lib/components/devices/AssignmentsEditView/screens/AssignDatapoints/index.jsx
Outdated
Show resolved
Hide resolved
Dashboard/app/js/lib/components/devices/AssignmentsEditView/screens/AssignDatapoints/index.jsx
Outdated
Show resolved
Hide resolved
…slation placeholder
Currently all data are stored in memory and not yet connected to the API.
Screenshots (if appropriate)
Reviewer Checklist