@applica-software-guru/react-admin 1.0.69 → 1.0.71
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/components/Layout/Header/HeaderContent/Profile.d.ts.map +1 -1
- package/dist/components/MainCard.d.ts.map +1 -1
- package/dist/components/ra-fields/ReferenceManyField.d.ts.map +1 -1
- package/dist/components/ra-forms/Toolbar.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +11 -11
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +38 -30
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +1 -1
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Layout/Header/HeaderContent/Profile.jsx +5 -2
- package/src/components/MainCard.tsx +1 -0
- package/src/components/ra-fields/ReferenceManyField.jsx +7 -0
- package/src/components/ra-forms/Toolbar.jsx +0 -2
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ const Profile = () => {
|
|
|
27
27
|
const theme = useTheme();
|
|
28
28
|
|
|
29
29
|
const { identity } = useGetIdentity();
|
|
30
|
-
|
|
30
|
+
const hasProfilePic = identity !== undefined && identity.image !== null && identity.image !== '';
|
|
31
31
|
const anchorRef = useRef(null);
|
|
32
32
|
const [open, setOpen] = useState(false);
|
|
33
33
|
const handleToggle = () => {
|
|
@@ -51,12 +51,15 @@ const Profile = () => {
|
|
|
51
51
|
}, [authProvider, logout]);
|
|
52
52
|
const [profileImage, setProfileImage] = useState(null);
|
|
53
53
|
useEffect(() => {
|
|
54
|
+
if (!hasProfilePic) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
54
57
|
async function fetchProfileImage() {
|
|
55
58
|
var image = await dataProvider.getFile('/profile/me/image');
|
|
56
59
|
setProfileImage(image);
|
|
57
60
|
}
|
|
58
61
|
fetchProfileImage();
|
|
59
|
-
}, [dataProvider]);
|
|
62
|
+
}, [dataProvider, hasProfilePic]);
|
|
60
63
|
|
|
61
64
|
return (
|
|
62
65
|
<Box sx={{ flexShrink: 0, ml: 0.75 }}>
|
|
@@ -8,6 +8,9 @@ const StyledRoot = styled('div', {
|
|
|
8
8
|
marginLeft: !margin ? `-${theme.spacing(2.5)}` : 0,
|
|
9
9
|
marginRight: !margin ? `-${theme.spacing(2.5)}` : 0,
|
|
10
10
|
borderBottom: border ? `1px solid ${theme.palette.divider}` : 'none',
|
|
11
|
+
'& form': {
|
|
12
|
+
padding: theme.spacing(2)
|
|
13
|
+
},
|
|
11
14
|
'& .MuiCardContent-root': {
|
|
12
15
|
borderTop: border ? `1px solid ${theme.palette.divider}` : 'none'
|
|
13
16
|
},
|
|
@@ -21,6 +24,10 @@ const StyledRoot = styled('div', {
|
|
|
21
24
|
marginTop: 0
|
|
22
25
|
}
|
|
23
26
|
},
|
|
27
|
+
'& .RaDatagrid-root': {
|
|
28
|
+
overflowX: 'auto',
|
|
29
|
+
width: 'calc(100vw - 34px)'
|
|
30
|
+
},
|
|
24
31
|
'& .RaDatagrid-table': {
|
|
25
32
|
borderBottom: `1px solid ${theme.palette.divider}`
|
|
26
33
|
},
|
|
@@ -9,8 +9,6 @@ const ApplicaStyledToolbar = styled(RaToolbar, {
|
|
|
9
9
|
...theme.mixins.toolbar,
|
|
10
10
|
backgroundColor: theme.palette.background.paper,
|
|
11
11
|
justifyContent: 'flex-end',
|
|
12
|
-
// Fix: needed to avoid disalignment with the top content.
|
|
13
|
-
paddingRight: `20px !important`,
|
|
14
12
|
'& .RaToolbar-defaultToolbar': {
|
|
15
13
|
justifyContent: 'right',
|
|
16
14
|
paddingBottom: theme.spacing(2),
|