@onehat/ui 0.3.364 → 0.3.366

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.364",
3
+ "version": "0.3.366",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -395,6 +395,11 @@ function GridComponent(props) {
395
395
  return;
396
396
  }
397
397
  onEdit();
398
+ } else if (onView) {
399
+ if (canUser && !canUser(VIEW)) { // permissions
400
+ return;
401
+ }
402
+ onView();
398
403
  }
399
404
  }
400
405
  break;
@@ -81,9 +81,8 @@ export default function withPdfButtons(WrappedComponent) {
81
81
 
82
82
  if (!_.isEmpty(ancillaryItems)) {
83
83
  const
84
- ancillaryItemsClone = _.cloneDeep(ancillaryItems),
85
84
  items = [];
86
- _.each(ancillaryItemsClone, (ancillaryItem) => { // clone, as we don't want to alter the item by reference
85
+ _.each(ancillaryItems, (ancillaryItem) => { // clone, as we don't want to alter the item by reference
87
86
  let name;
88
87
  if (ancillaryItem.pdfModel) {
89
88
  name = ancillaryItem.pdfModel;