mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
ESLint: fix no-case-declaration violations
This commit is contained in:
@@ -57,7 +57,7 @@ export class SubmissionObjectDataService {
|
|||||||
return this.workspaceitemDataService.findById(id, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
return this.workspaceitemDataService.findById(id, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||||
case SubmissionScopeType.WorkflowItem:
|
case SubmissionScopeType.WorkflowItem:
|
||||||
return this.workflowItemDataService.findById(id, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
return this.workflowItemDataService.findById(id, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||||
default:
|
default: {
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
return observableOf(new RemoteData(
|
return observableOf(new RemoteData(
|
||||||
now,
|
now,
|
||||||
@@ -68,6 +68,7 @@ export class SubmissionObjectDataService {
|
|||||||
undefined,
|
undefined,
|
||||||
400
|
400
|
||||||
));
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -133,9 +133,7 @@ export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<
|
|||||||
return (model instanceof DynamicListCheckboxGroupModel) ? DsDynamicListComponent : DynamicNGBootstrapCheckboxGroupComponent;
|
return (model instanceof DynamicListCheckboxGroupModel) ? DsDynamicListComponent : DynamicNGBootstrapCheckboxGroupComponent;
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER:
|
case DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER:
|
||||||
const datepickerModel = model as DynamicDatePickerModel;
|
return (model as DynamicDatePickerModel).inline ? DynamicNGBootstrapCalendarComponent : DsDatePickerInlineComponent;
|
||||||
|
|
||||||
return datepickerModel.inline ? DynamicNGBootstrapCalendarComponent : DsDatePickerInlineComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_GROUP:
|
case DYNAMIC_FORM_CONTROL_TYPE_GROUP:
|
||||||
return DsDynamicFormGroupComponent;
|
return DsDynamicFormGroupComponent;
|
||||||
|
@@ -51,10 +51,11 @@ export class AuthRequestServiceStub {
|
|||||||
public getRequest(method: string, options?: HttpOptions): Observable<any> {
|
public getRequest(method: string, options?: HttpOptions): Observable<any> {
|
||||||
const authStatusStub: AuthStatus = new AuthStatus();
|
const authStatusStub: AuthStatus = new AuthStatus();
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case 'logout':
|
case 'logout': {
|
||||||
authStatusStub.authenticated = false;
|
authStatusStub.authenticated = false;
|
||||||
break;
|
break;
|
||||||
case 'status':
|
}
|
||||||
|
case 'status': {
|
||||||
const token = ((options.headers as any).lazyUpdate[1]) ? (options.headers as any).lazyUpdate[1].value : null;
|
const token = ((options.headers as any).lazyUpdate[1]) ? (options.headers as any).lazyUpdate[1].value : null;
|
||||||
if (this.validateToken(token)) {
|
if (this.validateToken(token)) {
|
||||||
authStatusStub.authenticated = true;
|
authStatusStub.authenticated = true;
|
||||||
@@ -74,6 +75,7 @@ export class AuthRequestServiceStub {
|
|||||||
authStatusStub.authenticated = false;
|
authStatusStub.authenticated = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return createSuccessfulRemoteDataObject$(authStatusStub);
|
return createSuccessfulRemoteDataObject$(authStatusStub);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user