authscape 1.0.470 → 1.0.474

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/index.js CHANGED
@@ -4397,7 +4397,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4397
4397
 
4398
4398
  function FileMapping(_ref) {
4399
4399
  var currentUser = _ref.currentUser,
4400
- hideDocumentManager = _ref.hideDocumentManager;
4400
+ hideDocumentManager = _ref.hideDocumentManager,
4401
+ _ref$onPublished = _ref.onPublished,
4402
+ _onPublished = _ref$onPublished === void 0 ? null : _ref$onPublished,
4403
+ _ref$onCanceled = _ref.onCanceled,
4404
+ onCanceled = _ref$onCanceled === void 0 ? null : _ref$onCanceled,
4405
+ _ref$onArchived = _ref.onArchived,
4406
+ onArchived = _ref$onArchived === void 0 ? null : _ref$onArchived;
4401
4407
  var _useState = (0, _react.useState)(null),
4402
4408
  _useState2 = _slicedToArray(_useState, 2),
4403
4409
  documentComponentId = _useState2[0],
@@ -4409,17 +4415,25 @@ function FileMapping(_ref) {
4409
4415
  setDocumentComponentId(documentComponentId);
4410
4416
  },
4411
4417
  onArchive: function onArchive(documentComponentId) {
4412
-
4413
4418
  //alert(documentComponentId);
4419
+ if (onArchived != null) {
4420
+ onArchived(documentComponentId);
4421
+ }
4414
4422
  }
4415
4423
  }), documentComponentId != null && /*#__PURE__*/_react["default"].createElement(AssignMapping, {
4416
4424
  currentUser: currentUser,
4417
4425
  documentComponentId: documentComponentId,
4418
4426
  onCancel: function onCancel() {
4419
4427
  setDocumentComponentId(null);
4428
+ if (onCanceled != null) {
4429
+ onCanceled(documentComponentId);
4430
+ }
4420
4431
  },
4421
4432
  onPublished: function onPublished() {
4422
4433
  setDocumentComponentId(null);
4434
+ if (_onPublished != null) {
4435
+ _onPublished(documentComponentId);
4436
+ }
4423
4437
  }
4424
4438
  }));
4425
4439
  }
@@ -8402,14 +8416,18 @@ var TicketDetail = function TicketDetail(_ref) {
8402
8416
  _useState16 = _slicedToArray(_useState15, 2),
8403
8417
  customTabPayload = _useState16[0],
8404
8418
  setCustomTabPayload = _useState16[1];
8405
- var _useState17 = (0, _react.useState)([]),
8419
+ var _useState17 = (0, _react.useState)(null),
8406
8420
  _useState18 = _slicedToArray(_useState17, 2),
8407
- createdByList = _useState18[0],
8408
- setCreatedByList = _useState18[1];
8409
- var _useState19 = (0, _react.useState)(null),
8421
+ ticketDescription = _useState18[0],
8422
+ setTicketDescription = _useState18[1];
8423
+ var _useState19 = (0, _react.useState)([]),
8410
8424
  _useState20 = _slicedToArray(_useState19, 2),
8411
- selectedCreatedBy = _useState20[0],
8412
- setSelectedCreatedBy = _useState20[1];
8425
+ createdByList = _useState20[0],
8426
+ setCreatedByList = _useState20[1];
8427
+ var _useState21 = (0, _react.useState)(null),
8428
+ _useState22 = _slicedToArray(_useState21, 2),
8429
+ selectedCreatedBy = _useState22[0],
8430
+ setSelectedCreatedBy = _useState22[1];
8413
8431
  (0, _react.useEffect)(function () {
8414
8432
  var fetchData = /*#__PURE__*/function () {
8415
8433
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -8432,6 +8450,7 @@ var TicketDetail = function TicketDetail(_ref) {
8432
8450
  setParticipants(response.data.participants);
8433
8451
  setTicketAttachments(response.data.attachments);
8434
8452
  setCustomTabPayload(response.data.customTabPayload);
8453
+ setTicketDescription(response.data.description);
8435
8454
  }
8436
8455
  case 5:
8437
8456
  case "end":
@@ -8799,16 +8818,25 @@ var TicketDetail = function TicketDetail(_ref) {
8799
8818
  onChange: handleChange,
8800
8819
  "aria-label": "basic tabs example"
8801
8820
  }, /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
8802
- label: "Chat"
8821
+ label: "Description"
8803
8822
  }, a11yProps(0))), /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
8804
- label: "Notes"
8823
+ label: "Chat"
8805
8824
  }, a11yProps(1))), /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
