mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
54472: Intermediate commit
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Community } from '../../core/shared/community.model';
|
||||
import { ComColDataService } from '../../core/data/comcol-data.service';
|
||||
import { NormalizedCommunity } from '../../core/cache/models/normalized-community.model';
|
||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-create-community',
|
||||
@@ -8,10 +11,15 @@ import { Community } from '../../core/shared/community.model';
|
||||
})
|
||||
export class CreateCommunityPageComponent {
|
||||
|
||||
public constructor(private communityDataService: CommunityDataService) {
|
||||
|
||||
}
|
||||
|
||||
onSubmit(data: any) {
|
||||
Object.assign(new Community(), {
|
||||
// TODO: Create community object to add to rest
|
||||
const community = Object.assign(new Community(), {
|
||||
name: data.name
|
||||
});
|
||||
this.communityDataService.create(community);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user