@@ -12,7 +12,6 @@ import { ChangeDetectionStrategy, Component, DestroyRef, inject, input, output,
1212import { takeUntilDestroyed , toObservable } from '@angular/core/rxjs-interop' ;
1313
1414import { CreateFolderDialogComponent } from '@osf/features/files/components' ;
15- import { DeleteEntry } from '@osf/features/files/store' ;
1615import { FileUploadDialogComponent } from '@osf/shared/components/file-upload-dialog/file-upload-dialog.component' ;
1716import { FilesTreeComponent } from '@osf/shared/components/files-tree/files-tree.component' ;
1817import { LoadingSpinnerComponent } from '@osf/shared/components/loading-spinner/loading-spinner.component' ;
@@ -26,6 +25,7 @@ import { FileFolderModel } from '@shared/models/files/file-folder.model';
2625
2726import {
2827 CreateFolder ,
28+ DeleteDraftRegistrationFiles ,
2929 GetFiles ,
3030 GetRootFolders ,
3131 RegistriesSelectors ,
@@ -54,7 +54,6 @@ export class FilesControlComponent {
5454 projectId = input . required < string > ( ) ;
5555 provider = input . required < string > ( ) ;
5656 filesViewOnly = input < boolean > ( false ) ;
57- isDraftResource = input < boolean > ( false ) ;
5857 attachFile = output < FileModel > ( ) ;
5958 removeFromAttachedFiles = output < string > ( ) ;
6059 openFile = output < FileModel > ( ) ;
@@ -82,7 +81,7 @@ export class FilesControlComponent {
8281 setFilesIsLoading : SetFilesIsLoading ,
8382 setCurrentFolder : SetRegistriesCurrentFolder ,
8483 getRootFolders : GetRootFolders ,
85- deleteEntry : DeleteEntry ,
84+ deleteDraftRegistrationFiles : DeleteDraftRegistrationFiles ,
8685 } ) ;
8786
8887 constructor ( ) {
@@ -91,7 +90,7 @@ export class FilesControlComponent {
9190 }
9291
9392 deleteEntry ( file : FileModel ) : void {
94- this . actions . deleteEntry ( file ?. links . delete ) . subscribe ( ( ) => {
93+ this . actions . deleteDraftRegistrationFiles ( file ?. links . delete ) . subscribe ( ( ) => {
9594 this . toastService . showSuccess ( 'files.dialogs.deleteFile.success' ) ;
9695 this . refreshFilesList ( ) ;
9796 this . removeFromAttachedFiles . emit ( file . id ) ;
0 commit comments