@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 +4 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/v1/datagrids/wrappers/EditGridWrapper.d.ts +2 -8
- package/dist/esm/index.js +5 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/v1/datagrids/wrappers/EditGridWrapper.d.ts +2 -8
- package/dist/index.d.ts +33 -40
- package/package.json +1 -1
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,
|
|
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
|
-
|
|
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.
|
|
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
|
}];
|