@plusscommunities/pluss-maintenance-app 6.0.19 → 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 +146 -146
- 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 +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\trender() {\n\t\tconst { title, includeAll, allText, onClose, onSelect } = this.props;\n\t\tlet priorities = jobPriorityOptions;\n\t\tif (includeAll)\n\t\t\tpriorities = [\n\t\t\t\t{\n\t\t\t\t\tlabel: allText || \"Show All\",\n\t\t\t\t\tcolor: this.props.colourBrandingMain,\n\t\t\t\t},\n\t\t\t\t...priorities,\n\t\t\t];\n\n\t\treturn (\n\t\t\t<Components.MiddlePopup\n\t\t\t\tstyle={[styles.statusPopup, { height: priorities.length * 50 + 40 }]}\n\t\t\t\tonClose={onClose}\n\t\t\t>\n\t\t\t\t<Text style={styles.statusPopupTitle}>\n\t\t\t\t\t{title || \"Select Priority\"}\n\t\t\t\t</Text>\n\t\t\t\t<View style={styles.statusPopupOptionsContainer}>\n\t\t\t\t\t{priorities.map((priority) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tkey={priority.label}\n\t\t\t\t\t\t\t\tonPress={() => onSelect(priority.label)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\tstyles.jobStatusContainer,\n\t\t\t\t\t\t\t\t\t\t{ backgroundColor: priority.color },\n\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Text style={styles.jobStatusText}>{priority.label}</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</View>\n\t\t\t</Components.MiddlePopup>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tstatusPopup: {\n\t\twidth: 160,\n\t\tpadding: 16,\n\t\tborderRadius: 12,\n\t},\n\tstatusPopupTitle: {\n\t\tfontFamily: \"sf-bold\",\n\t\tcolor: Colours.TEXT_DARK,\n\t\tfontSize: 18,\n\t\tmarginBottom: 16,\n\t},\n\tstatusPopupOptionsContainer: {\n\t\tflex: 1,\n\t\tjustifyContent: \"space-between\",\n\t},\n\tjobStatusContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"space-between\",\n\t\twidth: 105,\n\t\theight: 30,\n\t\tpaddingHorizontal: 8,\n\t\tborderRadius: 4,\n\t},\n\tjobStatusText: {\n\t\tcolor: \"#fff\",\n\t\ttextAlign: \"center\",\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 13,\n\t\tflex: 1,\n\t},\n});\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: Colours.getMainBrandingColourFromState(state),\n\t};\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,QAAQ,cAAc;AACvE,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,kBAAkB,QAAQ,WAAW;AAC9C,SAASC,UAAU,EAAEC,OAAO,QAAQ,gBAAgB;AAEpD,MAAMC,qBAAqB,SAAST,aAAa,CAAC;EACjDU,MAAMA,CAAA,EAAG;IACR,MAAM;MAAEC,KAAK;MAAEC,UAAU;MAAEC,OAAO;MAAEC,OAAO;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,KAAK;IACpE,IAAIC,UAAU,GAAGX,kBAAkB;IACnC,IAAIM,UAAU,EACbK,UAAU,GAAG,CACZ;MACCC,KAAK,EAAEL,OAAO,IAAI,UAAU;MAC5BM,KAAK,EAAE,IAAI,CAACH,KAAK,CAACI;IACnB,CAAC,EACD,GAAGH,UAAU,CACb;IAEF,oBACClB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E;IAC5BgB,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EACjB,CAAC;EACDZ,kBAAkB,EAAE;IACnBa,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBF,cAAc,EAAE,eAAe;IAC/BR,KAAK,EAAE,GAAG;IACVZ,MAAM,EAAE,EAAE;IACVuB,iBAAiB,EAAE,CAAC;IACpBT,YAAY,EAAE;EACf,CAAC;EACDJ,aAAa,EAAE;IACdjB,KAAK,EAAE,MAAM;IACb+B,SAAS,EAAE,QAAQ;IACnBT,UAAU,EAAE,aAAa;IACzBE,QAAQ,EAAE,EAAE;IACZE,IAAI,EAAE;EACP;AACD,CAAC,CAAC;AAEF,MAAMM,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACNhC,kBAAkB,EAAEZ,OAAO,CAAC6C,8BAA8B,CAACD,KAAK;EACjE,CAAC;AACF,CAAC;AAED,eAAe/C,OAAO,CAAC8C,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC1C,qBAAqB,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
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\trender() {\n\t\tconst { title, includeAll, allText, onClose, onSelect } = this.props;\n\t\tlet statuses = getJobStatusOptions(this.props);\n\t\tif (includeAll)\n\t\t\tstatuses = [\n\t\t\t\t{\n\t\t\t\t\ttext: allText || \"Show All\",\n\t\t\t\t\tcolor: this.props.colourBrandingMain,\n\t\t\t\t},\n\t\t\t\t...statuses,\n\t\t\t];\n\n\t\treturn (\n\t\t\t<Components.MiddlePopup\n\t\t\t\tstyle={[styles.statusPopup, { height: statuses.length * 50 + 40 }]}\n\t\t\t\tonClose={onClose}\n\t\t\t>\n\t\t\t\t<Text style={styles.statusPopupTitle}>{title || \"Select Status\"}</Text>\n\t\t\t\t<View style={styles.statusPopupOptionsContainer}>\n\t\t\t\t\t{statuses.map((status) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tkey={status.text}\n\t\t\t\t\t\t\t\tonPress={() => onSelect(status.text)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\tstyles.jobStatusContainer,\n\t\t\t\t\t\t\t\t\t\t{ backgroundColor: status.color },\n\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Text style={styles.jobStatusText}>{status.text}</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</View>\n\t\t\t</Components.MiddlePopup>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tstatusPopup: {\n\t\twidth: 160,\n\t\tpadding: 16,\n\t\tborderRadius: 12,\n\t},\n\tstatusPopupTitle: {\n\t\tfontFamily: \"sf-bold\",\n\t\tcolor: Colours.TEXT_DARK,\n\t\tfontSize: 18,\n\t\tmarginBottom: 16,\n\t},\n\tstatusPopupOptionsContainer: {\n\t\tflex: 1,\n\t\tjustifyContent: \"space-between\",\n\t},\n\tjobStatusContainer: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"space-between\",\n\t\twidth: 105,\n\t\theight: 30,\n\t\tpaddingHorizontal: 8,\n\t\tborderRadius: 4,\n\t},\n\tjobStatusText: {\n\t\tcolor: \"#fff\",\n\t\ttextAlign: \"center\",\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 13,\n\t\tflex: 1,\n\t},\n});\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tcolourBrandingMain: Colours.getMainBrandingColourFromState(state),\n\t\tstatusTypes: state[values.reducerKey].jobstatuses,\n\t};\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;EAC/CW,MAAMA,CAAA,EAAG;IACR,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,EACbK,QAAQ,GAAG,CACV;MACCC,IAAI,EAAEL,OAAO,IAAI,UAAU;MAC3BM,KAAK,EAAE,IAAI,CAACH,KAAK,CAACI;IACnB,CAAC,EACD,GAAGH,QAAQ,CACX;IAEF,oBACCnB,KAAA,CAAAuB,aAAA,CAACf,UAAU,CAACgB,WAAW;MACtBC,KAAK,EAAE,CAACC,MAAM,CAACC,WAAW,EAAE;QAAEC,MAAM,EAAET,QAAQ,CAACU,MAAM,GAAG,EAAE,GAAG;MAA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Ae;IAC/BR,KAAK,EAAE,GAAG;IACVZ,MAAM,EAAE,EAAE;IACVuB,iBAAiB,EAAE,CAAC;IACpBT,YAAY,EAAE;EACf,CAAC;EACDJ,aAAa,EAAE;IACdjB,KAAK,EAAE,MAAM;IACb+B,SAAS,EAAE,QAAQ;IACnBT,UAAU,EAAE,aAAa;IACzBE,QAAQ,EAAE,EAAE;IACZE,IAAI,EAAE;EACP;AACD,CAAC,CAAC;AAEF,MAAMM,eAAe,GAAIC,KAAK,IAAK;EAClC,OAAO;IACNhC,kBAAkB,EAAEb,OAAO,CAAC8C,8BAA8B,CAACD,KAAK,CAAC;IACjEE,WAAW,EAAEF,KAAK,CAAC5C,MAAM,CAAC+C,UAAU,CAAC,CAACC;EACvC,CAAC;AACF,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\trender() {\n\t\treturn <MaintenanceList {...this.props} />;\n\t}\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;EACvCG,MAAMA,CAAA,EAAG;IACR,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,eAAe,EAAK,IAAI,CAACI,KAAQ,CAAC;EAC3C;AACD;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 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,IAA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IAAAwD,cAAA;EAC/B,MAAM;IAAEC,IAAI;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
|
+
{"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{ jobs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U,EAAE,SAAS;IACrBC,QAAQ,EAAE,EAAE;IACZb,KAAK,EAAEpE,OAAO,CAACkF;EAChB;AACD,CAAC,CAAC;AAEF,MAAMC,eAAe,GAAIvD,KAAK,IAAK;EAAA,IAAAwD,cAAA;EAClC,MAAM;IAAEC,IAAI;IAAEC;EAAc,CAAC,GAAG1D,KAAK;EACrC,MAAMU,IAAI,GAAGV,KAAK,CAAC1B,MAAM,CAACqF,UAAU,CAAC;EACrC,OAAO;IACN5B,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;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 +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 {\n\tApis,\n\tFonts,\n\tActions,\n\tActionTypes,\n\tConfig,\n\tComponents,\n\tStyles,\n\tSession,\n\tHelper,\n\tConstants,\n\tColours,\n} = PlussCore;\nexport {\n\tApis,\n\tFonts,\n\tActions,\n\tActionTypes,\n\tConfig,\n\tComponents,\n\tStyles,\n\tSession,\n\tHelper,\n\tConstants,\n\tColours,\n};\n"],"mappings":"AAAA;AACA,OAAO,KAAKA,SAAS,MAAM,kCAAkC;AAE7D,MAAM;EACLC,IAAI;EACJC,KAAK;EACLC,OAAO;EACPC,WAAW;EACXC,MAAM;EACNC,UAAU;EACVC,MAAM;EACNC,OAAO;EACPC,MAAM;EACNC,SAAS;EACTC;AACD,CAAC,GAAGX,SAAS;AACb,SACCC,IAAI,EACJC,KAAK,EACLC,OAAO,EACPC,WAAW,EACXC,MAAM,EACNC,UAAU,EACVC,MAAM,EACNC,OAAO,EACPC,MAAM,EACNC,SAAS,EACTC,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\tnavigation: null,\n};\n\nexport const BaseComponents = {\n\tNotificationBell: null,\n};\n\nconst FeatureConfig = {\n\tkey: values.featureKey,\n\taliases: values.aliases,\n\ttitle: values.textFeatureTitle,\n\tgridMenu: {\n\t\ticon: values.iconGridMenu,\n\t\tviewBox: values.gridViewBox,\n\t\tnavigate: values.screenMaintenance,\n\t},\n\taddMenu: {\n\t\torder: values.orderAddMenu,\n\t\ticon: values.iconAddMenu,\n\t\ttitle: values.textAddMenuTitle,\n\t\tnavigate: values.screenServiceRequest,\n\t\tvisibleExps: { type: \"feature\", value: values.featureKey },\n\t},\n\tmoreMenu: values.hasMoreOption\n\t\t? {\n\t\t\t\torder: values.orderMoreMenu,\n\t\t\t\ttitle: values.textMoreMenuTitle,\n\t\t\t\tnavigate: values.screenMaintenance,\n\t\t\t\tvisibleExps: {\n\t\t\t\t\ttype: \"and\",\n\t\t\t\t\texps: [\n\t\t\t\t\t\t{ type: \"notHidden\", value: \"maintenanceRequest\" },\n\t\t\t\t\t\t{ type: \"notUserType\", value: \"KIOSK\" },\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t}\n\t\t: undefined,\n\tkioskAction: {\n\t\torder: values.orderKioskAction,\n\t\ticon: values.iconKioskAction,\n\t\ttitle: values.textKioskActionTitle,\n\t\tnavigate: values.screenServiceRequest,\n\t},\n\thideTabBar: [],\n\tenv: {\n\t\tbaseStage: \"\",\n\t\tbaseAPIUrl: \"\",\n\t\thasGradientHeader: false,\n\t\tdefaultProfileImage: \"\",\n\t\ttinyChatDefault: \"\",\n\t\tbaseUploadsUrl: \"\",\n\t\tallowMediaDownload: false,\n\t\tallowMediaSharing: false,\n\t\tawsUploadsBucket: \"\",\n\t\tawsStorageBucket: \"\",\n\t\tpreferredSite: \"\",\n\t\tstrings: {},\n\t\tnewEventDefaults: \"\",\n\t\tdefaultAllowComments: true,\n\t},\n\tinit: (environment, navigation, notificationBell) => {\n\t\tFeatureConfig.env = environment;\n\t\tServices.navigation = navigation;\n\t\tBaseComponents.NotificationBell = notificationBell;\n\t\tPlussCore.Config.init(environment, navigation);\n\t},\n};\nexport default FeatureConfig;\n"],"mappings":"AAAA;AACA,OAAO,KAAKA,SAAS,MAAM,kCAAkC;AAC7D,SAASC,MAAM,QAAQ,iBAAiB;AAExC,OAAO,MAAMC,QAAQ,GAAG;EACvBC,UAAU,EAAE;AACb,CAAC;AAED,OAAO,MAAMC,cAAc,GAAG;EAC7BC,gBAAgB,EAAE;AACnB,CAAC;AAED,MAAMC,aAAa,GAAG;EACrBC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dC,iBAAiB,EAAE,KAAK;IACxBC,mBAAmB,EAAE,EAAE;IACvBC,eAAe,EAAE,EAAE;IACnBC,cAAc,EAAE,EAAE;IAClBC,kBAAkB,EAAE,KAAK;IACzBC,iBAAiB,EAAE,KAAK;IACxBC,gBAAgB,EAAE,EAAE;IACpBC,gBAAgB,EAAE,EAAE;IACpBC,aAAa,EAAE,EAAE;IACjBC,OAAO,EAAE,CAAC,CAAC;IACXC,gBAAgB,EAAE,EAAE;IACpBC,oBAAoB,EAAE;EACvB,CAAC;EACDC,IAAI,EAAEA,CAACC,WAAW,EAAEpD,UAAU,EAAEqD,gBAAgB,KAAK;IACpDlD,aAAa,CAACiC,GAAG,GAAGgB,WAAW;IAC/BrD,QAAQ,CAACC,UAAU,GAAGA,UAAU;IAChCC,cAAc,CAACC,gBAAgB,GAAGmD,gBAAgB;IAClDxD,SAAS,CAACyD,MAAM,CAACH,IAAI,CAACC,WAAW,EAAEpD,UAAU,CAAC;EAC/C;AACD,CAAC;AACD,eAAeG,aAAa","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\t{\n\t\ttext: \"Open\",\n\t\torder: 0,\n\t\tcolor: Colours.LINEGREY,\n\t\tcategory: STATUS_NOT_ACTIONED,\n\t},\n\t{\n\t\ttext: \"In Progress\",\n\t\torder: 1,\n\t\tcolor: Colours.COLOUR_TEAL,\n\t\tcategory: STATUS_IN_PROGRESS,\n\t},\n\t{\n\t\ttext: \"Completed\",\n\t\torder: 2,\n\t\tcolor: Colours.COLOUR_GREEN_LIGHT,\n\t\tcategory: STATUS_COMPLETED,\n\t},\n];\n\nconst jobPriorityOptions = [\n\t{\n\t\tlabel: \"Low\",\n\t\tcolor: Colours.COLOUR_GREEN,\n\t\tdefault: true,\n\t},\n\t{\n\t\tlabel: \"Medium\",\n\t\tcolor: Colours.COLOUR_TANGERINE,\n\t},\n\t{\n\t\tlabel: \"High\",\n\t\tcolor: Colours.COLOUR_RED,\n\t},\n];\n\nconst getJobStatusOptions = (props) =>\n\tprops?.statusTypes?.length ? props?.statusTypes : jobStatusOptions;\n\nconst getDefaultJobStatuses = (props) =>\n\tgetJobStatusOptions(props).filter((s) => s.category === STATUS_NOT_ACTIONED);\n\nconst getIncompleteJobStatuses = (props) =>\n\tgetJobStatusOptions(props).filter((s) => s.category === STATUS_IN_PROGRESS);\n\nconst getJobStatus = (status, props) => {\n\tconst statusOptions = getJobStatusOptions(props);\n\t// console.log('getJobStatus', JSON.stringify({ status, statusOptions }, null, 2));\n\tlet statusOption = null;\n\tif (status) statusOption = statusOptions.find((s) => s.text === status);\n\treturn statusOption || getDefaultJobStatuses(props)[0];\n};\n\nconst getDefaultJobPriority = () => jobPriorityOptions.find((p) => p.default);\n\nconst getJobPriority = (priority) =>\n\tjobPriorityOptions.find((p) => p.label === priority) ||\n\tgetDefaultJobPriority();\n\nexport {\n\tjobStatusOptions,\n\tjobPriorityOptions,\n\tgetJobStatusOptions,\n\tgetDefaultJobStatuses,\n\tgetIncompleteJobStatuses,\n\tgetJobStatus,\n\tgetJobPriority,\n\tgetDefaultJobPriority,\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,CACxB;EACCC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACQ,QAAQ;EACvBC,QAAQ,EAAER;AACX,CAAC,EACD;EACCI,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACU,WAAW;EAC1BD,QAAQ,EAAEP;AACX,CAAC,EACD;EACCG,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACW,kBAAkB;EACjCF,QAAQ,EAAEN;AACX,CAAC,CACD;AAED,MAAMS,kBAAkB,GAAG,CAC1B;EACCC,KAAK,EAAE,KAAK;EACZN,KAAK,EAAEP,OAAO,CAACc,YAAY;EAC3BC,OAAO,EAAE;AACV,CAAC,EACD;EACCF,KAAK,EAAE,QAAQ;EACfN,KAAK,EAAEP,OAAO,CAACgB;AAChB,CAAC,EACD;EACCH,KAAK,EAAE,MAAM;EACbN,KAAK,EAAEP,OAAO,CAACiB;AAChB,CAAC,CACD;AAED,MAAMC,mBAAmB,GAAIC,KAAK;EAAA,IAAAC,kBAAA;EAAA,OACjCD,KAAK,aAALA,KAAK,gBAAAC,kBAAA,GAALD,KAAK,CAAEE,WAAW,cAAAD,kBAAA,eAAlBA,kBAAA,CAAoBE,MAAM,GAAGH,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,WAAW,GAAGjB,gBAAgB;AAAA;AAEnE,MAAMmB,qBAAqB,GAAIJ,KAAK,IACnCD,mBAAmB,CAACC,KAAK,CAAC,CAACK,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAChB,QAAQ,KAAKR,mBAAmB,CAAC;AAE7E,MAAMyB,wBAAwB,GAAIP,KAAK,IACtCD,mBAAmB,CAACC,KAAK,CAAC,CAACK,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAChB,QAAQ,KAAKP,kBAAkB,CAAC;AAE5E,MAAMyB,YAAY,GAAGA,CAACC,MAAM,EAAET,KAAK,KAAK;EACvC,MAAMU,aAAa,GAAGX,mBAAmB,CAACC,KAAK,CAAC;EAChD;EACA,IAAIW,YAAY,GAAG,IAAI;EACvB,IAAIF,MAAM,EAAEE,YAAY,GAAGD,aAAa,CAACE,IAAI,CAAEN,CAAC,IAAKA,CAAC,CAACpB,IAAI,KAAKuB,MAAM,CAAC;EACvE,OAAOE,YAAY,IAAIP,qBAAqB,CAACJ,KAAK,CAAC,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,MAAMa,qBAAqB,GAAGA,CAAA,KAAMpB,kBAAkB,CAACmB,IAAI,CAAEE,CAAC,IAAKA,CAAC,CAAClB,OAAO,CAAC;AAE7E,MAAMmB,cAAc,GAAIC,QAAQ,IAC/BvB,kBAAkB,CAACmB,IAAI,CAAEE,CAAC,IAAKA,CAAC,CAACpB,KAAK,KAAKsB,QAAQ,CAAC,IACpDH,qBAAqB,CAAC,CAAC;AAExB,SACC5B,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\tconst reducers = {};\n\treducers[values.reducerKey] = JobsReducer;\n\treturn reducers;\n})();\nexport const Screens = (() => {\n\tconst screens = {};\n\tscreens[values.screenMaintenance] = MaintenancePage;\n\tscreens[values.screenRequestDetail] = RequestDetail;\n\tscreens[values.screenServiceRequest] = ServiceRequest;\n\tscreens[values.screenJobTypePicker] = JobTypePicker;\n\tscreens[values.screenRequestNotes] = RequestNotes;\n\tscreens[values.screenUserPicker] = MaintenanceUserPicker;\n\treturn 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;EAC9B,MAAMC,QAAQ,GAAG,CAAC,CAAC;EACnBA,QAAQ,CAACF,MAAM,CAACG,UAAU,CAAC,GAAGJ,WAAW;EACzC,OAAOG,QAAQ;AAChB,CAAC,EAAE,CAAC;AACJ,OAAO,MAAME,OAAO,GAAG,CAAC,MAAM;EAC7B,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;AACf,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
|