Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show total file uploaded size #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/sections/dashboard/components/app-user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type RowProps = {
phoneNumber: string;
createdAt: string; // Registration Timestamp
isEmailVerified: boolean;
fileUploadSize: number;
tenancyInfo: {
activeTenancies: number;
inactiveTenancies: number;
Expand Down Expand Up @@ -419,7 +420,7 @@ function AppUserRow({ row, refetch }: AppUserRowProps) {
<TableCell align="center">{row.tenancyInfo.activeTenancies}</TableCell>

<TableCell align="center">{row.tenancyInfo.inactiveTenancies}</TableCell>

<TableCell align="center">{row.fileUploadSize}</TableCell>
<TableCell>
<FormControlLabel
sx={{
Expand Down
1 change: 1 addition & 0 deletions src/sections/dashboard/view/dashboard-index-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default function DashboardView() {
{ id: 'isEmailVerified', label: 'Email Verification', align: 'left' },
{ id: 'activeTenancies', label: 'Active Tenancies' },
{ id: 'inactiveTenancy', label: 'Inactive Tenancies' },
{ id: 'fileUploadSize', label: 'Total Upload' },
{ id: 'status', label: 'Status' },
{ id: '' },
]}
Expand Down
6 changes: 3 additions & 3 deletions src/sections/users/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import AppUser from '../dashboard/components/app-user';
// ----------------------------------------------------------------------

export default function UsersView() {

const settings = useSettingsContext();
const { data: usersData, mutate } = useSWR(endpoints.users, fetcher);

const [users, setUsers] = useState<[]>([]);


Expand All @@ -26,7 +25,7 @@ export default function UsersView() {
setUsers(usersData);
}
}, [usersData]);


return (
<Container maxWidth={settings.themeStretch ? false : 'xl'}>
Expand All @@ -44,6 +43,7 @@ export default function UsersView() {
{ id: 'isEmailVerified', label: 'Email Verification', align: 'left' },
{ id: 'activeTenancies', label: 'Active Tenancies' },
{ id: 'inactiveTenancy', label: 'Inactive Tenancies' },
{ id: 'fileUploadSize', label: 'Total Upload' },
{ id: 'status', label: 'Status' },
{ id: '' },
]}
Expand Down