@plusscommunities/pluss-maintenance-app 6.0.7-beta.0 → 6.0.8
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/components/MaintenanceList.js +1 -1
- package/dist/module/components/MaintenanceList.js.map +1 -1
- package/dist/module/components/WidgetSmall.js +2 -2
- package/dist/module/components/WidgetSmall.js.map +1 -1
- package/dist/module/feature.config.js +3 -3
- package/dist/module/feature.config.js.map +1 -1
- package/dist/module/reducers/JobsReducer.js +2 -1
- package/dist/module/reducers/JobsReducer.js.map +1 -1
- package/dist/module/screens/RequestDetail.js +1 -1
- package/dist/module/screens/RequestDetail.js.map +1 -1
- package/dist/module/screens/ServiceRequest.js +34 -7
- package/dist/module/screens/ServiceRequest.js.map +1 -1
- package/dist/module/values.config.default.js +6 -1
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.forms.js +35 -0
- package/dist/module/values.config.forms.js.map +1 -0
- package/dist/module/values.config.js +6 -1
- package/dist/module/values.config.js.map +1 -1
- package/package.json +2 -2
- package/src/components/MaintenanceList.js +1 -1
- package/src/components/WidgetSmall.js +2 -2
- package/src/feature.config.js +15 -13
- package/src/reducers/JobsReducer.js +2 -1
- package/src/screens/RequestDetail.js +1 -1
- package/src/screens/ServiceRequest.js +36 -5
- package/src/values.config.default.js +5 -0
- package/src/values.config.forms.js +35 -0
- package/src/values.config.js +5 -0
package/src/feature.config.js
CHANGED
@@ -16,7 +16,7 @@ const FeatureConfig = {
|
|
16
16
|
title: values.textFeatureTitle,
|
17
17
|
gridMenu: {
|
18
18
|
icon: values.iconGridMenu,
|
19
|
-
viewBox:
|
19
|
+
viewBox: values.gridViewBox,
|
20
20
|
navigate: values.screenMaintenance,
|
21
21
|
},
|
22
22
|
addMenu: {
|
@@ -26,18 +26,20 @@ const FeatureConfig = {
|
|
26
26
|
navigate: values.screenServiceRequest,
|
27
27
|
visibleExps: { type: 'feature', value: values.featureKey },
|
28
28
|
},
|
29
|
-
moreMenu:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
29
|
+
moreMenu: values.hasMoreOption
|
30
|
+
? {
|
31
|
+
order: values.orderMoreMenu,
|
32
|
+
title: values.textMoreMenuTitle,
|
33
|
+
navigate: values.screenMaintenance,
|
34
|
+
visibleExps: {
|
35
|
+
type: 'and',
|
36
|
+
exps: [
|
37
|
+
{ type: 'notHidden', value: 'maintenanceRequest' },
|
38
|
+
{ type: 'notUserType', value: 'KIOSK' },
|
39
|
+
],
|
40
|
+
},
|
41
|
+
}
|
42
|
+
: undefined,
|
41
43
|
kioskAction: {
|
42
44
|
order: values.orderKioskAction,
|
43
45
|
icon: values.iconKioskAction,
|
@@ -3,8 +3,9 @@ import _ from 'lodash';
|
|
3
3
|
import { REHYDRATE } from 'redux-persist';
|
4
4
|
import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED } from '../actions/types';
|
5
5
|
import { ActionTypes } from '../core.config';
|
6
|
+
import { values } from '../values.config';
|
6
7
|
|
7
|
-
const REDUCER_KEY =
|
8
|
+
const REDUCER_KEY = values.reducerKey;
|
8
9
|
|
9
10
|
const INITIAL_STATE = {
|
10
11
|
jobs: [],
|
@@ -530,7 +530,7 @@ class RequestDetail extends Component {
|
|
530
530
|
<Text style={styles.locationText}>{job.homeText}</Text>
|
531
531
|
</View>
|
532
532
|
) : null}
|
533
|
-
<Text style={styles.requesterLabel}>
|
533
|
+
<Text style={styles.requesterLabel}>Submitted By</Text>
|
534
534
|
<View style={styles.profileContainer}>
|
535
535
|
<Components.ProfilePic ProfilePic={job.userProfilePic} Diameter={40} />
|
536
536
|
<View style={styles.nameContainer}>
|
@@ -34,6 +34,7 @@ class MaintenanceRequest extends Component {
|
|
34
34
|
fail: false,
|
35
35
|
error: null,
|
36
36
|
showError: false,
|
37
|
+
loadingTypes: values.forceCustomFields,
|
37
38
|
|
38
39
|
userName: '',
|
39
40
|
roomNumber: '',
|
@@ -297,14 +298,14 @@ class MaintenanceRequest extends Component {
|
|
297
298
|
};
|
298
299
|
|
299
300
|
getJobTypes() {
|
300
|
-
const self = this;
|
301
301
|
maintenanceActions
|
302
302
|
.getJobTypes(Helper.getSite(this.props.site))
|
303
303
|
.then(res => {
|
304
|
-
|
304
|
+
this.setState({
|
305
305
|
types: res.data,
|
306
306
|
});
|
307
|
-
|
307
|
+
console.log(res.data);
|
308
|
+
this.getDefaultJob();
|
308
309
|
})
|
309
310
|
.catch(() => {});
|
310
311
|
}
|
@@ -312,9 +313,19 @@ class MaintenanceRequest extends Component {
|
|
312
313
|
pickType(type) {
|
313
314
|
const { types } = this.state;
|
314
315
|
const selected = types.find(t => t.typeName === type) || {};
|
316
|
+
if (values.forceCustomFields && !selected.hasCustomFields) {
|
317
|
+
console.log(selected);
|
318
|
+
this.setState({
|
319
|
+
type,
|
320
|
+
customFields: [],
|
321
|
+
noType: true,
|
322
|
+
});
|
323
|
+
return;
|
324
|
+
}
|
315
325
|
this.setState({
|
316
326
|
type,
|
317
327
|
customFields: selected.hasCustomFields && selected.customFields.length > 0 ? _.cloneDeep(selected.customFields) : [],
|
328
|
+
loadingTypes: false,
|
318
329
|
});
|
319
330
|
}
|
320
331
|
|
@@ -796,9 +807,13 @@ class MaintenanceRequest extends Component {
|
|
796
807
|
}
|
797
808
|
|
798
809
|
renderForm() {
|
799
|
-
const { customFields } = this.state;
|
810
|
+
const { customFields, loadingTypes } = this.state;
|
800
811
|
const hasCustomFields = customFields && customFields.length > 0;
|
801
812
|
|
813
|
+
if (loadingTypes) {
|
814
|
+
return <Components.Spinner />;
|
815
|
+
}
|
816
|
+
|
802
817
|
return (
|
803
818
|
<View style={{ flex: 1 }}>
|
804
819
|
<ScrollView keyboardShouldPersistTaps="always" style={{ flex: 1 }} ref={ref => (this.scrollContainer = ref)}>
|
@@ -949,7 +964,7 @@ class MaintenanceRequest extends Component {
|
|
949
964
|
renderRegisterConfirmation() {
|
950
965
|
return (
|
951
966
|
<Components.ConfirmationPopup
|
952
|
-
confirmText={
|
967
|
+
confirmText={`${values.textEntityName} submitted`}
|
953
968
|
repeatText={'Submit another'}
|
954
969
|
visible={this.state.confirmationToShow}
|
955
970
|
onClose={this.onCloseConfirmationPopup.bind(this)}
|
@@ -972,6 +987,21 @@ class MaintenanceRequest extends Component {
|
|
972
987
|
);
|
973
988
|
}
|
974
989
|
|
990
|
+
renderNoType() {
|
991
|
+
if (!this.state.noType) {
|
992
|
+
return null;
|
993
|
+
}
|
994
|
+
return (
|
995
|
+
<Components.WarningPopup
|
996
|
+
confirmText={'No forms are available'}
|
997
|
+
infoText={'Check back later for forms.'}
|
998
|
+
visible={this.state.noType}
|
999
|
+
onClose={this.onPressBack.bind(this)}
|
1000
|
+
padHorizontal
|
1001
|
+
/>
|
1002
|
+
);
|
1003
|
+
}
|
1004
|
+
|
975
1005
|
render() {
|
976
1006
|
const { submitting, success, isDateTimePickerVisible, popUpType } = this.state;
|
977
1007
|
|
@@ -991,6 +1021,7 @@ class MaintenanceRequest extends Component {
|
|
991
1021
|
</View>
|
992
1022
|
{this.renderRegisterConfirmation()}
|
993
1023
|
{this.renderVideoPlayerPopup()}
|
1024
|
+
{this.renderNoType()}
|
994
1025
|
<DateTimePicker
|
995
1026
|
isVisible={isDateTimePickerVisible}
|
996
1027
|
onConfirm={this.onDateSelected}
|
@@ -15,8 +15,10 @@ const values = {
|
|
15
15
|
permissionMaintenanceTracking: 'maintenanceTracking',
|
16
16
|
permissionMaintenanceAssignment: 'maintenanceAssignment',
|
17
17
|
iconGridMenu: 'maintenance',
|
18
|
+
gridViewBox: '0 0 30 30',
|
18
19
|
iconAddMenu: 'request',
|
19
20
|
iconKioskAction: 'wrench',
|
21
|
+
hasMoreOption: true,
|
20
22
|
orderAddMenu: 5,
|
21
23
|
orderMoreMenu: 4,
|
22
24
|
orderKioskAction: 1,
|
@@ -25,6 +27,9 @@ const values = {
|
|
25
27
|
textMoreMenuTitle: 'Request',
|
26
28
|
textKioskActionTitle: 'Request',
|
27
29
|
textEntityName: 'Job',
|
30
|
+
emptyRequestsStaff: 'No active Requests',
|
31
|
+
emptyRequestsUser: 'Your Requests will show here',
|
32
|
+
forceCustomFields: false,
|
28
33
|
};
|
29
34
|
|
30
35
|
export { values };
|
@@ -0,0 +1,35 @@
|
|
1
|
+
const values = {
|
2
|
+
featureKey: 'maintenanceForms',
|
3
|
+
aliases: ['maintenanceRequest'],
|
4
|
+
reducerKey: 'maintenanceForms',
|
5
|
+
serviceKey: 'maintenanceForms',
|
6
|
+
updateKey: 'jobsForms',
|
7
|
+
actionJobsLoaded: 'JOBS_LOADEDForms',
|
8
|
+
actionJobAdded: 'JOB_ADDEDForms',
|
9
|
+
actionJobsAdded: 'JOBS_ADDEDForms',
|
10
|
+
screenMaintenance: 'maintenanceForms',
|
11
|
+
screenRequestDetail: 'requestDetailForms',
|
12
|
+
screenServiceRequest: 'serviceRequestForms',
|
13
|
+
screenJobTypePicker: 'jobTypePickerForms',
|
14
|
+
screenRequestNotes: 'requestNotesForms',
|
15
|
+
permissionMaintenanceTracking: 'maintenanceTrackingForms',
|
16
|
+
permissionMaintenanceAssignment: 'maintenanceAssignmentForms',
|
17
|
+
iconGridMenu: 'form',
|
18
|
+
gridViewBox: '0 0 256 256',
|
19
|
+
iconAddMenu: 'form',
|
20
|
+
iconKioskAction: 'form',
|
21
|
+
hasMoreOption: false,
|
22
|
+
orderAddMenu: 5,
|
23
|
+
orderMoreMenu: 4,
|
24
|
+
orderKioskAction: 1,
|
25
|
+
textFeatureTitle: 'Forms',
|
26
|
+
textAddMenuTitle: 'Form Submission',
|
27
|
+
textMoreMenuTitle: 'Forms',
|
28
|
+
textKioskActionTitle: 'Forms',
|
29
|
+
textEntityName: 'Form',
|
30
|
+
emptyRequestsStaff: 'No active Form Submissions',
|
31
|
+
emptyRequestsUser: 'Your Form Submissions will show here',
|
32
|
+
forceCustomFields: true,
|
33
|
+
};
|
34
|
+
|
35
|
+
export { values };
|
package/src/values.config.js
CHANGED
@@ -15,8 +15,10 @@ const values = {
|
|
15
15
|
permissionMaintenanceTracking: 'maintenanceTracking',
|
16
16
|
permissionMaintenanceAssignment: 'maintenanceAssignment',
|
17
17
|
iconGridMenu: 'maintenance',
|
18
|
+
gridViewBox: '0 0 30 30',
|
18
19
|
iconAddMenu: 'request',
|
19
20
|
iconKioskAction: 'wrench',
|
21
|
+
hasMoreOption: true,
|
20
22
|
orderAddMenu: 5,
|
21
23
|
orderMoreMenu: 4,
|
22
24
|
orderKioskAction: 1,
|
@@ -25,6 +27,9 @@ const values = {
|
|
25
27
|
textMoreMenuTitle: 'Request',
|
26
28
|
textKioskActionTitle: 'Request',
|
27
29
|
textEntityName: 'Job',
|
30
|
+
emptyRequestsStaff: 'No active Requests',
|
31
|
+
emptyRequestsUser: 'Your Requests will show here',
|
32
|
+
forceCustomFields: false,
|
28
33
|
};
|
29
34
|
|
30
35
|
export { values };
|