@plusscommunities/pluss-maintenance-app 8.0.6 → 8.0.7-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 +42 -34
- 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 +18 -18
- package/dist/module/screens/MaintenanceUserPicker.js.map +1 -1
- package/dist/module/screens/RequestDetail.js +253 -138
- 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 +34 -35
- 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 +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 -172
- 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 +116 -92
- package/src/screens/RequestDetail.js +1346 -1023
- package/src/screens/RequestNotes.js +946 -805
- package/src/screens/ServiceRequest.js +57 -34
- 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
|
@@ -103,11 +103,19 @@ 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, "isTitle")) {
|
|
107
|
+
update.title = userDetails.displayName || null;
|
|
108
|
+
}
|
|
106
109
|
}
|
|
107
110
|
} catch (error) {
|
|
108
111
|
// Permission denied (403) or other error - continue without auto-population
|
|
109
112
|
// User can still manually enter contact details
|
|
110
113
|
console.log("Could not fetch user details for auto-population:", error);
|
|
114
|
+
} finally {
|
|
115
|
+
// In any case, we still need a title. Inform the user to set one form field as a title.
|
|
116
|
+
if (!state.title && !update.title) {
|
|
117
|
+
update.title = "[Missing title - Set one of the form field as title in the community manager]";
|
|
118
|
+
}
|
|
111
119
|
}
|
|
112
120
|
this.setState(update);
|
|
113
121
|
});
|
|
@@ -844,28 +852,23 @@ class MaintenanceRequest extends Component {
|
|
|
844
852
|
numColumns: 3
|
|
845
853
|
}));
|
|
846
854
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
// />
|
|
865
|
-
// </View>
|
|
866
|
-
// );
|
|
867
|
-
// }
|
|
868
|
-
|
|
855
|
+
renderDocumentList(fieldId) {
|
|
856
|
+
const documentsList = this.getDocuments(fieldId);
|
|
857
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
858
|
+
style: styles.documentListContainer
|
|
859
|
+
}, documentsList.length > 0 ? documentsList.map((document, index) => this.renderDocument(document, index, fieldId)) : null, /*#__PURE__*/React.createElement(Components.DocumentUploader, {
|
|
860
|
+
buttonTitle: "Add Files",
|
|
861
|
+
allowedTypes: ["application/pdf"],
|
|
862
|
+
onUploadStarted: (uploadUri, uri, name, ext) => this.onUploadStartedDocument(uploadUri, uri, name, ext, fieldId),
|
|
863
|
+
onUploadProgress: progress => this.onUploadProgressDocument(progress, fieldId),
|
|
864
|
+
onUploadSuccess: (uri, uploadUri) => this.onUploadSuccessDocument(uri, uploadUri, fieldId),
|
|
865
|
+
onUploadFailed: uploadUri => this.onUploadFailedDocument(uploadUri, fieldId),
|
|
866
|
+
fileName: "serviceDocument",
|
|
867
|
+
userId: this.props.uid,
|
|
868
|
+
disabled: false,
|
|
869
|
+
multiple: true
|
|
870
|
+
}));
|
|
871
|
+
}
|
|
869
872
|
renderDateField(field, fieldId, sectionStyle) {
|
|
870
873
|
let displayText, placeHolder, icon, errorText;
|
|
871
874
|
if (field.type === "date") {
|
|
@@ -1018,19 +1021,15 @@ class MaintenanceRequest extends Component {
|
|
|
1018
1021
|
required: field.mandatory,
|
|
1019
1022
|
showError: this.state.showError
|
|
1020
1023
|
}, this.renderImageList(fieldId));
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
// >
|
|
1031
|
-
// {this.renderDocumentList(fieldId)}
|
|
1032
|
-
// </Components.GenericInputSection>
|
|
1033
|
-
// );
|
|
1024
|
+
case "document":
|
|
1025
|
+
return /*#__PURE__*/React.createElement(Components.GenericInputSection, {
|
|
1026
|
+
key: fieldId,
|
|
1027
|
+
label: field.label,
|
|
1028
|
+
sectionStyle: sectionStyle,
|
|
1029
|
+
isValid: () => this.isFieldValid(field, fieldId),
|
|
1030
|
+
required: field.mandatory,
|
|
1031
|
+
showError: this.state.showError
|
|
1032
|
+
}, this.renderDocumentList(fieldId));
|
|
1034
1033
|
default:
|
|
1035
1034
|
return null;
|
|
1036
1035
|
}
|