mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
remove logs, fix lint issues
This commit is contained in:
@@ -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(),
|
||||||
|
@@ -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(
|
||||||
|
@@ -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 },
|
||||||
|
@@ -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>) => {
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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);
|
||||||
|
|
||||||
|
@@ -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)),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user