@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,136 +1,157 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import { Text, View, StyleSheet, TouchableOpacity } from
|
|
3
|
-
import { connect } from
|
|
4
|
-
import { Icon } from
|
|
5
|
-
import moment from
|
|
6
|
-
import _ from
|
|
7
|
-
import { getJobStatus } from
|
|
8
|
-
import { Services } from
|
|
9
|
-
import { Colours, Helper } from
|
|
10
|
-
import { values } from
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import { Text, View, StyleSheet, TouchableOpacity } from "react-native";
|
|
3
|
+
import { connect } from "react-redux";
|
|
4
|
+
import { Icon } from "react-native-elements";
|
|
5
|
+
import moment from "moment";
|
|
6
|
+
import _ from "lodash";
|
|
7
|
+
import { getJobStatus } from "../helper";
|
|
8
|
+
import { Services } from "../feature.config";
|
|
9
|
+
import { Colours, Helper } from "../core.config";
|
|
10
|
+
import { values } from "../values.config";
|
|
11
11
|
|
|
12
12
|
class MaintenanceWidgetItem extends Component {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
onPressJob = () => {
|
|
14
|
+
Services.navigation.navigate(values.screenRequestDetail, {
|
|
15
|
+
job: this.props.job,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
render() {
|
|
20
|
+
const { job, hideSeen } = this.props;
|
|
21
|
+
const createdTime = moment(job.createdUnix);
|
|
22
|
+
const createdTimeText = `${createdTime.format("ddd, D MMMM")} • ${createdTime.format("h:mma")}`;
|
|
23
|
+
const status = getJobStatus(job.status, this.props);
|
|
24
|
+
const seenText = (() => {
|
|
25
|
+
if (!job.status || job.status === getJobStatus(null, this.props).text) {
|
|
26
|
+
return job.seen ? "Seen" : "Unseen";
|
|
27
|
+
}
|
|
28
|
+
return "";
|
|
29
|
+
})();
|
|
28
30
|
|
|
29
|
-
|
|
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
|
-
|
|
31
|
+
return (
|
|
32
|
+
<TouchableOpacity key={job.id} onPress={this.onPressJob}>
|
|
33
|
+
<View style={styles.jobContainer}>
|
|
34
|
+
<View style={styles.jobInnerContainer}>
|
|
35
|
+
<View style={styles.jobTopSection}>
|
|
36
|
+
<Text numberOfLines={2} style={styles.jobTitleText}>
|
|
37
|
+
{job.title}
|
|
38
|
+
</Text>
|
|
39
|
+
<Text style={styles.jobCreatedTimeText}>{createdTimeText}</Text>
|
|
40
|
+
{!hideSeen ? (
|
|
41
|
+
<View style={styles.jobSeenContainer}>
|
|
42
|
+
{job.seen && !_.isEmpty(seenText) && (
|
|
43
|
+
<Icon
|
|
44
|
+
name="check"
|
|
45
|
+
type="font-awesome"
|
|
46
|
+
iconStyle={[
|
|
47
|
+
styles.jobSeenIcon,
|
|
48
|
+
{ color: this.props.colourBrandingMain },
|
|
49
|
+
]}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
<Text
|
|
53
|
+
style={[
|
|
54
|
+
styles.jobSeenText,
|
|
55
|
+
job.seen && { color: this.props.colourBrandingMain },
|
|
56
|
+
]}
|
|
57
|
+
>
|
|
58
|
+
{seenText}
|
|
59
|
+
</Text>
|
|
60
|
+
</View>
|
|
61
|
+
) : null}
|
|
62
|
+
</View>
|
|
63
|
+
<View style={styles.jobBottomSection}>
|
|
64
|
+
<View
|
|
65
|
+
style={[
|
|
66
|
+
styles.jobStatusContainer,
|
|
67
|
+
{ backgroundColor: status?.color },
|
|
68
|
+
]}
|
|
69
|
+
>
|
|
70
|
+
{/* <Icon name="wrench" type="font-awesome" iconStyle={styles.jobStatusIcon} /> */}
|
|
71
|
+
<Text style={styles.jobStatusText}>{status?.text}</Text>
|
|
72
|
+
</View>
|
|
73
|
+
</View>
|
|
74
|
+
</View>
|
|
75
|
+
</View>
|
|
76
|
+
</TouchableOpacity>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
58
79
|
}
|
|
59
80
|
|
|
60
81
|
const styles = StyleSheet.create({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
82
|
+
jobContainer: {
|
|
83
|
+
padding: 10,
|
|
84
|
+
},
|
|
85
|
+
jobInnerContainer: {
|
|
86
|
+
width: 140,
|
|
87
|
+
height: 160,
|
|
88
|
+
...Helper.getShadowStyle(),
|
|
89
|
+
},
|
|
90
|
+
jobTopSection: {
|
|
91
|
+
flex: 1,
|
|
92
|
+
padding: 10,
|
|
93
|
+
paddingTop: 20,
|
|
94
|
+
},
|
|
95
|
+
jobTitleText: {
|
|
96
|
+
flex: 1,
|
|
97
|
+
fontFamily: "sf-semibold",
|
|
98
|
+
fontSize: 16,
|
|
99
|
+
color: Colours.TEXT_DARK,
|
|
100
|
+
},
|
|
101
|
+
jobCreatedTimeText: {
|
|
102
|
+
fontFamily: "sf-medium",
|
|
103
|
+
fontSize: 11,
|
|
104
|
+
color: Colours.TEXT_LIGHT,
|
|
105
|
+
paddingTop: 3,
|
|
106
|
+
},
|
|
107
|
+
jobSeenContainer: {
|
|
108
|
+
flexDirection: "row",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
paddingTop: 5,
|
|
111
|
+
},
|
|
112
|
+
jobSeenIcon: {
|
|
113
|
+
fontSize: 12,
|
|
114
|
+
marginRight: 4,
|
|
115
|
+
},
|
|
116
|
+
jobSeenText: {
|
|
117
|
+
fontFamily: "sf-semibold",
|
|
118
|
+
fontSize: 12,
|
|
119
|
+
color: Colours.TEXT_SUPER_LIGHT,
|
|
120
|
+
},
|
|
121
|
+
jobBottomSection: {
|
|
122
|
+
alignItems: "center",
|
|
123
|
+
justifyContent: "center",
|
|
124
|
+
paddingVertical: 10,
|
|
125
|
+
borderTopWidth: 1,
|
|
126
|
+
borderTopColor: Colours.LINEGREY,
|
|
127
|
+
},
|
|
128
|
+
jobStatusContainer: {
|
|
129
|
+
flexDirection: "row",
|
|
130
|
+
alignItems: "center",
|
|
131
|
+
justifyContent: "space-between",
|
|
132
|
+
width: 105,
|
|
133
|
+
height: 30,
|
|
134
|
+
paddingHorizontal: 8,
|
|
135
|
+
borderRadius: 4,
|
|
136
|
+
},
|
|
137
|
+
jobStatusIcon: {
|
|
138
|
+
color: "#fff",
|
|
139
|
+
fontSize: 14,
|
|
140
|
+
},
|
|
141
|
+
jobStatusText: {
|
|
142
|
+
color: "#fff",
|
|
143
|
+
textAlign: "center",
|
|
144
|
+
fontFamily: "sf-semibold",
|
|
145
|
+
fontSize: 13,
|
|
146
|
+
},
|
|
126
147
|
});
|
|
127
148
|
|
|
128
|
-
const mapStateToProps = state => {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
149
|
+
const mapStateToProps = (state) => {
|
|
150
|
+
return {
|
|
151
|
+
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
152
|
+
statusTypes: state[values.reducerKey].jobstatuses,
|
|
153
|
+
hideSeen: state[values.reducerKey].hideSeen,
|
|
154
|
+
};
|
|
134
155
|
};
|
|
135
156
|
|
|
136
157
|
export default connect(mapStateToProps, {})(MaintenanceWidgetItem);
|
|
@@ -1,79 +1,92 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import { View, StyleSheet, TouchableOpacity, Text } from
|
|
3
|
-
import { connect } from
|
|
4
|
-
import { jobPriorityOptions } from
|
|
5
|
-
import { Components, Colours } from
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity, Text } from "react-native";
|
|
3
|
+
import { connect } from "react-redux";
|
|
4
|
+
import { jobPriorityOptions } from "../helper";
|
|
5
|
+
import { Components, Colours } from "../core.config";
|
|
6
6
|
|
|
7
7
|
class PrioritySelectorPopup extends PureComponent {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
render() {
|
|
9
|
+
const { title, includeAll, allText, onClose, onSelect } = this.props;
|
|
10
|
+
let priorities = jobPriorityOptions;
|
|
11
|
+
if (includeAll)
|
|
12
|
+
priorities = [
|
|
13
|
+
{
|
|
14
|
+
label: allText || "Show All",
|
|
15
|
+
color: this.props.colourBrandingMain,
|
|
16
|
+
},
|
|
17
|
+
...priorities,
|
|
18
|
+
];
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
return (
|
|
21
|
+
<Components.MiddlePopup
|
|
22
|
+
style={[styles.statusPopup, { height: priorities.length * 50 + 40 }]}
|
|
23
|
+
onClose={onClose}
|
|
24
|
+
>
|
|
25
|
+
<Text style={styles.statusPopupTitle}>
|
|
26
|
+
{title || "Select Priority"}
|
|
27
|
+
</Text>
|
|
28
|
+
<View style={styles.statusPopupOptionsContainer}>
|
|
29
|
+
{priorities.map((priority) => {
|
|
30
|
+
return (
|
|
31
|
+
<TouchableOpacity
|
|
32
|
+
key={priority.label}
|
|
33
|
+
onPress={() => onSelect(priority.label)}
|
|
34
|
+
>
|
|
35
|
+
<View
|
|
36
|
+
style={[
|
|
37
|
+
styles.jobStatusContainer,
|
|
38
|
+
{ backgroundColor: priority.color },
|
|
39
|
+
]}
|
|
40
|
+
>
|
|
41
|
+
<Text style={styles.jobStatusText}>{priority.label}</Text>
|
|
42
|
+
</View>
|
|
43
|
+
</TouchableOpacity>
|
|
44
|
+
);
|
|
45
|
+
})}
|
|
46
|
+
</View>
|
|
47
|
+
</Components.MiddlePopup>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
37
50
|
}
|
|
38
51
|
|
|
39
52
|
const styles = StyleSheet.create({
|
|
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
|
-
|
|
53
|
+
statusPopup: {
|
|
54
|
+
width: 160,
|
|
55
|
+
padding: 16,
|
|
56
|
+
borderRadius: 12,
|
|
57
|
+
},
|
|
58
|
+
statusPopupTitle: {
|
|
59
|
+
fontFamily: "sf-bold",
|
|
60
|
+
color: Colours.TEXT_DARK,
|
|
61
|
+
fontSize: 18,
|
|
62
|
+
marginBottom: 16,
|
|
63
|
+
},
|
|
64
|
+
statusPopupOptionsContainer: {
|
|
65
|
+
flex: 1,
|
|
66
|
+
justifyContent: "space-between",
|
|
67
|
+
},
|
|
68
|
+
jobStatusContainer: {
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
justifyContent: "space-between",
|
|
72
|
+
width: 105,
|
|
73
|
+
height: 30,
|
|
74
|
+
paddingHorizontal: 8,
|
|
75
|
+
borderRadius: 4,
|
|
76
|
+
},
|
|
77
|
+
jobStatusText: {
|
|
78
|
+
color: "#fff",
|
|
79
|
+
textAlign: "center",
|
|
80
|
+
fontFamily: "sf-semibold",
|
|
81
|
+
fontSize: 13,
|
|
82
|
+
flex: 1,
|
|
83
|
+
},
|
|
71
84
|
});
|
|
72
85
|
|
|
73
|
-
const mapStateToProps = state => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
const mapStateToProps = (state) => {
|
|
87
|
+
return {
|
|
88
|
+
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
89
|
+
};
|
|
77
90
|
};
|
|
78
91
|
|
|
79
92
|
export default connect(mapStateToProps, {})(PrioritySelectorPopup);
|
|
@@ -1,81 +1,92 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import { View, StyleSheet, TouchableOpacity, Text } from
|
|
3
|
-
import { connect } from
|
|
4
|
-
import { getJobStatusOptions } from
|
|
5
|
-
import { Components, Colours } from
|
|
6
|
-
import { values } from
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity, Text } from "react-native";
|
|
3
|
+
import { connect } from "react-redux";
|
|
4
|
+
import { getJobStatusOptions } from "../helper";
|
|
5
|
+
import { Components, Colours } from "../core.config";
|
|
6
|
+
import { values } from "../values.config";
|
|
7
7
|
|
|
8
8
|
class StatusSelectorPopup extends PureComponent {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
render() {
|
|
10
|
+
const { title, includeAll, allText, onClose, onSelect } = this.props;
|
|
11
|
+
let statuses = getJobStatusOptions(this.props);
|
|
12
|
+
if (includeAll)
|
|
13
|
+
statuses = [
|
|
14
|
+
{
|
|
15
|
+
text: allText || "Show All",
|
|
16
|
+
color: this.props.colourBrandingMain,
|
|
17
|
+
},
|
|
18
|
+
...statuses,
|
|
19
|
+
];
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
return (
|
|
22
|
+
<Components.MiddlePopup
|
|
23
|
+
style={[styles.statusPopup, { height: statuses.length * 50 + 40 }]}
|
|
24
|
+
onClose={onClose}
|
|
25
|
+
>
|
|
26
|
+
<Text style={styles.statusPopupTitle}>{title || "Select Status"}</Text>
|
|
27
|
+
<View style={styles.statusPopupOptionsContainer}>
|
|
28
|
+
{statuses.map((status) => {
|
|
29
|
+
return (
|
|
30
|
+
<TouchableOpacity
|
|
31
|
+
key={status.text}
|
|
32
|
+
onPress={() => onSelect(status.text)}
|
|
33
|
+
>
|
|
34
|
+
<View
|
|
35
|
+
style={[
|
|
36
|
+
styles.jobStatusContainer,
|
|
37
|
+
{ backgroundColor: status.color },
|
|
38
|
+
]}
|
|
39
|
+
>
|
|
40
|
+
<Text style={styles.jobStatusText}>{status.text}</Text>
|
|
41
|
+
</View>
|
|
42
|
+
</TouchableOpacity>
|
|
43
|
+
);
|
|
44
|
+
})}
|
|
45
|
+
</View>
|
|
46
|
+
</Components.MiddlePopup>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
const styles = StyleSheet.create({
|
|
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
|
-
|
|
52
|
+
statusPopup: {
|
|
53
|
+
width: 160,
|
|
54
|
+
padding: 16,
|
|
55
|
+
borderRadius: 12,
|
|
56
|
+
},
|
|
57
|
+
statusPopupTitle: {
|
|
58
|
+
fontFamily: "sf-bold",
|
|
59
|
+
color: Colours.TEXT_DARK,
|
|
60
|
+
fontSize: 18,
|
|
61
|
+
marginBottom: 16,
|
|
62
|
+
},
|
|
63
|
+
statusPopupOptionsContainer: {
|
|
64
|
+
flex: 1,
|
|
65
|
+
justifyContent: "space-between",
|
|
66
|
+
},
|
|
67
|
+
jobStatusContainer: {
|
|
68
|
+
flexDirection: "row",
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
justifyContent: "space-between",
|
|
71
|
+
width: 105,
|
|
72
|
+
height: 30,
|
|
73
|
+
paddingHorizontal: 8,
|
|
74
|
+
borderRadius: 4,
|
|
75
|
+
},
|
|
76
|
+
jobStatusText: {
|
|
77
|
+
color: "#fff",
|
|
78
|
+
textAlign: "center",
|
|
79
|
+
fontFamily: "sf-semibold",
|
|
80
|
+
fontSize: 13,
|
|
81
|
+
flex: 1,
|
|
82
|
+
},
|
|
72
83
|
});
|
|
73
84
|
|
|
74
|
-
const mapStateToProps = state => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
const mapStateToProps = (state) => {
|
|
86
|
+
return {
|
|
87
|
+
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
88
|
+
statusTypes: state[values.reducerKey].jobstatuses,
|
|
89
|
+
};
|
|
79
90
|
};
|
|
80
91
|
|
|
81
92
|
export default connect(mapStateToProps, {})(StatusSelectorPopup);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import MaintenanceList from
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import MaintenanceList from "./MaintenanceList";
|
|
3
3
|
|
|
4
4
|
class WidgetLarge extends PureComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
render() {
|
|
6
|
+
return <MaintenanceList {...this.props} />;
|
|
7
|
+
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export default WidgetLarge;
|