From 60a5effaa9e4d89c3c26ef4831bfd71e7c74b4e0 Mon Sep 17 00:00:00 2001 From: Saksham Arora Date: Sun, 26 May 2024 23:13:17 +0200 Subject: [PATCH] EItem: Make E-Book default value in editor --- src/lib/modules/Document/DocumentCard/DocumentCard.js | 4 ++-- .../modules/Document/DocumentListEntry/DocumentListEntry.js | 4 ++-- src/lib/pages/backoffice/EItem/EItemEditor/schema.js | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/modules/Document/DocumentCard/DocumentCard.js b/src/lib/modules/Document/DocumentCard/DocumentCard.js index 8ae607ed4..1d57478a7 100644 --- a/src/lib/modules/Document/DocumentCard/DocumentCard.js +++ b/src/lib/modules/Document/DocumentCard/DocumentCard.js @@ -36,7 +36,7 @@ class DocumentCard extends Component { return image; }; - renderEItemLabels = (eitems) => { + renderEItemTypeLabels = (eitems) => { if (eitems.total === 0) { return null; } @@ -108,7 +108,7 @@ class DocumentCard extends Component { On shelf )} - {this.renderEItemLabels(metadata.eitems)} + {this.renderEItemTypeLabels(metadata.eitems)} diff --git a/src/lib/modules/Document/DocumentListEntry/DocumentListEntry.js b/src/lib/modules/Document/DocumentListEntry/DocumentListEntry.js index 677eb412b..e3222e2f7 100644 --- a/src/lib/modules/Document/DocumentListEntry/DocumentListEntry.js +++ b/src/lib/modules/Document/DocumentListEntry/DocumentListEntry.js @@ -21,7 +21,7 @@ class DocumentListEntry extends Component { this.metadata = props.metadata; } - renderEItemTags = (eitems) => { + renderEItemTypeLabels = (eitems) => { if (eitems.total === 0) { return null; } @@ -51,7 +51,7 @@ class DocumentListEntry extends Component { Available for loan ) : null} - {this.renderEItemTags(meta.eitems)} + {this.renderEItemTypeLabels(meta.eitems)} ); } diff --git a/src/lib/pages/backoffice/EItem/EItemEditor/schema.js b/src/lib/pages/backoffice/EItem/EItemEditor/schema.js index d07d4ad9e..81ce91eb7 100644 --- a/src/lib/pages/backoffice/EItem/EItemEditor/schema.js +++ b/src/lib/pages/backoffice/EItem/EItemEditor/schema.js @@ -53,6 +53,7 @@ export const schema = () => { .map((status) => status.text), title: 'EItem type', type: 'string', + default: 'E-BOOK', }, source: { title: 'Source',