-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dashboard: refactor directory structure (#995)
Signed-off-by: Teo Koon Peng <[email protected]>
- Loading branch information
Showing
95 changed files
with
654 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 8 additions & 7 deletions
15
packages/dashboard/src/components/admin/add-permission-dialog.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { AddPermissionDialog, AddPermissionDialogProps } from './add-permission-dialog'; | ||
import { AddPermissionDialog } from './add-permission-dialog'; | ||
|
||
export default { | ||
title: 'Admin/Add Permission Dialog', | ||
component: AddPermissionDialog, | ||
} satisfies Meta; | ||
|
||
export const Default: StoryFn<AddPermissionDialogProps> = (args) => { | ||
return ( | ||
type Story = StoryObj<typeof AddPermissionDialog>; | ||
|
||
export const Default: Story = { | ||
storyName: 'Add Permission Dialog', | ||
render: (args) => ( | ||
<AddPermissionDialog | ||
{...args} | ||
open={true} | ||
setOpen={() => {}} | ||
savePermission={() => new Promise((res) => setTimeout(res, 100))} | ||
/> | ||
); | ||
), | ||
}; | ||
|
||
Default.storyName = 'Add Permission Dialog'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
packages/dashboard/src/components/admin/create-role-dialog.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { CreateRoleDialog, CreateRoleDialogProps } from './create-role-dialog'; | ||
import { CreateRoleDialog } from './create-role-dialog'; | ||
|
||
export default { | ||
title: 'Admin/Create Role Dialog', | ||
component: CreateRoleDialog, | ||
} satisfies Meta; | ||
|
||
export const Default: StoryFn<CreateRoleDialogProps> = (args) => { | ||
return ( | ||
type Story = StoryObj<typeof CreateRoleDialog>; | ||
|
||
export const Default: Story = { | ||
storyName: 'Create Role Dialog', | ||
render: (args) => ( | ||
<CreateRoleDialog | ||
{...args} | ||
open={true} | ||
createRole={() => new Promise((res) => setTimeout(res, 100))} | ||
/> | ||
); | ||
), | ||
}; | ||
|
||
Default.storyName = 'Create Role Dialog'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
packages/dashboard/src/components/admin/create-user-dialog.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { CreateUserDialog, CreateUserDialogProps } from './create-user-dialog'; | ||
import { CreateUserDialog } from './create-user-dialog'; | ||
|
||
export default { | ||
title: 'Admin/Create User Dialog', | ||
component: CreateUserDialog, | ||
} satisfies Meta; | ||
|
||
export const Default: StoryFn<CreateUserDialogProps> = (args) => { | ||
return ( | ||
type Story = StoryObj<typeof CreateUserDialog>; | ||
|
||
export const Default: Story = { | ||
storyName: 'Create User Dialog', | ||
render: (args) => ( | ||
<CreateUserDialog | ||
{...args} | ||
open={true} | ||
createUser={() => new Promise((res) => setTimeout(res, 100))} | ||
/> | ||
); | ||
), | ||
}; | ||
|
||
Default.storyName = 'Create User Dialog'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { render } from '@testing-library/react'; | ||
import { MemoryRouter } from 'react-router'; | ||
import { describe, it } from 'vitest'; | ||
|
||
import { AdminDrawer } from './drawer'; | ||
|
||
describe('AdminDrawer', () => { | ||
it('smoke test', () => { | ||
render( | ||
<MemoryRouter> | ||
<AdminDrawer /> | ||
</MemoryRouter>, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.