@acvl/frontend-components 0.0.7 → 0.0.8

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/dist/cjs/index.js CHANGED
@@ -25668,7 +25668,7 @@ const typeSwitch = ({ base_object, base_key, response, submitData, useLabel, dat
25668
25668
  return;
25669
25669
  const altered_key = lodash.invoke(props, `${base_key}.alter_key`, base_key);
25670
25670
  const key = altered_key || base_key;
25671
- const altered_obj = lodash.invoke(props, `${base_key}.alter_value`, base_object, get(submitData, 'base_key'));
25671
+ const altered_obj = lodash.invoke(props, `${base_key}.alter_value`, base_object, submitData);
25672
25672
  const object = altered_obj || base_object;
25673
25673
  switch (typeof object) {
25674
25674
  case "string":
@@ -25857,8 +25857,7 @@ const LoadingComponent = (props) => {
25857
25857
  };
25858
25858
 
25859
25859
  const _HistorialDrawer = (props) => {
25860
- // const {pathname} = useLocation();
25861
- const pathname = 'temp';
25860
+ const { pathname } = reactRouterDom.useLocation();
25862
25861
  const api = useAPI();
25863
25862
  const [getHistorial, { data, isLoading, isFetching }] = api.useLazyGetHistorialQuery();
25864
25863
  React.useEffect(() => {
@@ -30707,7 +30706,7 @@ const editColumn = (props) => {
30707
30706
  width: 80,
30708
30707
  cellClassName: 'actions',
30709
30708
  getActions: ({ id, row }) => {
30710
- const canEdit = get(row, 'obj_permissions.can_edit');
30709
+ const canEdit = get(row, 'obj_permissions.edit');
30711
30710
  const isInEditMode = props.rowModesModel[id]?.mode === xDataGrid.GridRowModes.Edit;
30712
30711
  if (isInEditMode) {
30713
30712
  return [
@@ -30716,7 +30715,7 @@ const editColumn = (props) => {
30716
30715
  ];
30717
30716
  }
30718
30717
  return [
30719
- jsxRuntime.jsx(xDataGrid.GridActionsCellItem, { icon: jsxRuntime.jsx(EditIcon, { sx: { color: 'black' } }), label: 'Editar', className: 'textPrimary', onClick: handleEditClick(id), disabled: !canEdit }, 'edit'),
30718
+ jsxRuntime.jsx(xDataGrid.GridActionsCellItem, { icon: jsxRuntime.jsx(EditIcon, { sx: { color: canEdit ? 'black' : 'inherit' } }), label: 'Editar', className: 'textPrimary', onClick: handleEditClick(id), disabled: !canEdit }, 'edit'),
30720
30719
  ];
30721
30720
  }
30722
30721
  }];