@plusscommunities/pluss-maintenance-app-forms 7.0.20 → 7.0.21
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 +145 -145
- 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 +31 -31
- package/dist/module/values.config.a.js.map +1 -1
- package/dist/module/values.config.default.js +35 -35
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.enquiry.js +35 -35
- package/dist/module/values.config.enquiry.js.map +1 -1
- package/dist/module/values.config.feedback.js +35 -35
- package/dist/module/values.config.feedback.js.map +1 -1
- package/dist/module/values.config.food.js +35 -35
- 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 +52 -52
- 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 +262 -99
- package/src/screens/RequestDetail.js +1345 -1125
- package/src/screens/RequestNotes.js +946 -805
- package/src/screens/ServiceRequest.js +1773 -1557
- package/src/values.config.a.js +34 -34
- package/src/values.config.default.js +40 -40
- package/src/values.config.enquiry.js +40 -40
- package/src/values.config.feedback.js +40 -40
- package/src/values.config.food.js +40 -40
- 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 "@rneui/themed";
|
|
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
|
|
@@ -37,20 +37,20 @@ class MaintenanceRequest extends Component {
|
|
|
37
37
|
const response = await userActions.getSiteUsers(this.props.site);
|
|
38
38
|
let items = response.data.Items || [];
|
|
39
39
|
if (this.props.optionOnlyForResidents) {
|
|
40
|
-
items = _.filter(items, u => u.category ===
|
|
40
|
+
items = _.filter(items, u => u.category === "resident");
|
|
41
41
|
}
|
|
42
|
-
const users = _.sortBy(items, u => (u.displayName ||
|
|
42
|
+
const users = _.sortBy(items, u => (u.displayName || "").toLowerCase());
|
|
43
43
|
this.setState({
|
|
44
44
|
users
|
|
45
45
|
});
|
|
46
46
|
} catch (error) {
|
|
47
|
-
console.log(
|
|
47
|
+
console.log("Error loading site users:", error);
|
|
48
48
|
// Fall back to default user if loading fails
|
|
49
49
|
this.setDefaultUser();
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
_defineProperty(this, "setDefaultUser", () => {
|
|
53
|
-
if (this.props.userType !==
|
|
53
|
+
if (this.props.userType !== "KIOSK") {
|
|
54
54
|
const defaultUser = {
|
|
55
55
|
userId: this.props.uid,
|
|
56
56
|
displayName: this.props.displayName,
|
|
@@ -60,7 +60,7 @@ class MaintenanceRequest extends Component {
|
|
|
60
60
|
selectedUser: defaultUser,
|
|
61
61
|
userName: this.props.displayName,
|
|
62
62
|
roomNumber: this.props.unit,
|
|
63
|
-
phone: !_.isEmpty(this.props.phoneNumber) ? this.props.phoneNumber :
|
|
63
|
+
phone: !_.isEmpty(this.props.phoneNumber) ? this.props.phoneNumber : ""
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
});
|
|
@@ -68,7 +68,7 @@ class MaintenanceRequest extends Component {
|
|
|
68
68
|
const update = {
|
|
69
69
|
userName
|
|
70
70
|
};
|
|
71
|
-
if (!this.state.customFields || !_.some(this.state.customFields,
|
|
71
|
+
if (!this.state.customFields || !_.some(this.state.customFields, "isTitle")) {
|
|
72
72
|
update.title = userName;
|
|
73
73
|
}
|
|
74
74
|
this.setState(update);
|
|
@@ -106,18 +106,18 @@ class MaintenanceRequest extends Component {
|
|
|
106
106
|
if (userDetails.unit) {
|
|
107
107
|
update.roomNumber = userDetails.unit;
|
|
108
108
|
}
|
|
109
|
-
if (!this.state.customFields || !_.some(this.state.customFields,
|
|
109
|
+
if (!this.state.customFields || !_.some(this.state.customFields, "isTitle")) {
|
|
110
110
|
update.title = userDetails.displayName || null;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
} catch (error) {
|
|
114
114
|
// Permission denied (403) or other error - continue without auto-population
|
|
115
115
|
// User can still manually enter contact details
|
|
116
|
-
console.log(
|
|
116
|
+
console.log("Could not fetch user details for auto-population:", error);
|
|
117
117
|
} finally {
|
|
118
118
|
// In any case, we still need a title. Inform the user to set one form field as a title.
|
|
119
119
|
if (!state.title && !update.title) {
|
|
120
|
-
update.title =
|
|
120
|
+
update.title = "[Missing title - Set one of the form field as title in the community manager]";
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
this.setState(update);
|
|
@@ -146,7 +146,7 @@ class MaintenanceRequest extends Component {
|
|
|
146
146
|
};
|
|
147
147
|
const field = update.customFields[fieldId];
|
|
148
148
|
field.answer = _.xor(field.answer || [], [answer]);
|
|
149
|
-
if (field.isTitle) update.title = field.answer.join(
|
|
149
|
+
if (field.isTitle) update.title = field.answer.join(", ");
|
|
150
150
|
this.setState(update);
|
|
151
151
|
});
|
|
152
152
|
_defineProperty(this, "onOpenDatePicker", (field, fieldId) => {
|
|
@@ -179,12 +179,12 @@ class MaintenanceRequest extends Component {
|
|
|
179
179
|
};
|
|
180
180
|
const field = update.customFields[dateFieldId];
|
|
181
181
|
const dateObj = moment(date);
|
|
182
|
-
if (popUpType ===
|
|
183
|
-
field.answer = dateObj.format(
|
|
184
|
-
if (field.isTitle) update.title = dateObj.format(
|
|
182
|
+
if (popUpType === "date") {
|
|
183
|
+
field.answer = dateObj.format("YYYY-MM-DD");
|
|
184
|
+
if (field.isTitle) update.title = dateObj.format("DD MMM YYYY");
|
|
185
185
|
} else {
|
|
186
|
-
field.answer = dateObj.format(
|
|
187
|
-
if (field.isTitle) update.title = dateObj.format(
|
|
186
|
+
field.answer = dateObj.format("HH:mm");
|
|
187
|
+
if (field.isTitle) update.title = dateObj.format("h:mm a");
|
|
188
188
|
}
|
|
189
189
|
this.setState(update);
|
|
190
190
|
});
|
|
@@ -195,7 +195,7 @@ class MaintenanceRequest extends Component {
|
|
|
195
195
|
const imagesUpdate = this.getImages(imageFieldId);
|
|
196
196
|
imagesUpdate.splice(imagesUpdate.length - 1, 0, {
|
|
197
197
|
uploading: true,
|
|
198
|
-
uploadProgress:
|
|
198
|
+
uploadProgress: "0%",
|
|
199
199
|
uploadUri,
|
|
200
200
|
imageUri,
|
|
201
201
|
allowRetry: true
|
|
@@ -223,7 +223,7 @@ class MaintenanceRequest extends Component {
|
|
|
223
223
|
const imagesUpdate = this.getImages(imageFieldId);
|
|
224
224
|
imagesUpdate.map(img => {
|
|
225
225
|
if (img.uploadUri === uploadUri && img.uploading) {
|
|
226
|
-
img.url = uri.replace(
|
|
226
|
+
img.url = uri.replace("/general/", "/general1400/");
|
|
227
227
|
img.thumbNailExists = false;
|
|
228
228
|
img.thumbNailUrl = Helper.getThumb300(img.url);
|
|
229
229
|
img.allowRetry = true;
|
|
@@ -239,7 +239,7 @@ class MaintenanceRequest extends Component {
|
|
|
239
239
|
imagesUpdate.map(img => {
|
|
240
240
|
if (img.uploadUri === uploadUri) {
|
|
241
241
|
img.uploading = true; // Requried for retry
|
|
242
|
-
img.uploadProgress =
|
|
242
|
+
img.uploadProgress = "";
|
|
243
243
|
img.allowRetry = true;
|
|
244
244
|
}
|
|
245
245
|
});
|
|
@@ -263,7 +263,7 @@ class MaintenanceRequest extends Component {
|
|
|
263
263
|
const documentsUpdate = this.getDocuments(documentFieldId);
|
|
264
264
|
documentsUpdate.splice(documentsUpdate.length - 1, 0, {
|
|
265
265
|
uploading: true,
|
|
266
|
-
uploadProgress:
|
|
266
|
+
uploadProgress: "0%",
|
|
267
267
|
uploadUri,
|
|
268
268
|
documentUri,
|
|
269
269
|
documentName,
|
|
@@ -288,7 +288,7 @@ class MaintenanceRequest extends Component {
|
|
|
288
288
|
documentsUpdate.map(doc => {
|
|
289
289
|
if (doc.uploadUri === uploadUri && doc.uploading) {
|
|
290
290
|
doc.uploading = false;
|
|
291
|
-
doc.uploadProgress =
|
|
291
|
+
doc.uploadProgress = "100%";
|
|
292
292
|
doc.url = uri;
|
|
293
293
|
doc.allowRetry = true;
|
|
294
294
|
}
|
|
@@ -300,7 +300,7 @@ class MaintenanceRequest extends Component {
|
|
|
300
300
|
documentsUpdate.map(doc => {
|
|
301
301
|
if (doc.uploadUri === uploadUri) {
|
|
302
302
|
doc.uploading = true; // Requried for retry
|
|
303
|
-
doc.uploadProgress =
|
|
303
|
+
doc.uploadProgress = "";
|
|
304
304
|
doc.allowRetry = true;
|
|
305
305
|
}
|
|
306
306
|
});
|
|
@@ -312,19 +312,19 @@ class MaintenanceRequest extends Component {
|
|
|
312
312
|
type,
|
|
313
313
|
answer
|
|
314
314
|
} = field;
|
|
315
|
-
if ([
|
|
315
|
+
if (["staticTitle", "staticText"].includes(type)) return true;
|
|
316
316
|
const checkMandatory = () => {
|
|
317
317
|
if (!mandatory) return true;
|
|
318
318
|
switch (type) {
|
|
319
|
-
case
|
|
319
|
+
case "yn":
|
|
320
320
|
return _.isBoolean(answer);
|
|
321
|
-
case
|
|
321
|
+
case "image":
|
|
322
322
|
const imagesList = this.getImageUrls(fieldId);
|
|
323
323
|
return imagesList.length > 0;
|
|
324
|
-
case
|
|
324
|
+
case "document":
|
|
325
325
|
const documentsList = this.getDocumentAnswers(fieldId);
|
|
326
326
|
return documentsList.length > 0;
|
|
327
|
-
case
|
|
327
|
+
case "checkbox":
|
|
328
328
|
return _.isArray(answer) && answer.length > 0;
|
|
329
329
|
default:
|
|
330
330
|
return !_.isNil(answer) && !_.isEmpty(answer);
|
|
@@ -333,12 +333,12 @@ class MaintenanceRequest extends Component {
|
|
|
333
333
|
const checkFormat = () => {
|
|
334
334
|
if (_.isNil(answer) || _.isEmpty(answer)) return true;
|
|
335
335
|
switch (type) {
|
|
336
|
-
case
|
|
336
|
+
case "email":
|
|
337
337
|
return Helper.isEmail(answer);
|
|
338
|
-
case
|
|
339
|
-
return moment(answer,
|
|
340
|
-
case
|
|
341
|
-
return moment(answer,
|
|
338
|
+
case "date":
|
|
339
|
+
return moment(answer, "YYYY-MM-DD", true).isValid();
|
|
340
|
+
case "time":
|
|
341
|
+
return moment(answer, "HH:mm", true).isValid();
|
|
342
342
|
default:
|
|
343
343
|
return true;
|
|
344
344
|
}
|
|
@@ -374,8 +374,8 @@ class MaintenanceRequest extends Component {
|
|
|
374
374
|
// Fix custom images field answers
|
|
375
375
|
const customFields = _.cloneDeep(this.state.customFields);
|
|
376
376
|
const updatedCustomFields = customFields.map((field, fieldId) => {
|
|
377
|
-
if (field.type ===
|
|
378
|
-
if (field.type ===
|
|
377
|
+
if (field.type === "image") field.answer = this.getImageUrls(fieldId);
|
|
378
|
+
if (field.type === "document") field.answer = this.getDocumentAnswers(fieldId);
|
|
379
379
|
return field;
|
|
380
380
|
});
|
|
381
381
|
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 => {
|
|
@@ -393,7 +393,7 @@ class MaintenanceRequest extends Component {
|
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
}).catch(err => {
|
|
396
|
-
console.log(
|
|
396
|
+
console.log("maintenance submission fail.");
|
|
397
397
|
console.log(err);
|
|
398
398
|
this.setState({
|
|
399
399
|
submitting: false
|
|
@@ -405,7 +405,7 @@ class MaintenanceRequest extends Component {
|
|
|
405
405
|
const job = await maintenanceActions.getJob(Helper.getSite(this.props.site), id);
|
|
406
406
|
this.props.jobAdded(job.data);
|
|
407
407
|
} catch (error) {
|
|
408
|
-
console.log(
|
|
408
|
+
console.log("refreshRequest error", error);
|
|
409
409
|
}
|
|
410
410
|
});
|
|
411
411
|
_defineProperty(this, "validateCustomFields", () => {
|
|
@@ -524,7 +524,7 @@ class MaintenanceRequest extends Component {
|
|
|
524
524
|
this.setDocuments(documentsUpdate, fieldId);
|
|
525
525
|
});
|
|
526
526
|
_defineProperty(this, "toggleFullscreenVideo", url => {
|
|
527
|
-
if (typeof url !==
|
|
527
|
+
if (typeof url !== "string") url = "";
|
|
528
528
|
this.setState({
|
|
529
529
|
showFullscreenVideo: url.length > 0,
|
|
530
530
|
currentVideoUrl: url
|
|
@@ -537,19 +537,19 @@ class MaintenanceRequest extends Component {
|
|
|
537
537
|
error: null,
|
|
538
538
|
showError: false,
|
|
539
539
|
loadingTypes: values.forceCustomFields,
|
|
540
|
-
userName:
|
|
541
|
-
roomNumber:
|
|
542
|
-
phone:
|
|
543
|
-
title:
|
|
544
|
-
description:
|
|
545
|
-
times:
|
|
546
|
-
type:
|
|
540
|
+
userName: "",
|
|
541
|
+
roomNumber: "",
|
|
542
|
+
phone: "",
|
|
543
|
+
title: "",
|
|
544
|
+
description: "",
|
|
545
|
+
times: "",
|
|
546
|
+
type: "General",
|
|
547
547
|
uploadingImage: false,
|
|
548
548
|
images: [{
|
|
549
549
|
add: true
|
|
550
550
|
}],
|
|
551
551
|
showFullscreenVideo: false,
|
|
552
|
-
currentVideoUrl:
|
|
552
|
+
currentVideoUrl: "",
|
|
553
553
|
isHome: false,
|
|
554
554
|
types: [],
|
|
555
555
|
confirmationToShow: false,
|
|
@@ -557,7 +557,7 @@ class MaintenanceRequest extends Component {
|
|
|
557
557
|
customFieldImages: {},
|
|
558
558
|
customFieldDocuments: {},
|
|
559
559
|
isDateTimePickerVisible: false,
|
|
560
|
-
popUpType:
|
|
560
|
+
popUpType: "date",
|
|
561
561
|
dateFieldId: null,
|
|
562
562
|
imageFieldId: null,
|
|
563
563
|
// PC-1255: On-behalf request fields
|
|
@@ -567,9 +567,9 @@ class MaintenanceRequest extends Component {
|
|
|
567
567
|
};
|
|
568
568
|
this.checkThumb = null;
|
|
569
569
|
this.keyboardTypes = {
|
|
570
|
-
phone:
|
|
571
|
-
email:
|
|
572
|
-
text:
|
|
570
|
+
phone: "phone-pad",
|
|
571
|
+
email: "email-address",
|
|
572
|
+
text: "default"
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
575
|
componentDidMount() {
|
|
@@ -599,9 +599,9 @@ class MaintenanceRequest extends Component {
|
|
|
599
599
|
onConfirmationReset() {
|
|
600
600
|
this.setState({
|
|
601
601
|
confirmationToShow: false,
|
|
602
|
-
title:
|
|
603
|
-
description:
|
|
604
|
-
times:
|
|
602
|
+
title: "",
|
|
603
|
+
description: "",
|
|
604
|
+
times: "",
|
|
605
605
|
isHome: false,
|
|
606
606
|
uploadingImage: false,
|
|
607
607
|
images: [{
|
|
@@ -614,7 +614,7 @@ class MaintenanceRequest extends Component {
|
|
|
614
614
|
customFieldImages: {},
|
|
615
615
|
customFieldDocuments: {},
|
|
616
616
|
isDateTimePickerVisible: false,
|
|
617
|
-
popUpType:
|
|
617
|
+
popUpType: "date",
|
|
618
618
|
dateFieldId: null,
|
|
619
619
|
imageFieldId: null
|
|
620
620
|
}, () => this.pickType(this.state.type));
|
|
@@ -645,7 +645,7 @@ class MaintenanceRequest extends Component {
|
|
|
645
645
|
customFields: selected.hasCustomFields && selected.customFields.length > 0 ? _.cloneDeep(selected.customFields) : [],
|
|
646
646
|
loadingTypes: false
|
|
647
647
|
};
|
|
648
|
-
if (!_.isEmpty(update.customFields) && !_.some(update.customFields,
|
|
648
|
+
if (!_.isEmpty(update.customFields) && !_.some(update.customFields, "isTitle")) {
|
|
649
649
|
update.title = this.state.userName;
|
|
650
650
|
}
|
|
651
651
|
this.setState(update);
|
|
@@ -675,7 +675,7 @@ class MaintenanceRequest extends Component {
|
|
|
675
675
|
if (!this.props.connected) {
|
|
676
676
|
this.setState({
|
|
677
677
|
error: {
|
|
678
|
-
message:
|
|
678
|
+
message: "No internet connection detected"
|
|
679
679
|
}
|
|
680
680
|
});
|
|
681
681
|
}
|
|
@@ -689,14 +689,14 @@ class MaintenanceRequest extends Component {
|
|
|
689
689
|
|
|
690
690
|
// PC-1255: Validate user selection for on-behalf requests
|
|
691
691
|
if (this.state.canCreateOnBehalf && !this.state.selectedUser) {
|
|
692
|
-
console.log(
|
|
692
|
+
console.log("submitRequest - no user selected for on-behalf request");
|
|
693
693
|
this.setState({
|
|
694
694
|
showError: true
|
|
695
695
|
});
|
|
696
696
|
return;
|
|
697
697
|
}
|
|
698
698
|
if (title.length === 0 || !roomNumber || roomNumber.length === 0) {
|
|
699
|
-
console.log(
|
|
699
|
+
console.log("submitRequest - error", {
|
|
700
700
|
title,
|
|
701
701
|
roomNumber
|
|
702
702
|
});
|
|
@@ -707,7 +707,7 @@ class MaintenanceRequest extends Component {
|
|
|
707
707
|
}
|
|
708
708
|
if (hasCustomFields) {
|
|
709
709
|
if (!this.validateCustomFields()) {
|
|
710
|
-
console.log(
|
|
710
|
+
console.log("submitRequest - custom fields error");
|
|
711
711
|
this.setState({
|
|
712
712
|
showError: true
|
|
713
713
|
});
|
|
@@ -715,7 +715,7 @@ class MaintenanceRequest extends Component {
|
|
|
715
715
|
}
|
|
716
716
|
} else {
|
|
717
717
|
if (isHome && times.length < 2) {
|
|
718
|
-
console.log(
|
|
718
|
+
console.log("submitRequest - error", {
|
|
719
719
|
isHome,
|
|
720
720
|
times
|
|
721
721
|
});
|
|
@@ -739,8 +739,8 @@ class MaintenanceRequest extends Component {
|
|
|
739
739
|
width: 1400
|
|
740
740
|
},
|
|
741
741
|
quality: 0.8,
|
|
742
|
-
fileName:
|
|
743
|
-
popupTitle:
|
|
742
|
+
fileName: "serviceImage",
|
|
743
|
+
popupTitle: "Upload Image",
|
|
744
744
|
userId: this.props.uid,
|
|
745
745
|
allowsEditing: false,
|
|
746
746
|
multiple: true,
|
|
@@ -815,7 +815,7 @@ class MaintenanceRequest extends Component {
|
|
|
815
815
|
style: styles.documentTypeText
|
|
816
816
|
}, item.documentExt)), /*#__PURE__*/React.createElement(Text, {
|
|
817
817
|
style: styles.documentText
|
|
818
|
-
}, `${item.documentName}${item.uploading ? ` - ${item.uploadProgress}` :
|
|
818
|
+
}, `${item.documentName}${item.uploading ? ` - ${item.uploadProgress}` : ""}`), !item.uploading && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
819
819
|
style: styles.removeDocumentButton,
|
|
820
820
|
onPress: () => this.removeDocument(index, fieldId)
|
|
821
821
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -832,7 +832,7 @@ class MaintenanceRequest extends Component {
|
|
|
832
832
|
style: {
|
|
833
833
|
padding: 16,
|
|
834
834
|
flex: 1,
|
|
835
|
-
backgroundColor:
|
|
835
|
+
backgroundColor: "#fff"
|
|
836
836
|
}
|
|
837
837
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
838
838
|
style: styles.requestSuccess
|
|
@@ -878,16 +878,16 @@ class MaintenanceRequest extends Component {
|
|
|
878
878
|
|
|
879
879
|
renderDateField(field, fieldId, sectionStyle) {
|
|
880
880
|
let displayText, placeHolder, icon, errorText;
|
|
881
|
-
if (field.type ===
|
|
882
|
-
displayText = field.answer ? moment(field.answer,
|
|
883
|
-
placeHolder =
|
|
884
|
-
icon =
|
|
885
|
-
errorText =
|
|
881
|
+
if (field.type === "date") {
|
|
882
|
+
displayText = field.answer ? moment(field.answer, "YYYY-MM-DD").format("DD MMM YYYY") : "";
|
|
883
|
+
placeHolder = "dd mmm yyyy";
|
|
884
|
+
icon = "calendar";
|
|
885
|
+
errorText = "Not a valid date";
|
|
886
886
|
} else {
|
|
887
|
-
displayText = field.answer ? moment(field.answer,
|
|
888
|
-
placeHolder =
|
|
889
|
-
icon =
|
|
890
|
-
errorText =
|
|
887
|
+
displayText = field.answer ? moment(field.answer, "HH:mm").format("h:mm a") : "";
|
|
888
|
+
placeHolder = "--:-- --";
|
|
889
|
+
icon = "clock-o";
|
|
890
|
+
errorText = "Not a valid time";
|
|
891
891
|
}
|
|
892
892
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
893
893
|
key: fieldId,
|
|
@@ -925,7 +925,7 @@ class MaintenanceRequest extends Component {
|
|
|
925
925
|
marginBottom: 24
|
|
926
926
|
};
|
|
927
927
|
switch (field.type) {
|
|
928
|
-
case
|
|
928
|
+
case "yn":
|
|
929
929
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
930
930
|
key: fieldId,
|
|
931
931
|
label: field.label,
|
|
@@ -937,7 +937,7 @@ class MaintenanceRequest extends Component {
|
|
|
937
937
|
showError: this.state.showError,
|
|
938
938
|
required: field.mandatory
|
|
939
939
|
});
|
|
940
|
-
case
|
|
940
|
+
case "multichoice":
|
|
941
941
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
942
942
|
key: fieldId,
|
|
943
943
|
label: field.label,
|
|
@@ -955,7 +955,7 @@ class MaintenanceRequest extends Component {
|
|
|
955
955
|
showError: this.state.showError,
|
|
956
956
|
required: field.mandatory
|
|
957
957
|
});
|
|
958
|
-
case
|
|
958
|
+
case "checkbox":
|
|
959
959
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
960
960
|
key: fieldId,
|
|
961
961
|
label: field.label,
|
|
@@ -985,9 +985,9 @@ class MaintenanceRequest extends Component {
|
|
|
985
985
|
style: styles.multiChoiceText
|
|
986
986
|
}, o));
|
|
987
987
|
}));
|
|
988
|
-
case
|
|
989
|
-
case
|
|
990
|
-
case
|
|
988
|
+
case "text":
|
|
989
|
+
case "email":
|
|
990
|
+
case "phone":
|
|
991
991
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
992
992
|
key: fieldId,
|
|
993
993
|
label: field.label,
|
|
@@ -998,28 +998,28 @@ class MaintenanceRequest extends Component {
|
|
|
998
998
|
squaredCorners: true,
|
|
999
999
|
isValid: () => this.isFieldValid(field, fieldId),
|
|
1000
1000
|
showError: this.state.showError,
|
|
1001
|
-
errorText: field.type ===
|
|
1001
|
+
errorText: field.type === "email" ? "Not a valid email" : undefined,
|
|
1002
1002
|
required: field.mandatory,
|
|
1003
1003
|
sectionStyle: sectionStyle,
|
|
1004
1004
|
autoCapitalize: "sentences",
|
|
1005
1005
|
keyboardType: this.keyboardTypes[field.type]
|
|
1006
1006
|
});
|
|
1007
|
-
case
|
|
1007
|
+
case "staticTitle":
|
|
1008
1008
|
return /*#__PURE__*/React.createElement(Text, {
|
|
1009
1009
|
key: fieldId,
|
|
1010
1010
|
style: [styles.staticTitle, {
|
|
1011
1011
|
color: this.props.colourBrandingMain
|
|
1012
1012
|
}, sectionStyle]
|
|
1013
1013
|
}, field.label);
|
|
1014
|
-
case
|
|
1014
|
+
case "staticText":
|
|
1015
1015
|
return /*#__PURE__*/React.createElement(View, {
|
|
1016
1016
|
key: fieldId,
|
|
1017
1017
|
style: [styles.staticText, sectionStyle]
|
|
1018
1018
|
}, Helper.toParagraphed(field.label, styles.staticText));
|
|
1019
|
-
case
|
|
1020
|
-
case
|
|
1019
|
+
case "date":
|
|
1020
|
+
case "time":
|
|
1021
1021
|
return this.renderDateField(field, fieldId, sectionStyle);
|
|
1022
|
-
case
|
|
1022
|
+
case "image":
|
|
1023
1023
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
1024
1024
|
key: fieldId,
|
|
1025
1025
|
label: field.label,
|
|
@@ -1089,7 +1089,7 @@ class MaintenanceRequest extends Component {
|
|
|
1089
1089
|
marginTop: 16
|
|
1090
1090
|
}
|
|
1091
1091
|
}, this.state.canCreateOnBehalf && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1092
|
-
label:
|
|
1092
|
+
label: "Select User",
|
|
1093
1093
|
textValue: (_this$state$selectedU = this.state.selectedUser) === null || _this$state$selectedU === void 0 ? void 0 : _this$state$selectedU.displayName,
|
|
1094
1094
|
hasContent: true,
|
|
1095
1095
|
hasUnderline: true,
|
|
@@ -1111,7 +1111,7 @@ class MaintenanceRequest extends Component {
|
|
|
1111
1111
|
Diameter: 30
|
|
1112
1112
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
1113
1113
|
style: styles.nameText
|
|
1114
|
-
}, ((_this$state$selectedU3 = this.state.selectedUser) === null || _this$state$selectedU3 === void 0 ? void 0 : _this$state$selectedU3.displayName) ||
|
|
1114
|
+
}, ((_this$state$selectedU3 = this.state.selectedUser) === null || _this$state$selectedU3 === void 0 ? void 0 : _this$state$selectedU3.displayName) || "Select User")), /*#__PURE__*/React.createElement(Icon, {
|
|
1115
1115
|
name: "angle-right",
|
|
1116
1116
|
type: "font-awesome",
|
|
1117
1117
|
iconStyle: [styles.sectionTitle, {
|
|
@@ -1119,11 +1119,11 @@ class MaintenanceRequest extends Component {
|
|
|
1119
1119
|
color: this.props.colourBrandingMain
|
|
1120
1120
|
}]
|
|
1121
1121
|
})))), !this.state.canCreateOnBehalf && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1122
|
-
label:
|
|
1123
|
-
placeholder:
|
|
1122
|
+
label: "Name",
|
|
1123
|
+
placeholder: "Enter your name",
|
|
1124
1124
|
textValue: this.state.userName,
|
|
1125
1125
|
onChangeText: userName => this.onChangeName(userName),
|
|
1126
|
-
editable: this.props.userType ===
|
|
1126
|
+
editable: this.props.userType === "KIOSK" && this.state.submitting === false,
|
|
1127
1127
|
isValid: () => {
|
|
1128
1128
|
return this.state.userName.length > 1;
|
|
1129
1129
|
},
|
|
@@ -1132,18 +1132,18 @@ class MaintenanceRequest extends Component {
|
|
|
1132
1132
|
showError: this.state.showError && this.state.userName.length < 2,
|
|
1133
1133
|
hasUnderline: true
|
|
1134
1134
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1135
|
-
label:
|
|
1136
|
-
placeholder:
|
|
1135
|
+
label: "Contact number",
|
|
1136
|
+
placeholder: "Enter phone number",
|
|
1137
1137
|
textValue: this.state.phone,
|
|
1138
1138
|
onChangeText: phone => this.setState({
|
|
1139
1139
|
phone
|
|
1140
1140
|
}),
|
|
1141
1141
|
editable: this.state.submitting === false,
|
|
1142
1142
|
hasUnderline: true,
|
|
1143
|
-
keyboardType:
|
|
1143
|
+
keyboardType: "phone-pad"
|
|
1144
1144
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1145
|
-
label:
|
|
1146
|
-
placeholder:
|
|
1145
|
+
label: "Address",
|
|
1146
|
+
placeholder: "Enter your address",
|
|
1147
1147
|
textValue: this.state.roomNumber,
|
|
1148
1148
|
onChangeText: roomNumber => this.setState({
|
|
1149
1149
|
roomNumber
|
|
@@ -1161,8 +1161,8 @@ class MaintenanceRequest extends Component {
|
|
|
1161
1161
|
marginTop: 16,
|
|
1162
1162
|
paddingHorizontal: 24,
|
|
1163
1163
|
paddingVertical: 16,
|
|
1164
|
-
flexDirection:
|
|
1165
|
-
justifyContent:
|
|
1164
|
+
flexDirection: "row",
|
|
1165
|
+
justifyContent: "space-between"
|
|
1166
1166
|
}
|
|
1167
1167
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
1168
1168
|
style: styles.sectionTitle
|
|
@@ -1170,7 +1170,7 @@ class MaintenanceRequest extends Component {
|
|
|
1170
1170
|
onPress: this.onPressType.bind(this)
|
|
1171
1171
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1172
1172
|
style: {
|
|
1173
|
-
flexDirection:
|
|
1173
|
+
flexDirection: "row"
|
|
1174
1174
|
}
|
|
1175
1175
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
1176
1176
|
style: [styles.sectionTitle, {
|
|
@@ -1189,8 +1189,8 @@ class MaintenanceRequest extends Component {
|
|
|
1189
1189
|
marginTop: 16
|
|
1190
1190
|
}
|
|
1191
1191
|
}, /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1192
|
-
label:
|
|
1193
|
-
placeholder:
|
|
1192
|
+
label: "Title",
|
|
1193
|
+
placeholder: "Enter a title for your request",
|
|
1194
1194
|
textValue: this.state.title,
|
|
1195
1195
|
onChangeText: title => this.setState({
|
|
1196
1196
|
title
|
|
@@ -1207,8 +1207,8 @@ class MaintenanceRequest extends Component {
|
|
|
1207
1207
|
multiline: true,
|
|
1208
1208
|
autoGrow: true
|
|
1209
1209
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1210
|
-
label:
|
|
1211
|
-
placeholder:
|
|
1210
|
+
label: "Description",
|
|
1211
|
+
placeholder: "Describe your request here in detail",
|
|
1212
1212
|
textValue: this.state.description,
|
|
1213
1213
|
onChangeText: description => this.setState({
|
|
1214
1214
|
description
|
|
@@ -1225,12 +1225,12 @@ class MaintenanceRequest extends Component {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1227
1227
|
style: [{
|
|
1228
|
-
width:
|
|
1228
|
+
width: "100%",
|
|
1229
1229
|
paddingVertical: 16,
|
|
1230
|
-
flexDirection:
|
|
1231
|
-
justifyContent:
|
|
1232
|
-
alignItems:
|
|
1233
|
-
position:
|
|
1230
|
+
flexDirection: "row",
|
|
1231
|
+
justifyContent: "space-between",
|
|
1232
|
+
alignItems: "center",
|
|
1233
|
+
position: "relative"
|
|
1234
1234
|
}, this.state.isHome && {
|
|
1235
1235
|
borderBottomWidth: 1,
|
|
1236
1236
|
borderBottomColor: Colours.LINEGREY
|
|
@@ -1244,13 +1244,13 @@ class MaintenanceRequest extends Component {
|
|
|
1244
1244
|
isHome: value
|
|
1245
1245
|
}),
|
|
1246
1246
|
trackColor: {
|
|
1247
|
-
false:
|
|
1247
|
+
false: "#ddd",
|
|
1248
1248
|
true: this.props.colourBrandingMain
|
|
1249
1249
|
},
|
|
1250
|
-
thumbColor: Platform.OS ===
|
|
1250
|
+
thumbColor: Platform.OS === "android" ? "#fff" : null
|
|
1251
1251
|
})), this.state.isHome && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1252
|
-
label:
|
|
1253
|
-
placeholder:
|
|
1252
|
+
label: "Available times",
|
|
1253
|
+
placeholder: "Describe your available times here in detail.",
|
|
1254
1254
|
textValue: this.state.times,
|
|
1255
1255
|
onChangeText: times => this.setState({
|
|
1256
1256
|
times
|
|
@@ -1272,7 +1272,7 @@ class MaintenanceRequest extends Component {
|
|
|
1272
1272
|
renderRegisterConfirmation() {
|
|
1273
1273
|
return /*#__PURE__*/React.createElement(Components.ConfirmationPopup, {
|
|
1274
1274
|
confirmText: `${values.textEntityName} submitted`,
|
|
1275
|
-
repeatText:
|
|
1275
|
+
repeatText: "Submit another",
|
|
1276
1276
|
visible: this.state.confirmationToShow,
|
|
1277
1277
|
onClose: this.onCloseConfirmationPopup.bind(this),
|
|
1278
1278
|
onPressAction: this.onConfirmationReset.bind(this)
|
|
@@ -1296,8 +1296,8 @@ class MaintenanceRequest extends Component {
|
|
|
1296
1296
|
return null;
|
|
1297
1297
|
}
|
|
1298
1298
|
return /*#__PURE__*/React.createElement(Components.WarningPopup, {
|
|
1299
|
-
confirmText:
|
|
1300
|
-
infoText:
|
|
1299
|
+
confirmText: "No forms are available",
|
|
1300
|
+
infoText: "Check back later for forms.",
|
|
1301
1301
|
visible: this.state.noType,
|
|
1302
1302
|
onClose: this.onPressBack.bind(this),
|
|
1303
1303
|
padHorizontal: true
|
|
@@ -1311,7 +1311,7 @@ class MaintenanceRequest extends Component {
|
|
|
1311
1311
|
popUpType
|
|
1312
1312
|
} = this.state;
|
|
1313
1313
|
return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
1314
|
-
behavior:
|
|
1314
|
+
behavior: "padding",
|
|
1315
1315
|
style: styles.viewContainer
|
|
1316
1316
|
}, this.renderImageUploader(), /*#__PURE__*/React.createElement(View, {
|
|
1317
1317
|
style: styles.container
|
|
@@ -1319,7 +1319,7 @@ class MaintenanceRequest extends Component {
|
|
|
1319
1319
|
leftIcon: "angle-left",
|
|
1320
1320
|
onPressLeft: this.onPressBack.bind(this),
|
|
1321
1321
|
text: this.props.strings[`${values.featureKey}_textFeatureTitle`] || values.textFeatureTitle,
|
|
1322
|
-
rightText: submitting || success ? null :
|
|
1322
|
+
rightText: submitting || success ? null : "Done",
|
|
1323
1323
|
onPressRight: this.submitRequest.bind(this),
|
|
1324
1324
|
absoluteRight: true
|
|
1325
1325
|
}), this.renderForm()), this.renderRegisterConfirmation(), this.renderVideoPlayerPopup(), this.renderNoType(), /*#__PURE__*/React.createElement(DateTimePicker, {
|
|
@@ -1336,52 +1336,52 @@ class MaintenanceRequest extends Component {
|
|
|
1336
1336
|
const styles = {
|
|
1337
1337
|
viewContainer: {
|
|
1338
1338
|
flex: 1,
|
|
1339
|
-
backgroundColor:
|
|
1339
|
+
backgroundColor: "#fff"
|
|
1340
1340
|
},
|
|
1341
1341
|
container: {
|
|
1342
1342
|
flex: 1,
|
|
1343
|
-
position:
|
|
1344
|
-
backgroundColor:
|
|
1343
|
+
position: "relative",
|
|
1344
|
+
backgroundColor: "#f0f0f5"
|
|
1345
1345
|
},
|
|
1346
1346
|
errorText: {
|
|
1347
|
-
fontFamily:
|
|
1347
|
+
fontFamily: "sf-regular",
|
|
1348
1348
|
color: Colours.COLOUR_TANGERINE,
|
|
1349
1349
|
fontSize: 16
|
|
1350
1350
|
},
|
|
1351
1351
|
requestSuccess: {
|
|
1352
|
-
fontFamily:
|
|
1352
|
+
fontFamily: "sf-regular",
|
|
1353
1353
|
color: Colours.TEXT_DARK,
|
|
1354
1354
|
fontSize: 17,
|
|
1355
|
-
textAlign:
|
|
1355
|
+
textAlign: "center"
|
|
1356
1356
|
},
|
|
1357
1357
|
sectionTitle: {
|
|
1358
|
-
fontFamily:
|
|
1358
|
+
fontFamily: "sf-regular",
|
|
1359
1359
|
fontSize: 17,
|
|
1360
1360
|
color: Colours.TEXT_DARK
|
|
1361
1361
|
},
|
|
1362
1362
|
imageListContainer: {
|
|
1363
1363
|
marginTop: 8,
|
|
1364
1364
|
padding: 8,
|
|
1365
|
-
flexDirection:
|
|
1365
|
+
flexDirection: "row",
|
|
1366
1366
|
backgroundColor: Colours.BOXGREY,
|
|
1367
1367
|
minHeight: 106
|
|
1368
1368
|
},
|
|
1369
1369
|
imageListContainerEmpty: {
|
|
1370
|
-
justifyContent:
|
|
1371
|
-
alignItems:
|
|
1372
|
-
flexDirection:
|
|
1370
|
+
justifyContent: "center",
|
|
1371
|
+
alignItems: "center",
|
|
1372
|
+
flexDirection: "column"
|
|
1373
1373
|
},
|
|
1374
1374
|
documentListContainer: {
|
|
1375
1375
|
marginTop: 8,
|
|
1376
|
-
flexDirection:
|
|
1377
|
-
alignItems:
|
|
1376
|
+
flexDirection: "column",
|
|
1377
|
+
alignItems: "flex-start"
|
|
1378
1378
|
},
|
|
1379
1379
|
imageContainer: {
|
|
1380
1380
|
width: PHOTO_SIZE,
|
|
1381
1381
|
height: PHOTO_SIZE,
|
|
1382
|
-
borderStyle:
|
|
1383
|
-
justifyContent:
|
|
1384
|
-
alignItems:
|
|
1382
|
+
borderStyle: "dashed",
|
|
1383
|
+
justifyContent: "center",
|
|
1384
|
+
alignItems: "center",
|
|
1385
1385
|
borderWidth: 1,
|
|
1386
1386
|
borderColor: Colours.LINEGREY,
|
|
1387
1387
|
borderRadius: 4,
|
|
@@ -1390,13 +1390,13 @@ const styles = {
|
|
|
1390
1390
|
imageContainerNotEmpty: {
|
|
1391
1391
|
borderWidth: 1,
|
|
1392
1392
|
borderColor: Colours.LINEGREY,
|
|
1393
|
-
backgroundColor:
|
|
1394
|
-
borderStyle:
|
|
1393
|
+
backgroundColor: "#fff",
|
|
1394
|
+
borderStyle: "dashed"
|
|
1395
1395
|
},
|
|
1396
1396
|
imageBackground: {
|
|
1397
1397
|
flex: 1,
|
|
1398
|
-
height:
|
|
1399
|
-
width:
|
|
1398
|
+
height: "100%",
|
|
1399
|
+
width: "100%",
|
|
1400
1400
|
borderRadius: 4
|
|
1401
1401
|
},
|
|
1402
1402
|
imageCircle: {
|
|
@@ -1404,60 +1404,60 @@ const styles = {
|
|
|
1404
1404
|
height: 90,
|
|
1405
1405
|
borderRadius: 45,
|
|
1406
1406
|
backgroundColor: Colours.PINKISH_GREY,
|
|
1407
|
-
justifyContent:
|
|
1407
|
+
justifyContent: "center"
|
|
1408
1408
|
},
|
|
1409
1409
|
addImageIcon: {
|
|
1410
|
-
color:
|
|
1410
|
+
color: "#fff",
|
|
1411
1411
|
fontSize: 32
|
|
1412
1412
|
},
|
|
1413
1413
|
imagePlayContainer: {
|
|
1414
|
-
position:
|
|
1414
|
+
position: "absolute",
|
|
1415
1415
|
top: 0,
|
|
1416
1416
|
left: 0,
|
|
1417
1417
|
right: 0,
|
|
1418
1418
|
bottom: 0,
|
|
1419
|
-
alignItems:
|
|
1420
|
-
justifyContent:
|
|
1419
|
+
alignItems: "center",
|
|
1420
|
+
justifyContent: "center"
|
|
1421
1421
|
},
|
|
1422
1422
|
imageControlIcon: {
|
|
1423
|
-
color:
|
|
1423
|
+
color: "#fff",
|
|
1424
1424
|
fontSize: 20,
|
|
1425
|
-
textShadowColor:
|
|
1425
|
+
textShadowColor: "rgba(0,0,0,0.3)",
|
|
1426
1426
|
textShadowOffset: {
|
|
1427
1427
|
width: 2,
|
|
1428
1428
|
height: 2
|
|
1429
1429
|
}
|
|
1430
1430
|
},
|
|
1431
1431
|
removeImage: {
|
|
1432
|
-
position:
|
|
1432
|
+
position: "absolute",
|
|
1433
1433
|
top: 0,
|
|
1434
1434
|
right: 0,
|
|
1435
1435
|
padding: 4,
|
|
1436
1436
|
width: 40,
|
|
1437
1437
|
height: 40,
|
|
1438
|
-
alignItems:
|
|
1439
|
-
justifyContent:
|
|
1438
|
+
alignItems: "center",
|
|
1439
|
+
justifyContent: "center"
|
|
1440
1440
|
},
|
|
1441
1441
|
staticTitle: {
|
|
1442
1442
|
fontSize: 20,
|
|
1443
|
-
fontFamily:
|
|
1443
|
+
fontFamily: "sf-semibold",
|
|
1444
1444
|
color: Colours.TEXT_DARKEST
|
|
1445
1445
|
},
|
|
1446
1446
|
staticText: {
|
|
1447
1447
|
fontSize: 17,
|
|
1448
|
-
fontFamily:
|
|
1448
|
+
fontFamily: "sf-regular",
|
|
1449
1449
|
color: Colours.TEXT_DARKEST,
|
|
1450
1450
|
lineHeight: 24
|
|
1451
1451
|
},
|
|
1452
1452
|
multiChoiceOption: {
|
|
1453
1453
|
marginTop: 16,
|
|
1454
|
-
flexDirection:
|
|
1455
|
-
alignItems:
|
|
1454
|
+
flexDirection: "row",
|
|
1455
|
+
alignItems: "center",
|
|
1456
1456
|
minHeight: 20
|
|
1457
1457
|
},
|
|
1458
1458
|
multiChoiceText: {
|
|
1459
1459
|
flex: 1,
|
|
1460
|
-
fontFamily:
|
|
1460
|
+
fontFamily: "sf-medium",
|
|
1461
1461
|
fontSize: 14,
|
|
1462
1462
|
color: Colours.TEXT_DARK
|
|
1463
1463
|
},
|
|
@@ -1474,24 +1474,24 @@ const styles = {
|
|
|
1474
1474
|
borderRadius: 4
|
|
1475
1475
|
},
|
|
1476
1476
|
dateContainer: {
|
|
1477
|
-
flexDirection:
|
|
1478
|
-
alignItems:
|
|
1477
|
+
flexDirection: "row",
|
|
1478
|
+
alignItems: "center"
|
|
1479
1479
|
},
|
|
1480
1480
|
dateFieldButton: {
|
|
1481
1481
|
flex: 1
|
|
1482
1482
|
},
|
|
1483
1483
|
dateFieldContainer: {
|
|
1484
|
-
flexDirection:
|
|
1484
|
+
flexDirection: "row",
|
|
1485
1485
|
borderRadius: 2,
|
|
1486
|
-
backgroundColor:
|
|
1486
|
+
backgroundColor: "#ebeff2",
|
|
1487
1487
|
padding: 8,
|
|
1488
1488
|
marginTop: 8
|
|
1489
1489
|
},
|
|
1490
1490
|
dateText: {
|
|
1491
1491
|
flex: 1,
|
|
1492
|
-
fontFamily:
|
|
1492
|
+
fontFamily: "sf-regular",
|
|
1493
1493
|
fontSize: 16,
|
|
1494
|
-
color:
|
|
1494
|
+
color: "#65686D"
|
|
1495
1495
|
},
|
|
1496
1496
|
dateIcon: {
|
|
1497
1497
|
fontSize: 18,
|
|
@@ -1505,36 +1505,36 @@ const styles = {
|
|
|
1505
1505
|
color: Colours.TEXT_BLUEGREY
|
|
1506
1506
|
},
|
|
1507
1507
|
documentContainer: {
|
|
1508
|
-
flexDirection:
|
|
1509
|
-
alignItems:
|
|
1510
|
-
justifyContent:
|
|
1508
|
+
flexDirection: "row",
|
|
1509
|
+
alignItems: "center",
|
|
1510
|
+
justifyContent: "space-between",
|
|
1511
1511
|
paddingVertical: 4
|
|
1512
1512
|
},
|
|
1513
1513
|
documentTypeContainer: {
|
|
1514
1514
|
width: 50,
|
|
1515
1515
|
height: 60,
|
|
1516
|
-
justifyContent:
|
|
1517
|
-
alignItems:
|
|
1516
|
+
justifyContent: "center",
|
|
1517
|
+
alignItems: "center",
|
|
1518
1518
|
borderRadius: 5,
|
|
1519
1519
|
marginRight: 8
|
|
1520
1520
|
},
|
|
1521
1521
|
documentTypeText: {
|
|
1522
|
-
color:
|
|
1523
|
-
fontFamily:
|
|
1524
|
-
textAlign:
|
|
1522
|
+
color: "#fff",
|
|
1523
|
+
fontFamily: "sf-semibold",
|
|
1524
|
+
textAlign: "center"
|
|
1525
1525
|
},
|
|
1526
1526
|
documentText: {
|
|
1527
1527
|
flex: 1,
|
|
1528
|
-
fontFamily:
|
|
1528
|
+
fontFamily: "sf-semibold",
|
|
1529
1529
|
fontSize: 16,
|
|
1530
|
-
color:
|
|
1530
|
+
color: "#65686D"
|
|
1531
1531
|
},
|
|
1532
1532
|
removeDocumentButton: {
|
|
1533
1533
|
padding: 4,
|
|
1534
1534
|
width: 40,
|
|
1535
1535
|
height: 40,
|
|
1536
|
-
alignItems:
|
|
1537
|
-
justifyContent:
|
|
1536
|
+
alignItems: "center",
|
|
1537
|
+
justifyContent: "center",
|
|
1538
1538
|
marginLeft: 8
|
|
1539
1539
|
},
|
|
1540
1540
|
removeDocumentIcon: {
|
|
@@ -1542,16 +1542,16 @@ const styles = {
|
|
|
1542
1542
|
},
|
|
1543
1543
|
// PC-1255: User picker styles
|
|
1544
1544
|
userPickerContainer: {
|
|
1545
|
-
flexDirection:
|
|
1546
|
-
justifyContent:
|
|
1547
|
-
alignItems:
|
|
1545
|
+
flexDirection: "row",
|
|
1546
|
+
justifyContent: "space-between",
|
|
1547
|
+
alignItems: "center"
|
|
1548
1548
|
},
|
|
1549
1549
|
profileContainer: {
|
|
1550
|
-
flexDirection:
|
|
1551
|
-
alignItems:
|
|
1550
|
+
flexDirection: "row",
|
|
1551
|
+
alignItems: "center"
|
|
1552
1552
|
},
|
|
1553
1553
|
nameText: {
|
|
1554
|
-
fontFamily:
|
|
1554
|
+
fontFamily: "sf-medium",
|
|
1555
1555
|
fontSize: 16,
|
|
1556
1556
|
color: Colours.TEXT_DARK,
|
|
1557
1557
|
marginLeft: 8
|