@plusscommunities/pluss-maintenance-web 1.1.32 → 1.1.34-beta.0

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/dist/index.esm.js CHANGED
@@ -2718,7 +2718,7 @@ class Job extends Component {
2718
2718
  res.data.location = res.data.site;
2719
2719
  this.setJob(res.data);
2720
2720
  } catch (error) {
2721
- console.error('getJob', error);
2721
+ console.error("getJob", error);
2722
2722
  }
2723
2723
  });
2724
2724
  _defineProperty(this, "getAssignees", async () => {
@@ -2728,7 +2728,7 @@ class Job extends Component {
2728
2728
  assignees: res.data.Users
2729
2729
  });
2730
2730
  } catch (error) {
2731
- console.error('getAssignees', error);
2731
+ console.error("getAssignees", error);
2732
2732
  }
2733
2733
  });
2734
2734
  _defineProperty(this, "getExternalSync", async () => {
@@ -2744,7 +2744,7 @@ class Job extends Component {
2744
2744
  } catch (error) {
2745
2745
  // 404 is expected if no sync - don't show error
2746
2746
  if (error && error.response && error.response.status !== 404) {
2747
- console.error('getExternalSync', error);
2747
+ console.error("getExternalSync", error);
2748
2748
  }
2749
2749
  this.setState({
2750
2750
  loadingExternalSync: false
@@ -2769,8 +2769,8 @@ class Job extends Component {
2769
2769
  retrySyncInitiated: true
2770
2770
  });
2771
2771
  } catch (error) {
2772
- console.error('onRetrySync', error);
2773
- const errorMessage = error && error.response && error.response.data && error.response.data.error || 'Failed to retry sync. Please try again.';
2772
+ console.error("onRetrySync", error);
2773
+ const errorMessage = error && error.response && error.response.data && error.response.data.error || "Failed to retry sync. Please try again.";
2774
2774
  this.setState({
2775
2775
  retryingSync: false,
2776
2776
  retrySyncError: errorMessage
@@ -2792,16 +2792,16 @@ class Job extends Component {
2792
2792
  });
2793
2793
  _defineProperty(this, "setJob", job => {
2794
2794
  if (_.isEmpty(job.lastActivity)) {
2795
- job.lastActivity = '-- --';
2795
+ job.lastActivity = "-- --";
2796
2796
  job.noActivity = true;
2797
2797
  }
2798
2798
  if (_.isEmpty(job.status)) {
2799
- job.status = 'Unassigned';
2799
+ job.status = "Unassigned";
2800
2800
  job.notStatus = true;
2801
2801
  }
2802
2802
  if (_.isEmpty(job.audience)) {
2803
2803
  job.audience = [{
2804
- displayName: 'Unassigned',
2804
+ displayName: "Unassigned",
2805
2805
  isEmpty: true
2806
2806
  }];
2807
2807
  }
@@ -2839,7 +2839,7 @@ class Job extends Component {
2839
2839
  editingNote: null
2840
2840
  };
2841
2841
  if (!!this.state.editingNote) {
2842
- newState.noteInput = '';
2842
+ newState.noteInput = "";
2843
2843
  newState.noteAttachments = [];
2844
2844
  newState.noteImages = [];
2845
2845
  }
@@ -2881,7 +2881,7 @@ class Job extends Component {
2881
2881
  noteAttachments: [...this.state.noteAttachments]
2882
2882
  });
2883
2883
  });
2884
- event.target.value = '';
2884
+ event.target.value = "";
2885
2885
  });
2886
2886
  _defineProperty(this, "onRemoveAttachment", a => {
2887
2887
  const index = this.state.noteAttachments.indexOf(a);
@@ -2918,7 +2918,7 @@ class Job extends Component {
2918
2918
  }
2919
2919
  this.onCloseSelectAssignee();
2920
2920
  } catch (error) {
2921
- console.error('onConfirmAssignee', error);
2921
+ console.error("onConfirmAssignee", error);
2922
2922
  }
2923
2923
  this.setState({
2924
2924
  confirmingAssignee: false
@@ -2930,7 +2930,7 @@ class Job extends Component {
2930
2930
  const res = await maintenanceActions.assignJob(this.state.jobId, userId);
2931
2931
  this.getJob();
2932
2932
  } catch (err) {
2933
- console.error('onAssignUser', err);
2933
+ console.error("onAssignUser", err);
2934
2934
  }
2935
2935
  });
2936
2936
  _defineProperty(this, "onConfirmAddNote", async () => {
@@ -2954,7 +2954,7 @@ class Job extends Component {
2954
2954
  job: res.data.job,
2955
2955
  submittingNote: false,
2956
2956
  addNoteOpen: false,
2957
- noteInput: '',
2957
+ noteInput: "",
2958
2958
  noteAttachments: [],
2959
2959
  noteImages: [],
2960
2960
  editingNote: null
@@ -2962,7 +2962,7 @@ class Job extends Component {
2962
2962
  this.props.jobsLoaded([this.state.job]);
2963
2963
  });
2964
2964
  } catch (err) {
2965
- console.error('onConfirmAddNote', err);
2965
+ console.error("onConfirmAddNote", err);
2966
2966
  }
2967
2967
  });
2968
2968
  _defineProperty(this, "onDeleteNote", n => {
@@ -2985,7 +2985,7 @@ class Job extends Component {
2985
2985
  this.setState({
2986
2986
  noteAttachments: n.Attachments || [],
2987
2987
  noteImages: n.Images || [],
2988
- noteInput: n.Note || '',
2988
+ noteInput: n.Note || "",
2989
2989
  addNoteOpen: true,
2990
2990
  editingNote: n.Id,
2991
2991
  noteMenuOpen: null
@@ -3008,15 +3008,15 @@ class Job extends Component {
3008
3008
  const update = {
3009
3009
  id: job.id,
3010
3010
  seen: true,
3011
- status: job.status || 'Unassigned'
3011
+ status: job.status || "Unassigned"
3012
3012
  };
3013
3013
  await maintenanceActions.editJob(update, auth.site);
3014
3014
  } catch (error) {
3015
3015
  this.setState({
3016
3016
  updating: false
3017
3017
  });
3018
- console.log('markSeen error', error);
3019
- alert('Something went wrong with the request. Please try again.');
3018
+ console.log("markSeen error", error);
3019
+ alert("Something went wrong with the request. Please try again.");
3020
3020
  }
3021
3021
  });
3022
3022
  });
@@ -3036,19 +3036,19 @@ class Job extends Component {
3036
3036
  } = this.state;
3037
3037
  try {
3038
3038
  this.setState({
3039
- commentInput: ''
3039
+ commentInput: ""
3040
3040
  });
3041
3041
  const res = await reactionActions.addComment(jobId, values.commentKey, job.title, job.site, commentInput);
3042
3042
  this.setState({
3043
3043
  comments: [...comments, res.data]
3044
3044
  });
3045
3045
  } catch (error) {
3046
- console.error('onAddComment', error);
3046
+ console.error("onAddComment", error);
3047
3047
  }
3048
3048
  });
3049
3049
  _defineProperty(this, "onHandleChange", event => {
3050
3050
  var stateChange = {};
3051
- stateChange[event.target.getAttribute('id')] = event.target.value;
3051
+ stateChange[event.target.getAttribute("id")] = event.target.value;
3052
3052
  this.setState(stateChange);
3053
3053
  });
3054
3054
  _defineProperty(this, "onTogglePriorityChanger", () => {
@@ -3073,7 +3073,7 @@ class Job extends Component {
3073
3073
  job
3074
3074
  });
3075
3075
  } catch (error) {
3076
- console.error('onSelectPriority', error);
3076
+ console.error("onSelectPriority", error);
3077
3077
  }
3078
3078
  });
