Skip to content

Commit

Permalink
Merge pull request #401 from PnX-SI/fix/echainer_saisie
Browse files Browse the repository at this point in the history
Fix/enchainer saisie
  • Loading branch information
amandine-sahl authored Jan 13, 2025
2 parents 30abdcd + 758b2b4 commit 1ae7734
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
8 changes: 8 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## 1.0.1 (unrelease)


**🐛 Corrections**

- Correction de dysfonctionnement de l'enchainement des saisies (#396, #401)


## 1.0.0 (2024-12-13)

Nécessite GeoNature 2.15.0 (ou plus)
Expand Down
9 changes: 1 addition & 8 deletions frontend/app/components/draw-form/draw-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,7 @@ export class DrawFormComponent implements OnInit {
}

initDrawConfig() {
this.leafletDrawOptions.draw = {
polyline: false,
circle: false,
circlemarker: false,
rectangle: false,
marker: false,
polygon: false,
};
this.leafletDrawOptions = leafletDrawOptions;
}

setGeojson(geometry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ export class MonitoringFormComponent implements OnInit {
) {}

ngOnInit() {
// Initialisation de la variable bChainInput à false
this._configService.setFrontendParams('bChainInput', this.bChainInput);

// Initialisation des variables
this.initializeVariables(this.obj);

Expand Down Expand Up @@ -355,6 +358,7 @@ export class MonitoringFormComponent implements OnInit {
this.obj.monitoringObjectService()
);
this.obj.init({});
this.obj = this.setQueryParams(this.obj);

this.obj.properties[this.obj.configParam('id_field_Name')] = null;

Expand All @@ -365,7 +369,7 @@ export class MonitoringFormComponent implements OnInit {
this.obj.properties[key] = keep[key];
}

this.objChanged.emit(this.obj);
// this.objChanged.emit(this.obj);
this.objForm.patchValue({ geometry: null });
this.initForm();
// });
Expand Down Expand Up @@ -447,7 +451,7 @@ export class MonitoringFormComponent implements OnInit {
action.subscribe((objData) => {
this._commonService.regularToaster('success', this.msgToaster(actionLabel));
this.bSaveSpinner = this.bSaveAndAddChildrenSpinner = false;
this.objChanged.emit(this.obj);
// this.objChanged.emit(this.obj);

/** si c'est un module : reset de la config */
if (this.obj.objectType === 'module') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ export class MonitoringMapComponent implements OnInit {
this._geojsonService.removeAllLayers();
let displayObject;
// Choix des objets a afficher
if (this.bEdit && !this.obj.id) {
// Si création d'un nouvel objet on n'affiche rien
displayObject = undefined;
} else if (this.bEdit && this.obj.id) {
if (this.bEdit && this.obj.id) {
// Si modification affichage de l'objet en cours
displayObject = this.obj.objectType;
} else if (this.obj.objectType == 'module') {
Expand Down

0 comments on commit 1ae7734

Please sign in to comment.