@plusscommunities/pluss-maintenance-app 4.0.2 → 4.0.4-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 (48) hide show
  1. package/package.json +6 -3
  2. package/src/components/MaintenanceList.js +4 -2
  3. package/src/screens/RequestDetail.js +6 -0
  4. package/dist/module/actions/JobActions.js +0 -20
  5. package/dist/module/actions/JobActions.js.map +0 -1
  6. package/dist/module/actions/index.js +0 -2
  7. package/dist/module/actions/index.js.map +0 -1
  8. package/dist/module/actions/types.js +0 -4
  9. package/dist/module/actions/types.js.map +0 -1
  10. package/dist/module/apis/generalActions.js +0 -189
  11. package/dist/module/apis/generalActions.js.map +0 -1
  12. package/dist/module/apis/index.js +0 -2
  13. package/dist/module/apis/index.js.map +0 -1
  14. package/dist/module/components/FilterPopupMenu.js +0 -235
  15. package/dist/module/components/FilterPopupMenu.js.map +0 -1
  16. package/dist/module/components/MaintenanceList.js +0 -330
  17. package/dist/module/components/MaintenanceList.js.map +0 -1
  18. package/dist/module/components/MaintenanceListItem.js +0 -322
  19. package/dist/module/components/MaintenanceListItem.js.map +0 -1
  20. package/dist/module/components/MaintenanceWidgetItem.js +0 -152
  21. package/dist/module/components/MaintenanceWidgetItem.js.map +0 -1
  22. package/dist/module/components/StatusSelectorPopup.js +0 -88
  23. package/dist/module/components/StatusSelectorPopup.js.map +0 -1
  24. package/dist/module/components/WidgetLarge.js +0 -9
  25. package/dist/module/components/WidgetLarge.js.map +0 -1
  26. package/dist/module/components/WidgetSmall.js +0 -168
  27. package/dist/module/components/WidgetSmall.js.map +0 -1
  28. package/dist/module/core.config.js +0 -17
  29. package/dist/module/core.config.js.map +0 -1
  30. package/dist/module/feature.config.js +0 -90
  31. package/dist/module/feature.config.js.map +0 -1
  32. package/dist/module/helper.js +0 -25
  33. package/dist/module/helper.js.map +0 -1
  34. package/dist/module/images/speechbubble.png +0 -0
  35. package/dist/module/index.js +0 -20
  36. package/dist/module/index.js.map +0 -1
  37. package/dist/module/reducers/JobsReducer.js +0 -64
  38. package/dist/module/reducers/JobsReducer.js.map +0 -1
  39. package/dist/module/screens/JobTypePicker.js +0 -130
  40. package/dist/module/screens/JobTypePicker.js.map +0 -1
  41. package/dist/module/screens/MaintenancePage.js +0 -88
  42. package/dist/module/screens/MaintenancePage.js.map +0 -1
  43. package/dist/module/screens/RequestDetail.js +0 -793
  44. package/dist/module/screens/RequestDetail.js.map +0 -1
  45. package/dist/module/screens/RequestNotes.js +0 -387
  46. package/dist/module/screens/RequestNotes.js.map +0 -1
  47. package/dist/module/screens/ServiceRequest.js +0 -751
  48. package/dist/module/screens/ServiceRequest.js.map +0 -1
