Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

New Feature - Joint Public Comment Period #119

Merged
merged 3 commits into from
Jun 5, 2017

Conversation

asanchezr
Copy link
Contributor

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

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:'' },
Copy link
Contributor

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'))
Copy link
Contributor

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) {
Copy link
Contributor

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) {
Copy link
Contributor

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); };
Copy link
Contributor

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);
Copy link
Contributor

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) {
Copy link
Contributor

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)
Copy link
Contributor

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);
Copy link
Contributor

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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

asanchezr added 2 commits June 1, 2017 16:23
* 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
@asanchezr
Copy link
Contributor Author

@marklise - I have addressed all your comments. Please review.

@marklise marklise merged commit 30e5203 into bcgov:master Jun 5, 2017
@asanchezr asanchezr deleted the Joint-PCP branch June 7, 2017 21:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants