@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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","View","StyleSheet","TouchableOpacity","Text","connect","jobPriorityOptions","Components","Colours","PrioritySelectorPopup","render","title","includeAll","allText","onClose","onSelect","props","priorities","label","color","colourBrandingMain","createElement","MiddlePopup","style","styles","statusPopup","height","length","statusPopupTitle","statusPopupOptionsContainer","map","priority","key","onPress","jobStatusContainer","backgroundColor","jobStatusText","create","width","padding","borderRadius","fontFamily","TEXT_DARK","fontSize","marginBottom","flex","justifyContent","flexDirection","alignItems","paddingHorizontal","textAlign","mapStateToProps","state","getMainBrandingColourFromState"],"sources":["PrioritySelectorPopup.js"],"sourcesContent":["import React, { PureComponent } from
|
|
1
|
+
{"version":3,"names":["React","PureComponent","View","StyleSheet","TouchableOpacity","Text","connect","jobPriorityOptions","Components","Colours","PrioritySelectorPopup","render","title","includeAll","allText","onClose","onSelect","props","priorities","label","color","colourBrandingMain","createElement","MiddlePopup","style","styles","statusPopup","height","length","statusPopupTitle","statusPopupOptionsContainer","map","priority","key","onPress","jobStatusContainer","backgroundColor","jobStatusText","create","width","padding","borderRadius","fontFamily","TEXT_DARK","fontSize","marginBottom","flex","justifyContent","flexDirection","alignItems","paddingHorizontal","textAlign","mapStateToProps","state","getMainBrandingColourFromState"],"sources":["PrioritySelectorPopup.js"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { View, StyleSheet, TouchableOpacity, Text } from 'react-native';\nimport { connect } from 'react-redux';\nimport { jobPriorityOptions } from '../helper';\nimport { Components, Colours } from '../core.config';\n\nclass PrioritySelectorPopup extends PureComponent {\n render() {\n const { title, includeAll, allText, onClose, onSelect } = this.props;\n let priorities = jobPriorityOptions;\n if (includeAll)\n priorities = [\n {\n label: allText || 'Show All',\n color: this.props.colourBrandingMain,\n },\n ...priorities,\n ];\n\n return (\n <Components.MiddlePopup style={[styles.statusPopup, { height: priorities.length * 50 + 40 }]} onClose={onClose}>\n <Text style={styles.statusPopupTitle}>{title || 'Select Priority'}</Text>\n <View style={styles.statusPopupOptionsContainer}>\n {priorities.map(priority => {\n return (\n <TouchableOpacity key={priority.label} onPress={() => onSelect(priority.label)}>\n <View style={[styles.jobStatusContainer, { backgroundColor: priority.color }]}>\n <Text style={styles.jobStatusText}>{priority.label}</Text>\n </View>\n </TouchableOpacity>\n );\n })}\n </View>\n </Components.MiddlePopup>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n statusPopup: {\n width: 160,\n padding: 16,\n borderRadius: 12,\n },\n statusPopupTitle: {\n fontFamily: 'sf-bold',\n color: Colours.TEXT_DARK,\n fontSize: 18,\n marginBottom: 16,\n },\n statusPopupOptionsContainer: {\n flex: 1,\n justifyContent: 'space-between',\n },\n jobStatusContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 105,\n height: 30,\n paddingHorizontal: 8,\n borderRadius: 4,\n },\n jobStatusText: {\n color: '#fff',\n textAlign: 'center',\n fontFamily: 'sf-semibold',\n fontSize: 13,\n flex: 1,\n },\n});\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: Colours.getMainBrandingColourFromState(state),\n };\n};\n\nexport default connect(mapStateToProps, {})(PrioritySelectorPopup);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,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
|
-
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
|
class StatusSelectorPopup extends PureComponent {
|
|
8
8
|
render() {
|
|
9
9
|
const {
|
|
@@ -15,7 +15,7 @@ class StatusSelectorPopup extends PureComponent {
|
|
|
15
15
|
} = this.props;
|
|
16
16
|
let statuses = getJobStatusOptions(this.props);
|
|
17
17
|
if (includeAll) statuses = [{
|
|
18
|
-
text: allText ||
|
|
18
|
+
text: allText || 'Show All',
|
|
19
19
|
color: this.props.colourBrandingMain
|
|
20
20
|
}, ...statuses];
|
|
21
21
|
return /*#__PURE__*/React.createElement(Components.MiddlePopup, {
|
|
@@ -25,7 +25,7 @@ class StatusSelectorPopup extends PureComponent {
|
|
|
25
25
|
onClose: onClose
|
|
26
26
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
27
27
|
style: styles.statusPopupTitle
|
|
28
|
-
}, title ||
|
|
28
|
+
}, title || 'Select Status'), /*#__PURE__*/React.createElement(View, {
|
|
29
29
|
style: styles.statusPopupOptionsContainer
|
|
30
30
|
}, statuses.map(status => {
|
|
31
31
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
@@ -48,28 +48,28 @@ const styles = StyleSheet.create({
|
|
|
48
48
|
borderRadius: 12
|
|
49
49
|
},
|
|
50
50
|
statusPopupTitle: {
|
|
51
|
-
fontFamily:
|
|
51
|
+
fontFamily: 'sf-bold',
|
|
52
52
|
color: Colours.TEXT_DARK,
|
|
53
53
|
fontSize: 18,
|
|
54
54
|
marginBottom: 16
|
|
55
55
|
},
|
|
56
56
|
statusPopupOptionsContainer: {
|
|
57
57
|
flex: 1,
|
|
58
|
-
justifyContent:
|
|
58
|
+
justifyContent: 'space-between'
|
|
59
59
|
},
|
|
60
60
|
jobStatusContainer: {
|
|
61
|
-
flexDirection:
|
|
62
|
-
alignItems:
|
|
63
|
-
justifyContent:
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
justifyContent: 'space-between',
|
|
64
64
|
width: 105,
|
|
65
65
|
height: 30,
|
|
66
66
|
paddingHorizontal: 8,
|
|
67
67
|
borderRadius: 4
|
|
68
68
|
},
|
|
69
69
|
jobStatusText: {
|
|
70
|
-
color:
|
|
71
|
-
textAlign:
|
|
72
|
-
fontFamily:
|
|
70
|
+
color: '#fff',
|
|
71
|
+
textAlign: 'center',
|
|
72
|
+
fontFamily: 'sf-semibold',
|
|
73
73
|
fontSize: 13,
|
|
74
74
|
flex: 1
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","View","StyleSheet","TouchableOpacity","Text","connect","getJobStatusOptions","Components","Colours","values","StatusSelectorPopup","render","title","includeAll","allText","onClose","onSelect","props","statuses","text","color","colourBrandingMain","createElement","MiddlePopup","style","styles","statusPopup","height","length","statusPopupTitle","statusPopupOptionsContainer","map","status","key","onPress","jobStatusContainer","backgroundColor","jobStatusText","create","width","padding","borderRadius","fontFamily","TEXT_DARK","fontSize","marginBottom","flex","justifyContent","flexDirection","alignItems","paddingHorizontal","textAlign","mapStateToProps","state","getMainBrandingColourFromState","statusTypes","reducerKey","jobstatuses"],"sources":["StatusSelectorPopup.js"],"sourcesContent":["import React, { PureComponent } from
|
|
1
|
+
{"version":3,"names":["React","PureComponent","View","StyleSheet","TouchableOpacity","Text","connect","getJobStatusOptions","Components","Colours","values","StatusSelectorPopup","render","title","includeAll","allText","onClose","onSelect","props","statuses","text","color","colourBrandingMain","createElement","MiddlePopup","style","styles","statusPopup","height","length","statusPopupTitle","statusPopupOptionsContainer","map","status","key","onPress","jobStatusContainer","backgroundColor","jobStatusText","create","width","padding","borderRadius","fontFamily","TEXT_DARK","fontSize","marginBottom","flex","justifyContent","flexDirection","alignItems","paddingHorizontal","textAlign","mapStateToProps","state","getMainBrandingColourFromState","statusTypes","reducerKey","jobstatuses"],"sources":["StatusSelectorPopup.js"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { View, StyleSheet, TouchableOpacity, Text } from 'react-native';\nimport { connect } from 'react-redux';\nimport { getJobStatusOptions } from '../helper';\nimport { Components, Colours } from '../core.config';\nimport { values } from '../values.config';\n\nclass StatusSelectorPopup extends PureComponent {\n render() {\n const { title, includeAll, allText, onClose, onSelect } = this.props;\n let statuses = getJobStatusOptions(this.props);\n if (includeAll)\n statuses = [\n {\n text: allText || 'Show All',\n color: this.props.colourBrandingMain,\n },\n ...statuses,\n ];\n\n return (\n <Components.MiddlePopup style={[styles.statusPopup, { height: statuses.length * 50 + 40 }]} onClose={onClose}>\n <Text style={styles.statusPopupTitle}>{title || 'Select Status'}</Text>\n <View style={styles.statusPopupOptionsContainer}>\n {statuses.map(status => {\n return (\n <TouchableOpacity key={status.text} onPress={() => onSelect(status.text)}>\n <View style={[styles.jobStatusContainer, { backgroundColor: status.color }]}>\n <Text style={styles.jobStatusText}>{status.text}</Text>\n </View>\n </TouchableOpacity>\n );\n })}\n </View>\n </Components.MiddlePopup>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n statusPopup: {\n width: 160,\n padding: 16,\n borderRadius: 12,\n },\n statusPopupTitle: {\n fontFamily: 'sf-bold',\n color: Colours.TEXT_DARK,\n fontSize: 18,\n marginBottom: 16,\n },\n statusPopupOptionsContainer: {\n flex: 1,\n justifyContent: 'space-between',\n },\n jobStatusContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 105,\n height: 30,\n paddingHorizontal: 8,\n borderRadius: 4,\n },\n jobStatusText: {\n color: '#fff',\n textAlign: 'center',\n fontFamily: 'sf-semibold',\n fontSize: 13,\n flex: 1,\n },\n});\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: Colours.getMainBrandingColourFromState(state),\n statusTypes: state[values.reducerKey].jobstatuses,\n };\n};\n\nexport default connect(mapStateToProps, {})(StatusSelectorPopup);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACvE,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,mBAAmB,QAAQ,WAAW;AAC/C,SAASC,UAAU,EAAEC,OAAO,QAAQ,gBAAgB;AACpD,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,MAAMC,mBAAmB,SAASV,aAAa,CAAC;EAC9CW,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEC,KAAK;MAAEC,UAAU;MAAEC,OAAO;MAAEC,OAAO;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,KAAK;IACpE,IAAIC,QAAQ,GAAGZ,mBAAmB,CAAC,IAAI,CAACW,KAAK,CAAC;IAC9C,IAAIJ,UAAU,EACZK,QAAQ,GAAG,CACT;MACEC,IAAI,EAAEL,OAAO,IAAI,UAAU;MAC3BM,KAAK,EAAE,IAAI,CAACH,KAAK,CAACI;IACpB,CAAC,EACD,GAAGH,QAAQ,CACZ;IAEH,oBACEnB,KAAA,CAAAuB,aAAA,CAACf,UAAU,CAACgB,WAAW;MAACC,KAAK,EAAE,CAACC,MAAM,CAACC,WAAW,EAAE;QAAEC,MAAM,EAAET,QAAQ,CAACU,MAAM,GAAG,EAAE,GAAG;MAAG,CAAC,CAAE;MAACb,OAAO,EAAEA;IAAQ,gBAC3GhB,KAAA,CAAAuB,aAAA,CAAClB,IAAI;MAACoB,KAAK,EAAEC,MAAM,CAACI;IAAiB,GAAEjB,KAAK,IAAI,eAAsB,CAAC,eACvEb,KAAA,CAAA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AE,QAAQ;IACnBT,UAAU,EAAE,aAAa;IACzBE,QAAQ,EAAE,EAAE;IACZE,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,MAAMM,eAAe,GAAGC,KAAK,IAAI;EAC/B,OAAO;IACLhC,kBAAkB,EAAEb,OAAO,CAAC8C,8BAA8B,CAACD,KAAK,CAAC;IACjEE,WAAW,EAAEF,KAAK,CAAC5C,MAAM,CAAC+C,UAAU,CAAC,CAACC;EACxC,CAAC;AACH,CAAC;AAED,eAAepD,OAAO,CAAC+C,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC1C,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import MaintenanceList from
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import MaintenanceList from './MaintenanceList';
|
|
3
3
|
class WidgetLarge extends PureComponent {
|
|
4
4
|
render() {
|
|
5
5
|
return /*#__PURE__*/React.createElement(MaintenanceList, this.props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","MaintenanceList","WidgetLarge","render","createElement","props"],"sources":["WidgetLarge.js"],"sourcesContent":["import React, { PureComponent } from
|
|
1
|
+
{"version":3,"names":["React","PureComponent","MaintenanceList","WidgetLarge","render","createElement","props"],"sources":["WidgetLarge.js"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport MaintenanceList from './MaintenanceList';\n\nclass WidgetLarge extends PureComponent {\n render() {\n return <MaintenanceList {...this.props} />;\n }\n}\n\nexport default WidgetLarge;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,OAAOC,eAAe,MAAM,mBAAmB;AAE/C,MAAMC,WAAW,SAASF,aAAa,CAAC;EACtCG,MAAMA,CAAA,EAAG;IACP,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,eAAe,EAAK,IAAI,CAACI,KAAQ,CAAC;EAC5C;AACF;AAEA,eAAeH,WAAW","ignoreList":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
import React, { Component } from
|
|
5
|
-
import { Text, View, ScrollView, StyleSheet } from
|
|
6
|
-
import { connect } from
|
|
7
|
-
import _ from
|
|
8
|
-
import { maintenanceActions } from
|
|
9
|
-
import { jobsLoaded, jobStatusesUpdate, jobHideSeenUpdate } from
|
|
10
|
-
import MaintenanceWidgetItem from
|
|
11
|
-
import { Services } from
|
|
12
|
-
import { Colours, Components } from
|
|
13
|
-
import { values } from
|
|
4
|
+
import React, { Component } from 'react';
|
|
5
|
+
import { Text, View, ScrollView, StyleSheet } from 'react-native';
|
|
6
|
+
import { connect } from 'react-redux';
|
|
7
|
+
import _ from 'lodash';
|
|
8
|
+
import { maintenanceActions } from '../apis';
|
|
9
|
+
import { jobsLoaded, jobStatusesUpdate, jobHideSeenUpdate } from '../actions';
|
|
10
|
+
import MaintenanceWidgetItem from './MaintenanceWidgetItem';
|
|
11
|
+
import { Services } from '../feature.config';
|
|
12
|
+
import { Colours, Components } from '../core.config';
|
|
13
|
+
import { values } from '../values.config';
|
|
14
14
|
const MAX_ITEMS = 10;
|
|
15
15
|
class WidgetSmall extends Component {
|
|
16
16
|
constructor(props) {
|
|
@@ -28,7 +28,7 @@ class WidgetSmall extends Component {
|
|
|
28
28
|
userCategory
|
|
29
29
|
} = this.props;
|
|
30
30
|
if (options && !_.isEmpty(options.EmptyText)) return options.EmptyText;
|
|
31
|
-
return userCategory ===
|
|
31
|
+
return userCategory === 'staff' ? values.emptyRequestsStaff : values.emptyRequestsUser;
|
|
32
32
|
});
|
|
33
33
|
_defineProperty(this, "refresh", () => {
|
|
34
34
|
this.onLoadingChanged(true, async () => {
|
|
@@ -37,7 +37,7 @@ class WidgetSmall extends Component {
|
|
|
37
37
|
// console.log('WidgetSmall - refresh', res.data);
|
|
38
38
|
this.props.jobsLoaded(res);
|
|
39
39
|
} catch (error) {
|
|
40
|
-
console.log(
|
|
40
|
+
console.log('refresh error', error);
|
|
41
41
|
} finally {
|
|
42
42
|
this.onLoadingChanged(false);
|
|
43
43
|
}
|
|
@@ -120,14 +120,14 @@ class WidgetSmall extends Component {
|
|
|
120
120
|
paddingTop: 6
|
|
121
121
|
},
|
|
122
122
|
textStyle: {
|
|
123
|
-
color:
|
|
123
|
+
color: '#fff'
|
|
124
124
|
}
|
|
125
125
|
}, "View All"))), this.renderContent());
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
const styles = StyleSheet.create({
|
|
129
129
|
sectionContainer: {
|
|
130
|
-
backgroundColor:
|
|
130
|
+
backgroundColor: '#fff',
|
|
131
131
|
paddingTop: 16
|
|
132
132
|
},
|
|
133
133
|
sectionPadding: {
|
|
@@ -139,12 +139,12 @@ const styles = StyleSheet.create({
|
|
|
139
139
|
},
|
|
140
140
|
sectionHeading: {
|
|
141
141
|
marginBottom: 4,
|
|
142
|
-
flexDirection:
|
|
143
|
-
alignContent:
|
|
144
|
-
justifyContent:
|
|
142
|
+
flexDirection: 'row',
|
|
143
|
+
alignContent: 'flex-start',
|
|
144
|
+
justifyContent: 'space-between'
|
|
145
145
|
},
|
|
146
146
|
sectionTitle: {
|
|
147
|
-
fontFamily:
|
|
147
|
+
fontFamily: 'sf-bold',
|
|
148
148
|
fontSize: 24,
|
|
149
149
|
color: Colours.TEXT_DARKEST
|
|
150
150
|
}
|
|
@@ -158,7 +158,7 @@ const mapStateToProps = state => {
|
|
|
158
158
|
const jobs = state[values.reducerKey];
|
|
159
159
|
return {
|
|
160
160
|
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
161
|
-
jobs: _.orderBy(jobs.jobs, [
|
|
161
|
+
jobs: _.orderBy(jobs.jobs, ['createdUnix'], ['desc']),
|
|
162
162
|
site: user.site,
|
|
163
163
|
userCategory: user.category,
|
|
164
164
|
dataUpdated: notifications.dataUpdated[values.updateKey],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","Text","View","ScrollView","StyleSheet","connect","_","maintenanceActions","jobsLoaded","jobStatusesUpdate","jobHideSeenUpdate","MaintenanceWidgetItem","Services","Colours","Components","values","MAX_ITEMS","WidgetSmall","constructor","props","_defineProperty","options","isEmpty","Title","strings","featureKey","textFeatureTitle","userCategory","EmptyText","emptyRequestsStaff","emptyRequestsUser","onLoadingChanged","res","getJobsRecursive","site","error","console","log","loading","callback","setState","state","navigation","navigate","screenMaintenance","componentDidMount","refresh","componentDidUpdate","prevProps","dataUpdated","renderContent","jobs","createElement","style","styles","loadingPadding","LoadingStateWidget","height","EmptyStateWidget","title","getEmptyStateText","horizontal","contentContainerStyle","paddingLeft","paddingRight","showsHorizontalScrollIndicator","slice","map","job","key","id","render","colourBrandingMain","sectionContainer","sectionPadding","sectionHeading","sectionTitle","getTitle","InlineButton","onPress","onPressAll","color","touchableStyle","paddingTop","textStyle","create","backgroundColor","paddingHorizontal","paddingBottom","marginBottom","flexDirection","alignContent","justifyContent","fontFamily","fontSize","TEXT_DARKEST","mapStateToProps","_state$strings","user","notifications","reducerKey","getMainBrandingColourFromState","orderBy","category","updateKey","config","forwardRef"],"sources":["WidgetSmall.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { Text, View, ScrollView, StyleSheet } from \"react-native\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodash\";\nimport { maintenanceActions } from \"../apis\";\nimport { jobsLoaded, jobStatusesUpdate, jobHideSeenUpdate } from \"../actions\";\nimport MaintenanceWidgetItem from \"./MaintenanceWidgetItem\";\nimport { Services } from \"../feature.config\";\nimport { Colours, Components } from \"../core.config\";\nimport { values } from \"../values.config\";\n\nconst MAX_ITEMS = 10;\n\nclass WidgetSmall extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = { loading: false };\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.props.jobStatusesUpdate(this.props.site);\n\t\tthis.props.jobHideSeenUpdate(this.props.site);\n\t\tthis.refresh();\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (!prevProps.dataUpdated && this.props.dataUpdated) this.refresh();\n\t}\n\n\tgetTitle = () => {\n\t\tconst { options } = this.props;\n\t\tif (options && !_.isEmpty(options.Title)) return options.Title;\n\t\treturn (\n\t\t\tthis.props.strings[`${values.featureKey}_textFeatureTitle`] ||\n\t\t\tvalues.textFeatureTitle\n\t\t);\n\t};\n\n\tgetEmptyStateText = () => {\n\t\tconst { options, userCategory } = this.props;\n\t\tif (options && !_.isEmpty(options.EmptyText)) return options.EmptyText;\n\t\treturn userCategory === \"staff\"\n\t\t\t? values.emptyRequestsStaff\n\t\t\t: values.emptyRequestsUser;\n\t};\n\n\trefresh = () => {\n\t\tthis.onLoadingChanged(true, async () => {\n\t\t\ttry {\n\t\t\t\tconst res = await maintenanceActions.getJobsRecursive(this.props.site);\n\t\t\t\t// console.log('WidgetSmall - refresh', res.data);\n\t\t\t\tthis.props.jobsLoaded(res);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.log(\"refresh error\", error);\n\t\t\t} finally {\n\t\t\t\tthis.onLoadingChanged(false);\n\t\t\t}\n\t\t});\n\t};\n\n\tonLoadingChanged = (loading, callback) => {\n\t\tthis.setState({ loading }, () => {\n\t\t\tif (this.props.onLoadingChanged)\n\t\t\t\tthis.props.onLoadingChanged(this.state.loading);\n\t\t\tif (callback) callback();\n\t\t});\n\t};\n\n\tonPressAll = () => {\n\t\tServices.navigation.navigate(values.screenMaintenance, {\n\t\t\toptions: this.props.options,\n\t\t});\n\t};\n\n\trenderContent() {\n\t\tconst { jobs } = this.props;\n\t\tif (_.isEmpty(jobs)) {\n\t\t\tif (this.state.loading) {\n\t\t\t\treturn (\n\t\t\t\t\t<View style={styles.loadingPadding}>\n\t\t\t\t\t\t<Components.LoadingStateWidget height={180} />\n\t\t\t\t\t</View>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<View style={styles.loadingPadding}>\n\t\t\t\t\t<Components.EmptyStateWidget\n\t\t\t\t\t\ttitle={this.getEmptyStateText()}\n\t\t\t\t\t\theight={180}\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<ScrollView\n\t\t\t\thorizontal\n\t\t\t\tcontentContainerStyle={{ paddingLeft: 6, paddingRight: 8 }}\n\t\t\t\tshowsHorizontalScrollIndicator={false}\n\t\t\t>\n\t\t\t\t{jobs.slice(0, MAX_ITEMS).map((job) => {\n\t\t\t\t\treturn <MaintenanceWidgetItem key={job.id} job={job} />;\n\t\t\t\t})}\n\t\t\t</ScrollView>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst { colourBrandingMain } = this.props;\n\n\t\treturn (\n\t\t\t<View style={styles.sectionContainer}>\n\t\t\t\t<View style={styles.sectionPadding}>\n\t\t\t\t\t<View style={styles.sectionHeading}>\n\t\t\t\t\t\t<Text style={styles.sectionTitle}>{this.getTitle()}</Text>\n\t\t\t\t\t\t<Components.InlineButton\n\t\t\t\t\t\t\tonPress={this.onPressAll}\n\t\t\t\t\t\t\tcolor={colourBrandingMain}\n\t\t\t\t\t\t\ttouchableStyle={{ paddingTop: 6 }}\n\t\t\t\t\t\t\ttextStyle={{ color: \"#fff\" }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t</Components.InlineButton>\n\t\t\t\t\t</View>\n\t\t\t\t</View>\n\t\t\t\t{this.renderContent()}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tsectionContainer: {\n\t\tbackgroundColor: \"#fff\",\n\t\tpaddingTop: 16,\n\t},\n\tsectionPadding: {\n\t\tpaddingHorizontal: 16,\n\t\tpaddingBottom: 6,\n\t},\n\tloadingPadding: {\n\t\tpaddingHorizontal: 16,\n\t},\n\tsectionHeading: {\n\t\tmarginBottom: 4,\n\t\tflexDirection: \"row\",\n\t\talignContent: \"flex-start\",\n\t\tjustifyContent: \"space-between\",\n\t},\n\tsectionTitle: {\n\t\tfontFamily: \"sf-bold\",\n\t\tfontSize: 24,\n\t\tcolor: Colours.TEXT_DARKEST,\n\t},\n});\n\nconst mapStateToProps = (state) => {\n\tconst { user, notifications } = state;\n\tconst jobs = state[values.reducerKey];\n\treturn {\n\t\tcolourBrandingMain: Colours.getMainBrandingColourFromState(state),\n\t\tjobs: _.orderBy(jobs.jobs, [\"createdUnix\"], [\"desc\"]),\n\t\tsite: user.site,\n\t\tuserCategory: user.category,\n\t\tdataUpdated: notifications.dataUpdated[values.updateKey],\n\t\tstrings: state.strings?.config || {},\n\t};\n};\n\nexport default connect(\n\tmapStateToProps,\n\t{ jobsLoaded, jobStatusesUpdate, jobHideSeenUpdate },\n\tnull,\n\t{ forwardRef: true },\n)(WidgetSmall);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AACjE,SAASC,OAAO,QAAQ,aAAa;AACrC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,kBAAkB,QAAQ,SAAS;AAC5C,SAASC,UAAU,EAAEC,iBAAiB,EAAEC,iBAAiB,QAAQ,YAAY;AAC7E,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,OAAO,EAAEC,UAAU,QAAQ,gBAAgB;AACpD,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I,EAAEgE,IAAI,CAAChE,IAAI;IACfP,YAAY,EAAEuE,IAAI,CAACK,QAAQ;IAC3BtD,WAAW,EAAEkD,aAAa,CAAClD,WAAW,CAAClC,MAAM,CAACyF,SAAS,CAAC;IACxDhF,OAAO,EAAE,EAAAyE,cAAA,GAAAxD,KAAK,CAACjB,OAAO,cAAAyE,cAAA,uBAAbA,cAAA,CAAeQ,MAAM,KAAI,CAAC;EACpC,CAAC;AACF,CAAC;AAED,eAAepG,OAAO,CACrB2F,eAAe,EACf;EAAExF,UAAU;EAAEC,iBAAiB;EAAEC;AAAkB,CAAC,EACpD,IAAI,EACJ;EAAEgG,UAAU,EAAE;AAAK,CACpB,CAAC,CAACzF,WAAW,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Component","Text","View","ScrollView","StyleSheet","connect","_","maintenanceActions","jobsLoaded","jobStatusesUpdate","jobHideSeenUpdate","MaintenanceWidgetItem","Services","Colours","Components","values","MAX_ITEMS","WidgetSmall","constructor","props","_defineProperty","options","isEmpty","Title","strings","featureKey","textFeatureTitle","userCategory","EmptyText","emptyRequestsStaff","emptyRequestsUser","onLoadingChanged","res","getJobsRecursive","site","error","console","log","loading","callback","setState","state","navigation","navigate","screenMaintenance","componentDidMount","refresh","componentDidUpdate","prevProps","dataUpdated","renderContent","jobs","createElement","style","styles","loadingPadding","LoadingStateWidget","height","EmptyStateWidget","title","getEmptyStateText","horizontal","contentContainerStyle","paddingLeft","paddingRight","showsHorizontalScrollIndicator","slice","map","job","key","id","render","colourBrandingMain","sectionContainer","sectionPadding","sectionHeading","sectionTitle","getTitle","InlineButton","onPress","onPressAll","color","touchableStyle","paddingTop","textStyle","create","backgroundColor","paddingHorizontal","paddingBottom","marginBottom","flexDirection","alignContent","justifyContent","fontFamily","fontSize","TEXT_DARKEST","mapStateToProps","_state$strings","user","notifications","reducerKey","getMainBrandingColourFromState","orderBy","category","updateKey","config","forwardRef"],"sources":["WidgetSmall.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { Text, View, ScrollView, StyleSheet } from 'react-native';\nimport { connect } from 'react-redux';\nimport _ from 'lodash';\nimport { maintenanceActions } from '../apis';\nimport { jobsLoaded, jobStatusesUpdate, jobHideSeenUpdate } from '../actions';\nimport MaintenanceWidgetItem from './MaintenanceWidgetItem';\nimport { Services } from '../feature.config';\nimport { Colours, Components } from '../core.config';\nimport { values } from '../values.config';\n\nconst MAX_ITEMS = 10;\n\nclass WidgetSmall extends Component {\n constructor(props) {\n super(props);\n this.state = { loading: false };\n }\n\n componentDidMount() {\n this.props.jobStatusesUpdate(this.props.site);\n this.props.jobHideSeenUpdate(this.props.site);\n this.refresh();\n }\n\n componentDidUpdate(prevProps) {\n if (!prevProps.dataUpdated && this.props.dataUpdated) this.refresh();\n }\n\n getTitle = () => {\n const { options } = this.props;\n if (options && !_.isEmpty(options.Title)) return options.Title;\n return this.props.strings[`${values.featureKey}_textFeatureTitle`] || values.textFeatureTitle;\n };\n\n getEmptyStateText = () => {\n const { options, userCategory } = this.props;\n if (options && !_.isEmpty(options.EmptyText)) return options.EmptyText;\n return userCategory === 'staff' ? values.emptyRequestsStaff : values.emptyRequestsUser;\n };\n\n refresh = () => {\n this.onLoadingChanged(true, async () => {\n try {\n const res = await maintenanceActions.getJobsRecursive(this.props.site);\n // console.log('WidgetSmall - refresh', res.data);\n this.props.jobsLoaded(res);\n } catch (error) {\n console.log('refresh error', error);\n } finally {\n this.onLoadingChanged(false);\n }\n });\n };\n\n onLoadingChanged = (loading, callback) => {\n this.setState({ loading }, () => {\n if (this.props.onLoadingChanged) this.props.onLoadingChanged(this.state.loading);\n if (callback) callback();\n });\n };\n\n onPressAll = () => {\n Services.navigation.navigate(values.screenMaintenance, { options: this.props.options });\n };\n\n renderContent() {\n const { jobs } = this.props;\n if (_.isEmpty(jobs)) {\n if (this.state.loading) {\n return (\n <View style={styles.loadingPadding}>\n <Components.LoadingStateWidget height={180} />\n </View>\n );\n }\n return (\n <View style={styles.loadingPadding}>\n <Components.EmptyStateWidget title={this.getEmptyStateText()} height={180} />\n </View>\n );\n }\n return (\n <ScrollView horizontal contentContainerStyle={{ paddingLeft: 6, paddingRight: 8 }} showsHorizontalScrollIndicator={false}>\n {jobs.slice(0, MAX_ITEMS).map(job => {\n return <MaintenanceWidgetItem key={job.id} job={job} />;\n })}\n </ScrollView>\n );\n }\n\n render() {\n const { colourBrandingMain } = this.props;\n\n return (\n <View style={styles.sectionContainer}>\n <View style={styles.sectionPadding}>\n <View style={styles.sectionHeading}>\n <Text style={styles.sectionTitle}>{this.getTitle()}</Text>\n <Components.InlineButton\n onPress={this.onPressAll}\n color={colourBrandingMain}\n touchableStyle={{ paddingTop: 6 }}\n textStyle={{ color: '#fff' }}\n >\n View All\n </Components.InlineButton>\n </View>\n </View>\n {this.renderContent()}\n </View>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n sectionContainer: {\n backgroundColor: '#fff',\n paddingTop: 16,\n },\n sectionPadding: {\n paddingHorizontal: 16,\n paddingBottom: 6,\n },\n loadingPadding: {\n paddingHorizontal: 16,\n },\n sectionHeading: {\n marginBottom: 4,\n flexDirection: 'row',\n alignContent: 'flex-start',\n justifyContent: 'space-between',\n },\n sectionTitle: {\n fontFamily: 'sf-bold',\n fontSize: 24,\n color: Colours.TEXT_DARKEST,\n },\n});\n\nconst mapStateToProps = state => {\n const { user, notifications } = state;\n const jobs = state[values.reducerKey];\n return {\n colourBrandingMain: Colours.getMainBrandingColourFromState(state),\n jobs: _.orderBy(jobs.jobs, ['createdUnix'], ['desc']),\n site: user.site,\n userCategory: user.category,\n dataUpdated: notifications.dataUpdated[values.updateKey],\n strings: state.strings?.config || {},\n };\n};\n\nexport default connect(mapStateToProps, { jobsLoaded, jobStatusesUpdate, jobHideSeenUpdate }, null, { forwardRef: true })(WidgetSmall);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UA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I;IAAEC;EAAc,CAAC,GAAG1D,KAAK;EACrC,MAAMU,IAAI,GAAGV,KAAK,CAAC1B,MAAM,CAACqF,UAAU,CAAC;EACrC,OAAO;IACL5B,kBAAkB,EAAE3D,OAAO,CAACwF,8BAA8B,CAAC5D,KAAK,CAAC;IACjEU,IAAI,EAAE7C,CAAC,CAACgG,OAAO,CAACnD,IAAI,CAACA,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACrDjB,IAAI,EAAEgE,IAAI,CAAChE,IAAI;IACfP,YAAY,EAAEuE,IAAI,CAACK,QAAQ;IAC3BtD,WAAW,EAAEkD,aAAa,CAAClD,WAAW,CAAClC,MAAM,CAACyF,SAAS,CAAC;IACxDhF,OAAO,EAAE,EAAAyE,cAAA,GAAAxD,KAAK,CAACjB,OAAO,cAAAyE,cAAA,uBAAbA,cAAA,CAAeQ,MAAM,KAAI,CAAC;EACrC,CAAC;AACH,CAAC;AAED,eAAepG,OAAO,CAAC2F,eAAe,EAAE;EAAExF,UAAU;EAAEC,iBAAiB;EAAEC;AAAkB,CAAC,EAAE,IAAI,EAAE;EAAEgG,UAAU,EAAE;AAAK,CAAC,CAAC,CAACzF,WAAW,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PlussCore","Apis","Fonts","Actions","ActionTypes","Config","Components","Styles","Session","Helper","Constants","Colours"],"sources":["core.config.js"],"sourcesContent":["// import * as PlussCore from '../../pluss-core/src';\nimport * as PlussCore from
|
|
1
|
+
{"version":3,"names":["PlussCore","Apis","Fonts","Actions","ActionTypes","Config","Components","Styles","Session","Helper","Constants","Colours"],"sources":["core.config.js"],"sourcesContent":["// import * as PlussCore from '../../pluss-core/src';\nimport * as PlussCore from '@plusscommunities/pluss-core-app';\n\nconst { Apis, Fonts, Actions, ActionTypes, Config, Components, Styles, Session, Helper, Constants, Colours } = PlussCore;\nexport { Apis, Fonts, Actions, ActionTypes, Config, Components, Styles, Session, Helper, Constants, Colours };\n"],"mappings":"AAAA;AACA,OAAO,KAAKA,SAAS,MAAM,kCAAkC;AAE7D,MAAM;EAAEC,IAAI;EAAEC,KAAK;EAAEC,OAAO;EAAEC,WAAW;EAAEC,MAAM;EAAEC,UAAU;EAAEC,MAAM;EAAEC,OAAO;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAQ,CAAC,GAAGX,SAAS;AACxH,SAASC,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAEC,WAAW,EAAEC,MAAM,EAAEC,UAAU,EAAEC,MAAM,EAAEC,OAAO,EAAEC,MAAM,EAAEC,SAAS,EAAEC,OAAO","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import * as PlussCore from '../../pluss-core/src';
|
|
2
|
-
import * as PlussCore from
|
|
3
|
-
import { values } from
|
|
2
|
+
import * as PlussCore from '@plusscommunities/pluss-core-app';
|
|
3
|
+
import { values } from './values.config';
|
|
4
4
|
export const Services = {
|
|
5
5
|
navigation: null
|
|
6
6
|
};
|
|
@@ -22,7 +22,7 @@ const FeatureConfig = {
|
|
|
22
22
|
title: values.textAddMenuTitle,
|
|
23
23
|
navigate: values.screenServiceRequest,
|
|
24
24
|
visibleExps: {
|
|
25
|
-
type:
|
|
25
|
+
type: 'feature',
|
|
26
26
|
value: values.featureKey
|
|
27
27
|
}
|
|
28
28
|
},
|
|
@@ -31,13 +31,13 @@ const FeatureConfig = {
|
|
|
31
31
|
title: values.textMoreMenuTitle,
|
|
32
32
|
navigate: values.screenMaintenance,
|
|
33
33
|
visibleExps: {
|
|
34
|
-
type:
|
|
34
|
+
type: 'and',
|
|
35
35
|
exps: [{
|
|
36
|
-
type:
|
|
37
|
-
value:
|
|
36
|
+
type: 'notHidden',
|
|
37
|
+
value: 'maintenanceRequest'
|
|
38
38
|
}, {
|
|
39
|
-
type:
|
|
40
|
-
value:
|
|
39
|
+
type: 'notUserType',
|
|
40
|
+
value: 'KIOSK'
|
|
41
41
|
}]
|
|
42
42
|
}
|
|
43
43
|
} : undefined,
|
|
@@ -49,19 +49,19 @@ const FeatureConfig = {
|
|
|
49
49
|
},
|
|
50
50
|
hideTabBar: [],
|
|
51
51
|
env: {
|
|
52
|
-
baseStage:
|
|
53
|
-
baseAPIUrl:
|
|
52
|
+
baseStage: '',
|
|
53
|
+
baseAPIUrl: '',
|
|
54
54
|
hasGradientHeader: false,
|
|
55
|
-
defaultProfileImage:
|
|
56
|
-
tinyChatDefault:
|
|
57
|
-
baseUploadsUrl:
|
|
55
|
+
defaultProfileImage: '',
|
|
56
|
+
tinyChatDefault: '',
|
|
57
|
+
baseUploadsUrl: '',
|
|
58
58
|
allowMediaDownload: false,
|
|
59
59
|
allowMediaSharing: false,
|
|
60
|
-
awsUploadsBucket:
|
|
61
|
-
awsStorageBucket:
|
|
62
|
-
preferredSite:
|
|
60
|
+
awsUploadsBucket: '',
|
|
61
|
+
awsStorageBucket: '',
|
|
62
|
+
preferredSite: '',
|
|
63
63
|
strings: {},
|
|
64
|
-
newEventDefaults:
|
|
64
|
+
newEventDefaults: '',
|
|
65
65
|
defaultAllowComments: true
|
|
66
66
|
},
|
|
67
67
|
init: (environment, navigation, notificationBell) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PlussCore","values","Services","navigation","BaseComponents","NotificationBell","FeatureConfig","key","featureKey","aliases","title","textFeatureTitle","gridMenu","icon","iconGridMenu","viewBox","gridViewBox","navigate","screenMaintenance","addMenu","order","orderAddMenu","iconAddMenu","textAddMenuTitle","screenServiceRequest","visibleExps","type","value","moreMenu","hasMoreOption","orderMoreMenu","textMoreMenuTitle","exps","undefined","kioskAction","orderKioskAction","iconKioskAction","textKioskActionTitle","hideTabBar","env","baseStage","baseAPIUrl","hasGradientHeader","defaultProfileImage","tinyChatDefault","baseUploadsUrl","allowMediaDownload","allowMediaSharing","awsUploadsBucket","awsStorageBucket","preferredSite","strings","newEventDefaults","defaultAllowComments","init","environment","notificationBell","Config"],"sources":["feature.config.js"],"sourcesContent":["// import * as PlussCore from '../../pluss-core/src';\nimport * as PlussCore from
|
|
1
|
+
{"version":3,"names":["PlussCore","values","Services","navigation","BaseComponents","NotificationBell","FeatureConfig","key","featureKey","aliases","title","textFeatureTitle","gridMenu","icon","iconGridMenu","viewBox","gridViewBox","navigate","screenMaintenance","addMenu","order","orderAddMenu","iconAddMenu","textAddMenuTitle","screenServiceRequest","visibleExps","type","value","moreMenu","hasMoreOption","orderMoreMenu","textMoreMenuTitle","exps","undefined","kioskAction","orderKioskAction","iconKioskAction","textKioskActionTitle","hideTabBar","env","baseStage","baseAPIUrl","hasGradientHeader","defaultProfileImage","tinyChatDefault","baseUploadsUrl","allowMediaDownload","allowMediaSharing","awsUploadsBucket","awsStorageBucket","preferredSite","strings","newEventDefaults","defaultAllowComments","init","environment","notificationBell","Config"],"sources":["feature.config.js"],"sourcesContent":["// import * as PlussCore from '../../pluss-core/src';\nimport * as PlussCore from '@plusscommunities/pluss-core-app';\nimport { values } from './values.config';\n\nexport const Services = {\n navigation: null,\n};\n\nexport const BaseComponents = {\n NotificationBell: null,\n};\n\nconst FeatureConfig = {\n key: values.featureKey,\n aliases: values.aliases,\n title: values.textFeatureTitle,\n gridMenu: {\n icon: values.iconGridMenu,\n viewBox: values.gridViewBox,\n navigate: values.screenMaintenance,\n },\n addMenu: {\n order: values.orderAddMenu,\n icon: values.iconAddMenu,\n title: values.textAddMenuTitle,\n navigate: values.screenServiceRequest,\n visibleExps: { type: 'feature', value: values.featureKey },\n },\n moreMenu: values.hasMoreOption\n ? {\n order: values.orderMoreMenu,\n title: values.textMoreMenuTitle,\n navigate: values.screenMaintenance,\n visibleExps: {\n type: 'and',\n exps: [\n { type: 'notHidden', value: 'maintenanceRequest' },\n { type: 'notUserType', value: 'KIOSK' },\n ],\n },\n }\n : undefined,\n kioskAction: {\n order: values.orderKioskAction,\n icon: values.iconKioskAction,\n title: values.textKioskActionTitle,\n navigate: values.screenServiceRequest,\n },\n hideTabBar: [],\n env: {\n baseStage: '',\n baseAPIUrl: '',\n hasGradientHeader: false,\n defaultProfileImage: '',\n tinyChatDefault: '',\n baseUploadsUrl: '',\n allowMediaDownload: false,\n allowMediaSharing: false,\n awsUploadsBucket: '',\n awsStorageBucket: '',\n preferredSite: '',\n strings: {},\n newEventDefaults: '',\n defaultAllowComments: true,\n },\n init: (environment, navigation, notificationBell) => {\n FeatureConfig.env = environment;\n Services.navigation = navigation;\n BaseComponents.NotificationBell = notificationBell;\n PlussCore.Config.init(environment, navigation);\n },\n};\nexport default FeatureConfig;\n"],"mappings":"AAAA;AACA,OAAO,KAAKA,SAAS,MAAM,kCAAkC;AAC7D,SAASC,MAAM,QAAQ,iBAAiB;AAExC,OAAO,MAAMC,QAAQ,GAAG;EACtBC,UAAU,EAAE;AACd,CAAC;AAED,OAAO,MAAMC,cAAc,GAAG;EAC5BC,gBAAgB,EAAE;AACpB,CAAC;AAED,MAAMC,aAAa,GAAG;EACpBC,GAAG,EAAEN,MAAM,CAACO,UAAU;EACtBC,OAAO,EAAER,MAAM,CAACQ,OAAO;EACvBC,KAAK,EAAET,MAAM,CAACU,gBAAgB;EAC9BC,QAAQ,EAAE;IACRC,IAAI,EAAEZ,MAAM,CAACa,YAAY;IACzBC,OAAO,EAAEd,MAAM,CAACe,WAAW;IAC3BC,QAAQ,EAAEhB,MAAM,CAACiB;EACnB,CAAC;EACDC,OAAO,EAAE;IACPC,KAAK,EAAEnB,MAAM,CAACoB,YAAY;IAC1BR,IAAI,EAAEZ,MAAM,CAACqB,WAAW;IACxBZ,KAAK,EAAET,MAAM,CAACsB,gBAAgB;IAC9BN,QAAQ,EAAEhB,MAAM,CAACuB,oBAAoB;IACrCC,WAAW,EAAE;MAAEC,IAAI,EAAE,SAAS;MAAEC,KAAK,EAAE1B,MAAM,CAACO;IAAW;EAC3D,CAAC;EACDoB,QAAQ,EAAE3B,MAAM,CAAC4B,aAAa,GAC1B;IACET,KAAK,EAAEnB,MAAM,CAAC6B,aAA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a","ignoreList":[]}
|
package/dist/module/helper.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Colours } from
|
|
2
|
-
const STATUS_NOT_ACTIONED =
|
|
3
|
-
const STATUS_IN_PROGRESS =
|
|
4
|
-
const STATUS_COMPLETED =
|
|
1
|
+
import { Colours } from './core.config';
|
|
2
|
+
const STATUS_NOT_ACTIONED = 'Not Actioned';
|
|
3
|
+
const STATUS_IN_PROGRESS = 'In Progress';
|
|
4
|
+
const STATUS_COMPLETED = 'Completed';
|
|
5
5
|
const jobStatusOptions = [{
|
|
6
|
-
text:
|
|
6
|
+
text: 'Open',
|
|
7
7
|
order: 0,
|
|
8
8
|
color: Colours.LINEGREY,
|
|
9
9
|
category: STATUS_NOT_ACTIONED
|
|
10
10
|
}, {
|
|
11
|
-
text:
|
|
11
|
+
text: 'In Progress',
|
|
12
12
|
order: 1,
|
|
13
13
|
color: Colours.COLOUR_TEAL,
|
|
14
14
|
category: STATUS_IN_PROGRESS
|
|
15
15
|
}, {
|
|
16
|
-
text:
|
|
16
|
+
text: 'Completed',
|
|
17
17
|
order: 2,
|
|
18
18
|
color: Colours.COLOUR_GREEN_LIGHT,
|
|
19
19
|
category: STATUS_COMPLETED
|
|
20
20
|
}];
|
|
21
21
|
const jobPriorityOptions = [{
|
|
22
|
-
label:
|
|
22
|
+
label: 'Low',
|
|
23
23
|
color: Colours.COLOUR_GREEN,
|
|
24
24
|
default: true
|
|
25
25
|
}, {
|
|
26
|
-
label:
|
|
26
|
+
label: 'Medium',
|
|
27
27
|
color: Colours.COLOUR_TANGERINE
|
|
28
28
|
}, {
|
|
29
|
-
label:
|
|
29
|
+
label: 'High',
|
|
30
30
|
color: Colours.COLOUR_RED
|
|
31
31
|
}];
|
|
32
32
|
const getJobStatusOptions = props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Colours","STATUS_NOT_ACTIONED","STATUS_IN_PROGRESS","STATUS_COMPLETED","jobStatusOptions","text","order","color","LINEGREY","category","COLOUR_TEAL","COLOUR_GREEN_LIGHT","jobPriorityOptions","label","COLOUR_GREEN","default","COLOUR_TANGERINE","COLOUR_RED","getJobStatusOptions","props","_props$statusTypes","statusTypes","length","getDefaultJobStatuses","filter","s","getIncompleteJobStatuses","getJobStatus","status","statusOptions","statusOption","find","getDefaultJobPriority","p","getJobPriority","priority"],"sources":["helper.js"],"sourcesContent":["import { Colours } from
|
|
1
|
+
{"version":3,"names":["Colours","STATUS_NOT_ACTIONED","STATUS_IN_PROGRESS","STATUS_COMPLETED","jobStatusOptions","text","order","color","LINEGREY","category","COLOUR_TEAL","COLOUR_GREEN_LIGHT","jobPriorityOptions","label","COLOUR_GREEN","default","COLOUR_TANGERINE","COLOUR_RED","getJobStatusOptions","props","_props$statusTypes","statusTypes","length","getDefaultJobStatuses","filter","s","getIncompleteJobStatuses","getJobStatus","status","statusOptions","statusOption","find","getDefaultJobPriority","p","getJobPriority","priority"],"sources":["helper.js"],"sourcesContent":["import { Colours } from './core.config';\n\nconst STATUS_NOT_ACTIONED = 'Not Actioned';\nconst STATUS_IN_PROGRESS = 'In Progress';\nconst STATUS_COMPLETED = 'Completed';\n\nconst jobStatusOptions = [\n {\n text: 'Open',\n order: 0,\n color: Colours.LINEGREY,\n category: STATUS_NOT_ACTIONED,\n },\n {\n text: 'In Progress',\n order: 1,\n color: Colours.COLOUR_TEAL,\n category: STATUS_IN_PROGRESS,\n },\n {\n text: 'Completed',\n order: 2,\n color: Colours.COLOUR_GREEN_LIGHT,\n category: STATUS_COMPLETED,\n },\n];\n\nconst jobPriorityOptions = [\n {\n label: 'Low',\n color: Colours.COLOUR_GREEN,\n default: true,\n },\n {\n label: 'Medium',\n color: Colours.COLOUR_TANGERINE,\n },\n {\n label: 'High',\n color: Colours.COLOUR_RED,\n },\n];\n\nconst getJobStatusOptions = props => (props?.statusTypes?.length ? props?.statusTypes : jobStatusOptions);\n\nconst getDefaultJobStatuses = props => getJobStatusOptions(props).filter(s => s.category === STATUS_NOT_ACTIONED);\n\nconst getIncompleteJobStatuses = props => getJobStatusOptions(props).filter(s => s.category === STATUS_IN_PROGRESS);\n\nconst getJobStatus = (status, props) => {\n const statusOptions = getJobStatusOptions(props);\n // console.log('getJobStatus', JSON.stringify({ status, statusOptions }, null, 2));\n let statusOption = null;\n if (status) statusOption = statusOptions.find(s => s.text === status);\n return statusOption || getDefaultJobStatuses(props)[0];\n};\n\nconst getDefaultJobPriority = () => jobPriorityOptions.find(p => p.default);\n\nconst getJobPriority = priority => jobPriorityOptions.find(p => p.label === priority) || getDefaultJobPriority();\n\nexport {\n jobStatusOptions,\n jobPriorityOptions,\n getJobStatusOptions,\n getDefaultJobStatuses,\n getIncompleteJobStatuses,\n getJobStatus,\n getJobPriority,\n getDefaultJobPriority,\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe;AAEvC,MAAMC,mBAAmB,GAAG,cAAc;AAC1C,MAAMC,kBAAkB,GAAG,aAAa;AACxC,MAAMC,gBAAgB,GAAG,WAAW;AAEpC,MAAMC,gBAAgB,GAAG,CACvB;EACEC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACQ,QAAQ;EACvBC,QAAQ,EAAER;AACZ,CAAC,EACD;EACEI,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACU,WAAW;EAC1BD,QAAQ,EAAEP;AACZ,CAAC,EACD;EACEG,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACW,kBAAkB;EACjCF,QAAQ,EAAEN;AACZ,CAAC,CACF;AAED,MAAMS,kBAAkB,GAAG,CACzB;EACEC,KAAK,EAAE,KAAK;EACZN,KAAK,EAAEP,OAAO,CAACc,YAAY;EAC3BC,OAAO,EAAE;AACX,CAAC,EACD;EACEF,KAAK,EAAE,QAAQ;EACfN,KAAK,EAAEP,OAAO,CAACg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AAC,CAAC;AAEhH,SACE5B,gBAAgB,EAChBQ,kBAAkB,EAClBM,mBAAmB,EACnBK,qBAAqB,EACrBG,wBAAwB,EACxBC,YAAY,EACZO,cAAc,EACdF,qBAAqB","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import MaintenancePage from
|
|
2
|
-
import RequestDetail from
|
|
3
|
-
import ServiceRequest from
|
|
4
|
-
import JobTypePicker from
|
|
5
|
-
import RequestNotes from
|
|
6
|
-
import MaintenanceUserPicker from
|
|
7
|
-
import JobsReducer from
|
|
8
|
-
import { values } from
|
|
1
|
+
import MaintenancePage from './screens/MaintenancePage';
|
|
2
|
+
import RequestDetail from './screens/RequestDetail';
|
|
3
|
+
import ServiceRequest from './screens/ServiceRequest';
|
|
4
|
+
import JobTypePicker from './screens/JobTypePicker';
|
|
5
|
+
import RequestNotes from './screens/RequestNotes';
|
|
6
|
+
import MaintenanceUserPicker from './screens/MaintenanceUserPicker';
|
|
7
|
+
import JobsReducer from './reducers/JobsReducer';
|
|
8
|
+
import { values } from './values.config';
|
|
9
9
|
export const Reducers = (() => {
|
|
10
10
|
const reducers = {};
|
|
11
11
|
reducers[values.reducerKey] = JobsReducer;
|
|
@@ -21,7 +21,7 @@ export const Screens = (() => {
|
|
|
21
21
|
screens[values.screenUserPicker] = MaintenanceUserPicker;
|
|
22
22
|
return screens;
|
|
23
23
|
})();
|
|
24
|
-
export { default as Config } from
|
|
25
|
-
export { default as WidgetSmall } from
|
|
26
|
-
export { default as WidgetLarge } from
|
|
24
|
+
export { default as Config } from './feature.config';
|
|
25
|
+
export { default as WidgetSmall } from './components/WidgetSmall';
|
|
26
|
+
export { default as WidgetLarge } from './components/WidgetLarge';
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MaintenancePage","RequestDetail","ServiceRequest","JobTypePicker","RequestNotes","MaintenanceUserPicker","JobsReducer","values","Reducers","reducers","reducerKey","Screens","screens","screenMaintenance","screenRequestDetail","screenServiceRequest","screenJobTypePicker","screenRequestNotes","screenUserPicker","default","Config","WidgetSmall","WidgetLarge"],"sources":["index.js"],"sourcesContent":["import MaintenancePage from
|
|
1
|
+
{"version":3,"names":["MaintenancePage","RequestDetail","ServiceRequest","JobTypePicker","RequestNotes","MaintenanceUserPicker","JobsReducer","values","Reducers","reducers","reducerKey","Screens","screens","screenMaintenance","screenRequestDetail","screenServiceRequest","screenJobTypePicker","screenRequestNotes","screenUserPicker","default","Config","WidgetSmall","WidgetLarge"],"sources":["index.js"],"sourcesContent":["import MaintenancePage from './screens/MaintenancePage';\nimport RequestDetail from './screens/RequestDetail';\nimport ServiceRequest from './screens/ServiceRequest';\nimport JobTypePicker from './screens/JobTypePicker';\nimport RequestNotes from './screens/RequestNotes';\nimport MaintenanceUserPicker from './screens/MaintenanceUserPicker';\nimport JobsReducer from './reducers/JobsReducer';\nimport { values } from './values.config';\n\nexport const Reducers = (() => {\n const reducers = {};\n reducers[values.reducerKey] = JobsReducer;\n return reducers;\n})();\nexport const Screens = (() => {\n const screens = {};\n screens[values.screenMaintenance] = MaintenancePage;\n screens[values.screenRequestDetail] = RequestDetail;\n screens[values.screenServiceRequest] = ServiceRequest;\n screens[values.screenJobTypePicker] = JobTypePicker;\n screens[values.screenRequestNotes] = RequestNotes;\n screens[values.screenUserPicker] = MaintenanceUserPicker;\n return screens;\n})();\nexport { default as Config } from './feature.config';\nexport { default as WidgetSmall } from './components/WidgetSmall';\nexport { default as WidgetLarge } from './components/WidgetLarge';\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2BAA2B;AACvD,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,cAAc,MAAM,0BAA0B;AACrD,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,YAAY,MAAM,wBAAwB;AACjD,OAAOC,qBAAqB,MAAM,iCAAiC;AACnE,OAAOC,WAAW,MAAM,wBAAwB;AAChD,SAASC,MAAM,QAAQ,iBAAiB;AAExC,OAAO,MAAMC,QAAQ,GAAG,CAAC,MAAM;EAC7B,MAAMC,QAAQ,GAAG,CAAC,CAAC;EACnBA,QAAQ,CAACF,MAAM,CAACG,UAAU,CAAC,GAAGJ,WAAW;EACzC,OAAOG,QAAQ;AACjB,CAAC,EAAE,CAAC;AACJ,OAAO,MAAME,OAAO,GAAG,CAAC,MAAM;EAC5B,MAAMC,OAAO,GAAG,CAAC,CAAC;EAClBA,OAAO,CAACL,MAAM,CAACM,iBAAiB,CAAC,GAAGb,eAAe;EACnDY,OAAO,CAACL,MAAM,CAACO,mBAAmB,CAAC,GAAGb,aAAa;EACnDW,OAAO,CAACL,MAAM,CAACQ,oBAAoB,CAAC,GAAGb,cAAc;EACrDU,OAAO,CAACL,MAAM,CAACS,mBAAmB,CAAC,GAAGb,aAAa;EACnDS,OAAO,CAACL,MAAM,CAACU,kBAAkB,CAAC,GAAGb,YAAY;EACjDQ,OAAO,CAACL,MAAM,CAACW,gBAAgB,CAAC,GAAGb,qBAAqB;EACxD,OAAOO,OAAO;AAChB,CAAC,EAAE,CAAC;AACJ,SAASO,OAAO,IAAIC,MAAM,QAAQ,kBAAkB;AACpD,SAASD,OAAO,IAAIE,WAAW,QAAQ,0BAA0B;AACjE,SAASF,OAAO,IAAIG,WAAW,QAAQ,0BAA0B","ignoreList":[]}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
|
-
import _ from
|
|
3
|
-
import { REHYDRATE } from
|
|
4
|
-
import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED, JOBS_STATUSES_LOADED, JOBS_HIDE_SEEN, JOB_FILTER_LOADED } from
|
|
5
|
-
import { ActionTypes } from
|
|
6
|
-
import { values } from
|
|
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';
|
|
7
7
|
const REDUCER_KEY = values.reducerKey;
|
|
8
8
|
const INITIAL_STATE = {
|
|
9
9
|
jobs: [],
|
|
10
10
|
jobstatuses: [],
|
|
11
11
|
hideSeen: false,
|
|
12
12
|
jobfilters: {
|
|
13
|
-
status:
|
|
14
|
-
statusText:
|
|
15
|
-
priority:
|
|
16
|
-
priorityText:
|
|
17
|
-
type:
|
|
18
|
-
assignee:
|
|
19
|
-
assigneeName:
|
|
13
|
+
status: '',
|
|
14
|
+
statusText: '',
|
|
15
|
+
priority: '',
|
|
16
|
+
priorityText: '',
|
|
17
|
+
type: '',
|
|
18
|
+
assignee: '',
|
|
19
|
+
assigneeName: ''
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
export default (state = INITIAL_STATE, action) => {
|
|
@@ -62,7 +62,7 @@ export default (state = INITIAL_STATE, action) => {
|
|
|
62
62
|
case JOBS_STATUSES_LOADED:
|
|
63
63
|
jobstatuses = _.orderBy(_.unionWith(action.payload, state.jobstatuses, (v1, v2) => {
|
|
64
64
|
return v1 != null && v2 != null && v1.text === v2.text;
|
|
65
|
-
}),
|
|
65
|
+
}), 'order', 'asc');
|
|
66
66
|
return {
|
|
67
67
|
...state,
|
|
68
68
|
jobstatuses
|