(js) Fix Resource conflict error handling

This commit is contained in:
Francis Lachapelle
2016-10-28 11:47:40 -04:00
parent f25c26b7bd
commit 5208e46d10
4 changed files with 10 additions and 8 deletions
@@ -6,8 +6,8 @@
/**
* @ngInject
*/
CalendarListController.$inject = ['$rootScope', '$scope', '$timeout', '$state', '$mdDialog', 'sgHotkeys', 'sgFocus', 'Dialog', 'Preferences', 'Calendar', 'Component'];
function CalendarListController($rootScope, $scope, $timeout, $state, $mdDialog, sgHotkeys, focus, Dialog, Preferences, Calendar, Component) {
CalendarListController.$inject = ['$rootScope', '$scope', '$timeout', '$state', '$mdDialog', 'sgHotkeys', 'sgFocus', 'Dialog', 'Preferences', 'CalendarSettings', 'Calendar', 'Component'];
function CalendarListController($rootScope, $scope, $timeout, $state, $mdDialog, sgHotkeys, focus, Dialog, Preferences, CalendarSettings, Calendar, Component) {
var vm = this, hotkeys = [];
vm.component = Component;
@@ -291,7 +291,7 @@
}
function onComponentAdjustError(response, component, params) {
if (response.status == 403 &&
if (response.status == CalendarSettings.ConflictHTTPErrorCode &&
response.data && response.data.message && angular.isObject(response.data.message)) {
$mdDialog.show({
parent: angular.element(document.body),