@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,289 +1,363 @@
1
- import React, { Component } from 'react';
2
- import { Image, Text, TouchableOpacity, View, StyleSheet } from 'react-native';
3
- import _ from 'lodash';
4
- import { Icon } from 'react-native-elements';
5
- import { connect } from 'react-redux';
6
- import moment from 'moment';
7
- // import {
8
- // getShadowStyle,
9
- // LINEGREY,
10
- // TEXT_DARK,
11
- // TEXT_LIGHT,
12
- // COLOUR_GREEN,
13
- // getMainBrandingColourFromState,
14
- // hexToRGBAstring,
15
- // getJobStatusProps,
16
- // jobStatusOptions,
17
- // } from '../../js';
18
- // import NavigationService from '../../js/NavigationService';
19
- import { getJobStatusProps, jobStatusOptions } from '../helper';
20
- import { Services } from '../feature.config';
21
- import { Helper, Colours } from '../core.config';
22
- import { values } from '../values.config';
1
+ import React, { Component } from "react";
2
+ import { Image, TouchableOpacity, View, StyleSheet } from "react-native";
3
+ import { Text } from "@plusscommunities/pluss-core-app/components";
4
+ import _ from "lodash";
5
+ import { Icon } from "@rneui/themed";
6
+ import { connect } from "react-redux";
7
+ import moment from "moment";
8
+ import { getJobStatus, getJobPriority } from "../helper";
9
+ import { Services } from "../feature.config";
10
+ import { Helper, Colours } from "../core.config";
11
+ import { values } from "../values.config";
23
12
 
