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

Commit 9a2624f

Browse files
committed
On any change in the state of the page Done button will be active, and new user will be able to proceed.
1 parent 83f454d commit 9a2624f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import _ from 'lodash'
2828
vm.isPageDirty = isPageDirty
2929
vm.isTracksDirty = isTracksDirty
3030
vm.isCommunitySelected = isCommunitySelected
31+
vm.isPageStateDirty = false
3132
///////
3233
activate()
3334

@@ -42,20 +43,22 @@ import _ from 'lodash'
4243
/**
4344
* Verfies if the page state has been modified by the user in any way.
4445
*/
45-
function isPageDirty() {
46+
function isPageDirty() {
4647
return isTracksDirty() || isCommunitiesDirty()
4748
}
4849

4950
/**
5051
* Verfies if the tracks section state has been modified by the user in any way.
5152
*/
5253
function isTracksDirty() {
54+
vm.isPageStateDirty = true
5355
return vm.tracks.DESIGN || vm.tracks.DEVELOP || vm.tracks.DATA_SCIENCE
5456
}
5557
/**
5658
* Verfies if the communities section state has been modified by the user in any way.
5759
*/
5860
function isCommunitySelected() {
61+
vm.isPageStateDirty = true
5962
var community = _.find(vm.communities, {status: true, display: true})
6063
return !!community
6164
}
@@ -133,7 +136,7 @@ import _ from 'lodash'
133136
if (community) {
134137
// set display false to avoid showing already enabled/registered program
135138
// we expect display property to be modified after first load of the page
136-
// community.status = true
139+
community.status = true
137140
if (community.unregister){
138141
community.unregister()
139142
_addWatchToCommunity(community)

app/skill-picker/skill-picker.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@
7474
type="button",
7575
tc-busy-button, tc-busy-when="vm.saving",
7676
ng-click="vm.submitSkills()",
77-
ng-disabled="vm.disableDoneButton || !vm.isPageDirty()") Done
77+
ng-disabled="vm.disableDoneButton || vm.isPageStateDirty") Done

0 commit comments

Comments
 (0)