Skip to content

Commit

Permalink
Tests Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoSavalaML committed Jun 1, 2024
1 parent 8f0f807 commit fb8190a
Showing 1 changed file with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,6 @@ export class InstructorRequestFormComponent {
readonly COUNTRY_NAME_MAX_LENGTH = FormValidator.COUNTRY_NAME_MAX_LENGTH;
readonly EMAIL_MAX_LENGTH = FormValidator.EMAIL_MAX_LENGTH;

// Country Mapping
countryMapping: { [key: string]: string } = {
'united states': 'USA',
us: 'USA',
america: 'USA',
uk: 'United Kingdom',
deutschland: 'Germany',
'united arab emirates': 'UAE',
españa: 'Spain',
méxico: 'Mexico',
belgië: 'Belgium',
holland: 'Netherlands',
};

// Captcha
captchaSiteKey: string = environment.captchaSiteKey;
isCaptchaSuccessful: boolean = false;
Expand Down Expand Up @@ -129,10 +115,22 @@ export class InstructorRequestFormComponent {
const name = this.name.value!.trim();
const email = this.email.value!.trim();
const comments = this.comments.value!.trim();

// Country Mapping
const countryMapping: { [key: string]: string } = {
'united states': 'USA',
us: 'USA',
america: 'USA',
uk: 'United Kingdom',
deutschland: 'Germany',
'united arab emirates': 'UAE',
españa: 'Spain',
méxico: 'Mexico',
belgië: 'Belgium',
holland: 'Netherlands',
};
// Combine country and institution
const country = this.country.value!.trim();
const mappedCountry = this.countryMapping[country.toLowerCase()] || country;
const mappedCountry = countryMapping[country.toLowerCase()] || country;
const institution = this.institution.value!.trim();
const combinedInstitution = `${institution}, ${mappedCountry}`;

Expand Down

0 comments on commit fb8190a

Please sign in to comment.