Skip to content

Commit 5e33c9d

Browse files
committed
merged with devel
2 parents 145206a + 649f7f7 commit 5e33c9d

19 files changed

+647
-527
lines changed

src/app/layout/footer/footer.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h2 class="header" style="white-space: pre" i18n="Footer-header@@footerHeader3">
6565

6666
<ng-container *ngIf="myDataBeta">
6767
<li>
68-
<a i18n="Footer-link@@footerLink10" routerLink="/mydata">Pikaohjeet</a>
68+
<a class='no-href' i18n="Footer-link@@footerLink10" (click)='openQuickstartDialog()'>Pikaohjeet</a>
6969
</li>
7070

7171
<li>
@@ -195,4 +195,8 @@ <h2 i18n="@@followUs" class="header">Seuraa meitä!</h2>
195195
[actions]="basicDialogActions"
196196
(onActionClick)="closeDialog()"
197197
></app-dialog>
198+
199+
<ng-container *ngIf="quickstartState$ | async">
200+
<app-welcome-stepper></app-welcome-stepper>
201+
</ng-container>
198202
</footer>

src/app/layout/footer/footer.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { faTimes } from '@fortawesome/free-solid-svg-icons';
2525
import { AppSettingsService } from '@shared/services/app-settings.service';
2626
import { WINDOW } from '@shared/services/window.service';
2727
import { isPlatformBrowser } from '@angular/common';
28+
import { DialogEventsService } from '@shared/services/dialog-events.service';
2829