@@ -1,793 +0,0 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
- import React, { Component } from 'react';
5
- import { ScrollView, View, StyleSheet, Text, KeyboardAvoidingView, TouchableOpacity, ImageBackground } 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 { generalActions } 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
- class RequestDetail extends Component {
18
- constructor(props) {
19
- super(props);
20
- _defineProperty(this, "markSeen", () => {
21
- const {
22
- user
23
- } = this.props;
24
- const {
25
- job
26
- } = this.state;
27
- // Must have maintenance permission and not the requester
28
- // console.log('markSeen check', job.userID, user.Id);
29
- if (job.seen === true) return;
30
- if (!this.hasPermission()) return;
31
- if (user.Id === job.userID) return;
32
- this.setState({
33
- loading: true
34
- }, async () => {
35
- try {
36
- const updated = {
37
- id: job.id,
38
- seen: true,
39
- status: job.status || 'Unassigned'
40
- };
41
- const res = await generalActions.editJob(updated, user.site);
42
- // console.log('markSeen updated');
43
- this.props.jobAdded(res.data.job);
44
- this.setState({
45
- loading: false,
46
- seen: true
47
- });
48
- } catch (error) {
49
- console.log('markSeen error', error);
50
- this.setState({
51
- loading: false
52
- });
53
- }
54
- });
55
- });
56
- _defineProperty(this, "updateJob", () => {
57
- this.setState({
58
- loading: true
59
- }, async () => {
60
- const {
61
- user
62
- } = this.props;
63
- const {
64
- job
65
- } = this.state;
66
- try {
67
- const updated = {
68
- id: job.id
69
- };
70
- if (this.state.expectedDate) {
71
- updated.expectedDate = moment(this.state.expectedDate).utc().toISOString();
72
- }
73
- const res = await generalActions.editJob(updated, user.site);
74
- this.props.jobAdded(res.data.job);
75
- } catch (error) {
76
- console.log('updateJob error', error);
77
- } finally {
78
- this.setState({
79
- loading: false
80
- });
81
- }
82
- });
83
- });
84
- _defineProperty(this, "updateJobStatus", () => {
85
- this.setState({
86
- loading: true
87
- }, async () => {
88
- try {
89
- const res = await generalActions.editJobStatus(this.props.job.id, this.state.status);
90
- this.props.jobAdded(res.data.job);
91
- } catch (error) {
92
- console.log('updateJobStatus error', error);
93
- } finally {
94
- this.setState({
95
- loading: false
96
- });
97
- }
98
- });
99
- });
100
- _defineProperty(this, "onPressBack", () => {
101
- Services.navigation.goBack();
102
- });
103
- _defineProperty(this, "onOpenStatusPicker", () => {
104
- this.setState({
105
- showStatusPopup: true
106
- });
107
- });
108
- _defineProperty(this, "onCloseStatusPopup", () => {
109
- this.setState({
110
- showStatusPopup: false
111
- });
112
- });
113
- _defineProperty(this, "onSelectStatus", status => {
114
- this.setState({
115
- status,
116
- showStatusPopup: false
117
- }, () => {
118
- this.updateJobStatus();
119
- });
120
- });
121
- _defineProperty(this, "openStaffNotes", () => {
122
- Services.navigation.navigate('requestNotes', {
123
- job: this.state.job
124
- });
125
- });
126
- _defineProperty(this, "onOpenDatePicker", () => {
127
- this.setState({
128
- popUpType: 'date',
129
- isDateTimePickerVisible: true
130
- });
131
- });
132
- _defineProperty(this, "onCloseDatePicker", () => {
133
- this.setState({
134
- isDateTimePickerVisible: false
135
- });
136
- });
137
- _defineProperty(this, "onDateSelected", date => {
138
- if (this.state.popUpType === 'date') {
139
- date = moment(date);
140
- this.setState({
141
- expectedDate: date,
142
- expectedDateText: date.format('DD/MM/YYYY'),
143
- isDateTimePickerVisible: false
144
- }, () => {
145
- this.updateJob();
146
- });
147
- }
148
- });
149
- _defineProperty(this, "onToggleDetails", () => {
150
- this.setState({
151
- showMore: !this.state.showMore
152
- });
153
- });
154
- _defineProperty(this, "onLeaveMessage", () => {
155
- this.setState({
156
- showMessages: true
157
- });
158
- });
159
- _defineProperty(this, "onCommentsLoaded", count => {
160
- if (count > 0) {
161
- this.setState({
162
- showMessages: true
163
- });
164
- }
165
- });
166
- _defineProperty(this, "onCommentAdded", () => {
167
- this.setState({
168
- loading: true
169
- }, async () => {
170
- try {
171
- const job = await generalActions.getJob(this.props.user.site, this.props.job.id);
172
- // console.log('onCommentAdded', job?.data);
173
- this.props.jobAdded(job.data);
174
- } catch (error) {
175
- console.log('onCommentAdded error', error);
176
- } finally {
177
- this.setState({
178
- loading: false
179
- });
180
- }
181
- });
182
- });
183
- _defineProperty(this, "hasPermission", () => {
184
- const {
185
- permissions
186
- } = this.props.user;
187
- return _.includes(permissions, 'maintenanceTracking');
188
- });
189
- _defineProperty(this, "toggleFullscreenVideo", url => {
190
- if (typeof url !== 'string') url = '';
191
- this.setState({
192
- showFullscreenVideo: url.length > 0,
193
- currentVideoUrl: url
194
- });
195
- });
196
- this.state = {
197
- job: {},
198
- isDateTimePickerVisible: false,
199
- popUpType: '',
200
- status: '',
201
- expectedDate: null,
202
- expectedDateText: '',
203
- seen: false,
204
- showMore: false,
205
- showStatusPopup: false,
206
- loading: false,
207
- showFullscreenVideo: false,
208
- currentVideoUrl: '',
209
- galleryOpen: false,
210
- showMessages: false
211
- };
212
- this.scrollView = /*#__PURE__*/React.createRef();
213
- this.commentReply = /*#__PURE__*/React.createRef();
214
- this.commentSection = /*#__PURE__*/React.createRef();
215
- }
216
- componentDidMount() {
217
- this.updateJobState();
218
- }
219
- componentDidUpdate(prevProps) {
220
- if (prevProps.jobs !== this.props.jobs) {
221
- this.updateJobState();
222
- }
223
- }
224
- updateJobState() {
225
- const job = _.find(this.props.jobs, j => j.id === this.props.job.id) || this.props.job;
226
- const newState = {
227
- job,
228
- status: job.status
229
- };
230
- if (job.expectedDate) {
231
- newState.expectedDate = moment(job.expectedDate);
232
- newState.expectedDateText = newState.expectedDate.format('DD/MM/YYYY');
233
- }
234
- if (job.seen) newState.seen = job.seen;
235
- this.setState(newState, () => {
236
- this.markSeen();
237
- });
238
- }
239
- openGallery(index) {
240
- this.setState({
241
- galleryOpen: true
242
- });
243
- this.refs.imagePopup.scrollTo(index);
244
- }
245
- closeGallery() {
246
- this.setState({
247
- galleryOpen: false
248
- });
249
- }
250
- renderLoading() {
251
- return /*#__PURE__*/React.createElement(Components.LoadingIndicator, {
252
- visible: this.state.loading
253
- });
254
- }
255
- renderTop() {
256
- const {
257
- status,
258
- job
259
- } = this.state;
260
- const {
261
- statusText,
262
- statusColor
263
- } = getJobStatusProps(status);
264
- const canEdit = this.hasPermission();
265
- const showSeen = !status || status === jobStatusOptions[0].name;
266
- return /*#__PURE__*/React.createElement(View, {
267
- style: {
268
- ...Helper.getShadowStyle()
269
- }
270
- }, /*#__PURE__*/React.createElement(View, {
271
- style: styles.jobTitleContainer
272
- }, /*#__PURE__*/React.createElement(Text, {
273
- style: styles.jobTitleText
274
- }, job.title), /*#__PURE__*/React.createElement(View, {
275
- style: styles.jobTypeSeenContainer
276
- }, /*#__PURE__*/React.createElement(View, {
277
- style: [styles.jobTypeContainer, {
278
- backgroundColor: Colours.hexToRGBAstring(this.props.colourBrandingMain, 0.2)
279
- }]
280
- }, /*#__PURE__*/React.createElement(Text, {
281
- style: [styles.jobTypeText, {
282
- color: this.props.colourBrandingMain
283
- }]
284
- }, job.type)), showSeen && this.state.seen && /*#__PURE__*/React.createElement(View, {
285
- style: styles.jobSeenContainer
286
- }, /*#__PURE__*/React.createElement(Icon, {
287
- name: "check",
288
- type: "font-awesome",
289
- iconStyle: [styles.jobSeenIcon, {
290
- color: this.props.colourBrandingMain
291
- }]
292
- }), /*#__PURE__*/React.createElement(Text, {
293
- style: [styles.jobSeenText, {
294
- color: this.props.colourBrandingMain
295
- }]
296
- }, "Seen"))), job.lastActivityUnix && /*#__PURE__*/React.createElement(View, {
297
- style: styles.textSectionInner
298
- }, /*#__PURE__*/React.createElement(Text, {
299
- style: styles.textSectionLabel
300
- }, "Last Updated On"), /*#__PURE__*/React.createElement(View, {
301
- style: styles.textSectionTextContainer
302
- }, /*#__PURE__*/React.createElement(Text, {
303
- style: styles.textSectionText
304
- }, moment(job.lastActivityUnix).format('ddd D MMMM, h:mm A')))), /*#__PURE__*/React.createElement(View, {
305
- style: styles.textSectionInner
306
- }, /*#__PURE__*/React.createElement(Text, {
307
- style: styles.textSectionLabel
308
- }, "Expected Date"), /*#__PURE__*/React.createElement(TouchableOpacity, {
309
- onPress: this.onOpenDatePicker
310
- }, /*#__PURE__*/React.createElement(View, {
311
- style: styles.textSectionTextContainer
312
- }, /*#__PURE__*/React.createElement(Text, {
313
- style: styles.textSectionText
314
- }, this.state.expectedDateText || 'Select Date'), /*#__PURE__*/React.createElement(Icon, {
315
- name: "angle-right",
316
- type: "font-awesome",
317
- iconStyle: [styles.textSectionAngleRight, {
318
- color: this.props.colourBrandingMain
319
- }]
320
- }))))), /*#__PURE__*/React.createElement(View, {
321
- style: styles.jobStatusExpectedContainer
322
- }, /*#__PURE__*/React.createElement(View, {
323
- style: styles.jobStatusOuterContainer
324
- }, /*#__PURE__*/React.createElement(Text, {
325
- style: styles.jobStatusHeading
326
- }, "STATUS"), /*#__PURE__*/React.createElement(TouchableOpacity, {
327
- onPress: canEdit ? this.onOpenStatusPicker : null
328
- }, /*#__PURE__*/React.createElement(View, {
329
- style: [styles.jobStatusContainer, {
330
- backgroundColor: statusColor
331
- }]
332
- }, /*#__PURE__*/React.createElement(Icon, {
333
- name: "wrench",
334
- type: "font-awesome",
335
- iconStyle: styles.jobStatusIcon
336
- }), /*#__PURE__*/React.createElement(Text, {
337
- style: styles.jobStatusText
338
- }, statusText)))), this.hasPermission() && /*#__PURE__*/React.createElement(View, {
339
- style: styles.jobStatusOuterContainer
340
- }, /*#__PURE__*/React.createElement(Text, {
341
- style: styles.jobStatusHeading
342
- }, "STAFF NOTES"), /*#__PURE__*/React.createElement(TouchableOpacity, {
343
- onPress: this.openStaffNotes
344
- }, /*#__PURE__*/React.createElement(View, {
345
- style: [styles.jobStatusContainer, {
346
- backgroundColor: this.props.colourBrandingMain
347
- }]
348
- }, /*#__PURE__*/React.createElement(Icon, {
349
- name: "pencil-square-o",
350
- type: "font-awesome",
351
- iconStyle: styles.jobStatusIcon
352
- }), /*#__PURE__*/React.createElement(Text, {
353
- style: styles.jobStatusText
354
- }, "Notes (", (job.Notes || []).length, ")"))))));
355
- }
356
- renderPlayableImageUrl(url, index, containerStyle, showMore) {
357
- const thumbUrl = Helper.getThumb300(url);
358
- if (Helper.isVideo(url)) {
359
- return /*#__PURE__*/React.createElement(ImageBackground, {
360
- style: [{
361
- flex: 1
362
- }, containerStyle],
363
- source: {
364
- uri: thumbUrl
365
- }
366
- }, /*#__PURE__*/React.createElement(View, {
367
- style: styles.imagePlayContainer
368
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
369
- onPress: this.toggleFullscreenVideo.bind(this, url)
370
- }, /*#__PURE__*/React.createElement(Icon, {
371
- name: "play",
372
- type: "font-awesome",
373
- iconStyle: styles.imageControlIcon
374
- }))));
375
- }
376
- const imageUrl = Helper.get1400(url);
377
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
378
- style: containerStyle,
379
- onPress: this.openGallery.bind(this, index || 0)
380
- }, /*#__PURE__*/React.createElement(ImageBackground, {
381
- style: styles.imageContainer,
382
- source: {
383
- uri: imageUrl
384
- }
385
- }, showMore && /*#__PURE__*/React.createElement(Text, {
386
- style: styles.plusImages
387
- }, "+", this.state.job.images.length - 2)));
388
- }
389
- renderPlayableImage(index, containerStyle, showMore) {
390
- const url = this.state.job.images[index];
391
- return this.renderPlayableImageUrl(url, index, containerStyle, showMore);
392
- }
393
- renderImage() {
394
- const {
395
- job
396
- } = this.state;
397
- if (!_.isNil(job.images) && !_.isEmpty(job.images)) {
398
- if (job.images.length >= 2) {
399
- return /*#__PURE__*/React.createElement(View, {
400
- style: styles.sideBySideImages
401
- }, this.renderPlayableImage(0, styles.sideBySideImageContainer), this.renderPlayableImage(1, styles.sideBySideImageContainer, job.images.length > 2));
402
- } else {
403
- return /*#__PURE__*/React.createElement(View, {
404
- style: styles.singleImageContainer
405
- }, this.renderPlayableImage(0));
406
- }
407
- } else if (!_.isNil(job.image)) {
408
- return /*#__PURE__*/React.createElement(View, {
409
- style: styles.singleImageContainer
410
- }, this.renderPlayableImageUrl(job.image));
411
- }
412
- return null;
413
- }
414
- renderImagePopup() {
415
- return /*#__PURE__*/React.createElement(Components.ImagePopup, {
416
- visible: this.state.galleryOpen,
417
- images: this.state.job.images || [this.state.job.image],
418
- onClose: this.closeGallery.bind(this),
419
- ref: "imagePopup"
420
- });
421
- }
422
- rendeDetails() {
423
- const {
424
- job
425
- } = this.state;
426
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Components.FormCardSectionOptionLauncher, {
427
- onPress: this.onToggleDetails,
428
- title: "Details",
429
- icon: this.state.showMore ? 'angle-up' : 'angle-down',
430
- textStyle: styles.detailsText,
431
- sectionStyle: styles.detailsSection
432
- }), this.state.showMore && /*#__PURE__*/React.createElement(View, null, this.renderImage(), !_.isEmpty(job.description) && /*#__PURE__*/React.createElement(Text, {
433
- numberOfLines: 10,
434
- style: styles.jobDescriptionText
435
- }, job.description), /*#__PURE__*/React.createElement(Text, {
436
- style: styles.locationLabel
437
- }, "Location"), /*#__PURE__*/React.createElement(Text, {
438
- style: styles.locationText
439
- }, job.room), /*#__PURE__*/React.createElement(Text, {
440
- style: styles.requesterLabel
441
- }, "Person Requesting"), /*#__PURE__*/React.createElement(View, {
442
- style: styles.profileContainer
443
- }, /*#__PURE__*/React.createElement(Components.ProfilePic, {
444
- ProfilePic: job.userProfilePic,
445
- Diameter: 40
446
- }), /*#__PURE__*/React.createElement(View, {
447
- style: styles.nameContainer
448
- }, /*#__PURE__*/React.createElement(Text, {
449
- style: styles.nameText
450
- }, job.userName), !_.isEmpty(job.phone) && /*#__PURE__*/React.createElement(Text, {
451
- style: styles.phoneText
452
- }, job.phone)))));
453
- }
454
- renderMessages() {
455
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Components.CommentSection, {
456
- ref: this.commentSection,
457
- commentReply: this.commentReply,
458
- scrollView: this.scrollView,
459
- adminPermission: "maintenanceTracking",
460
- entityType: "maintenancerequest",
461
- entityId: this.props.job.id,
462
- entityName: this.props.job.title,
463
- site: this.state.job.site || this.state.job.location,
464
- live: true,
465
- refreshFrequency: 10000,
466
- placeHolder: '',
467
- style: {
468
- flex: 1,
469
- paddingHorizontal: 0,
470
- paddingTop: 16
471
- },
472
- onCommentsLoaded: this.onCommentsLoaded,
473
- onCommentAdded: this.onCommentAdded,
474
- hideAddComment: true,
475
- disableFlag: true
476
- }), !this.state.showMessages && /*#__PURE__*/React.createElement(Components.InlineButton, {
477
- onPress: this.onLeaveMessage,
478
- color: this.props.colourBrandingMain,
479
- touchableStyle: {
480
- marginTop: 10
481
- },
482
- style: {
483
- height: 36
484
- },
485
- textStyle: {
486
- color: '#fff'
487
- },
488
- fullWidth: true
489
- }, "Leave Message"));
490
- }
491
- renderMessagesReply() {
492
- if (!this.state.showMessages) return null;
493
- return /*#__PURE__*/React.createElement(Components.CommentReply, {
494
- ref: this.commentReply,
495
- commentSection: this.commentSection,
496
- scrollView: this.scrollView,
497
- entityType: "maintenancerequest",
498
- entityId: this.props.job.id,
499
- entityName: this.props.job.title,
500
- site: this.state.job.site || this.state.job.location
501
- // noScroll={true}
502
- // style={{ position: 'absolute', bottom: 0, left: 0, right: 0 }}
503
- });
504
- }
505
-
506
- renderStatusPopup() {
507
- if (!this.state.showStatusPopup) return null;
508
- return /*#__PURE__*/React.createElement(StatusSelectorPopup, {
509
- onClose: this.onCloseStatusPopup,
510
- onSelect: this.onSelectStatus
511
- });
512
- }
513
- render() {
514
- return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
515
- behavior: Platform.OS === 'ios' && 'padding',
516
- style: styles.container
517
- }, /*#__PURE__*/React.createElement(Components.Header, {
518
- leftIcon: "angle-left",
519
- onPressLeft: this.onPressBack,
520
- text: Config.env.strings.MAINTENANCE_REQUEST_DETAILS
521
- }), this.renderLoading(), /*#__PURE__*/React.createElement(ScrollView, {
522
- ref: this.scrollView,
523
- contentContainerStyle: {
524
- paddingBottom: 26
525
- },
526
- style: {
527
- height: '100%'
528
- }
529
- }, /*#__PURE__*/React.createElement(View, {
530
- style: styles.innerContainer
531
- }, this.renderTop(), this.rendeDetails(), this.renderMessages())), this.renderMessagesReply(), this.renderStatusPopup(), this.renderImagePopup(), /*#__PURE__*/React.createElement(DateTimePicker, {
532
- isVisible: this.state.isDateTimePickerVisible,
533
- onConfirm: this.onDateSelected,
534
- onCancel: this.onCloseDatePicker,
535
- mode: this.state.popUpType,
536
- headerTextIOS: `Pick a ${this.state.popUpType}`
537
- }));
538
- }
539
- }
540
- const styles = StyleSheet.create({
541
- container: {
542
- flex: 1,
543
- backgroundColor: '#fff'
544
- },
545
- innerContainer: {
546
- paddingTop: 23,
547
- paddingHorizontal: 16
548
- },
549
- jobTitleContainer: {
550
- paddingVertical: 14,
551
- paddingHorizontal: 12
552
- },
553
- jobTitleText: {
554
- fontFamily: 'sf-semibold',
555
- fontSize: 20,
556
- color: Colours.TEXT_DARKEST,
557
- marginBottom: 8
558
- },
559
- jobTypeSeenContainer: {
560
- flexDirection: 'row',
561
- alignItems: 'center'
562
- },
563
- jobTypeContainer: {
564
- height: 20,
565
- width: 80,
566
- borderRadius: 4,
567
- justifyContent: 'center'
568
- },
569
- jobTypeText: {
570
- fontFamily: 'sf-semibold',
571
- fontSize: 12,
572
- textAlign: 'center'
573
- },
574
- jobSeenContainer: {
575
- flexDirection: 'row',
576
- alignItems: 'center',
577
- marginLeft: 10
578
- },
579
- jobSeenIcon: {
580
- fontSize: 12
581
- },
582
- jobSeenText: {
583
- fontFamily: 'sf-semibold',
584
- fontSize: 12,
585
- marginLeft: 4
586
- },
587
- jobStatusDateText: {
588
- marginTop: 8,
589
- fontFamily: 'sf-medium',
590
- fontSize: 13,
591
- color: Colours.TEXT_LIGHT
592
- },
593
- jobStatusExpectedContainer: {
594
- flexDirection: 'row',
595
- alignItems: 'flex-start',
596
- justifyContent: 'space-between',
597
- borderTopWidth: 1,
598
- borderTopColor: Colours.LINEGREY,
599
- paddingVertical: 14,
600
- paddingHorizontal: 12
601
- },
602
- jobStatusOuterContainer: {
603
- // marginRight: 50,
604
- },
605
- jobStatusHeading: {
606
- fontFamily: 'sf-bold',
607
- fontSize: 11,
608
- letterSpacing: 0.8,
609
- color: Colours.TEXT_DARK,
610
- marginBottom: 6
611
- },
612
- jobStatusContainer: {
613
- flexDirection: 'row',
614
- alignItems: 'center',
615
- width: 120,
616
- height: 30,
617
- paddingHorizontal: 8,
618
- borderRadius: 4
619
- },
620
- jobStatusIcon: {
621
- color: '#fff',
622
- fontSize: 14,
623
- marginRight: 8
624
- },
625
- jobStatusText: {
626
- color: '#fff',
627
- textAlign: 'center',
628
- fontFamily: 'sf-semibold',
629
- fontSize: 13,
630
- flex: 1,
631
- textAlign: 'center'
632
- },
633
- jobExpectedDateContainer: {
634
- backgroundColor: Colours.BOXGREY,
635
- flexDirection: 'row',
636
- width: 115,
637
- height: 30,
638
- borderRadius: 4,
639
- alignItems: 'center',
640
- paddingLeft: 8
641
- },
642
- jobExpectedDate: {
643
- fontFamily: 'sf-regular',
644
- fontSize: 13,
645
- color: Colours.hexToRGBAstring(Colours.TEXT_DARKEST, 0.5)
646
- },
647
- detailsText: {
648
- fontFamily: 'sf-semibold',
649
- fontSize: 16,
650
- color: Colours.TEXT_DARKEST
651
- },
652
- detailsSection: {
653
- marginTop: 8,
654
- paddingHorizontal: 0,
655
- paddingBottom: 12
656
- },
657
- sideBySideImages: {
658
- flex: 1,
659
- flexDirection: 'row',
660
- justifyContent: 'space-between',
661
- marginBottom: 16
662
- },
663
- sideBySideImageContainer: {
664
- backgroundColor: '#fff',
665
- width: '48%',
666
- height: 150,
667
- borderRadius: 2,
668
- overflow: 'hidden'
669
- },
670
- singleImageContainer: {
671
- backgroundColor: '#fff',
672
- width: '100%',
673
- height: 150,
674
- flex: 1,
675
- borderRadius: 2,
676
- overflow: 'hidden',
677
- marginBottom: 16
678
- },
679
- imageContainer: {
680
- height: 150,
681
- width: 'auto',
682
- justifyContent: 'center'
683
- },
684
- imagePlayContainer: {
685
- position: 'absolute',
686
- top: 0,
687
- left: 0,
688
- right: 0,
689
- bottom: 0,
690
- alignItems: 'center',
691
- justifyContent: 'center'
692
- },
693
- imageControlIcon: {
694
- color: '#fff',
695
- fontSize: 30,
696
- textShadowColor: 'rgba(0,0,0,0.3)',
697
- textShadowOffset: {
698
- width: 2,
699
- height: 2
700
- }
701
- },
702
- plusImages: {
703
- fontFamily: 'sf-bold',
704
- fontSize: 32,
705
- textAlign: 'center',
706
- color: '#fff',
707
- textShadowColor: 'rgba(0, 0, 0, 0.5)',
708
- textShadowOffset: {
709
- width: 0,
710
- height: 2
711
- },
712
- textShadowRadius: 8
713
- },
714
- jobDescriptionText: {
715
- fontFamily: 'sf-medium',
716
- fontSize: 14,
717
- color: Colours.TEXT_LIGHT,
718
- paddingBottom: 16
719
- },
720
- locationLabel: {
721
- fontFamily: 'sf-bold',
722
- fontSize: 14,
723
- color: Colours.TEXT_DARKEST
724
- },
725
- locationText: {
726
- fontFamily: 'sf-regular',
727
- fontSize: 16,
728
- color: Colours.TEXT_DARKEST,
729
- paddingVertical: 8
730
- },
731
- requesterLabel: {
732
- fontFamily: 'sf-bold',
733
- fontSize: 14,
734
- color: Colours.TEXT_DARKEST,
735
- paddingVertical: 10
736
- },
737
- profileContainer: {
738
- flexDirection: 'row',
739
- alignItems: 'center'
740
- },
741
- nameContainer: {
742
- marginLeft: 18
743
- },
744
- nameText: {
745
- fontSize: 'sf-semibold',
746
- fontSize: 14,
747
- color: Colours.TEXT_DARKEST,
748
- marginBottom: 4
749
- },
750
- phoneText: {
751
- fontSize: 'sf-medium',
752
- fontSize: 14,
753
- color: Colours.TEXT_LIGHT
754
- },
755
- textSectionInner: {
756
- flexDirection: 'row',
757
- justifyContent: 'space-between',
758
- alignItems: 'center',
759
- marginTop: 8
760
- },
761
- textSectionLabel: {
762
- fontFamily: 'sf-semibold',
763
- fontSize: 12,
764
- lineHeight: 24,
765
- color: Colours.TEXT_DARKEST
766
- },
767
- textSectionTextContainer: {
768
- flexDirection: 'row',
769
- alignItems: 'center'
770
- },
771
- textSectionText: {
772
- fontFamily: 'sf-regular',
773
- fontSize: 13,
774
- lineHeight: 24,
775
- color: Colours.TEXT_LIGHT
776
- },
777
- textSectionAngleRight: {
778
- fontSize: 24,
779
- marginLeft: 10,
780
- lineHeight: 24
781
- }
782
- });
783
- const mapStateToProps = state => {
784
- return {
785
- user: state.user,
786
- colourBrandingMain: Colours.getMainBrandingColourFromState(state),
787
- jobs: state.jobs.jobs
788
- };
789
- };
790
- export default connect(mapStateToProps, {
791
- jobAdded
792
- })(RequestDetail);
793
- //# sourceMappingURL=RequestDetail.js.map