mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-08-19 05:03:57 +00:00
remove output from route
This commit is contained in:
@@ -30,25 +30,6 @@
|
||||
<div class="ml-2 text-red-500">{{ formGroup.controls['input'].errors | json }}</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>
|
||||
</form>
|
||||
<div>
|
||||
|
||||
@@ -38,7 +38,6 @@ export class RouteComponent {
|
||||
|
||||
formGroup: FormGroup = new FormGroup({
|
||||
input: new FormControl('', [Validators.required]),
|
||||
output: new FormControl('', [Validators.required]),
|
||||
});
|
||||
|
||||
public schemaService = inject(SchemaService);
|
||||
@@ -47,18 +46,15 @@ export class RouteComponent {
|
||||
ngOnInit(): void {
|
||||
this.formGroup.patchValue({
|
||||
input: this.route()?.input,
|
||||
output: this.route()?.output,
|
||||
});
|
||||
|
||||
this.formGroup.valueChanges.subscribe((value) => {
|
||||
this.route.update((route) => {
|
||||
if (route) {
|
||||
route.input = value.input;
|
||||
route.output = value.output;
|
||||
return {
|
||||
...route,
|
||||
input: route.input,
|
||||
output: route.output,
|
||||
};
|
||||
}
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user