authscape 1.0.534 → 1.0.538

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
@@ -2813,8 +2813,8 @@ function Kanban(_ref2) {
2813
2813
  disableAddColumn = _ref2$disableAddColum === void 0 ? false : _ref2$disableAddColum,
2814
2814
  containerStyles = _ref2.containerStyles,
2815
2815
  itemStyles = _ref2.itemStyles,
2816
- _ref2$filterBy = _ref2.filterBy,
2817
- filterBy = _ref2$filterBy === void 0 ? null : _ref2$filterBy,
2816
+ _ref2$identifier = _ref2.identifier,
2817
+ identifier = _ref2$identifier === void 0 ? null : _ref2$identifier,
2818
2818
  containerStyle = _ref2.containerStyle,
2819
2819
  _ref2$coordinateGette = _ref2.coordinateGetter,
2820
2820
  coordinateGetter = _ref2$coordinateGette === void 0 ? multipleContainersCoordinateGetter : _ref2$coordinateGette,
@@ -2865,7 +2865,7 @@ function Kanban(_ref2) {
2865
2865
  while (1) switch (_context.prev = _context.next) {
2866
2866
  case 0:
2867
2867
  response = null;
2868
- if (!(filterBy == null)) {
2868
+ if (!(identifier == null)) {
2869
2869
  _context.next = 7;
2870
2870
  break;
2871
2871
  }
@@ -2877,7 +2877,7 @@ function Kanban(_ref2) {
2877
2877
  break;
2878
2878
  case 7:
2879
2879
  _context.next = 9;
2880
- return apiService().get("/Kanban/GetKanban?filterBy=" + filterBy);
2880
+ return apiService().get("/Kanban/GetKanban?identifier=" + identifier);
2881
2881
  case 9:
2882
2882
  response = _context.sent;
2883
2883
  case 10:
@@ -3668,6 +3668,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import
3668
3668
  function AssignMapping(_ref) {
3669
3669
  var currentUser = _ref.currentUser,
3670
3670
  documentComponentId = _ref.documentComponentId,
3671
+ _ref$setIsLoading = _ref.setIsLoading,
3672
+ setIsLoading = _ref$setIsLoading === void 0 ? null : _ref$setIsLoading,
3671
3673
  _ref$onCancel = _ref.onCancel,
3672
3674
  onCancel = _ref$onCancel === void 0 ? null : _ref$onCancel,
3673
3675
  _ref$onPublished = _ref.onPublished,
@@ -3762,9 +3764,35 @@ function AssignMapping(_ref) {
3762
3764
  }();
3763
3765
  (0, _react.useEffect)(function () {
3764
3766
  if (documentComponentId != null) {
3767
+ if (setIsLoading != null) {
3768
+ setIsLoading(true);
3769
+ }
3765
3770
  setSpreadSheetAddress("/DocumentMappingPreview/PreviewMappedData?companyId=" + currentUser.companyId + "&documentComponentId=" + documentComponentId);
3766
- fetchMappingFrom();
3767
- fetchMappingTo();
3771
+ var fetchData = /*#__PURE__*/function () {
3772
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3773
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3774
+ while (1) switch (_context3.prev = _context3.next) {
3775
+ case 0:
3776
+ _context3.next = 2;
3777
+ return fetchMappingFrom();
3778
+ case 2:
3779
+ _context3.next = 4;
3780
+ return fetchMappingTo();
3781
+ case 4:
3782
+ if (setIsLoading != null) {
3783
+ setIsLoading(false);
3784
+ }
3785
+ case 5:
3786
+ case "end":
3787
+ return _context3.stop();
3788
+ }
3789
+ }, _callee3);
3790
+ }));
3791
+ return function fetchData() {
3792
+ return _ref4.apply(this, arguments);
3793
+ };
3794
+ }();
3795
+ fetchData();
3768
3796
  }
3769
3797
  }, [documentComponentId]);
3770
3798
  return /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_Container["default"], {
@@ -3800,18 +3828,18 @@ function AssignMapping(_ref) {
3800
3828
  sx: {
3801
3829
  marginRight: 2
3802
3830
  },
3803
- onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3804
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3805
- while (1) switch (_context3.prev = _context3.next) {
3831
+ onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3832
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3833
+ while (1) switch (_context4.prev = _context4.next) {
3806
3834
  case 0:
3807
3835
  if (onCancel != null) {
3808
3836
  onCancel();
3809
3837
  }
3810
3838
  case 1:
3811
3839
  case "end":
3812
- return _context3.stop();
3840
+ return _context4.stop();
3813
3841
  }
3814
- }, _callee3);
3842
+ }, _callee4);
3815
3843
  }))
