resolve issues with new features
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
InputAdornment,
|
||||
Chip,
|
||||
Avatar,
|
||||
Fab,
|
||||
Tooltip,
|
||||
Alert,
|
||||
CircularProgress,
|
||||
@@ -33,7 +32,7 @@ import {
|
||||
} from '@mui/icons-material';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import DashboardLayout from '../components/dashboard/DashboardLayout';
|
||||
import { useLayout } from '../contexts/LayoutContext';
|
||||
import ChatAwareFab from '../components/shared/ChatAwareFab';
|
||||
import { useAuth } from '../contexts/AuthContext';
|
||||
import { membersService } from '../services/members';
|
||||
import {
|
||||
@@ -74,8 +73,7 @@ function useDebounce<T>(value: T, delay: number): T {
|
||||
// ----------------------------------------------------------------
|
||||
function Mitglieder() {
|
||||
const navigate = useNavigate();
|
||||
const { user } = useAuth();
|
||||
const { chatPanelOpen } = useLayout(); const canWrite = useCanWrite();
|
||||
const { user } = useAuth(); const canWrite = useCanWrite();
|
||||
|
||||
// --- redirect non-admin/non-kommando users to their own profile ---
|
||||
useEffect(() => {
|
||||
@@ -428,20 +426,13 @@ function Mitglieder() {
|
||||
{/* FAB — only visible to Kommandant/Admin */}
|
||||
{canWrite && (
|
||||
<Tooltip title="Neues Mitglied anlegen">
|
||||
<Fab
|
||||
color="primary"
|
||||
<ChatAwareFab
|
||||
aria-label="Neues Mitglied anlegen"
|
||||
onClick={() => navigate('/mitglieder/neu')}
|
||||
sx={{
|
||||
position: 'fixed',
|
||||
bottom: 32,
|
||||
right: chatPanelOpen ? 376 : 80,
|
||||
transition: 'right 225ms cubic-bezier(0.4, 0, 0.6, 1)',
|
||||
zIndex: (theme) => theme.zIndex.speedDial,
|
||||
}}
|
||||
sx={{ zIndex: (theme) => theme.zIndex.speedDial }}
|
||||
>
|
||||
<AddIcon />
|
||||
</Fab>
|
||||
</ChatAwareFab>
|
||||
</Tooltip>
|
||||
)}
|
||||
</DashboardLayout>
|
||||
|
||||
Reference in New Issue
Block a user