24
13
  class MaintenanceListItem extends Component {
25
- onPressJob = () => {
26
- Services.navigation.navigate(values.screenRequestDetail, { job: this.props.job });
27
- };
14
+ onPressJob = () => {
15
+ Services.navigation.navigate(values.screenRequestDetail, {
16
+ job: this.props.job,
17
+ });
18
+ };
28
19
 
29
- renderCommentCount() {
30
- const { job } = this.props;
31
- if (!job.commentCount) {
32
- return null;
33
- }
34
- return (
35
- <View style={styles.commentCountContainer}>
36
- <Text style={styles.commentCountText}>{job.commentCount > 99 ? '99' : job.commentCount}</Text>
37
- </View>
38
- );
39
- }
20
+ renderCommentCount() {
21
+ const { job } = this.props;
22
+ if (!job.commentCount) {
23
+ return null;
24
+ }
25
+ return (
26
+ <View style={styles.commentCountContainer}>
27
+ <Text style={styles.commentCountText}>
28
+ {job.commentCount > 99 ? "99" : job.commentCount}
29
+ </Text>
30
+ </View>
31
+ );
32
+ }
40
33
 
41
- renderDescription() {
42
- const { job } = this.props;
43
- if (_.isEmpty(job.description)) {
44
- return null;
45
- }
46
- return <Text style={styles.jobDescriptionText}>{job.description}</Text>;
47
- }
34
+ renderDescription() {
35
+ const { job } = this.props;
36
+ if (_.isEmpty(job.description)) {
37
+ return null;
38
+ }
39
+ return <Text style={styles.jobDescriptionText}>{job.description}</Text>;
40
+ }
48
41
 
49
- renderSeen() {
50
- const { job } = this.props;
51
- const showSeen = !job.status || job.status === jobStatusOptions[0].name;
52
- if (!showSeen || !job.seen) {
53
- return null;
54
- }
55
- return (
56
- <View style={styles.jobSeenContainer}>
57
- <Icon name="check" type="font-awesome" iconStyle={[styles.jobSeenIcon, { color: this.props.colourBrandingMain }]} />
58
- <Text style={[styles.jobSeenText, { color: this.props.colourBrandingMain }]}>Seen</Text>
59
- </View>
60
- );
61
- }
42
+ renderSeen() {
43
+ const { job, hideSeen } = this.props;
44
+ const showSeen =
45
+ !job.status || job.status === getJobStatus(null, this.props).text;
46
+ if (hideSeen || !showSeen || !job.seen) {
47
+ return null;
48
+ }
49
+ return (
50
+ <View style={styles.jobSeenContainer}>
51
+ <Icon
52
+ name="check"
53
+ type="font-awesome"
54
+ iconStyle={[
55
+ styles.jobSeenIcon,
56
+ { color: this.props.colourBrandingMain },
57
+ ]}
58
+ />
59
+ <Text
60
+ style={[styles.jobSeenText, { color: this.props.colourBrandingMain }]}
61
+ >
62
+ Seen
63
+ </Text>
64
+ </View>
65
+ );
66
+ }
62
67
 
63
- render() {
64
- const { job } = this.props;
65
- const createdTime = moment(job.createdUnix);
66
- const createdTimeText = `${createdTime.format('ddd, D MMMM')} • ${createdTime.format('h:mma')}`;
67
- const assigneeText = job.Assignee ? `Assigned to\n${job.Assignee.displayName}` : '';
68
- const { statusText, statusColor } = getJobStatusProps(job.status);
68
+ render() {
69
+ const { job } = this.props;
70
+ const createdTime = moment(job.createdUnix);
71
+ const createdTimeText = `${createdTime.format("ddd, D MMMM")} • ${createdTime.format("h:mma")}`;
72
+ const assigneeText = job.Assignee
73
+ ? `Assigned to\n${job.Assignee.displayName}`
74
+ : "";
75
+ const status = getJobStatus(job.status, this.props);
76
+ const priority = getJobPriority(job.priority);
77
+ const isStaff = this.props.user.category === "staff";
69
78
 
70
- return (
71
- <TouchableOpacity onPress={this.onPressJob}>
72
- <View style={[styles.jobContainer, this.props.style]}>
73
- <View style={styles.jobInnerContainer}>
74
- <View style={styles.jobTopSection}>
75
- <View style={styles.jobTopLeft}>
76
- {job.jobId ? (
77
- <Text
78
- style={[styles.jobIdText, { color: this.props.colourBrandingMain }]}
79
- >{`${values.textEntityName} #${job.jobId}`}</Text>
80
- ) : null}
81
- <Text style={styles.jobTitleText}>{job.title}</Text>
82
- {job.room ? <Text style={styles.jobLocationText}>{job.room}</Text> : null}
83
- <View style={styles.jobTypeSeenContainer}>
84
- <View style={[styles.jobTypeContainer, { backgroundColor: Colours.hexToRGBAstring(this.props.colourBrandingMain, 0.2) }]}>
85
- <Text style={[styles.jobTypeText, { color: this.props.colourBrandingMain }]} numberOfLines={2}>
86
- {job.type}
87
- </Text>
88
- </View>
89
- {this.renderSeen()}
90
- </View>
91
- </View>
92
- <View style={styles.jobTopRight}>
93
- <Image style={styles.jobCommentImage} source={require('../images/speechbubble.png')} />
94
- {this.renderCommentCount()}
95
- </View>
96
- </View>
97
- <View style={styles.jobBottomSection}>
98
- {/* {this.renderDescription()} */}
99
- <Text style={styles.jobCreatedText}>{createdTimeText}</Text>
100
- <View style={styles.jobActivityContainer}>
101
- <View style={[styles.jobStatusContainer, { backgroundColor: statusColor }]}>
102
- {/* <Icon name="wrench" type="font-awesome" iconStyle={styles.jobStatusIcon} /> */}
103
- <Text style={styles.jobStatusText}>{statusText}</Text>
104
- </View>
105
- <View style={[styles.jobStatusLine, { borderColor: statusColor }]}>
106
- <View style={styles.jobStatusLineMask} />
107
- </View>
108
- <View style={[styles.jobStatusCircle, { backgroundColor: statusColor }]} />
109
- <Text style={styles.jobStatusDateText}>{assigneeText}</Text>
110
- </View>
111
- </View>
112
- </View>
113
- </View>
114
- </TouchableOpacity>
115
- );
116
- }
79
+ return (
80
+ <TouchableOpacity onPress={this.onPressJob}>
81
+ <View style={[styles.jobContainer, this.props.style]}>
82
+ <View style={styles.jobInnerContainer}>
83
+ <View style={styles.jobTopSection}>
84
+ <View style={styles.jobTopLeft}>
85
+ {job.jobId ? (
86
+ <Text
87
+ style={[
88
+ styles.jobIdText,
89
+ { color: this.props.colourBrandingMain },
90
+ ]}
91
+ >{`${values.textEntityName} #${job.jobId}`}</Text>
92
+ ) : null}
93
+ <Text style={styles.jobTitleText}>{job.title}</Text>
94
+ {job.room ? (
95
+ <Text style={styles.jobLocationText}>{job.room}</Text>
96
+ ) : null}
97
+ <View style={styles.jobTypeSeenContainer}>
98
+ <View
99
+ style={[
100
+ styles.jobTypeContainer,
101
+ {
102
+ backgroundColor: Colours.hexToRGBAstring(
103
+ this.props.colourBrandingMain,
104
+ 0.2,
105
+ ),
106
+ },
107
+ ]}
108
+ >
109
+ <Text
110
+ style={[
111
+ styles.jobTypeText,
112
+ { color: this.props.colourBrandingMain },
113
+ ]}
114
+ numberOfLines={2}
115
+ >
116
+ {job.type}
117
+ </Text>
118
+ </View>
119
+ {this.renderSeen()}
120
+ </View>
121
+ </View>
122
+ <View style={styles.jobTopRight}>
123
+ <Image
124
+ style={styles.jobCommentImage}
125
+ source={require("../images/speechbubble.png")}
126
+ />
127
+ {this.renderCommentCount()}
128
+ </View>
129
+ </View>
130
+ <View style={styles.jobBottomSection}>
131
+ {/* {this.renderDescription()} */}
132
+ <Text style={styles.jobCreatedText}>{createdTimeText}</Text>
133
+ <View style={styles.jobActivityContainer}>
134
+ <View
135
+ style={[
136
+ styles.jobStatusContainer,
137
+ { backgroundColor: status?.color },
138
+ ]}
139
+ >
140
+ {/* <Icon name="wrench" type="font-awesome" iconStyle={styles.jobStatusIcon} /> */}
141
+ <Text style={styles.jobStatusText}>{status?.text}</Text>
142
+ </View>
143
+ <View
144
+ style={[styles.jobStatusLine, { borderColor: status?.color }]}
145
+ >
146
+ <View style={styles.jobStatusLineMask} />
147
+ </View>
148
+ <View
149
+ style={[
150
+ styles.jobStatusCircle,
151
+ { backgroundColor: status?.color },
152
+ ]}
153
+ />
154
+ <Text style={styles.jobStatusDateText}>{assigneeText}</Text>
155
+ </View>
156
+ {isStaff && (
157
+ <View
158
+ style={[
159
+ styles.jobPriorityContainer,
160
+ { backgroundColor: priority.color },
161
+ ]}
162
+ >
163
+ <Text style={styles.jobPriorityText}>{priority.label}</Text>
164
+ </View>
165
+ )}
166
+ </View>
167
+ </View>
168
+ </View>
169
+ </TouchableOpacity>
170
+ );
171
+ }
117
172
  }
