-
-
{{'grant-deny-request-copy.intro2' | translate}}
+
+
+
{{'grant-deny-request-copy.intro2' | translate}}
-
+
diff --git a/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts b/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts
index 3a0817b3b0..cfefd94219 100644
--- a/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts
+++ b/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts
@@ -7,7 +7,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { AuthService } from '../../core/auth/auth.service';
import { ItemDataService } from '../../core/data/item-data.service';
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
-import { of as observableOf } from 'rxjs';
+import { BehaviorSubject, of as observableOf } from 'rxjs';
import {
createSuccessfulRemoteDataObject,
createSuccessfulRemoteDataObject$
@@ -17,8 +17,10 @@ import { Item } from '../../core/shared/item.model';
import { GrantDenyRequestCopyComponent } from './grant-deny-request-copy.component';
import { getItemPageRoute } from '../../item-page/item-page-routing-paths';
import { getRequestCopyDenyRoute, getRequestCopyGrantRoute } from '../request-copy-routing-paths';
+import { By } from '@angular/platform-browser';
+import { RemoteData } from '../../core/data/remote-data';
-describe('GrantDenyRequestCopyComponent', () => {
+fdescribe('GrantDenyRequestCopyComponent', () => {
let component: GrantDenyRequestCopyComponent;
let fixture: ComponentFixture
;
@@ -120,4 +122,21 @@ describe('GrantDenyRequestCopyComponent', () => {
done();
});
});
+
+ describe('processed message', () => {
+ it('should not be displayed when decisionDate is undefined', () => {
+ const message = fixture.debugElement.query(By.css('.processed-message'));
+ expect(message).toBeNull();
+ });
+
+ it('should be displayed when decisionDate is defined', () => {
+ component.itemRequestRD$ = createSuccessfulRemoteDataObject$(Object.assign(new ItemRequest(), itemRequest, {
+ decisionDate: 'defined-date'
+ }));
+ fixture.detectChanges();
+
+ const message = fixture.debugElement.query(By.css('.processed-message'));
+ expect(message).not.toBeNull();
+ });
+ });
});
diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5
index fb3c27883b..f984656e5f 100644
--- a/src/assets/i18n/en.json5
+++ b/src/assets/i18n/en.json5
@@ -1467,10 +1467,14 @@
"grant-deny-request-copy.header": "Document copy request",
+ "grant-deny-request-copy.home-page": "Take me to the home page",
+
"grant-deny-request-copy.intro1": "If you are one of the authors of the document {{ name }}, then please use one of the options below to respond to the user's request.",
"grant-deny-request-copy.intro2": "After choosing an option, you will be presented with a suggested email reply which you may edit.",
+ "grant-deny-request-copy.processed": "This request has already been processed. You can use the button below to get back to the home page.",
+
"grant-request-copy.email.message": "Dear {{ recipientName }},\nIn response to your request I have the pleasure to send you in attachment a copy of the file(s) concerning the document: \"{{ itemUrl }}\" ({{ itemName }}), of which I am an author.\n\nBest regards,\n{{ authorName }} <{{ authorEmail }}>",