[Admin | Trunk]: Community edit form: Remove show show loading if form is invalid

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@59229 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-08-06 13:24:02 +00:00
parent 5731b3c952
commit d6488bbfb7
1 changed files with 2 additions and 3 deletions

View File

@ -154,13 +154,12 @@ export class CommunityEditFormComponent implements OnInit{
{ 'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url} });
} else {
if (this.communityId != null && this.communityId !== '') {
this.showLoading = true;
const community = this.parseUpdatedCommunity();
if (!Validator.hasValidEmails(community['managers']) || !this.hasFilled(community['name'])) {
this._router.navigate(['/community-edit-form'], {
queryParams: { 'communityId': this.communityId}});
return;
} else {
this.showLoading = true;
const newManagers = this.getNewManagers();
this._communityService.updateCommunity(
this.properties.communityAPI + this.communityId, community).subscribe(