@plusscommunities/pluss-maintenance-app 6.0.19 → 6.0.21-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/actions/JobActions.js +4 -4
- package/dist/module/actions/JobActions.js.map +1 -1
- package/dist/module/actions/index.js +1 -1
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +1 -1
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/index.js +3 -3
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/maintenanceActions.js +36 -36
- package/dist/module/apis/maintenanceActions.js.map +1 -1
- package/dist/module/apis/userActions.js +5 -5
- package/dist/module/apis/userActions.js.map +1 -1
- package/dist/module/components/FilterPopupMenu.js +49 -49
- package/dist/module/components/FilterPopupMenu.js.map +1 -1
- package/dist/module/components/MaintenanceList.js +38 -38
- package/dist/module/components/MaintenanceList.js.map +1 -1
- package/dist/module/components/MaintenanceListItem.js +62 -62
- package/dist/module/components/MaintenanceListItem.js.map +1 -1
- package/dist/module/components/MaintenanceWidgetItem.js +27 -27
- package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
- package/dist/module/components/PrioritySelectorPopup.js +15 -15
- package/dist/module/components/PrioritySelectorPopup.js.map +1 -1
- package/dist/module/components/StatusSelectorPopup.js +16 -16
- package/dist/module/components/StatusSelectorPopup.js.map +1 -1
- package/dist/module/components/WidgetLarge.js +2 -2
- package/dist/module/components/WidgetLarge.js.map +1 -1
- package/dist/module/components/WidgetSmall.js +19 -19
- package/dist/module/components/WidgetSmall.js.map +1 -1
- package/dist/module/core.config.js +1 -1
- package/dist/module/core.config.js.map +1 -1
- package/dist/module/feature.config.js +17 -17
- package/dist/module/feature.config.js.map +1 -1
- package/dist/module/helper.js +10 -10
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +11 -11
- package/dist/module/index.js.map +1 -1
- package/dist/module/reducers/JobsReducer.js +13 -13
- package/dist/module/reducers/JobsReducer.js.map +1 -1
- package/dist/module/screens/JobTypePicker.js +17 -17
- package/dist/module/screens/JobTypePicker.js.map +1 -1
- package/dist/module/screens/MaintenancePage.js +10 -10
- package/dist/module/screens/MaintenancePage.js.map +1 -1
- package/dist/module/screens/MaintenanceUserPicker.js +129 -22
- package/dist/module/screens/MaintenanceUserPicker.js.map +1 -1
- package/dist/module/screens/RequestDetail.js +146 -146
- package/dist/module/screens/RequestDetail.js.map +1 -1
- package/dist/module/screens/RequestNotes.js +59 -59
- package/dist/module/screens/RequestNotes.js.map +1 -1
- package/dist/module/screens/ServiceRequest.js +187 -187
- package/dist/module/screens/ServiceRequest.js.map +1 -1
- package/dist/module/values.config.a.js +30 -30
- package/dist/module/values.config.a.js.map +1 -1
- package/dist/module/values.config.default.js +34 -34
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.enquiry.js +34 -34
- package/dist/module/values.config.enquiry.js.map +1 -1
- package/dist/module/values.config.feedback.js +34 -34
- package/dist/module/values.config.feedback.js.map +1 -1
- package/dist/module/values.config.food.js +34 -34
- package/dist/module/values.config.food.js.map +1 -1
- package/dist/module/values.config.forms.js +34 -34
- package/dist/module/values.config.forms.js.map +1 -1
- package/dist/module/values.config.js +34 -34
- package/dist/module/values.config.js.map +1 -1
- package/package.json +51 -51
- package/src/actions/JobActions.js +67 -60
- package/src/actions/index.js +1 -1
- package/src/actions/types.js +1 -2
- package/src/apis/index.js +3 -3
- package/src/apis/maintenanceActions.js +189 -178
- package/src/apis/userActions.js +17 -17
- package/src/components/FilterPopupMenu.js +313 -256
- package/src/components/MaintenanceList.js +396 -317
- package/src/components/MaintenanceListItem.js +347 -288
- package/src/components/MaintenanceWidgetItem.js +145 -124
- package/src/components/PrioritySelectorPopup.js +81 -68
- package/src/components/StatusSelectorPopup.js +81 -70
- package/src/components/WidgetLarge.js +5 -5
- package/src/components/WidgetSmall.js +153 -133
- package/src/core.config.js +27 -3
- package/src/feature.config.js +62 -62
- package/src/helper.js +58 -53
- package/src/index.js +22 -22
- package/src/reducers/JobsReducer.js +85 -66
- package/src/screens/JobTypePicker.js +115 -92
- package/src/screens/MaintenancePage.js +89 -80
- package/src/screens/MaintenanceUserPicker.js +252 -100
- package/src/screens/RequestDetail.js +1348 -1125
- package/src/screens/RequestNotes.js +950 -806
- package/src/screens/ServiceRequest.js +1778 -1550
- package/src/values.config.a.js +33 -33
- package/src/values.config.default.js +39 -39
- package/src/values.config.enquiry.js +39 -39
- package/src/values.config.feedback.js +39 -39
- package/src/values.config.food.js +39 -39
- package/src/values.config.forms.js +39 -39
- package/src/values.config.js +39 -39
|
@@ -1,26 +1,26 @@
|
|
|
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 { Dimensions, Platform, KeyboardAvoidingView, ScrollView, Text, TouchableOpacity, View, Switch, FlatList, ImageBackground, Keyboard } from
|
|
6
|
-
import DateTimePicker from
|
|
7
|
-
import { Icon } from
|
|
8
|
-
import _ from
|
|
9
|
-
import moment from
|
|
10
|
-
import { connect } from
|
|
11
|
-
import { jobAdded } from
|
|
12
|
-
import { maintenanceActions, userActions } from
|
|
13
|
-
import { Services } from
|
|
14
|
-
import { Components, Colours, Helper, Config } from
|
|
15
|
-
import { values } from
|
|
16
|
-
const PHOTO_SIZE = (Dimensions.get(
|
|
4
|
+
import React, { Component } from "react";
|
|
5
|
+
import { Dimensions, Platform, KeyboardAvoidingView, ScrollView, Text, TouchableOpacity, View, Switch, FlatList, ImageBackground, Keyboard } 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 { jobAdded } from "../actions";
|
|
12
|
+
import { maintenanceActions, userActions } from "../apis";
|
|
13
|
+
import { Services } from "../feature.config";
|
|
14
|
+
import { Components, Colours, Helper, Config } from "../core.config";
|
|
15
|
+
import { values } from "../values.config";
|
|
16
|
+
const PHOTO_SIZE = (Dimensions.get("window").width - 64) / 3;
|
|
17
17
|
class MaintenanceRequest extends Component {
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(props);
|
|
20
20
|
_defineProperty(this, "checkUserPermissions", async () => {
|
|
21
21
|
var _this$props$permissio;
|
|
22
22
|
// PC-1255: Check if user has userManagement permission
|
|
23
|
-
const hasUserManagement = ((_this$props$permissio = this.props.permissions) === null || _this$props$permissio === void 0 ? void 0 : _this$props$permissio.includes(
|
|
23
|
+
const hasUserManagement = ((_this$props$permissio = this.props.permissions) === null || _this$props$permissio === void 0 ? void 0 : _this$props$permissio.includes("userManagement")) || false;
|
|
24
24
|
if (hasUserManagement) {
|
|
25
25
|
this.setState({
|
|
26
26
|
canCreateOnBehalf: true
|
|
@@ -36,18 +36,18 @@ class MaintenanceRequest extends Component {
|
|
|
36
36
|
try {
|
|
37
37
|
const response = await userActions.getSiteUsers(this.props.site);
|
|
38
38
|
// PC-1255: Load all users (not just residents) to match web admin behavior
|
|
39
|
-
const users = _.sortBy(response.data.Items || [], u => (u.displayName ||
|
|
39
|
+
const users = _.sortBy(response.data.Items || [], u => (u.displayName || "").toLowerCase());
|
|
40
40
|
this.setState({
|
|
41
41
|
users
|
|
42
42
|
});
|
|
43
43
|
} catch (error) {
|
|
44
|
-
console.log(
|
|
44
|
+
console.log("Error loading site users:", error);
|
|
45
45
|
// Fall back to default user if loading fails
|
|
46
46
|
this.setDefaultUser();
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
_defineProperty(this, "setDefaultUser", () => {
|
|
50
|
-
if (this.props.userType !==
|
|
50
|
+
if (this.props.userType !== "KIOSK") {
|
|
51
51
|
const defaultUser = {
|
|
52
52
|
userId: this.props.uid,
|
|
53
53
|
displayName: this.props.displayName,
|
|
@@ -57,7 +57,7 @@ class MaintenanceRequest extends Component {
|
|
|
57
57
|
selectedUser: defaultUser,
|
|
58
58
|
userName: this.props.displayName,
|
|
59
59
|
roomNumber: this.props.unit,
|
|
60
|
-
phone: !_.isEmpty(this.props.phoneNumber) ? this.props.phoneNumber :
|
|
60
|
+
phone: !_.isEmpty(this.props.phoneNumber) ? this.props.phoneNumber : ""
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
});
|
|
@@ -65,7 +65,7 @@ class MaintenanceRequest extends Component {
|
|
|
65
65
|
const update = {
|
|
66
66
|
userName
|
|
67
67
|
};
|
|
68
|
-
if (!this.state.customFields || !_.some(this.state.customFields,
|
|
68
|
+
if (!this.state.customFields || !_.some(this.state.customFields, "isTitle")) {
|
|
69
69
|
update.title = userName;
|
|
70
70
|
}
|
|
71
71
|
this.setState(update);
|
|
@@ -103,14 +103,14 @@ class MaintenanceRequest extends Component {
|
|
|
103
103
|
if (userDetails.unit) {
|
|
104
104
|
update.roomNumber = userDetails.unit;
|
|
105
105
|
}
|
|
106
|
-
if (!this.state.customFields || !_.some(this.state.customFields,
|
|
106
|
+
if (!this.state.customFields || !_.some(this.state.customFields, "isTitle")) {
|
|
107
107
|
update.title = userDetails.displayName || null;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
} catch (error) {
|
|
111
111
|
// Permission denied (403) or other error - continue without auto-population
|
|
112
112
|
// User can still manually enter contact details
|
|
113
|
-
console.log(
|
|
113
|
+
console.log("Could not fetch user details for auto-population:", error);
|
|
114
114
|
} finally {
|
|
115
115
|
// In any case, we still need a title. Inform the user to set one form field as a title.
|
|
116
116
|
if (!state.title && !update.title) {
|
|
@@ -143,7 +143,7 @@ class MaintenanceRequest extends Component {
|
|
|
143
143
|
};
|
|
144
144
|
const field = update.customFields[fieldId];
|
|
145
145
|
field.answer = _.xor(field.answer || [], [answer]);
|
|
146
|
-
if (field.isTitle) update.title = field.answer.join(
|
|
146
|
+
if (field.isTitle) update.title = field.answer.join(", ");
|
|
147
147
|
this.setState(update);
|
|
148
148
|
});
|
|
149
149
|
_defineProperty(this, "onOpenDatePicker", (field, fieldId) => {
|
|
@@ -176,12 +176,12 @@ class MaintenanceRequest extends Component {
|
|
|
176
176
|
};
|
|
177
177
|
const field = update.customFields[dateFieldId];
|
|
178
178
|
const dateObj = moment(date);
|
|
179
|
-
if (popUpType ===
|
|
180
|
-
field.answer = dateObj.format(
|
|
181
|
-
if (field.isTitle) update.title = dateObj.format(
|
|
179
|
+
if (popUpType === "date") {
|
|
180
|
+
field.answer = dateObj.format("YYYY-MM-DD");
|
|
181
|
+
if (field.isTitle) update.title = dateObj.format("DD MMM YYYY");
|
|
182
182
|
} else {
|
|
183
|
-
field.answer = dateObj.format(
|
|
184
|
-
if (field.isTitle) update.title = dateObj.format(
|
|
183
|
+
field.answer = dateObj.format("HH:mm");
|
|
184
|
+
if (field.isTitle) update.title = dateObj.format("h:mm a");
|
|
185
185
|
}
|
|
186
186
|
this.setState(update);
|
|
187
187
|
});
|
|
@@ -192,7 +192,7 @@ class MaintenanceRequest extends Component {
|
|
|
192
192
|
const imagesUpdate = this.getImages(imageFieldId);
|
|
193
193
|
imagesUpdate.splice(imagesUpdate.length - 1, 0, {
|
|
194
194
|
uploading: true,
|
|
195
|
-
uploadProgress:
|
|
195
|
+
uploadProgress: "0%",
|
|
196
196
|
uploadUri,
|
|
197
197
|
imageUri,
|
|
198
198
|
allowRetry: true
|
|
@@ -220,7 +220,7 @@ class MaintenanceRequest extends Component {
|
|
|
220
220
|
const imagesUpdate = this.getImages(imageFieldId);
|
|
221
221
|
imagesUpdate.map(img => {
|
|
222
222
|
if (img.uploadUri === uploadUri && img.uploading) {
|
|
223
|
-
img.url = uri.replace(
|
|
223
|
+
img.url = uri.replace("/general/", "/general1400/");
|
|
224
224
|
img.thumbNailExists = false;
|
|
225
225
|
img.thumbNailUrl = Helper.getThumb300(img.url);
|
|
226
226
|
img.allowRetry = true;
|
|
@@ -236,7 +236,7 @@ class MaintenanceRequest extends Component {
|
|
|
236
236
|
imagesUpdate.map(img => {
|
|
237
237
|
if (img.uploadUri === uploadUri) {
|
|
238
238
|
img.uploading = true; // Requried for retry
|
|
239
|
-
img.uploadProgress =
|
|
239
|
+
img.uploadProgress = "";
|
|
240
240
|
img.allowRetry = true;
|
|
241
241
|
}
|
|
242
242
|
});
|
|
@@ -260,7 +260,7 @@ class MaintenanceRequest extends Component {
|
|
|
260
260
|
const documentsUpdate = this.getDocuments(documentFieldId);
|
|
261
261
|
documentsUpdate.splice(documentsUpdate.length - 1, 0, {
|
|
262
262
|
uploading: true,
|
|
263
|
-
uploadProgress:
|
|
263
|
+
uploadProgress: "0%",
|
|
264
264
|
uploadUri,
|
|
265
265
|
documentUri,
|
|
266
266
|
documentName,
|
|
@@ -285,7 +285,7 @@ class MaintenanceRequest extends Component {
|
|
|
285
285
|
documentsUpdate.map(doc => {
|
|
286
286
|
if (doc.uploadUri === uploadUri && doc.uploading) {
|
|
287
287
|
doc.uploading = false;
|
|
288
|
-
doc.uploadProgress =
|
|
288
|
+
doc.uploadProgress = "100%";
|
|
289
289
|
doc.url = uri;
|
|
290
290
|
doc.allowRetry = true;
|
|
291
291
|
}
|
|
@@ -297,7 +297,7 @@ class MaintenanceRequest extends Component {
|
|
|
297
297
|
documentsUpdate.map(doc => {
|
|
298
298
|
if (doc.uploadUri === uploadUri) {
|
|
299
299
|
doc.uploading = true; // Requried for retry
|
|
300
|
-
doc.uploadProgress =
|
|
300
|
+
doc.uploadProgress = "";
|
|
301
301
|
doc.allowRetry = true;
|
|
302
302
|
}
|
|
303
303
|
});
|
|
@@ -309,19 +309,19 @@ class MaintenanceRequest extends Component {
|
|
|
309
309
|
type,
|
|
310
310
|
answer
|
|
311
311
|
} = field;
|
|
312
|
-
if ([
|
|
312
|
+
if (["staticTitle", "staticText"].includes(type)) return true;
|
|
313
313
|
const checkMandatory = () => {
|
|
314
314
|
if (!mandatory) return true;
|
|
315
315
|
switch (type) {
|
|
316
|
-
case
|
|
316
|
+
case "yn":
|
|
317
317
|
return _.isBoolean(answer);
|
|
318
|
-
case
|
|
318
|
+
case "image":
|
|
319
319
|
const imagesList = this.getImageUrls(fieldId);
|
|
320
320
|
return imagesList.length > 0;
|
|
321
|
-
case
|
|
321
|
+
case "document":
|
|
322
322
|
const documentsList = this.getDocumentAnswers(fieldId);
|
|
323
323
|
return documentsList.length > 0;
|
|
324
|
-
case
|
|
324
|
+
case "checkbox":
|
|
325
325
|
return _.isArray(answer) && answer.length > 0;
|
|
326
326
|
default:
|
|
327
327
|
return !_.isNil(answer) && !_.isEmpty(answer);
|
|
@@ -330,12 +330,12 @@ class MaintenanceRequest extends Component {
|
|
|
330
330
|
const checkFormat = () => {
|
|
331
331
|
if (_.isNil(answer) || _.isEmpty(answer)) return true;
|
|
332
332
|
switch (type) {
|
|
333
|
-
case
|
|
333
|
+
case "email":
|
|
334
334
|
return Helper.isEmail(answer);
|
|
335
|
-
case
|
|
336
|
-
return moment(answer,
|
|
337
|
-
case
|
|
338
|
-
return moment(answer,
|
|
335
|
+
case "date":
|
|
336
|
+
return moment(answer, "YYYY-MM-DD", true).isValid();
|
|
337
|
+
case "time":
|
|
338
|
+
return moment(answer, "HH:mm", true).isValid();
|
|
339
339
|
default:
|
|
340
340
|
return true;
|
|
341
341
|
}
|
|
@@ -371,8 +371,8 @@ class MaintenanceRequest extends Component {
|
|
|
371
371
|
// Fix custom images field answers
|
|
372
372
|
const customFields = _.cloneDeep(this.state.customFields);
|
|
373
373
|
const updatedCustomFields = customFields.map((field, fieldId) => {
|
|
374
|
-
if (field.type ===
|
|
375
|
-
if (field.type ===
|
|
374
|
+
if (field.type === "image") field.answer = this.getImageUrls(fieldId);
|
|
375
|
+
if (field.type === "document") field.answer = this.getDocumentAnswers(fieldId);
|
|
376
376
|
return field;
|
|
377
377
|
});
|
|
378
378
|
maintenanceActions.sendMaintenanceRequest(this.props.uid, this.state.userName, this.state.phone, this.state.roomNumber, this.state.title, description, null, this.state.type, images, Helper.getSite(this.props.site), this.state.isHome, this.state.times, updatedCustomFields).then(res => {
|
|
@@ -390,7 +390,7 @@ class MaintenanceRequest extends Component {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
}).catch(err => {
|
|
393
|
-
console.log(
|
|
393
|
+
console.log("maintenance submission fail.");
|
|
394
394
|
console.log(err);
|
|
395
395
|
this.setState({
|
|
396
396
|
submitting: false
|
|
@@ -402,7 +402,7 @@ class MaintenanceRequest extends Component {
|
|
|
402
402
|
const job = await maintenanceActions.getJob(Helper.getSite(this.props.site), id);
|
|
403
403
|
this.props.jobAdded(job.data);
|
|
404
404
|
} catch (error) {
|
|
405
|
-
console.log(
|
|
405
|
+
console.log("refreshRequest error", error);
|
|
406
406
|
}
|
|
407
407
|
});
|
|
408
408
|
_defineProperty(this, "validateCustomFields", () => {
|
|
@@ -521,7 +521,7 @@ class MaintenanceRequest extends Component {
|
|
|
521
521
|
this.setDocuments(documentsUpdate, fieldId);
|
|
522
522
|
});
|
|
523
523
|
_defineProperty(this, "toggleFullscreenVideo", url => {
|
|
524
|
-
if (typeof url !==
|
|
524
|
+
if (typeof url !== "string") url = "";
|
|
525
525
|
this.setState({
|
|
526
526
|
showFullscreenVideo: url.length > 0,
|
|
527
527
|
currentVideoUrl: url
|
|
@@ -534,19 +534,19 @@ class MaintenanceRequest extends Component {
|
|
|
534
534
|
error: null,
|
|
535
535
|
showError: false,
|
|
536
536
|
loadingTypes: values.forceCustomFields,
|
|
537
|
-
userName:
|
|
538
|
-
roomNumber:
|
|
539
|
-
phone:
|
|
540
|
-
title:
|
|
541
|
-
description:
|
|
542
|
-
times:
|
|
543
|
-
type:
|
|
537
|
+
userName: "",
|
|
538
|
+
roomNumber: "",
|
|
539
|
+
phone: "",
|
|
540
|
+
title: "",
|
|
541
|
+
description: "",
|
|
542
|
+
times: "",
|
|
543
|
+
type: "General",
|
|
544
544
|
uploadingImage: false,
|
|
545
545
|
images: [{
|
|
546
546
|
add: true
|
|
547
547
|
}],
|
|
548
548
|
showFullscreenVideo: false,
|
|
549
|
-
currentVideoUrl:
|
|
549
|
+
currentVideoUrl: "",
|
|
550
550
|
isHome: false,
|
|
551
551
|
types: [],
|
|
552
552
|
confirmationToShow: false,
|
|
@@ -554,7 +554,7 @@ class MaintenanceRequest extends Component {
|
|
|
554
554
|
customFieldImages: {},
|
|
555
555
|
customFieldDocuments: {},
|
|
556
556
|
isDateTimePickerVisible: false,
|
|
557
|
-
popUpType:
|
|
557
|
+
popUpType: "date",
|
|
558
558
|
dateFieldId: null,
|
|
559
559
|
imageFieldId: null,
|
|
560
560
|
// PC-1255: On-behalf request fields
|
|
@@ -564,9 +564,9 @@ class MaintenanceRequest extends Component {
|
|
|
564
564
|
};
|
|
565
565
|
this.checkThumb = null;
|
|
566
566
|
this.keyboardTypes = {
|
|
567
|
-
phone:
|
|
568
|
-
email:
|
|
569
|
-
text:
|
|
567
|
+
phone: "phone-pad",
|
|
568
|
+
email: "email-address",
|
|
569
|
+
text: "default"
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
572
|
componentDidMount() {
|
|
@@ -596,9 +596,9 @@ class MaintenanceRequest extends Component {
|
|
|
596
596
|
onConfirmationReset() {
|
|
597
597
|
this.setState({
|
|
598
598
|
confirmationToShow: false,
|
|
599
|
-
title:
|
|
600
|
-
description:
|
|
601
|
-
times:
|
|
599
|
+
title: "",
|
|
600
|
+
description: "",
|
|
601
|
+
times: "",
|
|
602
602
|
isHome: false,
|
|
603
603
|
uploadingImage: false,
|
|
604
604
|
images: [{
|
|
@@ -611,7 +611,7 @@ class MaintenanceRequest extends Component {
|
|
|
611
611
|
customFieldImages: {},
|
|
612
612
|
customFieldDocuments: {},
|
|
613
613
|
isDateTimePickerVisible: false,
|
|
614
|
-
popUpType:
|
|
614
|
+
popUpType: "date",
|
|
615
615
|
dateFieldId: null,
|
|
616
616
|
imageFieldId: null
|
|
617
617
|
}, () => this.pickType(this.state.type));
|
|
@@ -642,7 +642,7 @@ class MaintenanceRequest extends Component {
|
|
|
642
642
|
customFields: selected.hasCustomFields && selected.customFields.length > 0 ? _.cloneDeep(selected.customFields) : [],
|
|
643
643
|
loadingTypes: false
|
|
644
644
|
};
|
|
645
|
-
if (!_.isEmpty(update.customFields) && !_.some(update.customFields,
|
|
645
|
+
if (!_.isEmpty(update.customFields) && !_.some(update.customFields, "isTitle")) {
|
|
646
646
|
update.title = this.state.userName;
|
|
647
647
|
}
|
|
648
648
|
this.setState(update);
|
|
@@ -672,7 +672,7 @@ class MaintenanceRequest extends Component {
|
|
|
672
672
|
if (!this.props.connected) {
|
|
673
673
|
this.setState({
|
|
674
674
|
error: {
|
|
675
|
-
message:
|
|
675
|
+
message: "No internet connection detected"
|
|
676
676
|
}
|
|
677
677
|
});
|
|
678
678
|
}
|
|
@@ -686,14 +686,14 @@ class MaintenanceRequest extends Component {
|
|
|
686
686
|
|
|
687
687
|
// PC-1255: Validate user selection for on-behalf requests
|
|
688
688
|
if (this.state.canCreateOnBehalf && !this.state.selectedUser) {
|
|
689
|
-
console.log(
|
|
689
|
+
console.log("submitRequest - no user selected for on-behalf request");
|
|
690
690
|
this.setState({
|
|
691
691
|
showError: true
|
|
692
692
|
});
|
|
693
693
|
return;
|
|
694
694
|
}
|
|
695
695
|
if (title.length === 0 || !roomNumber || roomNumber.length === 0) {
|
|
696
|
-
console.log(
|
|
696
|
+
console.log("submitRequest - error", {
|
|
697
697
|
title,
|
|
698
698
|
roomNumber
|
|
699
699
|
});
|
|
@@ -704,7 +704,7 @@ class MaintenanceRequest extends Component {
|
|
|
704
704
|
}
|
|
705
705
|
if (hasCustomFields) {
|
|
706
706
|
if (!this.validateCustomFields()) {
|
|
707
|
-
console.log(
|
|
707
|
+
console.log("submitRequest - custom fields error");
|
|
708
708
|
this.setState({
|
|
709
709
|
showError: true
|
|
710
710
|
});
|
|
@@ -712,7 +712,7 @@ class MaintenanceRequest extends Component {
|
|
|
712
712
|
}
|
|
713
713
|
} else {
|
|
714
714
|
if (isHome && times.length < 2) {
|
|
715
|
-
console.log(
|
|
715
|
+
console.log("submitRequest - error", {
|
|
716
716
|
isHome,
|
|
717
717
|
times
|
|
718
718
|
});
|
|
@@ -736,8 +736,8 @@ class MaintenanceRequest extends Component {
|
|
|
736
736
|
width: 1400
|
|
737
737
|
},
|
|
738
738
|
quality: 0.8,
|
|
739
|
-
fileName:
|
|
740
|
-
popupTitle:
|
|
739
|
+
fileName: "serviceImage",
|
|
740
|
+
popupTitle: "Upload Image",
|
|
741
741
|
userId: this.props.uid,
|
|
742
742
|
allowsEditing: false,
|
|
743
743
|
multiple: true,
|
|
@@ -812,7 +812,7 @@ class MaintenanceRequest extends Component {
|
|
|
812
812
|
style: styles.documentTypeText
|
|
813
813
|
}, item.documentExt)), /*#__PURE__*/React.createElement(Text, {
|
|
814
814
|
style: styles.documentText
|
|
815
|
-
}, `${item.documentName}${item.uploading ? ` - ${item.uploadProgress}` :
|
|
815
|
+
}, `${item.documentName}${item.uploading ? ` - ${item.uploadProgress}` : ""}`), !item.uploading && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
816
816
|
style: styles.removeDocumentButton,
|
|
817
817
|
onPress: () => this.removeDocument(index, fieldId)
|
|
818
818
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -829,7 +829,7 @@ class MaintenanceRequest extends Component {
|
|
|
829
829
|
style: {
|
|
830
830
|
padding: 16,
|
|
831
831
|
flex: 1,
|
|
832
|
-
backgroundColor:
|
|
832
|
+
backgroundColor: "#fff"
|
|
833
833
|
}
|
|
834
834
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
835
835
|
style: styles.requestSuccess
|
|
@@ -857,7 +857,7 @@ class MaintenanceRequest extends Component {
|
|
|
857
857
|
style: styles.documentListContainer
|
|
858
858
|
}, documentsList.length > 0 ? documentsList.map((document, index) => this.renderDocument(document, index, fieldId)) : null, /*#__PURE__*/React.createElement(Components.DocumentUploader, {
|
|
859
859
|
buttonTitle: "Add Files",
|
|
860
|
-
allowedTypes: [
|
|
860
|
+
allowedTypes: ["application/pdf"],
|
|
861
861
|
onUploadStarted: (uploadUri, uri, name, ext) => this.onUploadStartedDocument(uploadUri, uri, name, ext, fieldId),
|
|
862
862
|
onUploadProgress: progress => this.onUploadProgressDocument(progress, fieldId),
|
|
863
863
|
onUploadSuccess: (uri, uploadUri) => this.onUploadSuccessDocument(uri, uploadUri, fieldId),
|
|
@@ -870,16 +870,16 @@ class MaintenanceRequest extends Component {
|
|
|
870
870
|
}
|
|
871
871
|
renderDateField(field, fieldId, sectionStyle) {
|
|
872
872
|
let displayText, placeHolder, icon, errorText;
|
|
873
|
-
if (field.type ===
|
|
874
|
-
displayText = field.answer ? moment(field.answer,
|
|
875
|
-
placeHolder =
|
|
876
|
-
icon =
|
|
877
|
-
errorText =
|
|
873
|
+
if (field.type === "date") {
|
|
874
|
+
displayText = field.answer ? moment(field.answer, "YYYY-MM-DD").format("DD MMM YYYY") : "";
|
|
875
|
+
placeHolder = "dd mmm yyyy";
|
|
876
|
+
icon = "calendar";
|
|
877
|
+
errorText = "Not a valid date";
|
|
878
878
|
} else {
|
|
879
|
-
displayText = field.answer ? moment(field.answer,
|
|
880
|
-
placeHolder =
|
|
881
|
-
icon =
|
|
882
|
-
errorText =
|
|
879
|
+
displayText = field.answer ? moment(field.answer, "HH:mm").format("h:mm a") : "";
|
|
880
|
+
placeHolder = "--:-- --";
|
|
881
|
+
icon = "clock-o";
|
|
882
|
+
errorText = "Not a valid time";
|
|
883
883
|
}
|
|
884
884
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
885
885
|
key: fieldId,
|
|
@@ -917,7 +917,7 @@ class MaintenanceRequest extends Component {
|
|
|
917
917
|
marginBottom: 24
|
|
918
918
|
};
|
|
919
919
|
switch (field.type) {
|
|
920
|
-
case
|
|
920
|
+
case "yn":
|
|
921
921
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
922
922
|
key: fieldId,
|
|
923
923
|
label: field.label,
|
|
@@ -929,7 +929,7 @@ class MaintenanceRequest extends Component {
|
|
|
929
929
|
showError: this.state.showError,
|
|
930
930
|
required: field.mandatory
|
|
931
931
|
});
|
|
932
|
-
case
|
|
932
|
+
case "multichoice":
|
|
933
933
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
934
934
|
key: fieldId,
|
|
935
935
|
label: field.label,
|
|
@@ -947,7 +947,7 @@ class MaintenanceRequest extends Component {
|
|
|
947
947
|
showError: this.state.showError,
|
|
948
948
|
required: field.mandatory
|
|
949
949
|
});
|
|
950
|
-
case
|
|
950
|
+
case "checkbox":
|
|
951
951
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
952
952
|
key: fieldId,
|
|
953
953
|
label: field.label,
|
|
@@ -977,9 +977,9 @@ class MaintenanceRequest extends Component {
|
|
|
977
977
|
style: styles.multiChoiceText
|
|
978
978
|
}, o));
|
|
979
979
|
}));
|
|
980
|
-
case
|
|
981
|
-
case
|
|
982
|
-
case
|
|
980
|
+
case "text":
|
|
981
|
+
case "email":
|
|
982
|
+
case "phone":
|
|
983
983
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
984
984
|
key: fieldId,
|
|
985
985
|
label: field.label,
|
|
@@ -990,28 +990,28 @@ class MaintenanceRequest extends Component {
|
|
|
990
990
|
squaredCorners: true,
|
|
991
991
|
isValid: () => this.isFieldValid(field, fieldId),
|
|
992
992
|
showError: this.state.showError,
|
|
993
|
-
errorText: field.type ===
|
|
993
|
+
errorText: field.type === "email" ? "Not a valid email" : undefined,
|
|
994
994
|
required: field.mandatory,
|
|
995
995
|
sectionStyle: sectionStyle,
|
|
996
996
|
autoCapitalize: "sentences",
|
|
997
997
|
keyboardType: this.keyboardTypes[field.type]
|
|
998
998
|
});
|
|
999
|
-
case
|
|
999
|
+
case "staticTitle":
|
|
1000
1000
|
return /*#__PURE__*/React.createElement(Text, {
|
|
1001
1001
|
key: fieldId,
|
|
1002
1002
|
style: [styles.staticTitle, {
|
|
1003
1003
|
color: this.props.colourBrandingMain
|
|
1004
1004
|
}, sectionStyle]
|
|
1005
1005
|
}, field.label);
|
|
1006
|
-
case
|
|
1006
|
+
case "staticText":
|
|
1007
1007
|
return /*#__PURE__*/React.createElement(View, {
|
|
1008
1008
|
key: fieldId,
|
|
1009
1009
|
style: [styles.staticText, sectionStyle]
|
|
1010
1010
|
}, Helper.toParagraphed(field.label, styles.staticText));
|
|
1011
|
-
case
|
|
1012
|
-
case
|
|
1011
|
+
case "date":
|
|
1012
|
+
case "time":
|
|
1013
1013
|
return this.renderDateField(field, fieldId, sectionStyle);
|
|
1014
|
-
case
|
|
1014
|
+
case "image":
|
|
1015
1015
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
1016
1016
|
key: fieldId,
|
|
1017
1017
|
label: field.label,
|
|
@@ -1020,7 +1020,7 @@ class MaintenanceRequest extends Component {
|
|
|
1020
1020
|
required: field.mandatory,
|
|
1021
1021
|
showError: this.state.showError
|
|
1022
1022
|
}, this.renderImageList(fieldId));
|
|
1023
|
-
case
|
|
1023
|
+
case "document":
|
|
1024
1024
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
1025
1025
|
key: fieldId,
|
|
1026
1026
|
label: field.label,
|
|
@@ -1077,7 +1077,7 @@ class MaintenanceRequest extends Component {
|
|
|
1077
1077
|
marginTop: 16
|
|
1078
1078
|
}
|
|
1079
1079
|
}, this.state.canCreateOnBehalf && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1080
|
-
label:
|
|
1080
|
+
label: "Select User",
|
|
1081
1081
|
textValue: (_this$state$selectedU = this.state.selectedUser) === null || _this$state$selectedU === void 0 ? void 0 : _this$state$selectedU.displayName,
|
|
1082
1082
|
hasContent: true,
|
|
1083
1083
|
hasUnderline: true,
|
|
@@ -1099,7 +1099,7 @@ class MaintenanceRequest extends Component {
|
|
|
1099
1099
|
Diameter: 30
|
|
1100
1100
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
1101
1101
|
style: styles.nameText
|
|
1102
|
-
}, ((_this$state$selectedU3 = this.state.selectedUser) === null || _this$state$selectedU3 === void 0 ? void 0 : _this$state$selectedU3.displayName) ||
|
|
1102
|
+
}, ((_this$state$selectedU3 = this.state.selectedUser) === null || _this$state$selectedU3 === void 0 ? void 0 : _this$state$selectedU3.displayName) || "Select User")), /*#__PURE__*/React.createElement(Icon, {
|
|
1103
1103
|
name: "angle-right",
|
|
1104
1104
|
type: "font-awesome",
|
|
1105
1105
|
iconStyle: [styles.sectionTitle, {
|
|
@@ -1107,11 +1107,11 @@ class MaintenanceRequest extends Component {
|
|
|
1107
1107
|
color: this.props.colourBrandingMain
|
|
1108
1108
|
}]
|
|
1109
1109
|
})))), !this.state.canCreateOnBehalf && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1110
|
-
label:
|
|
1111
|
-
placeholder:
|
|
1110
|
+
label: "Name",
|
|
1111
|
+
placeholder: "Enter your name",
|
|
1112
1112
|
textValue: this.state.userName,
|
|
1113
1113
|
onChangeText: userName => this.onChangeName(userName),
|
|
1114
|
-
editable: this.props.userType ===
|
|
1114
|
+
editable: this.props.userType === "KIOSK" && this.state.submitting === false,
|
|
1115
1115
|
isValid: () => {
|
|
1116
1116
|
return this.state.userName.length > 1;
|
|
1117
1117
|
},
|
|
@@ -1120,18 +1120,18 @@ class MaintenanceRequest extends Component {
|
|
|
1120
1120
|
showError: this.state.showError && this.state.userName.length < 2,
|
|
1121
1121
|
hasUnderline: true
|
|
1122
1122
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1123
|
-
label:
|
|
1124
|
-
placeholder:
|
|
1123
|
+
label: "Contact number",
|
|
1124
|
+
placeholder: "Enter phone number",
|
|
1125
1125
|
textValue: this.state.phone,
|
|
1126
1126
|
onChangeText: phone => this.setState({
|
|
1127
1127
|
phone
|
|
1128
1128
|
}),
|
|
1129
1129
|
editable: this.state.submitting === false,
|
|
1130
1130
|
hasUnderline: true,
|
|
1131
|
-
keyboardType:
|
|
1131
|
+
keyboardType: "phone-pad"
|
|
1132
1132
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1133
|
-
label:
|
|
1134
|
-
placeholder:
|
|
1133
|
+
label: "Address",
|
|
1134
|
+
placeholder: "Enter your address",
|
|
1135
1135
|
textValue: this.state.roomNumber,
|
|
1136
1136
|
onChangeText: roomNumber => this.setState({
|
|
1137
1137
|
roomNumber
|
|
@@ -1149,8 +1149,8 @@ class MaintenanceRequest extends Component {
|
|
|
1149
1149
|
marginTop: 16,
|
|
1150
1150
|
paddingHorizontal: 24,
|
|
1151
1151
|
paddingVertical: 16,
|
|
1152
|
-
flexDirection:
|
|
1153
|
-
justifyContent:
|
|
1152
|
+
flexDirection: "row",
|
|
1153
|
+
justifyContent: "space-between"
|
|
1154
1154
|
}
|
|
1155
1155
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
1156
1156
|
style: styles.sectionTitle
|
|
@@ -1158,7 +1158,7 @@ class MaintenanceRequest extends Component {
|
|
|
1158
1158
|
onPress: this.onPressType.bind(this)
|
|
1159
1159
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1160
1160
|
style: {
|
|
1161
|
-
flexDirection:
|
|
1161
|
+
flexDirection: "row"
|
|
1162
1162
|
}
|
|
1163
1163
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
1164
1164
|
style: [styles.sectionTitle, {
|
|
@@ -1177,8 +1177,8 @@ class MaintenanceRequest extends Component {
|
|
|
1177
1177
|
marginTop: 16
|
|
1178
1178
|
}
|
|
1179
1179
|
}, /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1180
|
-
label:
|
|
1181
|
-
placeholder:
|
|
1180
|
+
label: "Title",
|
|
1181
|
+
placeholder: "Enter a title for your request",
|
|
1182
1182
|
textValue: this.state.title,
|
|
1183
1183
|
onChangeText: title => this.setState({
|
|
1184
1184
|
title
|
|
@@ -1195,8 +1195,8 @@ class MaintenanceRequest extends Component {
|
|
|
1195
1195
|
multiline: true,
|
|
1196
1196
|
autoGrow: true
|
|
1197
1197
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1198
|
-
label:
|
|
1199
|
-
placeholder:
|
|
1198
|
+
label: "Description",
|
|
1199
|
+
placeholder: "Describe your request here in detail",
|
|
1200
1200
|
textValue: this.state.description,
|
|
1201
1201
|
onChangeText: description => this.setState({
|
|
1202
1202
|
description
|
|
@@ -1213,12 +1213,12 @@ class MaintenanceRequest extends Component {
|
|
|
1213
1213
|
}
|
|
1214
1214
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1215
1215
|
style: [{
|
|
1216
|
-
width:
|
|
1216
|
+
width: "100%",
|
|
1217
1217
|
paddingVertical: 16,
|
|
1218
|
-
flexDirection:
|
|
1219
|
-
justifyContent:
|
|
1220
|
-
alignItems:
|
|
1221
|
-
position:
|
|
1218
|
+
flexDirection: "row",
|
|
1219
|
+
justifyContent: "space-between",
|
|
1220
|
+
alignItems: "center",
|
|
1221
|
+
position: "relative"
|
|
1222
1222
|
}, this.state.isHome && {
|
|
1223
1223
|
borderBottomWidth: 1,
|
|
1224
1224
|
borderBottomColor: Colours.LINEGREY
|
|
@@ -1232,13 +1232,13 @@ class MaintenanceRequest extends Component {
|
|
|
1232
1232
|
isHome: value
|
|
1233
1233
|
}),
|
|
1234
1234
|
trackColor: {
|
|
1235
|
-
false:
|
|
1235
|
+
false: "#ddd",
|
|
1236
1236
|
true: this.props.colourBrandingMain
|
|
1237
1237
|
},
|
|
1238
|
-
thumbColor: Platform.OS ===
|
|
1238
|
+
thumbColor: Platform.OS === "android" ? "#fff" : null
|
|
1239
1239
|
})), this.state.isHome && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1240
|
-
label:
|
|
1241
|
-
placeholder:
|
|
1240
|
+
label: "Available times",
|
|
1241
|
+
placeholder: "Describe your available times here in detail.",
|
|
1242
1242
|
textValue: this.state.times,
|
|
1243
1243
|
onChangeText: times => this.setState({
|
|
1244
1244
|
times
|
|
@@ -1260,7 +1260,7 @@ class MaintenanceRequest extends Component {
|
|
|
1260
1260
|
renderRegisterConfirmation() {
|
|
1261
1261
|
return /*#__PURE__*/React.createElement(Components.ConfirmationPopup, {
|
|
1262
1262
|
confirmText: `${values.textEntityName} submitted`,
|
|
1263
|
-
repeatText:
|
|
1263
|
+
repeatText: "Submit another",
|
|
1264
1264
|
visible: this.state.confirmationToShow,
|
|
1265
1265
|
onClose: this.onCloseConfirmationPopup.bind(this),
|
|
1266
1266
|
onPressAction: this.onConfirmationReset.bind(this)
|
|
@@ -1284,8 +1284,8 @@ class MaintenanceRequest extends Component {
|
|
|
1284
1284
|
return null;
|
|
1285
1285
|
}
|
|
1286
1286
|
return /*#__PURE__*/React.createElement(Components.WarningPopup, {
|
|
1287
|
-
confirmText:
|
|
1288
|
-
infoText:
|
|
1287
|
+
confirmText: "No forms are available",
|
|
1288
|
+
infoText: "Check back later for forms.",
|
|
1289
1289
|
visible: this.state.noType,
|
|
1290
1290
|
onClose: this.onPressBack.bind(this),
|
|
1291
1291
|
padHorizontal: true
|
|
@@ -1299,7 +1299,7 @@ class MaintenanceRequest extends Component {
|
|
|
1299
1299
|
popUpType
|
|
1300
1300
|
} = this.state;
|
|
1301
1301
|
return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
1302
|
-
behavior: Platform.OS ===
|
|
1302
|
+
behavior: Platform.OS === "ios" && "padding",
|
|
1303
1303
|
style: styles.viewContainer
|
|
1304
1304
|
}, this.renderImageUploader(), /*#__PURE__*/React.createElement(View, {
|
|
1305
1305
|
style: styles.container
|
|
@@ -1307,7 +1307,7 @@ class MaintenanceRequest extends Component {
|
|
|
1307
1307
|
leftIcon: "angle-left",
|
|
1308
1308
|
onPressLeft: this.onPressBack.bind(this),
|
|
1309
1309
|
text: this.props.strings[`${values.featureKey}_textFeatureTitle`] || values.textFeatureTitle,
|
|
1310
|
-
rightText: submitting || success ? null :
|
|
1310
|
+
rightText: submitting || success ? null : "Done",
|
|
1311
1311
|
onPressRight: this.submitRequest.bind(this),
|
|
1312
1312
|
absoluteRight: true
|
|
1313
1313
|
}), this.renderForm()), this.renderRegisterConfirmation(), this.renderVideoPlayerPopup(), this.renderNoType(), /*#__PURE__*/React.createElement(DateTimePicker, {
|
|
@@ -1324,52 +1324,52 @@ class MaintenanceRequest extends Component {
|
|
|
1324
1324
|
const styles = {
|
|
1325
1325
|
viewContainer: {
|
|
1326
1326
|
flex: 1,
|
|
1327
|
-
backgroundColor:
|
|
1327
|
+
backgroundColor: "#fff"
|
|
1328
1328
|
},
|
|
1329
1329
|
container: {
|
|
1330
1330
|
flex: 1,
|
|
1331
|
-
position:
|
|
1332
|
-
backgroundColor:
|
|
1331
|
+
position: "relative",
|
|
1332
|
+
backgroundColor: "#f0f0f5"
|
|
1333
1333
|
},
|
|
1334
1334
|
errorText: {
|
|
1335
|
-
fontFamily:
|
|
1335
|
+
fontFamily: "sf-regular",
|
|
1336
1336
|
color: Colours.COLOUR_TANGERINE,
|
|
1337
1337
|
fontSize: 16
|
|
1338
1338
|
},
|
|
1339
1339
|
requestSuccess: {
|
|
1340
|
-
fontFamily:
|
|
1340
|
+
fontFamily: "sf-regular",
|
|
1341
1341
|
color: Colours.TEXT_DARK,
|
|
1342
1342
|
fontSize: 17,
|
|
1343
|
-
textAlign:
|
|
1343
|
+
textAlign: "center"
|
|
1344
1344
|
},
|
|
1345
1345
|
sectionTitle: {
|
|
1346
|
-
fontFamily:
|
|
1346
|
+
fontFamily: "sf-regular",
|
|
1347
1347
|
fontSize: 17,
|
|
1348
1348
|
color: Colours.TEXT_DARK
|
|
1349
1349
|
},
|
|
1350
1350
|
imageListContainer: {
|
|
1351
1351
|
marginTop: 8,
|
|
1352
1352
|
padding: 8,
|
|
1353
|
-
flexDirection:
|
|
1353
|
+
flexDirection: "row",
|
|
1354
1354
|
backgroundColor: Colours.BOXGREY,
|
|
1355
1355
|
minHeight: 106
|
|
1356
1356
|
},
|
|
1357
1357
|
imageListContainerEmpty: {
|
|
1358
|
-
justifyContent:
|
|
1359
|
-
alignItems:
|
|
1360
|
-
flexDirection:
|
|
1358
|
+
justifyContent: "center",
|
|
1359
|
+
alignItems: "center",
|
|
1360
|
+
flexDirection: "column"
|
|
1361
1361
|
},
|
|
1362
1362
|
documentListContainer: {
|
|
1363
1363
|
marginTop: 8,
|
|
1364
|
-
flexDirection:
|
|
1365
|
-
alignItems:
|
|
1364
|
+
flexDirection: "column",
|
|
1365
|
+
alignItems: "flex-start"
|
|
1366
1366
|
},
|
|
1367
1367
|
imageContainer: {
|
|
1368
1368
|
width: PHOTO_SIZE,
|
|
1369
1369
|
height: PHOTO_SIZE,
|
|
1370
|
-
borderStyle:
|
|
1371
|
-
justifyContent:
|
|
1372
|
-
alignItems:
|
|
1370
|
+
borderStyle: "dashed",
|
|
1371
|
+
justifyContent: "center",
|
|
1372
|
+
alignItems: "center",
|
|
1373
1373
|
borderWidth: 1,
|
|
1374
1374
|
borderColor: Colours.LINEGREY,
|
|
1375
1375
|
borderRadius: 4,
|
|
@@ -1378,13 +1378,13 @@ const styles = {
|
|
|
1378
1378
|
imageContainerNotEmpty: {
|
|
1379
1379
|
borderWidth: 1,
|
|
1380
1380
|
borderColor: Colours.LINEGREY,
|
|
1381
|
-
backgroundColor:
|
|
1382
|
-
borderStyle:
|
|
1381
|
+
backgroundColor: "#fff",
|
|
1382
|
+
borderStyle: "dashed"
|
|
1383
1383
|
},
|
|
1384
1384
|
imageBackground: {
|
|
1385
1385
|
flex: 1,
|
|
1386
|
-
height:
|
|
1387
|
-
width:
|
|
1386
|
+
height: "100%",
|
|
1387
|
+
width: "100%",
|
|
1388
1388
|
borderRadius: 4
|
|
1389
1389
|
},
|
|
1390
1390
|
imageCircle: {
|
|
@@ -1392,60 +1392,60 @@ const styles = {
|
|
|
1392
1392
|
height: 90,
|
|
1393
1393
|
borderRadius: 45,
|
|
1394
1394
|
backgroundColor: Colours.PINKISH_GREY,
|
|
1395
|
-
justifyContent:
|
|
1395
|
+
justifyContent: "center"
|
|
1396
1396
|
},
|
|
1397
1397
|
addImageIcon: {
|
|
1398
|
-
color:
|
|
1398
|
+
color: "#fff",
|
|
1399
1399
|
fontSize: 32
|
|
1400
1400
|
},
|
|
1401
1401
|
imagePlayContainer: {
|
|
1402
|
-
position:
|
|
1402
|
+
position: "absolute",
|
|
1403
1403
|
top: 0,
|
|
1404
1404
|
left: 0,
|
|
1405
1405
|
right: 0,
|
|
1406
1406
|
bottom: 0,
|
|
1407
|
-
alignItems:
|
|
1408
|
-
justifyContent:
|
|
1407
|
+
alignItems: "center",
|
|
1408
|
+
justifyContent: "center"
|
|
1409
1409
|
},
|
|
1410
1410
|
imageControlIcon: {
|
|
1411
|
-
color:
|
|
1411
|
+
color: "#fff",
|
|
1412
1412
|
fontSize: 20,
|
|
1413
|
-
textShadowColor:
|
|
1413
|
+
textShadowColor: "rgba(0,0,0,0.3)",
|
|
1414
1414
|
textShadowOffset: {
|
|
1415
1415
|
width: 2,
|
|
1416
1416
|
height: 2
|
|
1417
1417
|
}
|
|
1418
1418
|
},
|
|
1419
1419
|
removeImage: {
|
|
1420
|
-
position:
|
|
1420
|
+
position: "absolute",
|
|
1421
1421
|
top: 0,
|
|
1422
1422
|
right: 0,
|
|
1423
1423
|
padding: 4,
|
|
1424
1424
|
width: 40,
|
|
1425
1425
|
height: 40,
|
|
1426
|
-
alignItems:
|
|
1427
|
-
justifyContent:
|
|
1426
|
+
alignItems: "center",
|
|
1427
|
+
justifyContent: "center"
|
|
1428
1428
|
},
|
|
1429
1429
|
staticTitle: {
|
|
1430
1430
|
fontSize: 20,
|
|
1431
|
-
fontFamily:
|
|
1431
|
+
fontFamily: "sf-semibold",
|
|
1432
1432
|
color: Colours.TEXT_DARKEST
|
|
1433
1433
|
},
|
|
1434
1434
|
staticText: {
|
|
1435
1435
|
fontSize: 17,
|
|
1436
|
-
fontFamily:
|
|
1436
|
+
fontFamily: "sf-regular",
|
|
1437
1437
|
color: Colours.TEXT_DARKEST,
|
|
1438
1438
|
lineHeight: 24
|
|
1439
1439
|
},
|
|
1440
1440
|
multiChoiceOption: {
|
|
1441
1441
|
marginTop: 16,
|
|
1442
|
-
flexDirection:
|
|
1443
|
-
alignItems:
|
|
1442
|
+
flexDirection: "row",
|
|
1443
|
+
alignItems: "center",
|
|
1444
1444
|
minHeight: 20
|
|
1445
1445
|
},
|
|
1446
1446
|
multiChoiceText: {
|
|
1447
1447
|
flex: 1,
|
|
1448
|
-
fontFamily:
|
|
1448
|
+
fontFamily: "sf-medium",
|
|
1449
1449
|
fontSize: 14,
|
|
1450
1450
|
color: Colours.TEXT_DARK
|
|
1451
1451
|
},
|
|
@@ -1462,24 +1462,24 @@ const styles = {
|
|
|
1462
1462
|
borderRadius: 4
|
|
1463
1463
|
},
|
|
1464
1464
|
dateContainer: {
|
|
1465
|
-
flexDirection:
|
|
1466
|
-
alignItems:
|
|
1465
|
+
flexDirection: "row",
|
|
1466
|
+
alignItems: "center"
|
|
1467
1467
|
},
|
|
1468
1468
|
dateFieldButton: {
|
|
1469
1469
|
flex: 1
|
|
1470
1470
|
},
|
|
1471
1471
|
dateFieldContainer: {
|
|
1472
|
-
flexDirection:
|
|
1472
|
+
flexDirection: "row",
|
|
1473
1473
|
borderRadius: 2,
|
|
1474
|
-
backgroundColor:
|
|
1474
|
+
backgroundColor: "#ebeff2",
|
|
1475
1475
|
padding: 8,
|
|
1476
1476
|
marginTop: 8
|
|
1477
1477
|
},
|
|
1478
1478
|
dateText: {
|
|
1479
1479
|
flex: 1,
|
|
1480
|
-
fontFamily:
|
|
1480
|
+
fontFamily: "sf-regular",
|
|
1481
1481
|
fontSize: 16,
|
|
1482
|
-
color:
|
|
1482
|
+
color: "#65686D"
|
|
1483
1483
|
},
|
|
1484
1484
|
dateIcon: {
|
|
1485
1485
|
fontSize: 18,
|
|
@@ -1493,36 +1493,36 @@ const styles = {
|
|
|
1493
1493
|
color: Colours.TEXT_BLUEGREY
|
|
1494
1494
|
},
|
|
1495
1495
|
documentContainer: {
|
|
1496
|
-
flexDirection:
|
|
1497
|
-
alignItems:
|
|
1498
|
-
justifyContent:
|
|
1496
|
+
flexDirection: "row",
|
|
1497
|
+
alignItems: "center",
|
|
1498
|
+
justifyContent: "space-between",
|
|
1499
1499
|
paddingVertical: 4
|
|
1500
1500
|
},
|
|
1501
1501
|
documentTypeContainer: {
|
|
1502
1502
|
width: 50,
|
|
1503
1503
|
height: 60,
|
|
1504
|
-
justifyContent:
|
|
1505
|
-
alignItems:
|
|
1504
|
+
justifyContent: "center",
|
|
1505
|
+
alignItems: "center",
|
|
1506
1506
|
borderRadius: 5,
|
|
1507
1507
|
marginRight: 8
|
|
1508
1508
|
},
|
|
1509
1509
|
documentTypeText: {
|
|
1510
|
-
color:
|
|
1511
|
-
fontFamily:
|
|
1512
|
-
textAlign:
|
|
1510
|
+
color: "#fff",
|
|
1511
|
+
fontFamily: "sf-semibold",
|
|
1512
|
+
textAlign: "center"
|
|
1513
1513
|
},
|
|
1514
1514
|
documentText: {
|
|
1515
1515
|
flex: 1,
|
|
1516
|
-
fontFamily:
|
|
1516
|
+
fontFamily: "sf-semibold",
|
|
1517
1517
|
fontSize: 16,
|
|
1518
|
-
color:
|
|
1518
|
+
color: "#65686D"
|
|
1519
1519
|
},
|
|
1520
1520
|
removeDocumentButton: {
|
|
1521
1521
|
padding: 4,
|
|
1522
1522
|
width: 40,
|
|
1523
1523
|
height: 40,
|
|
1524
|
-
alignItems:
|
|
1525
|
-
justifyContent:
|
|
1524
|
+
alignItems: "center",
|
|
1525
|
+
justifyContent: "center",
|
|
1526
1526
|
marginLeft: 8
|
|
1527
1527
|
},
|
|
1528
1528
|
removeDocumentIcon: {
|
|
@@ -1530,16 +1530,16 @@ const styles = {
|
|
|
1530
1530
|
},
|
|
1531
1531
|
// PC-1255: User picker styles
|
|
1532
1532
|
userPickerContainer: {
|
|
1533
|
-
flexDirection:
|
|
1534
|
-
justifyContent:
|
|
1535
|
-
alignItems:
|
|
1533
|
+
flexDirection: "row",
|
|
1534
|
+
justifyContent: "space-between",
|
|
1535
|
+
alignItems: "center"
|
|
1536
1536
|
},
|
|
1537
1537
|
profileContainer: {
|
|
1538
|
-
flexDirection:
|
|
1539
|
-
alignItems:
|
|
1538
|
+
flexDirection: "row",
|
|
1539
|
+
alignItems: "center"
|
|
1540
1540
|
},
|
|
1541
1541
|
nameText: {
|
|
1542
|
-
fontFamily:
|
|
1542
|
+
fontFamily: "sf-medium",
|
|
1543
1543
|
fontSize: 16,
|
|
1544
1544
|
color: Colours.TEXT_DARK,
|
|
1545
1545
|
marginLeft: 8
|