Commit 8083a3a5 authored by Rajkumar-D's avatar Rajkumar-D
Browse files

Taxon Reg: Adding first proposed name to email subject

parent 52e1c95d
Pipeline #278474 failed with stages
in 50 seconds
...@@ -184,6 +184,7 @@ export class TaxonomyManagementComponent implements OnInit { ...@@ -184,6 +184,7 @@ export class TaxonomyManagementComponent implements OnInit {
if (result.event != "close") { if (result.event != "close") {
this.showLoading(); this.showLoading();
let taxonRefObj = result.data; let taxonRefObj = result.data;
let tableArr = let tableArr =
source === "Form" ? this.validFormArray : this.validSpreadsheetArray; source === "Form" ? this.validFormArray : this.validSpreadsheetArray;
...@@ -268,6 +269,7 @@ export class TaxonomyManagementComponent implements OnInit { ...@@ -268,6 +269,7 @@ export class TaxonomyManagementComponent implements OnInit {
submitTaxonomyRequest(source) { submitTaxonomyRequest(source) {
const proposedNameRegexp = "(Proposed name: )(.*)";
this.submissionAccount = JSON.parse( this.submissionAccount = JSON.parse(
this._webinAuthService.getSubmissionAccount() this._webinAuthService.getSubmissionAccount()
); );
...@@ -275,11 +277,12 @@ export class TaxonomyManagementComponent implements OnInit { ...@@ -275,11 +277,12 @@ export class TaxonomyManagementComponent implements OnInit {
mail["from"] = this.submissionAccount["submissionContacts"] mail["from"] = this.submissionAccount["submissionContacts"]
.filter((contact) => contact.mainContact) .filter((contact) => contact.mainContact)
.map((contact) => contact.emailAddress)[0]; .map((contact) => contact.emailAddress)[0];
mail["subject"] = "Taxonomy Consultation";
mail["to"] = environment.taxonomySubmissionEmail; mail["to"] = environment.taxonomySubmissionEmail;
this.constructTaxonContentAndSendMail( this.constructTaxonContentAndSendMail(
function (taxonContent, thisObj) { function (taxonContent, thisObj) {
mail["content"] = taxonContent; mail["content"] = taxonContent;
mail["subject"] = "Taxonomy Consultation - " + taxonContent.match(proposedNameRegexp)[2];
console.log(taxonContent); console.log(taxonContent);
const observable: Observable<string> = thisObj._webinRestService.sendTaxonEmail( const observable: Observable<string> = thisObj._webinRestService.sendTaxonEmail(
mail mail
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment