feat: item read-only details drawer style.

This commit is contained in:
a.bouhuolia
2021-08-24 19:40:49 +02:00
parent 467ac5965e
commit 8a3ab96c53
12 changed files with 177 additions and 93 deletions

View File

@@ -9,12 +9,14 @@ function ItemUniversalSearchSelectComponent({
// #ownProps
resourceType,
resourceId,
onAction,
// #withDrawerActions
openDrawer,
}) {
if (resourceType === RESOURCES_TYPES.ITEM) {
openDrawer('item-detail-drawer', { itemId: resourceId });
onAction && onAction();
}
return null;
}
@@ -29,6 +31,7 @@ export const ItemUniversalSearchSelectAction = withDrawerActions(
* @returns
*/
const transfromItemsToSearch = (item) => ({
id: item.id,
text: item.name,
subText: item.code,
label: item.type,