@sprucelabs/spruce-people-utils 3.7.8 → 3.8.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.
@@ -185,6 +185,7 @@ class InvitePersonCardViewController extends AbstractViewController {
185
185
  });
186
186
  }
187
187
  handleSubmitNamePhoneForm() {
188
+ var _a, _b;
188
189
  return __awaiter(this, void 0, void 0, function* () {
189
190
  this.swipeVc.setIsBusy(true);
190
191
  yield this.swipeVc.jumpToSlide(1);
@@ -204,9 +205,13 @@ class InvitePersonCardViewController extends AbstractViewController {
204
205
  message: 'approve your account',
205
206
  },
206
207
  });
208
+ if (invite.autoAcceptedPersonId) {
209
+ return (_a = this.doneHandler) === null || _a === void 0 ? void 0 : _a.call(this, invite.autoAcceptedPersonId);
210
+ }
207
211
  this.pendingInvite = invite;
208
212
  }
209
213
  catch (err) {
214
+ console.error((_b = err.stack) !== null && _b !== void 0 ? _b : err.message);
210
215
  yield this.alert({ title: 'Invite failed!', message: err.message });
211
216
  yield this.swipeVc.jumpToSlide(0);
212
217
  }
@@ -249,7 +254,7 @@ const inviteFormSchema = buildSchema({
249
254
  id: 'inviteForm',
250
255
  fields: {
251
256
  firstName: {
252
- label: 'First name',
257
+ label: 'First Name',
253
258
  type: 'text',
254
259
  },
255
260
  phone: {
@@ -165,6 +165,7 @@ class InvitePersonCardViewController extends heartwood_view_controllers_1.Abstra
165
165
  return super.destroy();
166
166
  }
167
167
  async handleSubmitNamePhoneForm() {
168
+ var _a, _b;
168
169
  this.swipeVc.setIsBusy(true);
169
170
  await this.swipeVc.jumpToSlide(1);
170
171
  try {
@@ -183,9 +184,13 @@ class InvitePersonCardViewController extends heartwood_view_controllers_1.Abstra
183
184
  message: 'approve your account',
184
185
  },
185
186
  });
187
+ if (invite.autoAcceptedPersonId) {
188
+ return (_a = this.doneHandler) === null || _a === void 0 ? void 0 : _a.call(this, invite.autoAcceptedPersonId);
189
+ }
186
190
  this.pendingInvite = invite;
187
191
  }
188
192
  catch (err) {
193
+ console.error((_b = err.stack) !== null && _b !== void 0 ? _b : err.message);
189
194
  await this.alert({ title: 'Invite failed!', message: err.message });
190
195
  await this.swipeVc.jumpToSlide(0);
191
196
  }
@@ -221,7 +226,7 @@ const inviteFormSchema = (0, schema_1.buildSchema)({
221
226
  id: 'inviteForm',
222
227
  fields: {
223
228
  firstName: {
224
- label: 'First name',
229
+ label: 'First Name',
225
230
  type: 'text',
226
231
  },
227
232
  phone: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-people-utils",
3
3
  "description": "People Utilities",
4
- "version": "3.7.8",
4
+ "version": "3.8.1",
5
5
  "skill": {
6
6
  "namespace": "invite"
7
7
  },