-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from TAMULib/sprint6-staging
sprint 6
- Loading branch information
Showing
125 changed files
with
6,580 additions
and
1,931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
app.constant("FeatureProposalState", { | ||
IN_PROGRESS: { | ||
gloss: "In Progress", | ||
value: "IN_PROGRESS", | ||
summary: "Still being drafted, hidden from others, no voting." | ||
}, | ||
ACTIVE: { | ||
gloss: "Active", | ||
value: "ACTIVE", | ||
summary: "Open for voting by those logged in, displayed to all users." | ||
}, | ||
SUBMITTED: { | ||
gloss: "Submitted", | ||
value: "SUBMITTED", | ||
summary: "Sent off to project management API." | ||
}, | ||
ON_HOLD: { | ||
gloss: "On Hold", | ||
value: "ON_HOLD", | ||
summary: "Closed for voting, but not sent to project management API. \"There may be hope\"." | ||
}, | ||
REJECTED: { | ||
gloss: "Rejected", | ||
value: "REJECTED", | ||
summary: "Closed for voting, terminal state." | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
app.constant('IdeaState', { | ||
WAITING_ON_REVIEW: { | ||
gloss: 'Waiting on Review', | ||
value: 'WAITING_ON_REVIEW' | ||
}, | ||
ELEVATED: { | ||
gloss: 'Elevated', | ||
value: 'ELEVATED' | ||
}, | ||
SENT_TO_HELPDESK: { | ||
gloss: 'Sent to Helpdesk', | ||
value: 'SENT_TO_HELPDESK' | ||
}, | ||
REJECTED: { | ||
gloss: 'Rejected', | ||
value: 'REJECTED' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
61 changes: 61 additions & 0 deletions
61
app/controllers/detail/service/serviceDetailFeatureProposalListController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
app.controller('ServiceDetailFeatureProposalListController', function ($controller, $scope, $timeout, $anchorScroll, FeatureProposalState, FeatureProposalRepo, ServiceRepo, UserRepo) { | ||
|
||
angular.extend( | ||
this, | ||
$controller( | ||
'ServiceDetailController', { | ||
$scope: $scope | ||
} | ||
), | ||
$controller( | ||
'FeatureProposalController', { | ||
$scope: $scope | ||
} | ||
), | ||
$controller( | ||
'AuthenticationController', { | ||
$scope: $scope | ||
} | ||
) | ||
); | ||
|
||
ServiceRepo.ready().then(function () { | ||
ServiceRepo.reset(); | ||
$scope.featureProposalsTableParams = $scope.service.getListFeatureProposalsTableParams(); | ||
|
||
$scope.hasFeatureProposals = function () { | ||
return $scope.featureProposalsTableParams.data.length > 0; | ||
}; | ||
|
||
$timeout(function () { | ||
$anchorScroll(); | ||
}, 500); | ||
}); | ||
|
||
if (!$scope.isAnonymous()) { | ||
UserRepo.getUser().then(function (res) { | ||
var apiRes = angular.fromJson(res.body); | ||
if (apiRes.meta.status === 'SUCCESS') { | ||
$scope.user = apiRes.payload.User; | ||
$scope.hasVoted = function (fp) { | ||
return fp.voters.indexOf($scope.user.id) >= 0; | ||
}; | ||
} | ||
}); | ||
} | ||
|
||
$scope.isVotingOpen = function (featureProposal) { | ||
return !$scope.isAnonymous() && featureProposal.state === FeatureProposalState.ACTIVE.value; | ||
}; | ||
|
||
$scope.vote = function (fp) { | ||
FeatureProposalRepo.vote(fp).then(function (res) { | ||
var apiRes = angular.fromJson(res.body); | ||
if (apiRes.meta.status === 'SUCCESS') { | ||
$scope.service.getListFeatureProposalsTableParams().reload(); | ||
$scope.service.getManagedFeatureProposalsTableParams().reload(); | ||
} | ||
}); | ||
}; | ||
|
||
}); |
70 changes: 70 additions & 0 deletions
70
app/controllers/detail/service/serviceDetailFeatureProposalManagementController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
app.controller('ServiceDetailFeatureProposalManagementController', function ($controller, $scope, ServiceRepo) { | ||
|
||
angular.extend( | ||
this, | ||
$controller( | ||
'ServiceDetailController', { | ||
$scope: $scope | ||
} | ||
), | ||
$controller( | ||
'FeatureProposalController', { | ||
$scope: $scope | ||
} | ||
) | ||
); | ||
|
||
ServiceRepo.ready().then(function () { | ||
$scope.weaverTable = { | ||
pageSettings: $scope.service.getManagedFeatureProposalsPageSettings(), | ||
tableParams: $scope.service.getManagedFeatureProposalsTableParams(), | ||
columns: [{ | ||
gloss: 'Title', | ||
property: 'title', | ||
filterable: false, | ||
sortable: true | ||
}, | ||
{ | ||
gloss: 'Description', | ||
property: 'description', | ||
filterable: false, | ||
sortable: false | ||
}, | ||
{ | ||
gloss: 'Votes', | ||
property: 'votes', | ||
filterable: false, | ||
sortable: false, | ||
isConstant: true | ||
}, | ||
{ | ||
gloss: 'Status', | ||
property: 'state', | ||
filterable: false, | ||
sortable: true, | ||
isConstant: true | ||
}, | ||
{ | ||
gloss: 'Last Modified', | ||
property: 'lastModified', | ||
filterable: false, | ||
sortable: true | ||
}, | ||
{ | ||
gloss: 'Private', | ||
property: 'isPrivate', | ||
filterable: false, | ||
sortable: true, | ||
isConstant: true | ||
}, | ||
{ | ||
gloss: 'Actions', | ||
filterable: false, | ||
sortable: false | ||
} | ||
], | ||
activeSort: [] | ||
}; | ||
}); | ||
|
||
}); |
Oops, something went wrong.