@plusscommunities/pluss-maintenance-web-a 1.2.2-beta.0 → 1.2.3-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +93 -98
- package/dist/index.esm.js +93 -98
- package/dist/index.umd.js +93 -98
- package/package.json +1 -1
- package/src/components/JobList.js +5 -11
- package/src/screens/AddJob.js +4 -11
- package/src/screens/Job.js +28 -21
- package/src/screens/RequestsHub.js +2 -1
- package/src/values.config.a.js +11 -7
- package/src/values.config.b.js +53 -0
- package/src/values.config.c.js +53 -0
- package/src/values.config.d.js +53 -0
- package/src/values.config.default.js +4 -0
- package/src/values.config.js +11 -7
package/dist/index.esm.js
CHANGED
|
@@ -50,6 +50,9 @@ var values = {
|
|
|
50
50
|
svgPathGridIcon: 'M22.7072 2.33998C20.5868 2.30886 18.2156 3.43862 16.824 4.83022C15.1138 6.54042 15.1486 8.34584 15.7894 10.5065L13.2058 13.0901L7.7566 7.64089C7.75294 7.60976 7.75477 7.5768 7.74927 7.54567L7.48926 6.30605C7.43799 6.06435 7.28968 5.84645 7.08277 5.71279L3.77589 3.56313C3.40601 3.32509 2.91163 3.37636 2.60035 3.68764L1.81116 4.47682C1.50171 4.7881 1.44861 5.28066 1.68848 5.6487L3.80152 8.91713C3.93336 9.12221 4.13843 9.26686 4.3783 9.32179L5.66004 9.61659C5.69483 9.62392 5.72962 9.62209 5.76441 9.62575L11.2155 15.0786L8.03309 18.2647C6.23316 18.0907 4.52112 18.8396 3.417 20.2971C2.0254 22.1373 2.05836 24.7814 3.49756 26.5886C4.41858 27.7459 5.78821 28.4563 7.25123 28.5405C7.34827 28.546 7.44532 28.5479 7.54236 28.5479C8.9065 28.5479 10.2212 28.0059 11.1898 27.0372C12.2866 25.9404 12.8195 24.4445 12.6711 22.9027L14.7311 20.8446C14.8391 21.2035 15.0259 21.5386 15.2987 21.8114L21.5939 28.1102C22.0516 28.5662 22.6522 28.7932 23.2528 28.7932C23.8534 28.7932 24.454 28.5662 24.9099 28.1102L26.2356 26.7827C27.1493 25.869 27.1493 24.3822 26.2356 23.4685L19.9368 17.1697C19.6658 16.8987 19.3307 16.7138 18.9718 16.6039L20.4275 15.1464C22.5881 15.7854 24.3954 15.822 26.1056 14.1118C27.814 12.4035 29.1323 9.21559 28.3834 6.83522C28.3358 6.67958 28.2076 6.55873 28.0483 6.52028C27.889 6.48183 27.7206 6.52944 27.6052 6.64479L24.681 9.56899C24.5638 9.68801 24.3899 9.73561 24.2288 9.68984L23.7161 9.55251C22.5863 9.25038 21.6964 8.36049 21.3943 7.23256L21.257 6.71987C21.213 6.55873 21.2606 6.38478 21.3796 6.2676L24.3093 3.33608C24.4247 3.22072 24.4705 3.05409 24.4338 2.89479C24.3936 2.73549 24.2764 2.60732 24.1189 2.55788C23.6721 2.41506 23.1961 2.34731 22.7072 2.33998ZM22.6669 3.28115C22.7877 3.28298 22.9067 3.28664 23.0239 3.29579L20.7168 5.60292C20.3616 5.95815 20.2242 6.47817 20.3543 6.96157L20.4916 7.47609C20.8798 8.92629 22.0223 10.0689 23.4744 10.4589L23.9871 10.5962C24.4705 10.7262 24.9905 10.5871 25.3439 10.2318L27.6437 7.93202C27.7883 9.80702 26.7318 12.1599 25.4446 13.4472C23.9834 14.9083 22.5021 14.8168 20.4367 14.1686C20.27 14.1173 20.0888 14.1613 19.9661 14.284L11.849 22.401C11.7446 22.5054 11.6952 22.6519 11.7172 22.7984C11.9039 24.1277 11.47 25.4314 10.527 26.3744C9.67737 27.224 8.5055 27.6708 7.30433 27.6049C6.08851 27.5353 4.9972 26.9677 4.22999 26.0045C3.05445 24.5287 3.02698 22.3662 4.16407 20.8648C4.98438 19.7826 6.20936 19.1765 7.52588 19.1765C7.7273 19.1765 7.93238 19.1912 8.13746 19.2186C8.28211 19.2388 8.43043 19.1912 8.53296 19.0868L16.65 10.9716C16.7745 10.8471 16.8203 10.6658 16.7672 10.4973C16.119 8.43373 16.0275 6.95424 17.4887 5.49306C18.7008 4.2809 20.8541 3.27931 22.6669 3.28115ZM3.26319 4.35048L6.57191 6.49831L6.83191 7.73793L5.86695 8.70107L4.58704 8.4081L2.474 5.13967L3.26319 4.35048ZM7.34095 8.55275L12.543 13.7529L11.8801 14.4158L6.67994 9.21559L7.0077 8.88967L7.34095 8.55275ZM18.4811 8.66994C18.3621 8.66994 18.243 8.71572 18.1497 8.80727C17.9666 8.99037 17.9666 9.287 18.1497 9.47011L21.4657 12.7843C21.5573 12.8759 21.6763 12.9216 21.7971 12.9216C21.9161 12.9216 22.037 12.8759 22.1267 12.7843C22.3117 12.6012 22.3117 12.3046 22.1267 12.1215L18.8143 8.80727C18.721 8.71572 18.6019 8.66994 18.4811 8.66994ZM17.1554 12.647C17.0364 12.647 16.9155 12.6928 16.824 12.7843C16.6409 12.9674 16.6409 13.2641 16.824 13.4472L17.4887 14.11C17.5802 14.2016 17.6992 14.2473 17.8201 14.2473C17.9409 14.2473 18.0599 14.2016 18.1515 14.11C18.3346 13.9269 18.3346 13.6303 18.1515 13.4472L17.4887 12.7843C17.3953 12.6928 17.2763 12.647 17.1554 12.647ZM15.4983 14.3041C15.3793 14.3041 15.2603 14.3499 15.1687 14.4433C14.9838 14.6264 14.9838 14.9212 15.1687 15.1043L15.8297 15.7689C15.9213 15.8587 16.0421 15.9063 16.163 15.9063C16.282 15.9063 16.4028 15.8587 16.4944 15.7689C16.6775 15.584 16.6775 15.2892 16.4944 15.1043L15.8297 14.4433C15.7382 14.3499 15.6191 14.3041 15.4983 14.3041ZM13.843 15.9612C13.7222 15.9612 13.6032 16.007 13.5116 16.0985C13.3267 16.2816 13.3267 16.5783 13.5116 16.7632L14.1726 17.4242C14.2642 17.5158 14.385 17.5634 14.504 17.5634C14.6249 17.5634 14.7457 17.5158 14.8373 17.4242C15.0204 17.2429 15.0204 16.9463 14.8373 16.7632L14.1726 16.0985C14.0811 16.007 13.962 15.9612 13.843 15.9612ZM18.4426 17.4444C18.7539 17.4755 19.0487 17.6073 19.2758 17.8344L25.5728 24.1314C26.1221 24.6807 26.1221 25.5706 25.5728 26.1199L24.2452 27.4456C23.6978 27.9949 22.806 27.9949 22.2586 27.4456L15.9597 21.1467C15.6594 20.8465 15.5258 20.4216 15.5734 20.0023L18.1277 17.4462C18.2339 17.4352 18.3383 17.4334 18.4426 17.4444ZM12.1859 17.6201C12.0651 17.6201 11.9461 17.6641 11.8527 17.7556C11.6696 17.9406 11.6696 18.2354 11.8527 18.4203L12.5173 19.0813C12.6071 19.1729 12.7279 19.2186 12.8469 19.2186C12.9678 19.2186 13.0886 19.1729 13.1784 19.0813C13.3633 18.8982 13.3633 18.6034 13.1784 18.4203L12.5173 17.7556C12.424 17.6641 12.3049 17.6201 12.1859 17.6201ZM10.527 19.2772C10.408 19.2772 10.2889 19.323 10.1956 19.4146C10.0125 19.5977 10.0125 19.8925 10.1956 20.0756L10.8584 20.7403C10.95 20.83 11.069 20.8757 11.1898 20.8757C11.3107 20.8757 11.4297 20.83 11.5212 20.7403C11.7044 20.5553 11.7044 20.2605 11.5212 20.0756L10.8584 19.4146C10.7669 19.323 10.646 19.2772 10.527 19.2772ZM19.2758 19.3523C19.1549 19.3523 19.0359 19.3981 18.9425 19.4896C18.7594 19.6746 18.7594 19.9694 18.9425 20.1543L23.5842 24.7942C23.6758 24.8858 23.7948 24.9315 23.9157 24.9315C24.0365 24.9315 24.1555 24.8858 24.2471 24.7942C24.4302 24.6111 24.4302 24.3145 24.2471 24.1314L19.6072 19.4896C19.5138 19.3981 19.3948 19.3523 19.2758 19.3523ZM17.9501 20.678C17.8292 20.678 17.7102 20.7238 17.6168 20.8153C17.4337 21.0003 17.4337 21.2951 17.6168 21.48L22.2586 26.1199C22.3483 26.2114 22.4691 26.2572 22.5881 26.2572C22.709 26.2572 22.8298 26.2114 22.9196 26.1199C23.1045 25.9368 23.1045 25.6402 22.9196 25.457L18.2815 20.8153C18.1881 20.7238 18.0691 20.678 17.9501 20.678ZM8.11182 20.8373C8.07154 20.8373 8.03126 20.8428 7.99097 20.8538L5.89808 21.4141C5.73694 21.458 5.6106 21.5844 5.56666 21.7455L5.00818 23.8366C4.96424 23.9977 5.01002 24.1698 5.1272 24.2888L6.65796 25.8196C6.74769 25.9093 6.86671 25.9569 6.98939 25.9569C7.0315 25.9569 7.07178 25.9514 7.11207 25.9423L9.20313 25.3801C9.36426 25.338 9.49061 25.2117 9.53455 25.0487L10.0949 22.9595C10.1388 22.7965 10.0912 22.6244 9.974 22.5054L8.44324 20.9746C8.35352 20.8867 8.2345 20.8391 8.11182 20.8373ZM7.97083 21.8279L9.1189 22.976L8.69959 24.5452L7.13038 24.9663L5.98231 23.8183L6.40162 22.249L7.97083 21.8279Z',
|
|
51
51
|
svgPathGridIconViewBox: '0 0 30 30',
|
|
52
52
|
menuOrder: 10,
|
|
53
|
+
textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
|
|
54
|
+
textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
|
|
55
|
+
textAreYouSureYouWantToDelete: 'Are you sure you want to delete that request?',
|
|
53
56
|
textAreYouSureYouWantToDeleteNote: 'Are you sure you want to delete that note?',
|
|
54
57
|
textChangedRequestStatus: "changed a maintenance request's status:",
|
|
55
58
|
textAddedRequest: 'added a maintenance request:',
|
|
@@ -57,13 +60,14 @@ var values = {
|
|
|
57
60
|
textRemovedRequest: 'removed a maintenance request:',
|
|
58
61
|
textSingularName: 'Request',
|
|
59
62
|
textYourRequestHere: 'Your Requests will show here',
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
textTitleRequests: 'Requests',
|
|
64
|
+
textMenuTitle: 'Maintenance A',
|
|
65
|
+
textPermissionMaintenanceTracking: 'Maintenance Tracking A',
|
|
66
|
+
textPermissionManageMaintenanceTypes: 'Manage Maintenance Types A',
|
|
67
|
+
textPermissionManageAssignedMaintenance: 'Manage Assigned Maintenance A',
|
|
68
|
+
textHiddenSectionMaintenanceRequests: 'Maintenance requests A',
|
|
69
|
+
keyHiddenSectionMaintenanceRequests: 'maintenanceRequestA',
|
|
70
|
+
textMoreSectionMaintenance: 'Maintenance A',
|
|
67
71
|
featureKeyMoreSectionMaintenance: 'maintenanceA',
|
|
68
72
|
optionKeyMoreSectionMaintenance: 'maintenanceRequestA',
|
|
69
73
|
hiddenKeyMoreSectionMaintenance: 'maintenanceRequestA'
|
|
@@ -665,7 +669,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
665
669
|
while (1) {
|
|
666
670
|
switch (_context3.prev = _context3.next) {
|
|
667
671
|
case 0:
|
|
668
|
-
if (!window.confirm(
|
|
672
|
+
if (!window.confirm(values.textAreYouSureYouWantToDelete)) {
|
|
669
673
|
_context3.next = 12;
|
|
670
674
|
break;
|
|
671
675
|
}
|
|
@@ -1260,18 +1264,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1260
1264
|
}, {
|
|
1261
1265
|
key: "renderEmpty",
|
|
1262
1266
|
value: function renderEmpty() {
|
|
1263
|
-
var
|
|
1264
|
-
|
|
1265
|
-
var featureTitle = function (key) {
|
|
1266
|
-
var strings = _this4.props.strings;
|
|
1267
|
-
|
|
1268
|
-
if (!strings || !strings.sideNav || !strings.sideNav[key]) {
|
|
1269
|
-
return values.textMenuTitle;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
return strings.sideNav[key];
|
|
1273
|
-
}();
|
|
1274
|
-
|
|
1267
|
+
var title = this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests;
|
|
1275
1268
|
return /*#__PURE__*/React.createElement("div", {
|
|
1276
1269
|
style: {
|
|
1277
1270
|
display: 'flex',
|
|
@@ -1293,18 +1286,18 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1293
1286
|
className: "fontRegular fontSize-13"
|
|
1294
1287
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1295
1288
|
className: "fontHeavy text-brandingColour"
|
|
1296
|
-
},
|
|
1289
|
+
}, title, " "), values.textEmptyDescription)), /*#__PURE__*/React.createElement("div", {
|
|
1297
1290
|
className: "marginTop-8 fontRegular fontSize-13",
|
|
1298
1291
|
style: {
|
|
1299
1292
|
maxWidth: 500,
|
|
1300
1293
|
textAlign: 'center'
|
|
1301
1294
|
}
|
|
1302
|
-
},
|
|
1295
|
+
}, values.textEmptyExample));
|
|
1303
1296
|
}
|
|
1304
1297
|
}, {
|
|
1305
1298
|
key: "renderContent",
|
|
1306
1299
|
value: function renderContent() {
|
|
1307
|
-
var
|
|
1300
|
+
var _this4 = this;
|
|
1308
1301
|
|
|
1309
1302
|
if (_.isEmpty(this.props.source)) return this.renderEmpty();
|
|
1310
1303
|
return /*#__PURE__*/React.createElement(Table, {
|
|
@@ -1323,7 +1316,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1323
1316
|
width: 70
|
|
1324
1317
|
},
|
|
1325
1318
|
onClick: function onClick() {
|
|
1326
|
-
|
|
1319
|
+
_this4.sortByCol('jobId');
|
|
1327
1320
|
}
|
|
1328
1321
|
}, "Job No.", this.renderSort('jobId')), /*#__PURE__*/React.createElement("th", {
|
|
1329
1322
|
className: "".concat(this.sortIsActive('title')),
|
|
@@ -1331,7 +1324,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1331
1324
|
cursor: 'pointer'
|
|
1332
1325
|
},
|
|
1333
1326
|
onClick: function onClick() {
|
|
1334
|
-
|
|
1327
|
+
_this4.sortByCol('title');
|
|
1335
1328
|
}
|
|
1336
1329
|
}, "Request title", this.renderSort('title')), /*#__PURE__*/React.createElement("th", {
|
|
1337
1330
|
className: "".concat(this.sortIsActive('type')),
|
|
@@ -1340,7 +1333,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1340
1333
|
width: 100
|
|
1341
1334
|
},
|
|
1342
1335
|
onClick: function onClick() {
|
|
1343
|
-
|
|
1336
|
+
_this4.sortByCol('type');
|
|
1344
1337
|
}
|
|
1345
1338
|
}, "Type", this.renderSort('type')), /*#__PURE__*/React.createElement("th", {
|
|
1346
1339
|
className: "".concat(this.sortIsActive('createdUnix')),
|
|
@@ -1349,7 +1342,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1349
1342
|
width: 80
|
|
1350
1343
|
},
|
|
1351
1344
|
onClick: function onClick() {
|
|
1352
|
-
|
|
1345
|
+
_this4.sortByCol('createdUnix');
|
|
1353
1346
|
}
|
|
1354
1347
|
}, "Date", this.renderSort('createdUnix')), /*#__PURE__*/React.createElement("th", {
|
|
1355
1348
|
className: "".concat(this.sortIsActive('room')),
|
|
@@ -1358,7 +1351,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1358
1351
|
width: 100
|
|
1359
1352
|
},
|
|
1360
1353
|
onClick: function onClick() {
|
|
1361
|
-
|
|
1354
|
+
_this4.sortByCol('room');
|
|
1362
1355
|
}
|
|
1363
1356
|
}, "Location", this.renderSort('room')), /*#__PURE__*/React.createElement("th", {
|
|
1364
1357
|
className: "".concat(this.sortIsActive('assigned')),
|
|
@@ -1367,7 +1360,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1367
1360
|
width: 150
|
|
1368
1361
|
},
|
|
1369
1362
|
onClick: function onClick() {
|
|
1370
|
-
|
|
1363
|
+
_this4.sortByCol('assigned');
|
|
1371
1364
|
}
|
|
1372
1365
|
}, "Assigned To", this.renderSort('assigned')), /*#__PURE__*/React.createElement("th", {
|
|
1373
1366
|
style: {
|
|
@@ -1382,33 +1375,33 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1382
1375
|
}, {
|
|
1383
1376
|
key: "renderFilters",
|
|
1384
1377
|
value: function renderFilters() {
|
|
1385
|
-
var
|
|
1378
|
+
var _this5 = this;
|
|
1386
1379
|
|
|
1387
1380
|
var typeFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1388
1381
|
className: "marginRight-10",
|
|
1389
1382
|
onClick: function onClick() {
|
|
1390
|
-
|
|
1383
|
+
_this5.openFilter('type');
|
|
1391
1384
|
},
|
|
1392
1385
|
text: "Type"
|
|
1393
1386
|
});
|
|
1394
1387
|
var statusFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1395
1388
|
className: "marginRight-10",
|
|
1396
1389
|
onClick: function onClick() {
|
|
1397
|
-
|
|
1390
|
+
_this5.openFilter('status');
|
|
1398
1391
|
},
|
|
1399
1392
|
text: "Status"
|
|
1400
1393
|
});
|
|
1401
1394
|
var timeFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1402
1395
|
className: "marginRight-10",
|
|
1403
1396
|
onClick: function onClick() {
|
|
1404
|
-
|
|
1397
|
+
_this5.openFilter('time');
|
|
1405
1398
|
},
|
|
1406
1399
|
text: "Time"
|
|
1407
1400
|
});
|
|
1408
1401
|
var userFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1409
1402
|
className: "marginRight-10",
|
|
1410
1403
|
onClick: function onClick() {
|
|
1411
|
-
|
|
1404
|
+
_this5.openFilter('user');
|
|
1412
1405
|
},
|
|
1413
1406
|
text: "Assigned To"
|
|
1414
1407
|
});
|
|
@@ -1417,13 +1410,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1417
1410
|
typeFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1418
1411
|
className: "marginRight-10",
|
|
1419
1412
|
onClick: function onClick() {
|
|
1420
|
-
|
|
1413
|
+
_this5.openFilter('type');
|
|
1421
1414
|
},
|
|
1422
1415
|
rightIcon: "close",
|
|
1423
1416
|
rightClick: function rightClick(e) {
|
|
1424
1417
|
e.stopPropagation();
|
|
1425
1418
|
|
|
1426
|
-
|
|
1419
|
+
_this5.selectTypeFilter();
|
|
1427
1420
|
},
|
|
1428
1421
|
text: this.state.selectedTypeFilter
|
|
1429
1422
|
});
|
|
@@ -1433,13 +1426,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1433
1426
|
statusFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1434
1427
|
className: "marginRight-10",
|
|
1435
1428
|
onClick: function onClick() {
|
|
1436
|
-
|
|
1429
|
+
_this5.openFilter('status');
|
|
1437
1430
|
},
|
|
1438
1431
|
rightIcon: "close",
|
|
1439
1432
|
rightClick: function rightClick(e) {
|
|
1440
1433
|
e.stopPropagation();
|
|
1441
1434
|
|
|
1442
|
-
|
|
1435
|
+
_this5.selectStatusFilter();
|
|
1443
1436
|
},
|
|
1444
1437
|
text: this.state.selectedStatusFilter === 'incomplete' ? 'All Incomplete' : StatusTypes[this.state.selectedStatusFilter].text
|
|
1445
1438
|
});
|
|
@@ -1449,13 +1442,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1449
1442
|
timeFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1450
1443
|
className: "marginRight-10",
|
|
1451
1444
|
onClick: function onClick() {
|
|
1452
|
-
|
|
1445
|
+
_this5.openFilter('time');
|
|
1453
1446
|
},
|
|
1454
1447
|
rightIcon: "close",
|
|
1455
1448
|
rightClick: function rightClick(e) {
|
|
1456
1449
|
e.stopPropagation();
|
|
1457
1450
|
|
|
1458
|
-
|
|
1451
|
+
_this5.removeTimeFilter();
|
|
1459
1452
|
},
|
|
1460
1453
|
text: this.state.selectedTimeFilterText
|
|
1461
1454
|
});
|
|
@@ -1465,13 +1458,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1465
1458
|
userFilter = /*#__PURE__*/React.createElement(Components$5.Tag, {
|
|
1466
1459
|
className: "marginRight-10",
|
|
1467
1460
|
onClick: function onClick() {
|
|
1468
|
-
|
|
1461
|
+
_this5.openFilter('user');
|
|
1469
1462
|
},
|
|
1470
1463
|
rightIcon: "close",
|
|
1471
1464
|
rightClick: function rightClick(e) {
|
|
1472
1465
|
e.stopPropagation();
|
|
1473
1466
|
|
|
1474
|
-
|
|
1467
|
+
_this5.removeUserFilter();
|
|
1475
1468
|
},
|
|
1476
1469
|
text: this.state.selectedUserFilterText
|
|
1477
1470
|
});
|
|
@@ -1496,7 +1489,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1496
1489
|
placeholder: "Search by Job ID, Location or Title",
|
|
1497
1490
|
value: this.state.search,
|
|
1498
1491
|
onChange: function onChange(e) {
|
|
1499
|
-
return
|
|
1492
|
+
return _this5.onHandleSearchChange(e);
|
|
1500
1493
|
},
|
|
1501
1494
|
className: "genericInputContainer-rounded marginTop-10",
|
|
1502
1495
|
style: {
|
|
@@ -2322,7 +2315,7 @@ var RequestsHub = /*#__PURE__*/function (_Component) {
|
|
|
2322
2315
|
|
|
2323
2316
|
return /*#__PURE__*/React.createElement(Components$3.HubSidebar, {
|
|
2324
2317
|
sections: [{
|
|
2325
|
-
title:
|
|
2318
|
+
title: this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests,
|
|
2326
2319
|
items: sectionItems
|
|
2327
2320
|
}],
|
|
2328
2321
|
helpGuide: {
|
|
@@ -2386,7 +2379,8 @@ var mapStateToProps$3 = function mapStateToProps(state) {
|
|
|
2386
2379
|
var auth = state.auth;
|
|
2387
2380
|
return {
|
|
2388
2381
|
jobs: state[values.reducerKey].jobs,
|
|
2389
|
-
auth: auth
|
|
2382
|
+
auth: auth,
|
|
2383
|
+
strings: state.strings && state.strings.config || {}
|
|
2390
2384
|
};
|
|
2391
2385
|
};
|
|
2392
2386
|
|
|
@@ -3148,6 +3142,32 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3148
3142
|
}
|
|
3149
3143
|
}))));
|
|
3150
3144
|
}
|
|
3145
|
+
}, {
|
|
3146
|
+
key: "renderImages",
|
|
3147
|
+
value: function renderImages() {
|
|
3148
|
+
if (_.isEmpty(this.state.job.image) && _.isEmpty(this.state.job.images)) return null;
|
|
3149
|
+
var imagesToUse = _.isEmpty(this.state.job.image) ? this.state.job.images : [this.state.job.image];
|
|
3150
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3151
|
+
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
3152
|
+
}, /*#__PURE__*/React.createElement(Components$2.Text, {
|
|
3153
|
+
type: "formTitleSmall",
|
|
3154
|
+
className: "marginBottom-16"
|
|
3155
|
+
}, "Images"), /*#__PURE__*/React.createElement("div", {
|
|
3156
|
+
className: "imageGrid"
|
|
3157
|
+
}, imagesToUse.map(function (image, i) {
|
|
3158
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
3159
|
+
href: image,
|
|
3160
|
+
target: "_blank",
|
|
3161
|
+
rel: "noopener noreferrer",
|
|
3162
|
+
key: i
|
|
3163
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3164
|
+
className: "imageGrid_image",
|
|
3165
|
+
style: {
|
|
3166
|
+
backgroundImage: "url('".concat(Helper$1.get1400(image), "')")
|
|
3167
|
+
}
|
|
3168
|
+
}));
|
|
3169
|
+
})));
|
|
3170
|
+
}
|
|
3151
3171
|
}, {
|
|
3152
3172
|
key: "renderInner",
|
|
3153
3173
|
value: function renderInner() {
|
|
@@ -3160,8 +3180,11 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3160
3180
|
className: "padding-60 paddingVertical-40 bottomDivideBorder relative"
|
|
3161
3181
|
}, /*#__PURE__*/React.createElement(Components$2.Text, {
|
|
3162
3182
|
type: "formTitleLarge",
|
|
3183
|
+
className: "marginBottom-8"
|
|
3184
|
+
}, this.state.job.title || 'Request'), /*#__PURE__*/React.createElement(Components$2.Text, {
|
|
3185
|
+
type: "formTitleMedium",
|
|
3163
3186
|
className: "marginBottom-24"
|
|
3164
|
-
}, this.state.job.
|
|
3187
|
+
}, "Job #", this.state.job.jobId), /*#__PURE__*/React.createElement("div", {
|
|
3165
3188
|
className: "marginTop-16"
|
|
3166
3189
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3167
3190
|
className: 'fieldLabel'
|
|
@@ -3214,23 +3237,7 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3214
3237
|
className: 'fieldLabel'
|
|
3215
3238
|
}, "When"), /*#__PURE__*/React.createElement("div", {
|
|
3216
3239
|
className: 'fontRegular fontSize-16 text-dark marginTop-5'
|
|
3217
|
-
}, this.state.job.homeText))),
|
|
3218
|
-
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
3219
|
-
}, /*#__PURE__*/React.createElement(Components$2.Text, {
|
|
3220
|
-
type: "formTitleSmall",
|
|
3221
|
-
className: "marginBottom-16"
|
|
3222
|
-
}, "Image"), /*#__PURE__*/React.createElement("div", {
|
|
3223
|
-
style: {
|
|
3224
|
-
marginTop: 16,
|
|
3225
|
-
height: 180,
|
|
3226
|
-
width: 260,
|
|
3227
|
-
borderRadius: 4,
|
|
3228
|
-
border: '1px solid #aaa',
|
|
3229
|
-
backgroundColor: '#ddd',
|
|
3230
|
-
backgroundImage: "url(".concat(this.state.job.thumbnail, ")"),
|
|
3231
|
-
backgroundPosition: 'center'
|
|
3232
|
-
}
|
|
3233
|
-
})), this.renderCommentSection());
|
|
3240
|
+
}, this.state.job.homeText))), this.renderImages(), this.renderCommentSection());
|
|
3234
3241
|
}
|
|
3235
3242
|
}, {
|
|
3236
3243
|
key: "renderHistoryEntry",
|
|
@@ -3403,7 +3410,7 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3403
3410
|
marginRight: 16
|
|
3404
3411
|
}
|
|
3405
3412
|
}, "Back"), Session$2.validateAccess(this.props.auth.site, values.permissionMaintenanceTracking, this.props.auth) && !_.isEmpty(this.state.job) && /*#__PURE__*/React.createElement(Link, {
|
|
3406
|
-
to: "/
|
|
3413
|
+
to: "".concat(values.routeAddRequest, "/").concat(this.state.jobId)
|
|
3407
3414
|
}, /*#__PURE__*/React.createElement(Components$2.Button, {
|
|
3408
3415
|
inline: true,
|
|
3409
3416
|
style: {
|
|
@@ -3941,28 +3948,16 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
3941
3948
|
}, {
|
|
3942
3949
|
key: "renderSuccess",
|
|
3943
3950
|
value: function renderSuccess() {
|
|
3944
|
-
var _this3 = this;
|
|
3945
|
-
|
|
3946
3951
|
if (!this.state.success) return null;
|
|
3947
|
-
|
|
3948
|
-
var featureTitle = function (key) {
|
|
3949
|
-
var strings = _this3.props.strings;
|
|
3950
|
-
|
|
3951
|
-
if (!strings || !strings.sideNav || !strings.sideNav[key]) {
|
|
3952
|
-
return values.textMenuTitle;
|
|
3953
|
-
}
|
|
3954
|
-
|
|
3955
|
-
return strings.sideNav[key];
|
|
3956
|
-
}();
|
|
3957
|
-
|
|
3952
|
+
var title = this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests;
|
|
3958
3953
|
return /*#__PURE__*/React.createElement(Components$1.SuccessPopup, {
|
|
3959
|
-
text: "
|
|
3954
|
+
text: "Request has been ".concat(this.state.id != null ? 'edited' : 'added'),
|
|
3960
3955
|
buttons: [{
|
|
3961
3956
|
type: 'outlined',
|
|
3962
3957
|
onClick: function onClick() {
|
|
3963
3958
|
window.history.back();
|
|
3964
3959
|
},
|
|
3965
|
-
text: "Back to ".concat(
|
|
3960
|
+
text: "Back to ".concat(title)
|
|
3966
3961
|
}]
|
|
3967
3962
|
});
|
|
3968
3963
|
}
|
|
@@ -3979,7 +3974,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
3979
3974
|
}, {
|
|
3980
3975
|
key: "renderSubmit",
|
|
3981
3976
|
value: function renderSubmit() {
|
|
3982
|
-
var
|
|
3977
|
+
var _this3 = this;
|
|
3983
3978
|
|
|
3984
3979
|
if (this.state.updating) {
|
|
3985
3980
|
return /*#__PURE__*/React.createElement(Components$1.Button, {
|
|
@@ -3991,7 +3986,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
3991
3986
|
inline: true,
|
|
3992
3987
|
buttonType: "tertiary",
|
|
3993
3988
|
onClick: function onClick() {
|
|
3994
|
-
return
|
|
3989
|
+
return _this3.props.history.push(values.routeRequestsHub);
|
|
3995
3990
|
},
|
|
3996
3991
|
isActive: true,
|
|
3997
3992
|
style: {
|
|
@@ -4050,7 +4045,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4050
4045
|
}, {
|
|
4051
4046
|
key: "renderMain",
|
|
4052
4047
|
value: function renderMain() {
|
|
4053
|
-
var
|
|
4048
|
+
var _this4 = this;
|
|
4054
4049
|
|
|
4055
4050
|
return /*#__PURE__*/React.createElement("div", {
|
|
4056
4051
|
style: {
|
|
@@ -4068,15 +4063,15 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4068
4063
|
placeholder: "Insert address here",
|
|
4069
4064
|
value: this.state.room,
|
|
4070
4065
|
onChange: function onChange(e) {
|
|
4071
|
-
return
|
|
4066
|
+
return _this4.onHandleChange(e);
|
|
4072
4067
|
},
|
|
4073
4068
|
isRequired: true,
|
|
4074
4069
|
alwaysShowLabel: true,
|
|
4075
4070
|
isValid: function isValid() {
|
|
4076
|
-
return !_.isEmpty(
|
|
4071
|
+
return !_.isEmpty(_this4.state.room);
|
|
4077
4072
|
},
|
|
4078
4073
|
showError: function showError() {
|
|
4079
|
-
return
|
|
4074
|
+
return _this4.state.showWarnings && _.isEmpty(_this4.state.room);
|
|
4080
4075
|
}
|
|
4081
4076
|
}), /*#__PURE__*/React.createElement(Components$1.GenericInput, {
|
|
4082
4077
|
id: "phone",
|
|
@@ -4086,7 +4081,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4086
4081
|
value: this.state.phone // showError={this.state.showWarnings && !this.validateImage()}
|
|
4087
4082
|
,
|
|
4088
4083
|
onChange: function onChange(e) {
|
|
4089
|
-
return
|
|
4084
|
+
return _this4.onHandleChange(e);
|
|
4090
4085
|
},
|
|
4091
4086
|
alwaysShowLabel: true
|
|
4092
4087
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -4110,17 +4105,17 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4110
4105
|
placeholder: "Title for the work required",
|
|
4111
4106
|
value: this.state.title,
|
|
4112
4107
|
onChange: function onChange(e) {
|
|
4113
|
-
return
|
|
4108
|
+
return _this4.onHandleChange(e);
|
|
4114
4109
|
},
|
|
4115
4110
|
inputStyle: {
|
|
4116
4111
|
height: 80
|
|
4117
4112
|
},
|
|
4118
4113
|
isRequired: true,
|
|
4119
4114
|
isValid: function isValid() {
|
|
4120
|
-
return !_.isEmpty(
|
|
4115
|
+
return !_.isEmpty(_this4.state.title);
|
|
4121
4116
|
},
|
|
4122
4117
|
showError: function showError() {
|
|
4123
|
-
return
|
|
4118
|
+
return _this4.state.showWarnings && _.isEmpty(_this4.state.title);
|
|
4124
4119
|
},
|
|
4125
4120
|
alwaysShowLabel: true
|
|
4126
4121
|
}), /*#__PURE__*/React.createElement(Components$1.GenericInput, {
|
|
@@ -4130,7 +4125,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4130
4125
|
placeholder: "Description of work required",
|
|
4131
4126
|
value: this.state.description,
|
|
4132
4127
|
onChange: function onChange(e) {
|
|
4133
|
-
return
|
|
4128
|
+
return _this4.onHandleChange(e);
|
|
4134
4129
|
},
|
|
4135
4130
|
inputStyle: {
|
|
4136
4131
|
height: 80
|
|
@@ -4143,7 +4138,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4143
4138
|
Label: 'No',
|
|
4144
4139
|
Value: false,
|
|
4145
4140
|
onChange: function onChange() {
|
|
4146
|
-
return
|
|
4141
|
+
return _this4.setState({
|
|
4147
4142
|
isHome: false
|
|
4148
4143
|
});
|
|
4149
4144
|
}
|
|
@@ -4151,7 +4146,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4151
4146
|
Label: 'Yes',
|
|
4152
4147
|
Value: true,
|
|
4153
4148
|
onChange: function onChange() {
|
|
4154
|
-
return
|
|
4149
|
+
return _this4.setState({
|
|
4155
4150
|
isHome: true
|
|
4156
4151
|
});
|
|
4157
4152
|
}
|
|
@@ -4166,17 +4161,17 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4166
4161
|
placeholder: "Description of person's available times",
|
|
4167
4162
|
value: this.state.homeText,
|
|
4168
4163
|
onChange: function onChange(e) {
|
|
4169
|
-
return
|
|
4164
|
+
return _this4.onHandleChange(e);
|
|
4170
4165
|
},
|
|
4171
4166
|
inputStyle: {
|
|
4172
4167
|
height: 80
|
|
4173
4168
|
},
|
|
4174
4169
|
isRequired: true,
|
|
4175
4170
|
isValid: function isValid() {
|
|
4176
|
-
return !_.isEmpty(
|
|
4171
|
+
return !_.isEmpty(_this4.state.homeText);
|
|
4177
4172
|
},
|
|
4178
4173
|
showError: function showError() {
|
|
4179
|
-
return
|
|
4174
|
+
return _this4.state.showWarnings && _.isEmpty(_this4.state.homeText);
|
|
4180
4175
|
},
|
|
4181
4176
|
alwaysShowLabel: true
|
|
4182
4177
|
})));
|
|
@@ -4184,7 +4179,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4184
4179
|
}, {
|
|
4185
4180
|
key: "renderUserFilterPopup",
|
|
4186
4181
|
value: function renderUserFilterPopup() {
|
|
4187
|
-
var
|
|
4182
|
+
var _this5 = this;
|
|
4188
4183
|
|
|
4189
4184
|
var _this$state2 = this.state,
|
|
4190
4185
|
userFilterOpen = _this$state2.userFilterOpen,
|
|
@@ -4212,7 +4207,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4212
4207
|
placeholder: "Search name",
|
|
4213
4208
|
value: userSearch,
|
|
4214
4209
|
onChange: function onChange(e) {
|
|
4215
|
-
return
|
|
4210
|
+
return _this5.onHandleChange(e);
|
|
4216
4211
|
},
|
|
4217
4212
|
alwaysShowLabel: true
|
|
4218
4213
|
}), _.sortBy(users, function (u) {
|
|
@@ -4225,7 +4220,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4225
4220
|
key: user.userId,
|
|
4226
4221
|
user: user,
|
|
4227
4222
|
onClick: function onClick() {
|
|
4228
|
-
return
|
|
4223
|
+
return _this5.onSelectUser(user);
|
|
4229
4224
|
}
|
|
4230
4225
|
});
|
|
4231
4226
|
}));
|