8825
+ label: "Notes"
8826
+ }, a11yProps(2))), /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
8806
8827
  label: "Attachments"
8807
- }, a11yProps(2))), customTabName != null && /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
8828
+ }, a11yProps(3))), customTabName != null && /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
8808
8829
  label: customTabName
8809
- }, a11yProps(3))))), /*#__PURE__*/_react["default"].createElement(TabPanel, {
8830
+ }, a11yProps(4))))), /*#__PURE__*/_react["default"].createElement(TabPanel, {
8810
8831
  value: value,
8811
8832
  index: 0
8833
+ }, /*#__PURE__*/_react["default"].createElement(_system.Box, {
8834
+ dangerouslySetInnerHTML: {
8835
+ __html: ticketDescription
8836
+ }
8837
+ })), /*#__PURE__*/_react["default"].createElement(TabPanel, {
8838
+ value: value,
8839
+ index: 1
8812
8840
  }, ticket != null && /*#__PURE__*/_react["default"].createElement(Comments, {
8813
8841
  ticketId: ticket.id,
8814
8842
  isDisabled: false,
@@ -8816,7 +8844,7 @@ var TicketDetail = function TicketDetail(_ref) {
8816
8844
  currentUser: currentUser
8817
8845
  })), /*#__PURE__*/_react["default"].createElement(TabPanel, {
8818
8846
  value: value,
8819
- index: 1
8847
+ index: 2
8820
8848
  }, ticket != null && /*#__PURE__*/_react["default"].createElement(Comments, {
8821
8849
  ticketId: ticket.id,
8822
8850
  isDisabled: false,
@@ -8824,7 +8852,7 @@ var TicketDetail = function TicketDetail(_ref) {
8824
8852
  currentUser: currentUser
8825
8853
  })), /*#__PURE__*/_react["default"].createElement(TabPanel, {
8826
8854
  value: value,
8827
- index: 2
8855
+ index: 3
8828
8856
  }, ticket != null && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, ticketAttachments.map(function (attachment) {
8829
8857
  return /*#__PURE__*/_react["default"].createElement(DownloadFile, {
8830
8858
  fileName: attachment.name,
@@ -8832,7 +8860,7 @@ var TicketDetail = function TicketDetail(_ref) {
8832
8860
  });
8833
8861
  }), ticketAttachments.length == 0 && /*#__PURE__*/_react["default"].createElement(_system.Box, null, "There are no attachments"))), customTabName != null && /*#__PURE__*/_react["default"].createElement(TabPanel, {
8834
8862
  value: value,
8835
- index: 3
8863
+ index: 4
8836
8864
  }, customTabElement(customTabPayload))));
8837
8865
  };
8838
8866
  exports.TicketDetail = TicketDetail;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.470",
3
+ "version": "1.0.474",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ import { Box } from '@mui/system';
3
3
  // import ManageMappingDocuments from './manageMappingDocuments';
4
4
  // import AssignMapping from './AssignMapping';
5
5
 
