@plusscommunities/pluss-maintenance-app-forms 7.0.21 → 7.0.23-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/actions/JobActions.js +4 -4
- package/dist/module/actions/JobActions.js.map +1 -1
- package/dist/module/actions/index.js +1 -1
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +1 -1
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/index.js +3 -3
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/maintenanceActions.js +36 -36
- package/dist/module/apis/maintenanceActions.js.map +1 -1
- package/dist/module/apis/userActions.js +5 -5
- package/dist/module/apis/userActions.js.map +1 -1
- package/dist/module/components/FilterPopupMenu.js +49 -49
- package/dist/module/components/FilterPopupMenu.js.map +1 -1
- package/dist/module/components/MaintenanceList.js +38 -38
- package/dist/module/components/MaintenanceList.js.map +1 -1
- package/dist/module/components/MaintenanceListItem.js +62 -62
- package/dist/module/components/MaintenanceListItem.js.map +1 -1
- package/dist/module/components/MaintenanceWidgetItem.js +27 -27
- package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
- package/dist/module/components/PrioritySelectorPopup.js +15 -15
- package/dist/module/components/PrioritySelectorPopup.js.map +1 -1
- package/dist/module/components/StatusSelectorPopup.js +16 -16
- package/dist/module/components/StatusSelectorPopup.js.map +1 -1
- package/dist/module/components/WidgetLarge.js +2 -2
- package/dist/module/components/WidgetLarge.js.map +1 -1
- package/dist/module/components/WidgetSmall.js +19 -19
- package/dist/module/components/WidgetSmall.js.map +1 -1
- package/dist/module/core.config.js +1 -1
- package/dist/module/core.config.js.map +1 -1
- package/dist/module/feature.config.js +17 -17
- package/dist/module/feature.config.js.map +1 -1
- package/dist/module/helper.js +10 -10
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +11 -11
- package/dist/module/index.js.map +1 -1
- package/dist/module/reducers/JobsReducer.js +13 -13
- package/dist/module/reducers/JobsReducer.js.map +1 -1
- package/dist/module/screens/JobTypePicker.js +17 -17
- package/dist/module/screens/JobTypePicker.js.map +1 -1
- package/dist/module/screens/MaintenancePage.js +10 -10
- package/dist/module/screens/MaintenancePage.js.map +1 -1
- package/dist/module/screens/MaintenanceUserPicker.js +22 -129
- 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 +189 -189
- 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 +60 -67
- package/src/actions/index.js +1 -1
- package/src/actions/types.js +2 -1
- package/src/apis/index.js +3 -3
- package/src/apis/maintenanceActions.js +178 -189
- package/src/apis/userActions.js +17 -17
- package/src/components/FilterPopupMenu.js +256 -313
- package/src/components/MaintenanceList.js +317 -396
- package/src/components/MaintenanceListItem.js +288 -347
- package/src/components/MaintenanceWidgetItem.js +124 -145
- package/src/components/PrioritySelectorPopup.js +68 -81
- package/src/components/StatusSelectorPopup.js +70 -81
- package/src/components/WidgetLarge.js +5 -5
- package/src/components/WidgetSmall.js +133 -153
- package/src/core.config.js +3 -27
- package/src/feature.config.js +62 -62
- package/src/helper.js +53 -58
- package/src/index.js +22 -22
- package/src/reducers/JobsReducer.js +66 -85
- package/src/screens/JobTypePicker.js +92 -115
- package/src/screens/MaintenancePage.js +80 -89
- package/src/screens/MaintenanceUserPicker.js +99 -262
- package/src/screens/RequestDetail.js +1125 -1345
- package/src/screens/RequestNotes.js +805 -946
- package/src/screens/ServiceRequest.js +1557 -1773
- 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,95 +1,76 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
|
-
import _ from
|
|
3
|
-
import { REHYDRATE } from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
JOBS_ADDED,
|
|
8
|
-
JOBS_STATUSES_LOADED,
|
|
9
|
-
JOBS_HIDE_SEEN,
|
|
10
|
-
JOB_FILTER_LOADED,
|
|
11
|
-
} from "../actions/types";
|
|
12
|
-
import { ActionTypes } from "../core.config";
|
|
13
|
-
import { values } from "../values.config";
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { REHYDRATE } from 'redux-persist';
|
|
4
|
+
import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED, JOBS_STATUSES_LOADED, JOBS_HIDE_SEEN, JOB_FILTER_LOADED } from '../actions/types';
|
|
5
|
+
import { ActionTypes } from '../core.config';
|
|
6
|
+
import { values } from '../values.config';
|
|
14
7
|
|
|
15
8
|
const REDUCER_KEY = values.reducerKey;
|
|
16
9
|
|
|
17
10
|
const INITIAL_STATE = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
jobs: [],
|
|
12
|
+
jobstatuses: [],
|
|
13
|
+
hideSeen: false,
|
|
14
|
+
jobfilters: {
|
|
15
|
+
status: '',
|
|
16
|
+
statusText: '',
|
|
17
|
+
priority: '',
|
|
18
|
+
priorityText: '',
|
|
19
|
+
type: '',
|
|
20
|
+
assignee: '',
|
|
21
|
+
assigneeName: '',
|
|
22
|
+
},
|
|
30
23
|
};
|
|
31
24
|
|
|
32
25
|
export default (state = INITIAL_STATE, action) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
let updateJobs = [];
|
|
27
|
+
let index = 0;
|
|
28
|
+
let jobstatuses = [];
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
case REHYDRATE:
|
|
84
|
-
if (!action.payload) return state;
|
|
85
|
-
if (action.payload[REDUCER_KEY]) {
|
|
86
|
-
if (action.payload[REDUCER_KEY].jobs == null) {
|
|
87
|
-
action.payload[REDUCER_KEY].jobs = [];
|
|
88
|
-
}
|
|
89
|
-
return action.payload[REDUCER_KEY];
|
|
90
|
-
}
|
|
91
|
-
return state;
|
|
92
|
-
default:
|
|
93
|
-
return state;
|
|
94
|
-
}
|
|
30
|
+
switch (action.type) {
|
|
31
|
+
case ActionTypes.LOGOUT:
|
|
32
|
+
case ActionTypes.CHANGE_ROLE:
|
|
33
|
+
return INITIAL_STATE;
|
|
34
|
+
case JOBS_LOADED:
|
|
35
|
+
return { ...state, jobs: action.payload.map(job => ({ title: job.title || job.description, ...job })) };
|
|
36
|
+
case JOBS_ADDED:
|
|
37
|
+
updateJobs = action.payload.map(job => ({ title: job.title || job.description, ...job }));
|
|
38
|
+
updateJobs = _.unionWith(updateJobs, state.jobs, (j1, j2) => {
|
|
39
|
+
return j1.id === j2.id;
|
|
40
|
+
});
|
|
41
|
+
return { ...state, jobs: updateJobs };
|
|
42
|
+
case JOB_ADDED:
|
|
43
|
+
updateJobs = [...state.jobs];
|
|
44
|
+
index = updateJobs.findIndex(item => item.id === action.payload.id);
|
|
45
|
+
if (index > -1) {
|
|
46
|
+
updateJobs[index] = action.payload;
|
|
47
|
+
} else {
|
|
48
|
+
updateJobs.push(action.payload);
|
|
49
|
+
}
|
|
50
|
+
return { ...state, jobs: updateJobs };
|
|
51
|
+
case JOBS_STATUSES_LOADED:
|
|
52
|
+
jobstatuses = _.orderBy(
|
|
53
|
+
_.unionWith(action.payload, state.jobstatuses, (v1, v2) => {
|
|
54
|
+
return v1 != null && v2 != null && v1.text === v2.text;
|
|
55
|
+
}),
|
|
56
|
+
'order',
|
|
57
|
+
'asc',
|
|
58
|
+
);
|
|
59
|
+
return { ...state, jobstatuses };
|
|
60
|
+
case JOBS_HIDE_SEEN:
|
|
61
|
+
return { ...state, hideSeen: action.payload };
|
|
62
|
+
case JOB_FILTER_LOADED:
|
|
63
|
+
return { ...state, jobfilters: action.payload || INITIAL_STATE.jobfilters };
|
|
64
|
+
case REHYDRATE:
|
|
65
|
+
if (!action.payload) return state;
|
|
66
|
+
if (action.payload[REDUCER_KEY]) {
|
|
67
|
+
if (action.payload[REDUCER_KEY].jobs == null) {
|
|
68
|
+
action.payload[REDUCER_KEY].jobs = [];
|
|
69
|
+
}
|
|
70
|
+
return action.payload[REDUCER_KEY];
|
|
71
|
+
}
|
|
72
|
+
return state;
|
|
73
|
+
default:
|
|
74
|
+
return state;
|
|
75
|
+
}
|
|
95
76
|
};
|
|
@@ -1,130 +1,107 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import _ from
|
|
3
|
-
import { TouchableOpacity, View, ScrollView, Text } from
|
|
4
|
-
import { connect } from
|
|
5
|
-
import { Icon } from
|
|
6
|
-
import { Services } from
|
|
7
|
-
import { Components, Colours } from
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { TouchableOpacity, View, ScrollView, Text } from 'react-native';
|
|
4
|
+
import { connect } from 'react-redux';
|
|
5
|
+
import { Icon } from '@rneui/themed';
|
|
6
|
+
import { Services } from '../feature.config';
|
|
7
|
+
import { Components, Colours } from '../core.config';
|
|
8
8
|
|
|
9
9
|
class JobTypePicker extends Component {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
state = {
|
|
11
|
+
currentType: null,
|
|
12
|
+
};
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
UNSAFE_componentWillMount() {
|
|
15
|
+
this.setState({ currentType: this.props.currentType });
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
onPressBack() {
|
|
19
|
+
Services.navigation.goBack();
|
|
20
|
+
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
onTypePress(type) {
|
|
23
|
+
this.props.onSelectType(type);
|
|
24
|
+
this.setState({ currentType: type });
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
this.onPressBack();
|
|
27
|
+
}, 200);
|
|
28
|
+
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
renderMain() {
|
|
31
|
+
if (_.isEmpty(this.props.types)) {
|
|
32
|
+
return (
|
|
33
|
+
<View style={{ marginTop: 16 }}>
|
|
34
|
+
<Components.Spinner />
|
|
35
|
+
</View>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{this.renderOptions()}
|
|
42
|
-
</Components.FormCard>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
39
|
+
return <Components.FormCard style={{ marginTop: 16 }}>{this.renderOptions()}</Components.FormCard>;
|
|
40
|
+
}
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{ color: "#d5d9e0", fontSize: 20 },
|
|
67
|
-
rep.typeName === this.state.currentType && {
|
|
68
|
-
color: Colours.COLOUR_GREEN,
|
|
69
|
-
},
|
|
70
|
-
]}
|
|
71
|
-
/>
|
|
72
|
-
</View>
|
|
73
|
-
{!_.isEmpty(rep.description) && (
|
|
74
|
-
<Text style={styles.description}>{rep.description}</Text>
|
|
75
|
-
)}
|
|
76
|
-
</Components.FormCardSection>
|
|
77
|
-
</TouchableOpacity>
|
|
78
|
-
);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
42
|
+
renderOptions() {
|
|
43
|
+
return this.props.types.map((rep, index) => {
|
|
44
|
+
return (
|
|
45
|
+
<TouchableOpacity key={index} onPress={this.onTypePress.bind(this, rep.typeName)}>
|
|
46
|
+
<Components.FormCardSection label={rep.typeName} labelStyle={{ height: 0, margin: 0 }} hasUnderline hasContent>
|
|
47
|
+
<View style={styles.labelContainer}>
|
|
48
|
+
<Text style={styles.labelText}>{rep.typeName}</Text>
|
|
49
|
+
<Icon
|
|
50
|
+
name="check-circle"
|
|
51
|
+
//style={styles.uploadButtonInner}
|
|
52
|
+
type="font-awesome"
|
|
53
|
+
iconStyle={[{ color: '#d5d9e0', fontSize: 20 }, rep.typeName === this.state.currentType && { color: Colours.COLOUR_GREEN }]}
|
|
54
|
+
/>
|
|
55
|
+
</View>
|
|
56
|
+
{!_.isEmpty(rep.description) && <Text style={styles.description}>{rep.description}</Text>}
|
|
57
|
+
</Components.FormCardSection>
|
|
58
|
+
</TouchableOpacity>
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
81
62
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<ScrollView style={{ flex: 1 }}>{this.renderMain()}</ScrollView>
|
|
91
|
-
</View>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
63
|
+
render() {
|
|
64
|
+
return (
|
|
65
|
+
<View style={styles.container}>
|
|
66
|
+
<Components.Header leftIcon="angle-left" onPressLeft={this.onPressBack.bind(this)} text="Select type" />
|
|
67
|
+
<ScrollView style={{ flex: 1 }}>{this.renderMain()}</ScrollView>
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
94
71
|
}
|
|
95
72
|
|
|
96
73
|
const styles = {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
74
|
+
container: {
|
|
75
|
+
flex: 1,
|
|
76
|
+
position: 'relative',
|
|
77
|
+
backgroundColor: '#f0f0f5',
|
|
78
|
+
},
|
|
79
|
+
row: {
|
|
80
|
+
flexDirection: 'row',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
minHeight: 22,
|
|
83
|
+
},
|
|
84
|
+
text: {
|
|
85
|
+
flex: 1,
|
|
86
|
+
fontFamily: 'sf-regular',
|
|
87
|
+
fontSize: 14,
|
|
88
|
+
color: Colours.TEXT_DARK,
|
|
89
|
+
},
|
|
90
|
+
labelContainer: {
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
justifyContent: 'space-between',
|
|
93
|
+
},
|
|
94
|
+
labelText: {
|
|
95
|
+
fontFamily: 'sf-medium',
|
|
96
|
+
fontSize: 16,
|
|
97
|
+
color: Colours.TEXT_DARK,
|
|
98
|
+
},
|
|
99
|
+
description: {
|
|
100
|
+
marginTop: 5,
|
|
101
|
+
fontSize: 14,
|
|
102
|
+
fontFamily: 'sf-regular',
|
|
103
|
+
color: Colours.TEXT_DARK,
|
|
104
|
+
},
|
|
128
105
|
};
|
|
129
106
|
|
|
130
107
|
export default connect(null, {})(JobTypePicker);
|
|
@@ -1,105 +1,96 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import { View, StyleSheet } from
|
|
3
|
-
import { connect } from
|
|
4
|
-
import _ from
|
|
5
|
-
import MaintenanceList from
|
|
6
|
-
import { Services, BaseComponents } from
|
|
7
|
-
import { Components, Helper, Styles, Config } from
|
|
8
|
-
import { values } from
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import { connect } from 'react-redux';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
import MaintenanceList from '../components/MaintenanceList';
|
|
6
|
+
import { Services, BaseComponents } from '../feature.config';
|
|
7
|
+
import { Components, Helper, Styles, Config } from '../core.config';
|
|
8
|
+
import { values } from '../values.config';
|
|
9
9
|
|
|
10
10
|
class MaintenancePage extends Component {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(props);
|
|
13
|
+
this.state = {
|
|
14
|
+
isHomeTab: false,
|
|
15
|
+
loading: false,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
componentDidMount() {
|
|
20
|
+
// console.log('!Services.navigation.getParentRoute()', !Services.navigation.getParentRoute());
|
|
21
|
+
this.setState({ isHomeTab: !Services.navigation.getParentRoute() });
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
onPressBack = () => {
|
|
25
|
+
Services.navigation.goBack();
|
|
26
|
+
};
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
onLoadingChanged = loading => {
|
|
29
|
+
this.setState({ loading });
|
|
30
|
+
};
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
return (
|
|
55
|
-
<Components.Header
|
|
56
|
-
leftIcon="angle-left"
|
|
57
|
-
onPressLeft={this.onPressBack}
|
|
58
|
-
text={values.textFeatureTitle}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
32
|
+
renderHeader() {
|
|
33
|
+
const title = this.props.title || this.props.strings[`${values.featureKey}_textFeatureTitle`] || values.textFeatureTitle;
|
|
34
|
+
if (this.state.isHomeTab) {
|
|
35
|
+
return (
|
|
36
|
+
<Components.Header
|
|
37
|
+
text={title}
|
|
38
|
+
rightContent={
|
|
39
|
+
_.includes(this.props.user.hidden, 'notifications') ? null : (
|
|
40
|
+
<View style={styles.notificationContainer}>
|
|
41
|
+
<BaseComponents.NotificationBell
|
|
42
|
+
colourBrandingHeader={this.props.colourBrandingHeader}
|
|
43
|
+
containerStyle={Styles.notificationBell}
|
|
44
|
+
/>
|
|
45
|
+
</View>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return <Components.Header leftIcon="angle-left" onPressLeft={this.onPressBack} text={values.textFeatureTitle} />;
|
|
52
|
+
}
|
|
62
53
|
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
render() {
|
|
55
|
+
const { isHomeTab } = this.state;
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
57
|
+
return (
|
|
58
|
+
<View style={styles.container}>
|
|
59
|
+
{this.renderHeader()}
|
|
60
|
+
<Components.LoadingIndicator visible={this.state.loading} />
|
|
61
|
+
<MaintenanceList
|
|
62
|
+
style={styles.maintenanceList}
|
|
63
|
+
onLoadingChanged={this.onLoadingChanged}
|
|
64
|
+
enableAdd={!isHomeTab}
|
|
65
|
+
options={this.props.options}
|
|
66
|
+
/>
|
|
67
|
+
{/* {isHomeTab && <Components.AddContentButton />} */}
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
80
71
|
}
|
|
81
72
|
|
|
82
73
|
const styles = StyleSheet.create({
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
74
|
+
container: {
|
|
75
|
+
flex: 1,
|
|
76
|
+
},
|
|
77
|
+
notificationContainer: {
|
|
78
|
+
position: 'absolute',
|
|
79
|
+
top: 0,
|
|
80
|
+
bottom: 0,
|
|
81
|
+
right: 0,
|
|
82
|
+
paddingTop: Helper.StatusBarHeight(0),
|
|
83
|
+
},
|
|
84
|
+
maintenanceList: {
|
|
85
|
+
marginTop: 12,
|
|
86
|
+
},
|
|
96
87
|
});
|
|
97
88
|
|
|
98
|
-
const mapStateToProps =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
89
|
+
const mapStateToProps = state => {
|
|
90
|
+
return {
|
|
91
|
+
user: state.user,
|
|
92
|
+
strings: state.strings?.config || {},
|
|
93
|
+
};
|
|
103
94
|
};
|
|
104
95
|
|
|
105
96
|
export default connect(mapStateToProps, {})(MaintenancePage);
|