diff --git a/templates/deposit-compliance/cards/cross-repository-check-card.jsx b/templates/deposit-compliance/cards/cross-repository-check-card.jsx
index f73d1d700..6573cd574 100644
--- a/templates/deposit-compliance/cards/cross-repository-check-card.jsx
+++ b/templates/deposit-compliance/cards/cross-repository-check-card.jsx
@@ -1,25 +1,29 @@
import React from 'react'
+import { PaymentRequiredError } from 'store/errors'
import { Card } from 'design'
-import * as texts from 'texts/depositing'
-import { formatNumber } from 'utils/helpers'
import ExportButton from 'components/export-button'
import Markdown from 'components/markdown'
+import { PaymentRequiredNote } from 'modules/billing'
+import * as texts from 'texts/depositing'
+import { formatNumber } from 'utils/helpers'
const Content = ({ nonCompliantCount, differentCount, exportUrl }) => {
- const template =
- texts.crossRepositoryCheck[differentCount ? 'success' : 'failure']
+ const templateName = differentCount > 0 ? 'success' : 'failure'
+ const template = texts.crossRepositoryCheck[templateName]
const text = template.render({
- nonCompliantCount: formatNumber(nonCompliantCount),
+ nonCompliantCount: nonCompliantCount ? formatNumber(nonCompliantCount) : '',
recordsInAnotherRepository: formatNumber(differentCount),
})
return (
<>
{text}
-
- {texts.crossRepositoryCheck.download}
-
+ {differentCount > 0 && (
+
+ {texts.crossRepositoryCheck.download}
+
+ )}
>
)
}
@@ -42,6 +46,11 @@ const CrossRepositoryCheckCard = ({
) : (
'Loading data'
)}
+ {crossDepositLag?.error instanceof PaymentRequiredError && (
+
+ )}
)
diff --git a/templates/deposit-compliance/cards/table-card.jsx b/templates/deposit-compliance/cards/table-card.jsx
index 92aeef415..9875cd61b 100644
--- a/templates/deposit-compliance/cards/table-card.jsx
+++ b/templates/deposit-compliance/cards/table-card.jsx
@@ -3,12 +3,14 @@ import { classNames } from '@oacore/design/lib/utils'
import styles from '../styles.module.css'
-import { formatDate } from 'utils/helpers'
+import { PaymentRequiredError } from 'store/errors'
import { Card, Icon } from 'design'
+import DocumentLink from 'components/document-link'
import Table from 'components/table'
import ExportButton from 'components/export-button'
+import { PaymentRequiredNote } from 'modules/billing'
import * as texts from 'texts/depositing'
-import DocumentLink from 'components/document-link'
+import { formatDate } from 'utils/helpers'
const SidebarContent = ({ context: { oai, originalId, authors, title } }) => {
const { Header, Body, Footer } = Table.Sidebar
@@ -75,7 +77,67 @@ class PublicationDateColumn extends Table.Column {
}
}
-const TableCard = ({ isExportDisabled, datesUrl, publicReleaseDatesPages }) => (
+const DepositDatesTable = ({
+ isExportDisabled,
+ datesUrl,
+ publicReleaseDatesPages,
+}) => (
+
+ v.oai.split(':').pop()}
+ className={styles.oaiColumn}
+ />
+
+ v.authors && v.authors.map((a) => a.name).join(' ')}
+ />
+
+ formatDate(v.publicReleaseDate)}
+ />
+
+
+
+
+
+ {texts.exporting.download}
+
+
+
+)
+
+const TableCard = ({
+ isExportDisabled,
+ datesUrl,
+ publicReleaseDatesPages: pages,
+}) => (
(
Lists deposit dates discovered from your repository
-
- v.oai.split(':').pop()}
- className={styles.oaiColumn}
- />
-
- v.authors && v.authors.map((a) => a.name).join(' ')}
- />
-
- formatDate(v.publicReleaseDate)}
- />
-
-
-
-
-
- {texts.exporting.download}
-
-
-
+
+ {pages.error instanceof PaymentRequiredError && (
+
+
+
+ )}
)
diff --git a/templates/deposit-compliance/index.jsx b/templates/deposit-compliance/index.jsx
index 65ed771ca..4afd30aed 100644
--- a/templates/deposit-compliance/index.jsx
+++ b/templates/deposit-compliance/index.jsx
@@ -35,6 +35,7 @@ const DepositComplianceTemplate = ({
/>
{
@@ -24,7 +26,12 @@ const formatDOI = (entity) => {
const TableCard = ({ pages }) => (
Browse DOI records
-
+
(
getter={(v) => v.authors && v.authors.map((a) => a.name).join(' ')}
/>
+ {pages.error instanceof PaymentRequiredError && (
+
+
+
+ )}
)
diff --git a/templates/doi/index.jsx b/templates/doi/index.jsx
index 92043fac7..eb0142e06 100644
--- a/templates/doi/index.jsx
+++ b/templates/doi/index.jsx
@@ -27,7 +27,11 @@ const DoiTemplate = ({