6
- export function FileMapping({currentUser, hideDocumentManager}) {
6
+ export function FileMapping({currentUser, hideDocumentManager, onPublished = null, onCanceled = null, onArchived = null}) {
7
7
 
8
8
  const [documentComponentId, setDocumentComponentId] = useState(null);
9
9
 
@@ -21,6 +21,10 @@ export function FileMapping({currentUser, hideDocumentManager}) {
21
21
  onArchive={(documentComponentId) => {
22
22
 
23
23
  //alert(documentComponentId);
24
+ if (onArchived != null)
25
+ {
26
+ onArchived(documentComponentId);
27
+ }
24
28
 
25
29
  }}
26
30
  />
@@ -31,10 +35,20 @@ export function FileMapping({currentUser, hideDocumentManager}) {
31
35
  onCancel={() => {
32
36
 
33
37
  setDocumentComponentId(null);
38
+
39
+ if (onCanceled != null)
40
+ {
41
+ onCanceled(documentComponentId);
42
+ }
34
43
 
35
44
  }}
36
45
  onPublished={() => {
37
46
  setDocumentComponentId(null);
47
+
48
+ if (onPublished != null)
49
+ {
50
+ onPublished(documentComponentId);
51
+ }
38
52
  }} />
39
53
  }
40
54
 
@@ -27,6 +27,8 @@ export const TicketDetail = ({ticketId, setIsLoading, currentUser, GoBackToViewT
27
27
  const [ticketAttachments, setTicketAttachments] = useState([]);
28
28
  const [customTabPayload, setCustomTabPayload] = useState(null);
29
29
 
30
+ const [ticketDescription, setTicketDescription] = useState(null);
31
+
30
32
  const [createdByList, setCreatedByList] = useState([]);
31
33
  const [selectedCreatedBy, setSelectedCreatedBy] = useState(null);
32
34
 
@@ -47,7 +49,8 @@ export const TicketDetail = ({ticketId, setIsLoading, currentUser, GoBackToViewT
47
49
  setSelectedCreatedBy(response.data.selectedCreatedBy);
48
50
  setParticipants(response.data.participants);
49
51
  setTicketAttachments(response.data.attachments);
50
- setCustomTabPayload(response.data.customTabPayload)
52
+ setCustomTabPayload(response.data.customTabPayload);
53
+ setTicketDescription(response.data.description);
51
54
  }
52
55
  }
53
56
 
@@ -326,28 +329,39 @@ export const TicketDetail = ({ticketId, setIsLoading, currentUser, GoBackToViewT
326
329
  <Box sx={{ width: '100%', marginTop:2 }}>
327
330
  <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
328
331
  <Tabs value={value} onChange={handleChange} aria-label="basic tabs example">
329
- <Tab label="Chat" {...a11yProps(0)} />
330
- <Tab label="Notes" {...a11yProps(1)} />
331
- <Tab label="Attachments" {...a11yProps(2)} />
332
+ <Tab label="Description" {...a11yProps(0)} />
333
+ <Tab label="Chat" {...a11yProps(1)} />
334
+ <Tab label="Notes" {...a11yProps(2)} />
335
+ <Tab label="Attachments" {...a11yProps(3)} />
332
336
 
333
337
  {customTabName != null &&
334
- <Tab label={customTabName} {...a11yProps(3)} />
338
+ <Tab label={customTabName} {...a11yProps(4)} />
335
339
  }
336
340
 
337
341
  </Tabs>
338
342
  </Box>
339
343
  <TabPanel value={value} index={0}>
340
344
 
345
+ <Box dangerouslySetInnerHTML={{
346
+ __html: ticketDescription,
347
+ }}>
348
+ </Box>
349
+
350
+ </TabPanel>
351
+
352
+ <TabPanel value={value} index={1}>
353
+
341
354
  {ticket != null &&
342
355
  <Comments ticketId={ticket.id} isDisabled={false} isNote={false} currentUser={currentUser} />
343
356
  }
357
+
344
358
  </TabPanel>
345
- <TabPanel value={value} index={1}>
359
+ <TabPanel value={value} index={2}>
346
360
  {ticket != null &&
347
361
  <Comments ticketId={ticket.id} isDisabled={false} isNote={true} currentUser={currentUser} />
348
362
  }
349
363
  </TabPanel>
350
- <TabPanel value={value} index={2}>
364
+ <TabPanel value={value} index={3}>
351
365
  {ticket != null &&
352
366
  <>
353
367
  {ticketAttachments.map((attachment) => {
@@ -367,7 +381,7 @@ export const TicketDetail = ({ticketId, setIsLoading, currentUser, GoBackToViewT
367
381
  </TabPanel>
368
382
 
369
383
  {customTabName != null &&
370
- <TabPanel value={value} index={3}>
384
+ <TabPanel value={value} index={4}>
371
385
  {customTabElement(customTabPayload)}
372
386
  </TabPanel>
373
387
  }