-
Notifications
You must be signed in to change notification settings - Fork 21
New Feature - Joint Public Comment Period #119
Conversation
Includes: * EPIC-960 Joint PCP - Can Download Comments * EPIC-961 Joint PCP - CEAA: Can download Comments * EPIC-979 Joint PCP - Mandatory name and location * EPIC-931 Joint PCP - Feature Implementation: Submit a Comment * EPIC-932 Joint PCP - Modify PCP Creation Page to Joint OR Regular * EPIC-935 Joint PCP - Hook up Uploader * EPIC-937 Joint PCP - Public View * EPIC-976 PCP (and Joint PCP) - Banner Modifications * EPIC-1015 Joint PCP - comment details dialog does not show attachments for public users * EPIC-1017 Joint PCP - Attachment icon not showing on PCP comment display page * EPIC-1021 Joint PCP - CEAA users cannot see Rejected comments on PCP comment display page * EPIC-1024 Joint PCP CEAA role CSV download. Need to list rejected documents. * EPIC-1026 Joint PCP - comment details dialog for CEEA users
// | ||
// ------------------------------------------------------------------------- | ||
comment2 : { type:String, default:'' }, |
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.
These not not named very well - be more descriptive.
@@ -110,6 +110,10 @@ module.exports = function (app) { | |||
.get (routes.setAndRun (CommentModel, function (model, req) { | |||
return model.getCommentDocuments(req.params.commentId); | |||
})); | |||
app.route ('/api/comment/:commentId/documents2').all(policy ('guest')) |
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.
API endpoint is not named very well - be more descriptive.
period.phaseName = project.currentPhase.name; | ||
|
||
CommentPeriodModel.add($scope.period) | ||
.then(function (model) { |
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.
Indentation of the .then should line up with leading edge of 'CommentPeriodModel'.
$scope.busy = true; | ||
|
||
CommentPeriodModel.save($scope.period) | ||
.then(function (model) { |
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.
Indentation
|
||
// Create functions bound to the specific collection we will be adding files to... | ||
// These conform to the signature of the callback expected by the "Link Files" modal dialog | ||
$scope.addFilesToPackage1 = function (data) { addFilesToCollection(period.relatedDocuments, data); }; |
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.
For joint, package 1=EAO and package 2=CEAA. Naming should be clear, avoid use of numbers. Better to use a generic function and pass in the package to add data to (deal with where to put things based on input param.
s.changeFilterCommentPackage = function() { | ||
s.isLoading = true; | ||
s.filterCommentPackage = s.selectedCommentFilterOption.name; | ||
console.log("Change package filter", s.filterCommentPackage); |
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.
Remove all console.logs unless debug flag is set (or just remove it entirely).
} | ||
}, | ||
controller: function ($scope, $modalInstance, docs) { | ||
controller: function ($scope, $modalInstance, docs, docs2) { |
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.
Variable naming should be more descriptive.
if (docCount === 0 ) { | ||
// We don't need to do anything but add the comment. | ||
// console.log("s.comment:", s.comment); | ||
CommentModel.add (s.comment) |
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.
Indentation looks off.
}, function (response) { | ||
if (response.status > 0) { | ||
// docUpload.errorMsg = response.status + ': ' + response.data; | ||
console.log("error data:",response.data); |
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.
Remove console.logs.
}) | ||
.then (function (comment) { | ||
ctrl.isBusy = false; | ||
console.log("go to next stage"); |
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.
Remove console.log
* Fix whitespace and indentation * Remove commented code * Remove all console.logs * Improve variable naming
* Improve variable naming for Joint PCP documents and comments * Rename API endpoint
@marklise - I have addressed all your comments. Please review. |
Includes: