@plusscommunities/pluss-maintenance-app-forms 6.0.10 → 6.0.11-auth.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.
Files changed (106) hide show
  1. package/dist/module/actions/JobActions.js +44 -1
  2. package/dist/module/actions/JobActions.js.map +1 -1
  3. package/dist/module/actions/index.js +1 -1
  4. package/dist/module/actions/index.js.map +1 -1
  5. package/dist/module/actions/types.js +4 -1
  6. package/dist/module/actions/types.js.map +1 -1
  7. package/dist/module/apis/index.js +4 -1
  8. package/dist/module/apis/index.js.map +1 -1
  9. package/dist/module/apis/maintenanceActions.js +61 -38
  10. package/dist/module/apis/maintenanceActions.js.map +1 -1
  11. package/dist/module/apis/userActions.js +23 -0
  12. package/dist/module/apis/userActions.js.map +1 -0
  13. package/dist/module/components/FilterPopupMenu.js +82 -58
  14. package/dist/module/components/FilterPopupMenu.js.map +1 -1
  15. package/dist/module/components/MaintenanceList.js +84 -92
  16. package/dist/module/components/MaintenanceList.js.map +1 -1
  17. package/dist/module/components/MaintenanceListItem.js +94 -80
  18. package/dist/module/components/MaintenanceListItem.js.map +1 -1
  19. package/dist/module/components/MaintenanceWidgetItem.js +39 -38
  20. package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
  21. package/dist/module/components/PrioritySelectorPopup.js +83 -0
  22. package/dist/module/components/PrioritySelectorPopup.js.map +1 -0
  23. package/dist/module/components/StatusSelectorPopup.js +23 -27
  24. package/dist/module/components/StatusSelectorPopup.js.map +1 -1
  25. package/dist/module/components/WidgetLarge.js +2 -2
  26. package/dist/module/components/WidgetLarge.js.map +1 -1
  27. package/dist/module/components/WidgetSmall.js +25 -20
  28. package/dist/module/components/WidgetSmall.js.map +1 -1
  29. package/dist/module/core.config.js +2 -3
  30. package/dist/module/core.config.js.map +1 -1
  31. package/dist/module/feature.config.js +17 -17
  32. package/dist/module/feature.config.js.map +1 -1
  33. package/dist/module/helper.js +41 -26
  34. package/dist/module/helper.js.map +1 -1
  35. package/dist/module/index.js +12 -10
  36. package/dist/module/index.js.map +1 -1
  37. package/dist/module/reducers/JobsReducer.js +36 -6
  38. package/dist/module/reducers/JobsReducer.js.map +1 -1
  39. package/dist/module/screens/JobTypePicker.js +18 -17
  40. package/dist/module/screens/JobTypePicker.js.map +1 -1
  41. package/dist/module/screens/MaintenancePage.js +10 -10
  42. package/dist/module/screens/MaintenancePage.js.map +1 -1
  43. package/dist/module/screens/MaintenanceUserPicker.js +219 -0
  44. package/dist/module/screens/MaintenanceUserPicker.js.map +1 -0
  45. package/dist/module/screens/RequestDetail.js +410 -142
  46. package/dist/module/screens/RequestDetail.js.map +1 -1
  47. package/dist/module/screens/RequestNotes.js +462 -52
  48. package/dist/module/screens/RequestNotes.js.map +1 -1
  49. package/dist/module/screens/ServiceRequest.js +519 -181
  50. package/dist/module/screens/ServiceRequest.js.map +1 -1
  51. package/dist/module/values.config.a.js +30 -23
  52. package/dist/module/values.config.a.js.map +1 -1
  53. package/dist/module/values.config.default.js +35 -28
  54. package/dist/module/values.config.default.js.map +1 -1
  55. package/dist/module/values.config.enquiry.js +43 -0
  56. package/dist/module/values.config.enquiry.js.map +1 -0
  57. package/dist/module/values.config.feedback.js +43 -0
  58. package/dist/module/values.config.feedback.js.map +1 -0
  59. package/dist/module/values.config.food.js +43 -0
  60. package/dist/module/values.config.food.js.map +1 -0
  61. package/dist/module/values.config.forms.js +35 -28
  62. package/dist/module/values.config.forms.js.map +1 -1
  63. package/dist/module/values.config.js +35 -28
  64. package/dist/module/values.config.js.map +1 -1
  65. package/package.json +55 -51
  66. package/src/actions/JobActions.js +75 -16
  67. package/src/actions/index.js +1 -1
  68. package/src/actions/types.js +4 -1
  69. package/src/apis/index.js +6 -1
  70. package/src/apis/maintenanceActions.js +189 -160
  71. package/src/apis/userActions.js +21 -0
  72. package/src/components/FilterPopupMenu.js +316 -230
  73. package/src/components/MaintenanceList.js +391 -326
  74. package/src/components/MaintenanceListItem.js +348 -274
  75. package/src/components/MaintenanceWidgetItem.js +146 -120
  76. package/src/components/PrioritySelectorPopup.js +93 -0
  77. package/src/components/StatusSelectorPopup.js +82 -76
  78. package/src/components/WidgetLarge.js +5 -5
  79. package/src/components/WidgetSmall.js +154 -131
  80. package/src/core.config.js +25 -3
  81. package/src/feature.config.js +62 -62
  82. package/src/helper.js +67 -30
  83. package/src/index.js +22 -20
  84. package/src/reducers/JobsReducer.js +85 -41
  85. package/src/screens/JobTypePicker.js +116 -92
  86. package/src/screens/MaintenancePage.js +89 -80
  87. package/src/screens/MaintenanceUserPicker.js +233 -0
  88. package/src/screens/RequestDetail.js +1354 -892
  89. package/src/screens/RequestNotes.js +946 -408
  90. package/src/screens/ServiceRequest.js +1808 -1222
  91. package/src/values.config.a.js +33 -26
  92. package/src/values.config.default.js +39 -32
  93. package/src/values.config.enquiry.js +43 -0
  94. package/src/values.config.feedback.js +43 -0
  95. package/src/values.config.food.js +43 -0
  96. package/src/values.config.forms.js +39 -32
  97. package/src/values.config.js +39 -32
  98. package/dist/module/values.config.b.js +0 -30
  99. package/dist/module/values.config.b.js.map +0 -1
  100. package/dist/module/values.config.c.js +0 -30
  101. package/dist/module/values.config.c.js.map +0 -1
  102. package/dist/module/values.config.d.js +0 -30
  103. package/dist/module/values.config.d.js.map +0 -1
  104. package/src/values.config.b.js +0 -30
  105. package/src/values.config.c.js +0 -30
  106. package/src/values.config.d.js +0 -30
@@ -1,20 +1,22 @@
1
1
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- import React, { Component } from 'react';
5
- import { ScrollView, View, StyleSheet, Text, KeyboardAvoidingView, TouchableOpacity, ImageBackground, Platform } from 'react-native';
6
- import DateTimePicker from 'react-native-modal-datetime-picker';
7
- import { Icon } from 'react-native-elements';
8
- import _ from 'lodash';
9
- import moment from 'moment';
10
- import { connect } from 'react-redux';
11
- import { maintenanceActions } from '../apis';
12
- import { jobAdded } from '../actions';
13
- import StatusSelectorPopup from '../components/StatusSelectorPopup';
14
- import { jobStatusOptions, getJobStatusProps } from '../helper';
15
- import { Services } from '../feature.config';
16
- import { Colours, Helper, Components, Config } from '../core.config';
17
- import { values } from '../values.config';
4
+ import React, { Component } from "react";
5
+ import { Text } from "@plusscommunities/pluss-core-app/components";
6
+ import { ScrollView, View, StyleSheet, KeyboardAvoidingView, TouchableOpacity, ImageBackground, Platform } from "react-native";
7
+ import DateTimePicker from "react-native-modal-datetime-picker";
8
+ import { Icon } from "@rneui/themed";
9
+ import _ from "lodash";
10
+ import moment from "moment";
11
+ import { connect } from "react-redux";
12
+ import { maintenanceActions } from "../apis";
13
+ import { jobAdded, jobStatusesUpdate, jobHideSeenUpdate } from "../actions";
14
+ import StatusSelectorPopup from "../components/StatusSelectorPopup";
15
+ import PrioritySelectorPopup from "../components/PrioritySelectorPopup";
16
+ import { getJobStatus, getJobPriority } from "../helper";
17
+ import { Services } from "../feature.config";
18
+ import { Colours, Helper, Components, Config } from "../core.config";
19
+ import { values } from "../values.config";
18
20
  class RequestDetail extends Component {
19
21
  constructor(props) {
20
22
  super(props);
@@ -24,17 +26,20 @@ class RequestDetail extends Component {
24
26
  }, async () => {
25
27
  try {
26
28
  const res = await maintenanceActions.getJob(this.props.job.site, this.props.job.id);
29
+ // console.log('getJob', JSON.stringify(res.data, null, 2));
27
30
  this.props.jobAdded(res.data);
28
31
  this.updateJobState(res.data);
32
+ // Refresh external sync data when job is refreshed
33
+ this.getExternalSync();
29
34
  } catch (error) {
30
- console.log('getJob error', error.toString());
35
+ console.log("getJob error", error.toString());
31
36
  // check for 403 or 404 error
32
37
  if (error.response.status === 403 || error.response.status === 404) {
33
38
  this.setState({
34
39
  forbidden: true
35
40
  });
36
41
  }
37
- console.log('getJob error', error);
42
+ console.log("getJob error", error);
38
43
  } finally {
39
44
  this.setState({
40
45
  loading: false
@@ -50,7 +55,32 @@ class RequestDetail extends Component {
50
55
  assignees: res.data.Users
51
56
  });
52
57
  } catch (error) {
53
- console.log('getAssignees error', error);
58
+ console.log("getAssignees error", error);
59
+ }
60
+ });
61
+ _defineProperty(this, "getExternalSync", async () => {
62
+ var _this$props$job;
63
+ // Only fetch if user has maintenance tracking permission
64
+ if (!this.hasPermission()) return;
65
+ if (!((_this$props$job = this.props.job) !== null && _this$props$job !== void 0 && _this$props$job.id)) return;
66
+ try {
67
+ this.setState({
68
+ loadingExternalSync: true
69
+ });
70
+ const res = await maintenanceActions.getExternalSync(this.props.job.id);
71
+ this.setState({
72
+ externalSync: res.data,
73
+ loadingExternalSync: false
74
+ });
75
+ } catch (error) {
76
+ var _error$response;
77
+ // 404 is expected if no sync - don't show error
78
+ if (((_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) !== 404) {
79
+ console.log("getExternalSync error", error);
80
+ }
81
+ this.setState({
82
+ loadingExternalSync: false
83
+ });
54
84
  }
55
85
  });
56
86
  _defineProperty(this, "markSeen", () => {
@@ -72,7 +102,7 @@ class RequestDetail extends Component {
72
102
  const updated = {
73
103
  id: job.id,
74
104
  seen: true,
75
- status: job.status || 'Unassigned'
105
+ status: job.status || "Unassigned"
76
106
  };
77
107
  const res = await maintenanceActions.editJob(updated, user.site);
78
108
  // console.log('markSeen updated');
@@ -83,7 +113,7 @@ class RequestDetail extends Component {
83
113
  seen: true
84
114
  });
85
115
  } catch (error) {
86
- console.log('markSeen error', error);
116
+ console.log("markSeen error", error);
87
117
  this.setState({
88
118
  loading: false
89
119
  });
@@ -111,7 +141,7 @@ class RequestDetail extends Component {
111
141
  this.props.jobAdded(res.data.job);
112
142
  this.getJob();
113
143
  } catch (error) {
114
- console.log('updateJob error', error);
144
+ console.log("updateJob error", error);
115
145
  } finally {
116
146
  this.setState({
117
147
  loading: false
@@ -128,7 +158,24 @@ class RequestDetail extends Component {
128
158
  this.props.jobAdded(res.data.job);
129
159
  this.getJob();
130
160
  } catch (error) {
131
- console.log('updateJobStatus error', error);
161
+ console.log("updateJobStatus error", error);
162
+ } finally {
163
+ this.setState({
164
+ loading: false
165
+ });
166
+ }
167
+ });
168
+ });
169
+ _defineProperty(this, "updateJobPriority", () => {
170
+ this.setState({
171
+ loading: true
172
+ }, async () => {
173
+ try {
174
+ const res = await maintenanceActions.editJobPriority(this.props.job.id, this.state.priority);
175
+ this.props.jobAdded(res.data.job);
176
+ this.getJob();
177
+ } catch (error) {
178
+ console.log("updateJobPriority error", error);
132
179
  } finally {
133
180
  this.setState({
134
181
  loading: false
@@ -150,6 +197,7 @@ class RequestDetail extends Component {
150
197
  });
151
198
  });
152
199
  _defineProperty(this, "onSelectStatus", status => {
200
+ if (this.state.loading) return;
153
201
  this.setState({
154
202
  status,
155
203
  showStatusPopup: false
@@ -157,6 +205,25 @@ class RequestDetail extends Component {
157
205
  this.updateJobStatus();
158
206
  });
159
207
  });
208
+ _defineProperty(this, "onOpenPriorityPicker", () => {
209
+ this.setState({
210
+ showPriorityPopup: true
211
+ });
212
+ });
213
+ _defineProperty(this, "onClosePriorityPopup", () => {
214
+ this.setState({
215
+ showPriorityPopup: false
216
+ });
217
+ });
218
+ _defineProperty(this, "onSelectPriority", priority => {
219
+ if (this.state.loading) return;
220
+ this.setState({
221
+ priority,
222
+ showPriorityPopup: false
223
+ }, () => {
224
+ this.updateJobPriority();
225
+ });
226
+ });
160
227
  _defineProperty(this, "openStaffNotes", () => {
161
228
  Services.navigation.navigate(values.screenRequestNotes, {
162
229
  job: this.state.job,
@@ -165,7 +232,7 @@ class RequestDetail extends Component {
165
232
  });
166
233
  _defineProperty(this, "onOpenDatePicker", () => {
167
234
  this.setState({
168
- popUpType: 'date',
235
+ popUpType: "date",
169
236
  isDateTimePickerVisible: true
170
237
  });
171
238
  });
@@ -175,11 +242,11 @@ class RequestDetail extends Component {
175
242
  });
176
243
  });
177
244
  _defineProperty(this, "onDateSelected", date => {
178
- if (this.state.popUpType === 'date') {
245
+ if (this.state.popUpType === "date") {
179
246
  date = moment(date);
180
247
  this.setState({
181
248
  expectedDate: date,
182
- expectedDateText: date.format('DD/MM/YYYY'),
249
+ expectedDateText: date.format("DD/MM/YYYY"),
183
250
  isDateTimePickerVisible: false
184
251
  }, () => {
185
252
  this.updateJob();
@@ -213,7 +280,7 @@ class RequestDetail extends Component {
213
280
  this.props.jobAdded(job.data);
214
281
  this.getJob();
215
282
  } catch (error) {
216
- console.log('onCommentAdded error', error);
283
+ console.log("onCommentAdded error", error);
217
284
  } finally {
218
285
  this.setState({
219
286
  loading: false
@@ -237,7 +304,7 @@ class RequestDetail extends Component {
237
304
  return false;
238
305
  });
239
306
  _defineProperty(this, "toggleFullscreenVideo", url => {
240
- if (typeof url !== 'string') url = '';
307
+ if (typeof url !== "string") url = "";
241
308
  this.setState({
242
309
  showFullscreenVideo: url.length > 0,
243
310
  currentVideoUrl: url
@@ -250,10 +317,10 @@ class RequestDetail extends Component {
250
317
  name: a.displayName
251
318
  };
252
319
  });
253
- Services.navigation.navigate('optionSelector', {
320
+ Services.navigation.navigate("optionSelector", {
254
321
  options,
255
322
  selection: this.state.job.AssigneeId,
256
- title: 'Assign request',
323
+ title: "Assign request",
257
324
  onSelect: this.onSelectAssignee
258
325
  });
259
326
  });
@@ -262,12 +329,12 @@ class RequestDetail extends Component {
262
329
  loading: true
263
330
  }, async () => {
264
331
  try {
265
- console.log('onSelectAssignee', this.props.job.id, assignee.key);
332
+ console.log("onSelectAssignee", this.props.job.id, assignee.key);
266
333
  const res = await maintenanceActions.assignJob(this.props.job.id, assignee.key);
267
334
  this.props.jobAdded(res.data.job);
268
335
  this.getJob();
269
336
  } catch (error) {
270
- console.log('onSelectAssignee error', error);
337
+ console.log("onSelectAssignee error", error);
271
338
  } finally {
272
339
  this.setState({
273
340
  loading: false
@@ -278,29 +345,38 @@ class RequestDetail extends Component {
278
345
  this.state = {
279
346
  job: {},
280
347
  isDateTimePickerVisible: false,
281
- popUpType: '',
282
- status: '',
348
+ popUpType: "",
349
+ status: "",
350
+ priority: "",
283
351
  expectedDate: null,
284
- expectedDateText: '',
352
+ expectedDateText: "",
285
353
  seen: false,
286
354
  showMore: true,
287
355
  showStatusPopup: false,
356
+ showPriorityPopup: false,
288
357
  loading: false,
289
358
  showFullscreenVideo: false,
290
- currentVideoUrl: '',
359
+ currentVideoUrl: "",
291
360
  galleryOpen: false,
292
361
  galleryImages: [],
293
362
  showMessages: false,
294
- assignees: []
363
+ assignees: [],
364
+ selectedPDF: null,
365
+ externalSync: null,
366
+ loadingExternalSync: false
295
367
  };
296
368
  this.scrollView = /*#__PURE__*/React.createRef();
297
369
  this.commentReply = /*#__PURE__*/React.createRef();
298
370
  this.commentSection = /*#__PURE__*/React.createRef();
371
+ this.imagePopup = /*#__PURE__*/React.createRef();
299
372
  }
300
373
  componentDidMount() {
374
+ this.props.jobStatusesUpdate(this.props.job.site);
375
+ this.props.jobHideSeenUpdate(this.props.job.site);
301
376
  this.getJob();
302
377
  this.updateJobState(this.props.job);
303
378
  this.getAssignees();
379
+ this.getExternalSync();
304
380
  }
305
381
  updateJobState(defaultJob) {
306
382
  const job = _.find(this.props.jobs, j => j.id === this.props.job.id) || defaultJob;
@@ -314,13 +390,20 @@ class RequestDetail extends Component {
314
390
  };
315
391
  if (job.expectedDate) {
316
392
  newState.expectedDate = moment(job.expectedDate);
317
- newState.expectedDateText = newState.expectedDate.format('DD/MM/YYYY');
393
+ newState.expectedDateText = newState.expectedDate.format("DD/MM/YYYY");
318
394
  }
319
395
  if (job.seen) newState.seen = job.seen;
320
396
  this.setState(newState, () => {
321
397
  this.markSeen();
322
398
  });
323
399
  }
400
+ openGallery(galleryImages, index) {
401
+ this.setState({
402
+ galleryOpen: true,
403
+ galleryImages
404
+ });
405
+ this.imagePopup.current.scrollTo(index);
406
+ }
324
407
  openGallery(galleryImages, index) {
325
408
  this.setState({
326
409
  galleryOpen: true,
@@ -343,12 +426,11 @@ class RequestDetail extends Component {
343
426
  status,
344
427
  job
345
428
  } = this.state;
346
- const {
347
- statusText,
348
- statusColor
349
- } = getJobStatusProps(status);
429
+ const statusOption = getJobStatus(status, this.props);
430
+ const priority = getJobPriority(job.priority);
350
431
  const canEdit = this.hasPermission();
351
- const showSeen = !status || status === jobStatusOptions[0].name;
432
+ const isStaff = this.props.user.category === "staff";
433
+ const showSeen = !status || status === getJobStatus(null, this.props).text;
352
434
  return /*#__PURE__*/React.createElement(View, {
353
435
  style: {
354
436
  ...Helper.getShadowStyle()
@@ -372,7 +454,7 @@ class RequestDetail extends Component {
372
454
  color: this.props.colourBrandingMain
373
455
  }],
374
456
  numberOfLines: 2
375
- }, job.type)), showSeen && this.state.seen && /*#__PURE__*/React.createElement(View, {
457
+ }, job.type)), !this.props.hideSeen && showSeen && this.state.seen && /*#__PURE__*/React.createElement(View, {
376
458
  style: styles.jobSeenContainer
377
459
  }, /*#__PURE__*/React.createElement(Icon, {
378
460
  name: "check",
@@ -392,7 +474,9 @@ class RequestDetail extends Component {
392
474
  style: styles.textSectionTextContainer
393
475
  }, /*#__PURE__*/React.createElement(Text, {
394
476
  style: styles.textSectionText
395
- }, moment(job.lastActivityUnix).format('ddd D MMMM, h:mm A'))))), /*#__PURE__*/React.createElement(View, {
477
+ }, moment(job.lastActivityUnix).format("ddd D MMMM, h:mm A"))))), /*#__PURE__*/React.createElement(View, {
478
+ style: styles.jobInfoContainer
479
+ }, /*#__PURE__*/React.createElement(View, {
396
480
  style: styles.jobStatusExpectedContainer
397
481
  }, /*#__PURE__*/React.createElement(View, {
398
482
  style: styles.jobStatusOuterContainer
@@ -402,11 +486,11 @@ class RequestDetail extends Component {
402
486
  onPress: canEdit ? this.onOpenStatusPicker : null
403
487
  }, /*#__PURE__*/React.createElement(View, {
404
488
  style: [styles.jobStatusContainer, {
405
- backgroundColor: statusColor
489
+ backgroundColor: statusOption.color
406
490
  }]
407
491
  }, /*#__PURE__*/React.createElement(Text, {
408
492
  style: styles.jobStatusText
409
- }, statusText)))), this.hasPermission() && /*#__PURE__*/React.createElement(View, {
493
+ }, statusOption === null || statusOption === void 0 ? void 0 : statusOption.text)))), this.hasPermission() && /*#__PURE__*/React.createElement(View, {
410
494
  style: styles.jobStatusOuterContainer
411
495
  }, /*#__PURE__*/React.createElement(Text, {
412
496
  style: styles.jobStatusHeading
@@ -422,7 +506,19 @@ class RequestDetail extends Component {
422
506
  iconStyle: styles.jobStatusIcon
423
507
  }), /*#__PURE__*/React.createElement(Text, {
424
508
  style: styles.jobStatusText
425
- }, "Notes (", (job.Notes || []).length, ")"))))));
509
+ }, "Notes (", (job.Notes || []).length, ")"))))), isStaff && /*#__PURE__*/React.createElement(View, {
510
+ style: styles.jobPriorityOuterContainer
511
+ }, /*#__PURE__*/React.createElement(Text, {
512
+ style: styles.jobStatusHeading
513
+ }, "PRIORITY"), /*#__PURE__*/React.createElement(TouchableOpacity, {
514
+ onPress: canEdit ? this.onOpenPriorityPicker : null
515
+ }, /*#__PURE__*/React.createElement(View, {
516
+ style: [styles.jobStatusContainer, {
517
+ backgroundColor: priority.color
518
+ }]
519
+ }, /*#__PURE__*/React.createElement(Text, {
520
+ style: styles.jobStatusText
521
+ }, priority.label))))));
426
522
  }
427
523
  renderPlayableImageUrl(images, index, containerStyle, showMore) {
428
524
  const url = images[index || 0];
@@ -479,12 +575,49 @@ class RequestDetail extends Component {
479
575
  }
480
576
  return null;
481
577
  }
578
+ renderDocument(documents) {
579
+ const {
580
+ colourBrandingMain
581
+ } = this.props;
582
+ if (!_.isNil(documents) && !_.isEmpty(documents)) {
583
+ return documents.map((document, index) => {
584
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
585
+ key: index,
586
+ style: styles.documentContainer,
587
+ onPress: () => this.setState({
588
+ selectedPDF: document
589
+ })
590
+ }, /*#__PURE__*/React.createElement(View, {
591
+ style: {
592
+ ...styles.documentTypeContainer,
593
+ backgroundColor: colourBrandingMain
594
+ }
595
+ }, /*#__PURE__*/React.createElement(Text, {
596
+ style: styles.documentTypeText
597
+ }, document.ext)), /*#__PURE__*/React.createElement(Text, {
598
+ style: styles.documentText
599
+ }, `${document.name}${document.uploading ? ` - ${document.uploadProgress}` : ""}`));
600
+ });
601
+ }
602
+ return null;
603
+ }
482
604
  renderImagePopup() {
483
605
  return /*#__PURE__*/React.createElement(Components.ImagePopup, {
484
606
  visible: this.state.galleryOpen,
485
607
  images: this.state.galleryImages,
486
608
  onClose: this.closeGallery.bind(this),
487
- ref: "imagePopup"
609
+ ref: this.imagePopup
610
+ });
611
+ }
612
+ renderDocumentPopup() {
613
+ if (_.isEmpty(this.state.selectedPDF)) return null;
614
+ return /*#__PURE__*/React.createElement(Components.PDFPopup, {
615
+ source: this.state.selectedPDF.url,
616
+ onClose: () => this.setState({
617
+ selectedPDF: null
618
+ }),
619
+ title: this.state.selectedPDF.name,
620
+ pdfCount: 1
488
621
  });
489
622
  }
490
623
  renderAssignee() {
@@ -508,13 +641,56 @@ class RequestDetail extends Component {
508
641
  return /*#__PURE__*/React.createElement(Components.FormCardSectionOptionLauncher, {
509
642
  onPress: this.onOpenAssigneePicker,
510
643
  title: "Assigned To",
511
- value: job.Assignee ? job.Assignee.displayName : 'Unassigned',
644
+ value: job.Assignee ? job.Assignee.displayName : "Unassigned",
512
645
  textStyle: styles.detailsText,
513
646
  sectionStyle: styles.detailsSection
514
647
  }, content);
515
648
  }
516
649
  return content;
517
650
  }
651
+ renderExternalSync() {
652
+ const {
653
+ externalSync,
654
+ loadingExternalSync
655
+ } = this.state;
656
+
657
+ // Only show if user has permission and external sync data exists
658
+ if (!this.hasPermission()) return null;
659
+ if (!externalSync || loadingExternalSync) return null;
660
+ return /*#__PURE__*/React.createElement(View, {
661
+ style: [styles.externalSyncContainer, Helper.getShadowStyle()]
662
+ }, /*#__PURE__*/React.createElement(View, {
663
+ style: styles.externalSyncHeader
664
+ }, /*#__PURE__*/React.createElement(Text, {
665
+ style: styles.externalSyncTitle
666
+ }, "External Sync"), /*#__PURE__*/React.createElement(Icon, {
667
+ name: "sync",
668
+ type: "material",
669
+ iconStyle: [styles.externalSyncIcon, {
670
+ color: this.props.colourBrandingMain
671
+ }]
672
+ })), /*#__PURE__*/React.createElement(View, {
673
+ style: styles.externalSyncContent
674
+ }, externalSync.systemType && /*#__PURE__*/React.createElement(View, {
675
+ style: styles.externalSyncRow
676
+ }, /*#__PURE__*/React.createElement(Text, {
677
+ style: styles.externalSyncLabel
678
+ }, "System:"), /*#__PURE__*/React.createElement(Text, {
679
+ style: styles.externalSyncValue
680
+ }, externalSync.systemType)), externalSync.externalId && /*#__PURE__*/React.createElement(View, {
681
+ style: styles.externalSyncRow
682
+ }, /*#__PURE__*/React.createElement(Text, {
683
+ style: styles.externalSyncLabel
684
+ }, "External ID:"), /*#__PURE__*/React.createElement(Text, {
685
+ style: styles.externalSyncValue
686
+ }, externalSync.externalId)), externalSync.syncedAt && /*#__PURE__*/React.createElement(View, {
687
+ style: styles.externalSyncRow
688
+ }, /*#__PURE__*/React.createElement(Text, {
689
+ style: styles.externalSyncLabel
690
+ }, "Synced:"), /*#__PURE__*/React.createElement(Text, {
691
+ style: styles.externalSyncValue
692
+ }, moment(externalSync.syncedAt).format("D MMM YYYY h:mma")))));
693
+ }
518
694
  renderCustomFields() {
519
695
  const {
520
696
  job
@@ -524,28 +700,30 @@ class RequestDetail extends Component {
524
700
  } = job;
525
701
  const renderAnswer = field => {
526
702
  switch (field.type) {
527
- case 'date':
703
+ case "date":
528
704
  return /*#__PURE__*/React.createElement(Text, {
529
705
  style: styles.customText
530
- }, field.answer ? moment(field.answer, 'YYYY-MM-DD').format('DD MMM YYYY') : '');
531
- case 'time':
706
+ }, field.answer ? moment(field.answer, "YYYY-MM-DD").format("DD MMM YYYY") : "");
707
+ case "time":
532
708
  return /*#__PURE__*/React.createElement(Text, {
533
709
  style: styles.customText
534
- }, field.answer ? moment(field.answer, 'HH:mm').format('h:mm a') : '');
535
- case 'yn':
710
+ }, field.answer ? moment(field.answer, "HH:mm").format("h:mm a") : "");
711
+ case "yn":
536
712
  return /*#__PURE__*/React.createElement(Text, {
537
713
  style: styles.customText
538
- }, field.answer ? 'Yes' : 'No');
539
- case 'checkbox':
714
+ }, field.answer ? "Yes" : "No");
715
+ case "checkbox":
540
716
  return /*#__PURE__*/React.createElement(Text, {
541
717
  style: styles.customText
542
- }, field.answer && Array.isArray(field.answer) ? field.answer.join(', ') : '');
543
- case 'image':
718
+ }, field.answer && Array.isArray(field.answer) ? field.answer.join(", ") : "");
719
+ case "image":
544
720
  return /*#__PURE__*/React.createElement(View, {
545
- style: {
546
- marginTop: 8
547
- }
721
+ style: styles.customImage
548
722
  }, this.renderImage(field.answer));
723
+ case "document":
724
+ return /*#__PURE__*/React.createElement(View, {
725
+ style: styles.customDocument
726
+ }, this.renderDocument(field.answer));
549
727
  default:
550
728
  return /*#__PURE__*/React.createElement(Text, {
551
729
  style: styles.customText
@@ -553,8 +731,8 @@ class RequestDetail extends Component {
553
731
  }
554
732
  };
555
733
  return customFields.map((field, index) => {
556
- if (['staticTitle', 'staticText'].includes(field.type)) return null;
557
- if (_.isNil(field.answer) || field.answer === '' || Array.isArray(field.answer) && field.answer.length === 0) return null;
734
+ if (["staticTitle", "staticText"].includes(field.type)) return null;
735
+ if (_.isNil(field.answer) || field.answer === "" || Array.isArray(field.answer) && field.answer.length === 0) return null;
558
736
  return /*#__PURE__*/React.createElement(View, {
559
737
  key: index
560
738
  }, /*#__PURE__*/React.createElement(Text, {
@@ -573,11 +751,10 @@ class RequestDetail extends Component {
573
751
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Components.FormCardSectionOptionLauncher, {
574
752
  onPress: this.onToggleDetails,
575
753
  title: "Details",
576
- icon: this.state.showMore ? 'angle-up' : 'angle-down',
754
+ icon: this.state.showMore ? "angle-up" : "angle-down",
577
755
  textStyle: styles.detailsText,
578
756
  sectionStyle: styles.detailsSection
579
757
  }), this.state.showMore && /*#__PURE__*/React.createElement(View, null, hasCustomFields ? this.renderCustomFields() : null, !hasCustomFields ? /*#__PURE__*/React.createElement(React.Fragment, null, this.renderImage(job.images, job.image), !_.isEmpty(job.description) && /*#__PURE__*/React.createElement(Text, {
580
- numberOfLines: 10,
581
758
  style: styles.jobDescriptionText
582
759
  }, job.description)) : null, /*#__PURE__*/React.createElement(Text, {
583
760
  style: styles.locationLabel
@@ -602,7 +779,7 @@ class RequestDetail extends Component {
602
779
  style: styles.nameText
603
780
  }, job.userName), !_.isEmpty(job.phone) && /*#__PURE__*/React.createElement(Text, {
604
781
  style: styles.phoneText
605
- }, job.phone)))));
782
+ }, job.phone))), this.renderExternalSync()));
606
783
  }
607
784
  renderMessages() {
608
785
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Components.CommentSection, {
@@ -610,13 +787,13 @@ class RequestDetail extends Component {
610
787
  commentReply: this.commentReply,
611
788
  scrollView: this.scrollView,
612
789
  adminPermission: values.permissionMaintenanceTracking,
613
- entityType: values.featureKey,
790
+ entityType: values.commentKey,
614
791
  entityId: this.props.job.id,
615
792
  entityName: this.props.job.title,
616
793
  site: this.state.job.site || this.state.job.location,
617
794
  live: true,
618
795
  refreshFrequency: 10000,
619
- placeHolder: '',
796
+ placeHolder: "",
620
797
  style: {
621
798
  flex: 1,
622
799
  paddingHorizontal: 0,
@@ -636,7 +813,7 @@ class RequestDetail extends Component {
636
813
  height: 36
637
814
  },
638
815
  textStyle: {
639
- color: '#fff'
816
+ color: "#fff"
640
817
  },
641
818
  fullWidth: true
642
819
  }, "Leave Message"));
@@ -647,7 +824,7 @@ class RequestDetail extends Component {
647
824
  ref: this.commentReply,
648
825
  commentSection: this.commentSection,
649
826
  scrollView: this.scrollView,
650
- entityType: values.featureKey,
827
+ entityType: values.commentKey,
651
828
  entityId: this.props.job.id,
652
829
  entityName: this.props.job.title,
653
830
  site: this.state.job.site || this.state.job.location
@@ -662,12 +839,19 @@ class RequestDetail extends Component {
662
839
  onSelect: this.onSelectStatus
663
840
  });
664
841
  }
842
+ renderPriorityPopup() {
843
+ if (!this.state.showPriorityPopup) return null;
844
+ return /*#__PURE__*/React.createElement(PrioritySelectorPopup, {
845
+ onClose: this.onClosePriorityPopup,
846
+ onSelect: this.onSelectPriority
847
+ });
848
+ }
665
849
  render() {
666
850
  if (this.state.forbidden) {
667
851
  return /*#__PURE__*/React.createElement(Components.Forbidden, null);
668
852
  }
669
853
  return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
670
- behavior: Platform.OS === 'ios' && 'padding',
854
+ behavior: "padding",
671
855
  style: styles.container
672
856
  }, /*#__PURE__*/React.createElement(Components.Header, {
673
857
  leftIcon: "angle-left",
@@ -679,23 +863,24 @@ class RequestDetail extends Component {
679
863
  paddingBottom: 26
680
864
  },
681
865
  style: {
682
- height: '100%'
866
+ height: "100%"
683
867
  }
684
868
  }, /*#__PURE__*/React.createElement(View, {
685
869
  style: styles.innerContainer
686
- }, this.renderTop(), this.renderAssignee(), this.rendeDetails(), this.renderMessages())), this.renderMessagesReply(), this.renderStatusPopup(), this.renderImagePopup(), /*#__PURE__*/React.createElement(DateTimePicker, {
870
+ }, this.renderTop(), this.renderAssignee(), this.rendeDetails(), this.renderMessages())), this.renderMessagesReply(), this.renderStatusPopup(), this.renderPriorityPopup(), this.renderImagePopup(), this.renderDocumentPopup(), /*#__PURE__*/React.createElement(DateTimePicker, {
687
871
  isVisible: this.state.isDateTimePickerVisible,
688
872
  onConfirm: this.onDateSelected,
689
873
  onCancel: this.onCloseDatePicker,
690
874
  mode: this.state.popUpType,
691
- headerTextIOS: `Pick a ${this.state.popUpType}`
875
+ headerTextIOS: `Pick a ${this.state.popUpType}`,
876
+ date: new Date()
692
877
  }));
693
878
  }
694
879
  }
695
880
  const styles = StyleSheet.create({
696
881
  container: {
697
882
  flex: 1,
698
- backgroundColor: '#fff'
883
+ backgroundColor: "#fff"
699
884
  },
700
885
  innerContainer: {
701
886
  paddingTop: 23,
@@ -706,108 +891,113 @@ const styles = StyleSheet.create({
706
891
  paddingHorizontal: 12
707
892
  },
708
893
  jobIdText: {
709
- fontFamily: 'sf-medium',
894
+ fontFamily: "sf-medium",
710
895
  fontSize: 12,
711
896
  marginBottom: 4
712
897
  },
713
898
  jobTitleText: {
714
- fontFamily: 'sf-semibold',
899
+ fontFamily: "sf-semibold",
715
900
  fontSize: 20,
716
901
  color: Colours.TEXT_DARKEST,
717
902
  marginBottom: 8
718
903
  },
719
904
  jobTypeSeenContainer: {
720
- flexDirection: 'row',
721
- alignItems: 'center'
905
+ flexDirection: "row",
906
+ alignItems: "center"
722
907
  },
723
908
  jobTypeContainer: {
724
909
  padding: 4,
725
910
  minWidth: 80,
726
911
  maxWidth: 140,
727
912
  borderRadius: 4,
728
- justifyContent: 'center'
913
+ justifyContent: "center"
729
914
  },
730
915
  jobTypeText: {
731
- fontFamily: 'sf-semibold',
916
+ fontFamily: "sf-semibold",
732
917
  fontSize: 12,
733
- textAlign: 'center',
734
- maxWidth: '100%'
918
+ textAlign: "center",
919
+ maxWidth: "100%"
735
920
  },
736
921
  jobSeenContainer: {
737
- flexDirection: 'row',
738
- alignItems: 'center',
922
+ flexDirection: "row",
923
+ alignItems: "center",
739
924
  marginLeft: 10
740
925
  },
741
926
  jobSeenIcon: {
742
927
  fontSize: 12
743
928
  },
744
929
  jobSeenText: {
745
- fontFamily: 'sf-semibold',
930
+ fontFamily: "sf-semibold",
746
931
  fontSize: 12,
747
932
  marginLeft: 4
748
933
  },
749
934
  jobStatusDateText: {
750
935
  marginTop: 8,
751
- fontFamily: 'sf-medium',
936
+ fontFamily: "sf-medium",
752
937
  fontSize: 13,
753
938
  color: Colours.TEXT_LIGHT
754
939
  },
755
- jobStatusExpectedContainer: {
756
- flexDirection: 'row',
757
- alignItems: 'flex-start',
758
- justifyContent: 'space-between',
940
+ jobInfoContainer: {
759
941
  borderTopWidth: 1,
760
942
  borderTopColor: Colours.LINEGREY,
761
943
  paddingVertical: 14,
762
944
  paddingHorizontal: 12
763
945
  },
946
+ jobStatusExpectedContainer: {
947
+ flexDirection: "row",
948
+ alignItems: "flex-start",
949
+ justifyContent: "space-between"
950
+ },
764
951
  jobStatusOuterContainer: {
765
952
  // marginRight: 50,
766
953
  },
767
954
  jobStatusHeading: {
768
- fontFamily: 'sf-bold',
955
+ fontFamily: "sf-bold",
769
956
  fontSize: 11,
770
957
  letterSpacing: 0.8,
771
958
  color: Colours.TEXT_DARK,
772
959
  marginBottom: 6
773
960
  },
774
961
  jobStatusContainer: {
775
- flexDirection: 'row',
776
- alignItems: 'center',
962
+ flexDirection: "row",
963
+ alignItems: "center",
777
964
  width: 120,
778
965
  height: 30,
779
966
  paddingHorizontal: 8,
780
967
  borderRadius: 4
781
968
  },
782
969
  jobStatusIcon: {
783
- color: '#fff',
970
+ color: "#fff",
784
971
  fontSize: 14,
785
972
  marginRight: 8
786
973
  },
787
974
  jobStatusText: {
788
- color: '#fff',
789
- textAlign: 'center',
790
- fontFamily: 'sf-semibold',
975
+ color: "#fff",
976
+ textAlign: "center",
977
+ fontFamily: "sf-semibold",
791
978
  fontSize: 13,
792
979
  flex: 1,
793
- textAlign: 'center'
980
+ textAlign: "center"
981
+ },
982
+ jobPriorityOuterContainer: {
983
+ marginTop: 12
794
984
  },
795
985
  jobExpectedDateContainer: {
796
986
  backgroundColor: Colours.BOXGREY,
797
- flexDirection: 'row',
987
+ flexDirection: "row",
798
988
  width: 115,
799
989
  height: 30,
800
990
  borderRadius: 4,
801
- alignItems: 'center',
991
+ alignItems: "center",
802
992
  paddingLeft: 8
803
993
  },
804
994
  jobExpectedDate: {
805
- fontFamily: 'sf-regular',
995
+ fontFamily: "sf-regular",
806
996
  fontSize: 13,
807
997
  color: Colours.hexToRGBAstring(Colours.TEXT_DARKEST, 0.5)
808
998
  },
809
999
  detailsText: {
810
- fontFamily: 'sf-semibold',
1000
+ fontFamily: "sf-semibold",
811
1001
  fontSize: 16,
812
1002
  color: Colours.TEXT_DARKEST
813
1003
  },
@@ -818,55 +1008,55 @@ const styles = StyleSheet.create({
818
1008
  },
819
1009
  sideBySideImages: {
820
1010
  flex: 1,
821
- flexDirection: 'row',
822
- justifyContent: 'space-between',
1011
+ flexDirection: "row",
1012
+ justifyContent: "space-between",
823
1013
  marginBottom: 16
824
1014
  },
825
1015
  sideBySideImageContainer: {
826
- backgroundColor: '#fff',
827
- width: '48%',
1016
+ backgroundColor: "#fff",
1017
+ width: "48%",
828
1018
  height: 150,
829
1019
  borderRadius: 2,
830
- overflow: 'hidden'
1020
+ overflow: "hidden"
831
1021
  },
832
1022
  singleImageContainer: {
833
- backgroundColor: '#fff',
834
- width: '100%',
1023
+ backgroundColor: "#fff",
1024
+ width: "100%",
835
1025
  height: 150,
836
1026
  flex: 1,
837
1027
  borderRadius: 2,
838
- overflow: 'hidden',
1028
+ overflow: "hidden",
839
1029
  marginBottom: 16
840
1030
  },
841
1031
  imageContainer: {
842
1032
  height: 150,
843
- width: 'auto',
844
- justifyContent: 'center'
1033
+ width: "auto",
1034
+ justifyContent: "center"
845
1035
  },
846
1036
  imagePlayContainer: {
847
- position: 'absolute',
1037
+ position: "absolute",
848
1038
  top: 0,
849
1039
  left: 0,
850
1040
  right: 0,
851
1041
  bottom: 0,
852
- alignItems: 'center',
853
- justifyContent: 'center'
1042
+ alignItems: "center",
1043
+ justifyContent: "center"
854
1044
  },
855
1045
  imageControlIcon: {
856
- color: '#fff',
1046
+ color: "#fff",
857
1047
  fontSize: 30,
858
- textShadowColor: 'rgba(0,0,0,0.3)',
1048
+ textShadowColor: "rgba(0,0,0,0.3)",
859
1049
  textShadowOffset: {
860
1050
  width: 2,
861
1051
  height: 2
862
1052
  }
863
1053
  },
864
1054
  plusImages: {
865
- fontFamily: 'sf-bold',
1055
+ fontFamily: "sf-bold",
866
1056
  fontSize: 32,
867
- textAlign: 'center',
868
- color: '#fff',
869
- textShadowColor: 'rgba(0, 0, 0, 0.5)',
1057
+ textAlign: "center",
1058
+ color: "#fff",
1059
+ textShadowColor: "rgba(0, 0, 0, 0.5)",
870
1060
  textShadowOffset: {
871
1061
  width: 0,
872
1062
  height: 2
@@ -874,64 +1064,64 @@ const styles = StyleSheet.create({
874
1064
  textShadowRadius: 8
875
1065
  },
876
1066
  jobDescriptionText: {
877
- fontFamily: 'sf-medium',
1067
+ fontFamily: "sf-medium",
878
1068
  fontSize: 14,
879
1069
  color: Colours.TEXT_LIGHT,
880
1070
  paddingBottom: 16
881
1071
  },
882
1072
  locationLabel: {
883
- fontFamily: 'sf-bold',
1073
+ fontFamily: "sf-bold",
884
1074
  fontSize: 14,
885
1075
  color: Colours.TEXT_DARKEST
886
1076
  },
887
1077
  locationText: {
888
- fontFamily: 'sf-regular',
1078
+ fontFamily: "sf-regular",
889
1079
  fontSize: 16,
890
1080
  color: Colours.TEXT_DARKEST,
891
1081
  paddingVertical: 8
892
1082
  },
893
1083
  requesterLabel: {
894
- fontFamily: 'sf-bold',
1084
+ fontFamily: "sf-bold",
895
1085
  fontSize: 14,
896
1086
  color: Colours.TEXT_DARKEST,
897
1087
  paddingVertical: 10
898
1088
  },
899
1089
  profileContainer: {
900
- flexDirection: 'row',
901
- alignItems: 'center'
1090
+ flexDirection: "row",
1091
+ alignItems: "center"
902
1092
  },
903
1093
  nameContainer: {
904
1094
  marginLeft: 18
905
1095
  },
906
1096
  nameText: {
907
- fontSize: 'sf-semibold',
1097
+ fontSize: "sf-semibold",
908
1098
  fontSize: 14,
909
1099
  color: Colours.TEXT_DARKEST,
910
1100
  marginBottom: 4
911
1101
  },
912
1102
  phoneText: {
913
- fontSize: 'sf-medium',
1103
+ fontSize: "sf-medium",
914
1104
  fontSize: 14,
915
1105
  color: Colours.TEXT_LIGHT
916
1106
  },
917
1107
  textSectionInner: {
918
- flexDirection: 'row',
919
- justifyContent: 'space-between',
920
- alignItems: 'center',
1108
+ flexDirection: "row",
1109
+ justifyContent: "space-between",
1110
+ alignItems: "center",
921
1111
  marginTop: 8
922
1112
  },
923
1113
  textSectionLabel: {
924
- fontFamily: 'sf-semibold',
1114
+ fontFamily: "sf-semibold",
925
1115
  fontSize: 12,
926
1116
  lineHeight: 24,
927
1117
  color: Colours.TEXT_DARKEST
928
1118
  },
929
1119
  textSectionTextContainer: {
930
- flexDirection: 'row',
931
- alignItems: 'center'
1120
+ flexDirection: "row",
1121
+ alignItems: "center"
932
1122
  },
933
1123
  textSectionText: {
934
- fontFamily: 'sf-regular',
1124
+ fontFamily: "sf-regular",
935
1125
  fontSize: 13,
936
1126
  lineHeight: 24,
937
1127
  color: Colours.TEXT_LIGHT
@@ -942,38 +1132,116 @@ const styles = StyleSheet.create({
942
1132
  lineHeight: 24
943
1133
  },
944
1134
  customLabel: {
945
- fontFamily: 'sf-bold',
1135
+ fontFamily: "sf-bold",
946
1136
  fontSize: 14,
947
1137
  color: Colours.TEXT_DARKEST
948
1138
  },
949
1139
  customText: {
950
- fontFamily: 'sf-regular',
1140
+ fontFamily: "sf-regular",
951
1141
  fontSize: 16,
952
1142
  color: Colours.TEXT_DARKEST,
953
1143
  paddingVertical: 8
954
1144
  },
1145
+ customImage: {
1146
+ marginTop: 8
1147
+ },
1148
+ customDocument: {
1149
+ marginTop: 8,
1150
+ marginBottom: 16
1151
+ },
955
1152
  customStaticTitle: {
956
1153
  fontSize: 20,
957
- fontFamily: 'sf-semibold',
1154
+ fontFamily: "sf-semibold",
958
1155
  color: Colours.TEXT_DARKEST,
959
1156
  marginBottom: 10
960
1157
  },
961
1158
  customStaticText: {
962
1159
  fontSize: 17,
963
- fontFamily: 'sf-regular',
1160
+ fontFamily: "sf-regular",
964
1161
  color: Colours.TEXT_DARKEST,
965
1162
  lineHeight: 24,
966
1163
  marginBottom: 10
1164
+ },
1165
+ documentContainer: {
1166
+ flexDirection: "row",
1167
+ alignItems: "center",
1168
+ justifyContent: "space-between",
1169
+ paddingVertical: 4
1170
+ },
1171
+ documentTypeContainer: {
1172
+ width: 50,
1173
+ height: 60,
1174
+ justifyContent: "center",
1175
+ alignItems: "center",
1176
+ borderRadius: 5,
1177
+ marginRight: 8
1178
+ },
1179
+ documentTypeText: {
1180
+ color: "#fff",
1181
+ fontFamily: "sf-semibold",
1182
+ textAlign: "center"
1183
+ },
1184
+ documentText: {
1185
+ flex: 1,
1186
+ fontFamily: "sf-semibold",
1187
+ fontSize: 16,
1188
+ color: "#65686D"
1189
+ },
1190
+ externalSyncContainer: {
1191
+ backgroundColor: "#fff",
1192
+ marginTop: 16,
1193
+ borderRadius: 8,
1194
+ padding: 16
1195
+ },
1196
+ externalSyncHeader: {
1197
+ flexDirection: "row",
1198
+ justifyContent: "space-between",
1199
+ alignItems: "center",
1200
+ marginBottom: 12,
1201
+ paddingBottom: 12,
1202
+ borderBottomWidth: 1,
1203
+ borderBottomColor: Colours.LINEGREY
1204
+ },
1205
+ externalSyncTitle: {
1206
+ fontFamily: "sf-semibold",
1207
+ fontSize: 16,
1208
+ color: Colours.TEXT_DARKEST
1209
+ },
1210
+ externalSyncIcon: {
1211
+ fontSize: 20
1212
+ },
1213
+ externalSyncContent: {
1214
+ paddingTop: 4
1215
+ },
1216
+ externalSyncRow: {
1217
+ flexDirection: "row",
1218
+ marginBottom: 10
1219
+ },
1220
+ externalSyncLabel: {
1221
+ fontFamily: "sf-semibold",
1222
+ fontSize: 14,
1223
+ color: Colours.TEXT_DARK,
1224
+ width: 100
1225
+ },
1226
+ externalSyncValue: {
1227
+ fontFamily: "sf-regular",
1228
+ fontSize: 14,
1229
+ color: Colours.TEXT_DARKEST,
1230
+ flex: 1
967
1231
  }
968
1232
  });
969
1233
  const mapStateToProps = state => {
970
1234
  return {
971
1235
  user: state.user,
972
1236
  colourBrandingMain: Colours.getMainBrandingColourFromState(state),
973
- jobs: state[values.reducerKey].jobs
1237
+ jobs: state[values.reducerKey].jobs,
1238
+ statusTypes: state[values.reducerKey].jobstatuses,
1239
+ hideSeen: state[values.reducerKey].hideSeen
974
1240
  };
975
1241
  };
976
1242
  export default connect(mapStateToProps, {
977
- jobAdded
1243
+ jobAdded,
1244
+ jobStatusesUpdate,
1245
+ jobHideSeenUpdate
978
1246
  })(RequestDetail);
979
1247
  //# sourceMappingURL=RequestDetail.js.map