From d6087e3620a7738e9ae6edb89d725051f28b63da Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Wed, 15 Apr 2020 11:24:24 +0200 Subject: [PATCH] remove logs, fix lint issues --- .../ds-dynamic-form-control-container.component.ts | 8 -------- .../existing-relation-list-element.component.ts | 1 - .../models/array-group/dynamic-form-array.component.ts | 2 -- .../dynamic-lookup-relation-modal.component.ts | 1 - .../listable-object-component-loader.component.ts | 2 +- .../abstract-listable-element.component.ts | 2 +- src/app/submission/objects/submission-objects.effects.ts | 6 +----- src/app/submission/sections/sections.service.ts | 1 - 8 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts index 04caf15455..57b1e46252 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts @@ -246,13 +246,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo this.isRelationship = hasValue(this.model.relationship); const isWrapperAroundRelationshipList = hasValue(this.model.relationshipConfig); - if(this.isRelationship) { - console.log('isRelationship', this.model, this.model.value); - } - if (isWrapperAroundRelationshipList) { - console.log('isWrapperAroundRelationshipList', this.model, this.model.value) - } - if (this.isRelationship || isWrapperAroundRelationshipList) { const config = this.model.relationshipConfig || this.model.relationship; const relationshipOptions = Object.assign(new RelationshipOptions(), config); @@ -303,7 +296,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo getAllSucceededRemoteData(), getRemoteDataPayload()); this.relationshipValue$ = observableCombineLatest([this.item$.pipe(take(1)), relationship$]).pipe( - tap((v) => console.log('tapvamu', v)), switchMap(([item, relationship]: [Item, Relationship]) => relationship.leftItem.pipe( getAllSucceededRemoteData(), diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts index cd0e6e3420..af2a253ee1 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts @@ -137,7 +137,6 @@ export class ExistingRelationListElementComponent implements OnInit, OnChanges, */ ngOnChanges() { if (hasValue(this.reoRel)) { - console.log('onChanges', this.reoRel.useLeftItem ? this.reoRel.relationship._links.leftItem.href : this.reoRel.relationship._links.rightItem.href); const item$ = this.reoRel.useLeftItem ? this.reoRel.relationship.leftItem : this.reoRel.relationship.rightItem; this.subs.push(item$.pipe( diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts index 2243264158..149082bce5 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts @@ -183,7 +183,6 @@ export class DsDynamicFormArrayComponent extends DynamicFormArrayComponent imple let hasMetadataField = false; this.reorderables.forEach((reorderable: Reorderable, index: number) => { if (reorderable.hasMoved) { - console.log('reorderable moved', reorderable); const prevIndex = reorderable.oldIndex; const updatedReorderable = reorderable.update().pipe(take(1)); updatedReorderables.push(updatedReorderable); @@ -192,7 +191,6 @@ export class DsDynamicFormArrayComponent extends DynamicFormArrayComponent imple updatedReorderable.subscribe((v) => { const reoMD = reorderable as ReorderableFormFieldMetadataValue; reoMD.model.value = reoMD.metadataValue; - console.log('reoMD', reoMD); this.onChange({ $event: { previousIndex: prevIndex }, context: { index }, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts index bb2f766fb3..fa21810ed9 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts @@ -146,7 +146,6 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy * @param selectableObjects */ select(...selectableObjects: Array>) { - console.log('selectableObjects', selectableObjects); this.zone.runOutsideAngular( () => { const obs: Observable = combineLatest(...selectableObjects.map((sri: SearchResult) => { diff --git a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts index 5eecd025b8..255f66ac86 100644 --- a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts +++ b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts @@ -49,7 +49,7 @@ export class ListableObjectComponentLoaderComponent implements OnInit { /** * Whether to show the badge label or not */ - @Input() showLabel: boolean = true; + @Input() showLabel = true; /** * Directive hook used to place the dynamic child component diff --git a/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts b/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts index 6eefeec47d..402984731c 100644 --- a/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts +++ b/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts @@ -32,7 +32,7 @@ export class AbstractListableElementComponent { /** * Whether to show the badge label or not */ - @Input() showLabel: boolean = true; + @Input() showLabel = true; /** * The context we matched on to get this component diff --git a/src/app/submission/objects/submission-objects.effects.ts b/src/app/submission/objects/submission-objects.effects.ts index ade62edb79..f7bccd9a96 100644 --- a/src/app/submission/objects/submission-objects.effects.ts +++ b/src/app/submission/objects/submission-objects.effects.ts @@ -73,7 +73,7 @@ export class SubmissionObjectEffects { const config = sectionDefinition._links.config ? (sectionDefinition._links.config.href || sectionDefinition._links.config) : ''; const enabled = (sectionDefinition.mandatory) || (isNotEmpty(action.payload.sections) && action.payload.sections.hasOwnProperty(sectionId)); let sectionData; - if (sectionDefinition.sectionType != SectionsType.SubmissionForm) { + if (sectionDefinition.sectionType !== SectionsType.SubmissionForm) { sectionData = (isNotUndefined(action.payload.sections) && isNotUndefined(action.payload.sections[sectionId])) ? action.payload.sections[sectionId] : Object.create(null); } else { sectionData = action.payload.item.metadata; @@ -251,10 +251,6 @@ export class SubmissionObjectEffects { @Effect() addAllMetadataToSectionData = this.actions$.pipe( ofType(SubmissionObjectActionTypes.UPLOAD_SECTION_DATA), - tap((v) => { - if ((v as any).payload.sectionId === 'orgUnitStep') - console.log('EFFECT', 'in', v) - }), mergeMap((action: UpdateSectionDataAction) => { const sectionKeys = Object.keys(action.payload.data); diff --git a/src/app/submission/sections/sections.service.ts b/src/app/submission/sections/sections.service.ts index 3b980c5454..d2571a402d 100644 --- a/src/app/submission/sections/sections.service.ts +++ b/src/app/submission/sections/sections.service.ts @@ -176,7 +176,6 @@ export class SectionsService { filter((sectionObj: SubmissionSectionObject) => hasValue(sectionObj)), map((sectionObj: SubmissionSectionObject) => sectionObj), distinctUntilChanged(), - tap((v) => console.log('sectionStateChange', submissionId, sectionId, v)), ); }