material and activeModelIndex fix

This commit is contained in:
VLE2FE
2020-08-31 16:14:47 +02:00
parent 08d5ac8366
commit 250b04e096
19 changed files with 515 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import {ModelItemModel} from '../models/model-item.model';
import {ApiService} from '../services/api.service';
import {AutocompleteService} from '../services/autocomplete.service';
import {ModalService} from '@inst-iot/bosch-angular-ui-components';
import omit from 'lodash/omit';
@Component({
selector: 'app-model-templates',
@ -44,7 +45,7 @@ export class ModelTemplatesComponent implements OnInit {
if (this.oldModelGroup !== '' && this.modelGroup !== this.oldModelGroup) { // group was changed, delete model in old group
this.delete(null, this.oldModelGroup, this.oldModelName);
}
this.api.post('/model/' + this.modelGroup, this.model, () => {
this.api.post('/model/' + this.modelGroup, omit(this.model, '_id'), () => {
this.newModel = false;
this.loadGroups();
this.modelGroup = '';