-
Notifications
You must be signed in to change notification settings - Fork 3
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
Editing of Representatives, Farms, and Demands and Some Associated Card UI Implementations #203
base: develop
Are you sure you want to change the base?
Conversation
…(note to self) need to double-check that the object is being passed correctly from form.
…y with the array index bit again)
… the usage of window.scroll().
… reps are on point.
… even on failure.
…eed to confirm that they're unnecessary for positioning the dialog correctly.
…ldn't have been removed).
}, | ||
function(fail) { | ||
showDialog($mdDialog, fail, true); | ||
}); | ||
}; | ||
|
||
$scope.newBuyerCancel = function () { |
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.
@nick This function has not definition. Why was it included in the pull request?
Demand.findByIdAndUpdate({_id:req.params.demand_id}, req.body, function (err, changes) { | ||
console.log(err, changes); | ||
if (err) { | ||
handleDBError(err, res); |
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.
@nick22891 i believe this line may have an error. The handleDBerror should be called by prefixing common before the function name.
@tremainebuchanan - All your concerns have been addressed or responded to - please review again. |
}); | ||
|
||
$scope.units = UnitsFactory.query({}); |
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.
@nick22891 this line will overwrite the units
already fetched from the above function call.
* This is the factory used to update a representative based on a given | ||
* Buyer and Representative ID | ||
*/ | ||
services.factory('RepEditFactory', function($resource) { |
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.
@nick22891 Notice I don't have any "EditFactories" in my code? I try my best to have just one factory that can do it all. For instance:
services.factory('BuyerFactory', function($resource) {
return $resource('/buyer/:id', {}, {
show: { method: 'GET'},
create: { method: 'POST'},
update: { method: 'PUT', params: {id: '@id'}}
});
});
Attempt to have just one factory that can create, update and get information from the web-services.
@nick22891 I have concerns around the reuse of code. I have html partials in this project that could be reused as part of the edit functionality. You really should be reusing them. |
My revision is still incomplete and will require me to pull this branch and test it offline. |
Hopefully not too many changes necessary on this one - tried to spot everything before submitting the pull request.