diff --git a/ui/package-lock.json b/ui/package-lock.json
index 6ad75c907..4799fe0f8 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -9,7 +9,7 @@
"version": "2.8.3",
"dependencies": {
"@babel/runtime": "^7.9.2",
- "@inveniosoftware/react-invenio-app-ils": "^1.0.0-alpha.86",
+ "@inveniosoftware/react-invenio-app-ils": "^1.0.0-alpha.87",
"@rjsf/core": "^2.5.0",
"@rjsf/semantic-ui": "^2.5.0",
"ajv": "^8.0.0",
@@ -2542,6 +2542,7 @@
"version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
"integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
+ "deprecated": "Use @eslint/config-array instead",
"dependencies": {
"@humanwhocodes/object-schema": "^2.0.2",
"debug": "^4.3.1",
@@ -2566,7 +2567,8 @@
"node_modules/@humanwhocodes/object-schema": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
- "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA=="
+ "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
+ "deprecated": "Use @eslint/object-schema instead"
},
"node_modules/@hypnosphi/create-react-context": {
"version": "0.3.1",
@@ -2608,9 +2610,9 @@
}
},
"node_modules/@inveniosoftware/react-invenio-app-ils": {
- "version": "1.0.0-alpha.86",
- "resolved": "https://registry.npmjs.org/@inveniosoftware/react-invenio-app-ils/-/react-invenio-app-ils-1.0.0-alpha.86.tgz",
- "integrity": "sha512-MLs3FOVuHofmg9A3Wrpok0DiQR1Z9RAthPsJbxS4dgS9LIGtuKpKpQr99ZH+mwVz4ws6Mo5/MtSynj/GvJiblA==",
+ "version": "1.0.0-alpha.87",
+ "resolved": "https://registry.npmjs.org/@inveniosoftware/react-invenio-app-ils/-/react-invenio-app-ils-1.0.0-alpha.87.tgz",
+ "integrity": "sha512-1zf+9qUc5/48KdKaZtFlkztRdGRrdLNPyAKbJSotTF68sBgMsPfJgMiN0S+w2KuKny6fFwA9phuJb1jVH7dmGA==",
"engines": {
"node": ">=14.0.0"
},
@@ -4835,9 +4837,9 @@
}
},
"node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"bin": {
"acorn": "bin/acorn"
},
@@ -4865,10 +4867,10 @@
"node": ">=0.4.0"
}
},
- "node_modules/acorn-import-assertions": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
- "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
+ "node_modules/acorn-import-attributes": {
+ "version": "1.9.5",
+ "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",
+ "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==",
"peerDependencies": {
"acorn": "^8"
}
@@ -5968,9 +5970,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001632",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz",
- "integrity": "sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==",
+ "version": "1.0.30001634",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001634.tgz",
+ "integrity": "sha512-fbBYXQ9q3+yp1q1gBk86tOFs4pyn/yxFm5ZNP18OXJDfA3txImOY9PhfxVggZ4vRHDqoU8NrKU81eN0OtzOgRA==",
"funding": [
{
"type": "opencollective",
@@ -7354,9 +7356,9 @@
}
},
"node_modules/electron-to-chromium": {
- "version": "1.4.796",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.796.tgz",
- "integrity": "sha512-NglN/xprcM+SHD2XCli4oC6bWe6kHoytcyLKCWXmRL854F0qhPhaYgUswUsglnPxYaNQIg2uMY4BvaomIf3kLA=="
+ "version": "1.4.802",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.802.tgz",
+ "integrity": "sha512-TnTMUATbgNdPXVSHsxvNVSG0uEd6cSZsANjm8c9HbvflZVVn1yTRcmVXYT1Ma95/ssB/Dcd30AHweH2TE+dNpA=="
},
"node_modules/emittery": {
"version": "0.8.1",
@@ -8913,9 +8915,9 @@
}
},
"node_modules/foreground-child": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
- "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz",
+ "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==",
"dependencies": {
"cross-spawn": "^7.0.0",
"signal-exit": "^4.0.1"
@@ -12590,9 +12592,9 @@
}
},
"node_modules/jiti": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.3.tgz",
- "integrity": "sha512-uy2bNX5zQ+tESe+TiC7ilGRz8AtRGmnJH55NC5S0nSUjvvvM2hJHmefHErugGXN4pNv4Qx7vLsnNw9qJ9mtIsw==",
+ "version": "1.21.6",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz",
+ "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==",
"bin": {
"jiti": "bin/jiti.js"
}
@@ -15496,6 +15498,7 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==",
+ "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)",
"engines": {
"node": ">=0.6.0",
"teleport": ">=0.2.0"
@@ -18229,10 +18232,13 @@
}
},
"node_modules/ts-node/node_modules/acorn-walk": {
- "version": "8.3.2",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
- "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
+ "version": "8.3.3",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz",
+ "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==",
"dev": true,
+ "dependencies": {
+ "acorn": "^8.11.0"
+ },
"engines": {
"node": ">=0.4.0"
}
@@ -18822,9 +18828,9 @@
}
},
"node_modules/webpack": {
- "version": "5.91.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz",
- "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==",
+ "version": "5.92.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.0.tgz",
+ "integrity": "sha512-Bsw2X39MYIgxouNATyVpCNVWBCuUwDgWtN78g6lSdPJRLaQ/PUVm/oXcaRAyY/sMFoKFQrsPeqvTizWtq7QPCA==",
"dependencies": {
"@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.5",
@@ -18832,10 +18838,10 @@
"@webassemblyjs/wasm-edit": "^1.12.1",
"@webassemblyjs/wasm-parser": "^1.12.1",
"acorn": "^8.7.1",
- "acorn-import-assertions": "^1.9.0",
+ "acorn-import-attributes": "^1.9.5",
"browserslist": "^4.21.10",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.16.0",
+ "enhanced-resolve": "^5.17.0",
"es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -21339,9 +21345,9 @@
}
},
"@inveniosoftware/react-invenio-app-ils": {
- "version": "1.0.0-alpha.86",
- "resolved": "https://registry.npmjs.org/@inveniosoftware/react-invenio-app-ils/-/react-invenio-app-ils-1.0.0-alpha.86.tgz",
- "integrity": "sha512-MLs3FOVuHofmg9A3Wrpok0DiQR1Z9RAthPsJbxS4dgS9LIGtuKpKpQr99ZH+mwVz4ws6Mo5/MtSynj/GvJiblA=="
+ "version": "1.0.0-alpha.87",
+ "resolved": "https://registry.npmjs.org/@inveniosoftware/react-invenio-app-ils/-/react-invenio-app-ils-1.0.0-alpha.87.tgz",
+ "integrity": "sha512-1zf+9qUc5/48KdKaZtFlkztRdGRrdLNPyAKbJSotTF68sBgMsPfJgMiN0S+w2KuKny6fFwA9phuJb1jVH7dmGA=="
},
"@isaacs/cliui": {
"version": "8.0.2",
@@ -22979,9 +22985,9 @@
}
},
"acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg=="
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw=="
},
"acorn-globals": {
"version": "6.0.0",
@@ -22999,10 +23005,10 @@
}
}
},
- "acorn-import-assertions": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
- "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA=="
+ "acorn-import-attributes": {
+ "version": "1.9.5",
+ "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",
+ "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ=="
},
"acorn-jsx": {
"version": "5.3.2",
@@ -23791,9 +23797,9 @@
}
},
"caniuse-lite": {
- "version": "1.0.30001632",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz",
- "integrity": "sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg=="
+ "version": "1.0.30001634",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001634.tgz",
+ "integrity": "sha512-fbBYXQ9q3+yp1q1gBk86tOFs4pyn/yxFm5ZNP18OXJDfA3txImOY9PhfxVggZ4vRHDqoU8NrKU81eN0OtzOgRA=="
},
"case-sensitive-paths-webpack-plugin": {
"version": "2.4.0",
@@ -24769,9 +24775,9 @@
}
},
"electron-to-chromium": {
- "version": "1.4.796",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.796.tgz",
- "integrity": "sha512-NglN/xprcM+SHD2XCli4oC6bWe6kHoytcyLKCWXmRL854F0qhPhaYgUswUsglnPxYaNQIg2uMY4BvaomIf3kLA=="
+ "version": "1.4.802",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.802.tgz",
+ "integrity": "sha512-TnTMUATbgNdPXVSHsxvNVSG0uEd6cSZsANjm8c9HbvflZVVn1yTRcmVXYT1Ma95/ssB/Dcd30AHweH2TE+dNpA=="
},
"emittery": {
"version": "0.8.1",
@@ -25927,9 +25933,9 @@
}
},
"foreground-child": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
- "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz",
+ "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==",
"requires": {
"cross-spawn": "^7.0.0",
"signal-exit": "^4.0.1"
@@ -28506,9 +28512,9 @@
}
},
"jiti": {
- "version": "1.21.3",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.3.tgz",
- "integrity": "sha512-uy2bNX5zQ+tESe+TiC7ilGRz8AtRGmnJH55NC5S0nSUjvvvM2hJHmefHErugGXN4pNv4Qx7vLsnNw9qJ9mtIsw=="
+ "version": "1.21.6",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz",
+ "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w=="
},
"jquery": {
"version": "3.7.1",
@@ -32429,10 +32435,13 @@
},
"dependencies": {
"acorn-walk": {
- "version": "8.3.2",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
- "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
- "dev": true
+ "version": "8.3.3",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz",
+ "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==",
+ "dev": true,
+ "requires": {
+ "acorn": "^8.11.0"
+ }
},
"arg": {
"version": "4.1.3",
@@ -32869,9 +32878,9 @@
"integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="
},
"webpack": {
- "version": "5.91.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz",
- "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==",
+ "version": "5.92.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.0.tgz",
+ "integrity": "sha512-Bsw2X39MYIgxouNATyVpCNVWBCuUwDgWtN78g6lSdPJRLaQ/PUVm/oXcaRAyY/sMFoKFQrsPeqvTizWtq7QPCA==",
"requires": {
"@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.5",
@@ -32879,10 +32888,10 @@
"@webassemblyjs/wasm-edit": "^1.12.1",
"@webassemblyjs/wasm-parser": "^1.12.1",
"acorn": "^8.7.1",
- "acorn-import-assertions": "^1.9.0",
+ "acorn-import-attributes": "^1.9.5",
"browserslist": "^4.21.10",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.16.0",
+ "enhanced-resolve": "^5.17.0",
"es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
diff --git a/ui/package.json b/ui/package.json
index 89e4848c3..f6a96f99b 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -3,7 +3,7 @@
"version": "2.8.3",
"dependencies": {
"@babel/runtime": "^7.9.2",
- "@inveniosoftware/react-invenio-app-ils": "^1.0.0-alpha.86",
+ "@inveniosoftware/react-invenio-app-ils": "^1.0.0-alpha.87",
"@rjsf/core": "^2.5.0",
"@rjsf/semantic-ui": "^2.5.0",
"ajv": "^8.0.0",
diff --git a/ui/src/overridableMapping.js b/ui/src/overridableMapping.js
index b6c6d1ae0..86700cd2b 100644
--- a/ui/src/overridableMapping.js
+++ b/ui/src/overridableMapping.js
@@ -37,6 +37,7 @@ import { OpeningHoursDetails } from "./overridden/frontsite/OpeningHours/Opening
import { PaymentInformationGrid } from "./overridden/backoffice/PaymentInformation/PaymentInformation";
import { OrderDetailsLine } from "./overridden/backoffice/Acquisition/OrderDetails";
import { ItemCirculationShelf } from "./overridden/backoffice/Items/ItemCirculationShelf";
+import { DocumentItemsLayout } from "./overridden/backoffice/Document/DocumentDetails/DocumentItems";
export const overriddenCmps = {
"Backoffice.PatronDetails.Metadata": PatronMetadata,
@@ -71,4 +72,5 @@ export const overriddenCmps = {
"Acquisition.OrderLine": OrderDetailsLine,
"DocumentCirculation.Extras": DocumentCirculationExtras,
"ItemCirculation.backoffice.shelf": ItemCirculationShelf,
+ "DocumentDetails.DocumentItems": DocumentItemsLayout,
};
diff --git a/ui/src/overridden/backoffice/Document/DocumentDetails/DocumentItems.js b/ui/src/overridden/backoffice/Document/DocumentDetails/DocumentItems.js
new file mode 100644
index 000000000..407a5ca79
--- /dev/null
+++ b/ui/src/overridden/backoffice/Document/DocumentDetails/DocumentItems.js
@@ -0,0 +1,76 @@
+import React from "react";
+import { Link } from "react-router-dom";
+import {
+ BackOfficeRoutes,
+ DocumentItems,
+} from "@inveniosoftware/react-invenio-app-ils";
+import _get from "lodash/get";
+import _isEmpty from "lodash/isEmpty";
+import { parametrize } from "react-overridable";
+
+const viewDetails = ({ row }) => {
+ return (
+
+ {row.metadata.barcode}
+
+ );
+};
+
+const locationFormatter = ({ row }) => {
+ return `${row.metadata.internal_location.name} (${row.metadata.internal_location.location.name})`;
+};
+
+const callNumberFormatter = ({ row }) => {
+ if (!_isEmpty(row.metadata.identifiers)) {
+ return row.metadata.identifiers.find(
+ (identifier) => identifier.scheme === "CALL_NUMBER"
+ ).value;
+ }
+ return "-";
+};
+
+const columnFormat = () => {
+ return [
+ {
+ title: "Barcode",
+ field: "metadata.barcode",
+ formatter: viewDetails,
+ },
+ { title: "Status", field: "metadata.status" },
+ { title: "Medium", field: "metadata.medium" },
+ {
+ title: "Location",
+ field: "metadata.internal_location.name",
+ formatter: locationFormatter,
+ },
+ {
+ title: "Call number",
+ field: "metadata.identifiers",
+ formatter: callNumberFormatter,
+ },
+ { title: "Restrictions", field: "metadata.circulation_restriction" },
+ {
+ title: "Loan Status",
+ field: "metadata.circulation.state",
+ formatter: ({ row, col }) => {
+ if (_get(row, col.field) === "ITEM_ON_LOAN") {
+ return (
+
+ on loan
+
+ );
+ }
+ return _get(row, col.field) || "-";
+ },
+ },
+ ];
+};
+
+export const DocumentItemsLayout = parametrize(DocumentItems, {
+ columnFormat: columnFormat,
+});
diff --git a/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js b/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js
index 329f4cbe5..60747bbf8 100644
--- a/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js
+++ b/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js
@@ -1,11 +1,11 @@
-import { isEmpty } from "lodash";
+import _isEmpty from "lodash/isEmpty";
import React from "react";
import { Grid, Icon } from "semantic-ui-react";
import PropTypes from "prop-types";
export const ItemCirculationShelf = ({ metadata }) => {
let callNumber = {};
- if (!isEmpty(metadata.identifiers)) {
+ if (!_isEmpty(metadata.identifiers)) {
callNumber = metadata.identifiers.find(
(identifier) => identifier.scheme === "CALL_NUMBER"
);
@@ -13,8 +13,8 @@ export const ItemCirculationShelf = ({ metadata }) => {
return (
- Call number: {callNumber ? callNumber.value : "missing"} (SHELF:{" "}
- {metadata.shelf ? metadata.shelf : "missing"})
+ Call number: {!_isEmpty(callNumber) ? callNumber.value : "missing"}
+ {metadata.shelf ? ` (SHELF: ${metadata.shelf})` : ""}
);
};