118
173
 
119
174
  const styles = StyleSheet.create({
120
- jobContainer: {
121
- marginVertical: 8,
122
- paddingHorizontal: 16,
123
- },
124
- jobInnerContainer: {
125
- ...Helper.getShadowStyle(),
126
- },
127
- jobTopSection: {
128
- flexDirection: 'row',
129
- alignItems: 'flex-end',
130
- paddingHorizontal: 10,
131
- paddingVertical: 10,
132
- borderBottomWidth: 1,
133
- borderBottomColor: Colours.LINEGREY,
134
- },
135
- jobTopLeft: {
136
- flex: 1,
137
- },
138
- jobIdText: {
139
- fontFamily: 'sf-medium',
140
- fontSize: 12,
141
- marginBottom: 4,
142
- },
143
- jobTitleText: {
144
- fontFamily: 'sf-semibold',
145
- fontSize: 18,
146
- color: Colours.TEXT_DARK,
147
- marginBottom: 4,
148
- },
149
- jobLocationText: {
150
- fontFamily: 'sf-medium',
151
- fontSize: 12,
152
- color: Colours.TEXT_LIGHT,
153
- marginBottom: 4,
154
- },
155
- jobTypeSeenContainer: {
156
- marginTop: 4,
157
- flexDirection: 'row',
158
- alignItems: 'center',
159
- },
160
- jobTypeContainer: {
161
- padding: 4,
162
- minWidth: 80,
163
- maxWidth: 140,
164
- borderRadius: 4,
165
- justifyContent: 'center',
166
- },
167
- jobTypeText: {
168
- fontFamily: 'sf-semibold',
169
- fontSize: 12,
170
- textAlign: 'center',
171
- maxWidth: '100%',
172
- },
173
- jobSeenContainer: {
174
- flexDirection: 'row',
175
- alignItems: 'center',
176
- marginLeft: 10,
177
- },
178
- jobSeenIcon: {
179
- fontSize: 12,
180
- },
181
- jobSeenText: {
182
- fontFamily: 'sf-semibold',
183
- fontSize: 12,
184
- marginLeft: 4,
185
- },
186
- jobTopRight: {
187
- alignItems: 'center',
188
- justifyContent: 'center',
189
- paddingHorizontal: 10,
190
- paddingTop: 10,
191
- },
192
- jobCommentImage: {
193
- width: 34,
194
- height: 34,
195
- resizeMode: 'contain',
196
- },
197
- commentCountContainer: {
198
- position: 'absolute',
199
- top: 0,
200
- right: 0,
201
- borderRadius: 10,
202
- borderWidth: 2,
203
- borderColor: '#fff',
204
- width: 20,
205
- height: 20,
206
- backgroundColor: Colours.COLOUR_GREEN,
207
- justifyContent: 'center',
208
- alignItems: 'center',
209
- },
210
- commentCountText: {
211
- textAlign: 'center',
212
- fontFamily: 'sf-bold',
213
- fontSize: 10,
214
- color: '#fff',
215
- },
216
- jobBottomSection: {
217
- paddingHorizontal: 10,
218
- paddingVertical: 16,
219
- },
220
- jobDescriptionText: {
221
- fontFamily: 'sf-medium',
222
- fontSize: 14,
223
- color: Colours.TEXT_DARK,
224
- marginBottom: 8,
225
- },
226
- jobCreatedText: {
227
- fontFamily: 'sf-medium',
228
- fontSize: 12,
229
- color: Colours.TEXT_LIGHT,
230
- marginBottom: 10,
231
- },
232
- jobActivityContainer: {
233
- flexDirection: 'row',
234
- alignItems: 'center',
235
- },
236
- jobStatusContainer: {
237
- flexDirection: 'row',
238
- alignItems: 'center',
239
- justifyContent: 'center',
240
- width: 105,
241
- height: 30,
242
- paddingHorizontal: 8,
243
- borderRadius: 4,
244
- },
245
- jobStatusIcon: {
246
- color: '#fff',
247
- fontSize: 14,
248
- },
249
- jobStatusText: {
250
- color: '#fff',
251
- textAlign: 'center',
252
- fontFamily: 'sf-semibold',
253
- fontSize: 13,
254
- },
255
- jobStatusLine: {
256
- borderWidth: 1,
257
- borderStyle: 'dashed',
258
- width: 30,
259
- },
260
- jobStatusLineMask: {
261
- position: 'absolute',
262
- left: -1,
263
- top: -1,
264
- width: '100%',
265
- height: 1,
266
- backgroundColor: '#fff',
267
- zIndex: 1,
268
- },
269
- jobStatusCircle: {
270
- width: 18,
271
- height: 18,
272
- borderRadius: 9,
273
- },
274
- jobStatusDateText: {
275
- flex: 1,
276
- textAlign: 'right',
277
- fontFamily: 'sf-medium',
278
- fontSize: 14,
279
- color: Colours.TEXT_DARK,
280
- },
175
+ jobContainer: {
176
+ marginVertical: 8,
177
+ paddingHorizontal: 16,
178
+ },
179
+ jobInnerContainer: {
180
+ ...Helper.getShadowStyle(),
181
+ },
182
+ jobTopSection: {
183
+ flexDirection: "row",
184
+ alignItems: "flex-end",
185
+ paddingHorizontal: 10,
186
+ paddingVertical: 10,
187
+ borderBottomWidth: 1,
188
+ borderBottomColor: Colours.LINEGREY,
189
+ },
190
+ jobTopLeft: {
191
+ flex: 1,
192
+ },
193
+ jobIdText: {
194
+ fontFamily: "sf-medium",
195
+ fontSize: 12,
196
+ marginBottom: 4,
197
+ },
198
+ jobTitleText: {
199
+ fontFamily: "sf-semibold",
200
+ fontSize: 18,
201
+ color: Colours.TEXT_DARK,
202
+ marginBottom: 4,
203
+ },
204
+ jobLocationText: {
205
+ fontFamily: "sf-medium",
206
+ fontSize: 12,
207
+ color: Colours.TEXT_LIGHT,
208
+ marginBottom: 4,
209
+ },
210
+ jobTypeSeenContainer: {
211
+ marginTop: 4,
212
+ flexDirection: "row",
213
+ alignItems: "center",
214
+ },
215
+ jobTypeContainer: {
216
+ padding: 4,
217
+ minWidth: 80,
218
+ maxWidth: 140,
219
+ borderRadius: 4,
220
+ justifyContent: "center",
221
+ },
222
+ jobTypeText: {
223
+ fontFamily: "sf-semibold",
224
+ fontSize: 12,
225
+ textAlign: "center",
226
+ maxWidth: "100%",
227
+ },
228
+ jobSeenContainer: {
229
+ flexDirection: "row",
230
+ alignItems: "center",
231
+ marginLeft: 10,
232
+ },
233
+ jobSeenIcon: {
234
+ fontSize: 12,
235
+ },
236
+ jobSeenText: {
237
+ fontFamily: "sf-semibold",
238
+ fontSize: 12,
239
+ marginLeft: 4,
240
+ },
241
+ jobTopRight: {
242
+ alignItems: "center",
243
+ justifyContent: "center",
244
+ paddingHorizontal: 10,
245
+ paddingTop: 10,
246
+ },
247
+ jobCommentImage: {
248
+ width: 34,
249
+ height: 34,
250
+ resizeMode: "contain",
251
+ },
252
+ commentCountContainer: {
253
+ position: "absolute",
254
+ top: 0,
255
+ right: 0,
256
+ borderRadius: 10,
257
+ borderWidth: 2,
258
+ borderColor: "#fff",
259
+ width: 20,
260
+ height: 20,
261
+ backgroundColor: Colours.COLOUR_GREEN,
262
+ justifyContent: "center",
263
+ alignItems: "center",
264
+ },
265
+ commentCountText: {
266
+ textAlign: "center",
267
+ fontFamily: "sf-bold",
268
+ fontSize: 10,
269
+ color: "#fff",
270
+ },
271
+ jobBottomSection: {
272
+ paddingHorizontal: 10,
273
+ paddingVertical: 16,
274
+ },
275
+ jobDescriptionText: {
276
+ fontFamily: "sf-medium",
277
+ fontSize: 14,
278
+ color: Colours.TEXT_DARK,
279
+ marginBottom: 8,
280
+ },
281
+ jobCreatedText: {
282
+ fontFamily: "sf-medium",
283
+ fontSize: 12,
284
+ color: Colours.TEXT_LIGHT,
285
+ marginBottom: 10,
286
+ },
287
+ jobActivityContainer: {
288
+ flexDirection: "row",
289
+ alignItems: "center",
290
+ },
291
+ jobStatusContainer: {
292
+ flexDirection: "row",
293
+ alignItems: "center",
294
+ justifyContent: "center",
295
+ width: 105,
296
+ height: 30,
297
+ paddingHorizontal: 8,
298
+ borderRadius: 4,
299
+ },
300
+ jobStatusIcon: {
301
+ color: "#fff",
302
+ fontSize: 14,
303
+ },
304
+ jobStatusText: {
305
+ color: "#fff",
306
+ textAlign: "center",
307
+ fontFamily: "sf-semibold",
308
+ fontSize: 13,
309
+ },
310
+ jobStatusLine: {
311
+ borderWidth: 1,
312
+ borderStyle: "dashed",
313
+ width: 30,
314
+ },
315
+ jobStatusLineMask: {
316
+ position: "absolute",
317
+ left: -1,
318
+ top: -1,
319
+ width: "100%",
320
+ height: 1,
321
+ backgroundColor: "#fff",
322
+ zIndex: 1,
323
+ },
324
+ jobStatusCircle: {
325
+ width: 18,
326
+ height: 18,
327
+ borderRadius: 9,
328
+ },
329
+ jobStatusDateText: {
330
+ flex: 1,
331
+ textAlign: "right",
332
+ fontFamily: "sf-medium",
333
+ fontSize: 14,
334
+ color: Colours.TEXT_DARK,
335
+ },
336
+ jobPriorityContainer: {
337
+ flexDirection: "row",
338
+ alignItems: "center",
339
+ justifyContent: "center",
340
+ width: 105,
341
+ height: 24,
342
+ paddingHorizontal: 8,
343
+ borderRadius: 4,
344
+ marginTop: 8,
345
+ },
346
+ jobPriorityText: {
347
+ color: "#fff",
348
+ textAlign: "center",
349
+ fontFamily: "sf-semibold",
350
+ fontSize: 13,
351
+ },
281
352
  });
282
353
 
283
- const mapStateToProps = state => {
284
- return {
285
- colourBrandingMain: Colours.getMainBrandingColourFromState(state),
286
- };
354
+ const mapStateToProps = (state) => {
355
+ return {
356
+ user: state.user,
357
+ colourBrandingMain: Colours.getMainBrandingColourFromState(state),
358
+ statusTypes: state[values.reducerKey].jobstatuses,
359
+ hideSeen: state[values.reducerKey].hideSeen,
360
+ };
287
361
  };
288
362
 
289
363
  export default connect(mapStateToProps, {})(MaintenanceListItem);