Project

General

Profile

1
<div *ngIf="!showForm" class="uk-container uk-container-large uk-margin-top" id="feedback-pos">
2
  <span class="feedback uk-float-right">
3
    <span class="uk-margin-small-right">Any information missing or wrong?</span>
4
    <a (click)="changeShowForm(true)" class="portal-link">Report an Issue</a>
5
  </span>
6
</div>
7
<div *ngIf="showForm && !sent" class="feedback-page">
8
  <div class="portal-background-color uk-padding-small">
9
    <div class="uk-container">
10
      <span class="clickable" (click)="openBackModal()"><span uk-icon="chevron-left"></span> Back</span>
11
      <h2 class="uk-margin-remove-top">Report issues in...</h2>
12
      <landing-header *ngIf="resultLandingInfo" [properties]="properties" [title]="title"
13
                      [subTitle]="resultLandingInfo.subtitle" [underCuration]="resultLandingInfo.underCurationMessage"
14
                      [entityType]="entityType" [types]="resultLandingInfo.types"
15
                      [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
16
      </landing-header>
17
      <landing-header *ngIf="organizationInfo" [properties]="properties" [title]="title"
18
                      [subTitle]="(organizationInfo.name && organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"
19
                      [entityType]="entityType">
20
      </landing-header>
21
      <landing-header *ngIf="projectInfo && title" [properties]="properties" [title]="title"
22
                      [subTitle]="projectInfo.acronym ? projectInfo.title : ''"
23
                      [entityType]="entityType" [startDate]="projectInfo.startDate" [endDate]="projectInfo.endDate"
24
                      [status]="projectInfo.status">
25
      </landing-header>
26
      <landing-header *ngIf="dataProviderInfo" [properties]="properties" [title]="title"
27
                      [subTitle]="(dataProviderInfo.officialName
28
                            && dataProviderInfo.title.name !== dataProviderInfo.officialName)?dataProviderInfo.officialName:null"
29
                      [entityType]="entityType"
30
                      [types]="dataProviderInfo.type ? [dataProviderInfo.type] : null">
31
      </landing-header>
32
    </div>
33
  </div>
34
  <div *ngIf="form" [formGroup]="form" class="uk-container uk-padding-small">
35
    <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>
36
    <div formArrayName="issues" class="uk-margin-top">
37
      <div *ngFor="let control of issues.controls; let i = index" [formGroupName]="i" class="uk-margin-medium-bottom">
38
        <div>
39
          <span>Issue #{{i + 1}}</span>
40
          <span class="uk-float-right clickable" (click)="removeIssue(i)">Remove</span>
41
        </div>
42
        <div class="form">
43
          <mat-select [formControl]="control.get('field')"
44
                      [disableOptionCentering]="true" [placeholder]="'Select the field to report the issue'"
45
                      class="matSelection uk-margin-bottom" panelClass="matSelectionPanel">
46
            <mat-option *ngFor="let field of fields" [value]="field">{{field}}</mat-option>
47
          </mat-select>
48
          <textarea [formControl]="control.get('report')" class="uk-textarea default-border"
49
                    rows="4" placeholder="Write your report here..."></textarea>
50
        </div>
51
      </div>
52
      <div class="uk-margin-small-bottom">
53
        <span class="clickable" (click)="addIssue()">
54
          <button class="uk-icon-button portal-button uk-icon uk-margin-small-right" uk-icon="plus"></button>
55
          <span>Report issue for another field</span>
56
        </span>
57
      </div>
58
    </div>
59
    <div class="uk-flex uk-flex-bottom uk-margin-medium-top" uk-grid>
60
      <div class="uk-width-2-3@m uk-width-1-2@s">
61
        <div class="uk-text-small">Please leave us your E-mail to notify you about the reporting status.</div>
62
        <input class="uk-input default-border uk-width-1-1" placeholder="E-mail" formControlName="email" [class.uk-form-danger]="form.get('email').invalid">
63
      </div>
64
      <div *ngIf="form" class="uk-width-expand">
65
        <re-captcha (resolved)="handleRecaptcha($event)" [(siteKey)]="properties.reCaptchaSiteKey">
66
        </re-captcha>
67
      </div>
68
      <div class="uk-margin-top uk-width-1-1">
69
        <div class="uk-width-1-4@m uk-width-1-3@s uk-float-right">
70
          <button [class.uk-disabled]="form.invalid || sending" [class.portal-button]="form.valid"
71
                  (click)="sendReport()" class="uk-button uk-width-1-1">Send report
72
          </button>
73
        </div>
74
      </div>
75
    </div>
76
  </div>
77
</div>
78
<div *ngIf="sent" class="uk-position-relative">
79
  <div class="uk-position-top-center">
80
    <div class="feedback-sent uk-margin-small-top">
81
      <h2>Thank you for your feedback</h2>
82
      <p>Your feedback is successfully received and it will soon be reviewed by our graph experts!</p>
83
      <span uk-icon="icon: check; ratio: 4"></span>
84
    </div>
85
    <div class="uk-text-center uk-margin-medium-top">
86
      <button (click)="changeShowForm(false)" class="uk-button portal-button uk-width-1-2">Go back to {{entityType}}'s page</button>
87
    </div>
88
  </div>
89
</div>
90
<modal-alert #backModal (alertOutput)="changeShowForm(false)"></modal-alert>
(1-1/3)