@sprucelabs/spruce-role-utils 0.4.0 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -115,7 +115,13 @@ export default class RoleSelectCardViewController extends AbstractViewController
|
|
|
115
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
116
|
const rowVc = this.getRow(id);
|
|
117
117
|
rowVc.setIsEnabled(true);
|
|
118
|
-
|
|
118
|
+
const current = rowVc.getValue('requirement');
|
|
119
|
+
if (current !== requirement) {
|
|
120
|
+
yield rowVc.setValue('requirement', requirement);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
yield this.handleDidChange();
|
|
124
|
+
}
|
|
119
125
|
});
|
|
120
126
|
}
|
|
121
127
|
getRow(roleId) {
|
|
@@ -99,7 +99,13 @@ class RoleSelectCardViewController extends heartwood_view_controllers_1.Abstract
|
|
|
99
99
|
async selectRole(id, requirement = 'optional') {
|
|
100
100
|
const rowVc = this.getRow(id);
|
|
101
101
|
rowVc.setIsEnabled(true);
|
|
102
|
-
|
|
102
|
+
const current = rowVc.getValue('requirement');
|
|
103
|
+
if (current !== requirement) {
|
|
104
|
+
await rowVc.setValue('requirement', requirement);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
await this.handleDidChange();
|
|
108
|
+
}
|
|
103
109
|
}
|
|
104
110
|
getRow(roleId) {
|
|
105
111
|
return this.activeCardVc.getRowVc(roleId);
|