Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact Company Admin for GitHub and Gerrit #53

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Organization name is required
</div>
<div [hidden]="!form.controls.companyName.errors.minlength" class="error">
Organization name should be atleast 2 characters
Organization name should be at least 2 characters
</div>
<div [hidden]="!form.controls.companyName.errors.maxlength" class="error">
Organization name should not exceed 60 characters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
}

Expand Down