@plusscommunities/pluss-maintenance-app-forms 6.0.21 → 6.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/screens/RequestDetail.js +146 -145
- package/dist/module/screens/RequestDetail.js.map +1 -1
- package/dist/module/screens/ServiceRequest.js +5 -9
- package/dist/module/screens/ServiceRequest.js.map +1 -1
- package/dist/module/values.config.a.js +1 -2
- package/dist/module/values.config.a.js.map +1 -1
- package/dist/module/values.config.default.js +1 -2
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.enquiry.js +1 -2
- package/dist/module/values.config.enquiry.js.map +1 -1
- package/dist/module/values.config.feedback.js +1 -2
- package/dist/module/values.config.feedback.js.map +1 -1
- package/dist/module/values.config.food.js +1 -2
- package/dist/module/values.config.food.js.map +1 -1
- package/package.json +2 -2
- package/src/screens/RequestDetail.js +1125 -1348
- package/src/screens/ServiceRequest.js +11 -15
- package/src/values.config.a.js +0 -1
- package/src/values.config.default.js +0 -1
- package/src/values.config.enquiry.js +0 -1
- package/src/values.config.feedback.js +0 -1
- package/src/values.config.food.js +0 -1
|
@@ -103,13 +103,8 @@ class MaintenanceRequest extends Component {
|
|
|
103
103
|
loadSiteUsers = async () => {
|
|
104
104
|
try {
|
|
105
105
|
const response = await userActions.getSiteUsers(this.props.site);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (this.props.optionOnlyForResidents) {
|
|
109
|
-
items = _.filter(items, u => u.category === 'resident');
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const users = _.sortBy(items, u => (u.displayName || '').toLowerCase());
|
|
106
|
+
// PC-1255: Load all users (not just residents) to match web admin behavior
|
|
107
|
+
const users = _.sortBy(response.data.Items || [], u => (u.displayName || '').toLowerCase());
|
|
113
108
|
this.setState({ users });
|
|
114
109
|
} catch (error) {
|
|
115
110
|
console.log('Error loading site users:', error);
|
|
@@ -178,23 +173,25 @@ class MaintenanceRequest extends Component {
|
|
|
178
173
|
if (userDetails.unit) {
|
|
179
174
|
update.roomNumber = userDetails.unit;
|
|
180
175
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
if (!this.state.customFields || !_.some(this.state.customFields, 'isTitle')) {
|
|
177
|
+
update.title = userDetails.displayName || null;
|
|
178
|
+
}
|
|
184
179
|
}
|
|
185
180
|
} catch (error) {
|
|
186
181
|
// Permission denied (403) or other error - continue without auto-population
|
|
187
182
|
// User can still manually enter contact details
|
|
188
183
|
console.log('Could not fetch user details for auto-population:', error);
|
|
189
184
|
} finally {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
185
|
+
// In any case, we still need a title. Inform the user to set one form field as a title.
|
|
186
|
+
if (!this.state.title && !update.title) {
|
|
187
|
+
update.title = "[Missing title - Set one of the form field as title in the community manager]"
|
|
188
|
+
}
|
|
189
|
+
|
|
194
190
|
}
|
|
195
191
|
this.setState(update);
|
|
196
192
|
};
|
|
197
193
|
|
|
194
|
+
|
|
198
195
|
onChangeAnswer = (fieldId, answer) => {
|
|
199
196
|
const update = { customFields: _.cloneDeep(this.state.customFields) };
|
|
200
197
|
const field = update.customFields[fieldId];
|
|
@@ -1561,7 +1558,6 @@ const mapStateToProps = state => {
|
|
|
1561
1558
|
permissions,
|
|
1562
1559
|
colourBrandingMain: Colours.getMainBrandingColourFromState(state),
|
|
1563
1560
|
strings: state.strings?.config || {},
|
|
1564
|
-
optionOnlyForResidents: Helper.getSiteSettingFromState(state, values.optionOnlyForResidents),
|
|
1565
1561
|
};
|
|
1566
1562
|
};
|
|
1567
1563
|
|
package/src/values.config.a.js
CHANGED