2020-03-16 14:09:46 +01:00
|
|
|
<div *ngIf="!showForm" class="uk-container uk-container-large uk-margin-top" id="feedback-pos">
|
|
|
|
<span class="feedback uk-float-right">
|
|
|
|
<span class="uk-margin-small-right">Any information missing or wrong?</span>
|
|
|
|
<a (click)="changeShowForm(true)" class="portal-link">Report an Issue</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="showForm && !sent" class="feedback-page">
|
|
|
|
<div class="portal-background-color uk-padding-small">
|
|
|
|
<div class="uk-container">
|
|
|
|
<span class="clickable" (click)="openBackModal()"><span uk-icon="chevron-left"></span> Back</span>
|
|
|
|
<h2 class="uk-margin-remove-top">Report issues in...</h2>
|
|
|
|
<landing-header *ngIf="resultLandingInfo" [properties]="properties" [title]="title"
|
|
|
|
[subTitle]="resultLandingInfo.subtitle" [underCuration]="resultLandingInfo.underCurationMessage"
|
|
|
|
[entityType]="entityType" [types]="resultLandingInfo.types"
|
|
|
|
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
|
|
|
|
</landing-header>
|
|
|
|
<landing-header *ngIf="organizationInfo" [properties]="properties" [title]="title"
|
|
|
|
[subTitle]="(organizationInfo.name && organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"
|
|
|
|
[entityType]="entityType">
|
|
|
|
</landing-header>
|
|
|
|
<landing-header *ngIf="projectInfo && title" [properties]="properties" [title]="title"
|
|
|
|
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
|
|
|
|
[entityType]="entityType" [startDate]="projectInfo.startDate" [endDate]="projectInfo.endDate"
|
|
|
|
[status]="projectInfo.status">
|
|
|
|
</landing-header>
|
|
|
|
<landing-header *ngIf="dataProviderInfo" [properties]="properties" [title]="title"
|
|
|
|
[subTitle]="(dataProviderInfo.officialName
|
|
|
|
&& dataProviderInfo.title.name !== dataProviderInfo.officialName)?dataProviderInfo.officialName:null"
|
|
|
|
[entityType]="entityType"
|
|
|
|
[types]="dataProviderInfo.type ? [dataProviderInfo.type] : null">
|
|
|
|
</landing-header>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="form" [formGroup]="form" class="uk-container uk-padding-small">
|
2020-03-19 10:10:42 +01:00
|
|
|
<div *ngIf="error" class="uk-width-1-1 uk-alert uk-alert-danger uk-text-center ng-star-inserted" role="alert">Email sent failed! Please try again.</div>
|
2020-03-16 14:09:46 +01:00
|
|
|
<div formArrayName="issues" class="uk-margin-top">
|
|
|
|
<div *ngFor="let control of issues.controls; let i = index" [formGroupName]="i" class="uk-margin-medium-bottom">
|
|
|
|
<div>
|
|
|
|
<span>Issue #{{i + 1}}</span>
|
|
|
|
<span class="uk-float-right clickable" (click)="removeIssue(i)">Remove</span>
|
|
|
|
</div>
|
|
|
|
<div class="form">
|
|
|
|
<mat-select [formControl]="control.get('field')"
|
|
|
|
[disableOptionCentering]="true" [placeholder]="'Select the field to report the issue'"
|
|
|
|
class="matSelection uk-margin-bottom" panelClass="matSelectionPanel">
|
|
|
|
<mat-option *ngFor="let field of fields" [value]="field">{{field}}</mat-option>
|
|
|
|
</mat-select>
|
2020-03-19 10:10:42 +01:00
|
|
|
<textarea [formControl]="control.get('report')" class="uk-textarea default-border"
|
2020-03-16 14:09:46 +01:00
|
|
|
rows="4" placeholder="Write your report here..."></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="uk-margin-small-bottom">
|
|
|
|
<span class="clickable" (click)="addIssue()">
|
|
|
|
<button class="uk-icon-button portal-button uk-icon uk-margin-small-right" uk-icon="plus"></button>
|
|
|
|
<span>Report issue for another field</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-03-19 10:10:42 +01:00
|
|
|
</div>
|
|
|
|
<div class="uk-flex uk-flex-bottom uk-margin-medium-top" uk-grid>
|
2020-03-27 10:11:56 +01:00
|
|
|
<div class="uk-width-2-3@m uk-width-1-2@s">
|
2020-03-19 10:10:42 +01:00
|
|
|
<div class="uk-text-small">Please leave us your E-mail to notify you about the reporting status.</div>
|
|
|
|
<input class="uk-input default-border uk-width-1-1" placeholder="E-mail" formControlName="email" [class.uk-form-danger]="form.get('email').invalid">
|
|
|
|
</div>
|
2020-03-27 10:11:56 +01:00
|
|
|
<div *ngIf="form" class="uk-width-expand">
|
|
|
|
<re-captcha (resolved)="handleRecaptcha($event)" [(siteKey)]="properties.reCaptchaSiteKey">
|
|
|
|
</re-captcha>
|
|
|
|
</div>
|
|
|
|
<div class="uk-margin-top uk-width-1-1">
|
|
|
|
<div class="uk-width-1-4@m uk-width-1-3@s uk-float-right">
|
|
|
|
<button [class.uk-disabled]="form.invalid || sending" [class.portal-button]="form.valid"
|
|
|
|
(click)="sendReport()" class="uk-button uk-width-1-1">Send report
|
|
|
|
</button>
|
|
|
|
</div>
|
2020-03-16 14:09:46 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="sent" class="uk-position-relative">
|
|
|
|
<div class="uk-position-top-center">
|
|
|
|
<div class="feedback-sent uk-margin-small-top">
|
|
|
|
<h2>Thank you for your feedback</h2>
|
|
|
|
<p>Your feedback is successfully received and it will soon be reviewed by our graph experts!</p>
|
|
|
|
<span uk-icon="icon: check; ratio: 4"></span>
|
|
|
|
</div>
|
|
|
|
<div class="uk-text-center uk-margin-medium-top">
|
|
|
|
<button (click)="changeShowForm(false)" class="uk-button portal-button uk-width-1-2">Go back to {{entityType}}'s page</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<modal-alert #backModal (alertOutput)="changeShowForm(false)"></modal-alert>
|