diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c408662..072ec5e 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -67,7 +67,6 @@ export class AppComponent implements OnInit, OnDestroy { /* Contact */ public showQuickContact: boolean; - public showGetStarted: boolean = true; public contactForm: UntypedFormGroup; public sending = false; @ViewChild('quickContact') quickContact: QuickContactComponent; @@ -83,7 +82,6 @@ export class AppComponent implements OnInit, OnDestroy { } ngOnInit() { - this.reset(); this.subscriptions.push(this.layoutService.hasSidebar.subscribe(hasSidebar => { this.hasSidebar = hasSidebar; this.cdr.detectChanges(); @@ -98,6 +96,9 @@ export class AppComponent implements OnInit, OnDestroy { } else if (this.user) { this.user = user; } + if(this.user) { + this.reset(); + } this.buildMenu(); this.layoutService.setOpen(true); this.loading = false; @@ -161,7 +162,7 @@ export class AppComponent implements OnInit, OnDestroy { private sendMail(admins: string[]) { this.sending = true; this.subscriptions.push(this.emailService.contact(this.properties, - Composer.composeEmailForDevelop(this.contactForm.value, admins), + Composer.composeEmailForDevelop(this.contactForm.value, admins, this.user), this.contactForm.value.recaptcha).subscribe( res => { if (res) { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 11f0b5b..ce1452a 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -12,6 +12,7 @@ import {SideBarModule} from "./openaireLibrary/dashboard/sharedComponents/sideba import {NavigationBarModule} from "./openaireLibrary/sharedComponents/navigationBar.module"; import {HttpClientModule} from "@angular/common/http"; import {QuickContactModule} from './openaireLibrary/sharedComponents/quick-contact/quick-contact.module'; +import {AlertModalModule} from "./openaireLibrary/utils/modal/alertModal.module"; @NgModule({ declarations: [ @@ -28,7 +29,8 @@ import {QuickContactModule} from './openaireLibrary/sharedComponents/quick-conta ErrorModule, SharedModule, NavigationBarModule, - QuickContactModule + QuickContactModule, + AlertModalModule ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index b69e19f..aebcb81 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit b69e19fa17a9684d51c68f34c40f632ddd86d94d +Subproject commit aebcb81c7b05d6605422e63ada164715d39b9c01 diff --git a/src/app/personal-info/personal-info.component.ts b/src/app/personal-info/personal-info.component.ts index 4f978ce..3d28ac1 100644 --- a/src/app/personal-info/personal-info.component.ts +++ b/src/app/personal-info/personal-info.component.ts @@ -89,8 +89,8 @@ export class PersonalInfoComponent implements OnInit, OnDestroy { initForm() { if(this.info) { this.form = this.fb.group({ - name: this.fb.control(this.info.name, Validators.required), - surname: this.fb.control(this.info.surname, Validators.required), + name: this.fb.control({value: this.info.name, disabled: true}, Validators.required), + surname: this.fb.control({value: this.info.surname, disabled: true}, Validators.required), email: this.fb.control({value: this.info.email, disabled: true}, Validators.required), affiliation: this.fb.control(this.info.affiliation, Validators.required), affiliationType: this.fb.control(this.info.affiliationType, Validators.required), @@ -98,8 +98,8 @@ export class PersonalInfoComponent implements OnInit, OnDestroy { }); } else { this.form = this.fb.group({ - name: this.fb.control(this.user.firstname, Validators.required), - surname: this.fb.control(this.user.lastname, Validators.required), + name: this.fb.control({value: this.user.firstname, disabled: true}, Validators.required), + surname: this.fb.control({value: this.user.lastname, disabled: true}, Validators.required), email: this.fb.control({value: this.user.email, disabled: true}, Validators.required), affiliation: this.fb.control('', Validators.required), affiliationType: this.fb.control(null, Validators.required), diff --git a/src/environments/environment.beta.ts b/src/environments/environment.beta.ts index ed9786f..6e7c820 100644 --- a/src/environments/environment.beta.ts +++ b/src/environments/environment.beta.ts @@ -4,12 +4,15 @@ export let properties: EnvProperties = { environment: 'beta', dashboard: 'developers', useCache: false, + adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/", loginUrl: "https://beta.services.openaire.eu/developers-api/openid_connect_login", userInfoUrl: "https://beta.services.openaire.eu/developers-api/userInfo", developersApiUrl: "https://beta.services.openaire.eu/developers-api", logoutUrl: "https://beta.services.openaire.eu/developers-api/openid_logout", domain: 'https://beta.develop.openaire.eu', errorLink: '/error', - baseLink: '' + baseLink: '', + reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P", + admins: ["helpdesk@openaire.eu"] }; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 9a7ae92..6aad8a5 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -4,12 +4,15 @@ export let properties: EnvProperties = { environment: 'production', dashboard: 'developers', useCache: false, + adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/", loginUrl: "https://services.openaire.eu/developers-api/openid_connect_login", userInfoUrl: "https://services.openaire.eu/developers-api/userInfo", developersApiUrl: "https://services.openaire.eu/developers-api", logoutUrl: "https://services.openaire.eu/developers-api/openid_logout", domain: 'https://develop.openaire.eu', errorLink: '/error', - baseLink: '' + baseLink: '', + reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P", + admins: ["helpdesk@openaire.eu"] }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 34b5241..b40b696 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -9,11 +9,14 @@ export let properties: EnvProperties = { environment: 'development', dashboard: 'developers', useCache: false, + adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/", loginUrl: "http://mpagasas.di.uoa.gr:19580/developers-api/openid_connect_login", userInfoUrl: "http://mpagasas.di.uoa.gr:19580/developers-api/userInfo", developersApiUrl: "http://mpagasas.di.uoa.gr:19580/developers-api", logoutUrl: "http://mpagasas.di.uoa.gr:19580/developers-api/openid_logout", domain: 'http://mpagasas.di.uoa.gr:5001', errorLink: '/error', - baseLink: '' + baseLink: '', + reCaptchaSiteKey: "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu", + admins: ["kostis30fylloy@gmail.com", "kiatrop@di.uoa.gr"] };