Skip to content

Commit 16322e7

Browse files
authored
Merge pull request #221 from MoralCode/fix-delete
account for current page and page size when hiding schedules (fix #183)
2 parents e9fe9c2 + c839ad6 commit 16322e7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

assets/src/modules/sm/Schedule/directives/scheduleActionsDirective.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ angular.module('sm').directive('scheduleActions', function ($http, $q, shareServ
142142

143143
hide: function () {
144144
ga('send', 'event', 'schedule', 'hide')
145-
scope.$parent.$parent.state.schedules.splice(scope.$index, 1)
145+
const appstate = scope.$parent.$parent.state
146+
const pageStartIndex = appstate.displayOptions.currentPage * appstate.displayOptions.pageSize
147+
148+
appstate.schedules.splice(pageStartIndex + scope.$index, 1)
146149
}
147150
}
148151
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "schedulemaker",
3-
"version": "3.1.2",
3+
"version": "3.1.3",
44
"private": true,
55
"description": "A course database lookup tool and schedule building web application for use at Rochester Institute of Technology.",
66
"main": "index.php",

0 commit comments

Comments
 (0)