@plusscommunities/pluss-maintenance-app 6.0.20 → 6.0.21-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 +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 +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 +51 -51
- 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 +252 -100
- package/src/screens/RequestDetail.js +1348 -1125
- package/src/screens/RequestNotes.js +950 -806
- package/src/screens/ServiceRequest.js +1778 -1550
- 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
|
@@ -1,76 +1,95 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
|
-
import _ from
|
|
3
|
-
import { REHYDRATE } from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { REHYDRATE } from "redux-persist";
|
|
4
|
+
import {
|
|
5
|
+
JOBS_LOADED,
|
|
6
|
+
JOB_ADDED,
|
|
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";
|
|
7
14
|
|
|
8
15
|
const REDUCER_KEY = values.reducerKey;
|
|
9
16
|
|
|
10
17
|
const INITIAL_STATE = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
jobs: [],
|
|
19
|
+
jobstatuses: [],
|
|
20
|
+
hideSeen: false,
|
|
21
|
+
jobfilters: {
|
|
22
|
+
status: "",
|
|
23
|
+
statusText: "",
|
|
24
|
+
priority: "",
|
|
25
|
+
priorityText: "",
|
|
26
|
+
type: "",
|
|
27
|
+
assignee: "",
|
|
28
|
+
assigneeName: "",
|
|
29
|
+
},
|
|
23
30
|
};
|
|
24
31
|
|
|
25
32
|
export default (state = INITIAL_STATE, action) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
let updateJobs = [];
|
|
34
|
+
let index = 0;
|
|
35
|
+
let jobstatuses = [];
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
37
|
+
switch (action.type) {
|
|
38
|
+
case ActionTypes.LOGOUT:
|
|
39
|
+
case ActionTypes.CHANGE_ROLE:
|
|
40
|
+
return INITIAL_STATE;
|
|
41
|
+
case JOBS_LOADED:
|
|
42
|
+
return {
|
|
43
|
+
...state,
|
|
44
|
+
jobs: action.payload.map((job) => ({
|
|
45
|
+
title: job.title || job.description,
|
|
46
|
+
...job,
|
|
47
|
+
})),
|
|
48
|
+
};
|
|
49
|
+
case JOBS_ADDED:
|
|
50
|
+
updateJobs = action.payload.map((job) => ({
|
|
51
|
+
title: job.title || job.description,
|
|
52
|
+
...job,
|
|
53
|
+
}));
|
|
54
|
+
updateJobs = _.unionWith(updateJobs, state.jobs, (j1, j2) => {
|
|
55
|
+
return j1.id === j2.id;
|
|
56
|
+
});
|
|
57
|
+
return { ...state, jobs: updateJobs };
|
|
58
|
+
case JOB_ADDED:
|
|
59
|
+
updateJobs = [...state.jobs];
|
|
60
|
+
index = updateJobs.findIndex((item) => item.id === action.payload.id);
|
|
61
|
+
if (index > -1) {
|
|
62
|
+
updateJobs[index] = action.payload;
|
|
63
|
+
} else {
|
|
64
|
+
updateJobs.push(action.payload);
|
|
65
|
+
}
|
|
66
|
+
return { ...state, jobs: updateJobs };
|
|
67
|
+
case JOBS_STATUSES_LOADED:
|
|
68
|
+
jobstatuses = _.orderBy(
|
|
69
|
+
_.unionWith(action.payload, state.jobstatuses, (v1, v2) => {
|
|
70
|
+
return v1 != null && v2 != null && v1.text === v2.text;
|
|
71
|
+
}),
|
|
72
|
+
"order",
|
|
73
|
+
"asc",
|
|
74
|
+
);
|
|
75
|
+
return { ...state, jobstatuses };
|
|
76
|
+
case JOBS_HIDE_SEEN:
|
|
77
|
+
return { ...state, hideSeen: action.payload };
|
|
78
|
+
case JOB_FILTER_LOADED:
|
|
79
|
+
return {
|
|
80
|
+
...state,
|
|
81
|
+
jobfilters: action.payload || INITIAL_STATE.jobfilters,
|
|
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
|
+
}
|
|
76
95
|
};
|
|
@@ -1,107 +1,130 @@
|
|
|
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 "react-native-elements";
|
|
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
|
-
|
|
39
|
+
return (
|
|
40
|
+
<Components.FormCard style={{ marginTop: 16 }}>
|
|
41
|
+
{this.renderOptions()}
|
|
42
|
+
</Components.FormCard>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
renderOptions() {
|
|
47
|
+
return this.props.types.map((rep, index) => {
|
|
48
|
+
return (
|
|
49
|
+
<TouchableOpacity
|
|
50
|
+
key={index}
|
|
51
|
+
onPress={this.onTypePress.bind(this, rep.typeName)}
|
|
52
|
+
>
|
|
53
|
+
<Components.FormCardSection
|
|
54
|
+
label={rep.typeName}
|
|
55
|
+
labelStyle={{ height: 0, margin: 0 }}
|
|
56
|
+
hasUnderline
|
|
57
|
+
hasContent
|
|
58
|
+
>
|
|
59
|
+
<View style={styles.labelContainer}>
|
|
60
|
+
<Text style={styles.labelText}>{rep.typeName}</Text>
|
|
61
|
+
<Icon
|
|
62
|
+
name="check-circle"
|
|
63
|
+
//style={styles.uploadButtonInner}
|
|
64
|
+
type="font-awesome"
|
|
65
|
+
iconStyle={[
|
|
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
|
+
}
|
|
62
81
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
render() {
|
|
83
|
+
return (
|
|
84
|
+
<View style={styles.container}>
|
|
85
|
+
<Components.Header
|
|
86
|
+
leftIcon="angle-left"
|
|
87
|
+
onPressLeft={this.onPressBack.bind(this)}
|
|
88
|
+
text="Select type"
|
|
89
|
+
/>
|
|
90
|
+
<ScrollView style={{ flex: 1 }}>{this.renderMain()}</ScrollView>
|
|
91
|
+
</View>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
71
94
|
}
|
|
72
95
|
|
|
73
96
|
const styles = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
container: {
|
|
98
|
+
flex: 1,
|
|
99
|
+
position: "relative",
|
|
100
|
+
backgroundColor: "#f0f0f5",
|
|
101
|
+
},
|
|
102
|
+
row: {
|
|
103
|
+
flexDirection: "row",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
minHeight: 22,
|
|
106
|
+
},
|
|
107
|
+
text: {
|
|
108
|
+
flex: 1,
|
|
109
|
+
fontFamily: "sf-regular",
|
|
110
|
+
fontSize: 14,
|
|
111
|
+
color: Colours.TEXT_DARK,
|
|
112
|
+
},
|
|
113
|
+
labelContainer: {
|
|
114
|
+
flexDirection: "row",
|
|
115
|
+
justifyContent: "space-between",
|
|
116
|
+
},
|
|
117
|
+
labelText: {
|
|
118
|
+
fontFamily: "sf-medium",
|
|
119
|
+
fontSize: 16,
|
|
120
|
+
color: Colours.TEXT_DARK,
|
|
121
|
+
},
|
|
122
|
+
description: {
|
|
123
|
+
marginTop: 5,
|
|
124
|
+
fontSize: 14,
|
|
125
|
+
fontFamily: "sf-regular",
|
|
126
|
+
color: Colours.TEXT_DARK,
|
|
127
|
+
},
|
|
105
128
|
};
|
|
106
129
|
|
|
107
130
|
export default connect(null, {})(JobTypePicker);
|
|
@@ -1,96 +1,105 @@
|
|
|
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
|
-
|
|
32
|
+
renderHeader() {
|
|
33
|
+
const title =
|
|
34
|
+
this.props.title ||
|
|
35
|
+
this.props.strings[`${values.featureKey}_textFeatureTitle`] ||
|
|
36
|
+
values.textFeatureTitle;
|
|
37
|
+
if (this.state.isHomeTab) {
|
|
38
|
+
return (
|
|
39
|
+
<Components.Header
|
|
40
|
+
text={title}
|
|
41
|
+
rightContent={
|
|
42
|
+
_.includes(this.props.user.hidden, "notifications") ? null : (
|
|
43
|
+
<View style={styles.notificationContainer}>
|
|
44
|
+
<BaseComponents.NotificationBell
|
|
45
|
+
colourBrandingHeader={this.props.colourBrandingHeader}
|
|
46
|
+
containerStyle={Styles.notificationBell}
|
|
47
|
+
/>
|
|
48
|
+
</View>
|
|
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
|
+
}
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
|
|
63
|
+
render() {
|
|
64
|
+
const { isHomeTab } = this.state;
|
|
56
65
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
return (
|
|
67
|
+
<View style={styles.container}>
|
|
68
|
+
{this.renderHeader()}
|
|
69
|
+
<Components.LoadingIndicator visible={this.state.loading} />
|
|
70
|
+
<MaintenanceList
|
|
71
|
+
style={styles.maintenanceList}
|
|
72
|
+
onLoadingChanged={this.onLoadingChanged}
|
|
73
|
+
enableAdd={!isHomeTab}
|
|
74
|
+
options={this.props.options}
|
|
75
|
+
/>
|
|
76
|
+
{/* {isHomeTab && <Components.AddContentButton />} */}
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
const styles = StyleSheet.create({
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
container: {
|
|
84
|
+
flex: 1,
|
|
85
|
+
},
|
|
86
|
+
notificationContainer: {
|
|
87
|
+
position: "absolute",
|
|
88
|
+
top: 0,
|
|
89
|
+
bottom: 0,
|
|
90
|
+
right: 0,
|
|
91
|
+
paddingTop: Helper.StatusBarHeight(0),
|
|
92
|
+
},
|
|
93
|
+
maintenanceList: {
|
|
94
|
+
marginTop: 12,
|
|
95
|
+
},
|
|
87
96
|
});
|
|
88
97
|
|
|
89
|
-
const mapStateToProps = state => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
const mapStateToProps = (state) => {
|
|
99
|
+
return {
|
|
100
|
+
user: state.user,
|
|
101
|
+
strings: state.strings?.config || {},
|
|
102
|
+
};
|
|
94
103
|
};
|
|
95
104
|
|
|
96
105
|
export default connect(mapStateToProps, {})(MaintenancePage);
|