diff --git a/src/app/modules/corporate-contributor/component/add-company-modal/add-company-modal.component.html b/src/app/modules/corporate-contributor/component/add-company-modal/add-company-modal.component.html index 2ea13ac0..d96c028c 100644 --- a/src/app/modules/corporate-contributor/component/add-company-modal/add-company-modal.component.html +++ b/src/app/modules/corporate-contributor/component/add-company-modal/add-company-modal.component.html @@ -14,7 +14,7 @@ Organization name is required
- Organization name should be atleast 2 characters + Organization name should be at least 2 characters
Organization name should not exceed 60 characters diff --git a/src/app/modules/corporate-contributor/component/identify-cla-manager-modal/identify-cla-manager-modal.component.ts b/src/app/modules/corporate-contributor/component/identify-cla-manager-modal/identify-cla-manager-modal.component.ts index 5710e5bf..dcc6e8d9 100644 --- a/src/app/modules/corporate-contributor/component/identify-cla-manager-modal/identify-cla-manager-modal.component.ts +++ b/src/app/modules/corporate-contributor/component/identify-cla-manager-modal/identify-cla-manager-modal.component.ts @@ -11,7 +11,6 @@ import { ProjectModel } from 'src/app/core/models/project'; import { OrganizationModel } from 'src/app/core/models/organization'; import { AlertService } from 'src/app/shared/services/alert.service'; import { EmailValidator } from 'src/app/shared/validators/email-validator'; -import { InviteCompanyModel } from 'src/app/core/models/invite-company'; @Component({ selector: 'app-identify-cla-manager-modal', @@ -64,30 +63,38 @@ export class IdentifyClaManagerModalComponent implements OnInit { const user: UserModel = JSON.parse(this.storageService.getItem('user')); if (user.user_id) { this.claContributorService.inviteManager(user.user_id, data).subscribe( - (response: InviteCompanyModel) => { - this.hasError = false; - this.title = 'Notification Sent'; - this.message = 'An email has been sent to "' + response.email + '" to request that they start the CLA signature process.'; - if (hasCompanyAdmin) { - this.title = 'Request Submitted to Company Admin'; - this.message = 'Your Company Admin has been contacted, you will need to follow up with them to process your CLA request.'; - } - this.openDialogModal(content); + () => { + this.handleSuccess(hasCompanyAdmin, content); }, (exception) => { console.log(exception); - this.hasError = true; - this.title = 'Request Failed'; - this.message = 'Your request is Failed due to internal server error please try later.'; - if (exception.error?.Message) { - this.message = exception.error.Message; - } - this.openDialogModal(content); + this.handleError(exception, content); } ); } } + handleSuccess(hasCompanyAdmin, content) { + this.hasError = false; + this.title = 'Notification Sent'; + this.message = 'An email has been sent to "' + this.form.controls.email.value + '" to request that they start the CLA signature process.'; + if (hasCompanyAdmin) { + this.title = 'Request Submitted to Company Admin'; + this.message = 'Your Company Admin has been contacted, you will need to follow up with them to process your CLA request.'; + } + this.openDialogModal(content); + } + + handleError(exception, content) { + this.hasError = true; + this.title = 'Request Failed'; + this.message = 'Your request is Failed due to internal server error please try later.'; + if (exception.error?.Message) { + this.message = exception.error.Message; + } + this.openDialogModal(content); + } + onClickExitCLABtn() { const redirectUrl = JSON.parse(this.storageService.getItem('redirect')); if (redirectUrl !== null) { diff --git a/src/app/modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component.ts b/src/app/modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component.ts index d987a220..fce3b559 100644 --- a/src/app/modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component.ts +++ b/src/app/modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component.ts @@ -101,7 +101,7 @@ export class ClaRequestAuthorizationComponent implements OnInit { if (this.getSelectedCLAManagers().length > 0) { this.notifyCLAManagers(content); } else { - this.alertService.error('Please select atleast one CLA manager.'); + this.alertService.error('Please select at least one CLA Manager.'); } }