Extend RAN connection table to handle null fields
[portal/ric-dashboard.git] / webapp-frontend / src / app / anr-xapp / anr-edit-ncr-dialog.component.ts
index 96c1f3d..2c3f2d0 100644 (file)
@@ -25,17 +25,17 @@ import { ErrorDialogService } from '../services/ui/error-dialog.service';
 import { ANRNeighborCellRelation, ANRNeighborCellRelationMod } from '../interfaces/anr-xapp.types';
 
 @Component({
-    selector: 'app-ncr-edit-dialog',
+    selector: 'rd-ncr-edit-dialog',
     templateUrl: './anr-edit-ncr-dialog.component.html',
     styleUrls: ['./anr-edit-ncr-dialog.component.scss']
 })
 
-export class ANREditNCRDialogComponent implements OnInit {
+export class AnrEditNcrDialogComponent implements OnInit {
 
     private ncrDialogForm: FormGroup;
 
     constructor(
-        private dialogRef: MatDialogRef<ANREditNCRDialogComponent>,
+        private dialogRef: MatDialogRef<AnrEditNcrDialogComponent>,
         private dataService: ANRXappService,
         private errorService: ErrorDialogService,
         @Inject(MAT_DIALOG_DATA) private data: ANRNeighborCellRelation) { }
@@ -58,13 +58,16 @@ export class ANREditNCRDialogComponent implements OnInit {
     modifyNcr = (ncrFormValue: ANRNeighborCellRelation) => {
         if (this.ncrDialogForm.valid) {
             const ncrm = {} as ANRNeighborCellRelationMod;
-            // there must be a better way
+            // there must be a better way to build the struct
             ncrm.neighborCellNrcgi = ncrFormValue.neighborCellNrcgi;
             ncrm.neighborCellNrpci = ncrFormValue.neighborCellNrpci;
             ncrm.flagNoHo = ncrFormValue.flagNoHo;
             ncrm.flagNoXn = ncrFormValue.flagNoXn;
             ncrm.flagNoRemove = ncrFormValue.flagNoRemove;
-            this.dataService.modifyNcr(ncrFormValue.servingCellNrcgi, ncrFormValue.neighborCellNrpci, ncrm).subscribe((val: any[]) => { },
+            this.dataService.modifyNcr(ncrFormValue.servingCellNrcgi, ncrFormValue.neighborCellNrpci, ncrm).subscribe(
+                (val: any[]) => {
+                    // Success
+                },
                 (error => {
                     this.errorService.displayError('NCR update failed: ' + error.message);
                 })