3079
3079
  _defineProperty(this, "onToggleStatusChanger", () => {
@@ -3098,22 +3098,22 @@ class Job extends Component {
3098
3098
  job
3099
3099
  });
3100
3100
  } catch (error) {
3101
- console.error('onSelectStatus', error);
3101
+ console.error("onSelectStatus", error);
3102
3102
  }
3103
3103
  });
3104
3104
  this.state = {
3105
- jobId: Helper$2.safeReadParams(props, 'jobId') ? props.match.params.jobId : null,
3105
+ jobId: Helper$2.safeReadParams(props, "jobId") ? props.match.params.jobId : null,
3106
3106
  job: null,
3107
3107
  showingSelector: false,
3108
3108
  updating: false,
3109
3109
  comments: [],
3110
- commentInput: '',
3110
+ commentInput: "",
3111
3111
  loadingComments: false,
3112
3112
  priorityChangerOpen: false,
3113
3113
  statusChangerOpen: false,
3114
3114
  addNoteOpen: false,
3115
3115
  noteAttachments: [],
3116
- noteInput: '',
3116
+ noteInput: "",
3117
3117
  noteImages: [],
3118
3118
  assignees: [],
3119
3119
  externalSync: null,
@@ -3137,7 +3137,7 @@ class Job extends Component {
3137
3137
  }
3138
3138
  checkSetImage() {
3139
3139
  if (this.imageInput && !_.isEmpty(this.state.noteImages)) {
3140
- this.imageInput.getWrappedInstance().setValue(this.state.noteImages);
3140
+ this.imageInput.setValue(this.state.noteImages);
3141
3141
  } else {
3142
3142
  setTimeout(this.checkSetImage, 100);
3143
3143
  }
@@ -3277,7 +3277,7 @@ class Job extends Component {
3277
3277
  }, this.state.comments.map(c => this.renderComment(c))), /*#__PURE__*/React.createElement("div", {
3278
3278
  className: "commentReply"
3279
3279
  }, /*#__PURE__*/React.createElement("div", {
3280
- className: "commentReply_button".concat(!_.isEmpty(this.state.commentInput) ? ' commentReply_button-active' : ''),
3280
+ className: "commentReply_button".concat(!_.isEmpty(this.state.commentInput) ? " commentReply_button-active" : ""),
3281
3281
  onClick: this.onAddComment
3282
3282
  }, /*#__PURE__*/React.createElement(FontAwesome, {
3283
3283
  className: "commentReply_icon",
@@ -3340,29 +3340,29 @@ class Job extends Component {
3340
3340
  const {
3341
3341
  customFields
3342
3342
  } = job;
3343
- const labelClass = 'fieldLabel';
3344
- const answerClass = 'fontRegular fontSize-16 text-dark marginTop-5';
3343
+ const labelClass = "fieldLabel";
3344
+ const answerClass = "fontRegular fontSize-16 text-dark marginTop-5";
3345
3345
  const renderAnswer = field => {
3346
3346
  switch (field.type) {
3347
- case 'date':
3347
+ case "date":
3348
3348
  return /*#__PURE__*/React.createElement("div", {
3349
3349
  className: answerClass
3350
- }, field.answer ? moment(field.answer, 'YYYY-MM-DD').format('DD-MMM-YYYY') : '');
3351
- case 'time':
3350
+ }, field.answer ? moment(field.answer, "YYYY-MM-DD").format("DD-MMM-YYYY") : "");
3351
+ case "time":
3352
3352
  return /*#__PURE__*/React.createElement("div", {
3353
3353
  className: answerClass
3354
- }, field.answer ? moment(field.answer, 'HH:mm').format('h:mm a') : '');
3355
- case 'yn':
3354
+ }, field.answer ? moment(field.answer, "HH:mm").format("h:mm a") : "");
3355
+ case "yn":
3356
3356
  return /*#__PURE__*/React.createElement("div", {
3357
3357
  className: answerClass
3358
- }, field.answer ? 'Yes' : 'No');
3359
- case 'checkbox':
3358
+ }, field.answer ? "Yes" : "No");
3359
+ case "checkbox":
3360
3360
  return /*#__PURE__*/React.createElement("div", {
3361
3361
  className: answerClass
3362
- }, field.answer && Array.isArray(field.answer) ? field.answer.join(', ') : '');
3363
- case 'image':
3362
+ }, field.answer && Array.isArray(field.answer) ? field.answer.join(", ") : "");
3363
+ case "image":
3364
3364
  return this.renderImageGrid(field.answer);
3365
- case 'document':
3365
+ case "document":
3366
3366
  return this.renderDocumentGrid(field.answer);
3367
3367
  default:
