@plusscommunities/pluss-maintenance-app 8.0.8 → 8.0.9-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/module/actions/JobActions.js +4 -4
- package/dist/module/actions/JobActions.js.map +1 -1
- package/dist/module/actions/index.js +1 -1
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +1 -1
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/index.js +3 -3
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/maintenanceActions.js +36 -36
- package/dist/module/apis/maintenanceActions.js.map +1 -1
- package/dist/module/apis/userActions.js +5 -5
- package/dist/module/apis/userActions.js.map +1 -1
- package/dist/module/components/FilterPopupMenu.js +49 -49
- package/dist/module/components/FilterPopupMenu.js.map +1 -1
- package/dist/module/components/MaintenanceList.js +38 -38
- package/dist/module/components/MaintenanceList.js.map +1 -1
- package/dist/module/components/MaintenanceListItem.js +62 -62
- package/dist/module/components/MaintenanceListItem.js.map +1 -1
- package/dist/module/components/MaintenanceWidgetItem.js +27 -27
- package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
- package/dist/module/components/PrioritySelectorPopup.js +15 -15
- package/dist/module/components/PrioritySelectorPopup.js.map +1 -1
- package/dist/module/components/StatusSelectorPopup.js +16 -16
- package/dist/module/components/StatusSelectorPopup.js.map +1 -1
- package/dist/module/components/WidgetLarge.js +2 -2
- package/dist/module/components/WidgetLarge.js.map +1 -1
- package/dist/module/components/WidgetSmall.js +19 -19
- package/dist/module/components/WidgetSmall.js.map +1 -1
- package/dist/module/core.config.js +1 -1
- package/dist/module/core.config.js.map +1 -1
- package/dist/module/feature.config.js +17 -17
- package/dist/module/feature.config.js.map +1 -1
- package/dist/module/helper.js +10 -10
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +11 -11
- package/dist/module/index.js.map +1 -1
- package/dist/module/reducers/JobsReducer.js +13 -13
- package/dist/module/reducers/JobsReducer.js.map +1 -1
- package/dist/module/screens/JobTypePicker.js +17 -17
- package/dist/module/screens/JobTypePicker.js.map +1 -1
- package/dist/module/screens/MaintenancePage.js +10 -10
- package/dist/module/screens/MaintenancePage.js.map +1 -1
- package/dist/module/screens/MaintenanceUserPicker.js +121 -24
- package/dist/module/screens/MaintenanceUserPicker.js.map +1 -1
- package/dist/module/screens/RequestDetail.js +147 -149
- package/dist/module/screens/RequestDetail.js.map +1 -1
- package/dist/module/screens/RequestNotes.js +59 -59
- package/dist/module/screens/RequestNotes.js.map +1 -1
- package/dist/module/screens/ServiceRequest.js +196 -194
- package/dist/module/screens/ServiceRequest.js.map +1 -1
- package/dist/module/values.config.a.js +31 -30
- package/dist/module/values.config.a.js.map +1 -1
- package/dist/module/values.config.default.js +35 -34
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.enquiry.js +35 -34
- package/dist/module/values.config.enquiry.js.map +1 -1
- package/dist/module/values.config.feedback.js +35 -34
- package/dist/module/values.config.feedback.js.map +1 -1
- package/dist/module/values.config.food.js +35 -34
- package/dist/module/values.config.food.js.map +1 -1
- package/dist/module/values.config.forms.js +34 -34
- package/dist/module/values.config.forms.js.map +1 -1
- package/dist/module/values.config.js +35 -34
- package/dist/module/values.config.js.map +1 -1
- package/package.json +52 -53
- package/src/actions/JobActions.js +60 -67
- package/src/actions/index.js +1 -1
- package/src/actions/types.js +2 -1
- package/src/apis/index.js +3 -3
- package/src/apis/maintenanceActions.js +178 -189
- package/src/apis/userActions.js +17 -17
- package/src/components/FilterPopupMenu.js +256 -313
- package/src/components/MaintenanceList.js +317 -396
- package/src/components/MaintenanceListItem.js +288 -347
- package/src/components/MaintenanceWidgetItem.js +124 -145
- package/src/components/PrioritySelectorPopup.js +68 -81
- package/src/components/StatusSelectorPopup.js +70 -81
- package/src/components/WidgetLarge.js +5 -5
- package/src/components/WidgetSmall.js +133 -153
- package/src/core.config.js +3 -27
- package/src/feature.config.js +62 -62
- package/src/helper.js +53 -58
- package/src/index.js +22 -22
- package/src/reducers/JobsReducer.js +66 -85
- package/src/screens/JobTypePicker.js +92 -115
- package/src/screens/MaintenancePage.js +80 -89
- package/src/screens/MaintenanceUserPicker.js +186 -117
- package/src/screens/RequestDetail.js +1125 -1347
- package/src/screens/RequestNotes.js +806 -947
- package/src/screens/ServiceRequest.js +1557 -1783
- package/src/values.config.a.js +34 -33
- package/src/values.config.default.js +40 -39
- package/src/values.config.enquiry.js +40 -39
- package/src/values.config.feedback.js +40 -39
- package/src/values.config.food.js +40 -39
- package/src/values.config.forms.js +39 -39
- package/src/values.config.js +40 -39
|
@@ -1,21 +1,21 @@
|
|
|
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
|
|
5
|
-
import { ScrollView, View, StyleSheet, Text, KeyboardAvoidingView, TouchableOpacity, ImageBackground, Platform } from
|
|
6
|
-
import DateTimePicker from
|
|
7
|
-
import { Icon } from
|
|
8
|
-
import _ from
|
|
9
|
-
import moment from
|
|
10
|
-
import { connect } from
|
|
11
|
-
import { maintenanceActions } from
|
|
12
|
-
import { jobAdded, jobStatusesUpdate, jobHideSeenUpdate } from
|
|
13
|
-
import StatusSelectorPopup from
|
|
14
|
-
import PrioritySelectorPopup from
|
|
15
|
-
import { getJobStatus, getJobPriority } from
|
|
16
|
-
import { Services } from
|
|
17
|
-
import { Colours, Helper, Components, Config } from
|
|
18
|
-
import { values } from
|
|
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, jobStatusesUpdate, jobHideSeenUpdate } from '../actions';
|
|
13
|
+
import StatusSelectorPopup from '../components/StatusSelectorPopup';
|
|
14
|
+
import PrioritySelectorPopup from '../components/PrioritySelectorPopup';
|
|
15
|
+
import { getJobStatus, getJobPriority } from '../helper';
|
|
16
|
+
import { Services } from '../feature.config';
|
|
17
|
+
import { Colours, Helper, Components, Config } from '../core.config';
|
|
18
|
+
import { values } from '../values.config';
|
|
19
19
|
class RequestDetail extends Component {
|
|
20
20
|
constructor(props) {
|
|
21
21
|
super(props);
|
|
@@ -31,14 +31,14 @@ class RequestDetail extends Component {
|
|
|
31
31
|
// Refresh external sync data when job is refreshed
|
|
32
32
|
this.getExternalSync();
|
|
33
33
|
} catch (error) {
|
|
34
|
-
console.log(
|
|
34
|
+
console.log('getJob error', error.toString());
|
|
35
35
|
// check for 403 or 404 error
|
|
36
36
|
if (error.response.status === 403 || error.response.status === 404) {
|
|
37
37
|
this.setState({
|
|
38
38
|
forbidden: true
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
console.log(
|
|
41
|
+
console.log('getJob error', error);
|
|
42
42
|
} finally {
|
|
43
43
|
this.setState({
|
|
44
44
|
loading: false
|
|
@@ -54,7 +54,7 @@ class RequestDetail extends Component {
|
|
|
54
54
|
assignees: res.data.Users
|
|
55
55
|
});
|
|
56
56
|
} catch (error) {
|
|
57
|
-
console.log(
|
|
57
|
+
console.log('getAssignees error', error);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
_defineProperty(this, "getExternalSync", async () => {
|
|
@@ -75,7 +75,7 @@ class RequestDetail extends Component {
|
|
|
75
75
|
var _error$response;
|
|
76
76
|
// 404 is expected if no sync - don't show error
|
|
77
77
|
if (((_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) !== 404) {
|
|
78
|
-
console.log(
|
|
78
|
+
console.log('getExternalSync error', error);
|
|
79
79
|
}
|
|
80
80
|
this.setState({
|
|
81
81
|
loadingExternalSync: false
|
|
@@ -101,7 +101,7 @@ class RequestDetail extends Component {
|
|
|
101
101
|
const updated = {
|
|
102
102
|
id: job.id,
|
|
103
103
|
seen: true,
|
|
104
|
-
status: job.status ||
|
|
104
|
+
status: job.status || 'Unassigned'
|
|
105
105
|
};
|
|
106
106
|
const res = await maintenanceActions.editJob(updated, user.site);
|
|
107
107
|
// console.log('markSeen updated');
|
|
@@ -112,7 +112,7 @@ class RequestDetail extends Component {
|
|
|
112
112
|
seen: true
|
|
113
113
|
});
|
|
114
114
|
} catch (error) {
|
|
115
|
-
console.log(
|
|
115
|
+
console.log('markSeen error', error);
|
|
116
116
|
this.setState({
|
|
117
117
|
loading: false
|
|
118
118
|
});
|
|
@@ -140,7 +140,7 @@ class RequestDetail extends Component {
|
|
|
140
140
|
this.props.jobAdded(res.data.job);
|
|
141
141
|
this.getJob();
|
|
142
142
|
} catch (error) {
|
|
143
|
-
console.log(
|
|
143
|
+
console.log('updateJob error', error);
|
|
144
144
|
} finally {
|
|
145
145
|
this.setState({
|
|
146
146
|
loading: false
|
|
@@ -157,7 +157,7 @@ class RequestDetail extends Component {
|
|
|
157
157
|
this.props.jobAdded(res.data.job);
|
|
158
158
|
this.getJob();
|
|
159
159
|
} catch (error) {
|
|
160
|
-
console.log(
|
|
160
|
+
console.log('updateJobStatus error', error);
|
|
161
161
|
} finally {
|
|
162
162
|
this.setState({
|
|
163
163
|
loading: false
|
|
@@ -174,7 +174,7 @@ class RequestDetail extends Component {
|
|
|
174
174
|
this.props.jobAdded(res.data.job);
|
|
175
175
|
this.getJob();
|
|
176
176
|
} catch (error) {
|
|
177
|
-
console.log(
|
|
177
|
+
console.log('updateJobPriority error', error);
|
|
178
178
|
} finally {
|
|
179
179
|
this.setState({
|
|
180
180
|
loading: false
|
|
@@ -231,7 +231,7 @@ class RequestDetail extends Component {
|
|
|
231
231
|
});
|
|
232
232
|
_defineProperty(this, "onOpenDatePicker", () => {
|
|
233
233
|
this.setState({
|
|
234
|
-
popUpType:
|
|
234
|
+
popUpType: 'date',
|
|
235
235
|
isDateTimePickerVisible: true
|
|
236
236
|
});
|
|
237
237
|
});
|
|
@@ -241,11 +241,11 @@ class RequestDetail extends Component {
|
|
|
241
241
|
});
|
|
242
242
|
});
|
|
243
243
|
_defineProperty(this, "onDateSelected", date => {
|
|
244
|
-
if (this.state.popUpType ===
|
|
244
|
+
if (this.state.popUpType === 'date') {
|
|
245
245
|
date = moment(date);
|
|
246
246
|
this.setState({
|
|
247
247
|
expectedDate: date,
|
|
248
|
-
expectedDateText: date.format(
|
|
248
|
+
expectedDateText: date.format('DD/MM/YYYY'),
|
|
249
249
|
isDateTimePickerVisible: false
|
|
250
250
|
}, () => {
|
|
251
251
|
this.updateJob();
|
|
@@ -279,7 +279,7 @@ class RequestDetail extends Component {
|
|
|
279
279
|
this.props.jobAdded(job.data);
|
|
280
280
|
this.getJob();
|
|
281
281
|
} catch (error) {
|
|
282
|
-
console.log(
|
|
282
|
+
console.log('onCommentAdded error', error);
|
|
283
283
|
} finally {
|
|
284
284
|
this.setState({
|
|
285
285
|
loading: false
|
|
@@ -303,7 +303,7 @@ class RequestDetail extends Component {
|
|
|
303
303
|
return false;
|
|
304
304
|
});
|
|
305
305
|
_defineProperty(this, "toggleFullscreenVideo", url => {
|
|
306
|
-
if (typeof url !==
|
|
306
|
+
if (typeof url !== 'string') url = '';
|
|
307
307
|
this.setState({
|
|
308
308
|
showFullscreenVideo: url.length > 0,
|
|
309
309
|
currentVideoUrl: url
|
|
@@ -316,10 +316,10 @@ class RequestDetail extends Component {
|
|
|
316
316
|
name: a.displayName
|
|
317
317
|
};
|
|
318
318
|
});
|
|
319
|
-
Services.navigation.navigate(
|
|
319
|
+
Services.navigation.navigate('optionSelector', {
|
|
320
320
|
options,
|
|
321
321
|
selection: this.state.job.AssigneeId,
|
|
322
|
-
title:
|
|
322
|
+
title: 'Assign request',
|
|
323
323
|
onSelect: this.onSelectAssignee
|
|
324
324
|
});
|
|
325
325
|
});
|
|
@@ -328,12 +328,12 @@ class RequestDetail extends Component {
|
|
|
328
328
|
loading: true
|
|
329
329
|
}, async () => {
|
|
330
330
|
try {
|
|
331
|
-
console.log(
|
|
331
|
+
console.log('onSelectAssignee', this.props.job.id, assignee.key);
|
|
332
332
|
const res = await maintenanceActions.assignJob(this.props.job.id, assignee.key);
|
|
333
333
|
this.props.jobAdded(res.data.job);
|
|
334
334
|
this.getJob();
|
|
335
335
|
} catch (error) {
|
|
336
|
-
console.log(
|
|
336
|
+
console.log('onSelectAssignee error', error);
|
|
337
337
|
} finally {
|
|
338
338
|
this.setState({
|
|
339
339
|
loading: false
|
|
@@ -344,18 +344,18 @@ class RequestDetail extends Component {
|
|
|
344
344
|
this.state = {
|
|
345
345
|
job: {},
|
|
346
346
|
isDateTimePickerVisible: false,
|
|
347
|
-
popUpType:
|
|
348
|
-
status:
|
|
349
|
-
priority:
|
|
347
|
+
popUpType: '',
|
|
348
|
+
status: '',
|
|
349
|
+
priority: '',
|
|
350
350
|
expectedDate: null,
|
|
351
|
-
expectedDateText:
|
|
351
|
+
expectedDateText: '',
|
|
352
352
|
seen: false,
|
|
353
353
|
showMore: true,
|
|
354
354
|
showStatusPopup: false,
|
|
355
355
|
showPriorityPopup: false,
|
|
356
356
|
loading: false,
|
|
357
357
|
showFullscreenVideo: false,
|
|
358
|
-
currentVideoUrl:
|
|
358
|
+
currentVideoUrl: '',
|
|
359
359
|
galleryOpen: false,
|
|
360
360
|
galleryImages: [],
|
|
361
361
|
showMessages: false,
|
|
@@ -367,7 +367,6 @@ class RequestDetail extends Component {
|
|
|
367
367
|
this.scrollView = /*#__PURE__*/React.createRef();
|
|
368
368
|
this.commentReply = /*#__PURE__*/React.createRef();
|
|
369
369
|
this.commentSection = /*#__PURE__*/React.createRef();
|
|
370
|
-
this.imagePopup = /*#__PURE__*/React.createRef();
|
|
371
370
|
}
|
|
372
371
|
componentDidMount() {
|
|
373
372
|
this.props.jobStatusesUpdate(this.props.job.site);
|
|
@@ -389,7 +388,7 @@ class RequestDetail extends Component {
|
|
|
389
388
|
};
|
|
390
389
|
if (job.expectedDate) {
|
|
391
390
|
newState.expectedDate = moment(job.expectedDate);
|
|
392
|
-
newState.expectedDateText = newState.expectedDate.format(
|
|
391
|
+
newState.expectedDateText = newState.expectedDate.format('DD/MM/YYYY');
|
|
393
392
|
}
|
|
394
393
|
if (job.seen) newState.seen = job.seen;
|
|
395
394
|
this.setState(newState, () => {
|
|
@@ -421,7 +420,7 @@ class RequestDetail extends Component {
|
|
|
421
420
|
const statusOption = getJobStatus(status, this.props);
|
|
422
421
|
const priority = getJobPriority(job.priority);
|
|
423
422
|
const canEdit = this.hasPermission();
|
|
424
|
-
const isStaff = this.props.user.category ===
|
|
423
|
+
const isStaff = this.props.user.category === 'staff';
|
|
425
424
|
const showSeen = !status || status === getJobStatus(null, this.props).text;
|
|
426
425
|
return /*#__PURE__*/React.createElement(View, {
|
|
427
426
|
style: {
|
|
@@ -466,7 +465,7 @@ class RequestDetail extends Component {
|
|
|
466
465
|
style: styles.textSectionTextContainer
|
|
467
466
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
468
467
|
style: styles.textSectionText
|
|
469
|
-
}, moment(job.lastActivityUnix).format(
|
|
468
|
+
}, moment(job.lastActivityUnix).format('ddd D MMMM, h:mm A'))))), /*#__PURE__*/React.createElement(View, {
|
|
470
469
|
style: styles.jobInfoContainer
|
|
471
470
|
}, /*#__PURE__*/React.createElement(View, {
|
|
472
471
|
style: styles.jobStatusExpectedContainer
|
|
@@ -588,7 +587,7 @@ class RequestDetail extends Component {
|
|
|
588
587
|
style: styles.documentTypeText
|
|
589
588
|
}, document.ext)), /*#__PURE__*/React.createElement(Text, {
|
|
590
589
|
style: styles.documentText
|
|
591
|
-
}, `${document.name}${document.uploading ? ` - ${document.uploadProgress}` :
|
|
590
|
+
}, `${document.name}${document.uploading ? ` - ${document.uploadProgress}` : ''}`));
|
|
592
591
|
});
|
|
593
592
|
}
|
|
594
593
|
return null;
|
|
@@ -598,7 +597,7 @@ class RequestDetail extends Component {
|
|
|
598
597
|
visible: this.state.galleryOpen,
|
|
599
598
|
images: this.state.galleryImages,
|
|
600
599
|
onClose: this.closeGallery.bind(this),
|
|
601
|
-
ref:
|
|
600
|
+
ref: "imagePopup"
|
|
602
601
|
});
|
|
603
602
|
}
|
|
604
603
|
renderDocumentPopup() {
|
|
@@ -633,7 +632,7 @@ class RequestDetail extends Component {
|
|
|
633
632
|
return /*#__PURE__*/React.createElement(Components.FormCardSectionOptionLauncher, {
|
|
634
633
|
onPress: this.onOpenAssigneePicker,
|
|
635
634
|
title: "Assigned To",
|
|
636
|
-
value: job.Assignee ? job.Assignee.displayName :
|
|
635
|
+
value: job.Assignee ? job.Assignee.displayName : 'Unassigned',
|
|
637
636
|
textStyle: styles.detailsText,
|
|
638
637
|
sectionStyle: styles.detailsSection
|
|
639
638
|
}, content);
|
|
@@ -681,7 +680,7 @@ class RequestDetail extends Component {
|
|
|
681
680
|
style: styles.externalSyncLabel
|
|
682
681
|
}, "Synced:"), /*#__PURE__*/React.createElement(Text, {
|
|
683
682
|
style: styles.externalSyncValue
|
|
684
|
-
}, moment(externalSync.syncedAt).format(
|
|
683
|
+
}, moment(externalSync.syncedAt).format('D MMM YYYY h:mma')))));
|
|
685
684
|
}
|
|
686
685
|
renderCustomFields() {
|
|
687
686
|
const {
|
|
@@ -692,27 +691,27 @@ class RequestDetail extends Component {
|
|
|
692
691
|
} = job;
|
|
693
692
|
const renderAnswer = field => {
|
|
694
693
|
switch (field.type) {
|
|
695
|
-
case
|
|
694
|
+
case 'date':
|
|
696
695
|
return /*#__PURE__*/React.createElement(Text, {
|
|
697
696
|
style: styles.customText
|
|
698
|
-
}, field.answer ? moment(field.answer,
|
|
699
|
-
case
|
|
697
|
+
}, field.answer ? moment(field.answer, 'YYYY-MM-DD').format('DD MMM YYYY') : '');
|
|
698
|
+
case 'time':
|
|
700
699
|
return /*#__PURE__*/React.createElement(Text, {
|
|
701
700
|
style: styles.customText
|
|
702
|
-
}, field.answer ? moment(field.answer,
|
|
703
|
-
case
|
|
701
|
+
}, field.answer ? moment(field.answer, 'HH:mm').format('h:mm a') : '');
|
|
702
|
+
case 'yn':
|
|
704
703
|
return /*#__PURE__*/React.createElement(Text, {
|
|
705
704
|
style: styles.customText
|
|
706
|
-
}, field.answer ?
|
|
707
|
-
case
|
|
705
|
+
}, field.answer ? 'Yes' : 'No');
|
|
706
|
+
case 'checkbox':
|
|
708
707
|
return /*#__PURE__*/React.createElement(Text, {
|
|
709
708
|
style: styles.customText
|
|
710
|
-
}, field.answer && Array.isArray(field.answer) ? field.answer.join(
|
|
711
|
-
case
|
|
709
|
+
}, field.answer && Array.isArray(field.answer) ? field.answer.join(', ') : '');
|
|
710
|
+
case 'image':
|
|
712
711
|
return /*#__PURE__*/React.createElement(View, {
|
|
713
712
|
style: styles.customImage
|
|
714
713
|
}, this.renderImage(field.answer));
|
|
715
|
-
case
|
|
714
|
+
case 'document':
|
|
716
715
|
return /*#__PURE__*/React.createElement(View, {
|
|
717
716
|
style: styles.customDocument
|
|
718
717
|
}, this.renderDocument(field.answer));
|
|
@@ -723,8 +722,8 @@ class RequestDetail extends Component {
|
|
|
723
722
|
}
|
|
724
723
|
};
|
|
725
724
|
return customFields.map((field, index) => {
|
|
726
|
-
if ([
|
|
727
|
-
if (_.isNil(field.answer) || field.answer ===
|
|
725
|
+
if (['staticTitle', 'staticText'].includes(field.type)) return null;
|
|
726
|
+
if (_.isNil(field.answer) || field.answer === '' || Array.isArray(field.answer) && field.answer.length === 0) return null;
|
|
728
727
|
return /*#__PURE__*/React.createElement(View, {
|
|
729
728
|
key: index
|
|
730
729
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -743,7 +742,7 @@ class RequestDetail extends Component {
|
|
|
743
742
|
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Components.FormCardSectionOptionLauncher, {
|
|
744
743
|
onPress: this.onToggleDetails,
|
|
745
744
|
title: "Details",
|
|
746
|
-
icon: this.state.showMore ?
|
|
745
|
+
icon: this.state.showMore ? 'angle-up' : 'angle-down',
|
|
747
746
|
textStyle: styles.detailsText,
|
|
748
747
|
sectionStyle: styles.detailsSection
|
|
749
748
|
}), 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, {
|
|
@@ -786,7 +785,7 @@ class RequestDetail extends Component {
|
|
|
786
785
|
site: this.state.job.site || this.state.job.location,
|
|
787
786
|
live: true,
|
|
788
787
|
refreshFrequency: 10000,
|
|
789
|
-
placeHolder:
|
|
788
|
+
placeHolder: '',
|
|
790
789
|
style: {
|
|
791
790
|
flex: 1,
|
|
792
791
|
paddingHorizontal: 0,
|
|
@@ -806,7 +805,7 @@ class RequestDetail extends Component {
|
|
|
806
805
|
height: 36
|
|
807
806
|
},
|
|
808
807
|
textStyle: {
|
|
809
|
-
color:
|
|
808
|
+
color: '#fff'
|
|
810
809
|
},
|
|
811
810
|
fullWidth: true
|
|
812
811
|
}, "Leave Message"));
|
|
@@ -844,7 +843,7 @@ class RequestDetail extends Component {
|
|
|
844
843
|
return /*#__PURE__*/React.createElement(Components.Forbidden, null);
|
|
845
844
|
}
|
|
846
845
|
return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
847
|
-
behavior:
|
|
846
|
+
behavior: Platform.OS === 'ios' && 'padding',
|
|
848
847
|
style: styles.container
|
|
849
848
|
}, /*#__PURE__*/React.createElement(Components.Header, {
|
|
850
849
|
leftIcon: "angle-left",
|
|
@@ -856,7 +855,7 @@ class RequestDetail extends Component {
|
|
|
856
855
|
paddingBottom: 26
|
|
857
856
|
},
|
|
858
857
|
style: {
|
|
859
|
-
height:
|
|
858
|
+
height: '100%'
|
|
860
859
|
}
|
|
861
860
|
}, /*#__PURE__*/React.createElement(View, {
|
|
862
861
|
style: styles.innerContainer
|
|
@@ -865,15 +864,14 @@ class RequestDetail extends Component {
|
|
|
865
864
|
onConfirm: this.onDateSelected,
|
|
866
865
|
onCancel: this.onCloseDatePicker,
|
|
867
866
|
mode: this.state.popUpType,
|
|
868
|
-
headerTextIOS: `Pick a ${this.state.popUpType}
|
|
869
|
-
date: new Date()
|
|
867
|
+
headerTextIOS: `Pick a ${this.state.popUpType}`
|
|
870
868
|
}));
|
|
871
869
|
}
|
|
872
870
|
}
|
|
873
871
|
const styles = StyleSheet.create({
|
|
874
872
|
container: {
|
|
875
873
|
flex: 1,
|
|
876
|
-
backgroundColor:
|
|
874
|
+
backgroundColor: '#fff'
|
|
877
875
|
},
|
|
878
876
|
innerContainer: {
|
|
879
877
|
paddingTop: 23,
|
|
@@ -884,49 +882,49 @@ const styles = StyleSheet.create({
|
|
|
884
882
|
paddingHorizontal: 12
|
|
885
883
|
},
|
|
886
884
|
jobIdText: {
|
|
887
|
-
fontFamily:
|
|
885
|
+
fontFamily: 'sf-medium',
|
|
888
886
|
fontSize: 12,
|
|
889
887
|
marginBottom: 4
|
|
890
888
|
},
|
|
891
889
|
jobTitleText: {
|
|
892
|
-
fontFamily:
|
|
890
|
+
fontFamily: 'sf-semibold',
|
|
893
891
|
fontSize: 20,
|
|
894
892
|
color: Colours.TEXT_DARKEST,
|
|
895
893
|
marginBottom: 8
|
|
896
894
|
},
|
|
897
895
|
jobTypeSeenContainer: {
|
|
898
|
-
flexDirection:
|
|
899
|
-
alignItems:
|
|
896
|
+
flexDirection: 'row',
|
|
897
|
+
alignItems: 'center'
|
|
900
898
|
},
|
|
901
899
|
jobTypeContainer: {
|
|
902
900
|
padding: 4,
|
|
903
901
|
minWidth: 80,
|
|
904
902
|
maxWidth: 140,
|
|
905
903
|
borderRadius: 4,
|
|
906
|
-
justifyContent:
|
|
904
|
+
justifyContent: 'center'
|
|
907
905
|
},
|
|
908
906
|
jobTypeText: {
|
|
909
|
-
fontFamily:
|
|
907
|
+
fontFamily: 'sf-semibold',
|
|
910
908
|
fontSize: 12,
|
|
911
|
-
textAlign:
|
|
912
|
-
maxWidth:
|
|
909
|
+
textAlign: 'center',
|
|
910
|
+
maxWidth: '100%'
|
|
913
911
|
},
|
|
914
912
|
jobSeenContainer: {
|
|
915
|
-
flexDirection:
|
|
916
|
-
alignItems:
|
|
913
|
+
flexDirection: 'row',
|
|
914
|
+
alignItems: 'center',
|
|
917
915
|
marginLeft: 10
|
|
918
916
|
},
|
|
919
917
|
jobSeenIcon: {
|
|
920
918
|
fontSize: 12
|
|
921
919
|
},
|
|
922
920
|
jobSeenText: {
|
|
923
|
-
fontFamily:
|
|
921
|
+
fontFamily: 'sf-semibold',
|
|
924
922
|
fontSize: 12,
|
|
925
923
|
marginLeft: 4
|
|
926
924
|
},
|
|
927
925
|
jobStatusDateText: {
|
|
928
926
|
marginTop: 8,
|
|
929
|
-
fontFamily:
|
|
927
|
+
fontFamily: 'sf-medium',
|
|
930
928
|
fontSize: 13,
|
|
931
929
|
color: Colours.TEXT_LIGHT
|
|
932
930
|
},
|
|
@@ -937,60 +935,60 @@ const styles = StyleSheet.create({
|
|
|
937
935
|
paddingHorizontal: 12
|
|
938
936
|
},
|
|
939
937
|
jobStatusExpectedContainer: {
|
|
940
|
-
flexDirection:
|
|
941
|
-
alignItems:
|
|
942
|
-
justifyContent:
|
|
938
|
+
flexDirection: 'row',
|
|
939
|
+
alignItems: 'flex-start',
|
|
940
|
+
justifyContent: 'space-between'
|
|
943
941
|
},
|
|
944
942
|
jobStatusOuterContainer: {
|
|
945
943
|
// marginRight: 50,
|
|
946
944
|
},
|
|
947
945
|
jobStatusHeading: {
|
|
948
|
-
fontFamily:
|
|
946
|
+
fontFamily: 'sf-bold',
|
|
949
947
|
fontSize: 11,
|
|
950
948
|
letterSpacing: 0.8,
|
|
951
949
|
color: Colours.TEXT_DARK,
|
|
952
950
|
marginBottom: 6
|
|
953
951
|
},
|
|
954
952
|
jobStatusContainer: {
|
|
955
|
-
flexDirection:
|
|
956
|
-
alignItems:
|
|
953
|
+
flexDirection: 'row',
|
|
954
|
+
alignItems: 'center',
|
|
957
955
|
width: 120,
|
|
958
956
|
height: 30,
|
|
959
957
|
paddingHorizontal: 8,
|
|
960
958
|
borderRadius: 4
|
|
961
959
|
},
|
|
962
960
|
jobStatusIcon: {
|
|
963
|
-
color:
|
|
961
|
+
color: '#fff',
|
|
964
962
|
fontSize: 14,
|
|
965
963
|
marginRight: 8
|
|
966
964
|
},
|
|
967
965
|
jobStatusText: {
|
|
968
|
-
color:
|
|
969
|
-
textAlign:
|
|
970
|
-
fontFamily:
|
|
966
|
+
color: '#fff',
|
|
967
|
+
textAlign: 'center',
|
|
968
|
+
fontFamily: 'sf-semibold',
|
|
971
969
|
fontSize: 13,
|
|
972
970
|
flex: 1,
|
|
973
|
-
textAlign:
|
|
971
|
+
textAlign: 'center'
|
|
974
972
|
},
|
|
975
973
|
jobPriorityOuterContainer: {
|
|
976
974
|
marginTop: 12
|
|
977
975
|
},
|
|
978
976
|
jobExpectedDateContainer: {
|
|
979
977
|
backgroundColor: Colours.BOXGREY,
|
|
980
|
-
flexDirection:
|
|
978
|
+
flexDirection: 'row',
|
|
981
979
|
width: 115,
|
|
982
980
|
height: 30,
|
|
983
981
|
borderRadius: 4,
|
|
984
|
-
alignItems:
|
|
982
|
+
alignItems: 'center',
|
|
985
983
|
paddingLeft: 8
|
|
986
984
|
},
|
|
987
985
|
jobExpectedDate: {
|
|
988
|
-
fontFamily:
|
|
986
|
+
fontFamily: 'sf-regular',
|
|
989
987
|
fontSize: 13,
|
|
990
988
|
color: Colours.hexToRGBAstring(Colours.TEXT_DARKEST, 0.5)
|
|
991
989
|
},
|
|
992
990
|
detailsText: {
|
|
993
|
-
fontFamily:
|
|
991
|
+
fontFamily: 'sf-semibold',
|
|
994
992
|
fontSize: 16,
|
|
995
993
|
color: Colours.TEXT_DARKEST
|
|
996
994
|
},
|
|
@@ -1001,55 +999,55 @@ const styles = StyleSheet.create({
|
|
|
1001
999
|
},
|
|
1002
1000
|
sideBySideImages: {
|
|
1003
1001
|
flex: 1,
|
|
1004
|
-
flexDirection:
|
|
1005
|
-
justifyContent:
|
|
1002
|
+
flexDirection: 'row',
|
|
1003
|
+
justifyContent: 'space-between',
|
|
1006
1004
|
marginBottom: 16
|
|
1007
1005
|
},
|
|
1008
1006
|
sideBySideImageContainer: {
|
|
1009
|
-
backgroundColor:
|
|
1010
|
-
width:
|
|
1007
|
+
backgroundColor: '#fff',
|
|
1008
|
+
width: '48%',
|
|
1011
1009
|
height: 150,
|
|
1012
1010
|
borderRadius: 2,
|
|
1013
|
-
overflow:
|
|
1011
|
+
overflow: 'hidden'
|
|
1014
1012
|
},
|
|
1015
1013
|
singleImageContainer: {
|
|
1016
|
-
backgroundColor:
|
|
1017
|
-
width:
|
|
1014
|
+
backgroundColor: '#fff',
|
|
1015
|
+
width: '100%',
|
|
1018
1016
|
height: 150,
|
|
1019
1017
|
flex: 1,
|
|
1020
1018
|
borderRadius: 2,
|
|
1021
|
-
overflow:
|
|
1019
|
+
overflow: 'hidden',
|
|
1022
1020
|
marginBottom: 16
|
|
1023
1021
|
},
|
|
1024
1022
|
imageContainer: {
|
|
1025
1023
|
height: 150,
|
|
1026
|
-
width:
|
|
1027
|
-
justifyContent:
|
|
1024
|
+
width: 'auto',
|
|
1025
|
+
justifyContent: 'center'
|
|
1028
1026
|
},
|
|
1029
1027
|
imagePlayContainer: {
|
|
1030
|
-
position:
|
|
1028
|
+
position: 'absolute',
|
|
1031
1029
|
top: 0,
|
|
1032
1030
|
left: 0,
|
|
1033
1031
|
right: 0,
|
|
1034
1032
|
bottom: 0,
|
|
1035
|
-
alignItems:
|
|
1036
|
-
justifyContent:
|
|
1033
|
+
alignItems: 'center',
|
|
1034
|
+
justifyContent: 'center'
|
|
1037
1035
|
},
|
|
1038
1036
|
imageControlIcon: {
|
|
1039
|
-
color:
|
|
1037
|
+
color: '#fff',
|
|
1040
1038
|
fontSize: 30,
|
|
1041
|
-
textShadowColor:
|
|
1039
|
+
textShadowColor: 'rgba(0,0,0,0.3)',
|
|
1042
1040
|
textShadowOffset: {
|
|
1043
1041
|
width: 2,
|
|
1044
1042
|
height: 2
|
|
1045
1043
|
}
|
|
1046
1044
|
},
|
|
1047
1045
|
plusImages: {
|
|
1048
|
-
fontFamily:
|
|
1046
|
+
fontFamily: 'sf-bold',
|
|
1049
1047
|
fontSize: 32,
|
|
1050
|
-
textAlign:
|
|
1051
|
-
color:
|
|
1052
|
-
textShadowColor:
|
|
1048
|
+
textAlign: 'center',
|
|
1049
|
+
color: '#fff',
|
|
1050
|
+
textShadowColor: 'rgba(0, 0, 0, 0.5)',
|
|
1053
1051
|
textShadowOffset: {
|
|
1054
1052
|
width: 0,
|
|
1055
1053
|
height: 2
|
|
@@ -1057,64 +1055,64 @@ const styles = StyleSheet.create({
|
|
|
1057
1055
|
textShadowRadius: 8
|
|
1058
1056
|
},
|
|
1059
1057
|
jobDescriptionText: {
|
|
1060
|
-
fontFamily:
|
|
1058
|
+
fontFamily: 'sf-medium',
|
|
1061
1059
|
fontSize: 14,
|
|
1062
1060
|
color: Colours.TEXT_LIGHT,
|
|
1063
1061
|
paddingBottom: 16
|
|
1064
1062
|
},
|
|
1065
1063
|
locationLabel: {
|
|
1066
|
-
fontFamily:
|
|
1064
|
+
fontFamily: 'sf-bold',
|
|
1067
1065
|
fontSize: 14,
|
|
1068
1066
|
color: Colours.TEXT_DARKEST
|
|
1069
1067
|
},
|
|
1070
1068
|
locationText: {
|
|
1071
|
-
fontFamily:
|
|
1069
|
+
fontFamily: 'sf-regular',
|
|
1072
1070
|
fontSize: 16,
|
|
1073
1071
|
color: Colours.TEXT_DARKEST,
|
|
1074
1072
|
paddingVertical: 8
|
|
1075
1073
|
},
|
|
1076
1074
|
requesterLabel: {
|
|
1077
|
-
fontFamily:
|
|
1075
|
+
fontFamily: 'sf-bold',
|
|
1078
1076
|
fontSize: 14,
|
|
1079
1077
|
color: Colours.TEXT_DARKEST,
|
|
1080
1078
|
paddingVertical: 10
|
|
1081
1079
|
},
|
|
1082
1080
|
profileContainer: {
|
|
1083
|
-
flexDirection:
|
|
1084
|
-
alignItems:
|
|
1081
|
+
flexDirection: 'row',
|
|
1082
|
+
alignItems: 'center'
|
|
1085
1083
|
},
|
|
1086
1084
|
nameContainer: {
|
|
1087
1085
|
marginLeft: 18
|
|
1088
1086
|
},
|
|
1089
1087
|
nameText: {
|
|
1090
|
-
fontSize:
|
|
1088
|
+
fontSize: 'sf-semibold',
|
|
1091
1089
|
fontSize: 14,
|
|
1092
1090
|
color: Colours.TEXT_DARKEST,
|
|
1093
1091
|
marginBottom: 4
|
|
1094
1092
|
},
|
|
1095
1093
|
phoneText: {
|
|
1096
|
-
fontSize:
|
|
1094
|
+
fontSize: 'sf-medium',
|
|
1097
1095
|
fontSize: 14,
|
|
1098
1096
|
color: Colours.TEXT_LIGHT
|
|
1099
1097
|
},
|
|
1100
1098
|
textSectionInner: {
|
|
1101
|
-
flexDirection:
|
|
1102
|
-
justifyContent:
|
|
1103
|
-
alignItems:
|
|
1099
|
+
flexDirection: 'row',
|
|
1100
|
+
justifyContent: 'space-between',
|
|
1101
|
+
alignItems: 'center',
|
|
1104
1102
|
marginTop: 8
|
|
1105
1103
|
},
|
|
1106
1104
|
textSectionLabel: {
|
|
1107
|
-
fontFamily:
|
|
1105
|
+
fontFamily: 'sf-semibold',
|
|
1108
1106
|
fontSize: 12,
|
|
1109
1107
|
lineHeight: 24,
|
|
1110
1108
|
color: Colours.TEXT_DARKEST
|
|
1111
1109
|
},
|
|
1112
1110
|
textSectionTextContainer: {
|
|
1113
|
-
flexDirection:
|
|
1114
|
-
alignItems:
|
|
1111
|
+
flexDirection: 'row',
|
|
1112
|
+
alignItems: 'center'
|
|
1115
1113
|
},
|
|
1116
1114
|
textSectionText: {
|
|
1117
|
-
fontFamily:
|
|
1115
|
+
fontFamily: 'sf-regular',
|
|
1118
1116
|
fontSize: 13,
|
|
1119
1117
|
lineHeight: 24,
|
|
1120
1118
|
color: Colours.TEXT_LIGHT
|
|
@@ -1125,12 +1123,12 @@ const styles = StyleSheet.create({
|
|
|
1125
1123
|
lineHeight: 24
|
|
1126
1124
|
},
|
|
1127
1125
|
customLabel: {
|
|
1128
|
-
fontFamily:
|
|
1126
|
+
fontFamily: 'sf-bold',
|
|
1129
1127
|
fontSize: 14,
|
|
1130
1128
|
color: Colours.TEXT_DARKEST
|
|
1131
1129
|
},
|
|
1132
1130
|
customText: {
|
|
1133
|
-
fontFamily:
|
|
1131
|
+
fontFamily: 'sf-regular',
|
|
1134
1132
|
fontSize: 16,
|
|
1135
1133
|
color: Colours.TEXT_DARKEST,
|
|
1136
1134
|
paddingVertical: 8
|
|
@@ -1144,59 +1142,59 @@ const styles = StyleSheet.create({
|
|
|
1144
1142
|
},
|
|
1145
1143
|
customStaticTitle: {
|
|
1146
1144
|
fontSize: 20,
|
|
1147
|
-
fontFamily:
|
|
1145
|
+
fontFamily: 'sf-semibold',
|
|
1148
1146
|
color: Colours.TEXT_DARKEST,
|
|
1149
1147
|
marginBottom: 10
|
|
1150
1148
|
},
|
|
1151
1149
|
customStaticText: {
|
|
1152
1150
|
fontSize: 17,
|
|
1153
|
-
fontFamily:
|
|
1151
|
+
fontFamily: 'sf-regular',
|
|
1154
1152
|
color: Colours.TEXT_DARKEST,
|
|
1155
1153
|
lineHeight: 24,
|
|
1156
1154
|
marginBottom: 10
|
|
1157
1155
|
},
|
|
1158
1156
|
documentContainer: {
|
|
1159
|
-
flexDirection:
|
|
1160
|
-
alignItems:
|
|
1161
|
-
justifyContent:
|
|
1157
|
+
flexDirection: 'row',
|
|
1158
|
+
alignItems: 'center',
|
|
1159
|
+
justifyContent: 'space-between',
|
|
1162
1160
|
paddingVertical: 4
|
|
1163
1161
|
},
|
|
1164
1162
|
documentTypeContainer: {
|
|
1165
1163
|
width: 50,
|
|
1166
1164
|
height: 60,
|
|
1167
|
-
justifyContent:
|
|
1168
|
-
alignItems:
|
|
1165
|
+
justifyContent: 'center',
|
|
1166
|
+
alignItems: 'center',
|
|
1169
1167
|
borderRadius: 5,
|
|
1170
1168
|
marginRight: 8
|
|
1171
1169
|
},
|
|
1172
1170
|
documentTypeText: {
|
|
1173
|
-
color:
|
|
1174
|
-
fontFamily:
|
|
1175
|
-
textAlign:
|
|
1171
|
+
color: '#fff',
|
|
1172
|
+
fontFamily: 'sf-semibold',
|
|
1173
|
+
textAlign: 'center'
|
|
1176
1174
|
},
|
|
1177
1175
|
documentText: {
|
|
1178
1176
|
flex: 1,
|
|
1179
|
-
fontFamily:
|
|
1177
|
+
fontFamily: 'sf-semibold',
|
|
1180
1178
|
fontSize: 16,
|
|
1181
|
-
color:
|
|
1179
|
+
color: '#65686D'
|
|
1182
1180
|
},
|
|
1183
1181
|
externalSyncContainer: {
|
|
1184
|
-
backgroundColor:
|
|
1182
|
+
backgroundColor: '#fff',
|
|
1185
1183
|
marginTop: 16,
|
|
1186
1184
|
borderRadius: 8,
|
|
1187
1185
|
padding: 16
|
|
1188
1186
|
},
|
|
1189
1187
|
externalSyncHeader: {
|
|
1190
|
-
flexDirection:
|
|
1191
|
-
justifyContent:
|
|
1192
|
-
alignItems:
|
|
1188
|
+
flexDirection: 'row',
|
|
1189
|
+
justifyContent: 'space-between',
|
|
1190
|
+
alignItems: 'center',
|
|
1193
1191
|
marginBottom: 12,
|
|
1194
1192
|
paddingBottom: 12,
|
|
1195
1193
|
borderBottomWidth: 1,
|
|
1196
1194
|
borderBottomColor: Colours.LINEGREY
|
|
1197
1195
|
},
|
|
1198
1196
|
externalSyncTitle: {
|
|
1199
|
-
fontFamily:
|
|
1197
|
+
fontFamily: 'sf-semibold',
|
|
1200
1198
|
fontSize: 16,
|
|
1201
1199
|
color: Colours.TEXT_DARKEST
|
|
1202
1200
|
},
|
|
@@ -1207,17 +1205,17 @@ const styles = StyleSheet.create({
|
|
|
1207
1205
|
paddingTop: 4
|
|
1208
1206
|
},
|
|
1209
1207
|
externalSyncRow: {
|
|
1210
|
-
flexDirection:
|
|
1208
|
+
flexDirection: 'row',
|
|
1211
1209
|
marginBottom: 10
|
|
1212
1210
|
},
|
|
1213
1211
|
externalSyncLabel: {
|
|
1214
|
-
fontFamily:
|
|
1212
|
+
fontFamily: 'sf-semibold',
|
|
1215
1213
|
fontSize: 14,
|
|
1216
1214
|
color: Colours.TEXT_DARK,
|
|
1217
1215
|
width: 100
|
|
1218
1216
|
},
|
|
1219
1217
|
externalSyncValue: {
|
|
1220
|
-
fontFamily:
|
|
1218
|
+
fontFamily: 'sf-regular',
|
|
1221
1219
|
fontSize: 14,
|
|
1222
1220
|
color: Colours.TEXT_DARKEST,
|
|
1223
1221
|
flex: 1
|