@plusscommunities/pluss-maintenance-app 8.0.6 → 8.0.7-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.
Files changed (97) hide show
  1. package/dist/module/actions/JobActions.js +4 -4
  2. package/dist/module/actions/JobActions.js.map +1 -1
  3. package/dist/module/actions/index.js +1 -1
  4. package/dist/module/actions/index.js.map +1 -1
  5. package/dist/module/actions/types.js +1 -1
  6. package/dist/module/actions/types.js.map +1 -1
  7. package/dist/module/apis/index.js +3 -3
  8. package/dist/module/apis/index.js.map +1 -1
  9. package/dist/module/apis/maintenanceActions.js +42 -34
  10. package/dist/module/apis/maintenanceActions.js.map +1 -1
  11. package/dist/module/apis/userActions.js +5 -5
  12. package/dist/module/apis/userActions.js.map +1 -1
  13. package/dist/module/components/FilterPopupMenu.js +49 -49
  14. package/dist/module/components/FilterPopupMenu.js.map +1 -1
  15. package/dist/module/components/MaintenanceList.js +38 -38
  16. package/dist/module/components/MaintenanceList.js.map +1 -1
  17. package/dist/module/components/MaintenanceListItem.js +62 -62
  18. package/dist/module/components/MaintenanceListItem.js.map +1 -1
  19. package/dist/module/components/MaintenanceWidgetItem.js +27 -27
  20. package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
  21. package/dist/module/components/PrioritySelectorPopup.js +15 -15
  22. package/dist/module/components/PrioritySelectorPopup.js.map +1 -1
  23. package/dist/module/components/StatusSelectorPopup.js +16 -16
  24. package/dist/module/components/StatusSelectorPopup.js.map +1 -1
  25. package/dist/module/components/WidgetLarge.js +2 -2
  26. package/dist/module/components/WidgetLarge.js.map +1 -1
  27. package/dist/module/components/WidgetSmall.js +19 -19
  28. package/dist/module/components/WidgetSmall.js.map +1 -1
  29. package/dist/module/core.config.js +1 -1
  30. package/dist/module/core.config.js.map +1 -1
  31. package/dist/module/feature.config.js +17 -17
  32. package/dist/module/feature.config.js.map +1 -1
  33. package/dist/module/helper.js +10 -10
  34. package/dist/module/helper.js.map +1 -1
  35. package/dist/module/index.js +11 -11
  36. package/dist/module/index.js.map +1 -1
  37. package/dist/module/reducers/JobsReducer.js +13 -13
  38. package/dist/module/reducers/JobsReducer.js.map +1 -1
  39. package/dist/module/screens/JobTypePicker.js +17 -17
  40. package/dist/module/screens/JobTypePicker.js.map +1 -1
  41. package/dist/module/screens/MaintenancePage.js +10 -10
  42. package/dist/module/screens/MaintenancePage.js.map +1 -1
  43. package/dist/module/screens/MaintenanceUserPicker.js +18 -18
  44. package/dist/module/screens/MaintenanceUserPicker.js.map +1 -1
  45. package/dist/module/screens/RequestDetail.js +253 -138
  46. package/dist/module/screens/RequestDetail.js.map +1 -1
  47. package/dist/module/screens/RequestNotes.js +59 -59
  48. package/dist/module/screens/RequestNotes.js.map +1 -1
  49. package/dist/module/screens/ServiceRequest.js +34 -35
  50. package/dist/module/screens/ServiceRequest.js.map +1 -1
  51. package/dist/module/values.config.a.js +30 -30
  52. package/dist/module/values.config.a.js.map +1 -1
  53. package/dist/module/values.config.default.js +34 -34
  54. package/dist/module/values.config.default.js.map +1 -1
  55. package/dist/module/values.config.enquiry.js +34 -34
  56. package/dist/module/values.config.enquiry.js.map +1 -1
  57. package/dist/module/values.config.feedback.js +34 -34
  58. package/dist/module/values.config.feedback.js.map +1 -1
  59. package/dist/module/values.config.food.js +34 -34
  60. package/dist/module/values.config.food.js.map +1 -1
  61. package/dist/module/values.config.forms.js +34 -34
  62. package/dist/module/values.config.forms.js.map +1 -1
  63. package/dist/module/values.config.js +34 -34
  64. package/dist/module/values.config.js.map +1 -1
  65. package/package.json +52 -52
  66. package/src/actions/JobActions.js +67 -60
  67. package/src/actions/index.js +1 -1
  68. package/src/actions/types.js +1 -2
  69. package/src/apis/index.js +3 -3
  70. package/src/apis/maintenanceActions.js +189 -172
  71. package/src/apis/userActions.js +17 -17
  72. package/src/components/FilterPopupMenu.js +313 -256
  73. package/src/components/MaintenanceList.js +396 -317
  74. package/src/components/MaintenanceListItem.js +347 -288
  75. package/src/components/MaintenanceWidgetItem.js +145 -124
  76. package/src/components/PrioritySelectorPopup.js +81 -68
  77. package/src/components/StatusSelectorPopup.js +81 -70
  78. package/src/components/WidgetLarge.js +5 -5
  79. package/src/components/WidgetSmall.js +153 -133
  80. package/src/core.config.js +27 -3
  81. package/src/feature.config.js +62 -62
  82. package/src/helper.js +58 -53
  83. package/src/index.js +22 -22
  84. package/src/reducers/JobsReducer.js +85 -66
  85. package/src/screens/JobTypePicker.js +115 -92
  86. package/src/screens/MaintenancePage.js +89 -80
  87. package/src/screens/MaintenanceUserPicker.js +116 -92
  88. package/src/screens/RequestDetail.js +1346 -1023
  89. package/src/screens/RequestNotes.js +946 -805
  90. package/src/screens/ServiceRequest.js +57 -34
  91. package/src/values.config.a.js +33 -33
  92. package/src/values.config.default.js +39 -39
  93. package/src/values.config.enquiry.js +39 -39
  94. package/src/values.config.feedback.js +39 -39
  95. package/src/values.config.food.js +39 -39
  96. package/src/values.config.forms.js +39 -39
  97. package/src/values.config.js +39 -39
