authscape 1.0.532 → 1.0.536
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
|
@@ -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
|
-
|
|
3767
|
-
|
|
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
|
|
3804
|
-
return _regeneratorRuntime().wrap(function
|
|
3805
|
-
while (1) switch (
|
|
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
|
|
3840
|
+
return _context4.stop();
|
|
3813
3841
|
}
|
|
3814
|
-
},
|
|
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
|
|
3930
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
3903
3931
|
var publishedRows, response;
|
|
3904
|
-
return _regeneratorRuntime().wrap(function
|
|
3905
|
-
while (1) switch (
|
|
3932
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
3933
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
3906
3934
|
case 0:
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
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
|
|
3917
|
-
response =
|
|
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
|
-
|
|
3955
|
+
if (setIsLoading != null) {
|
|
3956
|
+
setIsLoading(false);
|
|
3957
|
+
}
|
|
3958
|
+
case 7:
|
|
3927
3959
|
case "end":
|
|
3928
|
-
return
|
|
3960
|
+
return _context5.stop();
|
|
3929
3961
|
}
|
|
3930
|
-
},
|
|
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);
|
|
@@ -5168,7 +5203,7 @@ function MappedColumn(_ref) {
|
|
|
5168
5203
|
}, "Matched"))), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
5169
5204
|
variant: "body2",
|
|
5170
5205
|
color: "text.secondary"
|
|
5171
|
-
}, !isMapped && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "This column is matched"), isMapped && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "This column is not matched. If not matched it will not import"))), /*#__PURE__*/_react["default"].createElement(_CardActions["default"], {
|
|
5206
|
+
}, !isMapped && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "This column is matched with ", toName), isMapped && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "This column is not matched. If not matched it will not import"))), /*#__PURE__*/_react["default"].createElement(_CardActions["default"], {
|
|
5172
5207
|
sx: {
|
|
5173
5208
|
backgroundColor: isMapped ? notMatchedColor : matchedColor
|
|
5174
5209
|
}
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
64
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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);
|
|
@@ -36,7 +36,7 @@ export function MappedColumn({companyId, documentId, documentType, documentMappi
|
|
|
36
36
|
}
|
|
37
37
|
</Box>
|
|
38
38
|
<Typography variant="body2" color="text.secondary">
|
|
39
|
-
{!isMapped && <>This column is matched</>}
|
|
39
|
+
{!isMapped && <>This column is matched with {toName}</>}
|
|
40
40
|
{isMapped && <>This column is not matched. If not matched it will not import</>}
|
|
41
41
|
|
|
42
42
|
</Typography>
|