Skip to content

Commit

Permalink
feat: change order to emit event bEdit
Browse files Browse the repository at this point in the history
- Change order between change formService.changeData and bEditChange
- Preprocess for types_site seems to be useless (see todo)

Reviewed-by: andriac
[Refs_ticket]: : #5 , #6 , #54
  • Loading branch information
andriacap committed Apr 20, 2023
1 parent 27d05e6 commit 61b42d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/gn_module_monitoring/monitoring/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def preprocess_data(self, data):
data["id_nomenclature_type_site"]=data["types_site"][0]['id_nomenclature_type_site']
#TODO: A enlever une fois qu'on aura enelever le champ "id_nomenclature_type_site" du model et de la bdd


data['types_site'] = type_site_ids
# TODO: voir si nécessaire de faire tout se preprocess. Voici le comportement , si une relation existe déjà alors il le garde en bdd même si coté frontend on ne l'a pas
# data['types_site'] = type_site_ids
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export class MonitoringPropertiesGComponent implements OnInit {
}

onEditClick() {
this.bEditChange.emit(true);
this.selectedObj['id'] = this.selectedObj[this.selectedObj.pk];
this._formService.changeDataSub(
this.selectedObj,
this.objectType.objectType,
this.objectType.endPoint
);
this.bEditChange.emit(true);
}

ngOnChanges(changes: SimpleChanges): void {
Expand Down

0 comments on commit 61b42d6

Please sign in to comment.