@@ -1,107 +1,131 @@
1
- import React, { Component } from 'react';
2
- import _ from 'lodash';
3
- import { TouchableOpacity, View, ScrollView, Text } from 'react-native';
4
- import { connect } from 'react-redux';
5
- import { Icon } from '@rneui/themed';
6
- import { Services } from '../feature.config';
7
- import { Components, Colours } from '../core.config';
1
+ import React, { Component } from "react";
2
+ import _ from "lodash";
3
+ import { TouchableOpacity, View, ScrollView, Text } from "react-native";
4
+ import { connect } from "react-redux";
5
+ import { Icon } from "@rneui/themed";
6
+ import { Services } from "../feature.config";
7
+ import { Components, Colours } from "../core.config";
8
8
 
9
9
  class MaintenanceUserPicker extends Component {
10
- state = {
11
- currentUser: null,
12
- };
10
+ state = {
11
+ currentUser: null,
12
+ };
13
13
 
14
- UNSAFE_componentWillMount() {
15
- this.setState({ currentUser: this.props.currentUser });
16
- }
14
+ UNSAFE_componentWillMount() {
15
+ this.setState({ currentUser: this.props.currentUser });
16
+ }
17
17
 
18
- onPressBack() {
19
- Services.navigation.goBack();
20
- }
18
+ onPressBack() {
19
+ Services.navigation.goBack();
20
+ }
21
21
 
22
- onUserPress(user) {
23
- this.props.onSelectUser(user);
24
- this.setState({ currentUser: user });
25
- setTimeout(() => {
26
- this.onPressBack();
27
- }, 200);
28
- }
22
+ onUserPress(user) {
23
+ this.props.onSelectUser(user);
24
+ this.setState({ currentUser: user });
25
+ setTimeout(() => {
26
+ this.onPressBack();
27
+ }, 200);
28
+ }
29
29
 
30
- renderMain() {
31
- if (_.isEmpty(this.props.users)) {
32
- return (
33
- <View style={{ marginTop: 16 }}>
34
- <Components.Spinner />
35
- </View>
36
- );
37
- }
30
+ renderMain() {
31
+ if (_.isEmpty(this.props.users)) {
32
+ return (
33
+ <View style={{ marginTop: 16 }}>
34
+ <Components.Spinner />
35
+ </View>
36
+ );
37
+ }
38
38
 
39
- return <Components.FormCard style={{ marginTop: 16 }}>{this.renderOptions()}</Components.FormCard>;
40
- }
39
+ return (
40
+ <Components.FormCard style={{ marginTop: 16 }}>
41
+ {this.renderOptions()}
42
+ </Components.FormCard>
43
+ );
44
+ }
41
45
 
42
- renderOptions() {
43
- return this.props.users.map((user, index) => {
44
- return (
45
- <TouchableOpacity key={index} onPress={this.onUserPress.bind(this, user)}>
46
- <Components.FormCardSection label={user.displayName} labelStyle={{ height: 0, margin: 0 }} hasUnderline hasContent>
47
- <View style={styles.rowContainer}>
48
- <View style={styles.userContainer}>
49
- <Components.ProfilePic ProfilePic={user.profilePic} Diameter={30} />
50
- <Text style={styles.labelText}>{user.displayName}</Text>
51
- </View>
52
- <Icon
53
- name="check-circle"
54
- type="font-awesome"
55
- iconStyle={[{ color: '#d5d9e0', fontSize: 20 }, _.isEqual(user, this.state.currentUser) && { color: Colours.COLOUR_GREEN }]}
56
- />
57
- </View>
58
- </Components.FormCardSection>
59
- </TouchableOpacity>
60
- );
61
- });
62
- }
46
+ renderOptions() {
47
+ return this.props.users.map((user, index) => {
48
+ return (
49
+ <TouchableOpacity
50
+ key={index}
51
+ onPress={this.onUserPress.bind(this, user)}
52
+ >
53
+ <Components.FormCardSection
54
+ label={user.displayName}
55
+ labelStyle={{ height: 0, margin: 0 }}
56
+ hasUnderline
57
+ hasContent
58
+ >
59
+ <View style={styles.rowContainer}>
60
+ <View style={styles.userContainer}>
61
+ <Components.ProfilePic
62
+ ProfilePic={user.profilePic}
63
+ Diameter={30}
64
+ />
65
+ <Text style={styles.labelText}>{user.displayName}</Text>
66
+ </View>
67
+ <Icon
68
+ name="check-circle"
69
+ type="font-awesome"
70
+ iconStyle={[
71
+ { color: "#d5d9e0", fontSize: 20 },
72
+ _.isEqual(user, this.state.currentUser) && {
73
+ color: Colours.COLOUR_GREEN,
74
+ },
75
+ ]}
76
+ />
77
+ </View>
78
+ </Components.FormCardSection>
79
+ </TouchableOpacity>
80
+ );
81
+ });
82
+ }
63
83
 
64
- render() {
65
- return (
66
- <View style={styles.container}>
67
- <Components.Header leftIcon="angle-left" onPressLeft={this.onPressBack.bind(this)} text="Select user" />
68
- <ScrollView style={{ flex: 1 }}>{this.renderMain()}</ScrollView>
69
- </View>
70
- );
71
- }
84
+ render() {
85
+ return (
86
+ <View style={styles.container}>
87
+ <Components.Header
88
+ leftIcon="angle-left"
89
+ onPressLeft={this.onPressBack.bind(this)}
90
+ text="Select user"
91
+ />
92
+ <ScrollView style={{ flex: 1 }}>{this.renderMain()}</ScrollView>
93
+ </View>
94
+ );
95
+ }
72
96
  }
