Skip to content

Commit

Permalink
fix(web-client): Improve ux (#303)
Browse files Browse the repository at this point in the history
* fix(web-admin) update deprecated and improved ux

* fix(web-admin): improved ux - easier access to checkin

* refactor(web-admin): cleanup sidebar

* feat(web-admin) : Add users and display users

* fix(core-admin): return volunteer details

* fix(web-admin):improved ux

* fix toolbar
  • Loading branch information
jzf21 authored Feb 17, 2024
1 parent 2e5a9e9 commit 188ce5d
Show file tree
Hide file tree
Showing 5 changed files with 1,796 additions and 1,836 deletions.
9 changes: 8 additions & 1 deletion apps/core-admin/src/controllers/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,15 @@ export const getOrganizationMembers = async (req: Request, res: Response) => {
user: true,
},
});
const users = await prisma.user.findMany({
where: {
id: {
in: organizationUsers.map((ou: { userId: any }) => ou.userId),
},
},
});

return res.status(200).json({ organizationUsers });
return res.status(200).json({ organizationUsers, users });
} catch (err: any) {
console.error(err);
return res.status(500).json({ error: 'Something went wrong' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ export default function Events() {
<DataGrid
rows={participants}
columns={columns}
slots={{
Toolbar: GridToolbar,
}}
slotProps={{
toolbar: {
showQuickFilter: true,
Expand All @@ -122,6 +119,9 @@ export default function Events() {
cursor: 'pointer',
},
}}
slots={{
toolbar: GridToolbar,
}}
onRowClick={handleRowClick}
/>
</ThemeProvider>
Expand Down
29 changes: 19 additions & 10 deletions apps/web-admin/src/pages/organizations/[orgId]/events/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,25 @@ export default function Events() {
<Text fontSize="4xl" fontWeight="bold">
Events
</Text>
<Button
padding="4"
minWidth="-moz-initial"
bgColor="rgb(128, 90, 213)"
color="white"
_hover={{ bgColor: 'rgb(100, 70, 183)' }}
onClick={handleClick}
>
Add Event
</Button>
<Box display={'flex'} gap={4}>
<Button
padding="4"
minWidth="-moz-initial"
bgColor="rgb(128, 90, 213)"
color="white"
_hover={{ bgColor: 'rgb(100, 70, 183)' }}
onClick={handleClick}
>
Add Event
</Button>
<Button
onClick={() => {
router.push(`/organizations/${orgId}/members`);
}}
>
Members
</Button>
</Box>
</Box>
<Box width="100%" height="100%">
<ThemeProvider theme={MuiTheme}>
Expand Down
2 changes: 1 addition & 1 deletion apps/web-admin/src/pages/organizations/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Organizations() {

const [organizations, setOrganizations] = useState([]);
const handleRowClick = (row) => {
router.push(`/organizations/${row.id}`);
router.push(`/organizations/${row.id}/events`);
};

const columns = [
Expand Down
Loading

0 comments on commit 188ce5d

Please sign in to comment.