@sprucelabs/spruce-people-utils 2.3.0 → 2.3.1
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.
- package/build/__tests__/support/SpyPersonSelectInput.d.ts +1 -0
- package/build/__tests__/support/SpyPersonSelectInput.js +3 -0
- package/build/esm/__tests__/support/SpyPersonSelectInput.d.ts +1 -0
- package/build/esm/__tests__/support/SpyPersonSelectInput.js +3 -0
- package/build/esm/viewControllers/PersonSelectInput.vc.js +5 -5
- package/build/viewControllers/PersonSelectInput.vc.js +5 -5
- package/package.json +1 -1
|
@@ -51,14 +51,14 @@ export default class PersonSelectInputViewController extends AbstractViewControl
|
|
|
51
51
|
try {
|
|
52
52
|
const people = yield this.search(value);
|
|
53
53
|
const suggestions = searchPeopleToSuggestions(people, (person) => __awaiter(this, void 0, void 0, function* () { return this.handleClickSuggestion(person); }));
|
|
54
|
-
const allSuggestions = [
|
|
55
|
-
|
|
56
|
-
{
|
|
54
|
+
const allSuggestions = [...suggestions];
|
|
55
|
+
if (this.organizationId) {
|
|
56
|
+
allSuggestions.push({
|
|
57
57
|
id: 'invite',
|
|
58
58
|
label: 'Invite person',
|
|
59
59
|
onClick: this.handleClickInvitePerson.bind(this),
|
|
60
|
-
}
|
|
61
|
-
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
62
|
if (this.shouldAllowAddAnonymous) {
|
|
63
63
|
allSuggestions.push(this.renderAnonSuggestion());
|
|
64
64
|
}
|
|
@@ -65,14 +65,14 @@ class PersonSelectInputViewController extends heartwood_view_controllers_1.Abstr
|
|
|
65
65
|
try {
|
|
66
66
|
const people = await this.search(value);
|
|
67
67
|
const suggestions = (0, searchPeopleToSuggestions_1.default)(people, async (person) => this.handleClickSuggestion(person));
|
|
68
|
-
const allSuggestions = [
|
|
69
|
-
|
|
70
|
-
{
|
|
68
|
+
const allSuggestions = [...suggestions];
|
|
69
|
+
if (this.organizationId) {
|
|
70
|
+
allSuggestions.push({
|
|
71
71
|
id: 'invite',
|
|
72
72
|
label: 'Invite person',
|
|
73
73
|
onClick: this.handleClickInvitePerson.bind(this),
|
|
74
|
-
}
|
|
75
|
-
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
76
|
if (this.shouldAllowAddAnonymous) {
|
|
77
77
|
allSuggestions.push(this.renderAnonSuggestion());
|
|
78
78
|
}
|