openaire-library/landingPages/feedback/feedback.component.html

78 lines
4.3 KiB
HTML
Raw Normal View History

<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">
<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>
<textarea [formControl]="control.get('report')"
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>
<div>
<button [class.uk-disabled]="form.invalid" [class.portal-button]="form.valid"
(click)="sendReport()" class="uk-button uk-width-1-4@m uk-width-1-3@s uk-float-right">Send
report
</button>
</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>