update student pages,
This commit is contained in:
@@ -136,7 +136,7 @@ export const layoutConfig = {
|
||||
items: [
|
||||
{ key: 'students', title: 'List students', href: paths.dashboard.students.list },
|
||||
{ key: 'students:create', title: 'Create student', href: paths.dashboard.students.create },
|
||||
{ key: 'students:details', title: 'Student details', href: paths.dashboard.students.details('1') },
|
||||
{ key: 'students:details', title: 'Student details', href: paths.dashboard.students.view('1') },
|
||||
],
|
||||
},
|
||||
// {
|
||||
|
@@ -30,7 +30,10 @@ export function HorizontalLayout({ children }: HorizontalLayoutProps): React.JSX
|
||||
minHeight: '100%',
|
||||
}}
|
||||
>
|
||||
<MainNav color={settings.navColor} items={layoutConfig.navItems} />
|
||||
<MainNav
|
||||
color={settings.navColor}
|
||||
items={layoutConfig.navItems}
|
||||
/>
|
||||
<Box
|
||||
component="main"
|
||||
sx={{
|
||||
|
@@ -40,7 +40,10 @@ export function VerticalLayout({ children }: VerticalLayoutProps): React.JSX.Ele
|
||||
minHeight: '100%',
|
||||
}}
|
||||
>
|
||||
<SideNav color={settings.navColor} items={layoutConfig.navItems} />
|
||||
<SideNav
|
||||
color={settings.navColor}
|
||||
items={layoutConfig.navItems}
|
||||
/>
|
||||
<Box sx={{ display: 'flex', flex: '1 1 auto', flexDirection: 'column', pl: { lg: 'var(--SideNav-width)' } }}>
|
||||
<MainNav items={layoutConfig.navItems} />
|
||||
<Box
|
||||
|
@@ -104,7 +104,7 @@ export function CustomerCreateForm(): React.JSX.Element {
|
||||
// Use standard create method from db/Customers/Create
|
||||
const record = await createCustomer(values);
|
||||
toast.success('Customer created');
|
||||
router.push(paths.dashboard.students.details(record.id));
|
||||
router.push(paths.dashboard.students.view(record.id));
|
||||
} catch (err) {
|
||||
logger.error(err);
|
||||
toast.error('Failed to create customer');
|
||||
|
@@ -44,7 +44,7 @@ function columns(handleDeleteClick: (testId: string) => void): ColumnDef<Student
|
||||
<Link
|
||||
color="inherit"
|
||||
component={RouterLink}
|
||||
href={paths.dashboard.students.details(row.id)}
|
||||
href={paths.dashboard.students.view(row.id)}
|
||||
sx={{ whiteSpace: 'nowrap' }}
|
||||
variant="subtitle2"
|
||||
>
|
||||
@@ -143,7 +143,7 @@ function columns(handleDeleteClick: (testId: string) => void): ColumnDef<Student
|
||||
//
|
||||
color="secondary"
|
||||
component={RouterLink}
|
||||
href={paths.dashboard.students.details(row.id)}
|
||||
href={paths.dashboard.students.view(row.id)}
|
||||
>
|
||||
<PencilSimpleIcon size={24} />
|
||||
</LoadingButton>
|
||||
|
Reference in New Issue
Block a user