Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit e352b59

Browse files
author
vikasrohit
committed
SUP-2398, Skill Picker-->'Done' button is getting enabled for fraction of second after clicking on to done the informations.
-- Disabled the button as soon as the API calls returns success so that it does not enabled while browser is trying to navigate to dashboard. However, there is some css issue in disabled state of button with tc-busy directive.
1 parent 27c08db commit e352b59

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/skill-picker/skill-picker.controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
vm.toggleSkill = toggleSkill;
1616
vm.tracks = {};
1717
vm.mySkills = [];
18+
vm.disableDoneButton = false;
1819
///////
1920
activate();
2021

@@ -57,6 +58,7 @@
5758
.then(function(resp) {
5859
vm.saving = false;
5960
toaster.pop('success', "Success!", "Your skills have been updated.");
61+
vm.disableDoneButton = true;
6062
$state.go('dashboard');
6163
})
6264
.catch(function(data) {
@@ -66,6 +68,7 @@
6668
} else {
6769
vm.saving = false;
6870
toaster.pop('success', "Success!", "Your skills have been updated.");
71+
vm.disableDoneButton = true;
6972
$state.go('dashboard');
7073
}
7174

app/skill-picker/skill-picker.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@
5151
type="button",
5252
tc-busy-button, tc-busy-when="vm.saving",
5353
ng-click="vm.submitSkills()",
54-
ng-disabled="!vm.tracks.DESIGN && !vm.tracks.DEVELOP && !vm.tracks.DATA_SCIENCE") Done
54+
ng-disabled="vm.disableDoneButton || (!vm.tracks.DESIGN && !vm.tracks.DEVELOP && !vm.tracks.DATA_SCIENCE)") Done

0 commit comments

Comments
 (0)