3368
3368
  return /*#__PURE__*/React.createElement("div", {
@@ -3373,8 +3373,8 @@ class Job extends Component {
3373
3373
  return /*#__PURE__*/React.createElement("div", {
3374
3374
  className: "padding-60 paddingVertical-40 bottomDivideBorder"
3375
3375
  }, customFields.map((field, index) => {
3376
- if (['staticTitle', 'staticText'].includes(field.type)) return null;
3377
- if (_.isNil(field.answer) || field.answer === '' || field.answer.length === 0) return null;
3376
+ if (["staticTitle", "staticText"].includes(field.type)) return null;
3377
+ if (_.isNil(field.answer) || field.answer === "" || field.answer.length === 0) return null;
3378
3378
  return /*#__PURE__*/React.createElement("div", {
3379
3379
  key: index,
3380
3380
  className: "marginTop-16"
@@ -3404,27 +3404,27 @@ class Job extends Component {
3404
3404
  }, values.textEntityName, " #", this.state.job.jobId), /*#__PURE__*/React.createElement("div", {
3405
3405
  className: "marginTop-16"
3406
3406
  }, /*#__PURE__*/React.createElement("div", {
3407
- className: 'fieldLabel'
3407
+ className: "fieldLabel"
3408
3408
  }, "Submission date"), /*#__PURE__*/React.createElement("div", {
3409
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3410
- }, moment.utc(this.state.job.createdTime).local().format('D MMM YY'))), /*#__PURE__*/React.createElement("div", {
3409
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3410
+ }, moment.utc(this.state.job.createdTime).local().format("D MMM YY"))), /*#__PURE__*/React.createElement("div", {
3411
3411
  className: "marginTop-16"
3412
3412
  }, /*#__PURE__*/React.createElement("div", {
3413
- className: 'fieldLabel'
3413
+ className: "fieldLabel"
3414
3414
  }, "Type"), /*#__PURE__*/React.createElement("div", {
3415
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3415
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3416
3416
  }, this.state.job.type)), /*#__PURE__*/React.createElement("div", {
3417
3417
  className: "marginTop-16"
3418
3418
  }, /*#__PURE__*/React.createElement("div", {
3419
- className: 'fieldLabel'
3419
+ className: "fieldLabel"
3420
3420
  }, "Address"), /*#__PURE__*/React.createElement("div", {
3421
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3421
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3422
3422
  }, this.state.job.room)), hasCustomFields ? null : /*#__PURE__*/React.createElement("div", {
3423
3423
  className: "marginTop-16"
3424
3424
  }, /*#__PURE__*/React.createElement("div", {
3425
- className: 'fieldLabel'
3426
- }, "Description ", this.state.job.image ? '- (image supplied)' : ''), /*#__PURE__*/React.createElement("div", {
3427
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3425
+ className: "fieldLabel"
3426
+ }, "Description ", this.state.job.image ? "- (image supplied)" : ""), /*#__PURE__*/React.createElement("div", {
3427
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3428
3428
  }, this.state.job.description))), /*#__PURE__*/React.createElement("div", {
3429
3429
  className: "padding-60 paddingVertical-40 bottomDivideBorder"
3430
3430
  }, /*#__PURE__*/React.createElement(Components$3.Text, {
@@ -3433,27 +3433,27 @@ class Job extends Component {
3433
3433
  }, "Contact Details"), /*#__PURE__*/React.createElement("div", {
3434
3434
  className: "marginTop-16"
3435
3435
  }, /*#__PURE__*/React.createElement("div", {
3436
- className: 'fieldLabel'
3436
+ className: "fieldLabel"
3437
3437
  }, "Name"), /*#__PURE__*/React.createElement("div", {
3438
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3438
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3439
3439
  }, this.state.job.userName)), /*#__PURE__*/React.createElement("div", {
3440
3440
  className: "marginTop-16"
3441
3441
  }, /*#__PURE__*/React.createElement("div", {
3442
- className: 'fieldLabel'
3442
+ className: "fieldLabel"
3443
3443
  }, "Contact number"), /*#__PURE__*/React.createElement("div", {
3444
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3445
- }, _.isEmpty(this.state.job.phone) ? 'No phone provided' : this.state.job.phone)), hasCustomFields ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
3444
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3445
+ }, _.isEmpty(this.state.job.phone) ? "No phone provided" : this.state.job.phone)), hasCustomFields ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
3446
3446
  className: "marginTop-16"
3447
3447
  }, /*#__PURE__*/React.createElement("div", {
3448
- className: 'fieldLabel'
3448
+ className: "fieldLabel"
3449
3449
  }, "Should person be home?"), /*#__PURE__*/React.createElement("div", {
3450
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3451
- }, this.state.job.isHome ? 'Yes' : 'No')), this.state.job.isHome && this.state.job.homeText && /*#__PURE__*/React.createElement("div", {
3450
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3451
+ }, this.state.job.isHome ? "Yes" : "No")), this.state.job.isHome && this.state.job.homeText && /*#__PURE__*/React.createElement("div", {
3452
3452
  className: "marginTop-16"
3453
3453
  }, /*#__PURE__*/React.createElement("div", {
3454
- className: 'fieldLabel'
3454
+ className: "fieldLabel"
3455
3455
  }, "When"), /*#__PURE__*/React.createElement("div", {
3456
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3456
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3457
3457
  }, this.state.job.homeText)))), hasCustomFields ? null : this.renderImages(), hasCustomFields ? this.renderCustomFields() : null, this.renderCommentSection());
3458
3458
  }
3459
3459
  renderHistoryEntry(e, i) {
@@ -3462,7 +3462,7 @@ class Job extends Component {
3462
3462
  } = this.state;
3463
3463
  const entryToUse = e || {
3464
3464
  timestamp: job.createdTime,
3465
- status: 'Unassigned',
3465
+ status: "Unassigned",
3466
3466
  user: {
3467
3467
  displayName: job.userName,
3468
3468
  id: job.userID,
@@ -3475,7 +3475,7 @@ class Job extends Component {
3475
3475
  key: i
3476
3476
  }, /*#__PURE__*/React.createElement("p", {
3477
3477
  className: "ticketHistoryEntry_timestamp"
3478
- }, moment.utc(entryToUse.timestamp).local().format('D MMM YYYY h:mma')), /*#__PURE__*/React.createElement("div", {
3478
+ }, moment.utc(entryToUse.timestamp).local().format("D MMM YYYY h:mma")), /*#__PURE__*/React.createElement("div", {
3479
3479
  className: "statusLabel statusLabel-large statusLabel-full",
3480
3480
  style: {
3481
3481
  backgroundColor: statusType.color
@@ -3490,10 +3490,10 @@ class Job extends Component {
3490
3490
  key: index
3491
3491
  }, /*#__PURE__*/React.createElement("p", {
3492
3492
  className: "ticketHistoryEntry_timestamp"
3493
- }, moment.utc(note.Timestamp).local().format('D MMM YYYY h:mma')), /*#__PURE__*/React.createElement("div", {
3493
+ }, moment.utc(note.Timestamp).local().format("D MMM YYYY h:mma")), /*#__PURE__*/React.createElement("div", {
3494
3494
  className: "statusLabel statusLabel-large statusLabel-full",
3495
3495
  style: {
3496
- backgroundColor: '#6e79c5'
3496
+ backgroundColor: "#6e79c5"
3497
3497
  }
3498
3498
  }, /*#__PURE__*/React.createElement("span", {
3499
3499
  className: "statusLabel_text"
@@ -3510,12 +3510,12 @@ class Job extends Component {
3510
3510
  className: "maintenanceNote_name"
3511
3511
  }, note.User.displayName), this.state.noteMenuOpen === index && /*#__PURE__*/React.createElement(Components$3.MoreMenu, {
3512
3512
  options: [{
3513
- key: 'edit',
3514
- text: 'Edit',
3513
+ key: "edit",
3514
+ text: "Edit",
3515
3515
  onPress: () => this.onOpenEditNote(note)
3516
3516
  }, {
3517
- key: 'delete',
3518
- text: 'Delete',
3517
+ key: "delete",
3518
+ text: "Delete",
3519
3519
  onPress: () => this.onDeleteNote(note)
3520
3520
  }]
3521
3521
  })), /*#__PURE__*/React.createElement("p", {
@@ -3537,12 +3537,12 @@ class Job extends Component {
3537
3537
  }, "Assignment")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
3538
3538
  className: "marginTop-16"
3539
3539
  }, /*#__PURE__*/React.createElement("div", {
3540
- className: 'fieldLabel'
3540
+ className: "fieldLabel"
3541
3541
  }, "Assigned to"), /*#__PURE__*/React.createElement("div", {
3542
- className: 'fontRegular fontSize-16 text-dark marginTop-5'
3542
+ className: "fontRegular fontSize-16 text-dark marginTop-5"
3543
3543
  }, job.Assignee ? /*#__PURE__*/React.createElement(Components$3.UserListing, {
3544
3544
  user: job.Assignee
3545
- }) : 'Unassigned'))));
3545
+ }) : "Unassigned"))));
3546
3546
  }
