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

Commit 502ae7e

Browse files
authored
Merge pull request #1242 from appirio-tech/f2f-skill_picker-by_shubhendus
F2f skill picker by shubhendus
2 parents 0c9120d + 75a4005 commit 502ae7e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

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

+6-4
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
}
@@ -131,9 +134,8 @@ import _ from 'lodash'
131134
if (program) {
132135
var community = _.find(vm.communities, {programId: program.eventId})
133136
if (community) {
134-
// set display false to avoid showing already enabled/registered program
135-
// we expect display property to be modified after first load of the page
136-
// community.status = true
137+
// Show existing communites selected
138+
community.status = true
137139
if (community.unregister){
138140
community.unregister()
139141
_addWatchToCommunity(community)

app/skill-picker/skill-picker.jade

+1-1
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)