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
/
osm-repositories
/
osm-repo-create-update
/
OsmRepoCreateUpdateComponent.ts
diff --git
a/src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts
b/src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts
index
e653e7c
..
16ecadd
100644
(file)
--- a/
src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts
+++ b/
src/app/osm-repositories/osm-repo-create-update/OsmRepoCreateUpdateComponent.ts
@@
-139,7
+139,6
@@
export class OsmRepoCreateUpdateComponent implements OnInit {
if (this.osmrepoForm.invalid) {
return;
}
if (this.osmrepoForm.invalid) {
return;
}
- this.isLoadingResults = true;
const modalData: MODALCLOSERESPONSEDATA = {
message: 'Done'
};
const modalData: MODALCLOSERESPONSEDATA = {
message: 'Done'
};
@@
-160,10
+159,11
@@
export class OsmRepoCreateUpdateComponent implements OnInit {
/** This function used to add the osm repo @public */
public addOsmRepo(apiURLHeader: APIURLHEADER, modalData: MODALCLOSERESPONSEDATA): void {
/** This function used to add the osm repo @public */
public addOsmRepo(apiURLHeader: APIURLHEADER, modalData: MODALCLOSERESPONSEDATA): void {
+ this.isLoadingResults = true;
this.restService.postResource(apiURLHeader, this.osmrepoForm.value).subscribe(() => {
this.restService.postResource(apiURLHeader, this.osmrepoForm.value).subscribe(() => {
+ this.isLoadingResults = false;
this.activeModal.close(modalData);
this.notifierService.notify('success', this.translateService.instant('PAGE.OSMREPO.CREATEDSUCCESSFULLY'));
this.activeModal.close(modalData);
this.notifierService.notify('success', this.translateService.instant('PAGE.OSMREPO.CREATEDSUCCESSFULLY'));
- this.isLoadingResults = false;
}, (error: ERRORDATA) => {
this.isLoadingResults = false;
this.restService.handleError(error, 'post');
}, (error: ERRORDATA) => {
this.isLoadingResults = false;
this.restService.handleError(error, 'post');
@@
-172,10
+172,15
@@
export class OsmRepoCreateUpdateComponent implements OnInit {
/** This function used to Edit the osm repo @public */
public editOsmRepo(apiURLHeader: APIURLHEADER, modalData: MODALCLOSERESPONSEDATA): void {
/** This function used to Edit the osm repo @public */
public editOsmRepo(apiURLHeader: APIURLHEADER, modalData: MODALCLOSERESPONSEDATA): void {
+ if (!this.osmrepoForm.dirty) {
+ this.notifierService.notify('warning', this.translateService.instant('PAGE.TOPOLOGY.DATAEMPTY'));
+ return;
+ }
+ this.isLoadingResults = true;
this.restService.patchResource(apiURLHeader, this.osmrepoForm.value).subscribe(() => {
this.restService.patchResource(apiURLHeader, this.osmrepoForm.value).subscribe(() => {
- this.activeModal.close(modalData);
- this.notifierService.notify('success', this.translateService.instant('PAGE.OSMREPO.UPDATEDSUCCESSFULLY'));
this.isLoadingResults = false;
this.isLoadingResults = false;
+ this.notifierService.notify('success', this.translateService.instant('PAGE.OSMREPO.UPDATEDSUCCESSFULLY'));
+ this.activeModal.close(modalData);
}, (error: ERRORDATA) => {
this.isLoadingResults = false;
this.restService.handleError(error, 'patch');
}, (error: ERRORDATA) => {
this.isLoadingResults = false;
this.restService.handleError(error, 'patch');