removed console logs and reinstated thumbnails

This commit is contained in:
lotte
2019-12-03 16:37:58 +01:00
parent 5234a7b015
commit 69d58c0881
7 changed files with 5 additions and 15 deletions

View File

@@ -233,10 +233,8 @@ export abstract class DataService<T extends CacheableObject> {
getSucceededRemoteData(), getSucceededRemoteData(),
getRemoteDataPayload(), getRemoteDataPayload(),
mergeMap((oldVersion: T) => { mergeMap((oldVersion: T) => {
console.log(oldVersion);
const operations = this.comparator.diff(oldVersion, object); const operations = this.comparator.diff(oldVersion, object);
if (isNotEmpty(operations)) { if (isNotEmpty(operations)) {
console.log('operations', operations);
this.objectCache.addPatch(object.self, operations); this.objectCache.addPatch(object.self, operations);
} }
return this.findByHref(object.self); return this.findByHref(object.self);

View File

@@ -357,7 +357,7 @@ export class RelationshipService extends DataService<Relationship> {
); );
update$.pipe( update$.pipe(
filter((relationshipRD: RemoteData<Relationship>) => relationshipRD.state === RemoteDataState.ResponsePending), filter((relationshipRD: RemoteData<Relationship>) => relationshipRD.state === RemoteDataState.RequestPending),
take(1), take(1),
).subscribe(() => { ).subscribe(() => {
this.removeRelationshipItemsFromCache(item1); this.removeRelationshipItemsFromCache(item1);

View File

@@ -11,8 +11,5 @@ import { ItemMetadataRepresentationListElementComponent } from '../../../../shar
/** /**
* The component for displaying an item of the type Person as a metadata field * The component for displaying an item of the type Person as a metadata field
*/ */
export class PersonItemMetadataListElementComponent extends ItemMetadataRepresentationListElementComponent implements OnInit { export class PersonItemMetadataListElementComponent extends ItemMetadataRepresentationListElementComponent {
ngOnInit(): void {
console.log('this.metadataRepresentation', this.metadataRepresentation);
}
} }

View File

@@ -1,6 +1,6 @@
<div class="d-flex"> <div class="d-flex">
<div class="person-thumbnail pr-2"> <div class="person-thumbnail pr-2">
<!-- <ds-thumbnail [thumbnail]="dso.getThumbnail() | async" [defaultImage]="'assets/images/orgunit-placeholder.svg'"></ds-thumbnail>--> <ds-thumbnail [thumbnail]="dso.getThumbnail() | async" [defaultImage]="'assets/images/orgunit-placeholder.svg'"></ds-thumbnail>
</div> </div>
<div class="flex-grow-1"> <div class="flex-grow-1">
<ds-org-unit-input-suggestions [suggestions]="allSuggestions" [(ngModel)]="selectedName" (clickSuggestion)="select($event)" <ds-org-unit-input-suggestions [suggestions]="allSuggestions" [(ngModel)]="selectedName" (clickSuggestion)="select($event)"

View File

@@ -1,6 +1,6 @@
<div class="d-flex"> <div class="d-flex">
<div class="person-thumbnail pr-2"> <div class="person-thumbnail pr-2">
<!-- <ds-thumbnail [thumbnail]="dso.getThumbnail() | async" [defaultImage]="'assets/images/person-placeholder.svg'"></ds-thumbnail>--> <ds-thumbnail [thumbnail]="dso.getThumbnail() | async" [defaultImage]="'assets/images/person-placeholder.svg'"></ds-thumbnail>
</div> </div>
<div class="flex-grow-1"> <div class="flex-grow-1">
<ds-person-input-suggestions [suggestions]="allSuggestions" [(ngModel)]="selectedName" (clickSuggestion)="select($event)" (submitSuggestion)="selectCustom($event)"></ds-person-input-suggestions> <ds-person-input-suggestions [suggestions]="allSuggestions" [(ngModel)]="selectedName" (clickSuggestion)="select($event)" (submitSuggestion)="selectCustom($event)"></ds-person-input-suggestions>

View File

@@ -347,7 +347,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
} }
); );
return observableCombineLatest(reorderables.map((rel: ReorderableRelationship) => { return observableCombineLatest(reorderables.map((rel: ReorderableRelationship) => {
console.log(rel);
if (rel.oldIndex !== rel.newIndex) { if (rel.oldIndex !== rel.newIndex) {
return this.relationshipService.updatePlace(rel); return this.relationshipService.updatePlace(rel);
} else { } else {

View File

@@ -51,7 +51,7 @@ export class ReorderableRelationship extends Reorderable {
templateUrl: './existing-metadata-list-element.component.html', templateUrl: './existing-metadata-list-element.component.html',
styleUrls: ['./existing-metadata-list-element.component.scss'] styleUrls: ['./existing-metadata-list-element.component.scss']
}) })
export class ExistingMetadataListElementComponent implements OnInit, OnChanges, OnDestroy { export class ExistingMetadataListElementComponent implements OnChanges, OnDestroy {
@Input() listId: string; @Input() listId: string;
@Input() submissionItem: Item; @Input() submissionItem: Item;
@Input() reoRel: ReorderableRelationship; @Input() reoRel: ReorderableRelationship;
@@ -71,10 +71,6 @@ export class ExistingMetadataListElementComponent implements OnInit, OnChanges,
) { ) {
} }
ngOnInit(): void {
console.log('reoRel', this.reoRel);
}
ngOnChanges() { ngOnChanges() {
const item$ = this.reoRel.useLeftItem ? const item$ = this.reoRel.useLeftItem ?
this.reoRel.relationship.leftItem : this.reoRel.relationship.rightItem; this.reoRel.relationship.leftItem : this.reoRel.relationship.rightItem;