From 7c043a1c96d1c8beba46dd090af5a31529cae6fc Mon Sep 17 00:00:00 2001 From: "SANDHYA.JS" Date: Tue, 5 Apr 2022 08:58:00 +0530 Subject: [PATCH] Fix Bug 1975: Map view Issue in VIM account - Map view in VIM account will not show Invalid location when the location is not provided. - Added an error message for quota limit in project section when quota limit is exceeded Change-Id: I175fd2df02d320534e0f02bf3e3dd1882f195546 Signed-off-by: SANDHYA.JS --- .../ProjectCreateUpdateComponent.ts | 6 ++++++ .../vim-account-details/VimAccountDetailsComponent.ts | 10 ++++++---- src/assets/i18n/de.json | 3 ++- src/assets/i18n/en.json | 3 ++- src/assets/i18n/es.json | 3 ++- src/assets/i18n/pt.json | 3 ++- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts b/src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts index 5eb2d5d..bb1207a 100644 --- a/src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts +++ b/src/app/projects/project-create-update/ProjectCreateUpdateComponent.ts @@ -164,6 +164,12 @@ export class ProjectCreateUpdateComponent implements OnInit { message: 'Done' }; this.sharedService.cleanForm(this.projectForm); + for (const data of this.quotaItems) { + if (this.getFormControl(data.value).value > data.maxValue) { + this.notifierService.notify('error', this.translateService.instant('PAGE.PROJECT.QUOTALIMIT')); + break; + } + } if (!this.projectForm.invalid) { if (userType === 'Add') { this.createProject(); diff --git a/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts b/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts index 18dffa0..f580e8a 100644 --- a/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts +++ b/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts @@ -361,10 +361,12 @@ export class VimAccountDetailsComponent implements OnInit { if (this.getLocation !== []) { this.getLocation.filter((loc: GetLocation) => { if (loc.location !== '') { - const getLatLong: string[] = loc.location.split(','); - this.lng = +getLatLong[CONSTANTNUMBER.splitLongitude]; - this.lat = +getLatLong[CONSTANTNUMBER.splitLatitude]; - this.addMarker(getLatLong[0], loc.id, loc.name); + if (loc.location !== ',,') { + const getLatLong: string[] = loc.location.split(','); + this.lng = +getLatLong[CONSTANTNUMBER.splitLongitude]; + this.lat = +getLatLong[CONSTANTNUMBER.splitLatitude]; + this.addMarker(getLatLong[0], loc.id, loc.name); + } } }); } diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index ffa152f..54dfe73 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -333,7 +333,8 @@ "NEWPROJECT": "Nieuw project", "CREATEDSUCCESSFULLY": "Projekt erfolgreich erstellt", "UPDATEDSUCCESSFULLY": "Projekt erfolgreich aktualisiert", - "QUOTA": "Kontingentlimit" + "QUOTA": "Kontingentlimit", + "QUOTALIMIT": "Kontingentlimit überschritten" }, "NSPACKAGE": { "ADDNSPACKAGE": "Verfassen Sie eine neue NS", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 1642dbc..200e1b9 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -333,7 +333,8 @@ "NEWPROJECT": "New Project", "CREATEDSUCCESSFULLY": "Project Created Successfully", "UPDATEDSUCCESSFULLY": "Project Updated Successfully", - "QUOTA": "Quota Limit" + "QUOTA": "Quota Limit", + "QUOTALIMIT": "Quota Limit exceeded" }, "NSPACKAGE": { "ADDNSPACKAGE": "Compose a new NS", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index d826ccb..3f6092c 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -333,7 +333,8 @@ "NEWPROJECT": "Nuevo proyecto", "CREATEDSUCCESSFULLY": "Proyecto creado correctamente", "UPDATEDSUCCESSFULLY": "Proyecto actualizado correctamente", - "QUOTA": "Límite de cuota" + "QUOTA": "Límite de cuota", + "QUOTALIMIT": "Límite de cuota excedido" }, "NSPACKAGE": { "ADDNSPACKAGE": "Componer un nuevo NS", diff --git a/src/assets/i18n/pt.json b/src/assets/i18n/pt.json index bd9d91b..64a5c13 100644 --- a/src/assets/i18n/pt.json +++ b/src/assets/i18n/pt.json @@ -333,7 +333,8 @@ "NEWPROJECT": "Novo projeto", "CREATEDSUCCESSFULLY": "Projeto criado com sucesso", "UPDATEDSUCCESSFULLY": "Projeto atualizado com sucesso", - "QUOTA": "Limite de cota" + "QUOTA": "Limite de cota", + "QUOTALIMIT": "Limite de cota excedido" }, "NSPACKAGE": { "ADDNSPACKAGE": "Componha um novo NS", -- 2.25.1