diff --git a/src/app/+community-page/create-community-page/create-community-page.component.ts b/src/app/+community-page/create-community-page/create-community-page.component.ts index db2e4f25fa..b49ea1bbfa 100644 --- a/src/app/+community-page/create-community-page/create-community-page.component.ts +++ b/src/app/+community-page/create-community-page/create-community-page.component.ts @@ -1,4 +1,5 @@ import { Component } from '@angular/core'; +import { Community } from '../../core/shared/community.model'; @Component({ selector: 'ds-create-community', @@ -8,7 +9,9 @@ import { Component } from '@angular/core'; export class CreateCommunityPageComponent { onSubmit(data: any) { - console.log('yay, made it with name: ' + data.name); + Object.assign(new Community(), { + // TODO: Create community object to add to rest + }); } } diff --git a/src/app/core/comcol/comcol.service.ts b/src/app/core/comcol/comcol.service.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/app/core/data/comcol-data.service.ts b/src/app/core/data/comcol-data.service.ts index 112afa0bc8..5b9f10b957 100644 --- a/src/app/core/data/comcol-data.service.ts +++ b/src/app/core/data/comcol-data.service.ts @@ -1,5 +1,5 @@ import { Observable } from 'rxjs/Observable'; -import { isEmpty, isNotEmpty } from '../../shared/empty.util'; +import { isEmpty, isNotEmpty, isNotEmptyOperator } from '../../shared/empty.util'; import { NormalizedCommunity } from '../cache/models/normalized-community.model'; import { CacheableObject } from '../cache/object-cache.reducer'; import { ObjectCacheService } from '../cache/object-cache.service'; @@ -8,9 +8,14 @@ import { ResponseCacheEntry } from '../cache/response-cache.reducer'; import { CommunityDataService } from './community-data.service'; import { DataService } from './data.service'; -import { FindByIDRequest } from './request.models'; +import { FindByIDRequest, PutRequest } from './request.models'; import { NormalizedObject } from '../cache/models/normalized-object.model'; import { HALEndpointService } from '../shared/hal-endpoint.service'; +import { DSpaceObject } from '../shared/dspace-object.model'; +import { Community } from '../shared/community.model'; +import { Collection } from '../shared/collection.model'; +import { distinctUntilChanged, map } from 'rxjs/operators'; +import { configureRequest } from '../shared/operators'; export abstract class ComColDataService extends DataService { protected abstract cds: CommunityDataService; @@ -56,4 +61,14 @@ export abstract class ComColDataService new PutRequest(this.requestService.generateRequestId(), endpointURL, comcol)), + configureRequest(this.requestService) + ); + } + }