@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.
- package/dist/module/actions/JobActions.js +44 -1
- 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 +4 -1
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/index.js +4 -1
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/maintenanceActions.js +61 -38
- package/dist/module/apis/maintenanceActions.js.map +1 -1
- package/dist/module/apis/userActions.js +23 -0
- package/dist/module/apis/userActions.js.map +1 -0
- package/dist/module/components/FilterPopupMenu.js +82 -58
- package/dist/module/components/FilterPopupMenu.js.map +1 -1
- package/dist/module/components/MaintenanceList.js +84 -92
- package/dist/module/components/MaintenanceList.js.map +1 -1
- package/dist/module/components/MaintenanceListItem.js +94 -80
- package/dist/module/components/MaintenanceListItem.js.map +1 -1
- package/dist/module/components/MaintenanceWidgetItem.js +39 -38
- package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
- package/dist/module/components/PrioritySelectorPopup.js +83 -0
- package/dist/module/components/PrioritySelectorPopup.js.map +1 -0
- package/dist/module/components/StatusSelectorPopup.js +23 -27
- 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 +25 -20
- package/dist/module/components/WidgetSmall.js.map +1 -1
- package/dist/module/core.config.js +2 -3
- 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 +41 -26
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +12 -10
- package/dist/module/index.js.map +1 -1
- package/dist/module/reducers/JobsReducer.js +36 -6
- package/dist/module/reducers/JobsReducer.js.map +1 -1
- package/dist/module/screens/JobTypePicker.js +18 -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 +219 -0
- package/dist/module/screens/MaintenanceUserPicker.js.map +1 -0
- package/dist/module/screens/RequestDetail.js +410 -142
- package/dist/module/screens/RequestDetail.js.map +1 -1
- package/dist/module/screens/RequestNotes.js +462 -52
- package/dist/module/screens/RequestNotes.js.map +1 -1
- package/dist/module/screens/ServiceRequest.js +519 -181
- package/dist/module/screens/ServiceRequest.js.map +1 -1
- package/dist/module/values.config.a.js +30 -23
- package/dist/module/values.config.a.js.map +1 -1
- package/dist/module/values.config.default.js +35 -28
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.enquiry.js +43 -0
- package/dist/module/values.config.enquiry.js.map +1 -0
- package/dist/module/values.config.feedback.js +43 -0
- package/dist/module/values.config.feedback.js.map +1 -0
- package/dist/module/values.config.food.js +43 -0
- package/dist/module/values.config.food.js.map +1 -0
- package/dist/module/values.config.forms.js +35 -28
- package/dist/module/values.config.forms.js.map +1 -1
- package/dist/module/values.config.js +35 -28
- package/dist/module/values.config.js.map +1 -1
- package/package.json +55 -51
- package/src/actions/JobActions.js +75 -16
- package/src/actions/index.js +1 -1
- package/src/actions/types.js +4 -1
- package/src/apis/index.js +6 -1
- package/src/apis/maintenanceActions.js +189 -160
- package/src/apis/userActions.js +21 -0
- package/src/components/FilterPopupMenu.js +316 -230
- package/src/components/MaintenanceList.js +391 -326
- package/src/components/MaintenanceListItem.js +348 -274
- package/src/components/MaintenanceWidgetItem.js +146 -120
- package/src/components/PrioritySelectorPopup.js +93 -0
- package/src/components/StatusSelectorPopup.js +82 -76
- package/src/components/WidgetLarge.js +5 -5
- package/src/components/WidgetSmall.js +154 -131
- package/src/core.config.js +25 -3
- package/src/feature.config.js +62 -62
- package/src/helper.js +67 -30
- package/src/index.js +22 -20
- package/src/reducers/JobsReducer.js +85 -41
- package/src/screens/JobTypePicker.js +116 -92
- package/src/screens/MaintenancePage.js +89 -80
- package/src/screens/MaintenanceUserPicker.js +233 -0
- package/src/screens/RequestDetail.js +1354 -892
- package/src/screens/RequestNotes.js +946 -408
- package/src/screens/ServiceRequest.js +1808 -1222
- package/src/values.config.a.js +33 -26
- package/src/values.config.default.js +39 -32
- package/src/values.config.enquiry.js +43 -0
- package/src/values.config.feedback.js +43 -0
- package/src/values.config.food.js +43 -0
- package/src/values.config.forms.js +39 -32
- package/src/values.config.js +39 -32
- package/dist/module/values.config.b.js +0 -30
- package/dist/module/values.config.b.js.map +0 -1
- package/dist/module/values.config.c.js +0 -30
- package/dist/module/values.config.c.js.map +0 -1
- package/dist/module/values.config.d.js +0 -30
- package/dist/module/values.config.d.js.map +0 -1
- package/src/values.config.b.js +0 -30
- package/src/values.config.c.js +0 -30
- package/src/values.config.d.js +0 -30
|
@@ -1,28 +1,17 @@
|
|
|
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 { Image,
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// COLOUR_GREEN,
|
|
16
|
-
// getMainBrandingColourFromState,
|
|
17
|
-
// hexToRGBAstring,
|
|
18
|
-
// getJobStatusProps,
|
|
19
|
-
// jobStatusOptions,
|
|
20
|
-
// } from '../../js';
|
|
21
|
-
// import NavigationService from '../../js/NavigationService';
|
|
22
|
-
import { getJobStatusProps, jobStatusOptions } from '../helper';
|
|
23
|
-
import { Services } from '../feature.config';
|
|
24
|
-
import { Helper, Colours } from '../core.config';
|
|
25
|
-
import { values } from '../values.config';
|
|
4
|
+
import React, { Component } from "react";
|
|
5
|
+
import { Image, TouchableOpacity, View, StyleSheet } from "react-native";
|
|
6
|
+
import { Text } from "@plusscommunities/pluss-core-app/components";
|
|
7
|
+
import _ from "lodash";
|
|
8
|
+
import { Icon } from "@rneui/themed";
|
|
9
|
+
import { connect } from "react-redux";
|
|
10
|
+
import moment from "moment";
|
|
11
|
+
import { getJobStatus, getJobPriority } from "../helper";
|
|
12
|
+
import { Services } from "../feature.config";
|
|
13
|
+
import { Helper, Colours } from "../core.config";
|
|
14
|
+
import { values } from "../values.config";
|
|
26
15
|
class MaintenanceListItem extends Component {
|
|
27
16
|
constructor(...args) {
|
|
28
17
|
super(...args);
|
|
@@ -43,7 +32,7 @@ class MaintenanceListItem extends Component {
|
|
|
43
32
|
style: styles.commentCountContainer
|
|
44
33
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
45
34
|
style: styles.commentCountText
|
|
46
|
-
}, job.commentCount > 99 ?
|
|
35
|
+
}, job.commentCount > 99 ? "99" : job.commentCount));
|
|
47
36
|
}
|
|
48
37
|
renderDescription() {
|
|
49
38
|
const {
|
|
@@ -58,10 +47,11 @@ class MaintenanceListItem extends Component {
|
|
|
58
47
|
}
|
|
59
48
|
renderSeen() {
|
|
60
49
|
const {
|
|
61
|
-
job
|
|
50
|
+
job,
|
|
51
|
+
hideSeen
|
|
62
52
|
} = this.props;
|
|
63
|
-
const showSeen = !job.status || job.status ===
|
|
64
|
-
if (!showSeen || !job.seen) {
|
|
53
|
+
const showSeen = !job.status || job.status === getJobStatus(null, this.props).text;
|
|
54
|
+
if (hideSeen || !showSeen || !job.seen) {
|
|
65
55
|
return null;
|
|
66
56
|
}
|
|
67
57
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -83,12 +73,11 @@ class MaintenanceListItem extends Component {
|
|
|
83
73
|
job
|
|
84
74
|
} = this.props;
|
|
85
75
|
const createdTime = moment(job.createdUnix);
|
|
86
|
-
const createdTimeText = `${createdTime.format(
|
|
87
|
-
const assigneeText = job.Assignee ? `Assigned to\n${job.Assignee.displayName}` :
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
} = getJobStatusProps(job.status);
|
|
76
|
+
const createdTimeText = `${createdTime.format("ddd, D MMMM")} • ${createdTime.format("h:mma")}`;
|
|
77
|
+
const assigneeText = job.Assignee ? `Assigned to\n${job.Assignee.displayName}` : "";
|
|
78
|
+
const status = getJobStatus(job.status, this.props);
|
|
79
|
+
const priority = getJobPriority(job.priority);
|
|
80
|
+
const isStaff = this.props.user.category === "staff";
|
|
92
81
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
93
82
|
onPress: this.onPressJob
|
|
94
83
|
}, /*#__PURE__*/React.createElement(View, {
|
|
@@ -122,7 +111,7 @@ class MaintenanceListItem extends Component {
|
|
|
122
111
|
style: styles.jobTopRight
|
|
123
112
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
124
113
|
style: styles.jobCommentImage,
|
|
125
|
-
source: require(
|
|
114
|
+
source: require("../images/speechbubble.png")
|
|
126
115
|
}), this.renderCommentCount())), /*#__PURE__*/React.createElement(View, {
|
|
127
116
|
style: styles.jobBottomSection
|
|
128
117
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -131,23 +120,29 @@ class MaintenanceListItem extends Component {
|
|
|
131
120
|
style: styles.jobActivityContainer
|
|
132
121
|
}, /*#__PURE__*/React.createElement(View, {
|
|
133
122
|
style: [styles.jobStatusContainer, {
|
|
134
|
-
backgroundColor:
|
|
123
|
+
backgroundColor: status === null || status === void 0 ? void 0 : status.color
|
|
135
124
|
}]
|
|
136
125
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
137
126
|
style: styles.jobStatusText
|
|
138
|
-
},
|
|
127
|
+
}, status === null || status === void 0 ? void 0 : status.text)), /*#__PURE__*/React.createElement(View, {
|
|
139
128
|
style: [styles.jobStatusLine, {
|
|
140
|
-
borderColor:
|
|
129
|
+
borderColor: status === null || status === void 0 ? void 0 : status.color
|
|
141
130
|
}]
|
|
142
131
|
}, /*#__PURE__*/React.createElement(View, {
|
|
143
132
|
style: styles.jobStatusLineMask
|
|
144
133
|
})), /*#__PURE__*/React.createElement(View, {
|
|
145
134
|
style: [styles.jobStatusCircle, {
|
|
146
|
-
backgroundColor:
|
|
135
|
+
backgroundColor: status === null || status === void 0 ? void 0 : status.color
|
|
147
136
|
}]
|
|
148
137
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
149
138
|
style: styles.jobStatusDateText
|
|
150
|
-
}, assigneeText))
|
|
139
|
+
}, assigneeText)), isStaff && /*#__PURE__*/React.createElement(View, {
|
|
140
|
+
style: [styles.jobPriorityContainer, {
|
|
141
|
+
backgroundColor: priority.color
|
|
142
|
+
}]
|
|
143
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
144
|
+
style: styles.jobPriorityText
|
|
145
|
+
}, priority.label))))));
|
|
151
146
|
}
|
|
152
147
|
}
|
|
153
148
|
const styles = StyleSheet.create({
|
|
@@ -159,8 +154,8 @@ const styles = StyleSheet.create({
|
|
|
159
154
|
...Helper.getShadowStyle()
|
|
160
155
|
},
|
|
161
156
|
jobTopSection: {
|
|
162
|
-
flexDirection:
|
|
163
|
-
alignItems:
|
|
157
|
+
flexDirection: "row",
|
|
158
|
+
alignItems: "flex-end",
|
|
164
159
|
paddingHorizontal: 10,
|
|
165
160
|
paddingVertical: 10,
|
|
166
161
|
borderBottomWidth: 1,
|
|
@@ -170,134 +165,134 @@ const styles = StyleSheet.create({
|
|
|
170
165
|
flex: 1
|
|
171
166
|
},
|
|
172
167
|
jobIdText: {
|
|
173
|
-
fontFamily:
|
|
168
|
+
fontFamily: "sf-medium",
|
|
174
169
|
fontSize: 12,
|
|
175
170
|
marginBottom: 4
|
|
176
171
|
},
|
|
177
172
|
jobTitleText: {
|
|
178
|
-
fontFamily:
|
|
173
|
+
fontFamily: "sf-semibold",
|
|
179
174
|
fontSize: 18,
|
|
180
175
|
color: Colours.TEXT_DARK,
|
|
181
176
|
marginBottom: 4
|
|
182
177
|
},
|
|
183
178
|
jobLocationText: {
|
|
184
|
-
fontFamily:
|
|
179
|
+
fontFamily: "sf-medium",
|
|
185
180
|
fontSize: 12,
|
|
186
181
|
color: Colours.TEXT_LIGHT,
|
|
187
182
|
marginBottom: 4
|
|
188
183
|
},
|
|
189
184
|
jobTypeSeenContainer: {
|
|
190
185
|
marginTop: 4,
|
|
191
|
-
flexDirection:
|
|
192
|
-
alignItems:
|
|
186
|
+
flexDirection: "row",
|
|
187
|
+
alignItems: "center"
|
|
193
188
|
},
|
|
194
189
|
jobTypeContainer: {
|
|
195
190
|
padding: 4,
|
|
196
191
|
minWidth: 80,
|
|
197
192
|
maxWidth: 140,
|
|
198
193
|
borderRadius: 4,
|
|
199
|
-
justifyContent:
|
|
194
|
+
justifyContent: "center"
|
|
200
195
|
},
|
|
201
196
|
jobTypeText: {
|
|
202
|
-
fontFamily:
|
|
197
|
+
fontFamily: "sf-semibold",
|
|
203
198
|
fontSize: 12,
|
|
204
|
-
textAlign:
|
|
205
|
-
maxWidth:
|
|
199
|
+
textAlign: "center",
|
|
200
|
+
maxWidth: "100%"
|
|
206
201
|
},
|
|
207
202
|
jobSeenContainer: {
|
|
208
|
-
flexDirection:
|
|
209
|
-
alignItems:
|
|
203
|
+
flexDirection: "row",
|
|
204
|
+
alignItems: "center",
|
|
210
205
|
marginLeft: 10
|
|
211
206
|
},
|
|
212
207
|
jobSeenIcon: {
|
|
213
208
|
fontSize: 12
|
|
214
209
|
},
|
|
215
210
|
jobSeenText: {
|
|
216
|
-
fontFamily:
|
|
211
|
+
fontFamily: "sf-semibold",
|
|
217
212
|
fontSize: 12,
|
|
218
213
|
marginLeft: 4
|
|
219
214
|
},
|
|
220
215
|
jobTopRight: {
|
|
221
|
-
alignItems:
|
|
222
|
-
justifyContent:
|
|
216
|
+
alignItems: "center",
|
|
217
|
+
justifyContent: "center",
|
|
223
218
|
paddingHorizontal: 10,
|
|
224
219
|
paddingTop: 10
|
|
225
220
|
},
|
|
226
221
|
jobCommentImage: {
|
|
227
222
|
width: 34,
|
|
228
223
|
height: 34,
|
|
229
|
-
resizeMode:
|
|
224
|
+
resizeMode: "contain"
|
|
230
225
|
},
|
|
231
226
|
commentCountContainer: {
|
|
232
|
-
position:
|
|
227
|
+
position: "absolute",
|
|
233
228
|
top: 0,
|
|
234
229
|
right: 0,
|
|
235
230
|
borderRadius: 10,
|
|
236
231
|
borderWidth: 2,
|
|
237
|
-
borderColor:
|
|
232
|
+
borderColor: "#fff",
|
|
238
233
|
width: 20,
|
|
239
234
|
height: 20,
|
|
240
235
|
backgroundColor: Colours.COLOUR_GREEN,
|
|
241
|
-
justifyContent:
|
|
242
|
-
alignItems:
|
|
236
|
+
justifyContent: "center",
|
|
237
|
+
alignItems: "center"
|
|
243
238
|
},
|
|
244
239
|
commentCountText: {
|
|
245
|
-
textAlign:
|
|
246
|
-
fontFamily:
|
|
240
|
+
textAlign: "center",
|
|
241
|
+
fontFamily: "sf-bold",
|
|
247
242
|
fontSize: 10,
|
|
248
|
-
color:
|
|
243
|
+
color: "#fff"
|
|
249
244
|
},
|
|
250
245
|
jobBottomSection: {
|
|
251
246
|
paddingHorizontal: 10,
|
|
252
247
|
paddingVertical: 16
|
|
253
248
|
},
|
|
254
249
|
jobDescriptionText: {
|
|
255
|
-
fontFamily:
|
|
250
|
+
fontFamily: "sf-medium",
|
|
256
251
|
fontSize: 14,
|
|
257
252
|
color: Colours.TEXT_DARK,
|
|
258
253
|
marginBottom: 8
|
|
259
254
|
},
|
|
260
255
|
jobCreatedText: {
|
|
261
|
-
fontFamily:
|
|
256
|
+
fontFamily: "sf-medium",
|
|
262
257
|
fontSize: 12,
|
|
263
258
|
color: Colours.TEXT_LIGHT,
|
|
264
259
|
marginBottom: 10
|
|
265
260
|
},
|
|
266
261
|
jobActivityContainer: {
|
|
267
|
-
flexDirection:
|
|
268
|
-
alignItems:
|
|
262
|
+
flexDirection: "row",
|
|
263
|
+
alignItems: "center"
|
|
269
264
|
},
|
|
270
265
|
jobStatusContainer: {
|
|
271
|
-
flexDirection:
|
|
272
|
-
alignItems:
|
|
273
|
-
justifyContent:
|
|
266
|
+
flexDirection: "row",
|
|
267
|
+
alignItems: "center",
|
|
268
|
+
justifyContent: "center",
|
|
274
269
|
width: 105,
|
|
275
270
|
height: 30,
|
|
276
271
|
paddingHorizontal: 8,
|
|
277
272
|
borderRadius: 4
|
|
278
273
|
},
|
|
279
274
|
jobStatusIcon: {
|
|
280
|
-
color:
|
|
275
|
+
color: "#fff",
|
|
281
276
|
fontSize: 14
|
|
282
277
|
},
|
|
283
278
|
jobStatusText: {
|
|
284
|
-
color:
|
|
285
|
-
textAlign:
|
|
286
|
-
fontFamily:
|
|
279
|
+
color: "#fff",
|
|
280
|
+
textAlign: "center",
|
|
281
|
+
fontFamily: "sf-semibold",
|
|
287
282
|
fontSize: 13
|
|
288
283
|
},
|
|
289
284
|
jobStatusLine: {
|
|
290
285
|
borderWidth: 1,
|
|
291
|
-
borderStyle:
|
|
286
|
+
borderStyle: "dashed",
|
|
292
287
|
width: 30
|
|
293
288
|
},
|
|
294
289
|
jobStatusLineMask: {
|
|
295
|
-
position:
|
|
290
|
+
position: "absolute",
|
|
296
291
|
left: -1,
|
|
297
292
|
top: -1,
|
|
298
|
-
width:
|
|
293
|
+
width: "100%",
|
|
299
294
|
height: 1,
|
|
300
|
-
backgroundColor:
|
|
295
|
+
backgroundColor: "#fff",
|
|
301
296
|
zIndex: 1
|
|
302
297
|
},
|
|
303
298
|
jobStatusCircle: {
|
|
@@ -307,15 +302,34 @@ const styles = StyleSheet.create({
|
|
|
307
302
|
},
|
|
308
303
|
jobStatusDateText: {
|
|
309
304
|
flex: 1,
|
|
310
|
-
textAlign:
|
|
311
|
-
fontFamily:
|
|
305
|
+
textAlign: "right",
|
|
306
|
+
fontFamily: "sf-medium",
|
|
312
307
|
fontSize: 14,
|
|
313
308
|
color: Colours.TEXT_DARK
|
|
309
|
+
},
|
|
310
|
+
jobPriorityContainer: {
|
|
311
|
+
flexDirection: "row",
|
|
312
|
+
alignItems: "center",
|
|
313
|
+
justifyContent: "center",
|
|
314
|
+
width: 105,
|
|
315
|
+
height: 24,
|
|
316
|
+
paddingHorizontal: 8,
|
|
317
|
+
borderRadius: 4,
|
|
318
|
+
marginTop: 8
|
|
319
|
+
},
|
|
320
|
+
jobPriorityText: {
|
|
321
|
+
color: "#fff",
|
|
322
|
+
textAlign: "center",
|
|
323
|
+
fontFamily: "sf-semibold",
|
|
324
|
+
fontSize: 13
|
|
314
325
|
}
|
|
315
326
|
});
|
|
316
327
|
const mapStateToProps = state => {
|
|
317
328
|
return {
|
|
318
|
-
|
|
329
|
+
user: state.user,
|
|
330
|
+
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
331
|
+
statusTypes: state[values.reducerKey].jobstatuses,
|
|
332
|
+
hideSeen: state[values.reducerKey].hideSeen
|
|
319
333
|
};
|
|
320
334
|
};
|
|
321
335
|
export default connect(mapStateToProps, {})(MaintenanceListItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","Image","Text","TouchableOpacity","View","StyleSheet","_","Icon","connect","moment","getJobStatusProps","jobStatusOptions","Services","Helper","Colours","values","MaintenanceListItem","constructor","args","_defineProperty","navigation","navigate","screenRequestDetail","job","props","renderCommentCount","commentCount","createElement","style","styles","commentCountContainer","commentCountText","renderDescription","isEmpty","description","jobDescriptionText","renderSeen","showSeen","status","name","seen","jobSeenContainer","type","iconStyle","jobSeenIcon","color","colourBrandingMain","jobSeenText","render","createdTime","createdUnix","createdTimeText","format","assigneeText","Assignee","displayName","statusText","statusColor","onPress","onPressJob","jobContainer","jobInnerContainer","jobTopSection","jobTopLeft","jobId","jobIdText","textEntityName","jobTitleText","title","room","jobLocationText","jobTypeSeenContainer","jobTypeContainer","backgroundColor","hexToRGBAstring","jobTypeText","numberOfLines","jobTopRight","jobCommentImage","source","require","jobBottomSection","jobCreatedText","jobActivityContainer","jobStatusContainer","jobStatusText","jobStatusLine","borderColor","jobStatusLineMask","jobStatusCircle","jobStatusDateText","create","marginVertical","paddingHorizontal","getShadowStyle","flexDirection","alignItems","paddingVertical","borderBottomWidth","borderBottomColor","LINEGREY","flex","fontFamily","fontSize","marginBottom","TEXT_DARK","TEXT_LIGHT","marginTop","padding","minWidth","maxWidth","borderRadius","justifyContent","textAlign","marginLeft","paddingTop","width","height","resizeMode","position","top","right","borderWidth","COLOUR_GREEN","jobStatusIcon","borderStyle","left","zIndex","mapStateToProps","state","getMainBrandingColourFromState"],"sources":["MaintenanceListItem.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { Image, Text, TouchableOpacity, View, StyleSheet } from 'react-native';\nimport _ from 'lodash';\nimport { Icon } from 'react-native-elements';\nimport { connect } from 'react-redux';\nimport moment from 'moment';\n// import {\n// getShadowStyle,\n// LINEGREY,\n// TEXT_DARK,\n// TEXT_LIGHT,\n// COLOUR_GREEN,\n// getMainBrandingColourFromState,\n// hexToRGBAstring,\n// getJobStatusProps,\n// jobStatusOptions,\n// } from '../../js';\n// import NavigationService from '../../js/NavigationService';\nimport { getJobStatusProps, jobStatusOptions } from '../helper';\nimport { Services } from '../feature.config';\nimport { Helper, Colours } from '../core.config';\nimport { values } from '../values.config';\n\nclass MaintenanceListItem extends Component {\n onPressJob = () => {\n Services.navigation.navigate(values.screenRequestDetail, { job: this.props.job });\n };\n\n renderCommentCount() {\n const { job } = this.props;\n if (!job.commentCount) {\n return null;\n }\n return (\n <View style={styles.commentCountContainer}>\n <Text style={styles.commentCountText}>{job.commentCount > 99 ? '99' : job.commentCount}</Text>\n </View>\n );\n }\n\n renderDescription() {\n const { job } = this.props;\n if (_.isEmpty(job.description)) {\n return null;\n }\n return <Text style={styles.jobDescriptionText}>{job.description}</Text>;\n }\n\n renderSeen() {\n const { job } = this.props;\n const showSeen = !job.status || job.status === jobStatusOptions[0].name;\n if (!showSeen || !job.seen) {\n return null;\n }\n return (\n <View style={styles.jobSeenContainer}>\n <Icon name=\"check\" type=\"font-awesome\" iconStyle={[styles.jobSeenIcon, { color: this.props.colourBrandingMain }]} />\n <Text style={[styles.jobSeenText, { color: this.props.colourBrandingMain }]}>Seen</Text>\n </View>\n );\n }\n\n render() {\n const { job } = this.props;\n const createdTime = moment(job.createdUnix);\n const createdTimeText = `${createdTime.format('ddd, D MMMM')} • ${createdTime.format('h:mma')}`;\n const assigneeText = job.Assignee ? `Assigned to\\n${job.Assignee.displayName}` : '';\n const { statusText, statusColor } = getJobStatusProps(job.status);\n\n return (\n <TouchableOpacity onPress={this.onPressJob}>\n <View style={[styles.jobContainer, this.props.style]}>\n <View style={styles.jobInnerContainer}>\n <View style={styles.jobTopSection}>\n <View style={styles.jobTopLeft}>\n {job.jobId ? (\n <Text\n style={[styles.jobIdText, { color: this.props.colourBrandingMain }]}\n >{`${values.textEntityName} #${job.jobId}`}</Text>\n ) : null}\n <Text style={styles.jobTitleText}>{job.title}</Text>\n {job.room ? <Text style={styles.jobLocationText}>{job.room}</Text> : null}\n <View style={styles.jobTypeSeenContainer}>\n <View style={[styles.jobTypeContainer, { backgroundColor: Colours.hexToRGBAstring(this.props.colourBrandingMain, 0.2) }]}>\n <Text style={[styles.jobTypeText, { color: this.props.colourBrandingMain }]} numberOfLines={2}>\n {job.type}\n </Text>\n </View>\n {this.renderSeen()}\n </View>\n </View>\n <View style={styles.jobTopRight}>\n <Image style={styles.jobCommentImage} source={require('../images/speechbubble.png')} />\n {this.renderCommentCount()}\n </View>\n </View>\n <View style={styles.jobBottomSection}>\n {/* {this.renderDescription()} */}\n <Text style={styles.jobCreatedText}>{createdTimeText}</Text>\n <View style={styles.jobActivityContainer}>\n <View style={[styles.jobStatusContainer, { backgroundColor: statusColor }]}>\n {/* <Icon name=\"wrench\" type=\"font-awesome\" iconStyle={styles.jobStatusIcon} /> */}\n <Text style={styles.jobStatusText}>{statusText}</Text>\n </View>\n <View style={[styles.jobStatusLine, { borderColor: statusColor }]}>\n <View style={styles.jobStatusLineMask} />\n </View>\n <View style={[styles.jobStatusCircle, { backgroundColor: statusColor }]} />\n <Text style={styles.jobStatusDateText}>{assigneeText}</Text>\n </View>\n </View>\n </View>\n </View>\n </TouchableOpacity>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n jobContainer: {\n marginVertical: 8,\n paddingHorizontal: 16,\n },\n jobInnerContainer: {\n ...Helper.getShadowStyle(),\n },\n jobTopSection: {\n flexDirection: 'row',\n alignItems: 'flex-end',\n paddingHorizontal: 10,\n paddingVertical: 10,\n borderBottomWidth: 1,\n borderBottomColor: Colours.LINEGREY,\n },\n jobTopLeft: {\n flex: 1,\n },\n jobIdText: {\n fontFamily: 'sf-medium',\n fontSize: 12,\n marginBottom: 4,\n },\n jobTitleText: {\n fontFamily: 'sf-semibold',\n fontSize: 18,\n color: Colours.TEXT_DARK,\n marginBottom: 4,\n },\n jobLocationText: {\n fontFamily: 'sf-medium',\n fontSize: 12,\n color: Colours.TEXT_LIGHT,\n marginBottom: 4,\n },\n jobTypeSeenContainer: {\n marginTop: 4,\n flexDirection: 'row',\n alignItems: 'center',\n },\n jobTypeContainer: {\n padding: 4,\n minWidth: 80,\n maxWidth: 140,\n borderRadius: 4,\n justifyContent: 'center',\n },\n jobTypeText: {\n fontFamily: 'sf-semibold',\n fontSize: 12,\n textAlign: 'center',\n maxWidth: '100%',\n },\n jobSeenContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n marginLeft: 10,\n },\n jobSeenIcon: {\n fontSize: 12,\n },\n jobSeenText: {\n fontFamily: 'sf-semibold',\n fontSize: 12,\n marginLeft: 4,\n },\n jobTopRight: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 10,\n paddingTop: 10,\n },\n jobCommentImage: {\n width: 34,\n height: 34,\n resizeMode: 'contain',\n },\n commentCountContainer: {\n position: 'absolute',\n top: 0,\n right: 0,\n borderRadius: 10,\n borderWidth: 2,\n borderColor: '#fff',\n width: 20,\n height: 20,\n backgroundColor: Colours.COLOUR_GREEN,\n justifyContent: 'center',\n alignItems: 'center',\n },\n commentCountText: {\n textAlign: 'center',\n fontFamily: 'sf-bold',\n fontSize: 10,\n color: '#fff',\n },\n jobBottomSection: {\n paddingHorizontal: 10,\n paddingVertical: 16,\n },\n jobDescriptionText: {\n fontFamily: 'sf-medium',\n fontSize: 14,\n color: Colours.TEXT_DARK,\n marginBottom: 8,\n },\n jobCreatedText: {\n fontFamily: 'sf-medium',\n fontSize: 12,\n color: Colours.TEXT_LIGHT,\n marginBottom: 10,\n },\n jobActivityContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n jobStatusContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n width: 105,\n height: 30,\n paddingHorizontal: 8,\n borderRadius: 4,\n },\n jobStatusIcon: {\n color: '#fff',\n fontSize: 14,\n },\n jobStatusText: {\n color: '#fff',\n textAlign: 'center',\n fontFamily: 'sf-semibold',\n fontSize: 13,\n },\n jobStatusLine: {\n borderWidth: 1,\n borderStyle: 'dashed',\n width: 30,\n },\n jobStatusLineMask: {\n position: 'absolute',\n left: -1,\n top: -1,\n width: '100%',\n height: 1,\n backgroundColor: '#fff',\n zIndex: 1,\n },\n jobStatusCircle: {\n width: 18,\n height: 18,\n borderRadius: 9,\n },\n jobStatusDateText: {\n flex: 1,\n textAlign: 'right',\n fontFamily: 'sf-medium',\n fontSize: 14,\n color: Colours.TEXT_DARK,\n },\n});\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: Colours.getMainBrandingColourFromState(state),\n };\n};\n\nexport default connect(mapStateToProps, {})(MaintenanceListItem);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,EAAE,MAAM;IACboE,SAAS,EAAE,QAAQ;IACnBX,UAAU,EAAE,aAAa;IACzBC,QAAQ,EAAE;EACZ,CAAC;EACDjB,aAAa,EAAE;IACboC,WAAW,EAAE,CAAC;IACdG,WAAW,EAAE,QAAQ;IACrBT,KAAK,EAAE;EACT,CAAC;EACD5B,iBAAiB,EAAE;IACjB+B,QAAQ,EAAE,UAAU;IACpBO,IAAI,EAAE,CAAC,CAAC;IACRN,GAAG,EAAE,CAAC,CAAC;IACPJ,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,CAAC;IACT5C,eAAe,EAAE,MAAM;IACvBsD,MAAM,EAAE;EACV,CAAC;EACDtC,eAAe,EAAE;IACf2B,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVN,YAAY,EAAE;EAChB,CAAC;EACDrB,iBAAiB,EAAE;IACjBW,IAAI,EAAE,CAAC;IACPY,SAAS,EAAE,OAAO;IAClBX,UAAU,EAAE,WAAW;IACvBC,QAAQ,EAAE,EAAE;IACZ1D,KAAK,EAAE/B,OAAO,CAAC2F;EACjB;AACF,CAAC,CAAC;AAEF,MAAMuB,eAAe,GAAGC,KAAK,IAAI;EAC/B,OAAO;IACLnF,kBAAkB,EAAEhC,OAAO,CAACoH,8BAA8B,CAACD,KAAK;EAClE,CAAC;AACH,CAAC;AAED,eAAezH,OAAO,CAACwH,eAAe,EAAE,CAAC,CAAC,CAAC,CAAChH,mBAAmB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Component","Image","TouchableOpacity","View","StyleSheet","Text","_","Icon","connect","moment","getJobStatus","getJobPriority","Services","Helper","Colours","values","MaintenanceListItem","constructor","args","_defineProperty","navigation","navigate","screenRequestDetail","job","props","renderCommentCount","commentCount","createElement","style","styles","commentCountContainer","commentCountText","renderDescription","isEmpty","description","jobDescriptionText","renderSeen","hideSeen","showSeen","status","text","seen","jobSeenContainer","name","type","iconStyle","jobSeenIcon","color","colourBrandingMain","jobSeenText","render","createdTime","createdUnix","createdTimeText","format","assigneeText","Assignee","displayName","priority","isStaff","user","category","onPress","onPressJob","jobContainer","jobInnerContainer","jobTopSection","jobTopLeft","jobId","jobIdText","textEntityName","jobTitleText","title","room","jobLocationText","jobTypeSeenContainer","jobTypeContainer","backgroundColor","hexToRGBAstring","jobTypeText","numberOfLines","jobTopRight","jobCommentImage","source","require","jobBottomSection","jobCreatedText","jobActivityContainer","jobStatusContainer","jobStatusText","jobStatusLine","borderColor","jobStatusLineMask","jobStatusCircle","jobStatusDateText","jobPriorityContainer","jobPriorityText","label","create","marginVertical","paddingHorizontal","getShadowStyle","flexDirection","alignItems","paddingVertical","borderBottomWidth","borderBottomColor","LINEGREY","flex","fontFamily","fontSize","marginBottom","TEXT_DARK","TEXT_LIGHT","marginTop","padding","minWidth","maxWidth","borderRadius","justifyContent","textAlign","marginLeft","paddingTop","width","height","resizeMode","position","top","right","borderWidth","COLOUR_GREEN","jobStatusIcon","borderStyle","left","zIndex","mapStateToProps","state","getMainBrandingColourFromState","statusTypes","reducerKey","jobstatuses"],"sources":["MaintenanceListItem.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { Image, TouchableOpacity, View, StyleSheet } from \"react-native\";\nimport { Text } from \"@plusscommunities/pluss-core-app/components\";\nimport _ from \"lodash\";\nimport { Icon } from \"@rneui/themed\";\nimport { connect } from \"react-redux\";\nimport moment from \"moment\";\nimport { getJobStatus, getJobPriority } from \"../helper\";\nimport { Services } from \"../feature.config\";\nimport { Helper, Colours } from \"../core.config\";\nimport { values } from \"../values.config\";\n\nclass MaintenanceListItem extends Component {\n\tonPressJob = () => {\n\t\tServices.navigation.navigate(values.screenRequestDetail, {\n\t\t\tjob: this.props.job,\n\t\t});\n\t};\n\n\trenderCommentCount() {\n\t\tconst { job } = this.props;\n\t\tif (!job.commentCount) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={styles.commentCountContainer}>\n\t\t\t\t<Text style={styles.commentCountText}>\n\t\t\t\t\t{job.commentCount > 99 ? \"99\" : job.commentCount}\n\t\t\t\t</Text>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trenderDescription() {\n\t\tconst { job } = this.props;\n\t\tif (_.isEmpty(job.description)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <Text style={styles.jobDescriptionText}>{job.description}</Text>;\n\t}\n\n\trenderSeen() {\n\t\tconst { job, hideSeen } = this.props;\n\t\tconst showSeen =\n\t\t\t!job.status || job.status === getJobStatus(null, this.props).text;\n\t\tif (hideSeen || !showSeen || !job.seen) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={styles.jobSeenContainer}>\n\t\t\t\t<Icon\n\t\t\t\t\tname=\"check\"\n\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\ticonStyle={[\n\t\t\t\t\t\tstyles.jobSeenIcon,\n\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t]}\n\t\t\t\t/>\n\t\t\t\t<Text\n\t\t\t\t\tstyle={[styles.jobSeenText, { color: this.props.colourBrandingMain }]}\n\t\t\t\t>\n\t\t\t\t\tSeen\n\t\t\t\t</Text>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst { job } = this.props;\n\t\tconst createdTime = moment(job.createdUnix);\n\t\tconst createdTimeText = `${createdTime.format(\"ddd, D MMMM\")} • ${createdTime.format(\"h:mma\")}`;\n\t\tconst assigneeText = job.Assignee\n\t\t\t? `Assigned to\\n${job.Assignee.displayName}`\n\t\t\t: \"\";\n\t\tconst status = getJobStatus(job.status, this.props);\n\t\tconst priority = getJobPriority(job.priority);\n\t\tconst isStaff = this.props.user.category === \"staff\";\n\n\t\treturn (\n\t\t\t<TouchableOpacity onPress={this.onPressJob}>\n\t\t\t\t<View style={[styles.jobContainer, this.props.style]}>\n\t\t\t\t\t<View style={styles.jobInnerContainer}>\n\t\t\t\t\t\t<View style={styles.jobTopSection}>\n\t\t\t\t\t\t\t<View style={styles.jobTopLeft}>\n\t\t\t\t\t\t\t\t{job.jobId ? (\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\tstyles.jobIdText,\n\t\t\t\t\t\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t>{`${values.textEntityName} #${job.jobId}`}</Text>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t<Text style={styles.jobTitleText}>{job.title}</Text>\n\t\t\t\t\t\t\t\t{job.room ? (\n\t\t\t\t\t\t\t\t\t<Text style={styles.jobLocationText}>{job.room}</Text>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t<View style={styles.jobTypeSeenContainer}>\n\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\tstyles.jobTypeContainer,\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: Colours.hexToRGBAstring(\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.colourBrandingMain,\n\t\t\t\t\t\t\t\t\t\t\t\t\t0.2,\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\t\tstyles.jobTypeText,\n\t\t\t\t\t\t\t\t\t\t\t\t{ color: this.props.colourBrandingMain },\n\t\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t\tnumberOfLines={2}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{job.type}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t\t{this.renderSeen()}\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t<View style={styles.jobTopRight}>\n\t\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\t\tstyle={styles.jobCommentImage}\n\t\t\t\t\t\t\t\t\tsource={require(\"../images/speechbubble.png\")}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{this.renderCommentCount()}\n\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t<View style={styles.jobBottomSection}>\n\t\t\t\t\t\t\t{/* {this.renderDescription()} */}\n\t\t\t\t\t\t\t<Text style={styles.jobCreatedText}>{createdTimeText}</Text>\n\t\t\t\t\t\t\t<View style={styles.jobActivityContainer}>\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\tstyles.jobStatusContainer,\n\t\t\t\t\t\t\t\t\t\t{ backgroundColor: status?.color },\n\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{/* <Icon name=\"wrench\" type=\"font-awesome\" iconStyle={styles.jobStatusIcon} /> */}\n\t\t\t\t\t\t\t\t\t<Text style={styles.jobStatusText}>{status?.text}</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={[styles.jobStatusLine, { borderColor: status?.color }]}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<View style={styles.jobStatusLineMask} />\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\tstyles.jobStatusCircle,\n\t\t\t\t\t\t\t\t\t\t{ backgroundColor: status?.color },\n\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Text style={styles.jobStatusDateText}>{assigneeText}</Text>\n\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t{isStaff && (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\tstyles.jobPriorityContainer,\n\t\t\t\t\t\t\t\t\t\t{ backgroundColor: priority.color },\n\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Text style={styles.jobPriorityText}>{priority.label}</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</View>\n\t\t\t</TouchableOpacity>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tjobContainer: {\n\t\tmarginVertical: 8,\n\t\tpaddingHorizontal: 16,\n\t},\n\tjobInnerContainer: {\n\t\t...Helper.getShadowStyle(),\n\t},\n\tjobTopSection: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"flex-end\",\n\t\tpaddingHorizontal: 10,\n\t\tpaddingVertical: 10,\n\t\tborderBottomWidth: 1,\n\t\tborderBottomColor: Colours.LINEGREY,\n\t},\n\tjobTopLeft: {\n\t\tflex: 1,\n\t},\n\tjobIdText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 12,\n\t\tmarginBottom: 4,\n\t},\n\tjobTitleText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 18,\n\t\tcolor: Colours.TEXT_DARK,\n\t\tmarginBottom: 4,\n\t},\n\tjobLocationText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 12,\n\t\tcolor: Colours.TEXT_LIGHT,\n\t\tmarginBottom: 4,\n\t},\n\tjobTypeSeenContainer: {\n\t\tmarginTop: 4,\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t},\n\tjobTypeContainer: {\n\t\tpadding: 4,\n\t\tminWidth: 80,\n\t\tmaxWidth: 140,\n\t\tborderRadius: 4,\n\t\tjustifyContent: \"center\",\n\t},\n\tjobTypeText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 12,\n\t\ttextAlign: \"center\",\n\t\tmaxWidth: \"100%\",\n\t},\n\tjobSeenContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tmarginLeft: 10,\n\t},\n\tjobSeenIcon: {\n\t\tfontSize: 12,\n\t},\n\tjobSeenText: {\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 12,\n\t\tmarginLeft: 4,\n\t},\n\tjobTopRight: {\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tpaddingHorizontal: 10,\n\t\tpaddingTop: 10,\n\t},\n\tjobCommentImage: {\n\t\twidth: 34,\n\t\theight: 34,\n\t\tresizeMode: \"contain\",\n\t},\n\tcommentCountContainer: {\n\t\tposition: \"absolute\",\n\t\ttop: 0,\n\t\tright: 0,\n\t\tborderRadius: 10,\n\t\tborderWidth: 2,\n\t\tborderColor: \"#fff\",\n\t\twidth: 20,\n\t\theight: 20,\n\t\tbackgroundColor: Colours.COLOUR_GREEN,\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t},\n\tcommentCountText: {\n\t\ttextAlign: \"center\",\n\t\tfontFamily: \"sf-bold\",\n\t\tfontSize: 10,\n\t\tcolor: \"#fff\",\n\t},\n\tjobBottomSection: {\n\t\tpaddingHorizontal: 10,\n\t\tpaddingVertical: 16,\n\t},\n\tjobDescriptionText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 14,\n\t\tcolor: Colours.TEXT_DARK,\n\t\tmarginBottom: 8,\n\t},\n\tjobCreatedText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 12,\n\t\tcolor: Colours.TEXT_LIGHT,\n\t\tmarginBottom: 10,\n\t},\n\tjobActivityContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t},\n\tjobStatusContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\twidth: 105,\n\t\theight: 30,\n\t\tpaddingHorizontal: 8,\n\t\tborderRadius: 4,\n\t},\n\tjobStatusIcon: {\n\t\tcolor: \"#fff\",\n\t\tfontSize: 14,\n\t},\n\tjobStatusText: {\n\t\tcolor: \"#fff\",\n\t\ttextAlign: \"center\",\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 13,\n\t},\n\tjobStatusLine: {\n\t\tborderWidth: 1,\n\t\tborderStyle: \"dashed\",\n\t\twidth: 30,\n\t},\n\tjobStatusLineMask: {\n\t\tposition: \"absolute\",\n\t\tleft: -1,\n\t\ttop: -1,\n\t\twidth: \"100%\",\n\t\theight: 1,\n\t\tbackgroundColor: \"#fff\",\n\t\tzIndex: 1,\n\t},\n\tjobStatusCircle: {\n\t\twidth: 18,\n\t\theight: 18,\n\t\tborderRadius: 9,\n\t},\n\tjobStatusDateText: {\n\t\tflex: 1,\n\t\ttextAlign: \"right\",\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 14,\n\t\tcolor: Colours.TEXT_DARK,\n\t},\n\tjobPriorityContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\twidth: 105,\n\t\theight: 24,\n\t\tpaddingHorizontal: 8,\n\t\tborderRadius: 4,\n\t\tmarginTop: 8,\n\t},\n\tjobPriorityText: {\n\t\tcolor: \"#fff\",\n\t\ttextAlign: \"center\",\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 13,\n\t},\n});\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tuser: state.user,\n\t\tcolourBrandingMain: Colours.getMainBrandingColourFromState(state),\n\t\tstatusTypes: state[values.reducerKey].jobstatuses,\n\t\thideSeen: state[values.reducerKey].hideSeen,\n\t};\n};\n\n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Z/D,KAAK,EAAEjC,OAAO,CAACkG;EAChB,CAAC;EACDjB,oBAAoB,EAAE;IACrBO,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBgB,cAAc,EAAE,QAAQ;IACxBI,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE,EAAE;IACVxB,iBAAiB,EAAE,CAAC;IACpBkB,YAAY,EAAE,CAAC;IACfJ,SAAS,EAAE;EACZ,CAAC;EACDlB,eAAe,EAAE;IAChBjD,KAAK,EAAE,MAAM;IACbyE,SAAS,EAAE,QAAQ;IACnBX,UAAU,EAAE,aAAa;IACzBC,QAAQ,EAAE;EACX;AACD,CAAC,CAAC;AAEF,MAAMyB,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACN5E,IAAI,EAAE4E,KAAK,CAAC5E,IAAI;IAChBZ,kBAAkB,EAAElC,OAAO,CAAC2H,8BAA8B,CAACD,KAAK,CAAC;IACjEE,WAAW,EAAEF,KAAK,CAACzH,MAAM,CAAC4H,UAAU,CAAC,CAACC,WAAW;IACjDvG,QAAQ,EAAEmG,KAAK,CAACzH,MAAM,CAAC4H,UAAU,CAAC,CAACtG;EACpC,CAAC;AACF,CAAC;AAED,eAAe7B,OAAO,CAAC+H,eAAe,EAAE,CAAC,CAAC,CAAC,CAACvH,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,17 @@
|
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
4
|
+
import React, { Component } from "react";
|
|
5
|
+
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
|
6
|
+
import { Text } from "@plusscommunities/pluss-core-app/components";
|
|
7
|
+
import { connect } from "react-redux";
|
|
8
|
+
import { Icon } from "@rneui/themed";
|
|
9
|
+
import moment from "moment";
|
|
10
|
+
import _ from "lodash";
|
|
11
|
+
import { getJobStatus } from "../helper";
|
|
12
|
+
import { Services } from "../feature.config";
|
|
13
|
+
import { Colours, Helper } from "../core.config";
|
|
14
|
+
import { values } from "../values.config";
|
|
14
15
|
class MaintenanceWidgetItem extends Component {
|
|
15
16
|
constructor(...args) {
|
|
16
17
|
super(...args);
|
|
@@ -22,19 +23,17 @@ class MaintenanceWidgetItem extends Component {
|
|
|
22
23
|
}
|
|
23
24
|
render() {
|
|
24
25
|
const {
|
|
25
|
-
job
|
|
26
|
+
job,
|
|
27
|
+
hideSeen
|
|
26
28
|
} = this.props;
|
|
27
29
|
const createdTime = moment(job.createdUnix);
|
|
28
|
-
const createdTimeText = `${createdTime.format(
|
|
29
|
-
const
|
|
30
|
-
statusText,
|
|
31
|
-
statusColor
|
|
32
|
-
} = getJobStatusProps(job.status);
|
|
30
|
+
const createdTimeText = `${createdTime.format("ddd, D MMMM")} • ${createdTime.format("h:mma")}`;
|
|
31
|
+
const status = getJobStatus(job.status, this.props);
|
|
33
32
|
const seenText = (() => {
|
|
34
|
-
if (!job.status || job.status ===
|
|
35
|
-
return job.seen ?
|
|
33
|
+
if (!job.status || job.status === getJobStatus(null, this.props).text) {
|
|
34
|
+
return job.seen ? "Seen" : "Unseen";
|
|
36
35
|
}
|
|
37
|
-
return
|
|
36
|
+
return "";
|
|
38
37
|
})();
|
|
39
38
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
40
39
|
key: job.id,
|
|
@@ -50,7 +49,7 @@ class MaintenanceWidgetItem extends Component {
|
|
|
50
49
|
style: styles.jobTitleText
|
|
51
50
|
}, job.title), /*#__PURE__*/React.createElement(Text, {
|
|
52
51
|
style: styles.jobCreatedTimeText
|
|
53
|
-
}, createdTimeText), /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
}, createdTimeText), !hideSeen ? /*#__PURE__*/React.createElement(View, {
|
|
54
53
|
style: styles.jobSeenContainer
|
|
55
54
|
}, job.seen && !_.isEmpty(seenText) && /*#__PURE__*/React.createElement(Icon, {
|
|
56
55
|
name: "check",
|
|
@@ -62,15 +61,15 @@ class MaintenanceWidgetItem extends Component {
|
|
|
62
61
|
style: [styles.jobSeenText, job.seen && {
|
|
63
62
|
color: this.props.colourBrandingMain
|
|
64
63
|
}]
|
|
65
|
-
}, seenText))), /*#__PURE__*/React.createElement(View, {
|
|
64
|
+
}, seenText)) : null), /*#__PURE__*/React.createElement(View, {
|
|
66
65
|
style: styles.jobBottomSection
|
|
67
66
|
}, /*#__PURE__*/React.createElement(View, {
|
|
68
67
|
style: [styles.jobStatusContainer, {
|
|
69
|
-
backgroundColor:
|
|
68
|
+
backgroundColor: status === null || status === void 0 ? void 0 : status.color
|
|
70
69
|
}]
|
|
71
70
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
72
71
|
style: styles.jobStatusText
|
|
73
|
-
},
|
|
72
|
+
}, status === null || status === void 0 ? void 0 : status.text))))));
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
const styles = StyleSheet.create({
|
|
@@ -89,19 +88,19 @@ const styles = StyleSheet.create({
|
|
|
89
88
|
},
|
|
90
89
|
jobTitleText: {
|
|
91
90
|
flex: 1,
|
|
92
|
-
fontFamily:
|
|
91
|
+
fontFamily: "sf-semibold",
|
|
93
92
|
fontSize: 16,
|
|
94
93
|
color: Colours.TEXT_DARK
|
|
95
94
|
},
|
|
96
95
|
jobCreatedTimeText: {
|
|
97
|
-
fontFamily:
|
|
96
|
+
fontFamily: "sf-medium",
|
|
98
97
|
fontSize: 11,
|
|
99
98
|
color: Colours.TEXT_LIGHT,
|
|
100
99
|
paddingTop: 3
|
|
101
100
|
},
|
|
102
101
|
jobSeenContainer: {
|
|
103
|
-
flexDirection:
|
|
104
|
-
alignItems:
|
|
102
|
+
flexDirection: "row",
|
|
103
|
+
alignItems: "center",
|
|
105
104
|
paddingTop: 5
|
|
106
105
|
},
|
|
107
106
|
jobSeenIcon: {
|
|
@@ -109,40 +108,42 @@ const styles = StyleSheet.create({
|
|
|
109
108
|
marginRight: 4
|
|
110
109
|
},
|
|
111
110
|
jobSeenText: {
|
|
112
|
-
fontFamily:
|
|
111
|
+
fontFamily: "sf-semibold",
|
|
113
112
|
fontSize: 12,
|
|
114
113
|
color: Colours.TEXT_SUPER_LIGHT
|
|
115
114
|
},
|
|
116
115
|
jobBottomSection: {
|
|
117
|
-
alignItems:
|
|
118
|
-
justifyContent:
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
justifyContent: "center",
|
|
119
118
|
paddingVertical: 10,
|
|
120
119
|
borderTopWidth: 1,
|
|
121
120
|
borderTopColor: Colours.LINEGREY
|
|
122
121
|
},
|
|
123
122
|
jobStatusContainer: {
|
|
124
|
-
flexDirection:
|
|
125
|
-
alignItems:
|
|
126
|
-
justifyContent:
|
|
123
|
+
flexDirection: "row",
|
|
124
|
+
alignItems: "center",
|
|
125
|
+
justifyContent: "space-between",
|
|
127
126
|
width: 105,
|
|
128
127
|
height: 30,
|
|
129
128
|
paddingHorizontal: 8,
|
|
130
129
|
borderRadius: 4
|
|
131
130
|
},
|
|
132
131
|
jobStatusIcon: {
|
|
133
|
-
color:
|
|
132
|
+
color: "#fff",
|
|
134
133
|
fontSize: 14
|
|
135
134
|
},
|
|
136
135
|
jobStatusText: {
|
|
137
|
-
color:
|
|
138
|
-
textAlign:
|
|
139
|
-
fontFamily:
|
|
136
|
+
color: "#fff",
|
|
137
|
+
textAlign: "center",
|
|
138
|
+
fontFamily: "sf-semibold",
|
|
140
139
|
fontSize: 13
|
|
141
140
|
}
|
|
142
141
|
});
|
|
143
142
|
const mapStateToProps = state => {
|
|
144
143
|
return {
|
|
145
|
-
colourBrandingMain: Colours.getMainBrandingColourFromState(state)
|
|
144
|
+
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
145
|
+
statusTypes: state[values.reducerKey].jobstatuses,
|
|
146
|
+
hideSeen: state[values.reducerKey].hideSeen
|
|
146
147
|
};
|
|
147
148
|
};
|
|
148
149
|
export default connect(mapStateToProps, {})(MaintenanceWidgetItem);
|