3816
3844
  }, "Cancel"), /*#__PURE__*/_react["default"].createElement(_material.Button, {
3817
3845
  variant: "contained",
@@ -3899,22 +3927,23 @@ function AssignMapping(_ref) {
3899
3927
  }
3900
3928
  }, "Cancel"), /*#__PURE__*/_react["default"].createElement(_material.Button, {
3901
3929
  variant: "contained",
3902
- onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3930
+ onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
3903
3931
  var publishedRows, response;
3904
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3905
- while (1) switch (_context4.prev = _context4.next) {
3932
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3933
+ while (1) switch (_context5.prev = _context5.next) {
3906
3934
  case 0:
3907
- publishedRows = spreadSheetRef.current.getRows(); // publishedRows.forEach(element => {
3908
- // alert(JSON.stringify(element));
3909
- // });
3910
- _context4.next = 3;
3935
+ if (setIsLoading != null) {
3936
+ setIsLoading(true);
3937
+ }
3938
+ publishedRows = spreadSheetRef.current.getRows();
3939
+ _context5.next = 4;
3911
3940
  return apiService().post("/DocumentMapping/Publish", {
3912
3941
  companyId: currentUser.companyId,
3913
3942
  documentId: documentId,
3914
3943
  publishedRows: publishedRows
3915
3944
  });
3916
- case 3:
3917
- response = _context4.sent;
3945
+ case 4:
3946
+ response = _context5.sent;
3918
3947
  if (response != null && response.status == 200) {
3919
3948
  setShowPreviewDialog(false);
3920
3949
  if (onPublished != null) {
@@ -3923,11 +3952,14 @@ function AssignMapping(_ref) {
3923
3952
  } else {
3924
3953
  alert(JSON.stringify(response.data));
3925
3954
  }
3926
- case 5:
3955
+ if (setIsLoading != null) {
3956
+ setIsLoading(false);
3957
+ }
3958
+ case 7:
3927
3959
  case "end":
3928
- return _context4.stop();
3960
+ return _context5.stop();
3929
3961
  }
3930
- }, _callee4);
3962
+ }, _callee5);
3931
3963
  }))
3932
3964
  }, "Publish"))));
3933
3965
  }
