|
|
|
@ -32,6 +32,12 @@ export class ContentsSelectorComponent implements OnInit { |
|
|
|
@Input() |
|
|
|
public languages: LanguageDto[]; |
|
|
|
|
|
|
|
@Input() |
|
|
|
public allowDuplicates: boolean; |
|
|
|
|
|
|
|
@Input() |
|
|
|
public alreadySelected: ContentDto[]; |
|
|
|
|
|
|
|
@Input() |
|
|
|
public schema: SchemaDetailsDto; |
|
|
|
|
|
|
|
@ -76,6 +82,10 @@ export class ContentsSelectorComponent implements OnInit { |
|
|
|
return this.selectedItems[content.id]; |
|
|
|
} |
|
|
|
|
|
|
|
public isItemAlreadySelected(content: ContentDto) { |
|
|
|
return !this.allowDuplicates && this.alreadySelected && !!this.alreadySelected.find(x => x.id === content.id); |
|
|
|
} |
|
|
|
|
|
|
|
public emitComplete() { |
|
|
|
this.select.emit([]); |
|
|
|
} |
|
|
|
|