3547
3547
  renderAssignmentEntry(e, i) {
3548
3548
  return /*#__PURE__*/React.createElement("div", {
@@ -3550,17 +3550,17 @@ class Job extends Component {
3550
3550
  key: i
3551
3551
  }, /*#__PURE__*/React.createElement("p", {
3552
3552
  className: "ticketHistoryEntry_timestamp"
3553
- }, moment.utc(e.timestamp).local().format('D MMM YYYY h:mma')), /*#__PURE__*/React.createElement("div", {
3553
+ }, moment.utc(e.timestamp).local().format("D MMM YYYY h:mma")), /*#__PURE__*/React.createElement("div", {
3554
3554
  className: "statusLabel statusLabel-large statusLabel-full",
3555
3555
  style: {
3556
3556
  backgroundColor: Colours$1.COLOUR_DUSK
3557
3557
  }
3558
3558
  }, /*#__PURE__*/React.createElement("span", {
3559
3559
  className: "statusLabel_text"
3560
- }, e.user.displayName, " assigned the ", values.textSingularName, " to ", e.assignedUser ? e.assignedUser.displayName : 'Unassigned')));
3560
+ }, e.user.displayName, " assigned the ", values.textSingularName, " to", " ", e.assignedUser ? e.assignedUser.displayName : "Unassigned")));
3561
3561
  }
3562
3562
  renderExternalSyncEntry(e, i) {
3563
- const isSuccess = e.EntryType === 'ExternalIDSet';
3563
+ const isSuccess = e.EntryType === "ExternalIDSet";
3564
3564
  const backgroundColor = isSuccess ? Colours$1.COLOUR_GREEN : Colours$1.COLOUR_RED; // Green for success, red for failure
3565
3565
 
3566
3566
  return /*#__PURE__*/React.createElement("div", {
@@ -3568,14 +3568,14 @@ class Job extends Component {
3568
3568
  key: i
3569
3569
  }, /*#__PURE__*/React.createElement("p", {
3570
3570
  className: "ticketHistoryEntry_timestamp"
3571
- }, moment.utc(e.timestamp).local().format('D MMM YYYY h:mma')), /*#__PURE__*/React.createElement("div", {
3571
+ }, moment.utc(e.timestamp).local().format("D MMM YYYY h:mma")), /*#__PURE__*/React.createElement("div", {
3572
3572
  className: "statusLabel statusLabel-large statusLabel-full",
3573
3573
  style: {
3574
3574
  backgroundColor
3575
3575
  }
3576
3576
  }, /*#__PURE__*/React.createElement("span", {
3577
3577
  className: "statusLabel_text"
3578
- }, isSuccess ? "Synced to ".concat(e.systemType || 'external system').concat(e.externalId ? " (ID: ".concat(e.externalId, ")") : '') : "Failed to sync to ".concat(e.systemType || 'external system').concat(e.error ? ": ".concat(e.error) : ''))));
3578
+ }, isSuccess ? "Synced to ".concat(e.systemType || "external system").concat(e.externalId ? " (ID: ".concat(e.externalId, ")") : "") : "Failed to sync to ".concat(e.systemType || "external system").concat(e.error ? ": ".concat(e.error) : ""))));
3579
3579
  }
3580
3580
  renderPriority() {
3581
3581
  const {
@@ -3597,8 +3597,8 @@ class Job extends Component {
3597
3597
  } = this.state;
3598
3598
  if (!job || !job.history) return false;
3599
3599
  const history = job.history || [];
3600
- const hasSuccess = history.some(entry => entry.EntryType === 'ExternalIDSet');
3601
- const hasFailure = history.some(entry => entry.EntryType === 'ExternalIDSetFailed');
3600
+ const hasSuccess = history.some(entry => entry.EntryType === "ExternalIDSet");
3601
+ const hasFailure = history.some(entry => entry.EntryType === "ExternalIDSetFailed");
3602
3602
  return hasFailure && !hasSuccess;
3603
3603
  }
3604
3604
  renderRetrySyncButton() {
@@ -3667,7 +3667,7 @@ class Job extends Component {
3667
3667
  style: {
3668
3668
  color: Colours$1.COLOUR_GREEN
3669
3669
  }
3670
- }), " Sync retry initiated. Check back shortly for results.");
3670
+ }), " ", "Sync retry initiated. Check back shortly for results.");
3671
3671
  }
3672
3672
 
3673
3673
  // Show failure message with instruction
@@ -3680,7 +3680,7 @@ class Job extends Component {
3680
3680
  style: {
3681
3681
  color: Colours$1.COLOUR_RED
3682
3682
  }
3683
- }), " External sync failed. Use the retry button to attempt again.");
3683
+ }), " ", "External sync failed. Use the retry button to attempt again.");
3684
3684
  }
3685
3685
  return null;
3686
3686
  }
@@ -3714,7 +3714,7 @@ class Job extends Component {
3714
3714
  }, /*#__PURE__*/React.createElement("strong", null, "External ID:"), " ", externalSync.externalId), externalSync.syncedAt && /*#__PURE__*/React.createElement(Components$3.Text, {
3715
3715
  type: "body",
3716
3716
  className: "marginBottom-8"
3717
- }, /*#__PURE__*/React.createElement("strong", null, "Synced:"), " ", moment.utc(externalSync.syncedAt).local().format('D MMM YYYY h:mma'))) : this.renderExternalSyncStatus()));
3717
+ }, /*#__PURE__*/React.createElement("strong", null, "Synced:"), " ", moment.utc(externalSync.syncedAt).local().format("D MMM YYYY h:mma"))) : this.renderExternalSyncStatus()));
3718
3718
  }
