@plusscommunities/pluss-maintenance-app 6.0.20 → 6.0.22-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 +2 -2
- 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 +263 -100
- package/src/screens/RequestDetail.js +1348 -1125
- package/src/screens/RequestNotes.js +950 -806
- package/src/screens/ServiceRequest.js +68 -21
- 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,285 +1,342 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
TouchableOpacity,
|
|
6
|
+
Modal,
|
|
7
|
+
ScrollView,
|
|
8
|
+
Dimensions,
|
|
9
|
+
} from "react-native";
|
|
10
|
+
import { connect } from "react-redux";
|
|
11
|
+
import _ from "lodash";
|
|
12
|
+
import { maintenanceActions } from "../apis";
|
|
13
|
+
import { Colours, Helper } from "../core.config";
|
|
14
|
+
import {
|
|
15
|
+
getJobStatusOptions,
|
|
16
|
+
getIncompleteJobStatuses,
|
|
17
|
+
jobPriorityOptions,
|
|
18
|
+
getDefaultJobPriority,
|
|
19
|
+
} from "../helper";
|
|
20
|
+
import { values } from "../values.config";
|
|
9
21
|
|
|
10
|
-
const SCREEN_HEIGHT = Dimensions.get(
|
|
22
|
+
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
11
23
|
|
|
12
24
|
class FilterPopupMenu extends Component {
|
|
13
|
-
|
|
14
|
-
|
|
25
|
+
constructor(props) {
|
|
26
|
+
super(props);
|
|
15
27
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
this.state = {
|
|
29
|
+
types: props.types || [],
|
|
30
|
+
selectedStatus: props.status || "",
|
|
31
|
+
selectedPriority: props.priority || "",
|
|
32
|
+
selectedType: props.type || "",
|
|
33
|
+
selectedAssignee: props.assignee || "",
|
|
34
|
+
assignees: [],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
25
37
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
componentDidMount() {
|
|
39
|
+
this.getAssignees();
|
|
40
|
+
if (_.isEmpty(this.state.types)) this.refreshTypes();
|
|
41
|
+
}
|
|
30
42
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
componentDidUpdate(prevProps) {
|
|
44
|
+
if (prevProps.site !== this.props.site) {
|
|
45
|
+
this.refreshTypes();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
36
48
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
getStatusOptions = () => {
|
|
50
|
+
const statusOptions = getJobStatusOptions(this.props);
|
|
51
|
+
const options = [
|
|
52
|
+
{
|
|
53
|
+
label: "All",
|
|
54
|
+
value: "",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: "Incomplete",
|
|
58
|
+
value: `Unassigned|${getIncompleteJobStatuses(this.props)
|
|
59
|
+
.map((s) => s.text)
|
|
60
|
+
.join("|")}`,
|
|
61
|
+
},
|
|
62
|
+
...statusOptions.map((s) => ({
|
|
63
|
+
label: s.text,
|
|
64
|
+
value: s.text,
|
|
65
|
+
})),
|
|
66
|
+
];
|
|
67
|
+
// console.log('getStatusOptions', JSON.stringify(options, null, 2));
|
|
68
|
+
return options;
|
|
69
|
+
};
|
|
58
70
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
getPriorityOptions = () => {
|
|
72
|
+
const priorityOptions = jobPriorityOptions;
|
|
73
|
+
const defaultPriority = getDefaultJobPriority();
|
|
74
|
+
const options = [
|
|
75
|
+
{
|
|
76
|
+
label: "All",
|
|
77
|
+
value: "",
|
|
78
|
+
},
|
|
79
|
+
...priorityOptions.map((p) => ({
|
|
80
|
+
label: p.label,
|
|
81
|
+
value:
|
|
82
|
+
p.label === defaultPriority?.label ? `${p.label}|undefined` : p.label,
|
|
83
|
+
})),
|
|
84
|
+
];
|
|
85
|
+
// console.log('getPriorityOptions', JSON.stringify(options, null, 2));
|
|
86
|
+
return options;
|
|
87
|
+
};
|
|
75
88
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
getAssignees = async () => {
|
|
90
|
+
try {
|
|
91
|
+
const res = await maintenanceActions.getAssignees(this.props.site);
|
|
92
|
+
let assignees = res.data.Users.map((t) => {
|
|
93
|
+
return { label: t.displayName, value: t.id };
|
|
94
|
+
});
|
|
95
|
+
assignees = _.orderBy(assignees, "label");
|
|
83
96
|
|
|
84
|
-
|
|
97
|
+
assignees.splice(0, 0, { label: "All", value: "" });
|
|
85
98
|
|
|
86
|
-
|
|
99
|
+
const newState = { assignees };
|
|
87
100
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
if (!assignees.some((a) => a.value === this.state.selectedAssignee)) {
|
|
102
|
+
newState.selectedAssignee = "";
|
|
103
|
+
}
|
|
104
|
+
// console.log('refreshassignees', assignees);
|
|
105
|
+
this.setState(newState);
|
|
106
|
+
} catch (error) {
|
|
107
|
+
console.error("getAssignees", error);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
97
110
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
111
|
+
refreshTypes = async () => {
|
|
112
|
+
const { data } = await maintenanceActions.getJobTypes(
|
|
113
|
+
Helper.getSite(this.props.site),
|
|
114
|
+
);
|
|
115
|
+
const types = data.map((t) => {
|
|
116
|
+
return { label: t.typeName, value: t.typeName };
|
|
117
|
+
});
|
|
118
|
+
types.splice(0, 0, { label: "All", value: "" });
|
|
119
|
+
// console.log('refreshTypes', types);
|
|
120
|
+
this.setState({ types });
|
|
121
|
+
};
|
|
107
122
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
123
|
+
onSelectOption = (key, value) => {
|
|
124
|
+
const newState = {};
|
|
125
|
+
newState[key] = value;
|
|
126
|
+
this.setState(newState);
|
|
127
|
+
};
|
|
113
128
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
onDone = () => {
|
|
130
|
+
const { onClose } = this.props;
|
|
131
|
+
const { selectedStatus, selectedPriority, selectedType, selectedAssignee } =
|
|
132
|
+
this.state;
|
|
133
|
+
if (onClose)
|
|
134
|
+
onClose({
|
|
135
|
+
status: selectedStatus,
|
|
136
|
+
statusText: this.getStatusOptions().find(
|
|
137
|
+
(o) => o.value === selectedStatus,
|
|
138
|
+
)?.label,
|
|
139
|
+
priority: selectedPriority,
|
|
140
|
+
priorityText: this.getPriorityOptions().find(
|
|
141
|
+
(o) => o.value === selectedPriority,
|
|
142
|
+
)?.label,
|
|
143
|
+
type: selectedType,
|
|
144
|
+
assignee: selectedAssignee,
|
|
145
|
+
assigneeName: this.state.assignees.find(
|
|
146
|
+
(a) => a.value === selectedAssignee,
|
|
147
|
+
)?.label,
|
|
148
|
+
});
|
|
149
|
+
};
|
|
128
150
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
renderTitle() {
|
|
152
|
+
const { title } = this.props;
|
|
153
|
+
return (
|
|
154
|
+
<View style={styles.titleContainer}>
|
|
155
|
+
<Text style={styles.titleText}>{title || "Filter By"}</Text>
|
|
156
|
+
</View>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
137
159
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
160
|
+
renderCancel() {
|
|
161
|
+
const { colourBrandingMain, cancelText } = this.props;
|
|
162
|
+
return (
|
|
163
|
+
<TouchableOpacity onPress={this.onDone}>
|
|
164
|
+
<View style={styles.cancelContainer}>
|
|
165
|
+
<Text style={[styles.cancelText, { color: colourBrandingMain }]}>
|
|
166
|
+
{cancelText || "Done"}
|
|
167
|
+
</Text>
|
|
168
|
+
</View>
|
|
169
|
+
</TouchableOpacity>
|
|
170
|
+
);
|
|
171
|
+
}
|
|
148
172
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
173
|
+
renderOptions(title, options, selectedKey) {
|
|
174
|
+
const { colourBrandingMain } = this.props;
|
|
175
|
+
return (
|
|
176
|
+
<View style={styles.optionsContainer}>
|
|
177
|
+
<Text style={styles.optionsTitle}>{title}</Text>
|
|
178
|
+
<View style={styles.options}>
|
|
179
|
+
{options.map((o) => {
|
|
180
|
+
const selected = this.state[selectedKey];
|
|
181
|
+
const backgroundColor =
|
|
182
|
+
o.value === selected ? colourBrandingMain : "#fff";
|
|
183
|
+
const color = o.value === selected ? "#fff" : colourBrandingMain;
|
|
184
|
+
return (
|
|
185
|
+
<TouchableOpacity
|
|
186
|
+
key={o.label}
|
|
187
|
+
onPress={() => this.onSelectOption(selectedKey, o.value)}
|
|
188
|
+
>
|
|
189
|
+
<View
|
|
190
|
+
style={[
|
|
191
|
+
styles.optionContainer,
|
|
192
|
+
{ backgroundColor, borderColor: colourBrandingMain },
|
|
193
|
+
]}
|
|
194
|
+
>
|
|
195
|
+
<Text style={[styles.optionText, { color }]}>{o.label}</Text>
|
|
196
|
+
</View>
|
|
197
|
+
</TouchableOpacity>
|
|
198
|
+
);
|
|
199
|
+
})}
|
|
200
|
+
</View>
|
|
201
|
+
</View>
|
|
202
|
+
);
|
|
203
|
+
}
|
|
171
204
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
205
|
+
render() {
|
|
206
|
+
// console.log('FilterPopupMenu', JSON.stringify({ category: this.props.user.category, permissions: this.props.user.permissions }, null, 2))
|
|
207
|
+
const isStaff = this.props.user.category === "staff";
|
|
208
|
+
const canFilterAssignee = !_.includes(
|
|
209
|
+
this.props.user.permissions,
|
|
210
|
+
values.permissionMaintenanceAssignment,
|
|
211
|
+
);
|
|
176
212
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
213
|
+
return (
|
|
214
|
+
<Modal
|
|
215
|
+
visible
|
|
216
|
+
transparent
|
|
217
|
+
animationType="slide"
|
|
218
|
+
onRequestClose={this.onDone}
|
|
219
|
+
>
|
|
220
|
+
<View style={styles.container}>
|
|
221
|
+
<View style={styles.menu}>
|
|
222
|
+
{this.renderTitle()}
|
|
223
|
+
<ScrollView style={styles.optionContent}>
|
|
224
|
+
{this.renderOptions(
|
|
225
|
+
"Status",
|
|
226
|
+
this.getStatusOptions(),
|
|
227
|
+
"selectedStatus",
|
|
228
|
+
)}
|
|
229
|
+
{isStaff
|
|
230
|
+
? this.renderOptions(
|
|
231
|
+
"Priority",
|
|
232
|
+
this.getPriorityOptions(),
|
|
233
|
+
"selectedPriority",
|
|
234
|
+
)
|
|
235
|
+
: null}
|
|
236
|
+
{this.renderOptions("Type", this.state.types, "selectedType")}
|
|
237
|
+
{canFilterAssignee
|
|
238
|
+
? this.renderOptions(
|
|
239
|
+
"Assigned To",
|
|
240
|
+
this.state.assignees,
|
|
241
|
+
"selectedAssignee",
|
|
242
|
+
)
|
|
243
|
+
: null}
|
|
244
|
+
</ScrollView>
|
|
245
|
+
{this.renderCancel()}
|
|
246
|
+
</View>
|
|
247
|
+
</View>
|
|
248
|
+
</Modal>
|
|
249
|
+
);
|
|
250
|
+
}
|
|
194
251
|
}
|
|
195
252
|
|
|
196
253
|
const styles = {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
254
|
+
container: {
|
|
255
|
+
position: "absolute",
|
|
256
|
+
bottom: 0,
|
|
257
|
+
left: 0,
|
|
258
|
+
right: 0,
|
|
259
|
+
top: 0,
|
|
260
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
261
|
+
zIndex: 1000,
|
|
262
|
+
},
|
|
263
|
+
menu: {
|
|
264
|
+
position: "absolute",
|
|
265
|
+
bottom: 0,
|
|
266
|
+
left: 0,
|
|
267
|
+
right: 0,
|
|
268
|
+
backgroundColor: "#fff",
|
|
269
|
+
borderTopLeftRadius: 12,
|
|
270
|
+
borderTopRightRadius: 12,
|
|
271
|
+
maxHeight: SCREEN_HEIGHT * 0.8,
|
|
272
|
+
},
|
|
273
|
+
cancelContainer: {
|
|
274
|
+
paddingVertical: 16,
|
|
275
|
+
borderColor: Colours.LINEGREY,
|
|
276
|
+
borderTopWidth: 1,
|
|
277
|
+
paddingHorizontal: 16,
|
|
278
|
+
},
|
|
279
|
+
cancelText: {
|
|
280
|
+
fontFamily: "sf-medium",
|
|
281
|
+
fontSize: 16,
|
|
282
|
+
textAlign: "center",
|
|
283
|
+
color: Colours.TEXT_DARK,
|
|
284
|
+
},
|
|
285
|
+
titleContainer: {
|
|
286
|
+
padding: 16,
|
|
287
|
+
borderColor: Colours.LINEGREY,
|
|
288
|
+
borderBottomWidth: 1,
|
|
289
|
+
},
|
|
290
|
+
titleText: {
|
|
291
|
+
fontFamily: "sf-semibold",
|
|
292
|
+
fontSize: 16,
|
|
293
|
+
textAlign: "center",
|
|
294
|
+
color: Colours.TEXT_DARK,
|
|
295
|
+
},
|
|
296
|
+
optionContent: {
|
|
297
|
+
paddingVertical: 10,
|
|
298
|
+
},
|
|
299
|
+
optionsContainer: {
|
|
300
|
+
marginHorizontal: 14,
|
|
301
|
+
},
|
|
302
|
+
optionsTitle: {
|
|
303
|
+
fontFamily: "sf-semibold",
|
|
304
|
+
marginBottom: 4,
|
|
305
|
+
},
|
|
306
|
+
options: {
|
|
307
|
+
flex: 1,
|
|
308
|
+
flexDirection: "row",
|
|
309
|
+
flexWrap: "wrap",
|
|
310
|
+
},
|
|
311
|
+
optionContainer: {
|
|
312
|
+
flexDirection: "row",
|
|
313
|
+
alignItems: "center",
|
|
314
|
+
justifyContent: "center",
|
|
315
|
+
minWidth: 50,
|
|
316
|
+
height: 30,
|
|
317
|
+
paddingHorizontal: 8,
|
|
318
|
+
borderRadius: 4,
|
|
319
|
+
borderWidth: 1,
|
|
320
|
+
marginRight: 8,
|
|
321
|
+
marginBottom: 8,
|
|
322
|
+
},
|
|
323
|
+
optionText: {
|
|
324
|
+
color: "#fff",
|
|
325
|
+
textAlign: "center",
|
|
326
|
+
fontFamily: "sf-semibold",
|
|
327
|
+
fontSize: 13,
|
|
328
|
+
},
|
|
272
329
|
};
|
|
273
330
|
|
|
274
|
-
const mapStateToProps = state => {
|
|
275
|
-
|
|
331
|
+
const mapStateToProps = (state) => {
|
|
332
|
+
const { user } = state;
|
|
276
333
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
334
|
+
return {
|
|
335
|
+
user,
|
|
336
|
+
site: user.site,
|
|
337
|
+
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
338
|
+
statusTypes: state[values.reducerKey].jobstatuses,
|
|
339
|
+
};
|
|
283
340
|
};
|
|
284
341
|
|
|
285
342
|
export default connect(mapStateToProps, {})(FilterPopupMenu);
|