|
|
@ -193,11 +193,11 @@ export class WorkPackageResource extends HalResource { |
|
|
|
* Return an updated AttachmentCollectionResource. |
|
|
|
* Return an updated AttachmentCollectionResource. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public uploadAttachments(files: UploadFile[]): IPromise<any> { |
|
|
|
public uploadAttachments(files: UploadFile[]): IPromise<any> { |
|
|
|
const {uploads, upload} = this.attachments.upload(files); |
|
|
|
const {uploads, finished} = this.attachments.upload(files); |
|
|
|
const message = I18n.t('js.label_upload_notification', this); |
|
|
|
const message = I18n.t('js.label_upload_notification', this); |
|
|
|
const notification = NotificationsService.addWorkPackageUpload(message, uploads); |
|
|
|
const notification = NotificationsService.addWorkPackageUpload(message, uploads); |
|
|
|
|
|
|
|
|
|
|
|
return upload |
|
|
|
return finished |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
$timeout(() => { |
|
|
|
$timeout(() => { |
|
|
|
NotificationsService.remove(notification); |
|
|
|
NotificationsService.remove(notification); |
|
|
|