3719
3719
  renderOverview() {
3720
3720
  const {
@@ -3723,14 +3723,14 @@ class Job extends Component {
3723
3723
  if (!job || !job.history) return null;
3724
3724
  const source = _.sortBy([...job.history.map(e => {
3725
3725
  return _objectSpread$4(_objectSpread$4({}, e), {}, {
3726
- EntryType: e.EntryType || 'status'
3726
+ EntryType: e.EntryType || "status"
3727
3727
  });
3728
3728
  }), ...(job.Notes || []).map(e => {
3729
3729
  return _objectSpread$4(_objectSpread$4({}, e), {}, {
3730
3730
  timestamp: e.Timestamp,
3731
- EntryType: 'note'
3731
+ EntryType: "note"
3732
3732
  });
3733
- })], 'timestamp');
3733
+ })], "timestamp");
3734
3734
  return /*#__PURE__*/React.createElement("div", {
3735
3735
  className: "padding-32 paddingVertical-40 bottomDivideBorder relative"
3736
3736
  }, /*#__PURE__*/React.createElement("div", {
@@ -3740,14 +3740,14 @@ class Job extends Component {
3740
3740
  className: "flex-1"
3741
3741
  }, "Status History")), this.renderHistoryEntry(null, -1), _.map(source, (e, i) => {
3742
3742
  switch (e.EntryType) {
3743
- case 'status':
3743
+ case "status":
3744
3744
  return this.renderHistoryEntry(e, i);
3745
- case 'note':
3745
+ case "note":
3746
3746
  return this.renderNote(e, i);
3747
- case 'assignment':
3747
+ case "assignment":
3748
3748
  return this.renderAssignmentEntry(e, i);
3749
- case 'ExternalIDSet':
3750
- case 'ExternalIDSetFailed':
3749
+ case "ExternalIDSet":
3750
+ case "ExternalIDSetFailed":
3751
3751
  return this.renderExternalSyncEntry(e, i);
3752
3752
  }
3753
3753
  }));
@@ -3800,20 +3800,20 @@ class Job extends Component {
3800
3800
  })));
3801
3801
  }
3802
3802
  return /*#__PURE__*/React.createElement(Components$3.Popup, {
3803
- title: "".concat(this.state.editingNote ? 'Edit' : 'Add', " Note"),
3803
+ title: "".concat(this.state.editingNote ? "Edit" : "Add", " Note"),
3804
3804
  onClose: this.onCloseAddNote,
3805
3805
  maxWidth: 600,
3806
3806
  hasPadding: true,
3807
3807
  buttons: [{
3808
- type: 'primary',
3808
+ type: "primary",
3809
3809
  onClick: this.onConfirmAddNote,
3810
3810
  isActive: this.isReadyToSaveNote(),
3811
- text: 'Save'
3811
+ text: "Save"
3812
3812
  }, {
3813
- type: 'tertiary',
3813
+ type: "tertiary",
3814
3814
  onClick: this.onCloseAddNote,
3815
3815
  isActive: true,
3816
- text: 'Cancel'
3816
+ text: "Cancel"
3817
3817
  }]
3818
3818
  }, /*#__PURE__*/React.createElement(Components$3.GenericInput, {
3819
3819
  id: "noteInput",
@@ -3915,15 +3915,15 @@ class Job extends Component {
3915
3915
  maxWidth: 600,
3916
3916
  hasPadding: true,
3917
3917
  buttons: [{
3918
- type: 'primary',
3918
+ type: "primary",
3919
3919
  onClick: this.onConfirmAssignee,
3920
3920
  isActive: !!this.state.selectedAssignee,
3921
- text: 'Confirm'
3921
+ text: "Confirm"
3922
3922
  }, {
3923
- type: 'tertiary',
3923
+ type: "tertiary",
3924
3924
  onClick: this.onCloseSelectAssignee,
3925
3925
  isActive: true,
3926
- text: 'Cancel'
3926
+ text: "Cancel"
3927
3927
  }]
3928
3928
  }, this.renderUsers());
3929
3929
  }
@@ -3989,13 +3989,13 @@ class AddJob extends Component {
3989
3989
  this.checkSetImages(this.imageInput, res.data.images);
3990
3990
  if (customFields) {
3991
3991
  customFields.forEach((field, index) => {
3992
- if (field.type === 'image' && field.answer) {
3992
+ if (field.type === "image" && field.answer) {
3993
3993
  this.checkSetImages(this.customImageInputs[index], field.answer);
3994
3994
  }
3995
3995
  });
3996
3996
  }
3997
3997
  } catch (error) {
3998
- console.error('getJob', error);
3998
+ console.error("getJob", error);
3999
3999
  }
4000
4000
  });
4001
4001
  _defineProperty(this, "getJobTypes", async () => {
@@ -4006,7 +4006,7 @@ class AddJob extends Component {
4006
4006
  });
4007
4007
  this.getDefaultJob();
4008
4008
  } catch (error) {
4009
- console.error('getJobTypes', error);
4009
+ console.error("getJobTypes", error);
4010
4010
  }
4011
4011
  });
4012
4012
  _defineProperty(this, "getUsers", async () => {
@@ -4016,16 +4016,16 @@ class AddJob extends Component {
4016
4016
  if (res.data != null && !_.isEmpty(res.data.results.Items)) {
4017
4017
  let items = res.data.results.Items;
4018
4018
  if (this.props.optionOnlyForResidents) {
4019
- items = _.filter(items, u => u.category === 'resident');
4019
+ items = _.filter(items, u => u.category === "resident");
4020
4020
  }
4021
4021
  this.setState({
4022
4022
  users: _.sortBy(items, u => {
4023
- return (u.displayName || '').toLowerCase();
4023
+ return (u.displayName || "").toLowerCase();
4024
4024
  })
4025
4025
  });
4026
4026
  }
4027
4027
  } catch (error) {
4028
- console.error('getUsers', error);
4028
+ console.error("getUsers", error);
4029
4029
  }
4030
4030
  });
4031
4031
  _defineProperty(this, "getDefaultJob", () => {
@@ -4042,7 +4042,7 @@ class AddJob extends Component {
4042
4042
  });
4043
4043
  } else {
4044
4044
  this.setState({
4045
- type: 'General'
4045
+ type: "General"
4046
4046
  });
4047
4047
  }
4048
4048
  }
@@ -4060,14 +4060,14 @@ class AddJob extends Component {
4060
4060
  type: selectedType.typeName,
4061
4061
  customFields: hasPrevCustomFields ? prevCustomFileds : selectedType.hasCustomFields ? selectedType.customFields : []
4062
4062
  };
4063
- if (!_.isEmpty(update.customFields) && !_.some(update.customFields, 'isTitle')) {
4064
- update.title = this.state.selectedUser ? this.state.selectedUser.displayName : '';
4063
+ if (!_.isEmpty(update.customFields) && !_.some(update.customFields, "isTitle")) {
4064
+ update.title = this.state.selectedUser ? this.state.selectedUser.displayName : "";
4065
4065
  }
4066
4066
  this.setState(update);
4067
4067
  });
