@plusscommunities/pluss-maintenance-web-forms 1.2.0-beta.1 → 1.2.4-beta.1

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.js CHANGED
@@ -1,88 +1,129 @@
1
- import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
2
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
1
  import { Component, useState, useEffect } from 'react';
4
2
  import { connect } from 'react-redux';
5
3
  import { withRouter } from 'react-router';
6
4
  import _ from 'lodash';
7
5
  import moment from 'moment';
8
- import { Icon } from '@plusscommunities/pluss-icons';
6
+ import FontAwesome from 'react-fontawesome';
9
7
  import * as PlussCore from '@plusscommunities/pluss-core-web';
10
- import { PERMISSION_CATEGORIES, IMPORTANCE_LEVELS, Colours as Colours$3 } from '@plusscommunities/pluss-core-web';
11
- import { Table, Dropdown, DropdownButton } from 'react-bootstrap';
8
+ import { Colours as Colours$3 } from '@plusscommunities/pluss-core-web';
9
+ import { Table, DropdownItem, DropdownButton } from 'react-bootstrap';
12
10
  import { Link } from 'react-router-dom';
13
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
12
  import Textarea from 'react-textarea-autosize';
13
+ import { faWrench, faCircleCheck, faComment } from '@fortawesome/free-solid-svg-icons';
14
+
15
+ function _typeof(o) {
16
+ "@babel/helpers - typeof";
17
+
18
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
19
+ return typeof o;
20
+ } : function (o) {
21
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
22
+ }, _typeof(o);
23
+ }
24
+
25
+ function toPrimitive(t, r) {
26
+ if ("object" != _typeof(t) || !t) return t;
27
+ var e = t[Symbol.toPrimitive];
28
+ if (void 0 !== e) {
29
+ var i = e.call(t, r || "default");
30
+ if ("object" != _typeof(i)) return i;
31
+ throw new TypeError("@@toPrimitive must return a primitive value.");
32
+ }
33
+ return ("string" === r ? String : Number)(t);
34
+ }
35
+
36
+ function toPropertyKey(t) {
37
+ var i = toPrimitive(t, "string");
38
+ return "symbol" == _typeof(i) ? i : i + "";
39
+ }
40
+
41
+ function _defineProperty(e, r, t) {
42
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
43
+ value: t,
44
+ enumerable: !0,
45
+ configurable: !0,
46
+ writable: !0
47
+ }) : e[r] = t, e;
48
+ }
15
49
 
16
50
  var values = {
17
- featureKey: "maintenanceForms",
18
- aliases: ["maintenanceTrackingForms", "maintenanceTypesForms", "maintenancerequestForms"],
19
- serviceKey: "maintenanceForms",
20
- reducerKey: "maintenanceForms",
21
- analyticsKey: "maintenancerequestForms",
22
- commentKey: "maintenanceForms",
23
- actionJobsLoaded: "JOBS_LOADEDForms",
24
- actionJobsRemoved: "JOBS_REMOVEDForms",
25
- actionJobsTypesLoaded: "JOBS_TYPES_LOADEDForms",
26
- actionJobsStatusesLoaded: "JOBS_STATUSES_LOADEDForms",
27
- actionJobsHideSeen: "JOBS_HIDE_UNSEENForms",
28
- actionJobsLoading: "JOBS_LOADINGForms",
29
- permissionMaintenanceTracking: "maintenanceTrackingForms",
30
- permissionMaintenanceTypes: "maintenanceTypesForms",
31
- permissionMaintenanceAssignment: "maintenanceAssignmentForms",
32
- activityMaintenanceJobStatusChanged: "MaintenanceJobStatusChangedForms",
33
- activityAddMaintenanceJob: "AddMaintenanceJobForms",
34
- activityEditMaintenanceJob: "EditMaintenanceJobForms",
35
- activityDeleteMaintenanceJob: "DeleteMaintenanceJobForms",
36
- routeRequestsHub: "/requestsHubForms",
37
- routeAddRequest: "/requestsHubForms/job",
38
- routeAddRequestType: "/requestsHubForms/requestType",
39
- routeRequestDetails: "/requestsHubForms/jobDetails",
40
- routeRequestTypes: "/requestTypesForms",
41
- screenRequestsHub: "RequestsHubForms",
42
- screenAddJob: "AddJobForms",
43
- screenAddJobType: "AddJobTypeForms",
44
- screenJob: "JobForms",
45
- screenJobTypes: "JobTypesForms",
46
- menuIcon: "form",
51
+ featureKey: 'maintenanceForms',
52
+ aliases: ['maintenanceTrackingForms', 'maintenanceTypesForms', 'maintenancerequestForms'],
53
+ serviceKey: 'maintenanceForms',
54
+ reducerKey: 'maintenanceForms',
55
+ analyticsKey: 'maintenancerequestForms',
56
+ commentKey: 'maintenanceForms',
57
+ actionJobsLoaded: 'JOBS_LOADEDForms',
58
+ actionJobsAdded: 'JOBS_ADDEDForms',
59
+ actionJobsRemoved: 'JOBS_REMOVEDForms',
60
+ actionJobsTypesLoaded: 'JOBS_TYPES_LOADEDForms',
61
+ actionJobsStatusesLoaded: 'JOBS_STATUSES_LOADEDForms',
62
+ actionJobsHideSeen: 'JOBS_HIDE_UNSEENForms',
63
+ actionJobsLoading: 'JOBS_LOADINGForms',
64
+ permissionMaintenanceTracking: 'maintenanceTrackingForms',
65
+ permissionMaintenanceTypes: 'maintenanceTypesForms',
66
+ permissionMaintenanceAssignment: 'maintenanceAssignmentForms',
67
+ activityMaintenanceJobStatusChanged: 'MaintenanceJobStatusChangedForms',
68
+ activityAddMaintenanceJob: 'AddMaintenanceJobForms',
69
+ activityEditMaintenanceJob: 'EditMaintenanceJobForms',
70
+ activityDeleteMaintenanceJob: 'DeleteMaintenanceJobForms',
71
+ routeRequestsHub: '/requestsHubForms',
72
+ routeAddRequest: '/requestsHubForms/job',
73
+ routeAddRequestType: '/requestsHubForms/requestType',
74
+ routeRequestDetails: '/requestsHubForms/jobDetails',
75
+ routeRequestTypes: '/requestTypesForms',
76
+ screenRequestsHub: 'RequestsHubForms',
77
+ screenAddJob: 'AddJobForms',
78
+ screenAddJobType: 'AddJobTypeForms',
79
+ screenJob: 'JobForms',
80
+ screenJobTypes: 'JobTypesForms',
81
+ menuIcon: 'form',
47
82
  isFontAwesomeIcon: false,
48
83
  isSVGIcon: true,
49
- svgPathGridIcon: "M164,152a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,152Zm-4-36H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm52-68V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V48A12,12,0,0,1,56,36H94.08a44,44,0,0,1,67.84,0H200A12,12,0,0,1,212,48ZM92,64v4h72V64a36,36,0,0,0-72,0ZM204,48a4,4,0,0,0-4-4H167.17A43.71,43.71,0,0,1,172,64v8a4,4,0,0,1-4,4H88a4,4,0,0,1-4-4V64a43.71,43.71,0,0,1,4.83-20H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200a4,4,0,0,0,4-4Z",
50
- svgPathGridIconViewBox: "0 0 256 256",
84
+ svgPathGridIcon: 'M164,152a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,152Zm-4-36H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm52-68V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V48A12,12,0,0,1,56,36H94.08a44,44,0,0,1,67.84,0H200A12,12,0,0,1,212,48ZM92,64v4h72V64a36,36,0,0,0-72,0ZM204,48a4,4,0,0,0-4-4H167.17A43.71,43.71,0,0,1,172,64v8a4,4,0,0,1-4,4H88a4,4,0,0,1-4-4V64a43.71,43.71,0,0,1,4.83-20H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200a4,4,0,0,0,4-4Z',
85
+ svgPathGridIconViewBox: '0 0 256 256',
51
86
  menuOrder: 10,
52
- optionOnlyForResidents: "onlyForResidentsMaintenanceForms",
53
- textEmptyDescription: "allows your users to submit Forms.",
54
- textEmptyExample: "Example might be; Absentee form, Inspection form, Feedback form.",
55
- textEmptyJobTypes: "Please add the different forms",
56
- textEmptyJobTypesExample: "Example might be; Absentee form, Inspection form, Feedback form.",
57
- textNewTypeButton: "NEW FORM",
58
- textTitleJobTypes: "Forms",
59
- textJobType: "Form",
60
- textAreYouSureYouWantToDelete: "Are you sure you want to delete that form submission?",
61
- textAreYouSureYouWantToDeleteNote: "Are you sure you want to delete that note?",
87
+ optionOnlyForResidents: 'onlyForResidentsMaintenanceForms',
88
+ textEmptyDescription: 'allows your users to submit Forms.',
89
+ textEmptyExample: 'Example might be; Absentee form, Inspection form, Feedback form.',
90
+ textEmptyJobTypes: 'Please add the different forms',
91
+ textEmptyJobTypesExample: 'Example might be; Absentee form, Inspection form, Feedback form.',
92
+ textNewTypeButton: 'NEW FORM',
93
+ textTitleJobTypes: 'Forms',
94
+ textJobType: 'Form',
95
+ textAreYouSureYouWantToDelete: 'Are you sure you want to delete that form submission?',
96
+ textAreYouSureYouWantToDeleteNote: 'Are you sure you want to delete that note?',
62
97
  textChangedRequestStatus: "changed a form submission's status:",
63
- textAddedRequest: "added a form submission:",
64
- textEditedRequest: "edited a form submission:",
65
- textRemovedRequest: "removed a form submission:",
66
- textSingularName: "Form Submission",
67
- textYourRequestHere: "Your Form Submissions will show here",
68
- textTitleRequests: "Forms",
69
- textMenuTitle: "Forms",
70
- textPermissionMaintenanceTracking: "Manage Form Submissions",
71
- textPermissionManageMaintenanceTypes: "Manage and Set Up Forms",
72
- textPermissionManageAssignedMaintenance: "Manage Assigned Form Submissions",
73
- textHiddenSectionMaintenanceRequests: "Forms",
74
- keyHiddenSectionMaintenanceRequests: "maintenanceRequestForms",
98
+ textAddedRequest: 'added a form submission:',
99
+ textEditedRequest: 'edited a form submission:',
100
+ textRemovedRequest: 'removed a form submission:',
101
+ textSingularName: 'Form Submission',
102
+ textYourRequestHere: 'Your Form Submissions will show here',
103
+ textTitleRequests: 'Forms',
104
+ textMenuTitle: 'Forms',
105
+ textPermissionMaintenanceTracking: 'Manage Form Submissions',
106
+ textPermissionManageMaintenanceTypes: 'Manage and Set Up Forms',
107
+ textPermissionManageAssignedMaintenance: 'Manage Assigned Form Submissions',
108
+ textHiddenSectionMaintenanceRequests: 'Forms',
109
+ keyHiddenSectionMaintenanceRequests: 'maintenanceRequestForms',
75
110
  hasMoreSection: false,
76
- textMoreSectionMaintenance: "Forms",
77
- featureKeyMoreSectionMaintenance: "maintenanceForms",
78
- optionKeyMoreSectionMaintenance: "maintenanceRequestForms",
79
- hiddenKeyMoreSectionMaintenance: "maintenanceRequestForms",
111
+ textMoreSectionMaintenance: 'Forms',
112
+ featureKeyMoreSectionMaintenance: 'maintenanceForms',
113
+ optionKeyMoreSectionMaintenance: 'maintenanceRequestForms',
114
+ hiddenKeyMoreSectionMaintenance: 'maintenanceRequestForms',
80
115
  forceCustomFields: true,
81
- textEntityName: "Form Submission",
116
+ textEntityName: 'Form Submission',
82
117
  hasHelpButton: true,
83
- helpGuideURL: "https://www.plusscommunities.com/forms-feature",
84
- stringConfigJobStatus: "maintenanceJobStatusForms",
85
- stringConfigHideSeen: "maintenanceDisableSeenForms"
118
+ helpGuideURL: 'https://www.plusscommunities.com/forms-feature',
119
+ stringConfigJobStatus: 'maintenanceJobStatusForms',
120
+ stringConfigHideSeen: 'maintenanceDisableSeenForms',
121
+ // Comment subscription notification preference
122
+ notificationPreference: {
123
+ key: 'maintenancerequestFormsComments',
124
+ label: 'Forms comments',
125
+ permission: 'maintenanceTrackingForms'
126
+ }
86
127
  };
87
128
 
88
129
  // import * as PlussCore from '../../pluss-core/src';