@@ -4405,6 +4437,8 @@ function FileMapping(_ref) {
4405
4437
  fileUploadName = _ref$fileUploadName === void 0 ? "Upload Document" : _ref$fileUploadName,
4406
4438
  _ref$hideDocumentMana = _ref.hideDocumentManager,
4407
4439
  hideDocumentManager = _ref$hideDocumentMana === void 0 ? false : _ref$hideDocumentMana,
4440
+ _ref$setIsLoading = _ref.setIsLoading,
4441
+ setIsLoading = _ref$setIsLoading === void 0 ? null : _ref$setIsLoading,
4408
4442
  _ref$documentTypeId = _ref.documentTypeId,
4409
4443
  documentTypeId = _ref$documentTypeId === void 0 ? null : _ref$documentTypeId,
4410
4444
  _ref$onOpened = _ref.onOpened,
@@ -4442,6 +4476,7 @@ function FileMapping(_ref) {
4442
4476
  }
4443
4477
  }), documentComponentId != null && /*#__PURE__*/_react["default"].createElement(AssignMapping, {
4444
4478
  currentUser: currentUser,
4479
+ setIsLoading: setIsLoading,
4445
4480
  documentComponentId: documentComponentId,
4446
4481
  onCancel: function onCancel() {
4447
4482
  setDocumentComponentId(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.534",
3
+ "version": "1.0.538",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -134,7 +134,7 @@ export function Kanban({
134
134
  disableAddColumn = false,
135
135
  containerStyles,
136
136
  itemStyles,
137
- filterBy = null,
137
+ identifier = null,
138
138
  containerStyle,
139
139
  coordinateGetter = multipleContainersCoordinateGetter,
140
140
  getItemStyles = () => ({}),
@@ -162,13 +162,13 @@ export function Kanban({
162
162
  const fetchData = async () => {
163
163
 
164
164
  let response = null;
165
- if (filterBy == null)
165
+ if (identifier == null)
166
166
  {
167
167
  response = await apiService().get("/Kanban/GetKanban");
168
168
  }
169
169
  else
170
170
  {
171
- response = await apiService().get("/Kanban/GetKanban?filterBy=" + filterBy);
171
+ response = await apiService().get("/Kanban/GetKanban?identifier=" + identifier);
172
172
  }
173
173
 
174
174
  if (response != null && response.status == 200)
@@ -15,7 +15,7 @@ import CloseIcon from '@mui/icons-material/Close';
15
15
  import IconButton from '@mui/material/IconButton';
16
16
  import ArrowRightAltRoundedIcon from '@mui/icons-material/ArrowRightAltRounded';
17
17
 
18
- export function AssignMapping({currentUser, documentComponentId, onCancel = null, onPublished = null}) {
18
+ export function AssignMapping({currentUser, documentComponentId, setIsLoading = null, onCancel = null, onPublished = null}) {
19
19
 
20
20
  const [documentId, setDocumentId] = useState(documentComponentId);
21
21
 
@@ -58,10 +58,26 @@ export function AssignMapping({currentUser, documentComponentId, onCancel = null
58
58
 
59
59
  if (documentComponentId != null)
60
60
  {
61
+ if (setIsLoading != null)
62
+ {
63
+ setIsLoading(true);
64
+ }
65
+
61
66
  setSpreadSheetAddress("/DocumentMappingPreview/PreviewMappedData?companyId=" + currentUser.companyId + "&documentComponentId=" + documentComponentId);
62
67
 
63
- fetchMappingFrom();
64
- fetchMappingTo();
68
+ const fetchData = async () => {
69
+ await fetchMappingFrom();
70
+ await fetchMappingTo();
71
+
72
+
73
+ if (setIsLoading != null)
74
+ {
75
+ setIsLoading(false);
76
+ }
77
+ }
78
+
79
+ fetchData();
80
+
65
81
  }
66
82
 
67
83
  }, [documentComponentId])
@@ -177,11 +193,12 @@ export function AssignMapping({currentUser, documentComponentId, onCancel = null
177
193
  }}>Cancel</Button>
178
194
  <Button variant="contained" onClick={async () => {
179
195
 
180
- let publishedRows = spreadSheetRef.current.getRows();
181
- // publishedRows.forEach(element => {
182
- // alert(JSON.stringify(element));
183
- // });
196
+ if (setIsLoading != null)
197
+ {
198
+ setIsLoading(true);
199
+ }
184
200
 
201
+ let publishedRows = spreadSheetRef.current.getRows();
185
202
 
186
203
  let response = await apiService().post("/DocumentMapping/Publish", {
187
204
  companyId: currentUser.companyId,
@@ -202,6 +219,12 @@ export function AssignMapping({currentUser, documentComponentId, onCancel = null
202
219
  {
203
220
  alert(JSON.stringify(response.data));
204
221
  }
222
+
223
+ if (setIsLoading != null)
224
+ {
225
+ setIsLoading(false);
226
+ }
227
+
205
228
  }}>
206
229
  Publish
207
230
  </Button>
@@ -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, fileUploadName = "Upload Document", hideDocumentManager = false, documentTypeId = null, onOpened = null, onPublished = null, onCanceled = null, onArchived = null}) {
6
+ export function FileMapping({currentUser, fileUploadName = "Upload Document", hideDocumentManager = false, setIsLoading = null, documentTypeId = null, onOpened = null, onPublished = null, onCanceled = null, onArchived = null}) {
7
7
 
8
8
  const [documentComponentId, setDocumentComponentId] = useState(null);
9
9
 
@@ -45,7 +45,7 @@ export function FileMapping({currentUser, fileUploadName = "Upload Document", hi
45
45
  }
46
46
 
47
47
  {documentComponentId != null &&
48
- <AssignMapping currentUser={currentUser} documentComponentId={documentComponentId}
48
+ <AssignMapping currentUser={currentUser} setIsLoading={setIsLoading} documentComponentId={documentComponentId}
49
49
  onCancel={() => {
50
50
 
51
51
  setDocumentComponentId(null);