Skip to content
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

Rtt 145 convert discussions and lectures #1817

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e3b32fb
confirmation modal when conversion is required
eduranperez Jan 13, 2021
a622a6b
always fetch sections
eduranperez Jan 14, 2021
246ab75
dont compare against self for uniqueness
eduranperez Jan 14, 2021
1510d9c
reset original sequence pattern
eduranperez Jan 14, 2021
15d525d
show before and after sequence pattern in confirmation modal
eduranperez Jan 14, 2021
6ed6bac
fix padding
eduranperez Jan 14, 2021
7141ab3
example text
eduranperez Jan 14, 2021
ebb146d
compare with state instead of local scope var to check for change
eduranperez Jan 14, 2021
5d1548f
linting
eduranperez Jan 15, 2021
04b640f
change seat display for example
eduranperez Jan 19, 2021
0a7373a
clear section list on course update
eduranperez Jan 19, 2021
9088e7b
update sections array on FETCH_SECTIONS
eduranperez Jan 19, 2021
709e8f8
create new course
eduranperez Jan 21, 2021
9e9fb47
creating new offering
eduranperez Jan 21, 2021
acb01ee
update state with new course and section group
eduranperez Jan 21, 2021
da58093
update state properly after new offering creation. Switch selected r…
eduranperez Jan 22, 2021
00ce9a5
fix conditional displaying of text/examples
eduranperez Jan 23, 2021
78f4933
validate sequence pattern
eduranperez Jan 25, 2021
3687b1f
linting
eduranperez Jan 25, 2021
f041b16
remove console log, revert unused changes on course details
eduranperez Jan 25, 2021
fadb9c8
remove more console logs
eduranperez Jan 25, 2021
2c81be8
add details to description of actions and hightlight input field on i…
eduranperez Jan 25, 2021
065280b
alter wording
eduranperez Jan 26, 2021
6c2020f
only remove old sectiongroup from state if request succeeded
eduranperez Jan 26, 2021
cfd582c
ensure new offering would be unique
eduranperez Jan 27, 2021
807e4eb
update modal wording
eduranperez Jan 27, 2021
8dc806b
linting
eduranperez Jan 28, 2021
0e10b71
update wording, convert user input to uppercase
eduranperez Jan 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linting
eduranperez committed Jan 25, 2021
commit 3687b1f5ecc52ce74c159004aad602a8366452e5
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ let convertSectionsModal = function (CourseActionCreators) {
};

scope.isSeries = function () {
if(scope.selectedEntity){
if (scope.selectedEntity){
let selectedEntity = scope.selectedEntity;
let course = scope.state.courses.list[selectedEntity.courseId];
return course.isSeries();
@@ -35,16 +35,16 @@ let convertSectionsModal = function (CourseActionCreators) {

scope.isValid = function () {
var isValid = false;
if(scope.selectedEntity && scope.selectedEntity.sequencePattern){
if(scope.isSeries){
if(scope.selectedEntity.sequencePattern.length === 1 && isLetter(scope.selectedEntity.sequencePattern[0].toUpperCase())){
if (scope.selectedEntity && scope.selectedEntity.sequencePattern){
if (scope.isSeries){
if (scope.selectedEntity.sequencePattern.length === 1 && isLetter(scope.selectedEntity.sequencePattern[0].toUpperCase())){
isValid = true;
} else {
scope.selectedEntity.sequencePatternTooltipMessage = "Sequence pattern format is incorrect. Valid format is '1 letter' (ex: 'A').";
isValid = false;
}
} else {
if(
if (
scope.selectedEntity.sequencePattern.length === 3 &&
isNumber(scope.selectedEntity.sequencePattern[0]) &&
isNumber(scope.selectedEntity.sequencePattern[1]) &&
@@ -58,7 +58,7 @@ let convertSectionsModal = function (CourseActionCreators) {
}
}
return isValid;
}
};
} // end link
};
};
2 changes: 1 addition & 1 deletion app/course/directives/courseTable.js
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ let courseTable = function ($rootScope, $timeout, CourseActionCreators, $compile
$('tr[data-course-id="' + data.action.payload.sectionGroup.courseId + '"] td[data-term-code="' + data.action.payload.sectionGroup.termCode + '"] input').attr( 'placeholder', '0 planned seats' ); // eslint-disable-line
$('tr[data-course-id="' + data.action.payload.sectionGroup.courseId + '"] td[data-term-code="' + data.action.payload.sectionGroup.termCode + '"] input').attr( 'value', data.action.payload.sectionGroup.plannedSeats ); // eslint-disable-line

if(data.action.type == ActionTypes.CREATE_SECTION_GROUP){
if (data.action.type == ActionTypes.CREATE_SECTION_GROUP){
scope.previouslySelectedCourseId = data.state.uiState.selectedCourseId;
scope.previouslySelectedTermCode = data.state.uiState.selectedTermCode;

Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ let sectionGroupDetails = function (CourseActionCreators, Term) {

scope.convertOffering = function (){
CourseActionCreators.toggleConvertSectionsModal();
}
};
}
};
};
4 changes: 2 additions & 2 deletions app/course/services/courseStateService.js
Original file line number Diff line number Diff line change
@@ -326,10 +326,10 @@ class CourseStateService {
return sectionGroups;
case ActionTypes.UPDATE_COURSE:
sectionGroups.ids.forEach(function (sectionId) {
if(sectionGroups.list[sectionId].sectionIds){
if (sectionGroups.list[sectionId].sectionIds){
delete sectionGroups.list[sectionId].sectionIds;
}
})
});
return sectionGroups;
default:
return sectionGroups;