@@ -90,7 +131,7 @@ var FeatureConfig = {
90
131
  key: values.featureKey,
91
132
  aliases: values.aliases,
92
133
  singularName: values.textSingularName,
93
- description: "Submit maintenance requests and track the progress.",
134
+ description: 'Submit maintenance requests and track the progress.',
94
135
  emptyText: values.textYourRequestHere,
95
136
  widgetOptions: [{
96
137
  key: values.featureKey,
@@ -98,10 +139,10 @@ var FeatureConfig = {
98
139
  main: true,
99
140
  hideOnTabNumbers: [],
100
141
  optionKey: values.optionOnlyForResidents,
101
- type: "toggle",
142
+ type: 'toggle',
102
143
  inverseOption: false,
103
- title: "Limit Admins to Only Submit on Behalf of Primary Users",
104
- 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.",
144
+ title: 'Limit Admins to Only Submit on Behalf of Primary Users',
145
+ 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.',
105
146
  defaultNew: false,
106
147
  default: false
107
148
  }],
@@ -114,20 +155,20 @@ var FeatureConfig = {
114
155
  url: values.routeRequestsHub,
115
156
  countProps: null,
116
157
  visibleExps: {
117
- type: "and",
158
+ type: 'and',
118
159
  exps: [{
119
- type: "feature",
160
+ type: 'feature',
120
161
  value: values.featureKey
121
162
  }, {
122
- type: "or",
163
+ type: 'or',
123
164
  exps: [{
124
- type: "permission",
165
+ type: 'permission',
125
166
  value: values.permissionMaintenanceTracking
126
167
  }, {
127
- type: "permission",
168
+ type: 'permission',
128
169
  value: values.permissionMaintenanceTypes
129
170
  }, {
130
- type: "permission",
171
+ type: 'permission',
131
172
  value: values.permissionMaintenanceAssignment
132
173
  }]
133
174
  }]
@@ -139,24 +180,15 @@ var FeatureConfig = {
139
180
  permissions: [{
140
181
  displayName: values.textPermissionMaintenanceTracking,
141
182
  key: values.permissionMaintenanceTracking,
142
- hq: false,
143
- category: PERMISSION_CATEGORIES.FACILITIES_BOOKINGS,
144
- helperText: "Allows tracking and managing maintenance requests and job status updates.",
145
- importance: IMPORTANCE_LEVELS.IMPORTANT
183
+ hq: false
146
184
  }, {
147
185
  displayName: values.textPermissionManageMaintenanceTypes,
148
186
  key: values.permissionMaintenanceTypes,
149
- hq: false,
150
- category: PERMISSION_CATEGORIES.FACILITIES_BOOKINGS,
151
- helperText: "Allows creating and configuring maintenance request types and categories.",
152
- importance: IMPORTANCE_LEVELS.IMPORTANT
187
+ hq: false
153
188
  }, {
154
189
  displayName: values.textPermissionManageAssignedMaintenance,
155
190
  key: values.permissionMaintenanceAssignment,
156
- hq: false,
157
- category: PERMISSION_CATEGORIES.FACILITIES_BOOKINGS,
158
- helperText: "Allows assigning and managing assigned maintenance requests.",
159
- importance: IMPORTANCE_LEVELS.IMPORTANT
191
+ hq: false
160
192
  }],
161
193
  hiddenSections: [{
162
194
  displayName: values.textHiddenSectionMaintenanceRequests,
@@ -195,29 +227,57 @@ var FeatureConfig = {
195
227
  exact: true
196
228
  }],
197
229
  env: {
198
- baseStage: "",
199
- baseAPIUrl: "",
200
- baseUploadsUrl: "",
201
- uploadBucket: "",
202
- colourBrandingMain: "",
203
- colourBrandingOff: "",
204
- colourBrandingApp: "",
205
- defaultProfileImage: "",
206
- utcOffset: "",
230
+ baseStage: '',
231
+ baseAPIUrl: '',
232
+ baseUploadsUrl: '',
233
+ uploadBucket: '',
234
+ colourBrandingMain: '',
235
+ colourBrandingOff: '',
236
+ colourBrandingApp: '',
237
+ defaultProfileImage: '',
238
+ utcOffset: '',
207
239
  hasAvailableNews: false,
208
240
  newsHaveTags: true,
209
241
  defaultAllowComments: true,
210
- makeApiKey: "",
211
- logo: "",
212
- clientName: ""
242
+ makeApiKey: '',
243
+ logo: '',
244
+ clientName: ''
213
245
  },
214
246
  init: environment => {
215
247
  FeatureConfig.env = environment;
216
248
  PlussCore.Config.init(environment);
217
- }
249
+ },
250
+ notificationPreference: values.notificationPreference
218
251
  };
219
252
 
253
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
254
+ try {
255
+ var i = n[a](c),
256
+ u = i.value;
257
+ } catch (n) {
258
+ return void e(n);
259
+ }
260
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
261
+ }
262
+ function _asyncToGenerator(n) {
263
+ return function () {
264
+ var t = this,
265
+ e = arguments;
266
+ return new Promise(function (r, o) {
267
+ var a = n.apply(t, e);
268
+ function _next(n) {
269
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
270
+ }
271
+ function _throw(n) {
272
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
273
+ }
274
+ _next(void 0);
275
+ });
276
+ };
277
+ }
278
+
220
279
  var JOBS_LOADED = values.actionJobsLoaded;
280
+ var JOBS_ADDED = values.actionJobsAdded;
221
281
  var JOBS_LOADING = values.actionJobsLoading;
222
282
  var JOBS_REMOVED = values.actionJobsRemoved;
223
283
  var JOBS_TYPES_LOADED = values.actionJobsTypesLoaded;
@@ -232,9 +292,9 @@ var {
232
292
  } = PlussCore;
233
293
  var maintenanceActions = {
234
294
  getJobType: (site, typeId) => {
235
- var url = Helper$5.getUrl(values.serviceKey, "getjobtype");
295
+ var url = Helper$5.getUrl(values.serviceKey, 'getjobtype');
236
296
  return Session$9.authedFunction({
237
- method: "POST",
297
+ method: 'POST',
238
298
  url,
239
299
  data: {
240
300
  site,
@@ -243,9 +303,9 @@ var maintenanceActions = {
243
303
  });
244
304
  },
245
305
  getJobTypes: (site, id) => {
246
- var url = Helper$5.getUrl(values.serviceKey, "getjobtypes");
306
+ var url = Helper$5.getUrl(values.serviceKey, 'getjobtypes');
247
307
  return Session$9.authedFunction({
248
- method: "POST",
308
+ method: 'POST',
249
309
  url,
250
310
  data: {
251
311
  site
@@ -253,9 +313,9 @@ var maintenanceActions = {
253
313
  });
254
314
  },
255
315
  getJob: (site, id) => {
256
- var url = Helper$5.getUrl(values.serviceKey, "getJob");
316
+ var url = Helper$5.getUrl(values.serviceKey, 'getJob');
257
317
  return Session$9.authedFunction({
258
- method: "POST",
318
+ method: 'POST',
259
319
  url,
260
320
  data: {
261
321
  site,
@@ -264,9 +324,9 @@ var maintenanceActions = {
264
324
  });
265
325
  },
266
326
  getJobByJobId: (site, jobId) => {
267
- var url = Helper$5.getUrl(values.serviceKey, "getJob");
327
+ var url = Helper$5.getUrl(values.serviceKey, 'getJob');
268
328
  return Session$9.authedFunction({
269
- method: "POST",
329
+ method: 'POST',
270
330
  url,
271
331
  data: {
272
332
  site,
@@ -275,11 +335,11 @@ var maintenanceActions = {
275
335
  });
276
336
  },
277
337
  getJobs: function getJobs(site) {
278
- var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
279
- var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
338
+ var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
339
+ var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
280
340
  return Session$9.authedFunction({
281
- method: "POST",
282
- url: Helper$5.getUrl(values.serviceKey, "getJobs"),
341
+ method: 'POST',
342
+ url: Helper$5.getUrl(values.serviceKey, 'getJobs'),
283
343
  data: {
284
344
  site,
285
345
  status,
@@ -287,47 +347,67 @@ var maintenanceActions = {
287
347
  }
288
348
  });
289
349
  },
290
- getJobs2: (site, status, type, lastKey) => {
350
+ getJobs2: (site, status, priority, type, lastKey, assignee, startTime, endTime, search) => {
291
351
  var query = {
292
352
  site
293
353
  };
294
354
  if (status) {
295
355
  query.status = status;
296
356
  }
357
+ if (priority) {
358
+ query.priority = priority;
359
+ }
297
360
  if (type) {
298
361
  query.type = type;
299
362
  }
300
363
  if (lastKey) {
301
364
  query.lastKey = JSON.stringify(lastKey);
302
365
  }
366
+ if (assignee) {
367
+ query.assignee = assignee;
368
+ }
369
+ if (startTime) {
370
+ query.startTime = startTime;
371
+ }
372
+ if (endTime) {
373
+ query.endTime = endTime;
374
+ }
375
+ if (search) {
376
+ query.search = search;
377
+ }
303
378
  return Session$9.authedFunction({
304
- method: "GET",
305
- url: Helper$5.getUrl(values.serviceKey, "get/requests", query)
379
+ method: 'GET',
380
+ url: Helper$5.getUrl(values.serviceKey, 'get/requests', query)
306
381
  });
307
382
  },
383
+ /**
384
+ * @deprecated Use getJobs2 with pagination instead.
385
+ * This method recursively fetches ALL pages which can be slow for large datasets.
386
+ * For better performance, use getJobs2 directly and implement pagination in the UI.
387
+ */
308
388
  getJobsRecursive: function getJobsRecursive(site, status, type, lastKey) {
309
389
  var jobs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
310
- return new Promise(resolve => {
311
- maintenanceActions.getJobs2(site, status, type, lastKey).then(jobRes => {
390
+ return new Promise((resolve, reject) => {
391
+ maintenanceActions.getJobs2(site, status, undefined, type, lastKey).then(jobRes => {
312
392
  var newJobs = [...jobs, ...jobRes.data.Items];
313
393
  if (!jobRes.data.LastKey) {
314
394
  return resolve(newJobs);
315
395
  }
316
- return resolve(maintenanceActions.getJobsRecursive(site, status, type, jobRes.data.LastKey, newJobs));
317
- });
396
+ maintenanceActions.getJobsRecursive(site, status, type, jobRes.data.LastKey, newJobs).then(resolve).catch(reject);
397
+ }).catch(reject);
318
398
  });
319
399
  },
320
400
  createJob: job => {
321
401
  return Session$9.authedFunction({
322
- method: "POST",
323
- url: Helper$5.getUrl(values.serviceKey, "sendMaintenance"),
402
+ method: 'POST',
403
+ url: Helper$5.getUrl(values.serviceKey, 'sendMaintenance'),
324
404
  data: _objectSpread$7({}, job)
325
405
  });
326
406
  },
327
407
  editJob: (job, site) => {
328
408
  return Session$9.authedFunction({
329
- method: "POST",
330
- url: Helper$5.getUrl(values.serviceKey, "editJob"),
409
+ method: 'POST',
410
+ url: Helper$5.getUrl(values.serviceKey, 'editJob'),
331
411
  data: {
332
412
  job,
333
413
  site
@@ -336,8 +416,8 @@ var maintenanceActions = {
336
416
  },
337
417
  deleteJob: (site, id) => {
338
418
  return Session$9.authedFunction({
339
- method: "POST",
340
- url: Helper$5.getUrl(values.serviceKey, "requests/remove"),
419
+ method: 'POST',
420
+ url: Helper$5.getUrl(values.serviceKey, 'requests/remove'),
341
421
  data: {
342
422
  site,
343
423
  id
@@ -346,8 +426,8 @@ var maintenanceActions = {
346
426
  },
347
427
  editJobStatus: (id, status) => {
348
428
  return Session$9.authedFunction({
349
- method: "POST",
350
- url: Helper$5.getUrl(values.serviceKey, "editJobStatus"),
429
+ method: 'POST',
430
+ url: Helper$5.getUrl(values.serviceKey, 'editJobStatus'),
351
431
  data: {
352
432
  id,
353
433
  status
@@ -356,8 +436,8 @@ var maintenanceActions = {
356
436
  },
357
437
  editJobPriority: (id, priority) => {
358
438
  return Session$9.authedFunction({
359
- method: "POST",
360
- url: Helper$5.getUrl(values.serviceKey, "update/priority"),
439
+ method: 'POST',
440
+ url: Helper$5.getUrl(values.serviceKey, 'update/priority'),
361
441
  data: {
362
442
  id,
363
443
  priority
@@ -366,8 +446,8 @@ var maintenanceActions = {
366
446
  },
367
447
  assignJob: (jobId, userId) => {
368
448
  return Session$9.authedFunction({
369
- method: "POST",
370
- url: Helper$5.getUrl(values.serviceKey, "update/assign"),
449
+ method: 'POST',
450
+ url: Helper$5.getUrl(values.serviceKey, 'update/assign'),
371
451
  data: {
372
452
  id: jobId,
373
453
  userId
@@ -376,47 +456,47 @@ var maintenanceActions = {
376
456
  },
377
457
  getAssignees: site => {
378
458
  return Session$9.authedFunction({
379
- method: "GET",
380
- url: Helper$5.getUrl(values.serviceKey, "get/assignees", {
459
+ method: 'GET',
460
+ url: Helper$5.getUrl(values.serviceKey, 'get/assignees', {
381
461
  site
382
462
  })
383
463
  });
384
464
  },
385
465
  addNote: (jobId, note, attachments, images) => {
386
466
  return Session$9.authedFunction({
387
- method: "POST",
388
- url: Helper$5.getUrl(values.serviceKey, "requests/note"),
467
+ method: 'POST',
468
+ url: Helper$5.getUrl(values.serviceKey, 'requests/note'),
389
469
  data: {
390
470
  id: jobId,
391
471
  note,
392
472
  attachments,
393
473
  images,
394
- action: "AddNote"
474
+ action: 'AddNote'
395
475
  }
396
476
  });
397
477
  },
398
478
  editNote: (jobId, noteId, note, attachments, images) => {
399
479
  return Session$9.authedFunction({
400
- method: "POST",
401
- url: Helper$5.getUrl(values.serviceKey, "requests/note"),
480
+ method: 'POST',
481
+ url: Helper$5.getUrl(values.serviceKey, 'requests/note'),
402
482
  data: {
403
483
  id: jobId,
404
484
  note,
405
485
  attachments,
406
486
  images,
407
487
  noteId,
408
- action: "EditNote"
488
+ action: 'EditNote'
409
489
  }
410
490
  });
411
491
  },
412
492
  deleteNote: (jobId, noteId) => {
413
493
  return Session$9.authedFunction({
414
- method: "POST",
415
- url: Helper$5.getUrl(values.serviceKey, "requests/note"),
494
+ method: 'POST',
495
+ url: Helper$5.getUrl(values.serviceKey, 'requests/note'),
416
496
  data: {
417
497
  id: jobId,
418
498
  noteId,
419
- action: "DeleteNote"
499
+ action: 'DeleteNote'
420
500
  }
421
501
  });
422
502
  },
@@ -431,8 +511,8 @@ var maintenanceActions = {
431
511
  customFields: customFields || []
432
512
  };
433
513
  return Session$9.authedFunction({
434
- method: "POST",
435
- url: Helper$5.getUrl(values.serviceKey, "createJobType"),
514
+ method: 'POST',
515
+ url: Helper$5.getUrl(values.serviceKey, 'createJobType'),
436
516
  data
437
517
  });
438
518
  },
@@ -449,15 +529,15 @@ var maintenanceActions = {
449
529
  };
450
530
  if (hasCustomFields && customFields) data.customFields = customFields;
451
531
  return Session$9.authedFunction({
452
- method: "POST",
453
- url: Helper$5.getUrl(values.serviceKey, "editJobType"),
532
+ method: 'POST',
533
+ url: Helper$5.getUrl(values.serviceKey, 'editJobType'),
454
534
  data
455
535
  });
456
536
  },
457
537
  deleteJobType: (site, id) => {
458
538
  return Session$9.authedFunction({
459
- method: "POST",
460
- url: Helper$5.getUrl(values.serviceKey, "deleteJobType"),
539
+ method: 'POST',
540
+ url: Helper$5.getUrl(values.serviceKey, 'deleteJobType'),
461
541
  data: {
462
542
  site,
463
543
  id
@@ -466,16 +546,16 @@ var maintenanceActions = {
466
546
  },
467
547
  getExternalSync: jobId => {
468
548
  return Session$9.authedFunction({
469
- method: "GET",
470
- url: Helper$5.getUrl(values.serviceKey, "get/externalsync", {
549
+ method: 'GET',
550
+ url: Helper$5.getUrl(values.serviceKey, 'get/externalsync', {
471
551
  id: jobId
472
552
  })
473
553
  });
474
554
  },
475
555
  retrySync: jobId => {
476
556
  return Session$9.authedFunction({
477
- method: "POST",
478
- url: Helper$5.getUrl(values.serviceKey, "update/retrysync"),
557
+ method: 'POST',
558
+ url: Helper$5.getUrl(values.serviceKey, 'update/retrysync'),
479
559
  data: {
480
560
  id: jobId
481
561
  }
@@ -501,8 +581,8 @@ var reactionActions = {
501
581
  data.image = image;
502
582
  }
503
583
  return Session$8.authedFunction({
504
- method: "POST",
505
- url: Helper$4.getUrl("reactions", "comments/add"),
584
+ method: 'POST',
585
+ url: Helper$4.getUrl('reactions', 'comments/add'),
506
586
  data
507
587
  });
508
588
  },
@@ -524,8 +604,8 @@ var reactionActions = {
524
604
  query.minTime = minTime;
525
605
  }
526
606
  return Session$8.authedFunction({
527
- method: "GET",
528
- url: Helper$4.getUrl("reactions", "comments/get", query)
607
+ method: 'GET',
608
+ url: Helper$4.getUrl('reactions', 'comments/get', query)
529
609
  });
530
610
  }
531
611
  };
@@ -566,12 +646,13 @@ var jobsUpdate = (site, isdashboard) => {
566
646
  if (isdashboard) dispatch({
567
647
  type: JOBS_LOADING
568
648
  });
569
- maintenanceActions.getJobsRecursive(site).then(res => {
570
- var currentSite = Helper$3.readStorageWithCookie("site");
571
- if (!_.isEmpty(res) && res[0].site === currentSite) {
649
+ maintenanceActions.getJobs2(site).then(res => {
650
+ var currentSite = Helper$3.readStorageWithCookie('site');
651
+ var jobs = res.data.Items;
652
+ if (!_.isEmpty(jobs) && jobs[0].site === currentSite) {
572
653
  dispatch({
573
654
  type: JOBS_LOADED,
574
- payload: res
655
+ payload: jobs
575
656
  });
576
657
  } else {
577
658
  dispatch({
@@ -579,6 +660,12 @@ var jobsUpdate = (site, isdashboard) => {
579
660
  payload: []
580
661
  });
581
662
  }
663
+ }).catch(error => {
664
+ console.error('jobsUpdate error', error);
665
+ dispatch({
666
+ type: JOBS_LOADED,
667
+ payload: []
668
+ });
582
669
  });
583
670
  };
584
671
  };
@@ -588,6 +675,12 @@ var jobsLoaded = events => {
588
675
  payload: events
589
676
  };
590
677
  };
678
+ var jobsAdded = events => {
679
+ return {
680
+ type: JOBS_ADDED,
681
+ payload: events
682
+ };
683
+ };
591
684
  var removeJob = id => {
592
685
  return {
593
686
  type: JOBS_REMOVED,
@@ -708,10 +801,10 @@ var jobPriorityOptions = [
708
801
  }
709
802
  ];
710
803
 
711
- var STATUS_IMCOMPLETE = "All Incomplete";
712
- var STATUS_NOT_ACTIONED = "Not Actioned";
713
- var STATUS_IN_PROGRESS = "In Progress";
714
- var STATUS_COMPLETED = "Completed";
804
+ var STATUS_IMCOMPLETE = 'All Incomplete';
805
+ var STATUS_NOT_ACTIONED = 'Not Actioned';
806
+ var STATUS_IN_PROGRESS = 'In Progress';
807
+ var STATUS_COMPLETED = 'Completed';
715
808
  var getDefaultPriority = () => jobPriorityOptions.find(p => p.default);
716
809
  var getJobPriority = priority => {
717
810
  var priorityOption = null;
@@ -736,25 +829,75 @@ class JobList extends Component {
736
829
  id: j.userID,
737
830
  displayName: j.userName,
738
831
  profilePic: j.userProfilePic
739
- })), "id"), "displayName", "asc");
832
+ })), 'id'), 'displayName', 'asc');
740
833
  this.setState({
741
834
  requesters
742
835
  });
743
836
  });
744
- _defineProperty(this, "getJobs", /*#__PURE__*/_asyncToGenerator(function* () {
837
+ _defineProperty(this, "refresh", () => {
745
838
  var {
746
839
  auth
747
- } = _this.props;
748
- try {
749
- var res = yield maintenanceActions.getJobsRecursive(auth.site);
750
- if (!_.isEmpty(res) && res[0].site === auth.site) {
751
- _this.setRequesters(res);
752
- _this.props.jobsLoaded(res);
840
+ } = this.props;
841
+ this.setState({
842
+ loading: true,
843
+ lastKey: null,
844
+ hasMore: true
845
+ }, /*#__PURE__*/_asyncToGenerator(function* () {
846
+ try {
847
+ var statusForApi = _this.state.selectedStatusFilter === STATUS_IMCOMPLETE ? undefined : _this.state.selectedStatusFilter;
848
+ var res = yield maintenanceActions.getJobs2(auth.site, statusForApi, _this.state.selectedPriorityFilter, _this.state.selectedTypeFilter, null,
849
+ // first page
850
+ _this.state.selectedUserFilter, _this.state.selectedTimeFilterStart, _this.state.selectedTimeFilterEnd, _this.state.search);
851
+ var jobs = res.data.Items;
852
+ var lastKey = res.data.LastKey;
853
+ _this.setRequesters(jobs);
854
+ _this.props.jobsLoaded(jobs);
855
+ _this.setState({
856
+ lastKey,
857
+ hasMore: !!lastKey,
858
+ loading: false
859
+ });
860
+ } catch (error) {
861
+ console.error('refresh error', error);
862
+ _this.setState({
863
+ loading: false
864
+ });
753
865
  }
754
- } catch (error) {
755
- console.error("getJobs", error);
756
- }
757
- }));
866
+ }));
867
+ });
868
+ _defineProperty(this, "loadMore", () => {
869
+ var {
870
+ auth
871
+ } = this.props;
872
+ var {
873
+ loading,
874
+ loadingMore,
875
+ hasMore,
876
+ lastKey
877
+ } = this.state;
878
+ if (loading || loadingMore || !hasMore || !lastKey) return;
879
+ this.setState({
880
+ loadingMore: true
881
+ }, /*#__PURE__*/_asyncToGenerator(function* () {
882
+ try {
883
+ var statusForApi = _this.state.selectedStatusFilter === STATUS_IMCOMPLETE ? undefined : _this.state.selectedStatusFilter;
884
+ var res = yield maintenanceActions.getJobs2(auth.site, statusForApi, _this.state.selectedPriorityFilter, _this.state.selectedTypeFilter, lastKey, _this.state.selectedUserFilter, _this.state.selectedTimeFilterStart, _this.state.selectedTimeFilterEnd, _this.state.search);
885
+ var newJobs = res.data.Items;
886
+ var newLastKey = res.data.LastKey;
887
+ _this.props.jobsAdded(newJobs);
888
+ _this.setState({
889
+ lastKey: newLastKey,
890
+ hasMore: !!newLastKey,
891
+ loadingMore: false
892
+ });
893
+ } catch (error) {
894
+ console.error('loadMore error', error);
895
+ _this.setState({
896
+ loadingMore: false
897
+ });
898
+ }
899
+ }));
900
+ });
758
901
  _defineProperty(this, "getAssignees", /*#__PURE__*/_asyncToGenerator(function* () {
759
902
  try {
760
903
  var res = yield maintenanceActions.getAssignees(_this.props.auth.site);
@@ -762,7 +905,7 @@ class JobList extends Component {
762
905
  assignees: res.data.Users
763
906
  });
764
907
  } catch (error) {
765
- console.error("getAssignees", error);
908
+ console.error('getAssignees', error);
766
909
  }
767
910
  }));
768
911
  _defineProperty(this, "sortByCol", col => {
@@ -782,20 +925,20 @@ class JobList extends Component {
782
925
  }
783
926
  });
784
927
  _defineProperty(this, "onRemoveRequest", /*#__PURE__*/function () {
785
- var _ref3 = _asyncToGenerator(function* (request) {
928
+ var _ref4 = _asyncToGenerator(function* (request) {
786
929
  if (window.confirm(values.textAreYouSureYouWantToDelete)) {
787
930
  _this.props.removeJob(request.id);
788
931
  try {
789
932
  yield maintenanceActions.deleteJob(_this.props.auth.site, request.id);
790
- _this.getJobs();
933
+ _this.refresh();
791
934
  } catch (error) {
792
- console.log("onRemoveRequest", error);
793
- alert("Something went wrong with the request. Please try again.");
935
+ console.log('onRemoveRequest', error);
936
+ alert('Something went wrong with the request. Please try again.');
794
937
  }
795
938
  }
796
939
  });
797
940
  return function (_x) {
798
- return _ref3.apply(this, arguments);
941
+ return _ref4.apply(this, arguments);
799
942
  };
800
943
  }());
801
944
  _defineProperty(this, "openFilter", filter => {
@@ -809,22 +952,22 @@ class JobList extends Component {
809
952
  });
810
953
  });
811
954
  _defineProperty(this, "selectTypeFilter", filter => {
955
+ this.closeFilter();
812
956
  this.setState({
813
957
  selectedTypeFilter: filter
814
- });
815
- this.closeFilter();
958
+ }, () => this.refresh());
816
959
  });
817
960
  _defineProperty(this, "selectPriorityFilter", filter => {
961
+ this.closeFilter();
818
962
  this.setState({
819
963
  selectedPriorityFilter: filter
820
- });
821
- this.closeFilter();
964
+ }, () => this.refresh());
822
965
  });
823
966
  _defineProperty(this, "selectStatusFilter", filter => {
967
+ this.closeFilter();
824
968
  this.setState({
825
969
  selectedStatusFilter: filter
826
- });
827
- this.closeFilter();
970
+ }, () => this.refresh());
828
971
  });
829
972
  _defineProperty(this, "timeFilterChanged", selectedTimeFilter => {
830
973
  this.setState({
@@ -844,42 +987,42 @@ class JobList extends Component {
844
987
  if (this.state.selectedTimeFilter.dayCount > 0) {
845
988
  return true;
846
989
  }
847
- return moment(this.state.timeFilterStart).startOf("d").valueOf() < moment(this.state.timeFilterEnd).endOf("d").valueOf();
990
+ return moment(this.state.timeFilterStart).startOf('d').valueOf() < moment(this.state.timeFilterEnd).endOf('d').valueOf();
848
991
  });
849
992
  _defineProperty(this, "saveTimeFilter", () => {
850
993
  if (!this.isValidTimeFilter()) {
851
994
  return;
852
995
  }
853
996
  var startTime = 0;
854
- var endTime = moment().endOf("d").valueOf();
855
- var text = "";
997
+ var endTime = moment().endOf('d').valueOf();
998
+ var text = '';
856
999
  if (this.state.selectedTimeFilter.dayCount > 0) {
857
- startTime = moment().add(-this.state.selectedTimeFilter.dayCount, "d").startOf("d").valueOf();
1000
+ startTime = moment().add(-this.state.selectedTimeFilter.dayCount, 'd').startOf('d').valueOf();
858
1001
  text = this.state.selectedTimeFilter.text;
859
1002
  } else {
860
- var startDate = moment(this.state.timeFilterStart).startOf("d");
861
- var endDate = moment(this.state.timeFilterEnd).endOf("d");
1003
+ var startDate = moment(this.state.timeFilterStart).startOf('d');
1004
+ var endDate = moment(this.state.timeFilterEnd).endOf('d');
862
1005
  startTime = startDate.valueOf();
863
1006
  endTime = endDate.valueOf();
864
- text = "".concat(startDate.format("DD/MM/YYYY"), " to ").concat(endDate.format("DD/MM/YYYY"));
1007
+ text = "".concat(startDate.format('DD/MM/YYYY'), " to ").concat(endDate.format('DD/MM/YYYY'));
865
1008
  }
1009
+ this.closeFilter();
866
1010
  this.setState({
867
1011
  selectedTimeFilterStart: startTime,
868
1012
  selectedTimeFilterEnd: endTime,
869
1013
  selectedTimeFilterText: text
870
- });
871
- this.closeFilter();
1014
+ }, () => this.refresh());
872
1015
  });
873
1016
  _defineProperty(this, "removeTimeFilter", () => {
874
1017
  this.setState({
875
1018
  selectedTimeFilterStart: null,
876
1019
  selectedTimeFilterEnd: null,
877
1020
  selectedTimeFilterText: null
878
- });
1021
+ }, () => this.refresh());
879
1022
  });
880
1023
  _defineProperty(this, "onHandleChange", event => {
881
1024
  var stateChange = {};
882
- stateChange[event.target.getAttribute("id")] = event.target.value;
1025
+ stateChange[event.target.getAttribute('id')] = event.target.value;
883
1026
  this.setState(stateChange);
884
1027
  });
885
1028
  _defineProperty(this, "onSelectAssignee", user => {
@@ -891,9 +1034,10 @@ class JobList extends Component {
891
1034
  this.setState({
892
1035
  selectedUserFilter: null,
893
1036
  selectedUserFilterText: null
894
- });
1037
+ }, () => this.refresh());
895
1038
  });
896
1039
  _defineProperty(this, "saveUserFilter", () => {
1040
+ this.closeFilter();
897
1041
  if (!this.state.selectedAssignee) {
898
1042
  this.removeUserFilter();
899
1043
  } else {
@@ -901,9 +1045,8 @@ class JobList extends Component {
901
1045
  selectedUserFilter: this.state.selectedAssignee.id,
902
1046
  selectedUserFilterText: this.state.selectedAssignee.displayName,
903
1047
  selectedAssignee: null
904
- });
1048
+ }, () => this.refresh());
905
1049
  }
906
- this.closeFilter();
907
1050
  });
908
1051
  _defineProperty(this, "onSelectRequester", user => {
909
1052
  this.setState({
@@ -935,82 +1078,41 @@ class JobList extends Component {
935
1078
  lastSearch: thisSearchTime
936
1079
  });
937
1080
  setTimeout(() => {
938
- // delayed setter to avoid filtering on every keypress
1081
+ // Debounced: trigger server-side refresh after user stops typing
939
1082
  if (this.state.lastSearch === thisSearchTime) {
940
- this.setState({
941
- searchTerm: this.state.search
942
- });
1083
+ this.refresh();
943
1084
  }
944
1085
  }, 500);
945
1086
  });
946
1087
  _defineProperty(this, "getSource", () => {
947
1088
  var source = this.props.source;
948
1089
 
949
- // filter by time
950
- if (this.state.selectedTimeFilterStart && this.state.selectedTimeFilterEnd) {
951
- source = _.filter(source, r => {
952
- return r.createdUnix >= this.state.selectedTimeFilterStart && r.createdUnix <= this.state.selectedTimeFilterEnd;
953
- });
954
- }
955
-
956
- // filter by type
957
- if (this.state.selectedTypeFilter) {
958
- source = _.filter(source, r => {
959
- return r.type === this.state.selectedTypeFilter;
960
- });
961
- }
962
-
963
- // filter by priority
964
- if (this.state.selectedPriorityFilter) {
965
- var defaultPriority = getDefaultPriority().name;
966
- source = _.filter(source, r => {
967
- return r.priority === this.state.selectedPriorityFilter || this.state.selectedPriorityFilter === defaultPriority && _.isNil(r.priority);
968
- });
969
- }
970
-
971
- // filter by status
972
- if (this.state.selectedStatusFilter) {
1090
+ // Client-side filter: Incomplete status (composite filter, not supported server-side)
1091
+ if (this.state.selectedStatusFilter === STATUS_IMCOMPLETE) {
973
1092
  var {
974
1093
  statusTypes
975
1094
  } = this.props;
976
- var defaultStatus = statusTypes.find(s => s.category === STATUS_NOT_ACTIONED);
977
- source = _.filter(source, r => {
978
- var status = statusTypes.find(s => s.text === r.status) || defaultStatus;
979
- if (this.state.selectedStatusFilter === STATUS_IMCOMPLETE) {
980
- return status.category !== STATUS_COMPLETED;
981
- }
982
- return status.text === this.state.selectedStatusFilter;
983
- });
984
- }
985
- if (this.state.selectedUserFilter) {
986
1095
  source = _.filter(source, r => {
987
- return r.AssigneeId === this.state.selectedUserFilter;
1096
+ var status = statusTypes.find(s => s.text === r.status);
1097
+ return !status || status.category !== STATUS_COMPLETED;
988
1098
  });
989
1099
  }
1100
+
1101
+ // Client-side filter: requester (not supported server-side)
990
1102
  if (this.state.selectedRequesterFilter) {
991
1103
  source = _.filter(source, r => {
992
1104
  return r.userID === this.state.selectedRequesterFilter;
993
1105
  });
994
1106
  }
995
- if (!_.isEmpty(this.state.searchTerm)) {
996
- source = _.filter(source, r => {
997
- if (r.jobId && r.jobId === this.state.searchTerm) {
998
- return true;
999
- }
1000
- if (r.room && r.room.toLowerCase().indexOf(this.state.searchTerm.toLowerCase()) > -1) {
1001
- return true;
1002
- }
1003
- if (r.title && r.title.toLowerCase().indexOf(this.state.searchTerm.toLowerCase()) > -1) {
1004
- return true;
1005
- }
1006
- return false;
1007
- });
1008
- }
1107
+
1108
+ // Note: status, type, priority, assignee, time range, and search filters
1109
+ // are all applied server-side via getJobs2 pagination.
1110
+
1009
1111
  source = _.sortBy(source, event => {
1010
- if (this.state.sortColumn === "assigned") {
1011
- return event.Assignee ? event.Assignee.displayName : "Unassigned";
1112
+ if (this.state.sortColumn === 'assigned') {
1113
+ return event.Assignee ? event.Assignee.displayName : 'Unassigned';
1012
1114
  }
1013
- if (this.state.sortColumn !== "createdUnix") return event[this.state.sortColumn];
1115
+ if (this.state.sortColumn !== 'createdUnix') return event[this.state.sortColumn];
1014
1116
  return event.createdUnix;
1015
1117
  });
1016
1118
  if (this.state.sortDesc) source.reverse();
@@ -1018,14 +1120,14 @@ class JobList extends Component {
1018
1120
  });
1019
1121
  _defineProperty(this, "getCustomFieldValue", field => {
1020
1122
  switch (field.type) {
1021
- case "date":
1022
- return field.answer ? moment(field.answer, "YYYY-MM-DD").format("DD-MMM-YYYY") : "";
1023
- case "time":
1024
- return field.answer ? moment(field.answer, "HH:mm").format("h:mm a") : "";
1025
- case "yn":
1026
- return field.answer ? "Yes" : "No";
1027
- case "checkbox":
1028
- return field.answer && Array.isArray(field.answer) ? field.answer.join(", ") : "";
1123
+ case 'date':
1124
+ return field.answer ? moment(field.answer, 'YYYY-MM-DD').format('DD-MMM-YYYY') : '';
1125
+ case 'time':
1126
+ return field.answer ? moment(field.answer, 'HH:mm').format('h:mm a') : '';
1127
+ case 'yn':
1128
+ return field.answer ? 'Yes' : 'No';
1129
+ case 'checkbox':
1130
+ return field.answer && Array.isArray(field.answer) ? field.answer.join(', ') : '';
1029
1131
  default:
1030
1132
  return field.answer;
1031
1133
  }
@@ -1039,7 +1141,7 @@ class JobList extends Component {
1039
1141
  if (customFields && Array.isArray(customFields)) {
1040
1142
  customFields.forEach(field => {
1041
1143
  // Exclude un-exportable fields
1042
- if (["image", "document", "staticTitle", "staticText"].includes(field.type)) return;
1144
+ if (['image', 'document', 'staticTitle', 'staticText'].includes(field.type)) return;
1043
1145
  var fieldKey = "".concat(_.camelCase(type), ".").concat(_.camelCase(field.label));
1044
1146
  // Build custom columns
1045
1147
  var exists = customColumns.find(c => c.key === fieldKey);
@@ -1061,10 +1163,10 @@ class JobList extends Component {
1061
1163
  var source = this.getSource().map(r => {
1062
1164
  var history = r.history || [];
1063
1165
  var progressEntry = _.find(history, e => {
1064
- return e.status !== "Unassigned";
1166
+ return e.status !== 'Unassigned';
1065
1167
  });
1066
1168
  var completedEntry = _.find(history, e => {
1067
- return e.status === "Completed";
1169
+ return e.status === 'Completed';
1068
1170
  });
1069
1171
  var progressTime = null;
1070
1172
  var completedTime = null;
@@ -1078,16 +1180,16 @@ class JobList extends Component {
1078
1180
  completedTime = moment.utc(completedEntry.timestamp).format();
1079
1181
  completedDuration = moment.utc(completedEntry.timestamp).unix() - moment.utc(r.createdTime).unix();
1080
1182
  }
1081
- var notes = "";
1183
+ var notes = '';
1082
1184
  (r.Notes || []).forEach((note, index) => {
1083
1185
  if (index > 0) {
1084
- notes += "\n\n";
1186
+ notes += '\n\n';
1085
1187
  }
1086
1188
  if (note.User && !_.isEmpty(note.User.displayName)) {
1087
1189
  notes += "".concat(note.User.displayName, ":\n");
1088
1190
  }
1089
1191
  if (note.Timestamp) {
1090
- notes += "".concat(moment(note.Timestamp).format("DD-MM-YYYY h:mma"), "\n");
1192
+ notes += "".concat(moment(note.Timestamp).format('DD-MM-YYYY h:mma'), "\n");
1091
1193
  }
1092
1194
  notes += note.Note;
1093
1195
  });
@@ -1104,7 +1206,7 @@ class JobList extends Component {
1104
1206
  });
1105
1207
 
1106
1208
  // Compose revised columns list with custom fields
1107
- var index = this.exportColumns.findIndex(c => c.key === "notes");
1209
+ var index = this.exportColumns.findIndex(c => c.key === 'notes');
1108
1210
  var columns = [...this.exportColumns.slice(0, index), ...customColumns, ...this.exportColumns.slice(index)];
1109
1211
  return {
1110
1212
  columns,
@@ -1126,64 +1228,67 @@ class JobList extends Component {
1126
1228
  });
1127
1229
  });
1128
1230
  this.state = {
1129
- showCompleted: false,
1130
- sortColumn: "createdUnix",
1231
+ sortColumn: 'createdUnix',
1131
1232
  sortDesc: true,
1132
1233
  selectedTimeFilter: Analytics$2.getAnalyticsFilterOptions()[1],
1133
1234
  assignees: [],
1134
- requesters: []
1235
+ requesters: [],
1236
+ loading: false,
1237
+ loadingMore: false,
1238
+ lastKey: null,
1239
+ hasMore: true
1135
1240
  };
1136
1241
  this.exportColumns = [{
1137
- label: "Select All",
1138
- key: ""
1242
+ label: 'Select All',
1243
+ key: ''
1139
1244
  }, {
1140
- label: "System Id",
1141
- key: "id"
1245
+ label: 'System Id',
1246
+ key: 'id'
1142
1247
  }, {
1143
1248
  label: "".concat(values.textEntityName, " No."),
1144
- key: "jobId"
1249
+ key: 'jobId'
1145
1250
  }, {
1146
1251
  label: values.textJobType,
1147
- key: "type"
1252
+ key: 'type'
1148
1253
  }, {
1149
- label: "Status",
1150
- key: "status"
1254
+ label: 'Status',
1255
+ key: 'status'
1151
1256
  }, {
1152
- label: "Priority",
1153
- key: "priority"
1257
+ label: 'Priority',
1258
+ key: 'priority'
1154
1259
  }, {
1155
- label: "Title",
1156
- key: "title"
1260
+ label: 'Title',
1261
+ key: 'title'
1157
1262
  }, {
1158
- label: "Address",
1159
- key: "room"
1263
+ label: 'Address',
1264
+ key: 'room'
1160
1265
  }, {
1161
- label: "Description",
1162
- key: "description"
1266
+ label: 'Description',
1267
+ key: 'description'
1163
1268
  }, {
1164
- label: "Notes",
1165
- key: "notes"
1269
+ label: 'Notes',
1270
+ key: 'notes'
1166
1271
  }, {
1167
- label: "User Name",
1168
- key: "userName"
1272
+ label: 'User Name',
1273
+ key: 'userName'
1169
1274
  }, {
1170
- label: "User ID",
1171
- key: "userID"
1275
+ label: 'User ID',
1276
+ key: 'userID'
1172
1277
  }, {
1173
- label: "Request Time",
1174
- key: "createdTime"
1278
+ label: 'Request Time',
1279
+ key: 'createdTime'
1175
1280
  }, {
1176
- label: "Progress Time",
1177
- key: "progressTime"
1281
+ label: 'Progress Time',
1282
+ key: 'progressTime'
1178
1283
  }, {
1179
- label: "Completed Time",
1180
- key: "completedTime"
1284
+ label: 'Completed Time',
1285
+ key: 'completedTime'
1181
1286
  }, {
1182
- label: "Time to Progress (in seconds)",
1183
- key: "progressDuration"
1287
+ label: 'Time to Progress (in seconds)',
1288
+ key: 'progressDuration'
1184
1289
  }, {
1185
- label: "Time to Complete (in seconds)",
1186
- key: "completedDuration"
1290
+ label: 'Time to Complete (in seconds)',
1291
+ key: 'completedDuration'
1187
1292
  }];
1188
1293
  }
1189
1294
  UNSAFE_componentWillMount() {
@@ -1191,14 +1296,14 @@ class JobList extends Component {
1191
1296
  }
1192
1297
  componentDidMount() {
1193
1298
  this.props.jobStatusesUpdate(this.props.auth.site);
1194
- this.getJobs();
1299
+ this.refresh();
1195
1300
  this.getAssignees();
1196
1301
  }
1197
1302
  renderFilterPopup() {
1198
1303
  if (!this.state.filterOpen) {
1199
1304
  return null;
1200
1305
  }
1201
- if (this.state.filterOpen === "type") {
1306
+ if (this.state.filterOpen === 'type') {
1202
1307
  return /*#__PURE__*/jsx(Components$7.Popup, {
1203
1308
  title: "Select ".concat(values.textJobType),
1204
1309
  maxWidth: 600,
@@ -1216,7 +1321,7 @@ class JobList extends Component {
1216
1321
  })
1217
1322
  });
1218
1323
  }
1219
- if (this.state.filterOpen === "priority") {
1324
+ if (this.state.filterOpen === 'priority') {
1220
1325
  return /*#__PURE__*/jsx(Components$7.Popup, {
1221
1326
  title: "Select Priority",
1222
1327
  maxWidth: 600,
@@ -1234,7 +1339,7 @@ class JobList extends Component {
1234
1339
  })
1235
1340
  });
1236
1341
  }
1237
- if (this.state.filterOpen === "status") {
1342
+ if (this.state.filterOpen === 'status') {
1238
1343
  var {
1239
1344
  statusTypes
1240
1345
  } = this.props;
@@ -1255,7 +1360,7 @@ class JobList extends Component {
1255
1360
  })
1256
1361
  });
1257
1362
  }
1258
- if (this.state.filterOpen === "time") {
1363
+ if (this.state.filterOpen === 'time') {
1259
1364
  return /*#__PURE__*/jsx(Components$7.Popup, {
1260
1365
  title: "Select Time",
1261
1366
  maxWidth: 600,
@@ -1263,9 +1368,9 @@ class JobList extends Component {
1263
1368
  hasPadding: true,
1264
1369
  onClose: this.closeFilter,
1265
1370
  buttons: [{
1266
- type: "primaryAction",
1371
+ type: 'primaryAction',
1267
1372
  onClick: this.saveTimeFilter,
1268
- text: "Select",
1373
+ text: 'Select',
1269
1374
  isActive: this.isValidTimeFilter()
1270
1375
  }],
1271
1376
  children: /*#__PURE__*/jsx("div", {
@@ -1280,15 +1385,15 @@ class JobList extends Component {
1280
1385
  })
1281
1386
  });
1282
1387
  }
1283
- if (this.state.filterOpen === "user") {
1388
+ if (this.state.filterOpen === 'user') {
1284
1389
  var userContent = null;
1285
1390
  if (this.state.selectedAssignee) {
1286
1391
  userContent = /*#__PURE__*/jsx("div", {
1287
1392
  children: /*#__PURE__*/jsx(Components$7.UserListing, {
1288
1393
  user: this.state.selectedAssignee,
1289
- rightContent: /*#__PURE__*/jsx(Icon, {
1394
+ rightContent: /*#__PURE__*/jsx(Components$7.SVGIcon, {
1290
1395
  className: "removeIcon",
1291
- icon: "xmark",
1396
+ icon: "close",
1292
1397
  onClick: () => {
1293
1398
  this.onSelectAssignee();
1294
1399
  },
@@ -1327,23 +1432,23 @@ class JobList extends Component {
1327
1432
  hasPadding: true,
1328
1433
  onClose: this.closeFilter,
1329
1434
  buttons: [{
1330
- type: "primaryAction",
1435
+ type: 'primaryAction',
1331
1436
  onClick: this.saveUserFilter,
1332
- text: "Select",
1437
+ text: 'Select',
1333
1438
  isActive: true
1334
1439
  }],
1335
1440
  children: userContent
1336
1441
  });
1337
1442
  }
1338
- if (this.state.filterOpen === "requester") {
1443
+ if (this.state.filterOpen === 'requester') {
1339
1444
  var _userContent = null;
1340
1445
  if (this.state.selectedRequester) {
1341
1446
  _userContent = /*#__PURE__*/jsx("div", {
1342
1447
  children: /*#__PURE__*/jsx(Components$7.UserListing, {
1343
1448
  user: this.state.selectedRequester,
1344
- rightContent: /*#__PURE__*/jsx(Icon, {
1449
+ rightContent: /*#__PURE__*/jsx(Components$7.SVGIcon, {
1345
1450
  className: "removeIcon",
1346
- icon: "xmark",
1451
+ icon: "close",
1347
1452
  onClick: () => {
1348
1453
  this.onSelectRequester();
1349
1454
  },
@@ -1382,9 +1487,9 @@ class JobList extends Component {
1382
1487
  hasPadding: true,
1383
1488
  onClose: this.closeFilter,
1384
1489
  buttons: [{
1385
- type: "primaryAction",
1490
+ type: 'primaryAction',
1386
1491
  onClick: this.saveRequesterFilter,
1387
- text: "Select",
1492
+ text: 'Select',
1388
1493
  isActive: true
1389
1494
  }],
1390
1495
  children: _userContent
@@ -1417,7 +1522,7 @@ class JobList extends Component {
1417
1522
  }), /*#__PURE__*/jsx("td", {
1418
1523
  children: ev.type
1419
1524
  }), /*#__PURE__*/jsx("td", {
1420
- children: moment.utc(ev.createdTime).local().format("D MMM YY")
1525
+ children: moment.utc(ev.createdTime).local().format('D MMM YY')
1421
1526
  }), /*#__PURE__*/jsx("td", {
1422
1527
  children: ev.room
1423
1528
  }), /*#__PURE__*/jsx("td", {
@@ -1428,34 +1533,34 @@ class JobList extends Component {
1428
1533
  profilePic: ev.userProfilePic
1429
1534
  },
1430
1535
  textClass: "fontSize-13"
1431
- }) : "Unknown"
1536
+ }) : 'Unknown'
1432
1537
  }), /*#__PURE__*/jsx("td", {
1433
1538
  children: ev.Assignee ? /*#__PURE__*/jsx(Components$7.UserListing, {
1434
1539
  user: ev.Assignee,
1435
1540
  textClass: "fontSize-13"
1436
- }) : "Unassigned"
1541
+ }) : 'Unassigned'
1437
1542
  }), /*#__PURE__*/jsx("td", {
1438
1543
  children: /*#__PURE__*/jsx("div", {
1439
1544
  style: {
1440
- textAlign: "center",
1545
+ textAlign: 'center',
1441
1546
  borderRadius: 4,
1442
1547
  width: 100,
1443
1548
  paddingTop: 2,
1444
1549
  paddingBottom: 2,
1445
- color: "#fff",
1550
+ color: '#fff',
1446
1551
  backgroundColor: status ? status.color : undefined
1447
1552
  },
1448
- children: status ? status.text : ""
1553
+ children: status ? status.text : ''
1449
1554
  })
1450
1555
  }), /*#__PURE__*/jsx("td", {
1451
1556
  children: /*#__PURE__*/jsx("div", {
1452
1557
  style: {
1453
- textAlign: "center",
1558
+ textAlign: 'center',
1454
1559
  borderRadius: 4,
1455
1560
  width: 100,
1456
1561
  paddingTop: 2,
1457
1562
  paddingBottom: 2,
1458
- color: "#fff",
1563
+ color: '#fff',
1459
1564
  backgroundColor: priority.color
1460
1565
  },
1461
1566
  children: priority.name
@@ -1464,29 +1569,29 @@ class JobList extends Component {
1464
1569
  className: "table-options",
1465
1570
  children: /*#__PURE__*/jsxs("div", {
1466
1571
  style: {
1467
- display: "flex",
1468
- alignItems: "center"
1572
+ display: 'flex',
1573
+ alignItems: 'center'
1469
1574
  },
1470
1575
  children: [/*#__PURE__*/jsx(Link, {
1471
1576
  to: "".concat(values.routeRequestDetails, "/").concat(ev.id),
1472
- children: /*#__PURE__*/jsx(Icon, {
1577
+ children: /*#__PURE__*/jsx(FontAwesome, {
1473
1578
  style: {
1474
1579
  fontSize: 20,
1475
1580
  padding: 5,
1476
- cursor: "pointer"
1581
+ cursor: 'pointer'
1477
1582
  },
1478
- icon: "pencil"
1583
+ name: "pencil"
1479
1584
  })
1480
1585
  }), Session$7.validateAccess(this.props.auth.site, values.permissionMaintenanceTracking, this.props.auth) && /*#__PURE__*/jsx("a", {
1481
1586
  onClick: () => this.onRemoveRequest(ev),
1482
- children: /*#__PURE__*/jsx(Icon, {
1587
+ children: /*#__PURE__*/jsx(FontAwesome, {
1483
1588
  style: {
1484
1589
  fontSize: 20,
1485
1590
  padding: 5,
1486
1591
  marginLeft: 8,
1487
- cursor: "pointer"
1592
+ cursor: 'pointer'
1488
1593
  },
1489
- icon: "circle-minus"
1594
+ name: "minus-circle"
1490
1595
  })
1491
1596
  })]
1492
1597
  })
@@ -1500,26 +1605,26 @@ class JobList extends Component {
1500
1605
  sortDesc
1501
1606
  } = this.state;
1502
1607
  if (col !== sortColumn) return null;
1503
- return /*#__PURE__*/jsx(Icon, {
1608
+ return /*#__PURE__*/jsx(FontAwesome, {
1504
1609
  style: {
1505
1610
  marginLeft: 5
1506
1611
  },
1507
- icon: sortDesc ? "fa-".concat("chevron-up") : "fa-".concat("chevron-down")
1612
+ name: sortDesc ? 'chevron-up' : 'chevron-down'
1508
1613
  });
1509
1614
  }
1510
1615
  sortIsActive(col) {
1511
- if (col !== this.state.sortColumn) return "";
1512
- return " table--columnActive";
1616
+ if (col !== this.state.sortColumn) return '';
1617
+ return ' table--columnActive';
1513
1618
  }
1514
1619
  renderEmpty() {
1515
1620
  var title = this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests;
1516
1621
  return /*#__PURE__*/jsxs("div", {
1517
1622
  style: {
1518
- display: "flex",
1519
- flexDirection: "column",
1623
+ display: 'flex',
1624
+ flexDirection: 'column',
1520
1625
  flex: 1,
1521
- justifyContent: "center",
1522
- alignItems: "center",
1626
+ justifyContent: 'center',
1627
+ alignItems: 'center',
1523
1628
  marginTop: 32
1524
1629
  },
1525
1630
  children: [/*#__PURE__*/jsx("div", {
@@ -1528,7 +1633,7 @@ class JobList extends Component {
1528
1633
  className: "marginTop-32",
1529
1634
  style: {
1530
1635
  maxWidth: 500,
1531
- textAlign: "center"
1636
+ textAlign: 'center'
1532
1637
  },
1533
1638
  children: /*#__PURE__*/jsxs("span", {
1534
1639
  className: "fontRegular fontSize-13",
@@ -1541,112 +1646,149 @@ class JobList extends Component {
1541
1646
  className: "marginTop-8 fontRegular fontSize-13",
1542
1647
  style: {
1543
1648
  maxWidth: 500,
1544
- textAlign: "center"
1649
+ textAlign: 'center'
1545
1650
  },
1546
1651
  children: values.textEmptyExample
1547
1652
  })]
1548
1653
  });
1549
1654
  }
1550
1655
  renderContent() {
1656
+ if (this.state.loading) {
1657
+ return /*#__PURE__*/jsx("div", {
1658
+ style: {
1659
+ display: 'flex',
1660
+ justifyContent: 'center',
1661
+ padding: 40
1662
+ },
1663
+ children: /*#__PURE__*/jsx(FontAwesome, {
1664
+ style: {
1665
+ fontSize: 32,
1666
+ color: '#ccc'
1667
+ },
1668
+ name: "spinner fa-pulse fa-fw"
1669
+ })
1670
+ });
1671
+ }
1551
1672
  if (_.isEmpty(this.props.source)) return this.renderEmpty();
1552
- return /*#__PURE__*/jsxs(Table, {
1553
- className: "plussTable",
1554
- striped: true,
1555
- bordered: true,
1556
- condensed: true,
1557
- hover: true,
1558
- style: {
1559
- minWidth: "100%"
1560
- },
1561
- children: [/*#__PURE__*/jsx("thead", {
1562
- children: /*#__PURE__*/jsxs("tr", {
1563
- children: [/*#__PURE__*/jsxs("th", {
1564
- className: "".concat(this.sortIsActive("jobId")),
1565
- style: {
1566
- cursor: "pointer",
1567
- width: 70
1568
- },
1569
- onClick: () => {
1570
- this.sortByCol("jobId");
1571
- },
1572
- children: [values.textEntityName, " No.", this.renderSort("jobId")]
1573
- }), /*#__PURE__*/jsxs("th", {
1574
- className: "".concat(this.sortIsActive("title")),
1575
- style: {
1576
- cursor: "pointer"
1577
- },
1578
- onClick: () => {
1579
- this.sortByCol("title");
1580
- },
1581
- children: ["Title", this.renderSort("title")]
1582
- }), /*#__PURE__*/jsxs("th", {
1583
- className: "".concat(this.sortIsActive("type")),
1584
- style: {
1585
- cursor: "pointer",
1586
- width: 100
1587
- },
1588
- onClick: () => {
1589
- this.sortByCol("type");
1590
- },
1591
- children: [values.textJobType, this.renderSort("type")]
1592
- }), /*#__PURE__*/jsxs("th", {
1593
- className: "".concat(this.sortIsActive("createdUnix")),
1594
- style: {
1595
- cursor: "pointer",
1596
- width: 80
1597
- },
1598
- onClick: () => {
1599
- this.sortByCol("createdUnix");
1600
- },
1601
- children: ["Date", this.renderSort("createdUnix")]
1602
- }), /*#__PURE__*/jsxs("th", {
1603
- className: "".concat(this.sortIsActive("room")),
1604
- style: {
1605
- cursor: "pointer",
1606
- width: 100
1607
- },
1608
- onClick: () => {
1609
- this.sortByCol("room");
1610
- },
1611
- children: ["Address", this.renderSort("room")]
1612
- }), /*#__PURE__*/jsxs("th", {
1613
- className: "".concat(this.sortIsActive("userName")),
1614
- style: {
1615
- cursor: "pointer",
1616
- width: 150
1617
- },
1618
- onClick: () => {
1619
- this.sortByCol("userName");
1620
- },
1621
- children: ["Submitted By", this.renderSort("userName")]
1622
- }), /*#__PURE__*/jsxs("th", {
1623
- className: "".concat(this.sortIsActive("assigned")),
1624
- style: {
1625
- cursor: "pointer",
1626
- width: 150
1627
- },
1628
- onClick: () => {
1629
- this.sortByCol("assigned");
1630
- },
1631
- children: ["Assigned To", this.renderSort("assigned")]
1632
- }), /*#__PURE__*/jsx("th", {
1633
- style: {
1634
- width: 120
1635
- },
1636
- children: "Status"
1637
- }), /*#__PURE__*/jsx("th", {
1638
- style: {
1639
- width: 120
1640
- },
1641
- children: "Priority"
1642
- }), /*#__PURE__*/jsx("th", {
1643
- style: {
1644
- width: 50
1645
- }
1646
- })]
1673
+ return /*#__PURE__*/jsxs("div", {
1674
+ children: [/*#__PURE__*/jsxs(Table, {
1675
+ className: "plussTable",
1676
+ striped: true,
1677
+ bordered: true,
1678
+ condensed: true,
1679
+ hover: true,
1680
+ style: {
1681
+ minWidth: '100%'
1682
+ },
1683
+ children: [/*#__PURE__*/jsx("thead", {
1684
+ children: /*#__PURE__*/jsxs("tr", {
1685
+ children: [/*#__PURE__*/jsxs("th", {
1686
+ className: "".concat(this.sortIsActive('jobId')),
1687
+ style: {
1688
+ cursor: 'pointer',
1689
+ width: 70
1690
+ },
1691
+ onClick: () => {
1692
+ this.sortByCol('jobId');
1693
+ },
1694
+ children: [values.textEntityName, " No.", this.renderSort('jobId')]
1695
+ }), /*#__PURE__*/jsxs("th", {
1696
+ className: "".concat(this.sortIsActive('title')),
1697
+ style: {
1698
+ cursor: 'pointer'
1699
+ },
1700
+ onClick: () => {
1701
+ this.sortByCol('title');
1702
+ },
1703
+ children: ["Title", this.renderSort('title')]
1704
+ }), /*#__PURE__*/jsxs("th", {
1705
+ className: "".concat(this.sortIsActive('type')),
1706
+ style: {
1707
+ cursor: 'pointer',
1708
+ width: 100
1709
+ },
1710
+ onClick: () => {
1711
+ this.sortByCol('type');
1712
+ },
1713
+ children: [values.textJobType, this.renderSort('type')]
1714
+ }), /*#__PURE__*/jsxs("th", {
1715
+ className: "".concat(this.sortIsActive('createdUnix')),
1716
+ style: {
1717
+ cursor: 'pointer',
1718
+ width: 80
1719
+ },
1720
+ onClick: () => {
1721
+ this.sortByCol('createdUnix');
1722
+ },
1723
+ children: ["Date", this.renderSort('createdUnix')]
1724
+ }), /*#__PURE__*/jsxs("th", {
1725
+ className: "".concat(this.sortIsActive('room')),
1726
+ style: {
1727
+ cursor: 'pointer',
1728
+ width: 100
1729
+ },
1730
+ onClick: () => {
1731
+ this.sortByCol('room');
1732
+ },
1733
+ children: ["Address", this.renderSort('room')]
1734
+ }), /*#__PURE__*/jsxs("th", {
1735
+ className: "".concat(this.sortIsActive('userName')),
1736
+ style: {
1737
+ cursor: 'pointer',
1738
+ width: 150
1739
+ },
1740
+ onClick: () => {
1741
+ this.sortByCol('userName');
1742
+ },
1743
+ children: ["Submitted By", this.renderSort('userName')]
1744
+ }), /*#__PURE__*/jsxs("th", {
1745
+ className: "".concat(this.sortIsActive('assigned')),
1746
+ style: {
1747
+ cursor: 'pointer',
1748
+ width: 150
1749
+ },
1750
+ onClick: () => {
1751
+ this.sortByCol('assigned');
1752
+ },
1753
+ children: ["Assigned To", this.renderSort('assigned')]
1754
+ }), /*#__PURE__*/jsx("th", {
1755
+ style: {
1756
+ width: 120
1757
+ },
1758
+ children: "Status"
1759
+ }), /*#__PURE__*/jsx("th", {
1760
+ style: {
1761
+ width: 120
1762
+ },
1763
+ children: "Priority"
1764
+ }), /*#__PURE__*/jsx("th", {
1765
+ style: {
1766
+ width: 50
1767
+ }
1768
+ })]
1769
+ })
1770
+ }), /*#__PURE__*/jsx("tbody", {
1771
+ children: this.renderRequests()
1772
+ })]
1773
+ }), this.state.hasMore && /*#__PURE__*/jsx("div", {
1774
+ style: {
1775
+ display: 'flex',
1776
+ justifyContent: 'center',
1777
+ padding: '16px 0'
1778
+ },
1779
+ children: this.state.loadingMore ? /*#__PURE__*/jsx(FontAwesome, {
1780
+ style: {
1781
+ fontSize: 24,
1782
+ color: '#ccc'
1783
+ },
1784
+ name: "spinner fa-pulse fa-fw"
1785
+ }) : /*#__PURE__*/jsx(Components$7.Button, {
1786
+ inline: true,
1787
+ buttonType: "tertiary",
1788
+ onClick: this.loadMore,
1789
+ isActive: true,
1790
+ children: "Load More"
1647
1791
  })
1648
- }), /*#__PURE__*/jsx("tbody", {
1649
- children: this.renderRequests()
1650
1792
  })]
1651
1793
  });
1652
1794
  }
@@ -1654,42 +1796,42 @@ class JobList extends Component {
1654
1796
  var typeFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1655
1797
  className: "marginRight-10",
1656
1798
  onClick: () => {
1657
- this.openFilter("type");
1799
+ this.openFilter('type');
1658
1800
  },
1659
1801
  text: values.textJobType
1660
1802
  });
1661
1803
  var statusFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1662
1804
  className: "marginRight-10",
1663
1805
  onClick: () => {
1664
- this.openFilter("status");
1806
+ this.openFilter('status');
1665
1807
  },
1666
1808
  text: "Status"
1667
1809
  });
1668
1810
  var priorityFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1669
1811
  className: "marginRight-10",
1670
1812
  onClick: () => {
1671
- this.openFilter("priority");
1813
+ this.openFilter('priority');
1672
1814
  },
1673
1815
  text: "Priority"
1674
1816
  });
1675
1817
  var timeFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1676
1818
  className: "marginRight-10",
1677
1819
  onClick: () => {
1678
- this.openFilter("time");
1820
+ this.openFilter('time');
1679
1821
  },
1680
1822
  text: "Time"
1681
1823
  });
1682
1824
  var userFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1683
1825
  className: "marginRight-10",
1684
1826
  onClick: () => {
1685
- this.openFilter("user");
1827
+ this.openFilter('user');
1686
1828
  },
1687
1829
  text: "Assigned To"
1688
1830
  });
1689
1831
  var requesterFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1690
1832
  className: "marginRight-10",
1691
1833
  onClick: () => {
1692
- this.openFilter("requester");
1834
+ this.openFilter('requester');
1693
1835
  },
1694
1836
  text: "Submitted By"
1695
1837
  });
@@ -1697,7 +1839,7 @@ class JobList extends Component {
1697
1839
  typeFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1698
1840
  className: "marginRight-10",
1699
1841
  onClick: () => {
1700
- this.openFilter("type");
1842
+ this.openFilter('type');
1701
1843
  },
1702
1844
  rightIcon: "close",
1703
1845
  rightClick: e => {
@@ -1711,7 +1853,7 @@ class JobList extends Component {
1711
1853
  priorityFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1712
1854
  className: "marginRight-10",
1713
1855
  onClick: () => {
1714
- this.openFilter("priority");
1856
+ this.openFilter('priority');
1715
1857
  },
1716
1858
  rightIcon: "close",
1717
1859
  rightClick: e => {
@@ -1725,7 +1867,7 @@ class JobList extends Component {
1725
1867
  statusFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1726
1868
  className: "marginRight-10",
1727
1869
  onClick: () => {
1728
- this.openFilter("status");
1870
+ this.openFilter('status');
1729
1871
  },
1730
1872
  rightIcon: "close",
1731
1873
  rightClick: e => {
@@ -1739,7 +1881,7 @@ class JobList extends Component {
1739
1881
  timeFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1740
1882
  className: "marginRight-10",
1741
1883
  onClick: () => {
1742
- this.openFilter("time");
1884
+ this.openFilter('time');
1743
1885
  },
1744
1886
  rightIcon: "close",
1745
1887
  rightClick: e => {
@@ -1753,7 +1895,7 @@ class JobList extends Component {
1753
1895
  userFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1754
1896
  className: "marginRight-10",
1755
1897
  onClick: () => {
1756
- this.openFilter("user");
1898
+ this.openFilter('user');
1757
1899
  },
1758
1900
  rightIcon: "close",
1759
1901
  rightClick: e => {
@@ -1767,7 +1909,7 @@ class JobList extends Component {
1767
1909
  requesterFilter = /*#__PURE__*/jsx(Components$7.Tag, {
1768
1910
  className: "marginRight-10",
1769
1911
  onClick: () => {
1770
- this.openFilter("requester");
1912
+ this.openFilter('requester');
1771
1913
  },
1772
1914
  rightIcon: "close",
1773
1915
  rightClick: e => {
@@ -1790,7 +1932,7 @@ class JobList extends Component {
1790
1932
  }), /*#__PURE__*/jsx(Components$7.Button, {
1791
1933
  inline: true,
1792
1934
  buttonType: "primaryAction",
1793
- leftIcon: "file-code",
1935
+ leftIcon: "file-code-o",
1794
1936
  onClick: this.onOpenExportCsv,
1795
1937
  isActive: !_.isEmpty(this.getSource()),
1796
1938
  children: "Export CSV"
@@ -1826,7 +1968,7 @@ class JobList extends Component {
1826
1968
  render() {
1827
1969
  return /*#__PURE__*/jsxs("div", {
1828
1970
  style: {
1829
- minWidth: "100%"
1971
+ minWidth: '100%'
1830
1972
  },
1831
1973
  children: [this.renderFilterPopup(), this.renderCSVPopup(), this.renderFilters(), this.renderContent()]
1832
1974
  });
@@ -1845,6 +1987,7 @@ var mapStateToProps$7 = state => {
1845
1987
  };
1846
1988
  var JobList$1 = connect(mapStateToProps$7, {
1847
1989
  jobsLoaded,
1990
+ jobsAdded,
1848
1991
  removeJob,
1849
1992
  jobStatusesUpdate
1850
1993
  })(withRouter(JobList));
@@ -1863,7 +2006,7 @@ class JobTypes extends Component {
1863
2006
  var res = yield maintenanceActions.getJobTypes(_this.props.auth.site);
1864
2007
  if (res.data != null) _this.props.jobTypesLoaded(res.data);
1865
2008
  } catch (error) {
1866
- console.error("getJobTypes", error);
2009
+ console.error('getJobTypes', error);
1867
2010
  } finally {
1868
2011
  _this.setState({
1869
2012
  loading: false
@@ -1896,8 +2039,8 @@ class JobTypes extends Component {
1896
2039
  _this.props.jobTypesLoaded(newJobTypes);
1897
2040
  }
1898
2041
  } catch (error) {
1899
- console.error("onRemoveJobType", error);
1900
- alert("Something went wrong with the request. Please try again.");
2042
+ console.error('onRemoveJobType', error);
2043
+ alert('Something went wrong with the request. Please try again.');
1901
2044
  }
1902
2045
  });
1903
2046
  return function (_x) {
@@ -1906,7 +2049,7 @@ class JobTypes extends Component {
1906
2049
  }());
1907
2050
  this.state = {
1908
2051
  jobList: [],
1909
- sortColumn: "name",
2052
+ sortColumn: 'name',
1910
2053
  sortDesc: false,
1911
2054
  loading: true
1912
2055
  };
@@ -1951,30 +2094,30 @@ class JobTypes extends Component {
1951
2094
  className: "table-options",
1952
2095
  children: /*#__PURE__*/jsxs("div", {
1953
2096
  style: {
1954
- display: "flex",
1955
- alignItems: "center"
2097
+ display: 'flex',
2098
+ alignItems: 'center'
1956
2099
  },
1957
2100
  children: [Session$6.validateAccess(this.props.auth.site, values.permissionMaintenanceTypes, this.props.auth) && /*#__PURE__*/jsx(Link, {
1958
2101
  to: "".concat(values.routeAddRequestType, "/").concat(ev.id),
1959
- children: /*#__PURE__*/jsx(Icon, {
2102
+ children: /*#__PURE__*/jsx(FontAwesome, {
1960
2103
  style: {
1961
2104
  fontSize: 20,
1962
2105
  padding: 5,
1963
2106
  marginLeft: 12,
1964
- cursor: "pointer"
2107
+ cursor: 'pointer'
1965
2108
  },
1966
- icon: "pencil"
2109
+ name: "pencil"
1967
2110
  })
1968
2111
  }), Session$6.validateAccess(this.props.auth.site, values.permissionMaintenanceTypes, this.props.auth) && /*#__PURE__*/jsx("a", {
1969
2112
  onClick: () => this.onRemoveJobType(ev),
1970
- children: /*#__PURE__*/jsx(Icon, {
2113
+ children: /*#__PURE__*/jsx(FontAwesome, {
1971
2114
  style: {
1972
2115
  fontSize: 20,
1973
2116
  padding: 5,
1974
2117
  marginLeft: 8,
1975
- cursor: "pointer"
2118
+ cursor: 'pointer'
1976
2119
  },
1977
- icon: "circle-minus"
2120
+ name: "minus-circle"
1978
2121
  })
1979
2122
  })]
1980
2123
  })
@@ -1992,27 +2135,27 @@ class JobTypes extends Component {
1992
2135
  condensed: true,
1993
2136
  hover: true,
1994
2137
  style: {
1995
- minWidth: "100%"
2138
+ minWidth: '100%'
1996
2139
  },
1997
2140
  children: [/*#__PURE__*/jsx("thead", {
1998
2141
  children: /*#__PURE__*/jsxs("tr", {
1999
2142
  children: [/*#__PURE__*/jsxs("th", {
2000
2143
  style: {
2001
- cursor: "pointer"
2144
+ cursor: 'pointer'
2002
2145
  },
2003
- onClick: () => this.sortByCol("name"),
2146
+ onClick: () => this.sortByCol('name'),
2004
2147
  children: [values.textSingularName, " type"]
2005
2148
  }), /*#__PURE__*/jsx("th", {
2006
2149
  style: {
2007
- cursor: "pointer"
2150
+ cursor: 'pointer'
2008
2151
  },
2009
- onClick: () => this.sortByCol("name"),
2152
+ onClick: () => this.sortByCol('name'),
2010
2153
  children: "Type Description"
2011
2154
  }), /*#__PURE__*/jsx("th", {
2012
2155
  style: {
2013
- cursor: "pointer"
2156
+ cursor: 'pointer'
2014
2157
  },
2015
- onClick: () => this.sortByCol("email"),
2158
+ onClick: () => this.sortByCol('email'),
2016
2159
  children: "Email"
2017
2160
  }), /*#__PURE__*/jsx("th", {
2018
2161
  style: {
@@ -2028,11 +2171,11 @@ class JobTypes extends Component {
2028
2171
  renderEmpty() {
2029
2172
  return /*#__PURE__*/jsxs("div", {
2030
2173
  style: {
2031
- display: "flex",
2032
- flexDirection: "column",
2174
+ display: 'flex',
2175
+ flexDirection: 'column',
2033
2176
  flex: 1,
2034
- justifyContent: "center",
2035
- alignItems: "center",
2177
+ justifyContent: 'center',
2178
+ alignItems: 'center',
2036
2179
  marginTop: 32
2037
2180
  },
2038
2181
  children: [/*#__PURE__*/jsx("div", {
@@ -2041,7 +2184,7 @@ class JobTypes extends Component {
2041
2184
  className: "marginTop-32",
2042
2185
  style: {
2043
2186
  maxWidth: 500,
2044
- textAlign: "center"
2187
+ textAlign: 'center'
2045
2188
  },
2046
2189
  children: /*#__PURE__*/jsx("span", {
2047
2190
  className: "fontRegular fontSize-13",
@@ -2051,7 +2194,7 @@ class JobTypes extends Component {
2051
2194
  className: "marginTop-8 fontRegular fontSize-13",
2052
2195
  style: {
2053
2196
  maxWidth: 500,
2054
- textAlign: "center"
2197
+ textAlign: 'center'
2055
2198
  },
2056
2199
  children: values.textEmptyJobTypesExample
2057
2200
  })]
@@ -2069,28 +2212,26 @@ class JobTypes extends Component {
2069
2212
  if (jobList.length === 0 && loading) {
2070
2213
  return /*#__PURE__*/jsx("div", {
2071
2214
  style: {
2072
- minWidth: "100%"
2215
+ minWidth: '100%'
2073
2216
  },
2074
2217
  children: /*#__PURE__*/jsx("div", {
2075
2218
  className: "padding-60 paddingVertical-40",
2076
2219
  style: {
2077
- textAlign: "center"
2220
+ textAlign: 'center'
2078
2221
  },
2079
- children: /*#__PURE__*/jsx(Icon, {
2222
+ children: /*#__PURE__*/jsx(FontAwesome, {
2080
2223
  style: {
2081
2224
  fontSize: 30,
2082
2225
  color: FeatureConfig.env.colourBrandingOff
2083
2226
  },
2084
- icon: "spinner",
2085
- pulse: true,
2086
- fixedWidth: true
2227
+ name: "spinner fa-pulse fa-fw"
2087
2228
  })
2088
2229
  })
2089
2230
  });
2090
2231
  }
2091
2232
  return /*#__PURE__*/jsxs("div", {
2092
2233
  style: {
2093
- minWidth: "100%"
2234
+ minWidth: '100%'
2094
2235
  },
2095
2236
  children: [/*#__PURE__*/jsx("div", {
2096
2237
  className: "marginBottom-32",
@@ -2104,7 +2245,7 @@ class JobTypes extends Component {
2104
2245
  render() {
2105
2246
  return /*#__PURE__*/jsxs("div", {
2106
2247
  style: {
2107
- minWidth: "100%"
2248
+ minWidth: '100%'
2108
2249
  },
2109
2250
  children: [/*#__PURE__*/jsx("div", {
2110
2251
  children: this.renderJobTypes()
@@ -2189,7 +2330,7 @@ class Configuration extends Component {
2189
2330
  showWarnings: false,
2190
2331
  showStatusPopup: true,
2191
2332
  selectedStatusIndex: -1,
2192
- statusLabel: "",
2333
+ statusLabel: '',
2193
2334
  statusCategory: STATUS_NOT_ACTIONED,
2194
2335
  statusColour: defaultStatus.color
2195
2336
  });
@@ -2228,7 +2369,7 @@ class Configuration extends Component {
2228
2369
  });
2229
2370
  _defineProperty(this, "onHandleChange", event => {
2230
2371
  var stateChange = {};
2231
- stateChange[event.target.getAttribute("id")] = event.target.value;
2372
+ stateChange[event.target.getAttribute('id')] = event.target.value;
2232
2373
  this.setState(stateChange);
2233
2374
  });
2234
2375
  _defineProperty(this, "onToggleDisableSeen", () => {
@@ -2256,7 +2397,7 @@ class Configuration extends Component {
2256
2397
  success: true
2257
2398
  });
2258
2399
  } catch (error) {
2259
- console.log("onSaveConfig - error", error);
2400
+ console.log('onSaveConfig - error', error);
2260
2401
  _this.setState({
2261
2402
  success: false
2262
2403
  });
@@ -2272,9 +2413,9 @@ class Configuration extends Component {
2272
2413
  submitting: false,
2273
2414
  selectedStatusIndex: -1,
2274
2415
  showStatusPopup: false,
2275
- statusLabel: "",
2416
+ statusLabel: '',
2276
2417
  statusCategory: STATUS_NOT_ACTIONED,
2277
- statusColour: "",
2418
+ statusColour: '',
2278
2419
  fetchingStatusTypes: true,
2279
2420
  statusTypes: this.props.statusTypes,
2280
2421
  fetchingHideSeen: true,
@@ -2285,8 +2426,8 @@ class Configuration extends Component {
2285
2426
  Session$5.checkLoggedIn(this);
2286
2427
  }
2287
2428
  componentDidMount() {
2288
- if (!Session$5.validateAccess(this.props.auth.site, "featurePicker", this.props.auth, true)) {
2289
- this.props.history.push("/mastermenu");
2429
+ if (!Session$5.validateAccess(this.props.auth.site, 'featurePicker', this.props.auth, true)) {
2430
+ this.props.history.push('/mastermenu');
2290
2431
  } else {
2291
2432
  this.props.jobStatusesUpdate(this.props.auth.site, statusTypes => this.setState({
2292
2433
  statusTypes,
@@ -2349,39 +2490,39 @@ class Configuration extends Component {
2349
2490
  className: "fontMedium fontSize-16 text-dark",
2350
2491
  children: status.category
2351
2492
  })
2352
- }), /*#__PURE__*/jsx(Icon, {
2493
+ }), /*#__PURE__*/jsx(FontAwesome, {
2353
2494
  style: _objectSpread$5(_objectSpread$5({}, styles$6.statusIcon), {}, {
2354
- visibility: index === 0 ? "hidden" : "visible"
2495
+ visibility: index === 0 ? 'hidden' : 'visible'
2355
2496
  }),
2356
- name: "arrow-up",
2497
+ name: 'arrow-up',
2357
2498
  onClick: () => this.onMoveStatus(index, true)
2358
- }), /*#__PURE__*/jsx(Icon, {
2499
+ }), /*#__PURE__*/jsx(FontAwesome, {
2359
2500
  style: _objectSpread$5(_objectSpread$5({}, styles$6.statusIcon), {}, {
2360
- visibility: index === statusTypes.length - 1 ? "hidden" : "visible"
2501
+ visibility: index === statusTypes.length - 1 ? 'hidden' : 'visible'
2361
2502
  }),
2362
- name: "arrow-down",
2503
+ name: 'arrow-down',
2363
2504
  onClick: () => this.onMoveStatus(index, false)
2364
- }), /*#__PURE__*/jsx(Icon, {
2505
+ }), /*#__PURE__*/jsx(FontAwesome, {
2365
2506
  style: _objectSpread$5({}, styles$6.statusIcon),
2366
- icon: "pencil",
2507
+ name: "pencil",
2367
2508
  onClick: () => this.onEditStatus(index)
2368
- }), /*#__PURE__*/jsx(Icon, {
2509
+ }), /*#__PURE__*/jsx(FontAwesome, {
2369
2510
  style: _objectSpread$5({}, styles$6.statusIcon),
2370
- icon: "circle-minus",
2511
+ name: "minus-circle",
2371
2512
  onClick: () => this.onDeleteStatus(index)
2372
2513
  })]
2373
2514
  }, "".concat(status.text, "_").concat(index));
2374
2515
  }), /*#__PURE__*/jsxs("div", {
2375
2516
  onClick: this.onAddStatus,
2376
2517
  style: {
2377
- display: "flex",
2378
- flexDirection: "row",
2379
- alignItems: "center",
2518
+ display: 'flex',
2519
+ flexDirection: 'row',
2520
+ alignItems: 'center',
2380
2521
  marginTop: 16
2381
2522
  },
2382
- children: [/*#__PURE__*/jsx(Icon, {
2523
+ children: [/*#__PURE__*/jsx(Components$5.P60Icon, {
2383
2524
  className: "addoption_plus",
2384
- icon: "plus",
2525
+ icon: "add",
2385
2526
  style: {
2386
2527
  fontSize: 12
2387
2528
  }
@@ -2446,21 +2587,21 @@ class Configuration extends Component {
2446
2587
  minWidth: 450,
2447
2588
  hasPadding: true,
2448
2589
  buttons: [{
2449
- type: "primaryAction",
2590
+ type: 'primaryAction',
2450
2591
  onClick: this.onSaveStatus,
2451
2592
  isActive: canSave,
2452
2593
  isActive: true,
2453
- text: submitting ? "Saving..." : "Save",
2454
- className: "popupButton"
2594
+ text: submitting ? 'Saving...' : 'Save',
2595
+ className: 'popupButton'
2455
2596
  }, {
2456
- type: "outlinedAction",
2597
+ type: 'outlinedAction',
2457
2598
  onClick: this.onHideStatusPopup,
2458
2599
  isActive: !submitting,
2459
- text: "Cancel",
2460
- className: "popupButton"
2600
+ text: 'Cancel',
2601
+ className: 'popupButton'
2461
2602
  }],
2462
2603
  onClose: this.onHideStatusPopup,
2463
- title: selectedStatusIndex < 0 ? "New Status" : "Edit Status",
2604
+ title: selectedStatusIndex < 0 ? 'New Status' : 'Edit Status',
2464
2605
  children: [/*#__PURE__*/jsx(Components$5.GenericInput, {
2465
2606
  id: "statusLabel",
2466
2607
  type: "text",
@@ -2479,15 +2620,15 @@ class Configuration extends Component {
2479
2620
  className: "marginBottom-16",
2480
2621
  children: [/*#__PURE__*/jsx("div", {
2481
2622
  className: "marginBottom-4",
2482
- children: "This is used to categorise statuses for filtering and analytics purposes"
2623
+ children: 'This is used to categorise statuses for filtering and analytics purposes'
2483
2624
  }), /*#__PURE__*/jsx("div", {
2484
2625
  className: "text-bold",
2485
- children: "This status is considered"
2626
+ children: 'This status is considered'
2486
2627
  })]
2487
2628
  }),
2488
2629
  className: "marginBottom-20",
2489
2630
  rowStyle: {
2490
- flexDirection: "column"
2631
+ flexDirection: 'column'
2491
2632
  },
2492
2633
  buttonStyle: {
2493
2634
  marginBottom: 8
@@ -2513,7 +2654,7 @@ class Configuration extends Component {
2513
2654
  })
2514
2655
  }]
2515
2656
  }), /*#__PURE__*/jsx(Components$5.ColourOptions, {
2516
- options: ["vibrant", "picker"],
2657
+ options: ['vibrant', 'picker'],
2517
2658
  defaultTab: "vibrant",
2518
2659
  value: statusColour,
2519
2660
  onColourSelected: statusColour => this.setState({
@@ -2537,7 +2678,7 @@ class Configuration extends Component {
2537
2678
  render() {
2538
2679
  return /*#__PURE__*/jsxs("div", {
2539
2680
  style: {
2540
- minWidth: "100%"
2681
+ minWidth: '100%'
2541
2682
  },
2542
2683
  children: [this.renderStatuses(), this.renderOtherOptions(), /*#__PURE__*/jsxs("div", {
2543
2684
  style: {
@@ -2553,13 +2694,13 @@ var styles$6 = {
2553
2694
  statusCategoryHeading: {
2554
2695
  marginLeft: 130,
2555
2696
  width: 160,
2556
- textAlign: "center",
2697
+ textAlign: 'center',
2557
2698
  marginBottom: 12
2558
2699
  },
2559
2700
  statusTypeContainer: {
2560
- display: "flex",
2561
- flexDirection: "row",
2562
- alignItems: "center",
2701
+ display: 'flex',
2702
+ flexDirection: 'row',
2703
+ alignItems: 'center',
2563
2704
  marginBottom: 20
2564
2705
  },
2565
2706
  statusTextContainer: {
@@ -2567,19 +2708,19 @@ var styles$6 = {
2567
2708
  },
2568
2709
  statusCategoryContainer: {
2569
2710
  width: 160,
2570
- textAlign: "center"
2711
+ textAlign: 'center'
2571
2712
  },
2572
2713
  statusIcon: {
2573
- cursor: "pointer",
2714
+ cursor: 'pointer',
2574
2715
  fontSize: 20,
2575
2716
  padding: 5,
2576
2717
  marginLeft: 10,
2577
2718
  color: Colours$2.COLOUR_BRANDING_ACTION,
2578
- visibility: "visible"
2719
+ visibility: 'visible'
2579
2720
  },
2580
2721
  savedText: {
2581
2722
  fontSize: 14,
2582
- lineHeight: "33px",
2723
+ lineHeight: '33px',
2583
2724
  marginLeft: 15
2584
2725
  }
2585
2726
  };
@@ -2607,55 +2748,7 @@ var {
2607
2748
  } = PlussCore;
2608
2749
  class RequestsHub extends Component {
2609
2750
  constructor(props) {
2610
- var _this;
2611
2751
  super(props);
2612
- _this = this;
2613
- _defineProperty(this, "setData", () => {
2614
- var allList = [];
2615
- this.state.allList.forEach(ev => {
2616
- if (ev != null && !ev.Deleted) allList.push(ev);
2617
- });
2618
- var upcoming = _.filter(allList, ev => {
2619
- if (!ev) return false;
2620
- if (ev.status && ev.status === "Completed") return false;
2621
- return true;
2622
- });
2623
- var completed = _.filter(allList, ev => {
2624
- if (!ev) return false;
2625
- if (ev.status && ev.status === "Completed") return true;
2626
- return false;
2627
- });
2628
-
2629
- // console.log('setData', upcoming, completed);
2630
- this.setState({
2631
- allList,
2632
- upcoming,
2633
- completed
2634
- });
2635
- });
2636
- _defineProperty(this, "getData", () => {
2637
- var {
2638
- auth
2639
- } = this.props;
2640
- this.setState({
2641
- loadingAll: true
2642
- }, /*#__PURE__*/_asyncToGenerator(function* () {
2643
- try {
2644
- var res = yield maintenanceActions.getJobsRecursive(auth.site);
2645
- _this.setState({
2646
- loadingAll: false
2647
- });
2648
- if (!_.isEmpty(res) && res[0].site === auth.site) {
2649
- _this.props.jobsLoaded(res);
2650
- }
2651
- } catch (error) {
2652
- console.error("getData", error);
2653
- _this.setState({
2654
- loadingAll: false
2655
- });
2656
- }
2657
- }));
2658
- });
2659
2752
  _defineProperty(this, "onAddNew", () => {
2660
2753
  var {
2661
2754
  auth
@@ -2676,91 +2769,74 @@ class RequestsHub extends Component {
2676
2769
  var {
2677
2770
  auth
2678
2771
  } = this.props;
2679
- if (Session$4.validateAccess(auth.site, values.permissionMaintenanceTracking, auth)) return isClass ? "" : true;
2680
- return isClass ? " hub-sideContent-topButton--hide" : false;
2772
+ if (Session$4.validateAccess(auth.site, values.permissionMaintenanceTracking, auth)) return isClass ? '' : true;
2773
+ return isClass ? ' hub-sideContent-topButton--hide' : false;
2681
2774
  });
2682
2775
  _defineProperty(this, "getSideBarSectionColour", id => this.state.selectedSection === id ? {
2683
- backgroundColor: "#fff"
2776
+ backgroundColor: '#fff'
2684
2777
  } : {});
2685
- _defineProperty(this, "renderStats", (stat, loading) => loading ? /*#__PURE__*/jsx(Icon, {
2778
+ _defineProperty(this, "renderStats", (stat, loading) => loading ? /*#__PURE__*/jsx(FontAwesome, {
2686
2779
  style: styles$5.spinner,
2687
- icon: "spinner",
2688
- pulse: true,
2689
- fixedWidth: true
2780
+ name: "spinner fa-pulse fa-fw"
2690
2781
  }) : stat);
2691
2782
  this.state = {
2692
- selectedSection: "all",
2693
- location: "",
2694
- loadingAll: false,
2783
+ selectedSection: 'all',
2784
+ location: '',
2695
2785
  loadingSubmissions: false,
2696
2786
  submissionEntries: [],
2697
- allList: [],
2698
- completed: [],
2699
- upcoming: [],
2700
2787
  now: moment.utc(),
2701
2788
  onlyFuture: true,
2702
- search: ""
2789
+ search: ''
2703
2790
  };
2704
2791
  }
2705
- UNSAFE_componentWillMount() {
2706
- this.updateProps(this.props);
2707
- }
2708
2792
  componentDidMount() {
2709
- this.getData();
2710
- }
2711
- UNSAFE_componentWillReceiveProps(nextProps) {
2712
- if (!_.isEqual(this.props.jobs, nextProps.jobs)) this.updateProps(nextProps);
2713
- }
2714
- updateProps(props) {
2715
- this.setState({
2716
- allList: props.jobs
2717
- }, this.setData);
2793
+ // Data fetching is now handled by JobList component with pagination
2718
2794
  }
2719
2795
  renderLeftBar() {
2720
2796
  var sectionItems = [];
2721
2797
  if (this.canAddNew()) {
2722
2798
  sectionItems.push({
2723
- type: "newButton",
2799
+ type: 'newButton',
2724
2800
  text: "New ".concat(values.textSingularName),
2725
2801
  onClick: this.onAddNew
2726
2802
  });
2727
2803
  }
2728
2804
  sectionItems.push({
2729
- type: "navItem",
2805
+ type: 'navItem',
2730
2806
  text: "View ".concat(values.textSingularName, "s"),
2731
- icon: "eye",
2807
+ icon: 'eye',
2732
2808
  isFontAwesome: true,
2733
- selected: this.state.selectedSection === "all",
2809
+ selected: this.state.selectedSection === 'all',
2734
2810
  onClick: () => {
2735
2811
  this.setState({
2736
- selectedSection: "all"
2812
+ selectedSection: 'all'
2737
2813
  });
2738
2814
  }
2739
2815
  });
2740
2816
  if (Session$4.validateAccess(this.props.auth.site, values.permissionMaintenanceTypes, this.props.auth)) {
2741
2817
  sectionItems.push({
2742
- type: "navItem",
2818
+ type: 'navItem',
2743
2819
  text: values.textTitleJobTypes,
2744
2820
  // icon: 'maintenance2',
2745
2821
  // isSVG: true,
2746
- selected: this.state.selectedSection === "requestTypes",
2822
+ selected: this.state.selectedSection === 'requestTypes',
2747
2823
  onClick: () => {
2748
2824
  this.setState({
2749
- selectedSection: "requestTypes"
2825
+ selectedSection: 'requestTypes'
2750
2826
  });
2751
2827
  }
2752
2828
  });
2753
2829
  }
2754
- if (Session$4.validateAccess(this.props.auth.site, "featurePicker", this.props.auth)) {
2830
+ if (Session$4.validateAccess(this.props.auth.site, 'featurePicker', this.props.auth)) {
2755
2831
  sectionItems.push({
2756
- type: "navItem",
2757
- text: "Feature Configuration",
2758
- icon: "settings",
2832
+ type: 'navItem',
2833
+ text: 'Feature Configuration',
2834
+ icon: 'settings',
2759
2835
  isFontAwesome: false,
2760
- selected: this.state.selectedSection === "config",
2836
+ selected: this.state.selectedSection === 'config',
2761
2837
  onClick: () => {
2762
2838
  this.setState({
2763
- selectedSection: "config"
2839
+ selectedSection: 'config'
2764
2840
  });
2765
2841
  }
2766
2842
  });
@@ -2778,16 +2854,14 @@ class RequestsHub extends Component {
2778
2854
  });
2779
2855
  }
2780
2856
  renderRight() {
2781
- if (this.state.selectedSection === "requestTypes") {
2857
+ if (this.state.selectedSection === 'requestTypes') {
2782
2858
  return /*#__PURE__*/jsx(JobTypes$1, {
2783
2859
  onNew: this.onAddRequestType
2784
2860
  });
2785
- } else if (this.state.selectedSection === "config") {
2861
+ } else if (this.state.selectedSection === 'config') {
2786
2862
  return /*#__PURE__*/jsx(Configuration$1, {});
2787
2863
  }
2788
- return /*#__PURE__*/jsx(JobList$1, {
2789
- source: this.state.allList
2790
- });
2864
+ return /*#__PURE__*/jsx(JobList$1, {});
2791
2865
  }
2792
2866
  render() {
2793
2867
  return /*#__PURE__*/jsxs("div", {
@@ -2804,21 +2878,21 @@ class RequestsHub extends Component {
2804
2878
  }
2805
2879
  var styles$5 = {
2806
2880
  sideBarTitleSection: {
2807
- lineHeight: "40px",
2881
+ lineHeight: '40px',
2808
2882
  marginTop: 30,
2809
2883
  marginBottom: 30,
2810
2884
  paddingLeft: 24,
2811
2885
  paddingRight: 24
2812
2886
  },
2813
2887
  sideBarSection: {
2814
- weight: "100%",
2888
+ weight: '100%',
2815
2889
  minWidth: 200,
2816
2890
  padding: 32,
2817
2891
  paddingLeft: 24,
2818
- cursor: "pointer",
2819
- display: "flex",
2820
- flexDirection: "column",
2821
- justifyContent: "center"
2892
+ cursor: 'pointer',
2893
+ display: 'flex',
2894
+ flexDirection: 'column',
2895
+ justifyContent: 'center'
2822
2896
  },
2823
2897
  spinner: {
2824
2898
  fontSize: 32,
@@ -2830,14 +2904,11 @@ var mapStateToProps$4 = state => {
2830
2904
  auth
2831
2905
  } = state;
2832
2906
  return {
2833
- jobs: state[values.reducerKey].jobs,
2834
2907
  auth,
2835
2908
  strings: state.strings && state.strings.config || {}
2836
2909
  };
2837
2910
  };
2838
- var RequestsHub$1 = connect(mapStateToProps$4, {
2839
- jobsLoaded
2840
- })(withRouter(RequestsHub));
2911
+ var RequestsHub$1 = connect(mapStateToProps$4, {})(withRouter(RequestsHub));
2841
2912
 
2842
2913
  function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2843
2914
  function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -3454,9 +3525,9 @@ class Job extends Component {
3454
3525
  children: [/*#__PURE__*/jsx("div", {
3455
3526
  className: "commentReply_button".concat(!_.isEmpty(this.state.commentInput) ? " commentReply_button-active" : ""),
3456
3527
  onClick: this.onAddComment,
3457
- children: /*#__PURE__*/jsx(Icon, {
3528
+ children: /*#__PURE__*/jsx(FontAwesome, {
3458
3529
  className: "commentReply_icon",
3459
- icon: "paper-plane"
3530
+ name: "paper-plane-o"
3460
3531
  })
3461
3532
  }), /*#__PURE__*/jsx(Textarea, {
3462
3533
  id: "commentInput",
@@ -3727,9 +3798,9 @@ class Job extends Component {
3727
3798
  className: "maintenanceNote",
3728
3799
  children: [/*#__PURE__*/jsxs("div", {
3729
3800
  className: "maintenanceNote_top",
3730
- children: [this.props.auth && this.props.auth.user && this.props.auth.user.Id === note.User.id && /*#__PURE__*/jsx(Icon, {
3801
+ children: [this.props.auth && this.props.auth.user && this.props.auth.user.Id === note.User.id && /*#__PURE__*/jsx(Components$3.SVGIcon, {
3731
3802
  colour: Colours$1.COLOUR_DUSK_LIGHT,
3732
- icon: "ellipsis-vertical",
3803
+ icon: "more15",
3733
3804
  className: "maintenanceNote_moreIcon",
3734
3805
  onClick: () => this.onOpenNoteMenu(index)
3735
3806
  }), /*#__PURE__*/jsx("p", {
@@ -3866,15 +3937,13 @@ class Job extends Component {
3866
3937
 
3867
3938
  // Show spinner while retrying
3868
3939
  if (retryingSync) {
3869
- return /*#__PURE__*/jsx(Icon, {
3940
+ return /*#__PURE__*/jsx(FontAwesome, {
3870
3941
  style: {
3871
3942
  fontSize: 20,
3872
3943
  color: Colours$1.COLOUR_DUSK_LIGHT,
3873
3944
  marginLeft: 8
3874
3945
  },
3875
- icon: "spinner",
3876
- pulse: true,
3877
- fixedWidth: true
3946
+ name: "spinner fa-pulse fa-fw"
3878
3947
  });
3879
3948
  }
3880
3949
  return /*#__PURE__*/jsx("div", {
@@ -3900,9 +3969,9 @@ class Job extends Component {
3900
3969
  if (retrySyncError) {
3901
3970
  return /*#__PURE__*/jsxs(Components$3.Text, {
3902
3971
  type: "body",
3903
- children: [/*#__PURE__*/jsx(Icon, {
3972
+ children: [/*#__PURE__*/jsx(FontAwesome, {
3904
3973
  className: "userStatusIcon",
3905
- icon: "circle-xmark",
3974
+ name: "times-circle",
3906
3975
  style: {
3907
3976
  color: Colours$1.COLOUR_RED
3908
3977
  }
@@ -3914,9 +3983,9 @@ class Job extends Component {
3914
3983
  if (retrySyncInitiated) {
3915
3984
  return /*#__PURE__*/jsxs(Components$3.Text, {
3916
3985
  type: "body",
3917
- children: [/*#__PURE__*/jsx(Icon, {
3986
+ children: [/*#__PURE__*/jsx(FontAwesome, {
3918
3987
  className: "userStatusIcon",
3919
- icon: "circle-check",
3988
+ name: "check-circle",
3920
3989
  style: {
3921
3990
  color: Colours$1.COLOUR_GREEN
3922
3991
  }
@@ -3928,9 +3997,9 @@ class Job extends Component {
3928
3997
  if (this.hasSyncFailureWithoutSuccess()) {
3929
3998
  return /*#__PURE__*/jsxs(Components$3.Text, {
3930
3999
  type: "body",
3931
- children: [/*#__PURE__*/jsx(Icon, {
4000
+ children: [/*#__PURE__*/jsx(FontAwesome, {
3932
4001
  className: "userStatusIcon",
3933
- icon: "circle-xmark",
4002
+ name: "times-circle",
3934
4003
  style: {
3935
4004
  color: Colours$1.COLOUR_RED
3936
4005
  }
@@ -4071,11 +4140,9 @@ class Job extends Component {
4071
4140
  hasPadding: true,
4072
4141
  children: /*#__PURE__*/jsx("div", {
4073
4142
  className: "flex flex-center-row",
4074
- children: /*#__PURE__*/jsx(Icon, {
4143
+ children: /*#__PURE__*/jsx(FontAwesome, {
4075
4144
  className: "spinner",
4076
- icon: "spinner",
4077
- pulse: true,
4078
- fixedWidth: true
4145
+ name: "spinner fa-pulse fa-fw"
4079
4146
  })
4080
4147
  })
4081
4148
  });
@@ -4121,9 +4188,9 @@ class Job extends Component {
4121
4188
  onClick: () => {
4122
4189
  this.attachmentInput.click();
4123
4190
  },
4124
- children: [/*#__PURE__*/jsx(Icon, {
4191
+ children: [/*#__PURE__*/jsx(FontAwesome, {
4125
4192
  className: "iconTextButton_icon",
4126
- icon: "paperclip"
4193
+ name: "paperclip"
4127
4194
  }), /*#__PURE__*/jsx("p", {
4128
4195
  className: "iconTextButton_text",
4129
4196
  children: "Add Attachment"
@@ -4146,20 +4213,18 @@ class Job extends Component {
4146
4213
  if (this.state.confirmingAssignee) {
4147
4214
  content = /*#__PURE__*/jsx("div", {
4148
4215
  className: "flex flex-center-row",
4149
- children: /*#__PURE__*/jsx(Icon, {
4216
+ children: /*#__PURE__*/jsx(FontAwesome, {
4150
4217
  className: "spinner",
4151
- icon: "spinner",
4152
- pulse: true,
4153
- fixedWidth: true
4218
+ name: "spinner fa-pulse fa-fw"
4154
4219
  })
4155
4220
  });
4156
4221
  } else if (this.state.selectedAssignee) {
4157
4222
  content = /*#__PURE__*/jsx("div", {
4158
4223
  children: /*#__PURE__*/jsx(Components$3.UserListing, {
4159
4224
  user: this.state.selectedAssignee,
4160
- rightContent: /*#__PURE__*/jsx(Icon, {
4225
+ rightContent: /*#__PURE__*/jsx(Components$3.SVGIcon, {
4161
4226
  className: "removeIcon",
4162
- icon: "xmark",
4227
+ icon: "close",
4163
4228
  onClick: () => {
4164
4229
  this.onSelectAssignee();
4165
4230
  },
@@ -4693,9 +4758,9 @@ class AddJob extends Component {
4693
4758
  } = this.state;
4694
4759
  return types.map(ev => {
4695
4760
  if (ev != null) {
4696
- return /*#__PURE__*/jsx(Dropdown.Item, {
4761
+ return /*#__PURE__*/jsx(DropdownItem, {
4697
4762
  eventKey: ev.typeName,
4698
- active: type === ev.typeName,
4763
+ ive: type === ev.typeName,
4699
4764
  children: ev.typeName
4700
4765
  }, ev.typeName);
4701
4766
  }
@@ -5019,9 +5084,9 @@ class AddJob extends Component {
5019
5084
  errorMessage: "Not a valid date",
5020
5085
  alwaysShowLabel: true,
5021
5086
  readOnly: true,
5022
- rightContent: !_.isEmpty(field.answer) && /*#__PURE__*/jsx(Icon, {
5087
+ rightContent: !_.isEmpty(field.answer) && /*#__PURE__*/jsx(Components$2.SVGIcon, {
5023
5088
  colour: Colours.COLOUR_DUSK_LIGHT,
5024
- icon: "xmark",
5089
+ icon: "close",
5025
5090
  className: "timepicker_clear",
5026
5091
  onClick: () => this.onChangeDateAnswer(fieldId, undefined, false)
5027
5092
  })
@@ -5052,9 +5117,9 @@ class AddJob extends Component {
5052
5117
  width: "100%"
5053
5118
  }
5054
5119
  }),
5055
- rightContent: !_.isEmpty(field.answer) && /*#__PURE__*/jsx(Icon, {
5120
+ rightContent: !_.isEmpty(field.answer) && /*#__PURE__*/jsx(Components$2.SVGIcon, {
5056
5121
  colour: Colours.COLOUR_DUSK_LIGHT,
5057
- icon: "xmark",
5122
+ icon: "close",
5058
5123
  className: "timepicker_clear",
5059
5124
  onClick: () => this.onChangeTimeAnswer(fieldId, undefined)
5060
5125
  })
@@ -5113,9 +5178,9 @@ class AddJob extends Component {
5113
5178
  }), /*#__PURE__*/jsxs("div", {
5114
5179
  className: "iconTextButton marginBottom-16",
5115
5180
  onClick: () => this.customDocumentInputs[fieldId].click(),
5116
- children: [/*#__PURE__*/jsx(Icon, {
5181
+ children: [/*#__PURE__*/jsx(FontAwesome, {
5117
5182
  className: "iconTextButton_icon",
5118
- icon: "paperclip"
5183
+ name: "paperclip"
5119
5184
  }), /*#__PURE__*/jsx("p", {
5120
5185
  className: "iconTextButton_text",
5121
5186
  children: "Add Attachment"
@@ -5293,11 +5358,11 @@ var {
5293
5358
  Helper
5294
5359
  } = PlussCore;
5295
5360
  var DEFAULT_FIELD = {
5296
- type: "text",
5297
- label: "",
5361
+ type: 'text',
5362
+ label: '',
5298
5363
  mandatory: false,
5299
5364
  isTitle: false,
5300
- values: [""]
5365
+ values: ['']
5301
5366
  };
5302
5367
  class AddJobType extends Component {
5303
5368
  constructor(props) {
@@ -5324,12 +5389,12 @@ class AddJobType extends Component {
5324
5389
  customFields: customFields || [_.cloneDeep(DEFAULT_FIELD)]
5325
5390
  });
5326
5391
  } catch (error) {
5327
- console.error("getJobType", error);
5392
+ console.error('getJobType', error);
5328
5393
  }
5329
5394
  }));
5330
5395
  _defineProperty(this, "getFieldTypeTitle", type => {
5331
5396
  var fieldType = this.fieldTypes.find(f => f.Key === type);
5332
- return fieldType ? fieldType.Title : "";
5397
+ return fieldType ? fieldType.Title : '';
5333
5398
  });
5334
5399
  _defineProperty(this, "validateEmail", () => {
5335
5400
  var {
@@ -5350,7 +5415,7 @@ class AddJobType extends Component {
5350
5415
  });
5351
5416
  _defineProperty(this, "onHandleChange", event => {
5352
5417
  var stateChange = {};
5353
- stateChange[event.target.getAttribute("id")] = event.target.value;
5418
+ stateChange[event.target.getAttribute('id')] = event.target.value;
5354
5419
  this.setState(stateChange);
5355
5420
  });
5356
5421
  _defineProperty(this, "onFieldTypeChanged", (fieldIndex, key) => {
@@ -5412,7 +5477,7 @@ class AddJobType extends Component {
5412
5477
  });
5413
5478
  _defineProperty(this, "onAddNewOption", fieldIndex => {
5414
5479
  var customFields = [...this.state.customFields];
5415
- customFields[fieldIndex].values.push("");
5480
+ customFields[fieldIndex].values.push('');
5416
5481
  this.setState({
5417
5482
  customFields
5418
5483
  });
@@ -5488,59 +5553,59 @@ class AddJobType extends Component {
5488
5553
  success: true
5489
5554
  });
5490
5555
  } catch (error) {
5491
- console.error("onSave", error);
5556
+ console.error('onSave', error);
5492
5557
  _this.setState({
5493
5558
  submitting: false
5494
5559
  });
5495
- alert("Something went wrong with the request. Please try again.");
5560
+ alert('Something went wrong with the request. Please try again.');
5496
5561
  }
5497
5562
  }));
5498
5563
  });
5499
5564
  this.fieldTypes = [{
5500
- Title: "Text Input",
5501
- Key: "text"
5565
+ Title: 'Text Input',
5566
+ Key: 'text'
5502
5567
  }, {
5503
- Title: "Email Input",
5504
- Key: "email"
5568
+ Title: 'Email Input',
5569
+ Key: 'email'
5505
5570
  }, {
5506
- Title: "Phone Input",
5507
- Key: "phone"
5571
+ Title: 'Phone Input',
5572
+ Key: 'phone'
5508
5573
  }, {
5509
- Title: "Date Input",
5510
- Key: "date"
5574
+ Title: 'Date Input',
5575
+ Key: 'date'
5511
5576
  }, {
5512
- Title: "Time Input",
5513
- Key: "time"
5577
+ Title: 'Time Input',
5578
+ Key: 'time'
5514
5579
  }, {
5515
- Title: "Image Input",
5516
- Key: "image"
5580
+ Title: 'Image Input',
5581
+ Key: 'image'
5517
5582
  },
5518
5583
  // {
5519
5584
  // Title: 'Document Input',
5520
5585
  // Key: 'document',
5521
5586
  // },
5522
5587
  {
5523
- Title: "Yes/No Question",
5524
- Key: "yn"
5588
+ Title: 'Yes/No Question',
5589
+ Key: 'yn'
5525
5590
  }, {
5526
- Title: "Multiple Choice",
5527
- Key: "multichoice"
5591
+ Title: 'Multiple Choice',
5592
+ Key: 'multichoice'
5528
5593
  }, {
5529
- Title: "Checkboxes",
5530
- Key: "checkbox"
5594
+ Title: 'Checkboxes',
5595
+ Key: 'checkbox'
5531
5596
  }, {
5532
- Title: "Title Text",
5533
- Key: "staticTitle"
5597
+ Title: 'Title Text',
5598
+ Key: 'staticTitle'
5534
5599
  }, {
5535
- Title: "Paragraph Text",
5536
- Key: "staticText"
5600
+ Title: 'Paragraph Text',
5601
+ Key: 'staticText'
5537
5602
  }];
5538
5603
  this.state = {
5539
5604
  loading: false,
5540
- jobTypeId: Helper.safeReadParams(this.props, "jobTypeId") ? this.props.match.params.jobTypeId : null,
5541
- jobTypeName: "",
5542
- jobTypeEmail: "",
5543
- jobTypeDescription: "",
5605
+ jobTypeId: Helper.safeReadParams(this.props, 'jobTypeId') ? this.props.match.params.jobTypeId : null,
5606
+ jobTypeName: '',
5607
+ jobTypeEmail: '',
5608
+ jobTypeDescription: '',
5544
5609
  hasCustomFields: true ,
5545
5610
  customFields: [_.cloneDeep(DEFAULT_FIELD)],
5546
5611
  jobTypeLevel: 1,
@@ -5576,23 +5641,23 @@ class AddJobType extends Component {
5576
5641
  mandatory,
5577
5642
  isTitle
5578
5643
  } = field;
5579
- if (["staticTitle", "staticText"].includes(type)) return;
5644
+ if (['staticTitle', 'staticText'].includes(type)) return;
5580
5645
  if (_.isEmpty(label)) {
5581
5646
  missingLabel = true;
5582
- } else if (_.isEmpty(type) || (type === "multichoice" || type === "checkbox") && (!values || values.length < 2 || !values.every(value => !_.isEmpty(value)))) {
5647
+ } else if (_.isEmpty(type) || (type === 'multichoice' || type === 'checkbox') && (!values || values.length < 2 || !values.every(value => !_.isEmpty(value)))) {
5583
5648
  warnings.push("'".concat(label, "' is incomplete"));
5584
5649
  }
5585
5650
  if (mandatory) hasMandatoryField = true;
5586
5651
  if (isTitle) titleFieldCount += 1;
5587
5652
  });
5588
5653
  if (missingLabel) {
5589
- warnings.push("All inputs must have a label");
5654
+ warnings.push('All inputs must have a label');
5590
5655
  }
5591
5656
  if (!hasMandatoryField) {
5592
- warnings.push("There must be at least one required input");
5657
+ warnings.push('There must be at least one required input');
5593
5658
  }
5594
5659
  if (titleFieldCount > 1) {
5595
- warnings.push("Only one required input can be selected as title for the request");
5660
+ warnings.push('Only one required input can be selected as title for the request');
5596
5661
  }
5597
5662
  }
5598
5663
  this.setState({
@@ -5626,7 +5691,7 @@ class AddJobType extends Component {
5626
5691
  children: [/*#__PURE__*/jsxs(Components$1.Text, {
5627
5692
  type: "formTitleLarge",
5628
5693
  className: "marginBottom-24",
5629
- children: [!jobTypeId ? "New" : "Edit", " ", values.textJobType]
5694
+ children: [!jobTypeId ? 'New' : 'Edit', " ", values.textJobType]
5630
5695
  }), /*#__PURE__*/jsx(Components$1.GenericInput, {
5631
5696
  id: "jobTypeName",
5632
5697
  type: "text",
@@ -5686,14 +5751,14 @@ class AddJobType extends Component {
5686
5751
  className: "fieldInner",
5687
5752
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5688
5753
  id: "fieldLabel".concat(fieldIndex),
5689
- className: "textInput",
5690
- placeholder: "Type your label here (required)",
5754
+ className: 'textInput',
5755
+ placeholder: 'Type your label here (required)',
5691
5756
  value: field.label,
5692
5757
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5693
5758
  }), /*#__PURE__*/jsx(Components$1.GenericInput, {
5694
5759
  id: "fieldPlaceHolder".concat(fieldIndex),
5695
- className: "placeHolderInput",
5696
- placeholder: "Insert placeholder (optional)",
5760
+ className: 'placeHolderInput',
5761
+ placeholder: 'Insert placeholder (optional)',
5697
5762
  value: field.placeHolder,
5698
5763
  onChange: e => this.onFieldPlaceHolderChanged(fieldIndex, e)
5699
5764
  }), this.renderOptionalCheckBox(field, fieldIndex), this.renderTitleCheckBox(field, fieldIndex)]
@@ -5704,8 +5769,8 @@ class AddJobType extends Component {
5704
5769
  className: "fieldInner",
5705
5770
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5706
5771
  id: "fieldLabel".concat(fieldIndex),
5707
- className: "textInput",
5708
- placeholder: "Type your label here (required)",
5772
+ className: 'textInput',
5773
+ placeholder: 'Type your label here (required)',
5709
5774
  value: field.label,
5710
5775
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5711
5776
  }), this.renderOptionalCheckBox(field, fieldIndex), this.renderTitleCheckBox(field, fieldIndex)]
@@ -5716,8 +5781,8 @@ class AddJobType extends Component {
5716
5781
  className: "fieldInner",
5717
5782
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5718
5783
  id: "fieldLabel".concat(fieldIndex),
5719
- className: "textInput",
5720
- placeholder: "Type your label here (required)",
5784
+ className: 'textInput',
5785
+ placeholder: 'Type your label here (required)',
5721
5786
  value: field.label,
5722
5787
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5723
5788
  }), this.renderOptionalCheckBox(field, fieldIndex), this.renderTitleCheckBox(field, fieldIndex)]
@@ -5728,8 +5793,8 @@ class AddJobType extends Component {
5728
5793
  className: "fieldInner",
5729
5794
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5730
5795
  id: "fieldLabel".concat(fieldIndex),
5731
- className: "textInput",
5732
- placeholder: "Type your label here (required)",
5796
+ className: 'textInput',
5797
+ placeholder: 'Type your label here (required)',
5733
5798
  value: field.label,
5734
5799
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5735
5800
  }), this.renderOptionalCheckBox(field, fieldIndex)]
@@ -5740,8 +5805,8 @@ class AddJobType extends Component {
5740
5805
  className: "fieldInner",
5741
5806
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5742
5807
  id: "fieldLabel".concat(fieldIndex),
5743
- className: "textInput",
5744
- placeholder: "Type your label here (required)",
5808
+ className: 'textInput',
5809
+ placeholder: 'Type your label here (required)',
5745
5810
  value: field.label,
5746
5811
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5747
5812
  }), this.renderOptionalCheckBox(field, fieldIndex)]
@@ -5752,8 +5817,8 @@ class AddJobType extends Component {
5752
5817
  className: "fieldInner",
5753
5818
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5754
5819
  id: "fieldLabel".concat(fieldIndex),
5755
- className: "textInput",
5756
- placeholder: "Type your label here (required)",
5820
+ className: 'textInput',
5821
+ placeholder: 'Type your label here (required)',
5757
5822
  value: field.label,
5758
5823
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5759
5824
  }), /*#__PURE__*/jsxs(Table, {
@@ -5769,7 +5834,7 @@ class AddJobType extends Component {
5769
5834
  })]
5770
5835
  })
5771
5836
  }), /*#__PURE__*/jsx("tbody", {
5772
- children: ["Yes", "No"].map((value, optionIndex) => {
5837
+ children: ['Yes', 'No'].map((value, optionIndex) => {
5773
5838
  return /*#__PURE__*/jsxs("tr", {
5774
5839
  className: "option",
5775
5840
  children: [/*#__PURE__*/jsx("td", {
@@ -5799,8 +5864,8 @@ class AddJobType extends Component {
5799
5864
  className: "fieldInner",
5800
5865
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5801
5866
  id: "fieldLabel".concat(fieldIndex),
5802
- className: "textInput",
5803
- placeholder: "Type your label here (required)",
5867
+ className: 'textInput',
5868
+ placeholder: 'Type your label here (required)',
5804
5869
  value: field.label,
5805
5870
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5806
5871
  }), /*#__PURE__*/jsxs(Table, {
@@ -5830,15 +5895,15 @@ class AddJobType extends Component {
5830
5895
  }), /*#__PURE__*/jsx("td", {
5831
5896
  children: /*#__PURE__*/jsx(Components$1.GenericInput, {
5832
5897
  id: "fieldOption".concat(optionIndex),
5833
- placeholder: "Enter option",
5898
+ placeholder: 'Enter option',
5834
5899
  value: value,
5835
5900
  onChange: e => this.onFieldOptionChanged(fieldIndex, optionIndex, e)
5836
5901
  })
5837
5902
  }), /*#__PURE__*/jsx("td", {
5838
5903
  children: customFields[fieldIndex].values.length > 1 ? /*#__PURE__*/jsx("div", {
5839
5904
  onClick: () => this.onRemoveOption(fieldIndex, optionIndex),
5840
- children: /*#__PURE__*/jsx(Icon, {
5841
- icon: "circle-minus",
5905
+ children: /*#__PURE__*/jsx(FontAwesome, {
5906
+ name: "minus-circle",
5842
5907
  className: "cornerCancelButton_icon"
5843
5908
  })
5844
5909
  }) : null
@@ -5849,9 +5914,9 @@ class AddJobType extends Component {
5849
5914
  }), /*#__PURE__*/jsxs("div", {
5850
5915
  className: "clearfix addoption optionAdd marginBottom-10",
5851
5916
  onClick: () => this.onAddNewOption(fieldIndex),
5852
- children: [/*#__PURE__*/jsx(Icon, {
5917
+ children: [/*#__PURE__*/jsx(Components$1.P60Icon, {
5853
5918
  className: "addoption_plus",
5854
- icon: "circle-plus"
5919
+ icon: "add-circle"
5855
5920
  }), /*#__PURE__*/jsx("div", {
5856
5921
  className: "fillSpace",
5857
5922
  children: /*#__PURE__*/jsx("p", {
@@ -5870,8 +5935,8 @@ class AddJobType extends Component {
5870
5935
  className: "fieldInner",
5871
5936
  children: [/*#__PURE__*/jsx(Components$1.GenericInput, {
5872
5937
  id: "fieldLabel".concat(fieldIndex),
5873
- className: "textInput",
5874
- placeholder: "Type your label here (required)",
5938
+ className: 'textInput',
5939
+ placeholder: 'Type your label here (required)',
5875
5940
  value: field.label,
5876
5941
  onChange: e => this.onFieldLabelChanged(fieldIndex, e)
5877
5942
  }), /*#__PURE__*/jsxs(Table, {
@@ -5901,15 +5966,15 @@ class AddJobType extends Component {
5901
5966
  }), /*#__PURE__*/jsx("td", {
5902
5967
  children: /*#__PURE__*/jsx(Components$1.GenericInput, {
5903
5968
  id: "fieldOption".concat(optionIndex),
5904
- placeholder: "Enter option",
5969
+ placeholder: 'Enter option',
5905
5970
  value: value,
5906
5971
  onChange: e => this.onFieldOptionChanged(fieldIndex, optionIndex, e)
5907
5972
  })
5908
5973
  }), /*#__PURE__*/jsx("td", {
5909
5974
  children: customFields[fieldIndex].values.length > 1 ? /*#__PURE__*/jsx("div", {
5910
5975
  onClick: () => this.onRemoveOption(fieldIndex, optionIndex),
5911
- children: /*#__PURE__*/jsx(Icon, {
5912
- icon: "circle-minus",
5976
+ children: /*#__PURE__*/jsx(FontAwesome, {
5977
+ name: "minus-circle",
5913
5978
  className: "cornerCancelButton_icon"
5914
5979
  })
5915
5980
  }) : null
@@ -5920,9 +5985,9 @@ class AddJobType extends Component {
5920
5985
  }), /*#__PURE__*/jsxs("div", {
5921
5986
  className: "clearfix addoption optionAdd marginBottom-10",
5922
5987
  onClick: () => this.onAddNewOption(fieldIndex),
5923
- children: [/*#__PURE__*/jsx(Icon, {
5988
+ children: [/*#__PURE__*/jsx(Components$1.P60Icon, {
5924
5989
  className: "addoption_plus",
5925
- icon: "circle-plus"
5990
+ icon: "add-circle"
5926
5991
  }), /*#__PURE__*/jsx("div", {
5927
5992
  className: "fillSpace",
5928
5993
  children: /*#__PURE__*/jsx("p", {
@@ -5963,27 +6028,27 @@ class AddJobType extends Component {
5963
6028
  } = this.state;
5964
6029
  var renderFieldContent = () => {
5965
6030
  switch (field.type) {
5966
- case "text":
5967
- case "email":
5968
- case "phone":
6031
+ case 'text':
6032
+ case 'email':
6033
+ case 'phone':
5969
6034
  return this.renderFieldText(field, fieldIndex);
5970
- case "date":
6035
+ case 'date':
5971
6036
  return this.renderFieldDate(field, fieldIndex);
5972
- case "time":
6037
+ case 'time':
5973
6038
  return this.renderFieldTime(field, fieldIndex);
5974
- case "image":
6039
+ case 'image':
5975
6040
  return this.renderFieldImage(field, fieldIndex);
5976
- case "document":
6041
+ case 'document':
5977
6042
  return this.renderFieldDocument(field, fieldIndex);
5978
- case "yn":
6043
+ case 'yn':
5979
6044
  return this.renderFieldYesNo(field, fieldIndex);
5980
- case "multichoice":
6045
+ case 'multichoice':
5981
6046
  return this.renderFieldMultiple(field, fieldIndex);
5982
- case "checkbox":
6047
+ case 'checkbox':
5983
6048
  return this.renderFieldCheckbox(field, fieldIndex);
5984
- case "staticTitle":
6049
+ case 'staticTitle':
5985
6050
  return this.renderFieldStaticTitle(field, fieldIndex);
5986
- case "staticText":
6051
+ case 'staticText':
5987
6052
  return this.renderFieldStaticText(field, fieldIndex);
5988
6053
  default:
5989
6054
  return null;
@@ -6029,15 +6094,15 @@ class AddJobType extends Component {
6029
6094
  children: [fieldIndex > 0 ? /*#__PURE__*/jsx("div", {
6030
6095
  className: "circle",
6031
6096
  onClick: () => this.onMoveFieldPrev(fieldIndex),
6032
- children: /*#__PURE__*/jsx(Icon, {
6033
- icon: "angle-up",
6097
+ children: /*#__PURE__*/jsx(FontAwesome, {
6098
+ name: "angle-up",
6034
6099
  className: "icon"
6035
6100
  })
6036
6101
  }) : null, fieldIndex < customFields.length - 1 ? /*#__PURE__*/jsx("div", {
6037
6102
  className: "circle",
6038
6103
  onClick: () => this.onMoveFieldNext(fieldIndex),
6039
- children: /*#__PURE__*/jsx(Icon, {
6040
- icon: "angle-down",
6104
+ children: /*#__PURE__*/jsx(FontAwesome, {
6105
+ name: "angle-down",
6041
6106
  className: "icon"
6042
6107
  })
6043
6108
  }) : null]
@@ -6065,9 +6130,9 @@ class AddJobType extends Component {
6065
6130
  children: [customFields.map((field, fieldIndex) => this.renderField(field, fieldIndex)), /*#__PURE__*/jsxs("div", {
6066
6131
  className: "clearfix addoption addField",
6067
6132
  onClick: () => this.onAddNewField(),
6068
- children: [/*#__PURE__*/jsx(Icon, {
6133
+ children: [/*#__PURE__*/jsx(Components$1.P60Icon, {
6069
6134
  className: "addoption_plus",
6070
- icon: "circle-plus"
6135
+ icon: "add-circle"
6071
6136
  }), /*#__PURE__*/jsx("div", {
6072
6137
  className: "fillSpace",
6073
6138
  children: /*#__PURE__*/jsx("p", {
@@ -6108,11 +6173,11 @@ class AddJobType extends Component {
6108
6173
  } = this.state;
6109
6174
  if (!success) return null;
6110
6175
  return /*#__PURE__*/jsx(Components$1.SuccessPopup, {
6111
- text: "".concat("".concat(values.textJobType), " has been ", !jobTypeId ? "added" : "edited"),
6176
+ text: "".concat("".concat(values.textJobType), " has been ", !jobTypeId ? 'added' : 'edited'),
6112
6177
  buttons: [{
6113
- type: "outlined",
6178
+ type: 'outlined',
6114
6179
  onClick: this.onBack,
6115
- text: "Go to home"
6180
+ text: 'Go to home'
6116
6181
  }]
6117
6182
  });
6118
6183
  }
@@ -6213,23 +6278,23 @@ var AnalyticsHub = _ref => {
6213
6278
  return strings.sideNav[key];
6214
6279
  })();
6215
6280
  var exportColumns = [{
6216
- label: "Select All",
6217
- key: ""
6281
+ label: 'Select All',
6282
+ key: ''
6218
6283
  }, {
6219
- label: "Start Date",
6220
- key: "startDate"
6284
+ label: 'Start Date',
6285
+ key: 'startDate'
6221
6286
  }, {
6222
- label: "End Date",
6223
- key: "endDate"
6287
+ label: 'End Date',
6288
+ key: 'endDate'
6224
6289
  }, {
6225
6290
  label: "".concat(values.textSingularName, "s"),
6226
- key: "requests"
6291
+ key: 'requests'
6227
6292
  }, {
6228
6293
  label: "Completed ".concat(values.textSingularName, "s"),
6229
- key: "completedRequests"
6294
+ key: 'completedRequests'
6230
6295
  }, {
6231
- label: "Comments",
6232
- key: "comments"
6296
+ label: 'Comments',
6297
+ key: 'comments'
6233
6298
  }];
6234
6299
  useEffect(() => {
6235
6300
  getData();
@@ -6241,12 +6306,12 @@ var AnalyticsHub = _ref => {
6241
6306
  var timeDifference = endTime - startTime;
6242
6307
  var [currentStatsResponse, prevStatsResponse] = yield Promise.all([analyticsActions.getAggregateEntityStats(auth.site, values.analyticsKey, startTime, endTime, true), analyticsActions.getAggregateEntityStats(auth.site, values.analyticsKey, startTime - timeDifference, startTime, true)]);
6243
6308
  var data = {
6244
- requests: Analytics$1.countActivities(currentStatsResponse.data, "Request", "total"),
6245
- prevRequests: Analytics$1.countActivities(prevStatsResponse.data, "Request", "total"),
6246
- completedRequests: Analytics$1.countActivities(currentStatsResponse.data, "RequestCompleted", "unique"),
6247
- prevCompletedRequests: Analytics$1.countActivities(prevStatsResponse.data, "RequestCompleted", "unique"),
6248
- comments: Analytics$1.countActivities(currentStatsResponse.data, "Comment", "total"),
6249
- prevComments: Analytics$1.countActivities(prevStatsResponse.data, "Comment", "total"),
6309
+ requests: Analytics$1.countActivities(currentStatsResponse.data, 'Request', 'total'),
6310
+ prevRequests: Analytics$1.countActivities(prevStatsResponse.data, 'Request', 'total'),
6311
+ completedRequests: Analytics$1.countActivities(currentStatsResponse.data, 'RequestCompleted', 'unique'),
6312
+ prevCompletedRequests: Analytics$1.countActivities(prevStatsResponse.data, 'RequestCompleted', 'unique'),
6313
+ comments: Analytics$1.countActivities(currentStatsResponse.data, 'Comment', 'total'),
6314
+ prevComments: Analytics$1.countActivities(prevStatsResponse.data, 'Comment', 'total'),
6250
6315
  isLoading: false
6251
6316
  };
6252
6317
  setAnalyticsData(data);
@@ -6260,8 +6325,8 @@ var AnalyticsHub = _ref => {
6260
6325
  };
6261
6326
  var getExportSource = () => {
6262
6327
  return [{
6263
- startDate: moment(startTime + 1).format("D-MM-YYYY"),
6264
- endDate: moment(endTime).format("D-MM-YYYY"),
6328
+ startDate: moment(startTime + 1).format('D-MM-YYYY'),
6329
+ endDate: moment(endTime).format('D-MM-YYYY'),
6265
6330
  requests: analyticsData.requests,
6266
6331
  completedRequests: analyticsData.completedRequests,
6267
6332
  comments: analyticsData.comments
@@ -6296,14 +6361,14 @@ var AnalyticsHub = _ref => {
6296
6361
  setIsExportOpen(true);
6297
6362
  },
6298
6363
  isActive: isReadyToOpenCSV(),
6299
- leftIcon: "file-code",
6364
+ leftIcon: "file-code-o",
6300
6365
  children: "Export CSV"
6301
6366
  })]
6302
6367
  }), /*#__PURE__*/jsxs("div", {
6303
6368
  className: "analyticsSection dashboardSection_content",
6304
6369
  children: [/*#__PURE__*/jsx(Components.StatBox, {
6305
6370
  title: "".concat(featureTitle, " Requests"),
6306
- icon: "wrench",
6371
+ icon: faWrench,
6307
6372
  value: analyticsData.requests,
6308
6373
  previousValue: analyticsData.prevRequests,
6309
6374
  prevText: prevText,
@@ -6311,7 +6376,7 @@ var AnalyticsHub = _ref => {
6311
6376
  isLoading: analyticsData.isLoading
6312
6377
  }), /*#__PURE__*/jsx(Components.StatBox, {
6313
6378
  title: "Completed ".concat(featureTitle, " Requests"),
6314
- icon: "circle-check",
6379
+ icon: faCircleCheck,
6315
6380
  value: analyticsData.completedRequests,
6316
6381
  previousValue: analyticsData.prevCompletedRequests,
6317
6382
  prevText: prevText,
@@ -6319,7 +6384,7 @@ var AnalyticsHub = _ref => {
6319
6384
  isLoading: analyticsData.isLoading
6320
6385
  }), /*#__PURE__*/jsx(Components.StatBox, {
6321
6386
  title: "".concat(featureTitle, " Comments"),
6322
- icon: "comment",
6387
+ icon: faComment,
6323
6388
  value: analyticsData.comments,
6324
6389
  previousValue: analyticsData.prevComments,
6325
6390
  prevText: prevText,
@@ -6358,15 +6423,19 @@ var MaintenanceReducer = (function () {
6358
6423
  loading: true
6359
6424
  });
6360
6425
  case JOBS_LOADED:
6361
- var result = _.unionWith(action.payload, state.jobs, (v1, v2) => {
6362
- return v1 != null && v2 != null && v1.id === v2.id;
6363
- });
6364
6426
  return _objectSpread$2(_objectSpread$2({}, state), {}, {
6365
- jobs: result.map(job => _objectSpread$2({
6427
+ jobs: action.payload.map(job => _objectSpread$2({
6366
6428
  title: job.title || job.description
6367
6429
  }, job)),
6368
6430
  loading: false
6369
6431
  });
6432
+ case JOBS_ADDED:
6433
+ var added = _.unionWith(action.payload.map(job => _objectSpread$2({
6434
+ title: job.title || job.description
6435
+ }, job)), state.jobs, (v1, v2) => v1 != null && v2 != null && v1.id === v2.id);
6436
+ return _objectSpread$2(_objectSpread$2({}, state), {}, {
6437
+ jobs: added
6438
+ });
6370
6439
  case JOBS_REMOVED:
6371
6440
  var index = _.findIndex(state.jobs, event => {
6372
6441
  return event != null && event.id === action.payload;
@@ -6387,7 +6456,7 @@ var MaintenanceReducer = (function () {
6387
6456
  jobtypes
6388
6457
  });
6389
6458
  case JOBS_STATUSES_LOADED:
6390
- var jobstatuses = _.orderBy(action.payload, "order", "asc");
6459
+ var jobstatuses = _.orderBy(action.payload, 'order', 'asc');
6391
6460
  return _objectSpread$2(_objectSpread$2({}, state), {}, {
6392
6461
  jobstatuses
6393
6462
  });
@@ -6420,7 +6489,7 @@ class ActivityText extends Component {
6420
6489
  className: clickableClasses,
6421
6490
  children: _.truncate(data.Data.title || data.Data.description, {
6422
6491
  length: 30,
6423
- separator: "..."
6492
+ separator: '...'
6424
6493
  })
6425
6494
  })]
6426
6495
  });
@@ -6435,7 +6504,7 @@ class ActivityText extends Component {
6435
6504
  className: clickableClasses,
6436
6505
  children: _.truncate(data.Data.title || data.Data.description, {
6437
6506
  length: 30,
6438
- separator: "..."
6507
+ separator: '...'
6439
6508
  })
6440
6509
  })]
6441
6510
  });
@@ -6450,7 +6519,7 @@ class ActivityText extends Component {
6450
6519
  className: clickableClasses,
6451
6520
  children: _.truncate(data.Data.title || data.Data.description, {
6452
6521
  length: 30,
6453
- separator: "..."
6522
+ separator: '...'
6454
6523
  })
6455
6524
  })]
6456
6525
  });
@@ -6464,7 +6533,7 @@ class ActivityText extends Component {
6464
6533
  className: highlightedClasses,
6465
6534
  children: _.truncate(data.Data.title || data.Data.description, {
6466
6535
  length: 30,
6467
- separator: "..."
6536
+ separator: '...'
6468
6537
  })
6469
6538
  })]
6470
6539
  });
@@ -6516,9 +6585,9 @@ class ViewFull extends Component {
6516
6585
  }
6517
6586
  var styles$2 = {
6518
6587
  image: {
6519
- width: "100%",
6520
- height: "100%",
6521
- objectFit: "contain"
6588
+ width: '100%',
6589
+ height: '100%',
6590
+ objectFit: 'contain'
6522
6591
  }
6523
6592
  };
6524
6593
 
@@ -6557,10 +6626,10 @@ class PreviewWidget extends Component {
6557
6626
  }
6558
6627
  var styles$1 = {
6559
6628
  container: {
6560
- position: "relative"
6629
+ position: 'relative'
6561
6630
  },
6562
6631
  image: {
6563
- width: "100%"
6632
+ width: '100%'
6564
6633
  }
6565
6634
  };
6566
6635
 
@@ -6598,10 +6667,10 @@ class PreviewFull extends Component {
6598
6667
  }
6599
6668
  var styles = {
6600
6669
  container: {
6601
- position: "relative"
6670
+ position: 'relative'
6602
6671
  },
6603
6672
  image: {
6604
- width: "100%"
6673
+ width: '100%'
6605
6674
  }
6606
6675
  };
6607
6676