@plusscommunities/pluss-maintenance-app-forms 8.0.5 → 8.0.6
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.
|
@@ -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
|
|
@@ -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);
|
|
@@ -107,7 +107,7 @@ class MaintenanceRequest extends Component {
|
|
|
107
107
|
} catch (error) {
|
|
108
108
|
// Permission denied (403) or other error - continue without auto-population
|
|
109
109
|
// User can still manually enter contact details
|
|
110
|
-
console.log(
|
|
110
|
+
console.log("Could not fetch user details for auto-population:", error);
|
|
111
111
|
}
|
|
112
112
|
this.setState(update);
|
|
113
113
|
});
|
|
@@ -135,7 +135,7 @@ class MaintenanceRequest extends Component {
|
|
|
135
135
|
};
|
|
136
136
|
const field = update.customFields[fieldId];
|
|
137
137
|
field.answer = _.xor(field.answer || [], [answer]);
|
|
138
|
-
if (field.isTitle) update.title = field.answer.join(
|
|
138
|
+
if (field.isTitle) update.title = field.answer.join(", ");
|
|
139
139
|
this.setState(update);
|
|
140
140
|
});
|
|
141
141
|
_defineProperty(this, "onOpenDatePicker", (field, fieldId) => {
|
|
@@ -168,12 +168,12 @@ class MaintenanceRequest extends Component {
|
|
|
168
168
|
};
|
|
169
169
|
const field = update.customFields[dateFieldId];
|
|
170
170
|
const dateObj = moment(date);
|
|
171
|
-
if (popUpType ===
|
|
172
|
-
field.answer = dateObj.format(
|
|
173
|
-
if (field.isTitle) update.title = dateObj.format(
|
|
171
|
+
if (popUpType === "date") {
|
|
172
|
+
field.answer = dateObj.format("YYYY-MM-DD");
|
|
173
|
+
if (field.isTitle) update.title = dateObj.format("DD MMM YYYY");
|
|
174
174
|
} else {
|
|
175
|
-
field.answer = dateObj.format(
|
|
176
|
-
if (field.isTitle) update.title = dateObj.format(
|
|
175
|
+
field.answer = dateObj.format("HH:mm");
|
|
176
|
+
if (field.isTitle) update.title = dateObj.format("h:mm a");
|
|
177
177
|
}
|
|
178
178
|
this.setState(update);
|
|
179
179
|
});
|
|
@@ -184,7 +184,7 @@ class MaintenanceRequest extends Component {
|
|
|
184
184
|
const imagesUpdate = this.getImages(imageFieldId);
|
|
185
185
|
imagesUpdate.splice(imagesUpdate.length - 1, 0, {
|
|
186
186
|
uploading: true,
|
|
187
|
-
uploadProgress:
|
|
187
|
+
uploadProgress: "0%",
|
|
188
188
|
uploadUri,
|
|
189
189
|
imageUri,
|
|
190
190
|
allowRetry: true
|
|
@@ -212,7 +212,7 @@ class MaintenanceRequest extends Component {
|
|
|
212
212
|
const imagesUpdate = this.getImages(imageFieldId);
|
|
213
213
|
imagesUpdate.map(img => {
|
|
214
214
|
if (img.uploadUri === uploadUri && img.uploading) {
|
|
215
|
-
img.url = uri.replace(
|
|
215
|
+
img.url = uri.replace("/general/", "/general1400/");
|
|
216
216
|
img.thumbNailExists = false;
|
|
217
217
|
img.thumbNailUrl = Helper.getThumb300(img.url);
|
|
218
218
|
img.allowRetry = true;
|
|
@@ -228,7 +228,7 @@ class MaintenanceRequest extends Component {
|
|
|
228
228
|
imagesUpdate.map(img => {
|
|
229
229
|
if (img.uploadUri === uploadUri) {
|
|
230
230
|
img.uploading = true; // Requried for retry
|
|
231
|
-
img.uploadProgress =
|
|
231
|
+
img.uploadProgress = "";
|
|
232
232
|
img.allowRetry = true;
|
|
233
233
|
}
|
|
234
234
|
});
|
|
@@ -252,7 +252,7 @@ class MaintenanceRequest extends Component {
|
|
|
252
252
|
const documentsUpdate = this.getDocuments(documentFieldId);
|
|
253
253
|
documentsUpdate.splice(documentsUpdate.length - 1, 0, {
|
|
254
254
|
uploading: true,
|
|
255
|
-
uploadProgress:
|
|
255
|
+
uploadProgress: "0%",
|
|
256
256
|
uploadUri,
|
|
257
257
|
documentUri,
|
|
258
258
|
documentName,
|
|
@@ -277,7 +277,7 @@ class MaintenanceRequest extends Component {
|
|
|
277
277
|
documentsUpdate.map(doc => {
|
|
278
278
|
if (doc.uploadUri === uploadUri && doc.uploading) {
|
|
279
279
|
doc.uploading = false;
|
|
280
|
-
doc.uploadProgress =
|
|
280
|
+
doc.uploadProgress = "100%";
|
|
281
281
|
doc.url = uri;
|
|
282
282
|
doc.allowRetry = true;
|
|
283
283
|
}
|
|
@@ -289,7 +289,7 @@ class MaintenanceRequest extends Component {
|
|
|
289
289
|
documentsUpdate.map(doc => {
|
|
290
290
|
if (doc.uploadUri === uploadUri) {
|
|
291
291
|
doc.uploading = true; // Requried for retry
|
|
292
|
-
doc.uploadProgress =
|
|
292
|
+
doc.uploadProgress = "";
|
|
293
293
|
doc.allowRetry = true;
|
|
294
294
|
}
|
|
295
295
|
});
|
|
@@ -301,19 +301,19 @@ class MaintenanceRequest extends Component {
|
|
|
301
301
|
type,
|
|
302
302
|
answer
|
|
303
303
|
} = field;
|
|
304
|
-
if ([
|
|
304
|
+
if (["staticTitle", "staticText"].includes(type)) return true;
|
|
305
305
|
const checkMandatory = () => {
|
|
306
306
|
if (!mandatory) return true;
|
|
307
307
|
switch (type) {
|
|
308
|
-
case
|
|
308
|
+
case "yn":
|
|
309
309
|
return _.isBoolean(answer);
|
|
310
|
-
case
|
|
310
|
+
case "image":
|
|
311
311
|
const imagesList = this.getImageUrls(fieldId);
|
|
312
312
|
return imagesList.length > 0;
|
|
313
|
-
case
|
|
313
|
+
case "document":
|
|
314
314
|
const documentsList = this.getDocumentAnswers(fieldId);
|
|
315
315
|
return documentsList.length > 0;
|
|
316
|
-
case
|
|
316
|
+
case "checkbox":
|
|
317
317
|
return _.isArray(answer) && answer.length > 0;
|
|
318
318
|
default:
|
|
319
319
|
return !_.isNil(answer) && !_.isEmpty(answer);
|
|
@@ -322,12 +322,12 @@ class MaintenanceRequest extends Component {
|
|
|
322
322
|
const checkFormat = () => {
|
|
323
323
|
if (_.isNil(answer) || _.isEmpty(answer)) return true;
|
|
324
324
|
switch (type) {
|
|
325
|
-
case
|
|
325
|
+
case "email":
|
|
326
326
|
return Helper.isEmail(answer);
|
|
327
|
-
case
|
|
328
|
-
return moment(answer,
|
|
329
|
-
case
|
|
330
|
-
return moment(answer,
|
|
327
|
+
case "date":
|
|
328
|
+
return moment(answer, "YYYY-MM-DD", true).isValid();
|
|
329
|
+
case "time":
|
|
330
|
+
return moment(answer, "HH:mm", true).isValid();
|
|
331
331
|
default:
|
|
332
332
|
return true;
|
|
333
333
|
}
|
|
@@ -363,8 +363,8 @@ class MaintenanceRequest extends Component {
|
|
|
363
363
|
// Fix custom images field answers
|
|
364
364
|
const customFields = _.cloneDeep(this.state.customFields);
|
|
365
365
|
const updatedCustomFields = customFields.map((field, fieldId) => {
|
|
366
|
-
if (field.type ===
|
|
367
|
-
if (field.type ===
|
|
366
|
+
if (field.type === "image") field.answer = this.getImageUrls(fieldId);
|
|
367
|
+
if (field.type === "document") field.answer = this.getDocumentAnswers(fieldId);
|
|
368
368
|
return field;
|
|
369
369
|
});
|
|
370
370
|
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 => {
|
|
@@ -382,7 +382,7 @@ class MaintenanceRequest extends Component {
|
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}).catch(err => {
|
|
385
|
-
console.log(
|
|
385
|
+
console.log("maintenance submission fail.");
|
|
386
386
|
console.log(err);
|
|
387
387
|
this.setState({
|
|
388
388
|
submitting: false
|
|
@@ -394,7 +394,7 @@ class MaintenanceRequest extends Component {
|
|
|
394
394
|
const job = await maintenanceActions.getJob(Helper.getSite(this.props.site), id);
|
|
395
395
|
this.props.jobAdded(job.data);
|
|
396
396
|
} catch (error) {
|
|
397
|
-
console.log(
|
|
397
|
+
console.log("refreshRequest error", error);
|
|
398
398
|
}
|
|
399
399
|
});
|
|
400
400
|
_defineProperty(this, "validateCustomFields", () => {
|
|
@@ -513,7 +513,7 @@ class MaintenanceRequest extends Component {
|
|
|
513
513
|
this.setDocuments(documentsUpdate, fieldId);
|
|
514
514
|
});
|
|
515
515
|
_defineProperty(this, "toggleFullscreenVideo", url => {
|
|
516
|
-
if (typeof url !==
|
|
516
|
+
if (typeof url !== "string") url = "";
|
|
517
517
|
this.setState({
|
|
518
518
|
showFullscreenVideo: url.length > 0,
|
|
519
519
|
currentVideoUrl: url
|
|
@@ -526,19 +526,19 @@ class MaintenanceRequest extends Component {
|
|
|
526
526
|
error: null,
|
|
527
527
|
showError: false,
|
|
528
528
|
loadingTypes: values.forceCustomFields,
|
|
529
|
-
userName:
|
|
530
|
-
roomNumber:
|
|
531
|
-
phone:
|
|
532
|
-
title:
|
|
533
|
-
description:
|
|
534
|
-
times:
|
|
535
|
-
type:
|
|
529
|
+
userName: "",
|
|
530
|
+
roomNumber: "",
|
|
531
|
+
phone: "",
|
|
532
|
+
title: "",
|
|
533
|
+
description: "",
|
|
534
|
+
times: "",
|
|
535
|
+
type: "General",
|
|
536
536
|
uploadingImage: false,
|
|
537
537
|
images: [{
|
|
538
538
|
add: true
|
|
539
539
|
}],
|
|
540
540
|
showFullscreenVideo: false,
|
|
541
|
-
currentVideoUrl:
|
|
541
|
+
currentVideoUrl: "",
|
|
542
542
|
isHome: false,
|
|
543
543
|
types: [],
|
|
544
544
|
confirmationToShow: false,
|
|
@@ -546,7 +546,7 @@ class MaintenanceRequest extends Component {
|
|
|
546
546
|
customFieldImages: {},
|
|
547
547
|
customFieldDocuments: {},
|
|
548
548
|
isDateTimePickerVisible: false,
|
|
549
|
-
popUpType:
|
|
549
|
+
popUpType: "date",
|
|
550
550
|
dateFieldId: null,
|
|
551
551
|
imageFieldId: null,
|
|
552
552
|
// PC-1255: On-behalf request fields
|
|
@@ -556,9 +556,9 @@ class MaintenanceRequest extends Component {
|
|
|
556
556
|
};
|
|
557
557
|
this.checkThumb = null;
|
|
558
558
|
this.keyboardTypes = {
|
|
559
|
-
phone:
|
|
560
|
-
email:
|
|
561
|
-
text:
|
|
559
|
+
phone: "phone-pad",
|
|
560
|
+
email: "email-address",
|
|
561
|
+
text: "default"
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
564
|
componentDidMount() {
|
|
@@ -588,9 +588,9 @@ class MaintenanceRequest extends Component {
|
|
|
588
588
|
onConfirmationReset() {
|
|
589
589
|
this.setState({
|
|
590
590
|
confirmationToShow: false,
|
|
591
|
-
title:
|
|
592
|
-
description:
|
|
593
|
-
times:
|
|
591
|
+
title: "",
|
|
592
|
+
description: "",
|
|
593
|
+
times: "",
|
|
594
594
|
isHome: false,
|
|
595
595
|
uploadingImage: false,
|
|
596
596
|
images: [{
|
|
@@ -603,7 +603,7 @@ class MaintenanceRequest extends Component {
|
|
|
603
603
|
customFieldImages: {},
|
|
604
604
|
customFieldDocuments: {},
|
|
605
605
|
isDateTimePickerVisible: false,
|
|
606
|
-
popUpType:
|
|
606
|
+
popUpType: "date",
|
|
607
607
|
dateFieldId: null,
|
|
608
608
|
imageFieldId: null
|
|
609
609
|
}, () => this.pickType(this.state.type));
|
|
@@ -612,8 +612,9 @@ class MaintenanceRequest extends Component {
|
|
|
612
612
|
maintenanceActions.getJobTypes(Helper.getSite(this.props.site)).then(res => {
|
|
613
613
|
this.setState({
|
|
614
614
|
types: res.data
|
|
615
|
+
}, () => {
|
|
616
|
+
this.getDefaultJob();
|
|
615
617
|
});
|
|
616
|
-
this.getDefaultJob();
|
|
617
618
|
}).catch(() => {});
|
|
618
619
|
}
|
|
619
620
|
pickType(type) {
|
|
@@ -634,7 +635,7 @@ class MaintenanceRequest extends Component {
|
|
|
634
635
|
customFields: selected.hasCustomFields && selected.customFields.length > 0 ? _.cloneDeep(selected.customFields) : [],
|
|
635
636
|
loadingTypes: false
|
|
636
637
|
};
|
|
637
|
-
if (!_.isEmpty(update.customFields) && !_.some(update.customFields,
|
|
638
|
+
if (!_.isEmpty(update.customFields) && !_.some(update.customFields, "isTitle")) {
|
|
638
639
|
update.title = this.state.userName;
|
|
639
640
|
}
|
|
640
641
|
this.setState(update);
|
|
@@ -664,7 +665,7 @@ class MaintenanceRequest extends Component {
|
|
|
664
665
|
if (!this.props.connected) {
|
|
665
666
|
this.setState({
|
|
666
667
|
error: {
|
|
667
|
-
message:
|
|
668
|
+
message: "No internet connection detected"
|
|
668
669
|
}
|
|
669
670
|
});
|
|
670
671
|
}
|
|
@@ -678,14 +679,14 @@ class MaintenanceRequest extends Component {
|
|
|
678
679
|
|
|
679
680
|
// PC-1255: Validate user selection for on-behalf requests
|
|
680
681
|
if (this.state.canCreateOnBehalf && !this.state.selectedUser) {
|
|
681
|
-
console.log(
|
|
682
|
+
console.log("submitRequest - no user selected for on-behalf request");
|
|
682
683
|
this.setState({
|
|
683
684
|
showError: true
|
|
684
685
|
});
|
|
685
686
|
return;
|
|
686
687
|
}
|
|
687
688
|
if (title.length === 0 || !roomNumber || roomNumber.length === 0) {
|
|
688
|
-
console.log(
|
|
689
|
+
console.log("submitRequest - error", {
|
|
689
690
|
title,
|
|
690
691
|
roomNumber
|
|
691
692
|
});
|
|
@@ -696,7 +697,7 @@ class MaintenanceRequest extends Component {
|
|
|
696
697
|
}
|
|
697
698
|
if (hasCustomFields) {
|
|
698
699
|
if (!this.validateCustomFields()) {
|
|
699
|
-
console.log(
|
|
700
|
+
console.log("submitRequest - custom fields error");
|
|
700
701
|
this.setState({
|
|
701
702
|
showError: true
|
|
702
703
|
});
|
|
@@ -704,7 +705,7 @@ class MaintenanceRequest extends Component {
|
|
|
704
705
|
}
|
|
705
706
|
} else {
|
|
706
707
|
if (isHome && times.length < 2) {
|
|
707
|
-
console.log(
|
|
708
|
+
console.log("submitRequest - error", {
|
|
708
709
|
isHome,
|
|
709
710
|
times
|
|
710
711
|
});
|
|
@@ -728,8 +729,8 @@ class MaintenanceRequest extends Component {
|
|
|
728
729
|
width: 1400
|
|
729
730
|
},
|
|
730
731
|
quality: 0.8,
|
|
731
|
-
fileName:
|
|
732
|
-
popupTitle:
|
|
732
|
+
fileName: "serviceImage",
|
|
733
|
+
popupTitle: "Upload Image",
|
|
733
734
|
userId: this.props.uid,
|
|
734
735
|
allowsEditing: false,
|
|
735
736
|
multiple: true,
|
|
@@ -804,7 +805,7 @@ class MaintenanceRequest extends Component {
|
|
|
804
805
|
style: styles.documentTypeText
|
|
805
806
|
}, item.documentExt)), /*#__PURE__*/React.createElement(Text, {
|
|
806
807
|
style: styles.documentText
|
|
807
|
-
}, `${item.documentName}${item.uploading ? ` - ${item.uploadProgress}` :
|
|
808
|
+
}, `${item.documentName}${item.uploading ? ` - ${item.uploadProgress}` : ""}`), !item.uploading && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
808
809
|
style: styles.removeDocumentButton,
|
|
809
810
|
onPress: () => this.removeDocument(index, fieldId)
|
|
810
811
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -821,7 +822,7 @@ class MaintenanceRequest extends Component {
|
|
|
821
822
|
style: {
|
|
822
823
|
padding: 16,
|
|
823
824
|
flex: 1,
|
|
824
|
-
backgroundColor:
|
|
825
|
+
backgroundColor: "#fff"
|
|
825
826
|
}
|
|
826
827
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
827
828
|
style: styles.requestSuccess
|
|
@@ -867,16 +868,16 @@ class MaintenanceRequest extends Component {
|
|
|
867
868
|
|
|
868
869
|
renderDateField(field, fieldId, sectionStyle) {
|
|
869
870
|
let displayText, placeHolder, icon, errorText;
|
|
870
|
-
if (field.type ===
|
|
871
|
-
displayText = field.answer ? moment(field.answer,
|
|
872
|
-
placeHolder =
|
|
873
|
-
icon =
|
|
874
|
-
errorText =
|
|
871
|
+
if (field.type === "date") {
|
|
872
|
+
displayText = field.answer ? moment(field.answer, "YYYY-MM-DD").format("DD MMM YYYY") : "";
|
|
873
|
+
placeHolder = "dd mmm yyyy";
|
|
874
|
+
icon = "calendar";
|
|
875
|
+
errorText = "Not a valid date";
|
|
875
876
|
} else {
|
|
876
|
-
displayText = field.answer ? moment(field.answer,
|
|
877
|
-
placeHolder =
|
|
878
|
-
icon =
|
|
879
|
-
errorText =
|
|
877
|
+
displayText = field.answer ? moment(field.answer, "HH:mm").format("h:mm a") : "";
|
|
878
|
+
placeHolder = "--:-- --";
|
|
879
|
+
icon = "clock-o";
|
|
880
|
+
errorText = "Not a valid time";
|
|
880
881
|
}
|
|
881
882
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
882
883
|
key: fieldId,
|
|
@@ -914,7 +915,7 @@ class MaintenanceRequest extends Component {
|
|
|
914
915
|
marginBottom: 24
|
|
915
916
|
};
|
|
916
917
|
switch (field.type) {
|
|
917
|
-
case
|
|
918
|
+
case "yn":
|
|
918
919
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
919
920
|
key: fieldId,
|
|
920
921
|
label: field.label,
|
|
@@ -926,7 +927,7 @@ class MaintenanceRequest extends Component {
|
|
|
926
927
|
showError: this.state.showError,
|
|
927
928
|
required: field.mandatory
|
|
928
929
|
});
|
|
929
|
-
case
|
|
930
|
+
case "multichoice":
|
|
930
931
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
931
932
|
key: fieldId,
|
|
932
933
|
label: field.label,
|
|
@@ -944,7 +945,7 @@ class MaintenanceRequest extends Component {
|
|
|
944
945
|
showError: this.state.showError,
|
|
945
946
|
required: field.mandatory
|
|
946
947
|
});
|
|
947
|
-
case
|
|
948
|
+
case "checkbox":
|
|
948
949
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
949
950
|
key: fieldId,
|
|
950
951
|
label: field.label,
|
|
@@ -974,9 +975,9 @@ class MaintenanceRequest extends Component {
|
|
|
974
975
|
style: styles.multiChoiceText
|
|
975
976
|
}, o));
|
|
976
977
|
}));
|
|
977
|
-
case
|
|
978
|
-
case
|
|
979
|
-
case
|
|
978
|
+
case "text":
|
|
979
|
+
case "email":
|
|
980
|
+
case "phone":
|
|
980
981
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
981
982
|
key: fieldId,
|
|
982
983
|
label: field.label,
|
|
@@ -987,28 +988,28 @@ class MaintenanceRequest extends Component {
|
|
|
987
988
|
squaredCorners: true,
|
|
988
989
|
isValid: () => this.isFieldValid(field, fieldId),
|
|
989
990
|
showError: this.state.showError,
|
|
990
|
-
errorText: field.type ===
|
|
991
|
+
errorText: field.type === "email" ? "Not a valid email" : undefined,
|
|
991
992
|
required: field.mandatory,
|
|
992
993
|
sectionStyle: sectionStyle,
|
|
993
994
|
autoCapitalize: "sentences",
|
|
994
995
|
keyboardType: this.keyboardTypes[field.type]
|
|
995
996
|
});
|
|
996
|
-
case
|
|
997
|
+
case "staticTitle":
|
|
997
998
|
return /*#__PURE__*/React.createElement(Text, {
|
|
998
999
|
key: fieldId,
|
|
999
1000
|
style: [styles.staticTitle, {
|
|
1000
1001
|
color: this.props.colourBrandingMain
|
|
1001
1002
|
}, sectionStyle]
|
|
1002
1003
|
}, field.label);
|
|
1003
|
-
case
|
|
1004
|
+
case "staticText":
|
|
1004
1005
|
return /*#__PURE__*/React.createElement(View, {
|
|
1005
1006
|
key: fieldId,
|
|
1006
1007
|
style: [styles.staticText, sectionStyle]
|
|
1007
1008
|
}, Helper.toParagraphed(field.label, styles.staticText));
|
|
1008
|
-
case
|
|
1009
|
-
case
|
|
1009
|
+
case "date":
|
|
1010
|
+
case "time":
|
|
1010
1011
|
return this.renderDateField(field, fieldId, sectionStyle);
|
|
1011
|
-
case
|
|
1012
|
+
case "image":
|
|
1012
1013
|
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
1013
1014
|
key: fieldId,
|
|
1014
1015
|
label: field.label,
|
|
@@ -1078,7 +1079,7 @@ class MaintenanceRequest extends Component {
|
|
|
1078
1079
|
marginTop: 16
|
|
1079
1080
|
}
|
|
1080
1081
|
}, this.state.canCreateOnBehalf && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1081
|
-
label:
|
|
1082
|
+
label: "Select User",
|
|
1082
1083
|
textValue: (_this$state$selectedU = this.state.selectedUser) === null || _this$state$selectedU === void 0 ? void 0 : _this$state$selectedU.displayName,
|
|
1083
1084
|
hasContent: true,
|
|
1084
1085
|
hasUnderline: true,
|
|
@@ -1100,7 +1101,7 @@ class MaintenanceRequest extends Component {
|
|
|
1100
1101
|
Diameter: 30
|
|
1101
1102
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
1102
1103
|
style: styles.nameText
|
|
1103
|
-
}, ((_this$state$selectedU3 = this.state.selectedUser) === null || _this$state$selectedU3 === void 0 ? void 0 : _this$state$selectedU3.displayName) ||
|
|
1104
|
+
}, ((_this$state$selectedU3 = this.state.selectedUser) === null || _this$state$selectedU3 === void 0 ? void 0 : _this$state$selectedU3.displayName) || "Select User")), /*#__PURE__*/React.createElement(Icon, {
|
|
1104
1105
|
name: "angle-right",
|
|
1105
1106
|
type: "font-awesome",
|
|
1106
1107
|
iconStyle: [styles.sectionTitle, {
|
|
@@ -1108,11 +1109,11 @@ class MaintenanceRequest extends Component {
|
|
|
1108
1109
|
color: this.props.colourBrandingMain
|
|
1109
1110
|
}]
|
|
1110
1111
|
})))), !this.state.canCreateOnBehalf && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1111
|
-
label:
|
|
1112
|
-
placeholder:
|
|
1112
|
+
label: "Name",
|
|
1113
|
+
placeholder: "Enter your name",
|
|
1113
1114
|
textValue: this.state.userName,
|
|
1114
1115
|
onChangeText: userName => this.onChangeName(userName),
|
|
1115
|
-
editable: this.props.userType ===
|
|
1116
|
+
editable: this.props.userType === "KIOSK" && this.state.submitting === false,
|
|
1116
1117
|
isValid: () => {
|
|
1117
1118
|
return this.state.userName.length > 1;
|
|
1118
1119
|
},
|
|
@@ -1121,18 +1122,18 @@ class MaintenanceRequest extends Component {
|
|
|
1121
1122
|
showError: this.state.showError && this.state.userName.length < 2,
|
|
1122
1123
|
hasUnderline: true
|
|
1123
1124
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1124
|
-
label:
|
|
1125
|
-
placeholder:
|
|
1125
|
+
label: "Contact number",
|
|
1126
|
+
placeholder: "Enter phone number",
|
|
1126
1127
|
textValue: this.state.phone,
|
|
1127
1128
|
onChangeText: phone => this.setState({
|
|
1128
1129
|
phone
|
|
1129
1130
|
}),
|
|
1130
1131
|
editable: this.state.submitting === false,
|
|
1131
1132
|
hasUnderline: true,
|
|
1132
|
-
keyboardType:
|
|
1133
|
+
keyboardType: "phone-pad"
|
|
1133
1134
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1134
|
-
label:
|
|
1135
|
-
placeholder:
|
|
1135
|
+
label: "Address",
|
|
1136
|
+
placeholder: "Enter your address",
|
|
1136
1137
|
textValue: this.state.roomNumber,
|
|
1137
1138
|
onChangeText: roomNumber => this.setState({
|
|
1138
1139
|
roomNumber
|
|
@@ -1150,8 +1151,8 @@ class MaintenanceRequest extends Component {
|
|
|
1150
1151
|
marginTop: 16,
|
|
1151
1152
|
paddingHorizontal: 24,
|
|
1152
1153
|
paddingVertical: 16,
|
|
1153
|
-
flexDirection:
|
|
1154
|
-
justifyContent:
|
|
1154
|
+
flexDirection: "row",
|
|
1155
|
+
justifyContent: "space-between"
|
|
1155
1156
|
}
|
|
1156
1157
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
1157
1158
|
style: styles.sectionTitle
|
|
@@ -1159,7 +1160,7 @@ class MaintenanceRequest extends Component {
|
|
|
1159
1160
|
onPress: this.onPressType.bind(this)
|
|
1160
1161
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1161
1162
|
style: {
|
|
1162
|
-
flexDirection:
|
|
1163
|
+
flexDirection: "row"
|
|
1163
1164
|
}
|
|
1164
1165
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
1165
1166
|
style: [styles.sectionTitle, {
|
|
@@ -1178,8 +1179,8 @@ class MaintenanceRequest extends Component {
|
|
|
1178
1179
|
marginTop: 16
|
|
1179
1180
|
}
|
|
1180
1181
|
}, /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1181
|
-
label:
|
|
1182
|
-
placeholder:
|
|
1182
|
+
label: "Title",
|
|
1183
|
+
placeholder: "Enter a title for your request",
|
|
1183
1184
|
textValue: this.state.title,
|
|
1184
1185
|
onChangeText: title => this.setState({
|
|
1185
1186
|
title
|
|
@@ -1196,8 +1197,8 @@ class MaintenanceRequest extends Component {
|
|
|
1196
1197
|
multiline: true,
|
|
1197
1198
|
autoGrow: true
|
|
1198
1199
|
}), /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1199
|
-
label:
|
|
1200
|
-
placeholder:
|
|
1200
|
+
label: "Description",
|
|
1201
|
+
placeholder: "Describe your request here in detail",
|
|
1201
1202
|
textValue: this.state.description,
|
|
1202
1203
|
onChangeText: description => this.setState({
|
|
1203
1204
|
description
|
|
@@ -1214,12 +1215,12 @@ class MaintenanceRequest extends Component {
|
|
|
1214
1215
|
}
|
|
1215
1216
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1216
1217
|
style: [{
|
|
1217
|
-
width:
|
|
1218
|
+
width: "100%",
|
|
1218
1219
|
paddingVertical: 16,
|
|
1219
|
-
flexDirection:
|
|
1220
|
-
justifyContent:
|
|
1221
|
-
alignItems:
|
|
1222
|
-
position:
|
|
1220
|
+
flexDirection: "row",
|
|
1221
|
+
justifyContent: "space-between",
|
|
1222
|
+
alignItems: "center",
|
|
1223
|
+
position: "relative"
|
|
1223
1224
|
}, this.state.isHome && {
|
|
1224
1225
|
borderBottomWidth: 1,
|
|
1225
1226
|
borderBottomColor: Colours.LINEGREY
|
|
@@ -1233,13 +1234,13 @@ class MaintenanceRequest extends Component {
|
|
|
1233
1234
|
isHome: value
|
|
1234
1235
|
}),
|
|
1235
1236
|
trackColor: {
|
|
1236
|
-
false:
|
|
1237
|
+
false: "#ddd",
|
|
1237
1238
|
true: this.props.colourBrandingMain
|
|
1238
1239
|
},
|
|
1239
|
-
thumbColor: Platform.OS ===
|
|
1240
|
+
thumbColor: Platform.OS === "android" ? "#fff" : null
|
|
1240
1241
|
})), this.state.isHome && /*#__PURE__*/React.createElement(Components.FormCardSection, {
|
|
1241
|
-
label:
|
|
1242
|
-
placeholder:
|
|
1242
|
+
label: "Available times",
|
|
1243
|
+
placeholder: "Describe your available times here in detail.",
|
|
1243
1244
|
textValue: this.state.times,
|
|
1244
1245
|
onChangeText: times => this.setState({
|
|
1245
1246
|
times
|
|
@@ -1261,7 +1262,7 @@ class MaintenanceRequest extends Component {
|
|
|
1261
1262
|
renderRegisterConfirmation() {
|
|
1262
1263
|
return /*#__PURE__*/React.createElement(Components.ConfirmationPopup, {
|
|
1263
1264
|
confirmText: `${values.textEntityName} submitted`,
|
|
1264
|
-
repeatText:
|
|
1265
|
+
repeatText: "Submit another",
|
|
1265
1266
|
visible: this.state.confirmationToShow,
|
|
1266
1267
|
onClose: this.onCloseConfirmationPopup.bind(this),
|
|
1267
1268
|
onPressAction: this.onConfirmationReset.bind(this)
|
|
@@ -1285,8 +1286,8 @@ class MaintenanceRequest extends Component {
|
|
|
1285
1286
|
return null;
|
|
1286
1287
|
}
|
|
1287
1288
|
return /*#__PURE__*/React.createElement(Components.WarningPopup, {
|
|
1288
|
-
confirmText:
|
|
1289
|
-
infoText:
|
|
1289
|
+
confirmText: "No forms are available",
|
|
1290
|
+
infoText: "Check back later for forms.",
|
|
1290
1291
|
visible: this.state.noType,
|
|
1291
1292
|
onClose: this.onPressBack.bind(this),
|
|
1292
1293
|
padHorizontal: true
|
|
@@ -1300,7 +1301,7 @@ class MaintenanceRequest extends Component {
|
|
|
1300
1301
|
popUpType
|
|
1301
1302
|
} = this.state;
|
|
1302
1303
|
return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
1303
|
-
behavior:
|
|
1304
|
+
behavior: "padding",
|
|
1304
1305
|
style: styles.viewContainer
|
|
1305
1306
|
}, this.renderImageUploader(), /*#__PURE__*/React.createElement(View, {
|
|
1306
1307
|
style: styles.container
|
|
@@ -1308,7 +1309,7 @@ class MaintenanceRequest extends Component {
|
|
|
1308
1309
|
leftIcon: "angle-left",
|
|
1309
1310
|
onPressLeft: this.onPressBack.bind(this),
|
|
1310
1311
|
text: this.props.strings[`${values.featureKey}_textFeatureTitle`] || values.textFeatureTitle,
|
|
1311
|
-
rightText: submitting || success ? null :
|
|
1312
|
+
rightText: submitting || success ? null : "Done",
|
|
1312
1313
|
onPressRight: this.submitRequest.bind(this),
|
|
1313
1314
|
absoluteRight: true
|
|
1314
1315
|
}), this.renderForm()), this.renderRegisterConfirmation(), this.renderVideoPlayerPopup(), this.renderNoType(), /*#__PURE__*/React.createElement(DateTimePicker, {
|
|
@@ -1326,52 +1327,52 @@ class MaintenanceRequest extends Component {
|
|
|
1326
1327
|
const styles = {
|
|
1327
1328
|
viewContainer: {
|
|
1328
1329
|
flex: 1,
|
|
1329
|
-
backgroundColor:
|
|
1330
|
+
backgroundColor: "#fff"
|
|
1330
1331
|
},
|
|
1331
1332
|
container: {
|
|
1332
1333
|
flex: 1,
|
|
1333
|
-
position:
|
|
1334
|
-
backgroundColor:
|
|
1334
|
+
position: "relative",
|
|
1335
|
+
backgroundColor: "#f0f0f5"
|
|
1335
1336
|
},
|
|
1336
1337
|
errorText: {
|
|
1337
|
-
fontFamily:
|
|
1338
|
+
fontFamily: "sf-regular",
|
|
1338
1339
|
color: Colours.COLOUR_TANGERINE,
|
|
1339
1340
|
fontSize: 16
|
|
1340
1341
|
},
|
|
1341
1342
|
requestSuccess: {
|
|
1342
|
-
fontFamily:
|
|
1343
|
+
fontFamily: "sf-regular",
|
|
1343
1344
|
color: Colours.TEXT_DARK,
|
|
1344
1345
|
fontSize: 17,
|
|
1345
|
-
textAlign:
|
|
1346
|
+
textAlign: "center"
|
|
1346
1347
|
},
|
|
1347
1348
|
sectionTitle: {
|
|
1348
|
-
fontFamily:
|
|
1349
|
+
fontFamily: "sf-regular",
|
|
1349
1350
|
fontSize: 17,
|
|
1350
1351
|
color: Colours.TEXT_DARK
|
|
1351
1352
|
},
|
|
1352
1353
|
imageListContainer: {
|
|
1353
1354
|
marginTop: 8,
|
|
1354
1355
|
padding: 8,
|
|
1355
|
-
flexDirection:
|
|
1356
|
+
flexDirection: "row",
|
|
1356
1357
|
backgroundColor: Colours.BOXGREY,
|
|
1357
1358
|
minHeight: 106
|
|
1358
1359
|
},
|
|
1359
1360
|
imageListContainerEmpty: {
|
|
1360
|
-
justifyContent:
|
|
1361
|
-
alignItems:
|
|
1362
|
-
flexDirection:
|
|
1361
|
+
justifyContent: "center",
|
|
1362
|
+
alignItems: "center",
|
|
1363
|
+
flexDirection: "column"
|
|
1363
1364
|
},
|
|
1364
1365
|
documentListContainer: {
|
|
1365
1366
|
marginTop: 8,
|
|
1366
|
-
flexDirection:
|
|
1367
|
-
alignItems:
|
|
1367
|
+
flexDirection: "column",
|
|
1368
|
+
alignItems: "flex-start"
|
|
1368
1369
|
},
|
|
1369
1370
|
imageContainer: {
|
|
1370
1371
|
width: PHOTO_SIZE,
|
|
1371
1372
|
height: PHOTO_SIZE,
|
|
1372
|
-
borderStyle:
|
|
1373
|
-
justifyContent:
|
|
1374
|
-
alignItems:
|
|
1373
|
+
borderStyle: "dashed",
|
|
1374
|
+
justifyContent: "center",
|
|
1375
|
+
alignItems: "center",
|
|
1375
1376
|
borderWidth: 1,
|
|
1376
1377
|
borderColor: Colours.LINEGREY,
|
|
1377
1378
|
borderRadius: 4,
|
|
@@ -1380,13 +1381,13 @@ const styles = {
|
|
|
1380
1381
|
imageContainerNotEmpty: {
|
|
1381
1382
|
borderWidth: 1,
|
|
1382
1383
|
borderColor: Colours.LINEGREY,
|
|
1383
|
-
backgroundColor:
|
|
1384
|
-
borderStyle:
|
|
1384
|
+
backgroundColor: "#fff",
|
|
1385
|
+
borderStyle: "dashed"
|
|
1385
1386
|
},
|
|
1386
1387
|
imageBackground: {
|
|
1387
1388
|
flex: 1,
|
|
1388
|
-
height:
|
|
1389
|
-
width:
|
|
1389
|
+
height: "100%",
|
|
1390
|
+
width: "100%",
|
|
1390
1391
|
borderRadius: 4
|
|
1391
1392
|
},
|
|
1392
1393
|
imageCircle: {
|
|
@@ -1394,60 +1395,60 @@ const styles = {
|
|
|
1394
1395
|
height: 90,
|
|
1395
1396
|
borderRadius: 45,
|
|
1396
1397
|
backgroundColor: Colours.PINKISH_GREY,
|
|
1397
|
-
justifyContent:
|
|
1398
|
+
justifyContent: "center"
|
|
1398
1399
|
},
|
|
1399
1400
|
addImageIcon: {
|
|
1400
|
-
color:
|
|
1401
|
+
color: "#fff",
|
|
1401
1402
|
fontSize: 32
|
|
1402
1403
|
},
|
|
1403
1404
|
imagePlayContainer: {
|
|
1404
|
-
position:
|
|
1405
|
+
position: "absolute",
|
|
1405
1406
|
top: 0,
|
|
1406
1407
|
left: 0,
|
|
1407
1408
|
right: 0,
|
|
1408
1409
|
bottom: 0,
|
|
1409
|
-
alignItems:
|
|
1410
|
-
justifyContent:
|
|
1410
|
+
alignItems: "center",
|
|
1411
|
+
justifyContent: "center"
|
|
1411
1412
|
},
|
|
1412
1413
|
imageControlIcon: {
|
|
1413
|
-
color:
|
|
1414
|
+
color: "#fff",
|
|
1414
1415
|
fontSize: 20,
|
|
1415
|
-
textShadowColor:
|
|
1416
|
+
textShadowColor: "rgba(0,0,0,0.3)",
|
|
1416
1417
|
textShadowOffset: {
|
|
1417
1418
|
width: 2,
|
|
1418
1419
|
height: 2
|
|
1419
1420
|
}
|
|
1420
1421
|
},
|
|
1421
1422
|
removeImage: {
|
|
1422
|
-
position:
|
|
1423
|
+
position: "absolute",
|
|
1423
1424
|
top: 0,
|
|
1424
1425
|
right: 0,
|
|
1425
1426
|
padding: 4,
|
|
1426
1427
|
width: 40,
|
|
1427
1428
|
height: 40,
|
|
1428
|
-
alignItems:
|
|
1429
|
-
justifyContent:
|
|
1429
|
+
alignItems: "center",
|
|
1430
|
+
justifyContent: "center"
|
|
1430
1431
|
},
|
|
1431
1432
|
staticTitle: {
|
|
1432
1433
|
fontSize: 20,
|
|
1433
|
-
fontFamily:
|
|
1434
|
+
fontFamily: "sf-semibold",
|
|
1434
1435
|
color: Colours.TEXT_DARKEST
|
|
1435
1436
|
},
|
|
1436
1437
|
staticText: {
|
|
1437
1438
|
fontSize: 17,
|
|
1438
|
-
fontFamily:
|
|
1439
|
+
fontFamily: "sf-regular",
|
|
1439
1440
|
color: Colours.TEXT_DARKEST,
|
|
1440
1441
|
lineHeight: 24
|
|
1441
1442
|
},
|
|
1442
1443
|
multiChoiceOption: {
|
|
1443
1444
|
marginTop: 16,
|
|
1444
|
-
flexDirection:
|
|
1445
|
-
alignItems:
|
|
1445
|
+
flexDirection: "row",
|
|
1446
|
+
alignItems: "center",
|
|
1446
1447
|
minHeight: 20
|
|
1447
1448
|
},
|
|
1448
1449
|
multiChoiceText: {
|
|
1449
1450
|
flex: 1,
|
|
1450
|
-
fontFamily:
|
|
1451
|
+
fontFamily: "sf-medium",
|
|
1451
1452
|
fontSize: 14,
|
|
1452
1453
|
color: Colours.TEXT_DARK
|
|
1453
1454
|
},
|
|
@@ -1464,24 +1465,24 @@ const styles = {
|
|
|
1464
1465
|
borderRadius: 4
|
|
1465
1466
|
},
|
|
1466
1467
|
dateContainer: {
|
|
1467
|
-
flexDirection:
|
|
1468
|
-
alignItems:
|
|
1468
|
+
flexDirection: "row",
|
|
1469
|
+
alignItems: "center"
|
|
1469
1470
|
},
|
|
1470
1471
|
dateFieldButton: {
|
|
1471
1472
|
flex: 1
|
|
1472
1473
|
},
|
|
1473
1474
|
dateFieldContainer: {
|
|
1474
|
-
flexDirection:
|
|
1475
|
+
flexDirection: "row",
|
|
1475
1476
|
borderRadius: 2,
|
|
1476
|
-
backgroundColor:
|
|
1477
|
+
backgroundColor: "#ebeff2",
|
|
1477
1478
|
padding: 8,
|
|
1478
1479
|
marginTop: 8
|
|
1479
1480
|
},
|
|
1480
1481
|
dateText: {
|
|
1481
1482
|
flex: 1,
|
|
1482
|
-
fontFamily:
|
|
1483
|
+
fontFamily: "sf-regular",
|
|
1483
1484
|
fontSize: 16,
|
|
1484
|
-
color:
|
|
1485
|
+
color: "#65686D"
|
|
1485
1486
|
},
|
|
1486
1487
|
dateIcon: {
|
|
1487
1488
|
fontSize: 18,
|
|
@@ -1495,36 +1496,36 @@ const styles = {
|
|
|
1495
1496
|
color: Colours.TEXT_BLUEGREY
|
|
1496
1497
|
},
|
|
1497
1498
|
documentContainer: {
|
|
1498
|
-
flexDirection:
|
|
1499
|
-
alignItems:
|
|
1500
|
-
justifyContent:
|
|
1499
|
+
flexDirection: "row",
|
|
1500
|
+
alignItems: "center",
|
|
1501
|
+
justifyContent: "space-between",
|
|
1501
1502
|
paddingVertical: 4
|
|
1502
1503
|
},
|
|
1503
1504
|
documentTypeContainer: {
|
|
1504
1505
|
width: 50,
|
|
1505
1506
|
height: 60,
|
|
1506
|
-
justifyContent:
|
|
1507
|
-
alignItems:
|
|
1507
|
+
justifyContent: "center",
|
|
1508
|
+
alignItems: "center",
|
|
1508
1509
|
borderRadius: 5,
|
|
1509
1510
|
marginRight: 8
|
|
1510
1511
|
},
|
|
1511
1512
|
documentTypeText: {
|
|
1512
|
-
color:
|
|
1513
|
-
fontFamily:
|
|
1514
|
-
textAlign:
|
|
1513
|
+
color: "#fff",
|
|
1514
|
+
fontFamily: "sf-semibold",
|
|
1515
|
+
textAlign: "center"
|
|
1515
1516
|
},
|
|
1516
1517
|
documentText: {
|
|
1517
1518
|
flex: 1,
|
|
1518
|
-
fontFamily:
|
|
1519
|
+
fontFamily: "sf-semibold",
|
|
1519
1520
|
fontSize: 16,
|
|
1520
|
-
color:
|
|
1521
|
+
color: "#65686D"
|
|
1521
1522
|
},
|
|
1522
1523
|
removeDocumentButton: {
|
|
1523
1524
|
padding: 4,
|
|
1524
1525
|
width: 40,
|
|
1525
1526
|
height: 40,
|
|
1526
|
-
alignItems:
|
|
1527
|
-
justifyContent:
|
|
1527
|
+
alignItems: "center",
|
|
1528
|
+
justifyContent: "center",
|
|
1528
1529
|
marginLeft: 8
|
|
1529
1530
|
},
|
|
1530
1531
|
removeDocumentIcon: {
|
|
@@ -1532,16 +1533,16 @@ const styles = {
|
|
|
1532
1533
|
},
|
|
1533
1534
|
// PC-1255: User picker styles
|
|
1534
1535
|
userPickerContainer: {
|
|
1535
|
-
flexDirection:
|
|
1536
|
-
justifyContent:
|
|
1537
|
-
alignItems:
|
|
1536
|
+
flexDirection: "row",
|
|
1537
|
+
justifyContent: "space-between",
|
|
1538
|
+
alignItems: "center"
|
|
1538
1539
|
},
|
|
1539
1540
|
profileContainer: {
|
|
1540
|
-
flexDirection:
|
|
1541
|
-
alignItems:
|
|
1541
|
+
flexDirection: "row",
|
|
1542
|
+
alignItems: "center"
|
|
1542
1543
|
},
|
|
1543
1544
|
nameText: {
|
|
1544
|
-
fontFamily:
|
|
1545
|
+
fontFamily: "sf-medium",
|
|
1545
1546
|
fontSize: 16,
|
|
1546
1547
|
color: Colours.TEXT_DARK,
|
|
1547
1548
|
marginLeft: 8
|