diff --git a/frontend/src/app/corpus-definitions/corpus-definition.service.ts b/frontend/src/app/corpus-definitions/corpus-definition.service.ts index b7af0d293..08c7e8760 100644 --- a/frontend/src/app/corpus-definitions/corpus-definition.service.ts +++ b/frontend/src/app/corpus-definitions/corpus-definition.service.ts @@ -39,10 +39,10 @@ export class CorpusDefinitionService implements OnDestroy { this.destroy$.complete(); } - public toggleStep(stepIndex: number) { - const newValue = this.steps$.value; + public toggleStepDisabled(stepIndex: number) { + const newValue = _.cloneDeep(this.steps$.value); newValue[stepIndex].disabled = !newValue[stepIndex].disabled; - this.steps$.next(_.cloneDeep(newValue)); + this.steps$.next(newValue); } public activateStep(index: number) { diff --git a/frontend/src/app/corpus-definitions/form/meta-form/meta-form.component.ts b/frontend/src/app/corpus-definitions/form/meta-form/meta-form.component.ts index 55ad23075..e78b81493 100644 --- a/frontend/src/app/corpus-definitions/form/meta-form/meta-form.component.ts +++ b/frontend/src/app/corpus-definitions/form/meta-form/meta-form.component.ts @@ -70,7 +70,7 @@ export class MetaFormComponent implements OnChanges, OnDestroy { newMeta as CorpusDefinition['definition']['meta']; this.corpus.save().subscribe({ next: () => { - this.corpusDefService.toggleStep(1); + this.corpusDefService.toggleStepDisabled(1); this.corpusDefService.activateStep(1); }, error: console.error, diff --git a/frontend/src/app/corpus-definitions/form/upload-sample/upload-sample.component.ts b/frontend/src/app/corpus-definitions/form/upload-sample/upload-sample.component.ts index 9ff1bcce4..04467dae0 100644 --- a/frontend/src/app/corpus-definitions/form/upload-sample/upload-sample.component.ts +++ b/frontend/src/app/corpus-definitions/form/upload-sample/upload-sample.component.ts @@ -104,7 +104,7 @@ export class UploadSampleComponent implements OnInit, OnDestroy { } onSubmit() { - this.corpusDefService.toggleStep(2); + this.corpusDefService.toggleStepDisabled(2); this.corpusDefService.activateStep(2); }