mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
Fixed lint errors and add lint fix script
This commit is contained in:
@@ -234,7 +234,7 @@ export class SubmissionSectionCcLicensesComponent extends SectionModelComponent
|
||||
this.subscriptions.push(
|
||||
this.sectionService.getSectionState(this.submissionId, this.sectionData.id, SectionsType.CcLicense).pipe(
|
||||
filter((sectionState) => {
|
||||
return isNotEmpty(sectionState) && (isNotEmpty(sectionState.data) || isNotEmpty(sectionState.errors))
|
||||
return isNotEmpty(sectionState) && (isNotEmpty(sectionState.data) || isNotEmpty(sectionState.errors));
|
||||
}),
|
||||
distinctUntilChanged(),
|
||||
map((sectionState) => sectionState.data as WorkspaceitemSectionCcLicenseObject),
|
||||
|
@@ -186,7 +186,7 @@ export class SectionFormOperationsService {
|
||||
metadataValueMap.set(groupModel.qualdropId, metadataValueList);
|
||||
}
|
||||
if (index === fieldIndex) {
|
||||
path = groupModel.qualdropId + '/' + (metadataValueList.length - 1)
|
||||
path = groupModel.qualdropId + '/' + (metadataValueList.length - 1);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -381,7 +381,7 @@ export class SectionFormOperationsService {
|
||||
this.operationsBuilder.move(
|
||||
moveTo,
|
||||
moveFrom.path
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
} else if (!value.hasValue()) {
|
||||
|
@@ -172,7 +172,7 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
|
||||
filter(([existsInOC, existsInRC]) => !existsInOC && !existsInRC),
|
||||
take(1),
|
||||
switchMap(() => this.submissionObjectService.findById(this.submissionId, followLink('item')).pipe(getSucceededRemoteData(), getRemoteDataPayload()) as Observable<SubmissionObject>)
|
||||
)
|
||||
);
|
||||
})
|
||||
)]
|
||||
)),
|
||||
@@ -188,7 +188,7 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
|
||||
this.isLoading = false;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -320,14 +320,14 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
|
||||
*/
|
||||
this.sectionService.getSectionState(this.submissionId, this.sectionData.id, this.sectionData.sectionType).pipe(
|
||||
filter((sectionState: SubmissionSectionObject) => {
|
||||
return isNotEmpty(sectionState) && (isNotEmpty(sectionState.data) || isNotEmpty(sectionState.errors))
|
||||
return isNotEmpty(sectionState) && (isNotEmpty(sectionState.data) || isNotEmpty(sectionState.errors));
|
||||
}),
|
||||
distinctUntilChanged())
|
||||
.subscribe((sectionState: SubmissionSectionObject) => {
|
||||
this.fieldsOnTheirWayToBeRemoved = new Map();
|
||||
this.updateForm(sectionState.data as WorkspaceitemSectionFormObject, sectionState.errors);
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -8,7 +8,7 @@ import { SectionsService } from '../sections.service';
|
||||
import { hasValue, isNotUndefined } from '../../../shared/empty.util';
|
||||
|
||||
export interface SectionDataModel {
|
||||
sectionData: SectionDataObject
|
||||
sectionData: SectionDataObject;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -227,7 +227,7 @@ export class SectionsDirective implements OnDestroy, OnInit {
|
||||
* Emits true whenever section is valid
|
||||
*/
|
||||
public removeSection(submissionId: string, sectionId: string) {
|
||||
this.sectionService.removeSection(submissionId, sectionId)
|
||||
this.sectionService.removeSection(submissionId, sectionId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,7 +237,7 @@ export class SectionsDirective implements OnDestroy, OnInit {
|
||||
* Returns true when section has only generic errors
|
||||
*/
|
||||
public hasGenericErrors(): boolean {
|
||||
return this.genericSectionErrors && this.genericSectionErrors.length > 0
|
||||
return this.genericSectionErrors && this.genericSectionErrors.length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,7 +248,7 @@ export class SectionsDirective implements OnDestroy, OnInit {
|
||||
*/
|
||||
public hasErrors(): boolean {
|
||||
return (this.genericSectionErrors && this.genericSectionErrors.length > 0) ||
|
||||
(this.allSectionErrors && this.allSectionErrors.length > 0)
|
||||
(this.allSectionErrors && this.allSectionErrors.length > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -149,7 +149,7 @@ export class SectionsService {
|
||||
return this.store.select(submissionSectionDataFromIdSelector(submissionId, sectionId)).pipe(
|
||||
map((sectionData: WorkspaceitemSectionDataType) => {
|
||||
if (sectionType === SectionsType.SubmissionForm) {
|
||||
return normalizeSectionData(sectionData)
|
||||
return normalizeSectionData(sectionData);
|
||||
} else {
|
||||
return sectionData;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ export class SectionsService {
|
||||
if (hasValue(sectionState.data) && sectionType === SectionsType.SubmissionForm) {
|
||||
return Object.assign({}, sectionState, {
|
||||
data: normalizeSectionData(sectionState.data)
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return sectionState;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ export class SectionsService {
|
||||
map((sectionObj: SubmissionSectionObject) => {
|
||||
return isNotEmpty(sectionObj.visibility)
|
||||
&& sectionObj.visibility.other === 'READONLY'
|
||||
&& submissionScope !== SubmissionScopeType.WorkspaceItem
|
||||
&& submissionScope !== SubmissionScopeType.WorkspaceItem;
|
||||
}),
|
||||
distinctUntilChanged());
|
||||
}
|
||||
@@ -321,7 +321,7 @@ export class SectionsService {
|
||||
* The section id
|
||||
*/
|
||||
public removeSection(submissionId: string, sectionId: string) {
|
||||
this.store.dispatch(new DisableSectionAction(submissionId, sectionId))
|
||||
this.store.dispatch(new DisableSectionAction(submissionId, sectionId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -49,10 +49,10 @@ export class SubmissionSectionUploadAccessConditionsComponent implements OnInit
|
||||
const accessConditionEntry = Object.assign({}, accessCondition);
|
||||
accessConditionEntry.name = group.name;
|
||||
this.accessConditionsList.push(accessConditionEntry);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.accessConditionsList.push(accessCondition);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -254,7 +254,7 @@ export class SubmissionSectionUploadFileEditComponent implements OnChanges {
|
||||
metadataModel.options.push({
|
||||
label: group.name,
|
||||
value: group.uuid
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
if (metadataModel.type === DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER) {
|
||||
@@ -263,7 +263,7 @@ export class SubmissionSectionUploadFileEditComponent implements OnChanges {
|
||||
year: date.getFullYear(),
|
||||
month: date.getMonth() + 1,
|
||||
day: date.getDate()
|
||||
}
|
||||
};
|
||||
} else {
|
||||
metadataModel.value = accessCondition[key];
|
||||
}
|
||||
@@ -332,7 +332,7 @@ export class SubmissionSectionUploadFileEditComponent implements OnChanges {
|
||||
groupOptions.push({
|
||||
label: group.name,
|
||||
value: group.uuid
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
// Due to a bug can't dynamically change the select options, so replace the model with a new one
|
||||
|
@@ -306,7 +306,7 @@ export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit {
|
||||
this.submissionService.getSubmissionObjectLinkName(),
|
||||
this.submissionId,
|
||||
this.pathCombiner.rootElement,
|
||||
this.pathCombiner.subRootElement)
|
||||
this.pathCombiner.subRootElement);
|
||||
})
|
||||
).subscribe((result: SubmissionObject[]) => {
|
||||
if (result[0].sections.upload) {
|
||||
|
@@ -30,7 +30,7 @@ export const POLICY_DEFAULT_WITH_LIST = 2; // Banner2
|
||||
|
||||
export interface AccessConditionGroupsMapEntry {
|
||||
accessCondition: string;
|
||||
groups: Group[]
|
||||
groups: Group[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,7 +186,7 @@ export class SubmissionSectionUploadComponent extends SectionModelComponent {
|
||||
: POLICY_DEFAULT_NO_LIST;
|
||||
|
||||
this.availableGroups = new Map();
|
||||
const mapGroups$: Array<Observable<AccessConditionGroupsMapEntry>> = [];
|
||||
const mapGroups$: Observable<AccessConditionGroupsMapEntry>[] = [];
|
||||
// Retrieve Groups for accessCondition Policies
|
||||
this.availableAccessConditionOptions.forEach((accessCondition: AccessConditionOption) => {
|
||||
if (accessCondition.hasEndDate === true || accessCondition.hasStartDate === true) {
|
||||
@@ -231,7 +231,7 @@ export class SubmissionSectionUploadComponent extends SectionModelComponent {
|
||||
observableCombineLatest(this.configMetadataForm$,
|
||||
this.bitstreamService.getUploadedFileList(this.submissionId, this.sectionData.id)).pipe(
|
||||
filter(([configMetadataForm, fileList]: [SubmissionFormsModel, any[]]) => {
|
||||
return isNotEmpty(configMetadataForm) && isNotUndefined(fileList)
|
||||
return isNotEmpty(configMetadataForm) && isNotUndefined(fileList);
|
||||
}),
|
||||
distinctUntilChanged())
|
||||
.subscribe(([configMetadataForm, fileList]: [SubmissionFormsModel, any[]]) => {
|
||||
|
Reference in New Issue
Block a user