Skip to content

Commit 7581c9b

Browse files
[DURACOM-263] - NEW - fix redirect to submission form on new item version
1 parent e146109 commit 7581c9b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/app/core/submission/workspaceitem-data.service.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ import { WorkspaceItem } from './models/workspaceitem.model';
4343
@Injectable({ providedIn: 'root' })
4444
export class WorkspaceitemDataService extends IdentifiableDataService<WorkspaceItem> implements DeleteData<WorkspaceItem>, SearchData<WorkspaceItem>{
4545
protected linkPath = 'workspaceitems';
46-
protected searchByItemLinkPath = 'workspaceitems/search/item';
46+
protected searchByItemLinkPath = 'item';
4747
private deleteData: DeleteData<WorkspaceItem>;
48-
private searchData: SearchData<WorkspaceItem>;
48+
private searchData: SearchDataImpl<WorkspaceItem>;
4949

5050
constructor(
5151
protected comparator: DSOChangeAnalyzer<WorkspaceItem>,
@@ -91,8 +91,7 @@ export class WorkspaceitemDataService extends IdentifiableDataService<WorkspaceI
9191
public findByItem(uuid: string, useCachedVersionIfAvailable = false, reRequestOnStale = true, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig<WorkspaceItem>[]): Observable<RemoteData<WorkspaceItem>> {
9292
const findListOptions = new FindListOptions();
9393
findListOptions.searchParams = [new RequestParam('uuid', uuid)];
94-
const href$ = this.halService.getEndpoint(this.searchByItemLinkPath)
95-
.pipe(map((href) => this.buildHrefFromFindOptions(href, findListOptions, [], ...linksToFollow)));
94+
const href$ = this.searchData.getSearchByHref(this.searchByItemLinkPath, findListOptions, ...linksToFollow);
9695
return this.findByHref(href$, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
9796
}
9897

0 commit comments

Comments
 (0)