@plusscommunities/pluss-maintenance-app-forms 6.0.8-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 +20 -0
- package/dist/module/actions/JobActions.js.map +1 -0
- package/dist/module/actions/index.js +2 -0
- package/dist/module/actions/index.js.map +1 -0
- package/dist/module/actions/types.js +5 -0
- package/dist/module/actions/types.js.map +1 -0
- package/dist/module/apis/index.js +2 -0
- package/dist/module/apis/index.js.map +1 -0
- package/dist/module/apis/maintenanceActions.js +171 -0
- package/dist/module/apis/maintenanceActions.js.map +1 -0
- package/dist/module/components/FilterPopupMenu.js +271 -0
- package/dist/module/components/FilterPopupMenu.js.map +1 -0
- package/dist/module/components/MaintenanceList.js +360 -0
- package/dist/module/components/MaintenanceList.js.map +1 -0
- package/dist/module/components/MaintenanceListItem.js +322 -0
- package/dist/module/components/MaintenanceListItem.js.map +1 -0
- package/dist/module/components/MaintenanceWidgetItem.js +149 -0
- package/dist/module/components/MaintenanceWidgetItem.js.map +1 -0
- package/dist/module/components/StatusSelectorPopup.js +89 -0
- package/dist/module/components/StatusSelectorPopup.js.map +1 -0
- package/dist/module/components/WidgetLarge.js +9 -0
- package/dist/module/components/WidgetLarge.js.map +1 -0
- package/dist/module/components/WidgetSmall.js +171 -0
- package/dist/module/components/WidgetSmall.js.map +1 -0
- package/dist/module/core.config.js +17 -0
- package/dist/module/core.config.js.map +1 -0
- package/dist/module/feature.config.js +75 -0
- package/dist/module/feature.config.js.map +1 -0
- package/dist/module/helper.js +33 -0
- package/dist/module/helper.js.map +1 -0
- package/dist/module/images/speechbubble.png +0 -0
- package/dist/module/index.js +25 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/reducers/JobsReducer.js +63 -0
- package/dist/module/reducers/JobsReducer.js.map +1 -0
- package/dist/module/screens/JobTypePicker.js +130 -0
- package/dist/module/screens/JobTypePicker.js.map +1 -0
- package/dist/module/screens/MaintenancePage.js +92 -0
- package/dist/module/screens/MaintenancePage.js.map +1 -0
- package/dist/module/screens/RequestDetail.js +980 -0
- package/dist/module/screens/RequestDetail.js.map +1 -0
- package/dist/module/screens/RequestNotes.js +390 -0
- package/dist/module/screens/RequestNotes.js.map +1 -0
- package/dist/module/screens/ServiceRequest.js +1243 -0
- package/dist/module/screens/ServiceRequest.js.map +1 -0
- package/dist/module/values.config.a.js +30 -0
- package/dist/module/values.config.a.js.map +1 -0
- package/dist/module/values.config.b.js +30 -0
- package/dist/module/values.config.b.js.map +1 -0
- package/dist/module/values.config.c.js +30 -0
- package/dist/module/values.config.c.js.map +1 -0
- package/dist/module/values.config.d.js +30 -0
- package/dist/module/values.config.d.js.map +1 -0
- package/dist/module/values.config.default.js +35 -0
- package/dist/module/values.config.default.js.map +1 -0
- 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 +35 -0
- package/dist/module/values.config.js.map +1 -0
- package/package.json +53 -0
- package/src/actions/JobActions.js +22 -0
- package/src/actions/index.js +1 -0
- package/src/actions/types.js +5 -0
- package/src/apis/index.js +1 -0
- package/src/apis/maintenanceActions.js +163 -0
- package/src/components/FilterPopupMenu.js +256 -0
- package/src/components/MaintenanceList.js +335 -0
- package/src/components/MaintenanceListItem.js +289 -0
- package/src/components/MaintenanceWidgetItem.js +132 -0
- package/src/components/StatusSelectorPopup.js +87 -0
- package/src/components/WidgetLarge.js +10 -0
- package/src/components/WidgetSmall.js +152 -0
- package/src/core.config.js +5 -0
- package/src/feature.config.js +73 -0
- package/src/helper.js +39 -0
- package/src/images/speechbubble.png +0 -0
- package/src/index.js +25 -0
- package/src/reducers/JobsReducer.js +51 -0
- package/src/screens/JobTypePicker.js +107 -0
- package/src/screens/MaintenancePage.js +96 -0
- package/src/screens/RequestDetail.js +915 -0
- package/src/screens/RequestNotes.js +418 -0
- package/src/screens/ServiceRequest.js +1219 -0
- package/src/values.config.a.js +30 -0
- package/src/values.config.b.js +30 -0
- package/src/values.config.c.js +30 -0
- package/src/values.config.d.js +30 -0
- package/src/values.config.default.js +35 -0
- package/src/values.config.forms.js +35 -0
- package/src/values.config.js +35 -0
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
|
|
10
|
+
class MaintenancePage extends Component {
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(props);
|
|
13
|
+
this.state = {
|
|
14
|
+
isHomeTab: false,
|
|
15
|
+
loading: false,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
componentDidMount() {
|
|
20
|
+
// console.log('!Services.navigation.getParentRoute()', !Services.navigation.getParentRoute());
|
|
21
|
+
this.setState({ isHomeTab: !Services.navigation.getParentRoute() });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
onPressBack = () => {
|
|
25
|
+
Services.navigation.goBack();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
onLoadingChanged = loading => {
|
|
29
|
+
this.setState({ loading });
|
|
30
|
+
};
|
|
31
|
+
|
|
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
|
+
}
|
|
53
|
+
|
|
54
|
+
render() {
|
|
55
|
+
const { isHomeTab } = this.state;
|
|
56
|
+
|
|
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
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const styles = StyleSheet.create({
|
|
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
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const mapStateToProps = state => {
|
|
90
|
+
return {
|
|
91
|
+
user: state.user,
|
|
92
|
+
strings: state.strings?.config || {},
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default connect(mapStateToProps, {})(MaintenancePage);
|