remove logs, fix lint issues

This commit is contained in:
Art Lowel
2020-04-15 11:24:24 +02:00
parent 66a996bb0f
commit d6087e3620
8 changed files with 3 additions and 20 deletions

View File

@@ -246,13 +246,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
this.isRelationship = hasValue(this.model.relationship); this.isRelationship = hasValue(this.model.relationship);
const isWrapperAroundRelationshipList = hasValue(this.model.relationshipConfig); 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) { if (this.isRelationship || isWrapperAroundRelationshipList) {
const config = this.model.relationshipConfig || this.model.relationship; const config = this.model.relationshipConfig || this.model.relationship;
const relationshipOptions = Object.assign(new RelationshipOptions(), config); const relationshipOptions = Object.assign(new RelationshipOptions(), config);
@@ -303,7 +296,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
getAllSucceededRemoteData(), getAllSucceededRemoteData(),
getRemoteDataPayload()); getRemoteDataPayload());
this.relationshipValue$ = observableCombineLatest([this.item$.pipe(take(1)), relationship$]).pipe( this.relationshipValue$ = observableCombineLatest([this.item$.pipe(take(1)), relationship$]).pipe(
tap((v) => console.log('tapvamu', v)),
switchMap(([item, relationship]: [Item, Relationship]) => switchMap(([item, relationship]: [Item, Relationship]) =>
relationship.leftItem.pipe( relationship.leftItem.pipe(
getAllSucceededRemoteData(), getAllSucceededRemoteData(),

View File

@@ -137,7 +137,6 @@ export class ExistingRelationListElementComponent implements OnInit, OnChanges,
*/ */
ngOnChanges() { ngOnChanges() {
if (hasValue(this.reoRel)) { 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 ? const item$ = this.reoRel.useLeftItem ?
this.reoRel.relationship.leftItem : this.reoRel.relationship.rightItem; this.reoRel.relationship.leftItem : this.reoRel.relationship.rightItem;
this.subs.push(item$.pipe( this.subs.push(item$.pipe(

View File

@@ -183,7 +183,6 @@ export class DsDynamicFormArrayComponent extends DynamicFormArrayComponent imple
let hasMetadataField = false; let hasMetadataField = false;
this.reorderables.forEach((reorderable: Reorderable, index: number) => { this.reorderables.forEach((reorderable: Reorderable, index: number) => {
if (reorderable.hasMoved) { if (reorderable.hasMoved) {
console.log('reorderable moved', reorderable);
const prevIndex = reorderable.oldIndex; const prevIndex = reorderable.oldIndex;
const updatedReorderable = reorderable.update().pipe(take(1)); const updatedReorderable = reorderable.update().pipe(take(1));
updatedReorderables.push(updatedReorderable); updatedReorderables.push(updatedReorderable);
@@ -192,7 +191,6 @@ export class DsDynamicFormArrayComponent extends DynamicFormArrayComponent imple
updatedReorderable.subscribe((v) => { updatedReorderable.subscribe((v) => {
const reoMD = reorderable as ReorderableFormFieldMetadataValue; const reoMD = reorderable as ReorderableFormFieldMetadataValue;
reoMD.model.value = reoMD.metadataValue; reoMD.model.value = reoMD.metadataValue;
console.log('reoMD', reoMD);
this.onChange({ this.onChange({
$event: { previousIndex: prevIndex }, $event: { previousIndex: prevIndex },
context: { index }, context: { index },

View File

@@ -146,7 +146,6 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
* @param selectableObjects * @param selectableObjects
*/ */
select(...selectableObjects: Array<SearchResult<Item>>) { select(...selectableObjects: Array<SearchResult<Item>>) {
console.log('selectableObjects', selectableObjects);
this.zone.runOutsideAngular( this.zone.runOutsideAngular(
() => { () => {
const obs: Observable<any[]> = combineLatest(...selectableObjects.map((sri: SearchResult<Item>) => { const obs: Observable<any[]> = combineLatest(...selectableObjects.map((sri: SearchResult<Item>) => {

View File

@@ -49,7 +49,7 @@ export class ListableObjectComponentLoaderComponent implements OnInit {
/** /**
* Whether to show the badge label or not * Whether to show the badge label or not
*/ */
@Input() showLabel: boolean = true; @Input() showLabel = true;
/** /**
* Directive hook used to place the dynamic child component * Directive hook used to place the dynamic child component

View File

@@ -32,7 +32,7 @@ export class AbstractListableElementComponent<T extends ListableObject> {
/** /**
* Whether to show the badge label or not * Whether to show the badge label or not
*/ */
@Input() showLabel: boolean = true; @Input() showLabel = true;
/** /**
* The context we matched on to get this component * The context we matched on to get this component

View File

@@ -73,7 +73,7 @@ export class SubmissionObjectEffects {
const config = sectionDefinition._links.config ? (sectionDefinition._links.config.href || sectionDefinition._links.config) : ''; 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)); const enabled = (sectionDefinition.mandatory) || (isNotEmpty(action.payload.sections) && action.payload.sections.hasOwnProperty(sectionId));
let sectionData; 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); sectionData = (isNotUndefined(action.payload.sections) && isNotUndefined(action.payload.sections[sectionId])) ? action.payload.sections[sectionId] : Object.create(null);
} else { } else {
sectionData = action.payload.item.metadata; sectionData = action.payload.item.metadata;
@@ -251,10 +251,6 @@ export class SubmissionObjectEffects {
@Effect() addAllMetadataToSectionData = this.actions$.pipe( @Effect() addAllMetadataToSectionData = this.actions$.pipe(
ofType(SubmissionObjectActionTypes.UPLOAD_SECTION_DATA), ofType(SubmissionObjectActionTypes.UPLOAD_SECTION_DATA),
tap((v) => {
if ((v as any).payload.sectionId === 'orgUnitStep')
console.log('EFFECT', 'in', v)
}),
mergeMap((action: UpdateSectionDataAction) => { mergeMap((action: UpdateSectionDataAction) => {
const sectionKeys = Object.keys(action.payload.data); const sectionKeys = Object.keys(action.payload.data);

View File

@@ -176,7 +176,6 @@ export class SectionsService {
filter((sectionObj: SubmissionSectionObject) => hasValue(sectionObj)), filter((sectionObj: SubmissionSectionObject) => hasValue(sectionObj)),
map((sectionObj: SubmissionSectionObject) => sectionObj), map((sectionObj: SubmissionSectionObject) => sectionObj),
distinctUntilChanged(), distinctUntilChanged(),
tap((v) => console.log('sectionStateChange', submissionId, sectionId, v)),
); );
} }