4068
4068
  _defineProperty(this, "onHandleChange", event => {
4069
4069
  var stateChange = {};
4070
- stateChange[event.target.getAttribute('id')] = event.target.value;
4070
+ stateChange[event.target.getAttribute("id")] = event.target.value;
4071
4071
  this.setState(stateChange);
4072
4072
  });
4073
4073
  _defineProperty(this, "onOpenUserSelector", () => {
@@ -4087,7 +4087,7 @@ class AddJob extends Component {
4087
4087
  userName: user.displayName,
4088
4088
  userFilterOpen: false
4089
4089
  };
4090
- if (!_.isEmpty(this.state.customFields) && !_.some(this.state.customFields, 'isTitle')) {
4090
+ if (!_.isEmpty(this.state.customFields) && !_.some(this.state.customFields, "isTitle")) {
4091
4091
  update.title = user.displayName;
4092
4092
  }
4093
4093
 
@@ -4115,19 +4115,19 @@ class AddJob extends Component {
4115
4115
  }).catch(error => {
4116
4116
  // Permission denied (403) or other error - continue without auto-population
4117
4117
  // Staff can still create the request, just need to enter contact details manually
4118
- console.log('Could not fetch user details for auto-population:', error);
4118
+ console.log("Could not fetch user details for auto-population:", error);
4119
4119
  });
4120
4120
  });
4121
4121
  _defineProperty(this, "onUnselectUser", () => {
4122
4122
  const update = {
4123
4123
  selectedUser: null,
4124
- userID: '',
4125
- userName: '',
4126
- phone: '',
4127
- room: ''
4124
+ userID: "",
4125
+ userName: "",
4126
+ phone: "",
4127
+ room: ""
4128
4128
  };
4129
- if (!_.isEmpty(this.state.customFields) && !_.some(this.state.customFields, 'isTitle')) {
4130
- update.title = '';
4129
+ if (!_.isEmpty(this.state.customFields) && !_.some(this.state.customFields, "isTitle")) {
4130
+ update.title = "";
4131
4131
  }
4132
4132
  this.setState(update);
4133
4133
  });
@@ -4155,7 +4155,7 @@ class AddJob extends Component {
4155
4155
  };
4156
4156
  const field = update.customFields[qId];
4157
4157
  field.answer = _.xor(field.answer || [], [answer]);
4158
- if (field.isTitle) update.title = field.answer.join(', ');
4158
+ if (field.isTitle) update.title = field.answer.join(", ");
4159
4159
  this.setState(update);
4160
4160
  });
4161
4161
  _defineProperty(this, "onChangeDateAnswer", function (qId, answer) {
@@ -4165,7 +4165,7 @@ class AddJob extends Component {
4165
4165
  };
4166
4166
  const field = update.customFields[qId];
4167
4167
  field.answer = answer;
4168
- if (field.isTitle) update.title = moment(field.answer, 'YYYY-MM-DD').format('DD-MMM-YYYY');
4168
+ if (field.isTitle) update.title = moment(field.answer, "YYYY-MM-DD").format("DD-MMM-YYYY");
4169
4169
  _this.setState(update);
4170
4170
  if (togglePicker) _this.onToggleDatePicker(qId);
4171
4171
  });
@@ -4175,7 +4175,7 @@ class AddJob extends Component {
4175
4175
  };
4176
4176
  const field = update.customFields[qId];
4177
4177
  field.answer = answer;
4178
- if (field.isTitle) update.title = moment(field.answer, 'HH:mm').format('h:mm a');
4178
+ if (field.isTitle) update.title = moment(field.answer, "HH:mm").format("h:mm a");
4179
4179
  this.setState(update);
4180
4180
  });
4181
4181
  _defineProperty(this, "onChangeImageAnswer", (qId, answer) => {
@@ -4202,7 +4202,7 @@ class AddJob extends Component {
4202
4202
  };
4203
4203
  const field = update.customFields[qId];
4204
4204
  const attachments = field.answer || [];
4205
- const [name, ext] = file.name.split('.');
4205
+ const [name, ext] = file.name.split(".");
4206
4206
  const newAttachment = {
4207
4207
  uploading: true,
4208
4208
  name,
@@ -4220,7 +4220,7 @@ class AddJob extends Component {
4220
4220
  delete newAttachment.uploading;
4221
4221
  this.setState(update);
4222
4222
  });
4223
- event.target.value = '';
4223
+ event.target.value = "";
4224
4224
  });
4225
4225
  _defineProperty(this, "onToggleDatePicker", qId => {
4226
4226
  const showDate = _objectSpread$3({}, this.state.showDate);
@@ -4270,7 +4270,7 @@ class AddJob extends Component {
4270
4270
  this.setState({
4271
4271
  updating: false
4272
4272
  });
4273
- alert('Something went wrong with the request. Please try again.');
4273
+ alert("Something went wrong with the request. Please try again.");
4274
4274
  });
4275
4275
  } else {
4276
4276
  // Create New Job
@@ -4284,7 +4284,7 @@ class AddJob extends Component {
4284
4284
  this.setState({
4285
4285
  updating: false
4286
4286
  });
4287
- alert('Something went wrong with the request. Please try again.');
4287
+ alert("Something went wrong with the request. Please try again.");
4288
4288
  });
4289
4289
  }
4290
4290
  });
@@ -4294,15 +4294,15 @@ class AddJob extends Component {
4294
4294
  type,
4295
4295
  answer
4296
4296
  } = field;
