@pega/angular-sdk-components 0.23.2 → 0.23.4

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.
@@ -8200,7 +8200,7 @@ class CaseViewComponent {
8200
8200
  const editAction = this.arAvailableActions$.find(action => action.ID === 'pyUpdateCaseDetails');
8201
8201
  const actionsAPI = this.pConn$.getActionsApi();
8202
8202
  const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
8203
- openLocalAction(editAction.ID, { ...editAction });
8203
+ openLocalAction(editAction.ID, { ...editAction, containerName: 'modal', type: 'express' });
8204
8204
  }
8205
8205
  _menuActionClick(data) {
8206
8206
  const actionsAPI = this.pConn$.getActionsApi();
@@ -13750,22 +13750,26 @@ class FileUtilityComponent {
13750
13750
  if (files.length > 0) {
13751
13751
  this.lu_bLoading$ = true;
13752
13752
  }
13753
- // const uploadedFiles = [];
13754
- for (const file of files) {
13755
- attachmentUtils
13756
- .uploadAttachment(file, this.onUploadProgress, this.errorHandler, this.pConn$.getContextName())
13757
- .then((fileResponse) => {
13758
- if (fileResponse.type === 'File') {
13759
- attachmentUtils.linkAttachmentsToCase(caseID, [fileResponse], 'File', this.pConn$.getContextName())
13760
- .then(() => {
13761
- this.refreshAttachments();
13762
- })
13763
- .catch(console.error);
13753
+ const arFiles = Array.from(files);
13754
+ Promise.allSettled(arFiles.map(file => attachmentUtils.uploadAttachment(file, this.onUploadProgress, this.errorHandler, this.pConn$.getContextName())))
13755
+ .then((fileResponses) => {
13756
+ const uploadedFiles = [];
13757
+ fileResponses.forEach(fileResponse => {
13758
+ if (fileResponse.status === 'fulfilled') {
13759
+ uploadedFiles.push(fileResponse.value);
13764
13760
  }
13765
- })
13766
- .catch(console.error);
13767
- }
13761
+ });
13762
+ if (uploadedFiles.length > 0) {
13763
+ attachmentUtils.linkAttachmentsToCase(caseID, uploadedFiles, 'File', this.pConn$.getContextName())
13764
+ .then(() => {
13765
+ this.refreshAttachments();
13766
+ })
13767
+ .catch();
13768
+ }
13769
+ })
13770
+ .catch();
13768
13771
  this.arFileList$ = [];
13772
+ this.lu_bLoading$ = false;
13769
13773
  }
13770
13774
  refreshAttachments() {
13771
13775
  this.updateSelf();