remove output from route

This commit is contained in:
Joel Wetzell
2026-03-05 07:37:46 -06:00
parent 23cf7c945f
commit 76ee05c4c1
2 changed files with 0 additions and 23 deletions
-19
View File
@@ -30,25 +30,6 @@
<div class="ml-2 text-red-500">{{ formGroup.controls['input'].errors | json }}</div> <div class="ml-2 text-red-500">{{ formGroup.controls['input'].errors | json }}</div>
} }
</div> </div>
<div class="flex items-center m-1">
<label class="mr-2 text-gray-300"> output: </label>
<select
class="pl-1 border-2 border-gray-200 text-gray-200 border-solid rounded-sm w-full"
formControlName="output"
>
@for (option of moduleIds(); track option) {
<option [value]="option">
{{ option }}
</option>
}
</select>
@if (!formGroup.controls['output'].valid) {
<!-- TODO(jwetzell): better error displaying -->
<div class="ml-2 text-red-500">
{{ formGroup.controls['output'].errors | json }}
</div>
}
</div>
</div> </div>
</form> </form>
<div> <div>
-4
View File
@@ -38,7 +38,6 @@ export class RouteComponent {
formGroup: FormGroup = new FormGroup({ formGroup: FormGroup = new FormGroup({
input: new FormControl('', [Validators.required]), input: new FormControl('', [Validators.required]),
output: new FormControl('', [Validators.required]),
}); });
public schemaService = inject(SchemaService); public schemaService = inject(SchemaService);
@@ -47,18 +46,15 @@ export class RouteComponent {
ngOnInit(): void { ngOnInit(): void {
this.formGroup.patchValue({ this.formGroup.patchValue({
input: this.route()?.input, input: this.route()?.input,
output: this.route()?.output,
}); });
this.formGroup.valueChanges.subscribe((value) => { this.formGroup.valueChanges.subscribe((value) => {
this.route.update((route) => { this.route.update((route) => {
if (route) { if (route) {
route.input = value.input; route.input = value.input;
route.output = value.output;
return { return {
...route, ...route,
input: route.input, input: route.input,
output: route.output,
}; };
} }
return undefined; return undefined;