Commit b7b0f412533f454fcbdf6c34a69067acdedab9dc

Authored by Administrator
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 164 private onCellValueChanged($event) {
165 165 if ($event.oldValue !== $event.newValue) {
166 166 let data = JSON.stringify($event.data);
167   - let id = $event.data.busStopId;
  167 + let id = $event.data.serviceObjectId;
168 168 let result = null;
169 169 if (id) {
170 170 this.isLoading = true;
... ... @@ -175,8 +175,8 @@ export class ServiceObjectComponent {
175 175 return ;
176 176 }
177 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 180 this.gridOptions.api.setDatasource(this.setRowData(this.rowData));
181 181 this.gridOptions.api.refreshVirtualPageCache();
182 182 this.isLoading = false;
... ... @@ -191,7 +191,7 @@ export class ServiceObjectComponent {
191 191 return ;
192 192 }
193 193 rows.forEach(element => {
194   - let id = element.data.busStopId;
  194 + let id = element.data.serviceObjectId;
195 195 if (id) {
196 196 this.isLoading = true;
197 197 this.service.delete(id).then(() => this.isLoading = false);
... ... @@ -273,3 +273,4 @@ export class ServiceObjectComponent {
273 273 console.log('onColumnEvent: ' + $event);
274 274 }
275 275 }
  276 +ServiceObject
276 277 \ No newline at end of file
... ...