2930
@Component({
3031
selector: 'app-footer',
@@ -55,12 +56,15 @@ export class FooterComponent implements OnInit {
5556
dialogActions: any[];
5657
basicDialogActions = [];
5758

59+
quickstartState$ = this.dialogEventsService.getQuickstartState();
60+
5861
constructor(
5962
private appConfigService: AppConfigService,
6063
@Inject(LOCALE_ID) protected localeId: string,
6164
private appSettingsService: AppSettingsService,
6265
@Inject(WINDOW) private window: Window,
63-
@Inject(PLATFORM_ID) private platformId: object
66+
@Inject(PLATFORM_ID) private platformId: object,
67+
private dialogEventsService: DialogEventsService,
6468
) {
6569
this.buildInfo = this.appConfigService.buildInfo;
6670
this.showReviewButton = true;
@@ -137,4 +141,8 @@ export class FooterComponent implements OnInit {
137141
this.contact.nativeElement.innerHTML = link;
138142
this.contact.nativeElement.href = 'mailto:' + link;
139143
}
144+
145+
openQuickstartDialog() {
146+
this.dialogEventsService.setQuickstartState(true);
147+
}
140148
}

src/app/mydata/components/home/home.component.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,4 @@ <h2 class="pb-4">
8585
/>
8686
</div>
8787
</div>
88-
<ng-container *ngIf="showStepperModal">
89-
<app-welcome-stepper (onModalAction)="this.handleWelcomeModalAction($event)"
90-
></app-welcome-stepper>
91-
</ng-container>
9288
</main>

src/app/mydata/components/home/home.component.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { UtilityService } from '@shared/services/utility.service';
1111
import { OidcSecurityService } from 'angular-auth-oidc-client';
1212
import { Router } from '@angular/router';
1313
import { NotificationService } from '@shared/services/notification.service';
14+
import { DialogEventsService } from '@shared/services/dialog-events.service';
1415

1516

1617
@Component({
@@ -28,14 +29,14 @@ export class HomeComponent implements OnInit {
2829
suomiFiAutheticationProblemSnackbarText = $localize`:@@suomiFiAutheticationProblemSnackbarText:Osalla käyttäjistä on ilmennyt virhetilanne Suomi.fi-tunnistautumisen jälkeen, joka estää pääsyn profiilin luontiin. Selvitämme ongelmaa ja korjaamme sen mahdollisimman pian. Voit jättää palautelomakkeen avulla tarkempia tietoja vikatilanteesta.`;
2930

3031
locale: string;
31-
showStepperModal = false;
3232

3333
constructor(
3434
public oidcSecurityService: OidcSecurityService,
3535
private utilityService: UtilityService,
3636
private appSettingsService: AppSettingsService,
3737
private router: Router,
3838
private notificationService: NotificationService,
39+
private dialogEventsService: DialogEventsService
3940
) {}
4041

4142
ngOnInit() {
@@ -57,13 +58,6 @@ export class HomeComponent implements OnInit {
5758
}
5859

5960
showWelcomeModal() {
60-
this.showStepperModal = true;
61-
}
62-
63-
handleWelcomeModalAction(event: string) {
64-
this.showStepperModal = false;
65-
if (event === 'createProfile') {
66-
this.router.navigate(['mydata/service-deployment']);
67-
}
61+
this.dialogEventsService.setQuickstartState(true);
6862
}
6963
}

src/app/mydata/components/profile/profile.component.html

Lines changed: 106 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,44 @@
77
<main id="main-content">
88
<div class="wrapper">
99
<div class="row d-flex justify-content-between pt-3 pb-5">
10-
<div class="col-12 col-md-6 px-0">
11-
<div
12-
class="row d-flex text-capitalize"
13-
*ngIf="profileService.currentEditorProfileName | async"
14-
>
10+
<div class="col-6 col-md-6 px-0">
11+
<div class="row d-flex text-capitalize" *ngIf="profileService.currentEditorProfileName | async">
1512
<h1 class="col-12 px-0">
1613
{{ profileService.currentEditorProfileName | async }}
1714
</h1>
1815
<div class="col align-self-center px-0">
19-
<img
20-
class="orcid-icon mt-n1 pe-2"
21-
src="assets/img/orcid_icon.svg"
22-
alt="Orcid -palvelun logo"
23-
/>
24-
<span>{{ orcid }}</span>
16+
<img class="orcid-icon mt-n1 pe-2" src="assets/img/orcid_icon.svg" alt="Orcid -palvelun logo" />
17+
<span>{{orcid}}</span>
2518
</div>
2619
</div>
2720
</div>
2821

22+
<div class="col-6 col-md-6 d-flex justify-content-end align-items-center">
23+
<ng-container *ngIf="
24+
(publicationsService.currentPublicationPayload | async).length ||
25+
(datasetsService.currentDatasetPayload | async).length ||
26+
(fundingsService.currentFundingPayload | async).length ||
27+
(patchService.currentPatchItems | async).length ||
28+
(collaborationsService.currentCollaborationsPayload | async).length">
29+
30+
31+
<app-primary-action-button class="col-auto"i18n-content="@@publishEllipsis" content="Julkaise..." (click)="openDialog(publishUpdatedProfile,publishUpdatedProfileTemplate,dataToPublishTemplate,publishUpdatedProfileDialogActions,false)"></app-primary-action-button>
32+
33+
<!-- Discard draft -->
34+
<button class="col-auto pe-lg-0" mat-button color="primary" i18n="@@discardChanges" (click)="openDialog(discardChanges, discardChangesTemplate, discardChangesActions, undefined, false)">
35+
Hylkää muutokset...
36+
</button>
37+
38+
<ng-template #discardChangesTemplate>
39+
<p i18n="@@discardSessionChanges">
40+
Hylätäänkö julkaisemattomat muutokset?
41+
</p>
42+
</ng-template>
43+
44+
45+
</ng-container>
46+
</div>
47+
2948
<!-- <div class="col-5 d-none d-md-block px-lg-0">
3049
<div class="row justify-content-end align-items-center">
3150
<div class="col-auto profile-image-container opacity-3">
@@ -40,96 +59,89 @@ <h1 class="col-12 px-0">
4059
</div>
4160
</div> -->
4261
</div>
62+
63+
4364
<div class="row profile">
4465
<div class="col-12 col-md-6 px-0 align-self-end">
4566
<h2 class="h4 d-inline-block" i18n="@@publicProfile">
4667
Profiili
4768
</h2>
48-
<span
49-
class="d-inline-block ps-0 ps-lg-3 h6 fst-italic"
50-
*ngIf="
69+
70+
<ng-container *ngIf="
5171
(publicationsService.currentPublicationPayload | async).length ||
5272
(datasetsService.currentDatasetPayload | async).length ||
5373
(fundingsService.currentFundingPayload | async).length ||
5474
(patchService.currentPatchItems | async).length ||
5575
(collaborationsService.currentCollaborationsPayload | async).length
56-
"
57-
>
58-
- <ng-container i18n="@@draft">Luonnos</ng-container></span
59-
>
76+
">
77+
78+
<span class="d-inline-block ps-0 ps-lg-3 h6 fst-italic">
79+
- <ng-container i18n="@@draft">Luonnos</ng-container>
80+
</span>
81+
</ng-container>
82+
83+
6084
</div>
6185

6286
<!-- Handle draft publish -->
6387
<ng-template #publishUpdatedProfileTemplate>
6488
<div class="row">
6589
<p class="col">
66-
<ng-container i18n="@@updatedProfilePublishedAt"
67-
>Valitsemalla "Julkaise", valitsemasi tiedot julkaistaan
68-
Tiedejatutkimus.fi-palvelussa.</ng-container
69-
>
90+
<ng-container i18n="@@updatedProfilePublishedAt">
91+
Valitsemalla "Julkaise", valitsemasi tiedot julkaistaan
92+
Tiedejatutkimus.fi-palvelussa.
93+
</ng-container>
94+
7095
<br />
71-
<ng-container i18n="@@updatingPublicDataTakesFewMinutes"
72-
>Tietojen päivittyminen voi kestää muutaman
73-
minuutin.</ng-container
74-
>
96+
97+
<ng-container i18n="@@updatingPublicDataTakesFewMinutes">
98+
Tietojen päivittyminen voi kestää muutaman
99+
minuutin.
100+
</ng-container>
75101
</p>
76102
</div>
77103
</ng-template>
78104

79105
<ng-template #dataToPublishTemplate>
80-
<app-draft-summary
81-
*ngIf="profileData"
82-
[profileData]="profileData"
83-
></app-draft-summary>
106+
<app-draft-summary *ngIf="profileData" [profileData]="profileData"></app-draft-summary>
84107
</ng-template>
85108

86-
<div
87-
class="col px-0 py-2 text-end"
88-
*ngIf="
109+
<div class="col px-0 py-2 text-end">
110+
<div style='display: flex; justify-content: end; align-items: center'>
111+
<div style="margin-right: 1rem">Tarkastele julkista profiiliasi Tiedejatutkimus.fi:ssä</div>
112+
<a [routerLink]="['/', 'results', 'person', orcid]" target="_blank">
113+
<app-primary-action-button class="" i18n-content="@@publish" content="Profiiliin"></app-primary-action-button>
114+
</a>
115+
</div>
116+
</div>
117+
118+
<ng-container *ngIf="
89119
(publicationsService.currentPublicationPayload | async).length ||
90120
(datasetsService.currentDatasetPayload | async).length ||
91121
(fundingsService.currentFundingPayload | async).length ||
92122
(patchService.currentPatchItems | async).length ||
93-
(collaborationsService.currentCollaborationsPayload | async).length
94-
"
95-
>
96-
<app-primary-action-button
97-
class="col-auto"
98-
i18n-content="@@publishEllipsis"
99-
content="Julkaise..."
100-
(click)="
101-
openDialog({
102-
title: publishUpdatedProfile,
103-
template: publishUpdatedProfileTemplate,
104-
extraContentTemplate: dataToPublishTemplate,
105-
actions: publishUpdatedProfileDialogActions
106-
})
107-
"
108-
></app-primary-action-button>
109-
110-
<!-- Discard draft -->
111-
<button
112-
mat-button
113-
color="primary"
114-
class="col-auto pe-lg-0"
115-
(click)="
116-
openDialog({
117-
title: discardChanges,
118-
template: discardChangesTemplate,
119-
actions: discardChangesActions
120-
})
121-
"
122-
i18n="@@discardChanges"
123-
>
124-
Hylkää muutokset...
125-
</button>
126-
127-
<ng-template #discardChangesTemplate>
128-
<p i18n="@@discardSessionChanges">
129-
Hylätäänkö julkaisemattomat muutokset?
130-
</p>
131-
</ng-template>
132-
</div>
123+
(collaborationsService.currentCollaborationsPayload | async).length">
124+
125+
<!--
126+
127+
<app-primary-action-button class="col-auto"i18n-content="@@publishEllipsis" content="Julkaise..." (click)="openDialog(publishUpdatedProfile,publishUpdatedProfileTemplate,dataToPublishTemplate,publishUpdatedProfileDialogActions,false)"></app-primary-action-button>
128+
129+
&lt;!&ndash; Discard draft &ndash;&gt;
130+
<button class="col-auto pe-lg-0" mat-button color="primary" i18n="@@discardChanges" (click)="openDialog(discardChanges, discardChangesTemplate, discardChangesActions, undefined, false)">
131+
Hylkää muutokset...
132+
</button>
133+
134+
<ng-template #discardChangesTemplate>
135+
<p i18n="@@discardSessionChanges">
136+
Hylätäänkö julkaisemattomat muutokset?
137+
</p>
138+
</ng-template>
139+
140+
-->
141+
142+
</ng-container>
143+
144+
133145
</div>
134146

135147
<!-- Groups -->
@@ -144,11 +156,10 @@ <h2 class="h4 d-inline-block" i18n="@@publicProfile">
144156
></app-contact-card>
145157
</aside>
146158

147-
<app-profile-summary
148-
*ngIf="profileData; else loadingTemplate"
149-
class="d-block pt-3"
150-
[profileData]="profileData"
151-
></app-profile-summary>
159+
<ng-container *ngIf="profileData; else loadingTemplate" >
160+
<app-profile-summary class="d-block pt-3" [profileData]="profileData"></app-profile-summary>
161+
</ng-container>
162+
152163

153164
<ng-template #loadingTemplate>
154165
<mat-spinner class="mx-auto mt-3" [diameter]="80"> </mat-spinner>
@@ -160,42 +171,36 @@ <h2 class="h4 d-inline-block" i18n="@@publicProfile">
160171
<ng-container *ngIf="appSettingsService.myDataSettings.debug">
161172
<div>
162173
<button (click)="reset()" mat-raised-button>Reset</button>
174+
163175
<div class="row">
164-
currentPublicationPayload:
165-
{{
166-
(publicationsService.currentPublicationPayload | async).length
167-
}}
176+
currentPublicationPayload: {{ (publicationsService.currentPublicationPayload | async).length }}
168177
</div>
178+
169179
<div class="row">
170-
currentDatasetPayload:
171-
{{ (datasetsService.currentDatasetPayload | async).length }}
180+
currentDatasetPayload: {{ (datasetsService.currentDatasetPayload | async).length }}
172181
</div>
182+
173183
<div class="row">
174-
currentFundingPayload:
175-
{{ (fundingsService.currentFundingPayload | async).length }}
184+
currentFundingPayload: {{ (fundingsService.currentFundingPayload | async).length }}
176185
</div>
186+
177187
<div class="row">
178-
currentPatchItems:
179-
{{ (patchService.currentPatchItems | async).length }}
188+
currentPatchItems: {{ (patchService.currentPatchItems | async).length }}
180189
</div>
190+
181191
<div class="row">
182-
currentCollaborationsPayload:
183-
{{
184-
(collaborationsService.currentCollaborationsPayload | async)
185-
.length
186-
}}
192+
currentCollaborationsPayload: {{ (collaborationsService.currentCollaborationsPayload | async).length }}
187193
</div>
188194
</div>
189195
</ng-container>
190196

191197
<!-- Contact card in desktop view -->
192-
<aside *ngIf="profileData" class="profile-card d-none d-lg-block">
193-
<app-contact-card
194-
i18n-label="@@contactInfo"
195-
label="Yhteystiedot"
196-
[data]="profileData"
197-
></app-contact-card>
198-
</aside>
198+
<ng-container *ngIf="profileData">
199+
<aside class="profile-card d-none d-lg-block">
200+
<app-contact-card i18n-label="@@contactInfo" label="Yhteystiedot" [data]="profileData"></app-contact-card>
201+
</aside>
202+
</ng-container>
203+
199204

200205
<!-- Collaboration -->
201206
<!--
@@ -218,6 +223,7 @@ <h2 class="h4 d-inline-block" i18n="@@publicProfile">
218223
<!-- Reusable dialog -->
219224
<app-dialog
220225
*ngIf="showDialog"
226+
221227
[template]="dialogTemplate"
222228
[title]="dialogTitle"
223229
[extraContentTemplate]="dialogExtraContentTemplate"

0 commit comments

Comments
 (0)