@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applica-software-guru/react-admin",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -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 }}>
@@ -104,6 +104,7 @@ const MainCard = forwardRef(
104
104
  boxShadow = theme.palette.mode === 'dark' ? boxShadow || true : boxShadow;
105
105
 
106
106
  return (
107
+ /** @ts-ignore */
107
108
  <Card
108
109
  elevation={elevation || 0}
109
110
  ref={ref}
@@ -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),