@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.cjs.js
CHANGED
|
@@ -93,6 +93,9 @@ var values = {
|
|
|
93
93
|
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',
|
|
94
94
|
svgPathGridIconViewBox: '0 0 30 30',
|
|
95
95
|
menuOrder: 10,
|
|
96
|
+
textEmptyDescription: 'allows your users to submit Requests (such as maintenance requests) that all appear in this job board.',
|
|
97
|
+
textEmptyExample: 'Example might be; Fix my light bulb, hand rail is broken, or please send flowers to Mum.',
|
|
98
|
+
textAreYouSureYouWantToDelete: 'Are you sure you want to delete that request?',
|
|
96
99
|
textAreYouSureYouWantToDeleteNote: 'Are you sure you want to delete that note?',
|
|
97
100
|
textChangedRequestStatus: "changed a maintenance request's status:",
|
|
98
101
|
textAddedRequest: 'added a maintenance request:',
|
|
@@ -100,13 +103,14 @@ var values = {
|
|
|
100
103
|
textRemovedRequest: 'removed a maintenance request:',
|
|
101
104
|
textSingularName: 'Request',
|
|
102
105
|
textYourRequestHere: 'Your Requests will show here',
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
textTitleRequests: 'Requests',
|
|
107
|
+
textMenuTitle: 'Maintenance A',
|
|
108
|
+
textPermissionMaintenanceTracking: 'Maintenance Tracking A',
|
|
109
|
+
textPermissionManageMaintenanceTypes: 'Manage Maintenance Types A',
|
|
110
|
+
textPermissionManageAssignedMaintenance: 'Manage Assigned Maintenance A',
|
|
111
|
+
textHiddenSectionMaintenanceRequests: 'Maintenance requests A',
|
|
112
|
+
keyHiddenSectionMaintenanceRequests: 'maintenanceRequestA',
|
|
113
|
+
textMoreSectionMaintenance: 'Maintenance A',
|
|
110
114
|
featureKeyMoreSectionMaintenance: 'maintenanceA',
|
|
111
115
|
optionKeyMoreSectionMaintenance: 'maintenanceRequestA',
|
|
112
116
|
hiddenKeyMoreSectionMaintenance: 'maintenanceRequestA'
|
|
@@ -708,7 +712,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
708
712
|
while (1) {
|
|
709
713
|
switch (_context3.prev = _context3.next) {
|
|
710
714
|
case 0:
|
|
711
|
-
if (!window.confirm(
|
|
715
|
+
if (!window.confirm(values.textAreYouSureYouWantToDelete)) {
|
|
712
716
|
_context3.next = 12;
|
|
713
717
|
break;
|
|
714
718
|
}
|
|
@@ -1303,18 +1307,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1303
1307
|
}, {
|
|
1304
1308
|
key: "renderEmpty",
|
|
1305
1309
|
value: function renderEmpty() {
|
|
1306
|
-
var
|
|
1307
|
-
|
|
1308
|
-
var featureTitle = function (key) {
|
|
1309
|
-
var strings = _this4.props.strings;
|
|
1310
|
-
|
|
1311
|
-
if (!strings || !strings.sideNav || !strings.sideNav[key]) {
|
|
1312
|
-
return values.textMenuTitle;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
return strings.sideNav[key];
|
|
1316
|
-
}();
|
|
1317
|
-
|
|
1310
|
+
var title = this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests;
|
|
1318
1311
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1319
1312
|
style: {
|
|
1320
1313
|
display: 'flex',
|
|
@@ -1336,18 +1329,18 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1336
1329
|
className: "fontRegular fontSize-13"
|
|
1337
1330
|
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
1338
1331
|
className: "fontHeavy text-brandingColour"
|
|
1339
|
-
},
|
|
1332
|
+
}, title, " "), values.textEmptyDescription)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1340
1333
|
className: "marginTop-8 fontRegular fontSize-13",
|
|
1341
1334
|
style: {
|
|
1342
1335
|
maxWidth: 500,
|
|
1343
1336
|
textAlign: 'center'
|
|
1344
1337
|
}
|
|
1345
|
-
},
|
|
1338
|
+
}, values.textEmptyExample));
|
|
1346
1339
|
}
|
|
1347
1340
|
}, {
|
|
1348
1341
|
key: "renderContent",
|
|
1349
1342
|
value: function renderContent() {
|
|
1350
|
-
var
|
|
1343
|
+
var _this4 = this;
|
|
1351
1344
|
|
|
1352
1345
|
if (___default['default'].isEmpty(this.props.source)) return this.renderEmpty();
|
|
1353
1346
|
return /*#__PURE__*/React__default['default'].createElement(reactBootstrap.Table, {
|
|
@@ -1366,7 +1359,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1366
1359
|
width: 70
|
|
1367
1360
|
},
|
|
1368
1361
|
onClick: function onClick() {
|
|
1369
|
-
|
|
1362
|
+
_this4.sortByCol('jobId');
|
|
1370
1363
|
}
|
|
1371
1364
|
}, "Job No.", this.renderSort('jobId')), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
1372
1365
|
className: "".concat(this.sortIsActive('title')),
|
|
@@ -1374,7 +1367,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1374
1367
|
cursor: 'pointer'
|
|
1375
1368
|
},
|
|
1376
1369
|
onClick: function onClick() {
|
|
1377
|
-
|
|
1370
|
+
_this4.sortByCol('title');
|
|
1378
1371
|
}
|
|
1379
1372
|
}, "Request title", this.renderSort('title')), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
1380
1373
|
className: "".concat(this.sortIsActive('type')),
|
|
@@ -1383,7 +1376,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1383
1376
|
width: 100
|
|
1384
1377
|
},
|
|
1385
1378
|
onClick: function onClick() {
|
|
1386
|
-
|
|
1379
|
+
_this4.sortByCol('type');
|
|
1387
1380
|
}
|
|
1388
1381
|
}, "Type", this.renderSort('type')), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
1389
1382
|
className: "".concat(this.sortIsActive('createdUnix')),
|
|
@@ -1392,7 +1385,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1392
1385
|
width: 80
|
|
1393
1386
|
},
|
|
1394
1387
|
onClick: function onClick() {
|
|
1395
|
-
|
|
1388
|
+
_this4.sortByCol('createdUnix');
|
|
1396
1389
|
}
|
|
1397
1390
|
}, "Date", this.renderSort('createdUnix')), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
1398
1391
|
className: "".concat(this.sortIsActive('room')),
|
|
@@ -1401,7 +1394,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1401
1394
|
width: 100
|
|
1402
1395
|
},
|
|
1403
1396
|
onClick: function onClick() {
|
|
1404
|
-
|
|
1397
|
+
_this4.sortByCol('room');
|
|
1405
1398
|
}
|
|
1406
1399
|
}, "Location", this.renderSort('room')), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
1407
1400
|
className: "".concat(this.sortIsActive('assigned')),
|
|
@@ -1410,7 +1403,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1410
1403
|
width: 150
|
|
1411
1404
|
},
|
|
1412
1405
|
onClick: function onClick() {
|
|
1413
|
-
|
|
1406
|
+
_this4.sortByCol('assigned');
|
|
1414
1407
|
}
|
|
1415
1408
|
}, "Assigned To", this.renderSort('assigned')), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
1416
1409
|
style: {
|
|
@@ -1425,33 +1418,33 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1425
1418
|
}, {
|
|
1426
1419
|
key: "renderFilters",
|
|
1427
1420
|
value: function renderFilters() {
|
|
1428
|
-
var
|
|
1421
|
+
var _this5 = this;
|
|
1429
1422
|
|
|
1430
1423
|
var typeFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1431
1424
|
className: "marginRight-10",
|
|
1432
1425
|
onClick: function onClick() {
|
|
1433
|
-
|
|
1426
|
+
_this5.openFilter('type');
|
|
1434
1427
|
},
|
|
1435
1428
|
text: "Type"
|
|
1436
1429
|
});
|
|
1437
1430
|
var statusFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1438
1431
|
className: "marginRight-10",
|
|
1439
1432
|
onClick: function onClick() {
|
|
1440
|
-
|
|
1433
|
+
_this5.openFilter('status');
|
|
1441
1434
|
},
|
|
1442
1435
|
text: "Status"
|
|
1443
1436
|
});
|
|
1444
1437
|
var timeFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1445
1438
|
className: "marginRight-10",
|
|
1446
1439
|
onClick: function onClick() {
|
|
1447
|
-
|
|
1440
|
+
_this5.openFilter('time');
|
|
1448
1441
|
},
|
|
1449
1442
|
text: "Time"
|
|
1450
1443
|
});
|
|
1451
1444
|
var userFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1452
1445
|
className: "marginRight-10",
|
|
1453
1446
|
onClick: function onClick() {
|
|
1454
|
-
|
|
1447
|
+
_this5.openFilter('user');
|
|
1455
1448
|
},
|
|
1456
1449
|
text: "Assigned To"
|
|
1457
1450
|
});
|
|
@@ -1460,13 +1453,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1460
1453
|
typeFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1461
1454
|
className: "marginRight-10",
|
|
1462
1455
|
onClick: function onClick() {
|
|
1463
|
-
|
|
1456
|
+
_this5.openFilter('type');
|
|
1464
1457
|
},
|
|
1465
1458
|
rightIcon: "close",
|
|
1466
1459
|
rightClick: function rightClick(e) {
|
|
1467
1460
|
e.stopPropagation();
|
|
1468
1461
|
|
|
1469
|
-
|
|
1462
|
+
_this5.selectTypeFilter();
|
|
1470
1463
|
},
|
|
1471
1464
|
text: this.state.selectedTypeFilter
|
|
1472
1465
|
});
|
|
@@ -1476,13 +1469,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1476
1469
|
statusFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1477
1470
|
className: "marginRight-10",
|
|
1478
1471
|
onClick: function onClick() {
|
|
1479
|
-
|
|
1472
|
+
_this5.openFilter('status');
|
|
1480
1473
|
},
|
|
1481
1474
|
rightIcon: "close",
|
|
1482
1475
|
rightClick: function rightClick(e) {
|
|
1483
1476
|
e.stopPropagation();
|
|
1484
1477
|
|
|
1485
|
-
|
|
1478
|
+
_this5.selectStatusFilter();
|
|
1486
1479
|
},
|
|
1487
1480
|
text: this.state.selectedStatusFilter === 'incomplete' ? 'All Incomplete' : StatusTypes[this.state.selectedStatusFilter].text
|
|
1488
1481
|
});
|
|
@@ -1492,13 +1485,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1492
1485
|
timeFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1493
1486
|
className: "marginRight-10",
|
|
1494
1487
|
onClick: function onClick() {
|
|
1495
|
-
|
|
1488
|
+
_this5.openFilter('time');
|
|
1496
1489
|
},
|
|
1497
1490
|
rightIcon: "close",
|
|
1498
1491
|
rightClick: function rightClick(e) {
|
|
1499
1492
|
e.stopPropagation();
|
|
1500
1493
|
|
|
1501
|
-
|
|
1494
|
+
_this5.removeTimeFilter();
|
|
1502
1495
|
},
|
|
1503
1496
|
text: this.state.selectedTimeFilterText
|
|
1504
1497
|
});
|
|
@@ -1508,13 +1501,13 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1508
1501
|
userFilter = /*#__PURE__*/React__default['default'].createElement(Components$5.Tag, {
|
|
1509
1502
|
className: "marginRight-10",
|
|
1510
1503
|
onClick: function onClick() {
|
|
1511
|
-
|
|
1504
|
+
_this5.openFilter('user');
|
|
1512
1505
|
},
|
|
1513
1506
|
rightIcon: "close",
|
|
1514
1507
|
rightClick: function rightClick(e) {
|
|
1515
1508
|
e.stopPropagation();
|
|
1516
1509
|
|
|
1517
|
-
|
|
1510
|
+
_this5.removeUserFilter();
|
|
1518
1511
|
},
|
|
1519
1512
|
text: this.state.selectedUserFilterText
|
|
1520
1513
|
});
|
|
@@ -1539,7 +1532,7 @@ var JobList = /*#__PURE__*/function (_Component) {
|
|
|
1539
1532
|
placeholder: "Search by Job ID, Location or Title",
|
|
1540
1533
|
value: this.state.search,
|
|
1541
1534
|
onChange: function onChange(e) {
|
|
1542
|
-
return
|
|
1535
|
+
return _this5.onHandleSearchChange(e);
|
|
1543
1536
|
},
|
|
1544
1537
|
className: "genericInputContainer-rounded marginTop-10",
|
|
1545
1538
|
style: {
|
|
@@ -2365,7 +2358,7 @@ var RequestsHub = /*#__PURE__*/function (_Component) {
|
|
|
2365
2358
|
|
|
2366
2359
|
return /*#__PURE__*/React__default['default'].createElement(Components$3.HubSidebar, {
|
|
2367
2360
|
sections: [{
|
|
2368
|
-
title:
|
|
2361
|
+
title: this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests,
|
|
2369
2362
|
items: sectionItems
|
|
2370
2363
|
}],
|
|
2371
2364
|
helpGuide: {
|
|
@@ -2429,7 +2422,8 @@ var mapStateToProps$3 = function mapStateToProps(state) {
|
|
|
2429
2422
|
var auth = state.auth;
|
|
2430
2423
|
return {
|
|
2431
2424
|
jobs: state[values.reducerKey].jobs,
|
|
2432
|
-
auth: auth
|
|
2425
|
+
auth: auth,
|
|
2426
|
+
strings: state.strings && state.strings.config || {}
|
|
2433
2427
|
};
|
|
2434
2428
|
};
|
|
2435
2429
|
|
|
@@ -3191,6 +3185,32 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3191
3185
|
}
|
|
3192
3186
|
}))));
|
|
3193
3187
|
}
|
|
3188
|
+
}, {
|
|
3189
|
+
key: "renderImages",
|
|
3190
|
+
value: function renderImages() {
|
|
3191
|
+
if (___default['default'].isEmpty(this.state.job.image) && ___default['default'].isEmpty(this.state.job.images)) return null;
|
|
3192
|
+
var imagesToUse = ___default['default'].isEmpty(this.state.job.image) ? this.state.job.images : [this.state.job.image];
|
|
3193
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3194
|
+
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
3195
|
+
}, /*#__PURE__*/React__default['default'].createElement(Components$2.Text, {
|
|
3196
|
+
type: "formTitleSmall",
|
|
3197
|
+
className: "marginBottom-16"
|
|
3198
|
+
}, "Images"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3199
|
+
className: "imageGrid"
|
|
3200
|
+
}, imagesToUse.map(function (image, i) {
|
|
3201
|
+
return /*#__PURE__*/React__default['default'].createElement("a", {
|
|
3202
|
+
href: image,
|
|
3203
|
+
target: "_blank",
|
|
3204
|
+
rel: "noopener noreferrer",
|
|
3205
|
+
key: i
|
|
3206
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3207
|
+
className: "imageGrid_image",
|
|
3208
|
+
style: {
|
|
3209
|
+
backgroundImage: "url('".concat(Helper$1.get1400(image), "')")
|
|
3210
|
+
}
|
|
3211
|
+
}));
|
|
3212
|
+
})));
|
|
3213
|
+
}
|
|
3194
3214
|
}, {
|
|
3195
3215
|
key: "renderInner",
|
|
3196
3216
|
value: function renderInner() {
|
|
@@ -3203,8 +3223,11 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3203
3223
|
className: "padding-60 paddingVertical-40 bottomDivideBorder relative"
|
|
3204
3224
|
}, /*#__PURE__*/React__default['default'].createElement(Components$2.Text, {
|
|
3205
3225
|
type: "formTitleLarge",
|
|
3226
|
+
className: "marginBottom-8"
|
|
3227
|
+
}, this.state.job.title || 'Request'), /*#__PURE__*/React__default['default'].createElement(Components$2.Text, {
|
|
3228
|
+
type: "formTitleMedium",
|
|
3206
3229
|
className: "marginBottom-24"
|
|
3207
|
-
}, this.state.job.
|
|
3230
|
+
}, "Job #", this.state.job.jobId), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3208
3231
|
className: "marginTop-16"
|
|
3209
3232
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3210
3233
|
className: 'fieldLabel'
|
|
@@ -3257,23 +3280,7 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3257
3280
|
className: 'fieldLabel'
|
|
3258
3281
|
}, "When"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3259
3282
|
className: 'fontRegular fontSize-16 text-dark marginTop-5'
|
|
3260
|
-
}, this.state.job.homeText))),
|
|
3261
|
-
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
3262
|
-
}, /*#__PURE__*/React__default['default'].createElement(Components$2.Text, {
|
|
3263
|
-
type: "formTitleSmall",
|
|
3264
|
-
className: "marginBottom-16"
|
|
3265
|
-
}, "Image"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3266
|
-
style: {
|
|
3267
|
-
marginTop: 16,
|
|
3268
|
-
height: 180,
|
|
3269
|
-
width: 260,
|
|
3270
|
-
borderRadius: 4,
|
|
3271
|
-
border: '1px solid #aaa',
|
|
3272
|
-
backgroundColor: '#ddd',
|
|
3273
|
-
backgroundImage: "url(".concat(this.state.job.thumbnail, ")"),
|
|
3274
|
-
backgroundPosition: 'center'
|
|
3275
|
-
}
|
|
3276
|
-
})), this.renderCommentSection());
|
|
3283
|
+
}, this.state.job.homeText))), this.renderImages(), this.renderCommentSection());
|
|
3277
3284
|
}
|
|
3278
3285
|
}, {
|
|
3279
3286
|
key: "renderHistoryEntry",
|
|
@@ -3446,7 +3453,7 @@ var Job = /*#__PURE__*/function (_Component) {
|
|
|
3446
3453
|
marginRight: 16
|
|
3447
3454
|
}
|
|
3448
3455
|
}, "Back"), Session$2.validateAccess(this.props.auth.site, values.permissionMaintenanceTracking, this.props.auth) && !___default['default'].isEmpty(this.state.job) && /*#__PURE__*/React__default['default'].createElement(reactRouterDom.Link, {
|
|
3449
|
-
to: "/
|
|
3456
|
+
to: "".concat(values.routeAddRequest, "/").concat(this.state.jobId)
|
|
3450
3457
|
}, /*#__PURE__*/React__default['default'].createElement(Components$2.Button, {
|
|
3451
3458
|
inline: true,
|
|
3452
3459
|
style: {
|
|
@@ -3984,28 +3991,16 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
3984
3991
|
}, {
|
|
3985
3992
|
key: "renderSuccess",
|
|
3986
3993
|
value: function renderSuccess() {
|
|
3987
|
-
var _this3 = this;
|
|
3988
|
-
|
|
3989
3994
|
if (!this.state.success) return null;
|
|
3990
|
-
|
|
3991
|
-
var featureTitle = function (key) {
|
|
3992
|
-
var strings = _this3.props.strings;
|
|
3993
|
-
|
|
3994
|
-
if (!strings || !strings.sideNav || !strings.sideNav[key]) {
|
|
3995
|
-
return values.textMenuTitle;
|
|
3996
|
-
}
|
|
3997
|
-
|
|
3998
|
-
return strings.sideNav[key];
|
|
3999
|
-
}();
|
|
4000
|
-
|
|
3995
|
+
var title = this.props.strings["".concat(values.featureKey, "_textTitleRequests")] || values.textTitleRequests;
|
|
4001
3996
|
return /*#__PURE__*/React__default['default'].createElement(Components$1.SuccessPopup, {
|
|
4002
|
-
text: "
|
|
3997
|
+
text: "Request has been ".concat(this.state.id != null ? 'edited' : 'added'),
|
|
4003
3998
|
buttons: [{
|
|
4004
3999
|
type: 'outlined',
|
|
4005
4000
|
onClick: function onClick() {
|
|
4006
4001
|
window.history.back();
|
|
4007
4002
|
},
|
|
4008
|
-
text: "Back to ".concat(
|
|
4003
|
+
text: "Back to ".concat(title)
|
|
4009
4004
|
}]
|
|
4010
4005
|
});
|
|
4011
4006
|
}
|
|
@@ -4022,7 +4017,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4022
4017
|
}, {
|
|
4023
4018
|
key: "renderSubmit",
|
|
4024
4019
|
value: function renderSubmit() {
|
|
4025
|
-
var
|
|
4020
|
+
var _this3 = this;
|
|
4026
4021
|
|
|
4027
4022
|
if (this.state.updating) {
|
|
4028
4023
|
return /*#__PURE__*/React__default['default'].createElement(Components$1.Button, {
|
|
@@ -4034,7 +4029,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4034
4029
|
inline: true,
|
|
4035
4030
|
buttonType: "tertiary",
|
|
4036
4031
|
onClick: function onClick() {
|
|
4037
|
-
return
|
|
4032
|
+
return _this3.props.history.push(values.routeRequestsHub);
|
|
4038
4033
|
},
|
|
4039
4034
|
isActive: true,
|
|
4040
4035
|
style: {
|
|
@@ -4093,7 +4088,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4093
4088
|
}, {
|
|
4094
4089
|
key: "renderMain",
|
|
4095
4090
|
value: function renderMain() {
|
|
4096
|
-
var
|
|
4091
|
+
var _this4 = this;
|
|
4097
4092
|
|
|
4098
4093
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4099
4094
|
style: {
|
|
@@ -4111,15 +4106,15 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4111
4106
|
placeholder: "Insert address here",
|
|
4112
4107
|
value: this.state.room,
|
|
4113
4108
|
onChange: function onChange(e) {
|
|
4114
|
-
return
|
|
4109
|
+
return _this4.onHandleChange(e);
|
|
4115
4110
|
},
|
|
4116
4111
|
isRequired: true,
|
|
4117
4112
|
alwaysShowLabel: true,
|
|
4118
4113
|
isValid: function isValid() {
|
|
4119
|
-
return !___default['default'].isEmpty(
|
|
4114
|
+
return !___default['default'].isEmpty(_this4.state.room);
|
|
4120
4115
|
},
|
|
4121
4116
|
showError: function showError() {
|
|
4122
|
-
return
|
|
4117
|
+
return _this4.state.showWarnings && ___default['default'].isEmpty(_this4.state.room);
|
|
4123
4118
|
}
|
|
4124
4119
|
}), /*#__PURE__*/React__default['default'].createElement(Components$1.GenericInput, {
|
|
4125
4120
|
id: "phone",
|
|
@@ -4129,7 +4124,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4129
4124
|
value: this.state.phone // showError={this.state.showWarnings && !this.validateImage()}
|
|
4130
4125
|
,
|
|
4131
4126
|
onChange: function onChange(e) {
|
|
4132
|
-
return
|
|
4127
|
+
return _this4.onHandleChange(e);
|
|
4133
4128
|
},
|
|
4134
4129
|
alwaysShowLabel: true
|
|
4135
4130
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -4153,17 +4148,17 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4153
4148
|
placeholder: "Title for the work required",
|
|
4154
4149
|
value: this.state.title,
|
|
4155
4150
|
onChange: function onChange(e) {
|
|
4156
|
-
return
|
|
4151
|
+
return _this4.onHandleChange(e);
|
|
4157
4152
|
},
|
|
4158
4153
|
inputStyle: {
|
|
4159
4154
|
height: 80
|
|
4160
4155
|
},
|
|
4161
4156
|
isRequired: true,
|
|
4162
4157
|
isValid: function isValid() {
|
|
4163
|
-
return !___default['default'].isEmpty(
|
|
4158
|
+
return !___default['default'].isEmpty(_this4.state.title);
|
|
4164
4159
|
},
|
|
4165
4160
|
showError: function showError() {
|
|
4166
|
-
return
|
|
4161
|
+
return _this4.state.showWarnings && ___default['default'].isEmpty(_this4.state.title);
|
|
4167
4162
|
},
|
|
4168
4163
|
alwaysShowLabel: true
|
|
4169
4164
|
}), /*#__PURE__*/React__default['default'].createElement(Components$1.GenericInput, {
|
|
@@ -4173,7 +4168,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4173
4168
|
placeholder: "Description of work required",
|
|
4174
4169
|
value: this.state.description,
|
|
4175
4170
|
onChange: function onChange(e) {
|
|
4176
|
-
return
|
|
4171
|
+
return _this4.onHandleChange(e);
|
|
4177
4172
|
},
|
|
4178
4173
|
inputStyle: {
|
|
4179
4174
|
height: 80
|
|
@@ -4186,7 +4181,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4186
4181
|
Label: 'No',
|
|
4187
4182
|
Value: false,
|
|
4188
4183
|
onChange: function onChange() {
|
|
4189
|
-
return
|
|
4184
|
+
return _this4.setState({
|
|
4190
4185
|
isHome: false
|
|
4191
4186
|
});
|
|
4192
4187
|
}
|
|
@@ -4194,7 +4189,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4194
4189
|
Label: 'Yes',
|
|
4195
4190
|
Value: true,
|
|
4196
4191
|
onChange: function onChange() {
|
|
4197
|
-
return
|
|
4192
|
+
return _this4.setState({
|
|
4198
4193
|
isHome: true
|
|
4199
4194
|
});
|
|
4200
4195
|
}
|
|
@@ -4209,17 +4204,17 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4209
4204
|
placeholder: "Description of person's available times",
|
|
4210
4205
|
value: this.state.homeText,
|
|
4211
4206
|
onChange: function onChange(e) {
|
|
4212
|
-
return
|
|
4207
|
+
return _this4.onHandleChange(e);
|
|
4213
4208
|
},
|
|
4214
4209
|
inputStyle: {
|
|
4215
4210
|
height: 80
|
|
4216
4211
|
},
|
|
4217
4212
|
isRequired: true,
|
|
4218
4213
|
isValid: function isValid() {
|
|
4219
|
-
return !___default['default'].isEmpty(
|
|
4214
|
+
return !___default['default'].isEmpty(_this4.state.homeText);
|
|
4220
4215
|
},
|
|
4221
4216
|
showError: function showError() {
|
|
4222
|
-
return
|
|
4217
|
+
return _this4.state.showWarnings && ___default['default'].isEmpty(_this4.state.homeText);
|
|
4223
4218
|
},
|
|
4224
4219
|
alwaysShowLabel: true
|
|
4225
4220
|
})));
|
|
@@ -4227,7 +4222,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4227
4222
|
}, {
|
|
4228
4223
|
key: "renderUserFilterPopup",
|
|
4229
4224
|
value: function renderUserFilterPopup() {
|
|
4230
|
-
var
|
|
4225
|
+
var _this5 = this;
|
|
4231
4226
|
|
|
4232
4227
|
var _this$state2 = this.state,
|
|
4233
4228
|
userFilterOpen = _this$state2.userFilterOpen,
|
|
@@ -4255,7 +4250,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4255
4250
|
placeholder: "Search name",
|
|
4256
4251
|
value: userSearch,
|
|
4257
4252
|
onChange: function onChange(e) {
|
|
4258
|
-
return
|
|
4253
|
+
return _this5.onHandleChange(e);
|
|
4259
4254
|
},
|
|
4260
4255
|
alwaysShowLabel: true
|
|
4261
4256
|
}), ___default['default'].sortBy(users, function (u) {
|
|
@@ -4268,7 +4263,7 @@ var AddJob = /*#__PURE__*/function (_Component) {
|
|
|
4268
4263
|
key: user.userId,
|
|
4269
4264
|
user: user,
|
|
4270
4265
|
onClick: function onClick() {
|
|
4271
|
-
return
|
|
4266
|
+
return _this5.onSelectUser(user);
|
|
4272
4267
|
}
|
|
4273
4268
|
});
|
|
4274
4269
|
}));
|