frontend FEATURE functions to remove the selected schema from the inventory
diff --git a/www/inventory/schemas.component.ts b/www/inventory/schemas.component.ts
index a3114c5..a264dfc 100644
--- a/www/inventory/schemas.component.ts
+++ b/www/inventory/schemas.component.ts
@@ -34,12 +34,14 @@
return;
}
- /* upload the schema file to the server */
+ /* upload the schema file to the server, if success the schema list is refreshed */
this.schemasService.addSchema(schema).subscribe(
- result => this.addingResult = result['success'] ? 1 : 0);
+ result => {this.addingResult = result['success'] ? 1 : 0; this.getSchemas()});
+ }
- /* refresh schemas list */
- this.getSchemas();
+ remove(schema: Schema) {
+ this.schemasService.rmSchema(schema).subscribe(
+ result => {if (result['success']) { this.getSchemas()}});
}
ngOnInit(): void {