4297
- if (['staticTitle', 'staticText'].includes(type)) return true;
4297
+ if (["staticTitle", "staticText"].includes(type)) return true;
4298
4298
  const checkMandatory = () => {
4299
4299
  if (!mandatory) return true;
4300
4300
  switch (type) {
4301
- case 'yn':
4301
+ case "yn":
4302
4302
  return _.isBoolean(answer);
4303
- case 'image':
4304
- case 'document':
4305
- case 'checkbox':
4303
+ case "image":
4304
+ case "document":
4305
+ case "checkbox":
4306
4306
  return _.isArray(answer) && answer.length > 0;
4307
4307
  default:
4308
4308
  return !_.isNil(answer) && !_.isEmpty(answer);
@@ -4311,12 +4311,12 @@ class AddJob extends Component {
4311
4311
  const checkFormat = () => {
4312
4312
  if (_.isNil(answer) || _.isEmpty(answer)) return true;
4313
4313
  switch (type) {
4314
- case 'email':
4314
+ case "email":
4315
4315
  return Helper$1.isEmail(answer);
4316
- case 'date':
4317
- return moment(answer, 'YYYY-MM-DD', true).isValid();
4318
- case 'time':
4319
- return moment(answer, 'HH:mm', true).isValid();
4316
+ case "date":
4317
+ return moment(answer, "YYYY-MM-DD", true).isValid();
4318
+ case "time":
4319
+ return moment(answer, "HH:mm", true).isValid();
4320
4320
  default:
4321
4321
  return true;
4322
4322
  }
@@ -4327,13 +4327,13 @@ class AddJob extends Component {
4327
4327
  _defineProperty(this, "getFieldContainerClass", function () {
4328
4328
  let isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4329
4329
  const showError = _this.state.showWarnings && !isValid;
4330
- return "genericInputContainer ".concat(isValid ? 'genericInput-valid' : '', " ").concat(showError ? 'genericInput-error' : '').trim();
4330
+ return "genericInputContainer ".concat(isValid ? "genericInput-valid" : "", " ").concat(showError ? "genericInput-error" : "").trim();
4331
4331
  });
4332
4332
  this.imageInput = null;
4333
4333
  this.customImageInputs = {};
4334
4334
  this.customDocumentInputs = {};
4335
4335
  this.state = {
4336
- jobId: Helper$1.safeReadParams(this.props, 'jobId') ? this.props.match.params.jobId : null,
4336
+ jobId: Helper$1.safeReadParams(this.props, "jobId") ? this.props.match.params.jobId : null,
4337
4337
  job: null,
4338
4338
  showingSelector: false,
4339
4339
  updating: false,
@@ -4341,21 +4341,21 @@ class AddJob extends Component {
4341
4341
  types: [],
4342
4342
  users: [],
4343
4343
  images: [],
4344
- userSearch: '',
4344
+ userSearch: "",
4345
4345
  userFilterOpen: false,
4346
4346
  selectedUser: null,
4347
4347
  id: null,
4348
- userID: '',
4349
- userName: '',
4350
- room: '',
4351
- phone: '',
4348
+ userID: "",
4349
+ userName: "",
4350
+ room: "",
4351
+ phone: "",
4352
4352
  location: this.props.auth.site,
4353
- title: '',
4354
- description: '',
4353
+ title: "",
4354
+ description: "",
4355
4355
  isHome: false,
4356
- homeText: '',
4357
- prevType: 'General',
4358
- type: 'General',
4356
+ homeText: "",
4357
+ prevType: "General",
4358
+ type: "General",
4359
4359
  image: null,
4360
4360
  thumbnail: null,
4361
4361
  showWarnings: false,
@@ -4377,7 +4377,7 @@ class AddJob extends Component {
4377
4377
  checkSetImages(imageRef, images) {
4378
4378
  if (imageRef) {
4379
4379
  if (!_.isEmpty(images)) {
4380
- imageRef.getWrappedInstance().setValue(images);
4380
+ imageRef.setValue(images);
4381
4381
  }
4382
4382
  } else {
4383
4383
  setTimeout(() => {
@@ -4405,9 +4405,9 @@ class AddJob extends Component {
4405
4405
  if (!this.state.success) return null;
4406
4406
  const title = this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests;
4407
4407
  return /*#__PURE__*/React.createElement(Components$2.SuccessPopup, {
4408
- text: "".concat(values.textEntityName, " has been ").concat(this.state.id != null ? 'edited' : 'added'),
4408
+ text: "".concat(values.textEntityName, " has been ").concat(this.state.id != null ? "edited" : "added"),
4409
4409
  buttons: [{
4410
- type: 'outlined',
4410
+ type: "outlined",
4411
4411
  onClick: () => {
4412
4412
  window.history.back();
4413
4413
  },
@@ -4535,13 +4535,13 @@ class AddJob extends Component {
4535
4535
  label: "Person must be home during work?",
4536
4536
  isActive: this.state.isHome,
4537
4537
  options: [{
4538
- Label: 'No',
4538
+ Label: "No",
4539
4539
  Value: false,
4540
4540
  onChange: () => this.setState({
4541
4541
  isHome: false
4542
4542
  })
4543
4543
  }, {
4544
- Label: 'Yes',
4544
+ Label: "Yes",
4545
4545
  Value: true,
4546
4546
  onChange: () => this.setState({
4547
4547
  isHome: true
@@ -4572,7 +4572,7 @@ class AddJob extends Component {
4572
4572
  }
4573
4573
  renderField(field, fieldId) {
4574
4574
  switch (field.type) {
4575
- case 'yn':
4575
+ case "yn":
4576
4576
  return /*#__PURE__*/React.createElement("div", {
4577
4577
  key: fieldId,
4578
4578
  className: "visitorSignIn_question ".concat(this.getFieldContainerClass(this.isFieldValid(field))),
@@ -4588,16 +4588,16 @@ class AddJob extends Component {
4588
4588
  noHoverHighlight: true,
4589
4589
  highlightColour: this.props.colour,
4590
4590
  options: [{
4591
- Label: 'Yes',
4591
+ Label: "Yes",
4592
4592
  Value: true,
4593
4593
  onChange: this.onChangeToggleAnswer.bind(this, fieldId, true)
4594
4594
  }, {
4595
- Label: 'No',
4595
+ Label: "No",
4596
4596
  Value: false,
4597
4597
  onChange: this.onChangeToggleAnswer.bind(this, fieldId, false)
4598
4598
  }]
4599
4599
  }));
4600
- case 'multichoice':
4600
+ case "multichoice":
4601
4601
  return /*#__PURE__*/React.createElement("div", {
4602
4602
  key: fieldId,
4603
4603
  className: "visitorSignIn_question ".concat(this.getFieldContainerClass(this.isFieldValid(field))),
@@ -4620,14 +4620,14 @@ class AddJob extends Component {
4620
4620
  };
4621
4621
  }),
4622
4622
  rowStyle: {
4623
- flexDirection: 'column'
4623
+ flexDirection: "column"
4624
4624
  },
4625
4625
  buttonStyle: {
4626
- marginTop: '5px',
4627
- marginBottom: '5px'
4626
+ marginTop: "5px",
4627
+ marginBottom: "5px"
4628
4628
  }
4629
4629
  }));
4630
- case 'checkbox':
4630
+ case "checkbox":
4631
4631
  return /*#__PURE__*/React.createElement("div", {
4632
4632
  key: fieldId,
4633
4633
  className: this.getFieldContainerClass(this.isFieldValid(field)),
@@ -4642,7 +4642,7 @@ class AddJob extends Component {
4642
4642
  }, /*#__PURE__*/React.createElement("div", {
4643
4643
  className: "fieldLabel",
4644
4644
  style: {
4645
- marginBottom: '5px',
4645
+ marginBottom: "5px",
4646
4646
  color: this.props.colour
4647
4647
  }
4648
4648
  }, field.label), field.values.map((option, optionIndex) => {
@@ -4655,9 +4655,9 @@ class AddJob extends Component {
4655
4655
  onChange: () => this.onChangeCheckboxAnswer(fieldId, option)
4656
4656
  });
4657
4657
  })));
4658
- case 'text':
4659
- case 'email':
4660
- case 'phone':
4658
+ case "text":
4659
+ case "email":
4660
+ case "phone":
4661
4661
  return /*#__PURE__*/React.createElement("div", {
4662
4662
  key: fieldId
4663
4663
  }, /*#__PURE__*/React.createElement(Components$2.GenericInput, {
@@ -4670,10 +4670,10 @@ class AddJob extends Component {
4670
4670
  isRequired: field.mandatory,
4671
4671
  isValid: () => this.isFieldValid(field),
4672
4672
  showError: () => this.state.showWarnings && !this.isFieldValid(field),
4673
- errorMessage: field.type === 'email' ? 'Not a valid email' : undefined,
4673
+ errorMessage: field.type === "email" ? "Not a valid email" : undefined,
4674
4674
  alwaysShowLabel: true
4675
4675
  }));
4676
- case 'staticTitle':
4676
+ case "staticTitle":
4677
4677
  return /*#__PURE__*/React.createElement("p", {
4678
4678
  className: "visitorSignIn_text-staticTitle",
4679
4679
  style: {
@@ -4681,21 +4681,21 @@ class AddJob extends Component {
4681
4681
  },
4682
4682
  key: fieldId
4683
4683
  }, field.label);
4684
- case 'staticText':
4684
+ case "staticText":
4685
4685
  return /*#__PURE__*/React.createElement("p", {
4686
4686
  className: "visitorSignIn_text-staticText",
4687
4687
  key: fieldId
4688
4688
  }, Helper$1.toParagraphed(field.label, {
4689
4689
  marginTop: 10
4690
4690
  }));
4691
- case 'date':
4691
+ case "date":
4692
4692
  return /*#__PURE__*/React.createElement("div", {
4693
4693
  key: fieldId
4694
4694
  }, /*#__PURE__*/React.createElement(Components$2.GenericInput, {
4695
4695
  id: fieldId,
4696
4696
  label: field.label,
4697
- placeholder: 'DD-MMM-YYYY',
4698
- value: field.answer ? moment(field.answer, 'YYYY-MM-DD').format('DD-MMM-YYYY') : '',
4697
+ placeholder: "DD-MMM-YYYY",
4698
+ value: field.answer ? moment(field.answer, "YYYY-MM-DD").format("DD-MMM-YYYY") : "",
4699
4699
  onClick: e => this.onToggleDatePicker(fieldId),
4700
4700
  isRequired: field.mandatory,
4701
4701
  isValid: () => this.isFieldValid(field),
@@ -4713,14 +4713,14 @@ class AddJob extends Component {
4713
4713
  selectedDate: field.answer,
4714
4714
  selectDate: date => this.onChangeDateAnswer(fieldId, date)
4715
4715
  }));
4716
- case 'time':
4716
+ case "time":
4717
4717
  return /*#__PURE__*/React.createElement("div", {
4718
4718
  key: fieldId
4719
4719
  }, /*#__PURE__*/React.createElement(Components$2.GenericInput, {
4720
4720
  id: fieldId,
4721
4721
  label: field.label,
4722
- placeholder: '--:-- --',
4723
- value: field.answer ? moment(field.answer, 'HH:mm').format('h:mm a') : '',
4722
+ placeholder: "--:-- --",
4723
+ value: field.answer ? moment(field.answer, "HH:mm").format("h:mm a") : "",
4724
4724
  type: "time",
4725
4725
  isRequired: field.mandatory,
4726
4726
  isValid: () => this.isFieldValid(field),
@@ -4733,7 +4733,7 @@ class AddJob extends Component {
4733
4733
  className: "timepicker-condensed",
4734
4734
  callbackFormat: "HH:mm",
4735
4735
  style: {
4736
- width: '100%'
4736
+ width: "100%"
4737
4737
  }
4738
4738
  }),
4739
4739
  rightContent: !_.isEmpty(field.answer) && /*#__PURE__*/React.createElement(Components$2.SVGIcon, {
@@ -4743,7 +4743,7 @@ class AddJob extends Component {
4743
4743
  onClick: () => this.onChangeTimeAnswer(fieldId, undefined)
4744
4744
  })
4745
4745
  }));
4746
- case 'image':
4746
+ case "image":
4747
4747
  return /*#__PURE__*/React.createElement("div", {
4748
4748
  key: fieldId,
4749
4749
  className: this.getFieldContainerClass(this.isFieldValid(field)),
@@ -4763,7 +4763,7 @@ class AddJob extends Component {
4763
4763
  multiple: true,
4764
4764
  refreshCallback: images => this.onChangeImageAnswer(fieldId, images)
4765
4765
  })));
4766
- case 'document':
4766
+ case "document":
4767
4767
  const documents = field.answer || [];
4768
4768
  return /*#__PURE__*/React.createElement("div", {
4769
4769
  key: fieldId,
@@ -4827,7 +4827,7 @@ class AddJob extends Component {
4827
4827
  }, /*#__PURE__*/React.createElement(Components$2.Text, {
4828
4828
  type: "formTitleLarge",
4829
4829
  className: "marginBottom-24"
4830
- }, this.state.infoId == null ? 'New' : 'Edit', " ", values.textSingularName), this.renderSelectUser(), /*#__PURE__*/React.createElement(Components$2.GenericInput, {
4830
+ }, this.state.infoId == null ? "New" : "Edit", " ", values.textSingularName), this.renderSelectUser(), /*#__PURE__*/React.createElement(Components$2.GenericInput, {
4831
4831
  id: "phone",
4832
4832
  type: "text",
4833
4833
  label: "Contact number",
@@ -4884,10 +4884,10 @@ class AddJob extends Component {
4884
4884
  hasPadding: true,
4885
4885
  onClose: this.onCloseUserSelector,
4886
4886
  buttons: [{
4887
- type: 'tertiary',
4887
+ type: "tertiary",
4888
4888
  onClick: this.onCloseUserSelector,
4889
4889
  isActive: true,
4890
- text: 'Cancel'
4890
+ text: "Cancel"
4891
4891
  }]
4892
4892
  }, /*#__PURE__*/React.createElement(Components$2.GenericInput, {
4893
4893
  id: "userSearch",
@@ -4921,16 +4921,16 @@ class AddJob extends Component {
4921
4921
  }
4922
4922
  const styles$4 = {
4923
4923
  userLabelContainer: {
4924
- display: 'flex',
4925
- flexDirection: 'row',
4926
- alignItems: 'center',
4924
+ display: "flex",
4925
+ flexDirection: "row",
4926
+ alignItems: "center",
4927
4927
  marginBottom: 0,
4928
- justifyContent: 'space-between'
4928
+ justifyContent: "space-between"
4929
4929
  },
4930
4930
  fieldContainer: {
4931
- display: 'flex',
4932
- flexDirection: 'row',
4933
- alignItems: 'center'
4931
+ display: "flex",
4932
+ flexDirection: "row",
4933
+ alignItems: "center"
4934
4934
  }
4935
4935
  };
4936
4936
  const mapStateToProps$2 = state => {