@plusscommunities/pluss-maintenance-web-forms 1.1.39 → 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 256 256',
81
81
  menuOrder: 10,
82
82
  optionOnlyForResidents: 'onlyForResidentsMaintenanceForms',
83
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenanceForms',
83
84
  textEmptyDescription: 'allows your users to submit Forms.',
84
85
  textEmptyExample: 'Example might be; Absentee form, Inspection form, Feedback form.',
85
86
  textEmptyJobTypes: 'Please add the different forms',
@@ -102,7 +103,7 @@ const values = {
102
103
  textPermissionManageAssignedMaintenance: 'Manage Assigned Form Submissions',
103
104
  textHiddenSectionMaintenanceRequests: 'Forms',
104
105
  keyHiddenSectionMaintenanceRequests: 'maintenanceRequestForms',
105
- hasMoreSection: false,
106
+ hasMoreSection: true,
106
107
  textMoreSectionMaintenance: 'Forms',
107
108
  featureKeyMoreSectionMaintenance: 'maintenanceForms',
108
109
  optionKeyMoreSectionMaintenance: 'maintenanceRequestForms',
@@ -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
  }]
@@ -191,7 +204,13 @@ const FeatureConfig = {
191
204
  defaultNew: false,
192
205
  default: false
193
206
  }],
