@plusscommunities/pluss-maintenance-web 1.1.38 → 1.1.40

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/index.cjs.js CHANGED
@@ -80,6 +80,7 @@ const values = {
80
80
  svgPathGridIconViewBox: '0 0 30 30',
81
81
  menuOrder: 10,
82
82
  optionOnlyForResidents: 'onlyForResidentsMaintenance',
83
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenance',
83
84
  textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
84
85
  textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
85
86
  textEmptyJobTypes: 'Please add the many categories of request types that exist in your village which work alongside the Maintenance area.',
@@ -126,7 +127,7 @@ const FeatureConfig = {
126
127
  key: values.featureKey,
127
128
  aliases: values.aliases,
128
129
  singularName: values.textSingularName,
129
- description: 'Submit maintenance requests and track the progress.',
130
+ description: "Submit maintenance requests and track the progress.",
130
131
  emptyText: values.textYourRequestHere,
131
132
  widgetOptions: [{
132
133
  key: values.featureKey,
@@ -134,10 +135,22 @@ const FeatureConfig = {
134
135
  main: true,
135
136
  hideOnTabNumbers: [],
136
137
  optionKey: values.optionOnlyForResidents,
137
- type: 'toggle',
138
+ type: "toggle",
138
139
  inverseOption: false,
139
- title: 'Limit Admins to Only Submit on Behalf of Primary Users',
140
- description: 'This will limit admins to only make a submission on behalf of a primary users in the site. Otherwise they can also submit on behalf of other admins/staff users.',
140
+ title: "Limit Admins to Only Submit on Behalf of Primary Users",
141
+ description: "This will limit admins to only make a submission on behalf of a primary users in the site. Otherwise they can also submit on behalf of other admins/staff users.",
142
+ defaultNew: false,
143
+ default: false
144
+ }, {
145
+ key: values.featureKey,
146
+ widget: true,
147
+ main: true,
148
+ hideOnTabNumbers: [],
149
+ optionKey: values.optionDisableAddressAutoPopulate,
150
+ type: "toggle",
151
+ inverseOption: false,
152
+ title: "Do not auto-fill the user's address",
153
+ description: "When enabled, the address field will not be pre-filled from the user's profile when submitting a new ".concat(values.textSingularName, ". It must be entered manually each time."),
141
154
  defaultNew: false,
142
155
  default: false
143
156
  }],
@@ -150,20 +163,20 @@ const FeatureConfig = {
150
163
  url: values.routeRequestsHub,
151
164
  countProps: null,
152
165
  visibleExps: {
153
- type: 'and',
166
+ type: "and",
154
167
  exps: [{
155
- type: 'feature',
168
+ type: "feature",
156
169
  value: values.featureKey
157
170
  }, {
158
- type: 'or',
171
+ type: "or",
159
172
  exps: [{
160
- type: 'permission',
173
+ type: "permission",
161
174
  value: values.permissionMaintenanceTracking
162
175
  }, {
163
- type: 'permission',
176
+ type: "permission",
164
177
  value: values.permissionMaintenanceTypes
165
178
  }, {
166
- type: 'permission',
179
+ type: "permission",
167
180
  value: values.permissionMaintenanceAssignment
168
181
  }]
169
182
  }]
@@ -228,21 +241,21 @@ const FeatureConfig = {
228
241
  exact: true
229
242
  }],
230
243
  env: {
231
- baseStage: '',
232
- baseAPIUrl: '',
233
- baseUploadsUrl: '',
234
- uploadBucket: '',
235
- colourBrandingMain: '',
236
- colourBrandingOff: '',
237
- colourBrandingApp: '',
238
- defaultProfileImage: '',
239
- utcOffset: '',
244
+ baseStage: "",
245
+ baseAPIUrl: "",
246
+ baseUploadsUrl: "",
247
+ uploadBucket: "",
248
+ colourBrandingMain: "",
249
+ colourBrandingOff: "",
250
+ colourBrandingApp: "",
251
+ defaultProfileImage: "",
252
+ utcOffset: "",
240
253
  hasAvailableNews: false,
241
254
  newsHaveTags: true,
242
255
  defaultAllowComments: true,
243
- makeApiKey: '',
244
- logo: '',
245
- clientName: ''
256
+ makeApiKey: "",
257
+ logo: "",
258
+ clientName: ""
246
259
  },
247
260
  init: environment => {
248
261
  FeatureConfig.env = environment;
@@ -594,7 +607,6 @@ const stringActions = Apis$2.stringActions;
594
607
  var jobStatusOptions = [
595
608
  {
596
609
  text: "Open",
597
- alias: "Unassigned",
598
610
  order: 0,
599
611
  color: "#d5dde4",
600
612
  category: "Not Actioned"
@@ -791,16 +803,15 @@ class JobList extends React.Component {
791
803
  } = this.props;
792
804
  const params = {};
793
805
 
794
- // Status filter: translate "All Incomplete" into the actual incomplete statuses.
795
- // Expand each status to include its `alias` so legacy DB values (e.g. "Unassigned"
796
- // for "Open") still match the filter.
806
+ // Status filter: translate "All Incomplete" into the actual incomplete statuses
797
807
  if (selectedStatusFilter) {
798
- const selectedStatusTypes = selectedStatusFilter === STATUS_IMCOMPLETE ? statusTypes.filter(s => s.category !== STATUS_COMPLETED) : statusTypes.filter(s => s.text === selectedStatusFilter);
799
- const expanded = ___default["default"].uniq(selectedStatusTypes.flatMap(s => s.alias ? [s.text, s.alias] : [s.text]));
800
- if (expanded.length > 0) {
801
- params.status = expanded.join(',');
802
- } else if (selectedStatusFilter !== STATUS_IMCOMPLETE) {
803
- // Fallback if the status isn't in statusTypes (shouldn't happen normally)
808
+ if (selectedStatusFilter === STATUS_IMCOMPLETE) {
809
+ // Exclude completed statuses - pass all non-completed status texts
810
+ const incompleteStatuses = statusTypes.filter(s => s.category !== STATUS_COMPLETED).map(s => s.text);
811
+ if (incompleteStatuses.length > 0) {
812
+ params.status = incompleteStatuses.join(',');
813
+ }
814
+ } else {
804
815
  params.status = selectedStatusFilter;
805
816
  }
806
817
  }
@@ -4312,7 +4323,7 @@ class AddJob extends React.Component {
4312
4323
  if (response.data.user.phoneNumber) {
4313
4324
  contactUpdate.phone = response.data.user.phoneNumber;
4314
4325
  }
4315
- if (response.data.user.unit) {
4326
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4316
4327
  contactUpdate.room = response.data.user.unit;
4317
4328
  }
4318
4329
  // Update contact fields when data arrives
@@ -5148,7 +5159,8 @@ const mapStateToProps$2 = state => {
5148
5159
  return {
5149
5160
  auth,
5150
5161
  strings: state.strings && state.strings.config || {},
5151
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5162
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5163
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5152
5164
  };
5153
5165
  };
5154
5166
  var AddJob$1 = reactRedux.connect(mapStateToProps$2, {
package/dist/index.esm.js CHANGED
@@ -49,6 +49,7 @@ const values = {
49
49
  svgPathGridIconViewBox: '0 0 30 30',
50
50
  menuOrder: 10,
51
51
  optionOnlyForResidents: 'onlyForResidentsMaintenance',
52
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenance',
52
53
  textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
53
54
  textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
54
55
  textEmptyJobTypes: 'Please add the many categories of request types that exist in your village which work alongside the Maintenance area.',
@@ -95,7 +96,7 @@ const FeatureConfig = {
95
96
  key: values.featureKey,
96
97
  aliases: values.aliases,
97
98
  singularName: values.textSingularName,
98
- description: 'Submit maintenance requests and track the progress.',
99
+ description: "Submit maintenance requests and track the progress.",
99
100
  emptyText: values.textYourRequestHere,
100
101
  widgetOptions: [{
101
102
  key: values.featureKey,
@@ -103,10 +104,22 @@ const FeatureConfig = {
103
104
  main: true,
104
105
  hideOnTabNumbers: [],
105
106
  optionKey: values.optionOnlyForResidents,
106
- type: 'toggle',
107
+ type: "toggle",
107
108
  inverseOption: false,
108
- title: 'Limit Admins to Only Submit on Behalf of Primary Users',
109
- description: 'This will limit admins to only make a submission on behalf of a primary users in the site. Otherwise they can also submit on behalf of other admins/staff users.',
109
+ title: "Limit Admins to Only Submit on Behalf of Primary Users",
110
+ description: "This will limit admins to only make a submission on behalf of a primary users in the site. Otherwise they can also submit on behalf of other admins/staff users.",
111
+ defaultNew: false,
112
+ default: false
113
+ }, {
114
+ key: values.featureKey,
115
+ widget: true,
116
+ main: true,
117
+ hideOnTabNumbers: [],
118
+ optionKey: values.optionDisableAddressAutoPopulate,
119
+ type: "toggle",
120
+ inverseOption: false,
121
+ title: "Do not auto-fill the user's address",
122
+ description: "When enabled, the address field will not be pre-filled from the user's profile when submitting a new ".concat(values.textSingularName, ". It must be entered manually each time."),
110
123
  defaultNew: false,
111
124
  default: false
112
125
  }],
@@ -119,20 +132,20 @@ const FeatureConfig = {
119
132
  url: values.routeRequestsHub,
120
133
  countProps: null,
121
134
  visibleExps: {
122
- type: 'and',
135
+ type: "and",
123
136
  exps: [{
124
- type: 'feature',
137
+ type: "feature",
125
138
  value: values.featureKey
126
139
  }, {
127
- type: 'or',
140
+ type: "or",
128
141
  exps: [{
129
- type: 'permission',
142
+ type: "permission",
130
143
  value: values.permissionMaintenanceTracking
131
144
  }, {
132
- type: 'permission',
145
+ type: "permission",
133
146
  value: values.permissionMaintenanceTypes
134
147
  }, {
135
- type: 'permission',
148
+ type: "permission",
136
149
  value: values.permissionMaintenanceAssignment
137
150
  }]
138
151
  }]
@@ -197,21 +210,21 @@ const FeatureConfig = {
197
210
  exact: true
198
211
  }],
199
212
  env: {
200
- baseStage: '',
201
- baseAPIUrl: '',
202
- baseUploadsUrl: '',
203
- uploadBucket: '',
204
- colourBrandingMain: '',
205
- colourBrandingOff: '',
206
- colourBrandingApp: '',
207
- defaultProfileImage: '',
208
- utcOffset: '',
213
+ baseStage: "",
214
+ baseAPIUrl: "",
215
+ baseUploadsUrl: "",
216
+ uploadBucket: "",
217
+ colourBrandingMain: "",
218
+ colourBrandingOff: "",
219
+ colourBrandingApp: "",
220
+ defaultProfileImage: "",
221
+ utcOffset: "",
209
222
  hasAvailableNews: false,
210
223
  newsHaveTags: true,
211
224
  defaultAllowComments: true,
212
- makeApiKey: '',
213
- logo: '',
214
- clientName: ''
225
+ makeApiKey: "",
226
+ logo: "",
227
+ clientName: ""
215
228
  },
216
229
  init: environment => {
217
230
  FeatureConfig.env = environment;
@@ -563,7 +576,6 @@ const stringActions = Apis$2.stringActions;
563
576
  var jobStatusOptions = [
564
577
  {
565
578
  text: "Open",
566
- alias: "Unassigned",
567
579
  order: 0,
568
580
  color: "#d5dde4",
569
581
  category: "Not Actioned"
@@ -760,16 +772,15 @@ class JobList extends Component {
760
772
  } = this.props;
761
773
  const params = {};
762
774
 
763
- // Status filter: translate "All Incomplete" into the actual incomplete statuses.
764
- // Expand each status to include its `alias` so legacy DB values (e.g. "Unassigned"
765
- // for "Open") still match the filter.
775
+ // Status filter: translate "All Incomplete" into the actual incomplete statuses
766
776
  if (selectedStatusFilter) {
767
- const selectedStatusTypes = selectedStatusFilter === STATUS_IMCOMPLETE ? statusTypes.filter(s => s.category !== STATUS_COMPLETED) : statusTypes.filter(s => s.text === selectedStatusFilter);
768
- const expanded = _.uniq(selectedStatusTypes.flatMap(s => s.alias ? [s.text, s.alias] : [s.text]));
769
- if (expanded.length > 0) {
770
- params.status = expanded.join(',');
771
- } else if (selectedStatusFilter !== STATUS_IMCOMPLETE) {
772
- // Fallback if the status isn't in statusTypes (shouldn't happen normally)
777
+ if (selectedStatusFilter === STATUS_IMCOMPLETE) {
778
+ // Exclude completed statuses - pass all non-completed status texts
779
+ const incompleteStatuses = statusTypes.filter(s => s.category !== STATUS_COMPLETED).map(s => s.text);
780
+ if (incompleteStatuses.length > 0) {
781
+ params.status = incompleteStatuses.join(',');
782
+ }
783
+ } else {
773
784
  params.status = selectedStatusFilter;
774
785
  }
775
786
  }
@@ -4281,7 +4292,7 @@ class AddJob extends Component {
4281
4292
  if (response.data.user.phoneNumber) {
4282
4293
  contactUpdate.phone = response.data.user.phoneNumber;
4283
4294
  }
4284
- if (response.data.user.unit) {
4295
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4285
4296
  contactUpdate.room = response.data.user.unit;
4286
4297
  }
4287
4298
  // Update contact fields when data arrives
@@ -5117,7 +5128,8 @@ const mapStateToProps$2 = state => {
5117
5128
  return {
5118
5129
  auth,
5119
5130
  strings: state.strings && state.strings.config || {},
5120
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5131
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5132
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5121
5133
  };
5122
5134
  };
5123
5135
  var AddJob$1 = connect(mapStateToProps$2, {
package/dist/index.umd.js CHANGED
@@ -69,6 +69,7 @@
69
69
  svgPathGridIconViewBox: '0 0 30 30',
70
70
  menuOrder: 10,
71
71
  optionOnlyForResidents: 'onlyForResidentsMaintenance',
72
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenance',
72
73
  textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
73
74
  textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
74
75
  textEmptyJobTypes: 'Please add the many categories of request types that exist in your village which work alongside the Maintenance area.',
@@ -115,7 +116,7 @@
115
116
  key: values.featureKey,
116
117
  aliases: values.aliases,
117
118
  singularName: values.textSingularName,
118
- description: 'Submit maintenance requests and track the progress.',
119
+ description: "Submit maintenance requests and track the progress.",
119
120
  emptyText: values.textYourRequestHere,
120
121
  widgetOptions: [{
121
122
  key: values.featureKey,
@@ -123,10 +124,22 @@
123
124
  main: true,
124
125
  hideOnTabNumbers: [],
125
126
  optionKey: values.optionOnlyForResidents,
126
- type: 'toggle',
127
+ type: "toggle",
127
128
  inverseOption: false,
128
- title: 'Limit Admins to Only Submit on Behalf of Primary Users',
129
- description: 'This will limit admins to only make a submission on behalf of a primary users in the site. Otherwise they can also submit on behalf of other admins/staff users.',
129
+ title: "Limit Admins to Only Submit on Behalf of Primary Users",
130
+ description: "This will limit admins to only make a submission on behalf of a primary users in the site. Otherwise they can also submit on behalf of other admins/staff users.",
131
+ defaultNew: false,
132
+ default: false
133
+ }, {
134
+ key: values.featureKey,
135
+ widget: true,
136
+ main: true,
137
+ hideOnTabNumbers: [],
138
+ optionKey: values.optionDisableAddressAutoPopulate,
139
+ type: "toggle",
140
+ inverseOption: false,
141
+ title: "Do not auto-fill the user's address",
142
+ description: "When enabled, the address field will not be pre-filled from the user's profile when submitting a new ".concat(values.textSingularName, ". It must be entered manually each time."),
130
143
  defaultNew: false,
131
144
  default: false
132
145
  }],
@@ -139,20 +152,20 @@
139
152
  url: values.routeRequestsHub,
140
153
  countProps: null,
141
154
  visibleExps: {
142
- type: 'and',
155
+ type: "and",
143
156
  exps: [{
144
- type: 'feature',
157
+ type: "feature",
145
158
  value: values.featureKey
146
159
  }, {
147
- type: 'or',
160
+ type: "or",
148
161
  exps: [{
149
- type: 'permission',
162
+ type: "permission",
150
163
  value: values.permissionMaintenanceTracking
151
164
  }, {
152
- type: 'permission',
165
+ type: "permission",
153
166
  value: values.permissionMaintenanceTypes
154
167
  }, {
155
- type: 'permission',
168
+ type: "permission",
156
169
  value: values.permissionMaintenanceAssignment
157
170
  }]
158
171
  }]
@@ -217,21 +230,21 @@
217
230
  exact: true
218
231
  }],
219
232
  env: {
220
- baseStage: '',
221
- baseAPIUrl: '',
222
- baseUploadsUrl: '',
223
- uploadBucket: '',
224
- colourBrandingMain: '',
225
- colourBrandingOff: '',
226
- colourBrandingApp: '',
227
- defaultProfileImage: '',
228
- utcOffset: '',
233
+ baseStage: "",
234
+ baseAPIUrl: "",
235
+ baseUploadsUrl: "",
236
+ uploadBucket: "",
237
+ colourBrandingMain: "",
238
+ colourBrandingOff: "",
239
+ colourBrandingApp: "",
240
+ defaultProfileImage: "",
241
+ utcOffset: "",
229
242
  hasAvailableNews: false,
230
243
  newsHaveTags: true,
231
244
  defaultAllowComments: true,
232
- makeApiKey: '',
233
- logo: '',
234
- clientName: ''
245
+ makeApiKey: "",
246
+ logo: "",
247
+ clientName: ""
235
248
  },
236
249
  init: environment => {
237
250
  FeatureConfig.env = environment;
@@ -583,7 +596,6 @@
583
596
  var jobStatusOptions = [
584
597
  {
585
598
  text: "Open",
586
- alias: "Unassigned",
587
599
  order: 0,
588
600
  color: "#d5dde4",
589
601
  category: "Not Actioned"
@@ -780,16 +792,15 @@
780
792
  } = this.props;
781
793
  const params = {};
782
794
 
783
- // Status filter: translate "All Incomplete" into the actual incomplete statuses.
784
- // Expand each status to include its `alias` so legacy DB values (e.g. "Unassigned"
785
- // for "Open") still match the filter.
795
+ // Status filter: translate "All Incomplete" into the actual incomplete statuses
786
796
  if (selectedStatusFilter) {
787
- const selectedStatusTypes = selectedStatusFilter === STATUS_IMCOMPLETE ? statusTypes.filter(s => s.category !== STATUS_COMPLETED) : statusTypes.filter(s => s.text === selectedStatusFilter);
788
- const expanded = ___default["default"].uniq(selectedStatusTypes.flatMap(s => s.alias ? [s.text, s.alias] : [s.text]));
789
- if (expanded.length > 0) {
790
- params.status = expanded.join(',');
791
- } else if (selectedStatusFilter !== STATUS_IMCOMPLETE) {
792
- // Fallback if the status isn't in statusTypes (shouldn't happen normally)
797
+ if (selectedStatusFilter === STATUS_IMCOMPLETE) {
798
+ // Exclude completed statuses - pass all non-completed status texts
799
+ const incompleteStatuses = statusTypes.filter(s => s.category !== STATUS_COMPLETED).map(s => s.text);
800
+ if (incompleteStatuses.length > 0) {
801
+ params.status = incompleteStatuses.join(',');
802
+ }
803
+ } else {
793
804
  params.status = selectedStatusFilter;
794
805
  }
795
806
  }
@@ -4301,7 +4312,7 @@
4301
4312
  if (response.data.user.phoneNumber) {
4302
4313
  contactUpdate.phone = response.data.user.phoneNumber;
4303
4314
  }
4304
- if (response.data.user.unit) {
4315
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4305
4316
  contactUpdate.room = response.data.user.unit;
4306
4317
  }
4307
4318
  // Update contact fields when data arrives
@@ -5137,7 +5148,8 @@
5137
5148
  return {
5138
5149
  auth,
5139
5150
  strings: state.strings && state.strings.config || {},
5140
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5151
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5152
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5141
5153
  };
5142
5154
  };
5143
5155
  var AddJob$1 = reactRedux.connect(mapStateToProps$2, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-maintenance-web",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
4
4
  "description": "Extension package to enable maintenance on Pluss Communities Platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",