Skip to content

Commit

Permalink
Rename toggleStep to toggleStepDisabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JeltevanBoheemen committed Dec 10, 2024
1 parent bb3cac5 commit 168ad63
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class UploadSampleComponent implements OnInit, OnDestroy {
}

onSubmit() {
this.corpusDefService.toggleStep(2);
this.corpusDefService.toggleStepDisabled(2);
this.corpusDefService.activateStep(2);
}

Expand Down

0 comments on commit 168ad63

Please sign in to comment.