Commit b7b0f412533f454fcbdf6c34a69067acdedab9dc
1 parent
c36e5ea5
af
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
src/app/data/service-object/service-object.component.ts
@@ -164,7 +164,7 @@ export class ServiceObjectComponent { | @@ -164,7 +164,7 @@ export class ServiceObjectComponent { | ||
164 | private onCellValueChanged($event) { | 164 | private onCellValueChanged($event) { |
165 | if ($event.oldValue !== $event.newValue) { | 165 | if ($event.oldValue !== $event.newValue) { |
166 | let data = JSON.stringify($event.data); | 166 | let data = JSON.stringify($event.data); |
167 | - let id = $event.data.busStopId; | 167 | + let id = $event.data.serviceObjectId; |
168 | let result = null; | 168 | let result = null; |
169 | if (id) { | 169 | if (id) { |
170 | this.isLoading = true; | 170 | this.isLoading = true; |
@@ -175,8 +175,8 @@ export class ServiceObjectComponent { | @@ -175,8 +175,8 @@ export class ServiceObjectComponent { | ||
175 | return ; | 175 | return ; |
176 | } | 176 | } |
177 | this.isLoading = true; | 177 | this.isLoading = true; |
178 | - result = this.service.create(data).then((busStop) => { | ||
179 | - this.rowData[$event.node.rowIndex] = busStop; | 178 | + result = this.service.create(data).then((serviceObject) => { |
179 | + this.rowData[$event.node.rowIndex] = serviceObject; | ||
180 | this.gridOptions.api.setDatasource(this.setRowData(this.rowData)); | 180 | this.gridOptions.api.setDatasource(this.setRowData(this.rowData)); |
181 | this.gridOptions.api.refreshVirtualPageCache(); | 181 | this.gridOptions.api.refreshVirtualPageCache(); |
182 | this.isLoading = false; | 182 | this.isLoading = false; |
@@ -191,7 +191,7 @@ export class ServiceObjectComponent { | @@ -191,7 +191,7 @@ export class ServiceObjectComponent { | ||
191 | return ; | 191 | return ; |
192 | } | 192 | } |
193 | rows.forEach(element => { | 193 | rows.forEach(element => { |
194 | - let id = element.data.busStopId; | 194 | + let id = element.data.serviceObjectId; |
195 | if (id) { | 195 | if (id) { |
196 | this.isLoading = true; | 196 | this.isLoading = true; |
197 | this.service.delete(id).then(() => this.isLoading = false); | 197 | this.service.delete(id).then(() => this.isLoading = false); |
@@ -273,3 +273,4 @@ export class ServiceObjectComponent { | @@ -273,3 +273,4 @@ export class ServiceObjectComponent { | ||
273 | console.log('onColumnEvent: ' + $event); | 273 | console.log('onColumnEvent: ' + $event); |
274 | } | 274 | } |
275 | } | 275 | } |
276 | +ServiceObject | ||
276 | \ No newline at end of file | 277 | \ No newline at end of file |