From c144e922be4bf8c48e0fcccf1922fde7a4887b81 Mon Sep 17 00:00:00 2001 From: Saksham Arora Date: Tue, 21 May 2024 11:58:21 +0200 Subject: [PATCH] overriden: backoffice: ItemCirculation: Handle empty shelf value --- .../backoffice/Items/ItemCirculationShelf.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js b/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js index 54d8212e0..18ec4e502 100644 --- a/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js +++ b/ui/src/overridden/backoffice/Items/ItemCirculationShelf.js @@ -1,10 +1,11 @@ import React from "react"; -import { Grid, Embed, Button, Icon } from "semantic-ui-react"; +import { Grid, Embed, Button, Icon, Message, List } from "semantic-ui-react"; import PropTypes from "prop-types"; +import _isEmpty from "lodash/isEmpty"; import { shelfLink } from "../../utils"; export const ItemCirculationShelf = ({ metadata }) => { - return ( + return !_isEmpty(metadata.shelf) ? ( <> @@ -22,6 +23,15 @@ export const ItemCirculationShelf = ({ metadata }) => { + ) : ( + + + + + Shelf location missing! + + + ); };