projects
/
osm
/
NG-UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Bug 2294: Incorrect notification in update descriptor
[osm/NG-UI.git]
/
src
/
app
/
projects
/
project-create-update
/
ProjectCreateUpdateComponent.ts
diff --git
a/src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts
b/src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts
index
9f8cc83
..
af6388d
100644
(file)
--- a/
src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts
+++ b/
src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts
@@
-213,6
+213,10
@@
export class ProjectCreateUpdateComponent implements OnInit {
}
/** Edit project @public */
public editProject(): void {
}
/** Edit project @public */
public editProject(): void {
+ if (!this.projectForm.dirty) {
+ this.notifierService.notify('warning', this.translateService.instant('PAGE.TOPOLOGY.DATAEMPTY'));
+ return;
+ }
this.isLoadingResults = true;
const apiURLHeader: APIURLHEADER = {
url: environment.PROJECTS_URL + '/' + this.projectRef
this.isLoadingResults = true;
const apiURLHeader: APIURLHEADER = {
url: environment.PROJECTS_URL + '/' + this.projectRef
@@
-226,6
+230,7
@@
export class ProjectCreateUpdateComponent implements OnInit {
this.isLoadingResults = false;
this.projectService.setHeaderProjects();
this.notifierService.notify('success', this.translateService.instant('PAGE.PROJECT.UPDATEDSUCCESSFULLY'));
this.isLoadingResults = false;
this.projectService.setHeaderProjects();
this.notifierService.notify('success', this.translateService.instant('PAGE.PROJECT.UPDATEDSUCCESSFULLY'));
+ this.activeModal.close(this.modalData);
}, (error: ERRORDATA): void => {
this.restService.handleError(error, 'patch');
this.isLoadingResults = false;
}, (error: ERRORDATA): void => {
this.restService.handleError(error, 'patch');
this.isLoadingResults = false;