194
- moreSections: [],
207
+ moreSections: [{
208
+ displayName: values.textMoreSectionMaintenance,
209
+ featureKey: values.featureKeyMoreSectionMaintenance,
210
+ optionKey: values.optionKeyMoreSectionMaintenance,
211
+ hiddenKey: values.hiddenKeyMoreSectionMaintenance,
212
+ inverseOption: true
213
+ }] ,
195
214
  routes: [{
196
215
  path: values.routeRequestsHub,
197
216
  component: values.screenRequestsHub,
@@ -222,21 +241,21 @@ const FeatureConfig = {
222
241
  exact: true
223
242
  }],
224
243
  env: {
225
- baseStage: '',
226
- baseAPIUrl: '',
227
- baseUploadsUrl: '',
228
- uploadBucket: '',
229
- colourBrandingMain: '',
230
- colourBrandingOff: '',
231
- colourBrandingApp: '',
232
- defaultProfileImage: '',
233
- utcOffset: '',
244
+ baseStage: "",
245
+ baseAPIUrl: "",
246
+ baseUploadsUrl: "",
247
+ uploadBucket: "",
248
+ colourBrandingMain: "",
249
+ colourBrandingOff: "",
250
+ colourBrandingApp: "",
251
+ defaultProfileImage: "",
252
+ utcOffset: "",
234
253
  hasAvailableNews: false,
235
254
  newsHaveTags: true,
236
255
  defaultAllowComments: true,
237
- makeApiKey: '',
238
- logo: '',
239
- clientName: ''
256
+ makeApiKey: "",
257
+ logo: "",
258
+ clientName: ""
240
259
  },
241
260
  init: environment => {
242
261
  FeatureConfig.env = environment;
@@ -4304,7 +4323,7 @@ class AddJob extends React.Component {
4304
4323
  if (response.data.user.phoneNumber) {
4305
4324
  contactUpdate.phone = response.data.user.phoneNumber;
4306
4325
  }
4307
- if (response.data.user.unit) {
4326
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4308
4327
  contactUpdate.room = response.data.user.unit;
4309
4328
  }
4310
4329
  // Update contact fields when data arrives
@@ -5140,7 +5159,8 @@ const mapStateToProps$2 = state => {
5140
5159
  return {
5141
5160
  auth,
5142
5161
  strings: state.strings && state.strings.config || {},
5143
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5162
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5163
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5144
5164
  };
5145
5165
  };
5146
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 256 256',
50
50
  menuOrder: 10,
51
51
  optionOnlyForResidents: 'onlyForResidentsMaintenanceForms',
52
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenanceForms',
52
53
  textEmptyDescription: 'allows your users to submit Forms.',
53
54
  textEmptyExample: 'Example might be; Absentee form, Inspection form, Feedback form.',
54
55
  textEmptyJobTypes: 'Please add the different forms',
@@ -71,7 +72,7 @@ const values = {
71
72
  textPermissionManageAssignedMaintenance: 'Manage Assigned Form Submissions',
72
73
  textHiddenSectionMaintenanceRequests: 'Forms',
73
74
  keyHiddenSectionMaintenanceRequests: 'maintenanceRequestForms',
74
- hasMoreSection: false,
75
+ hasMoreSection: true,
75
76
  textMoreSectionMaintenance: 'Forms',
76
77
  featureKeyMoreSectionMaintenance: 'maintenanceForms',
77
78
  optionKeyMoreSectionMaintenance: 'maintenanceRequestForms',
@@ -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
  }]
@@ -160,7 +173,13 @@ const FeatureConfig = {
160
173
  defaultNew: false,
161
174
  default: false
162
175
  }],
163
- moreSections: [],
176
+ moreSections: [{
177
+ displayName: values.textMoreSectionMaintenance,
178
+ featureKey: values.featureKeyMoreSectionMaintenance,
179
+ optionKey: values.optionKeyMoreSectionMaintenance,
180
+ hiddenKey: values.hiddenKeyMoreSectionMaintenance,
181
+ inverseOption: true
182
+ }] ,
164
183
  routes: [{
165
184
  path: values.routeRequestsHub,
166
185
  component: values.screenRequestsHub,
@@ -191,21 +210,21 @@ const FeatureConfig = {
191
210
  exact: true
192
211
  }],
193
212
  env: {
194
- baseStage: '',
195
- baseAPIUrl: '',
196
- baseUploadsUrl: '',
197
- uploadBucket: '',
198
- colourBrandingMain: '',
199
- colourBrandingOff: '',
200
- colourBrandingApp: '',
201
- defaultProfileImage: '',
202
- utcOffset: '',
213
+ baseStage: "",
214
+ baseAPIUrl: "",
215
+ baseUploadsUrl: "",
216
+ uploadBucket: "",
217
+ colourBrandingMain: "",
218
+ colourBrandingOff: "",
219
+ colourBrandingApp: "",
220
+ defaultProfileImage: "",
221
+ utcOffset: "",
203
222
  hasAvailableNews: false,
204
223
  newsHaveTags: true,
205
224
  defaultAllowComments: true,
206
- makeApiKey: '',
207
- logo: '',
208
- clientName: ''
225
+ makeApiKey: "",
226
+ logo: "",
227
+ clientName: ""
209
228
  },
210
229
  init: environment => {
211
230
  FeatureConfig.env = environment;
@@ -4273,7 +4292,7 @@ class AddJob extends Component {
4273
4292
  if (response.data.user.phoneNumber) {
4274
4293
  contactUpdate.phone = response.data.user.phoneNumber;
4275
4294
  }
4276
- if (response.data.user.unit) {
4295
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4277
4296
  contactUpdate.room = response.data.user.unit;
4278
4297
  }
4279
4298
  // Update contact fields when data arrives
@@ -5109,7 +5128,8 @@ const mapStateToProps$2 = state => {
5109
5128
  return {
5110
5129
  auth,
5111
5130
  strings: state.strings && state.strings.config || {},
5112
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5131
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5132
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5113
5133
  };
5114
5134
  };
5115
5135
  var AddJob$1 = connect(mapStateToProps$2, {
package/dist/index.umd.js CHANGED
@@ -69,6 +69,7 @@
69
69
  svgPathGridIconViewBox: '0 0 256 256',
70
70
  menuOrder: 10,
71
71
  optionOnlyForResidents: 'onlyForResidentsMaintenanceForms',
72
+ optionDisableAddressAutoPopulate: 'disableAddressAutoPopulateMaintenanceForms',
72
73
  textEmptyDescription: 'allows your users to submit Forms.',
73
74
  textEmptyExample: 'Example might be; Absentee form, Inspection form, Feedback form.',
74
75
  textEmptyJobTypes: 'Please add the different forms',
@@ -91,7 +92,7 @@
91
92
  textPermissionManageAssignedMaintenance: 'Manage Assigned Form Submissions',
92
93
  textHiddenSectionMaintenanceRequests: 'Forms',
93
94
  keyHiddenSectionMaintenanceRequests: 'maintenanceRequestForms',
94
- hasMoreSection: false,
95
+ hasMoreSection: true,
95
96
  textMoreSectionMaintenance: 'Forms',
96
97
  featureKeyMoreSectionMaintenance: 'maintenanceForms',
97
98
  optionKeyMoreSectionMaintenance: 'maintenanceRequestForms',
@@ -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
  }]
@@ -180,7 +193,13 @@
180
193
  defaultNew: false,
181
194
  default: false
182
195
  }],
183
- moreSections: [],
196
+ moreSections: [{
197
+ displayName: values.textMoreSectionMaintenance,
198
+ featureKey: values.featureKeyMoreSectionMaintenance,
199
+ optionKey: values.optionKeyMoreSectionMaintenance,
200
+ hiddenKey: values.hiddenKeyMoreSectionMaintenance,
201
+ inverseOption: true
202
+ }] ,
184
203
  routes: [{
185
204
  path: values.routeRequestsHub,
186
205
  component: values.screenRequestsHub,
@@ -211,21 +230,21 @@
211
230
  exact: true
212
231
  }],
213
232
  env: {
214
- baseStage: '',
215
- baseAPIUrl: '',
216
- baseUploadsUrl: '',
217
- uploadBucket: '',
218
- colourBrandingMain: '',
219
- colourBrandingOff: '',
220
- colourBrandingApp: '',
221
- defaultProfileImage: '',
222
- utcOffset: '',
233
+ baseStage: "",
234
+ baseAPIUrl: "",
235
+ baseUploadsUrl: "",
236
+ uploadBucket: "",
237
+ colourBrandingMain: "",
238
+ colourBrandingOff: "",
239
+ colourBrandingApp: "",
240
+ defaultProfileImage: "",
241
+ utcOffset: "",
223
242
  hasAvailableNews: false,
224
243
  newsHaveTags: true,
225
244
  defaultAllowComments: true,
226
- makeApiKey: '',
227
- logo: '',
228
- clientName: ''
245
+ makeApiKey: "",
246
+ logo: "",
247
+ clientName: ""
229
248
  },
230
249
  init: environment => {
231
250
  FeatureConfig.env = environment;
@@ -4293,7 +4312,7 @@
4293
4312
  if (response.data.user.phoneNumber) {
4294
4313
  contactUpdate.phone = response.data.user.phoneNumber;
4295
4314
  }
4296
- if (response.data.user.unit) {
4315
+ if (!this.props.disableAddressAutoPopulate && response.data.user.unit) {
4297
4316
  contactUpdate.room = response.data.user.unit;
4298
4317
  }
4299
4318
  // Update contact fields when data arrives
@@ -5129,7 +5148,8 @@
5129
5148
  return {
5130
5149
  auth,
5131
5150
  strings: state.strings && state.strings.config || {},
5132
- optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents)
5151
+ optionOnlyForResidents: Helper$1.getSiteSettingFromState(state, values.optionOnlyForResidents),
5152
+ disableAddressAutoPopulate: Helper$1.getSiteSettingFromState(state, values.optionDisableAddressAutoPopulate)
5133
5153
  };
5134
5154
  };
5135
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-forms",
3
- "version": "1.1.39",
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",