ESLint: fix no-case-declaration violations

This commit is contained in:
Yury Bondarenko
2023-05-08 16:51:45 +02:00
parent f1a8920d86
commit 0f1ebfba62
3 changed files with 7 additions and 6 deletions

View File

@@ -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
)); ));
}
} }
} }
} }

View File

@@ -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;

View File

@@ -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);
} }