Skip to content

Commit

Permalink
SupportCall: Moving support call status into a separate angular app #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ltwheeler committed Nov 28, 2017
1 parent 7712e43 commit 3e42f63
Show file tree
Hide file tree
Showing 20 changed files with 132 additions and 15 deletions.
17 changes: 16 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ module.exports = function (grunt) {
src: ['teachingCall/**/*.html'],
dest: '<%= folders.webapp.build %>/js/teachingCallTemplates.js'
},
supportCallApp: {
cwd: '<%= folders.webapp.root %>',
src: ['supportCall/**/*.html'],
dest: '<%= folders.webapp.build %>/js/supportCallTemplates.js'
},
courseApp: {
cwd: '<%= folders.webapp.root %>',
src: ['course/**/*.html'],
Expand Down Expand Up @@ -219,6 +224,14 @@ module.exports = function (grunt) {
],
dest: '<%= folders.webapp.build %>/js/teachingCallApp.js'
},
jsSupportCall: {
src: [
'<%= folders.webapp.root %>/supportCall/*.js',
'<%= folders.webapp.root %>/supportCall/**/*.js',
'<%= ngtemplates.supportCallApp.dest %>'
],
dest: '<%= folders.webapp.build %>/js/supportCallApp.js'
},
// schedulingApp module files
jsScheduling: {
src: [
Expand Down Expand Up @@ -411,6 +424,7 @@ module.exports = function (grunt) {
'<%= folders.webapp.build %>/scheduling.html',
'<%= folders.webapp.build %>/summary.html',
'<%= folders.webapp.build %>/teachingCall.html',
'<%= folders.webapp.build %>/supportCall.html',
'<%= folders.webapp.build %>/teachingCallResponseReport.html',
'<%= folders.webapp.build %>/workgroup.html']
}
Expand Down Expand Up @@ -450,6 +464,7 @@ module.exports = function (grunt) {
'^/assignments.* /assignment.html [L]',
'^/instructionalSupport.* /instructionalSupport.html [L]',
'^/teachingCalls.* /teachingCall.html [L]',
'^/supportCalls.* /supportCall.html [L]',
'^/scheduling.* /scheduling.html [L]',
'^/registrarReconciliationReport.* /registrarReconciliationReport.html [L]',
'^/scheduleSummaryReport.* /scheduleSummaryReport.html [L]',
Expand Down Expand Up @@ -494,7 +509,7 @@ module.exports = function (grunt) {
'concat:jsRegistrarReconciliationReport', 'concat:jsScheduleSummaryReport', 'concat:jsTeachingCallResponseReport', 'concat:cssLib', 'concat:cssShared', 'uglify:dist', 'cssmin', 'cachebreaker']);

grunt.registerTask('serve', ['clean', 'eslint', 'copy', 'ngtemplates', 'bower_concat', 'concat:jsShared', 'concat:jsConfig', 'concat:jsDevSnippets',
'concat:jsCourse', 'concat:jsAdmin', 'concat:jsBudget', 'concat:jsInstructionalSupport', 'concat:jsWorkgroup', 'concat:jsSummary', 'concat:jsAssignment', 'concat:jsTeachingCall', 'concat:jsScheduling', 'concat:jsRegistrarReconciliationReport',
'concat:jsCourse', 'concat:jsAdmin', 'concat:jsBudget', 'concat:jsInstructionalSupport', 'concat:jsWorkgroup', 'concat:jsSummary', 'concat:jsAssignment', 'concat:jsTeachingCall', 'concat:jsSupportCall', 'concat:jsScheduling', 'concat:jsRegistrarReconciliationReport',
'concat:jsScheduleSummaryReport', 'concat:jsTeachingCallResponseReport', 'concat:cssLib', 'concat:cssShared', 'cachebreaker', 'connect', 'watch']);

grunt.registerTask('default', ['serve']);
Expand Down
1 change: 1 addition & 0 deletions apache_rewrite_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ RewriteRule ^summary(.+)(?<!\.html)$ summary.html [L]
RewriteRule ^courses(.+)(?<!\.html)$ course.html [L]
RewriteRule ^assignments(.+)(?<!\.html)$ assignment.html [L]
RewriteRule ^teachingCalls(.+)(?<!\.html)$ teachingCall.html [L]
RewriteRule ^supportCalls(.+)(?<!\.html)$ supportCall.html [L]
RewriteRule ^scheduling(.+)(?<!\.html)$ scheduling.html [L]
RewriteRule ^unknown-error.html$ unknown-error.php [L]
7 changes: 0 additions & 7 deletions app/instructionalSupport/instructionalSupportApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ instructionalSupportApp.config(function ($routeProvider) {
payload: InstructionalSupportAssignmentCtrl.getPayload
}
})
.when("/:workgroupId/:year/:termShortCode/supportCallStatus", {
templateUrl: "SupportCallStatus.html",
controller: "InstructionalSupportCallStatusCtrl",
resolve: {
validate: InstructionalSupportCallStatusCtrl.getPayload
}
})
.when("/:workgroupId/:year/:termShortCode", {
templateUrl: "InstructionalSupportAssignment.html",
controller: "InstructionalSupportAssignmentCtrl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* # AssignmentCtrl
* Controller of the ipaClientAngularApp
*/
instructionalSupportApp.controller('InstructionalSupportCallStatusCtrl', ['$scope', '$rootScope', '$window', '$location', '$routeParams', '$uibModal', 'instructionalSupportCallStatusActionCreators',
supportCallApp.controller('InstructionalSupportCallStatusCtrl', ['$scope', '$rootScope', '$window', '$location', '$routeParams', '$uibModal', 'instructionalSupportCallStatusActionCreators',
this.InstructionalSupportCallStatusCtrl = function ($scope, $rootScope, $window, $location, $routeParams, $uibModal, instructionalSupportCallStatusActionCreators) {
$window.document.title = "Instructional Support";
$scope.workgroupId = $routeParams.workgroupId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
instructionalSupportApp.controller('ModalAddSupportCallCtrl', this.ModalAddSupportCallCtrl = function(
supportCallApp.controller('ModalAddSupportCallCtrl', this.ModalAddSupportCallCtrl = function(
$scope, $rootScope, $uibModalInstance, instructionalSupportCallStatusActionCreators,
supportCallMode, scheduleId, state, year, nextYear, termShortCode) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
instructionalSupportApp.controller('ModalContactSupportCallCtrl', this.ModalContactSupportCallCtrl = function($scope, $rootScope, $uibModalInstance, instructionalSupportCallStatusActionCreators, supportCallMode, scheduleId, state, year, termShortCode, selectedParticipants) {
supportCallApp.controller('ModalContactSupportCallCtrl', this.ModalContactSupportCallCtrl = function($scope, $rootScope, $uibModalInstance, instructionalSupportCallStatusActionCreators, supportCallMode, scheduleId, state, year, termShortCode, selectedParticipants) {

$scope.scheduleId = scheduleId;
$scope.state = state;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
instructionalSupportApp.service('instructionalSupportCallStatusActionCreators', function ($rootScope, $window, instructionalSupportCallStatusService, supportCallStatusStateService) {
supportCallApp.service('instructionalSupportCallStatusActionCreators', function ($rootScope, $window, instructionalSupportCallStatusService, supportCallStatusStateService) {
return {
getInitialState: function (workgroupId, year, termShortCode) {
instructionalSupportCallStatusService.getInitialState(workgroupId, year, termShortCode).then(function (payload) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
instructionalSupportApp.factory("instructionalSupportCallStatusService", this.instructionalSupportAssignmentService = function($http, $q, $window) {
supportCallApp.factory("instructionalSupportCallStatusService", this.instructionalSupportAssignmentService = function($http, $q, $window) {
return {
getInitialState: function(workgroupId, year, termShortCode) {
var deferred = $q.defer();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Selectors are pure javascript functions that translate the normalized state into nested objects for the view
*/
instructionalSupportApp.service('supportCallStatusSelectors', function () {
supportCallApp.service('supportCallStatusSelectors', function () {
return {

// Will combine metadata of instructors and supportCallResponses,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
instructionalSupportApp.service('supportCallStatusStateService', function (
supportCallApp.service('supportCallStatusStateService', function (
$rootScope, $log, supportCallStatusSelectors) {
return {
_state: {},
Expand Down
66 changes: 66 additions & 0 deletions app/supportCall/supportCall.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Support Call" />
<meta name="author" content="" />

<link rel="icon" href="/images/favicon.ico">

<title></title>


<link rel="stylesheet" href="/css/entypo.css">
<link rel="stylesheet" href="/css/lib.css">
<link rel="stylesheet" href="/css/neon-core.css">
<link rel="stylesheet" href="/css/neon-theme.css">
<link rel="stylesheet" href="/css/neon-forms.css">
<link rel="stylesheet" href="/css/shared.css">

<link rel="stylesheet" href="/css/instructionalSupportCallStatus.css">
<link rel="stylesheet" href="/css/instructionalSupportCallConfig.css">

<!--
<link rel="stylesheet" href="/css/instructionalSupportAssignment.css">
<link rel="stylesheet" href="/css/instructorSupportCallForm.css">
<link rel="stylesheet" href="/css/instructorSupportCallFormModal.css">
-->
<script src="/js/lib.js"></script>
</head>
<body class="page-body ng-cloak" ng-app="supportCallApp" ng-cloak ng-controller="SharedCtrl">
<base href="/supportCalls/">

<div ng-if="loadingView" class="overlay">
<spinner class="vertical-center"></spinner>
</div>

<div class="page-container" collapsable-sidebar-container ng-view>
<!-- add class "sidebar-collapsed" to close sidebar by default, "chat-visible" to make chat appear always -->
</div>

<no-mobile-support></no-mobile-support>

<div id="toast-container" class="toast-top-right" ng-if="$root.toast.message.length > 0">
<div class="toast toast-error" style="display: block;">
<div class="toast-message" ng-bind="$root.toast.message">
</div>
</div>
</div>

<!-- Bottom scripts (common) -->
<script src="/js/select2.min.js"></script>

<!-- JavaScripts initializations and stuff -->

<script src="/js/sharedApp.js"></script>
<script src="/js/sharedConfig.js"></script>
<script src="/js/clientConfig.js"></script>
<script src="/js/snippets.js"></script>
<script src="/js/supportCallApp.js"></script>
<script src="/js/jquery-ui.min.js"></script>
</body>
</html>
42 changes: 42 additions & 0 deletions app/supportCall/supportCallApp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
window.supportCallApp = angular.module("supportCallApp", ["sharedApp", "ngRoute"]);

supportCallApp.config(function ($routeProvider) {
return $routeProvider
.when("/:workgroupId/:year/:termShortCode/supportCallStatus", {
templateUrl: "SupportCallStatus.html",
controller: "InstructionalSupportCallStatusCtrl",
resolve: {
validate: InstructionalSupportCallStatusCtrl.getPayload
}
})
.otherwise({
redirectTo: "/"
});
});

// UNSORTED ACTIONS
var INIT_STATE = "INIT_STATE";
var ADD_ASSIGNMENT_SLOTS = "ADD_ASSIGNMENT_SLOTS";
var TOGGLE_ASSIGNMENT_PIVOT_VIEW = "TOGGLE_ASSIGNMENT_PIVOT_VIEW";
var DELETE_ASSIGNMENT = "DELETE_ASSIGNMENT";
var ADD_STUDENT_SUPPORT_CALL = "ADD_STUDENT_SUPPORT_CALL";
var DELETE_STUDENT_SUPPORT_CALL = "DELETE_STUDENT_SUPPORT_CALL";
var ADD_INSTRUCTOR_SUPPORT_CALL = "ADD_INSTRUCTOR_SUPPORT_CALL";
var DELETE_INSTRUCTOR_SUPPORT_CALL = "DELETE_INSTRUCTOR_SUPPORT_CALL";
var ADD_STUDENT_PREFERENCE = "ADD_STUDENT_PREFERENCE";
var DELETE_STUDENT_PREFERENCE = "DELETE_STUDENT_PREFERENCE";
var ASSIGN_STAFF_TO_SLOT = "ASSIGN_STAFF_TO_SLOT";
var REMOVE_STAFF_FROM_SLOT = "REMOVE_STAFF_FROM_SLOT";
var UPDATE_SUPPORT_CALL_RESPONSE = "UPDATE_SUPPORT_CALL_RESPONSE";
var UPDATE_PREFERENCES_ORDER = "UPDATE_PREFERENCES_ORDER";
var OPEN_INSTRUCTOR_SUPPORT_CALL_REVIEW = "OPEN_INSTRUCTOR_SUPPORT_CALL_REVIEW";
var OPEN_STUDENT_SUPPORT_CALL_REVIEW = "OPEN_STUDENT_SUPPORT_CALL_REVIEW";
var ADD_INSTRUCTOR_PREFERENCE = "ADD_INSTRUCTOR_PREFERENCE";
var DELETE_INSTRUCTOR_PREFERENCE = "DELETE_INSTRUCTOR_PREFERENCE";
var CONTACT_STUDENT_SUPPORT_CALL = "CONTACT_STUDENT_SUPPORT_CALL";
var CONTACT_INSTRUCTOR_SUPPORT_CALL = "CONTACT_INSTRUCTOR_SUPPORT_CALL";
var UPDATE_TABLE_FILTER = "UPDATE_TABLE_FILTER";
var UPDATE_INSTRUCTOR_SUPPORT_CALL_REVIEW = "UPDATE_INSTRUCTOR_SUPPORT_CALL_REVIEW";
var UPDATE_SUPPORT_STAFF_SUPPORT_CALL_REVIEW = "UPDATE_SUPPORT_STAFF_SUPPORT_CALL_REVIEW";
var UPDATE_PREFERENCE = "UPDATE_PREFERENCE";
var ASSIGN_STAFF_TO_SECTION_GROUP_SLOT = "ASSIGN_STAFF_TO_SECTION_GROUP_SLOT";

0 comments on commit 3e42f63

Please sign in to comment.