73
97
 
74
98
  const styles = {
75
- container: {
76
- flex: 1,
77
- position: 'relative',
78
- backgroundColor: '#f0f0f5',
79
- },
80
- row: {
81
- flexDirection: 'row',
82
- alignItems: 'center',
83
- minHeight: 22,
84
- },
85
- text: {
86
- flex: 1,
87
- fontFamily: 'sf-regular',
88
- fontSize: 14,
89
- color: Colours.TEXT_DARK,
90
- },
91
- rowContainer: {
92
- flexDirection: 'row',
93
- justifyContent: 'space-between',
94
- },
95
- userContainer: {
96
- flexDirection: 'row',
97
- alignItems: 'center',
98
- },
99
- labelText: {
100
- fontFamily: 'sf-medium',
101
- fontSize: 16,
102
- color: Colours.TEXT_DARK,
103
- marginLeft: 8,
104
- },
99
+ container: {
100
+ flex: 1,
101
+ position: "relative",
102
+ backgroundColor: "#f0f0f5",
103
+ },
104
+ row: {
105
+ flexDirection: "row",
106
+ alignItems: "center",
107
+ minHeight: 22,
108
+ },
109
+ text: {
110
+ flex: 1,
111
+ fontFamily: "sf-regular",
112
+ fontSize: 14,
113
+ color: Colours.TEXT_DARK,
114
+ },
115
+ rowContainer: {
116
+ flexDirection: "row",
117
+ justifyContent: "space-between",
118
+ },
119
+ userContainer: {
120
+ flexDirection: "row",
121
+ alignItems: "center",
122
+ },
123
+ labelText: {
124
+ fontFamily: "sf-medium",
125
+ fontSize: 16,
126
+ color: Colours.TEXT_DARK,
127
+ marginLeft: 8,
128
+ },
105
129
  };
106
130
 
107
131
  export default connect(null, {})(MaintenanceUserPicker);