diff --git a/package-lock.json b/package-lock.json index aac2b1cd8..7bb80fd75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12456,9 +12456,9 @@ } }, "react-pdf": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-3.0.5.tgz", - "integrity": "sha1-mJQGyuZ+gZQyj0ZT03bfy153/p0=", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-3.0.6.tgz", + "integrity": "sha512-xdko6TTQvEfsKawJkXkp/AA6MCsnYpWHKD5JoaKbngjAsPWAw1LH+f5ImBd6yyF02nX58srwFW2Ikw7mRFubJA==", "requires": { "babel-runtime": "^6.26.0", "lodash.once": "^4.1.1", diff --git a/package.json b/package.json index 63597bd57..d75863095 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react": "^16.6.1", "react-dom": "^16.6.1", "react-loadable": "^5.5.0", - "react-pdf": "^3.0.5", + "react-pdf": "^3.0.6", "react-redux": "^5.1.0", "react-router-dom": "^4.3.1", "react-scripts": "2.1.1", diff --git a/src/components/rangeUsePlan/PDFView.js b/src/components/rangeUsePlan/PDFView.js index d1d27a0f6..67abb4154 100644 --- a/src/components/rangeUsePlan/PDFView.js +++ b/src/components/rangeUsePlan/PDFView.js @@ -32,7 +32,9 @@ class PDFView extends Component { const { planId, agreementId } = match.params; if (planId && agreementId) { - fetchRupPDF(planId); + fetchRupPDF(planId).then(() => { + this.onDownloadClicked(); + }); } } @@ -64,7 +66,7 @@ class PDFView extends Component { /> ), ); - + return (
} - { planPDFBlob && +
+ If your download does not begin, please click the button to try again. + +
+ } + {/* { planPDFBlob &&
@@ -102,14 +115,13 @@ class PDFView extends Component {
} + // loading={} onLoadSuccess={this.onLoadSuccess} > {pages}
-
- } +
*/}
); } diff --git a/src/constants/strings.js b/src/constants/strings.js index 62429f912..531b35d97 100644 --- a/src/constants/strings.js +++ b/src/constants/strings.js @@ -25,7 +25,7 @@ export const AGREEMENT_SEARCH_PLACEHOLDER = 'Enter RAN, agreement holder\'s name export const INITIAL_PLAN = 'Initial Plan'; // RUP View -export const PREVIEW_PDF = 'Preview PDF'; +export const PREVIEW_PDF = 'Download PDF'; export const UPDATE_STATUS = 'Update Status'; export const SAVE_DRAFT = 'Save Draft'; export const SUBMIT = 'Submit'; diff --git a/src/styles/Rup.scss b/src/styles/Rup.scss index 280020e58..2e9ee47f9 100644 --- a/src/styles/Rup.scss +++ b/src/styles/Rup.scss @@ -327,7 +327,7 @@ $sticky-height: 55px; .rup-pdf { display: flex; justify-content: center; - + &__link { display: none; } @@ -335,6 +335,7 @@ $sticky-height: 55px; display: flex; flex-direction: column; margin: 10px 0; + min-width: 70%; } &__preview { &__header {