@plusscommunities/pluss-maintenance-web-a 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
@@ -77,6 +77,7 @@ const values = {
77
77
  svgPathGridIconViewBox: '0 0 30 30',
78
78
  menuOrder: 10,
79
79
  optionOnlyForResidents: 'onlyForResidentsMaintenanceA',
80
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenanceA',
80
81
  textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
81
82
  textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
82
83
  textAreYouSureYouWantToDelete: 'Are you sure you want to delete that request?',
@@ -115,7 +116,7 @@ const FeatureConfig = {
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 @@ const FeatureConfig = {
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 @@ const FeatureConfig = {
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 @@ const FeatureConfig = {
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 @@ const stringActions = Apis$2.stringActions;
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 @@ class JobList extends React.Component {
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 @@ class AddJob extends React.Component {
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 @@ const mapStateToProps$2 = state => {
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/dist/index.esm.js CHANGED
@@ -46,6 +46,7 @@ const values = {
46
46
  svgPathGridIconViewBox: '0 0 30 30',
47
47
  menuOrder: 10,
48
48
  optionOnlyForResidents: 'onlyForResidentsMaintenanceA',
49
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenanceA',
49
50
  textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
50
51
  textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
51
52
  textAreYouSureYouWantToDelete: 'Are you sure you want to delete that request?',
@@ -84,7 +85,7 @@ const FeatureConfig = {
84
85
  key: values.featureKey,
85
86
  aliases: values.aliases,
86
87
  singularName: values.textSingularName,
87
- description: 'Submit maintenance requests and track the progress.',
88
+ description: "Submit maintenance requests and track the progress.",
88
89
  emptyText: values.textYourRequestHere,
89
90
  widgetOptions: [{
90
91
  key: values.featureKey,
@@ -92,10 +93,22 @@ const FeatureConfig = {
92
93
  main: true,
93
94
  hideOnTabNumbers: [],
94
95
  optionKey: values.optionOnlyForResidents,
95
- type: 'toggle',
96
+ type: "toggle",
96
97
  inverseOption: false,
97
- title: 'Limit Admins to Only Submit on Behalf of Primary Users',
98
- 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.',
98
+ title: "Limit Admins to Only Submit on Behalf of Primary Users",
99
+ 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.",
100
+ defaultNew: false,
101
+ default: false
102
+ }, {
103
+ key: values.featureKey,
104
+ widget: true,
105
+ main: true,
106
+ hideOnTabNumbers: [],
107
+ optionKey: values.optionDisableAddressAutoPopulate,
108
+ type: "toggle",
109
+ inverseOption: false,
110
+ title: "Do not auto-fill the user's address",
111
+ 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."),
99
112
  defaultNew: false,
100
113
  default: false
101
114
  }],
@@ -108,20 +121,20 @@ const FeatureConfig = {
108
121
  url: values.routeRequestsHub,
109
122
  countProps: null,
110
123
  visibleExps: {
111
- type: 'and',
124
+ type: "and",
112
125
  exps: [{
113
- type: 'feature',
126
+ type: "feature",
114
127
  value: values.featureKey
115
128
  }, {
116
- type: 'or',
129
+ type: "or",
117
130
  exps: [{
118
- type: 'permission',
131
+ type: "permission",
119
132
  value: values.permissionMaintenanceTracking
120
133
  }, {
121
- type: 'permission',
134
+ type: "permission",
122
135
  value: values.permissionMaintenanceTypes
123
136
  }, {
124
- type: 'permission',
137
+ type: "permission",
125
138
  value: values.permissionMaintenanceAssignment
126
139
  }]
127
140
  }]
@@ -186,21 +199,21 @@ const FeatureConfig = {
186
199
  exact: true
187
200
  }],
188
201
  env: {
189
- baseStage: '',
190
- baseAPIUrl: '',
191
- baseUploadsUrl: '',
192
- uploadBucket: '',
193
- colourBrandingMain: '',
194
- colourBrandingOff: '',
195
- colourBrandingApp: '',
196
- defaultProfileImage: '',
197
- utcOffset: '',
202
+ baseStage: "",
203
+ baseAPIUrl: "",
204
+ baseUploadsUrl: "",
205
+ uploadBucket: "",
206
+ colourBrandingMain: "",
207
+ colourBrandingOff: "",
208
+ colourBrandingApp: "",
209
+ defaultProfileImage: "",
210
+ utcOffset: "",
198
211
  hasAvailableNews: false,
199
212
  newsHaveTags: true,
200
213
  defaultAllowComments: true,
201
- makeApiKey: '',
202
- logo: '',
203
- clientName: ''
214
+ makeApiKey: "",
215
+ logo: "",
216
+ clientName: ""
204
217
  },
205
218
  init: environment => {
206
219
  FeatureConfig.env = environment;
@@ -552,7 +565,6 @@ const stringActions = Apis$2.stringActions;
552
565
  var jobStatusOptions = [
553
566
  {
554
567
  text: "Open",
555
- alias: "Unassigned",
556
568
  order: 0,
557
569
  color: "#d5dde4",
558
570
  category: "Not Actioned"
@@ -749,16 +761,15 @@ class JobList extends Component {
749
761
  } = this.props;
750
762
  const params = {};
751
763
 
752
- // Status filter: translate "All Incomplete" into the actual incomplete statuses.
753
- // Expand each status to include its `alias` so legacy DB values (e.g. "Unassigned"
754
- // for "Open") still match the filter.
764
+ // Status filter: translate "All Incomplete" into the actual incomplete statuses
755
765
  if (selectedStatusFilter) {
756
- const selectedStatusTypes = selectedStatusFilter === STATUS_IMCOMPLETE ? statusTypes.filter(s => s.category !== STATUS_COMPLETED) : statusTypes.filter(s => s.text === selectedStatusFilter);
757
- const expanded = _.uniq(selectedStatusTypes.flatMap(s => s.alias ? [s.text, s.alias] : [s.text]));
758
- if (expanded.length > 0) {
759
- params.status = expanded.join(',');
760
- } else if (selectedStatusFilter !== STATUS_IMCOMPLETE) {
761
- // Fallback if the status isn't in statusTypes (shouldn't happen normally)
766
+ if (selectedStatusFilter === STATUS_IMCOMPLETE) {
767
+ // Exclude completed statuses - pass all non-completed status texts
768
+ const incompleteStatuses = statusTypes.filter(s => s.category !== STATUS_COMPLETED).map(s => s.text);
769
+ if (incompleteStatuses.length > 0) {
770
+ params.status = incompleteStatuses.join(',');
771
+ }
772
+ } else {
762
773
  params.status = selectedStatusFilter;
763
774
  }
764
775
  }
@@ -4270,7 +4281,7 @@ class AddJob extends Component {
4270
4281
  if (response.data.user.phoneNumber) {
4271
4282
  contactUpdate.phone = response.data.user.phoneNumber;
4272
4283
  }
4273
- if (response.data.user.unit) {
4284
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4274
4285
  contactUpdate.room = response.data.user.unit;
4275
4286
  }
4276
4287
  // Update contact fields when data arrives
@@ -5106,7 +5117,8 @@ const mapStateToProps$2 = state => {
5106
5117
  return {
5107
5118
  auth,
5108
5119
  strings: state.strings && state.strings.config || {},
5109
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5120
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5121
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5110
5122
  };
5111
5123
  };
5112
5124
  var AddJob$1 = connect(mapStateToProps$2, {
package/dist/index.umd.js CHANGED
@@ -66,6 +66,7 @@
66
66
  svgPathGridIconViewBox: '0 0 30 30',
67
67
  menuOrder: 10,
68
68
  optionOnlyForResidents: 'onlyForResidentsMaintenanceA',
69
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenanceA',
69
70
  textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
70
71
  textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
71
72
  textAreYouSureYouWantToDelete: 'Are you sure you want to delete that request?',
@@ -104,7 +105,7 @@
104
105
  key: values.featureKey,
105
106
  aliases: values.aliases,
106
107
  singularName: values.textSingularName,
107
- description: 'Submit maintenance requests and track the progress.',
108
+ description: "Submit maintenance requests and track the progress.",
108
109
  emptyText: values.textYourRequestHere,
109
110
  widgetOptions: [{
110
111
  key: values.featureKey,
@@ -112,10 +113,22 @@
112
113
  main: true,
113
114
  hideOnTabNumbers: [],
114
115
  optionKey: values.optionOnlyForResidents,
115
- type: 'toggle',
116
+ type: "toggle",
116
117
  inverseOption: false,
117
- title: 'Limit Admins to Only Submit on Behalf of Primary Users',
118
- 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.',
118
+ title: "Limit Admins to Only Submit on Behalf of Primary Users",
119
+ 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.",
120
+ defaultNew: false,
121
+ default: false
122
+ }, {
123
+ key: values.featureKey,
124
+ widget: true,
125
+ main: true,
126
+ hideOnTabNumbers: [],
127
+ optionKey: values.optionDisableAddressAutoPopulate,
128
+ type: "toggle",
129
+ inverseOption: false,
130
+ title: "Do not auto-fill the user's address",
131
+ 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."),
119
132
  defaultNew: false,
120
133
  default: false
121
134
  }],
@@ -128,20 +141,20 @@
128
141
  url: values.routeRequestsHub,
129
142
  countProps: null,
130
143
  visibleExps: {
131
- type: 'and',
144
+ type: "and",
132
145
  exps: [{
133
- type: 'feature',
146
+ type: "feature",
134
147
  value: values.featureKey
135
148
  }, {
136
- type: 'or',
149
+ type: "or",
137
150
  exps: [{
138
- type: 'permission',
151
+ type: "permission",
139
152
  value: values.permissionMaintenanceTracking
140
153
  }, {
141
- type: 'permission',
154
+ type: "permission",
142
155
  value: values.permissionMaintenanceTypes
143
156
  }, {
144
- type: 'permission',
157
+ type: "permission",
145
158
  value: values.permissionMaintenanceAssignment
146
159
  }]
147
160
  }]
@@ -206,21 +219,21 @@
206
219
  exact: true
207
220
  }],
208
221
  env: {
209
- baseStage: '',
210
- baseAPIUrl: '',
211
- baseUploadsUrl: '',
212
- uploadBucket: '',
213
- colourBrandingMain: '',
214
- colourBrandingOff: '',
215
- colourBrandingApp: '',
216
- defaultProfileImage: '',
217
- utcOffset: '',
222
+ baseStage: "",
223
+ baseAPIUrl: "",
224
+ baseUploadsUrl: "",
225
+ uploadBucket: "",
226
+ colourBrandingMain: "",
227
+ colourBrandingOff: "",
228
+ colourBrandingApp: "",
229
+ defaultProfileImage: "",
230
+ utcOffset: "",
218
231
  hasAvailableNews: false,
219
232
  newsHaveTags: true,
220
233
  defaultAllowComments: true,
221
- makeApiKey: '',
222
- logo: '',
223
- clientName: ''
234
+ makeApiKey: "",
235
+ logo: "",
236
+ clientName: ""
224
237
  },
225
238
  init: environment => {
226
239
  FeatureConfig.env = environment;
@@ -572,7 +585,6 @@
572
585
  var jobStatusOptions = [
573
586
  {
574
587
  text: "Open",
575
- alias: "Unassigned",
576
588
  order: 0,
577
589
  color: "#d5dde4",
578
590
  category: "Not Actioned"
@@ -769,16 +781,15 @@
769
781
  } = this.props;
770
782
  const params = {};
771
783
 
772
- // Status filter: translate "All Incomplete" into the actual incomplete statuses.
773
- // Expand each status to include its `alias` so legacy DB values (e.g. "Unassigned"
774
- // for "Open") still match the filter.
784
+ // Status filter: translate "All Incomplete" into the actual incomplete statuses
775
785
  if (selectedStatusFilter) {
776
- const selectedStatusTypes = selectedStatusFilter === STATUS_IMCOMPLETE ? statusTypes.filter(s => s.category !== STATUS_COMPLETED) : statusTypes.filter(s => s.text === selectedStatusFilter);
777
- const expanded = ___default["default"].uniq(selectedStatusTypes.flatMap(s => s.alias ? [s.text, s.alias] : [s.text]));
778
- if (expanded.length > 0) {
779
- params.status = expanded.join(',');
780
- } else if (selectedStatusFilter !== STATUS_IMCOMPLETE) {
781
- // Fallback if the status isn't in statusTypes (shouldn't happen normally)
786
+ if (selectedStatusFilter === STATUS_IMCOMPLETE) {
787
+ // Exclude completed statuses - pass all non-completed status texts
788
+ const incompleteStatuses = statusTypes.filter(s => s.category !== STATUS_COMPLETED).map(s => s.text);
789
+ if (incompleteStatuses.length > 0) {
790
+ params.status = incompleteStatuses.join(',');
791
+ }
792
+ } else {
782
793
  params.status = selectedStatusFilter;
783
794
  }
784
795
  }
@@ -4290,7 +4301,7 @@
4290
4301
  if (response.data.user.phoneNumber) {
4291
4302
  contactUpdate.phone = response.data.user.phoneNumber;
4292
4303
  }
4293
- if (response.data.user.unit) {
4304
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4294
4305
  contactUpdate.room = response.data.user.unit;
4295
4306
  }
4296
4307
  // Update contact fields when data arrives
@@ -5126,7 +5137,8 @@
5126
5137
  return {
5127
5138
  auth,
5128
5139
  strings: state.strings && state.strings.config || {},
5129
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5140
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5141
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5130
5142
  };
5131
5143
  };
5132
5144
  var AddJob$1 = reactRedux.connect(mapStateToProps$2, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-maintenance-web-a",
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",