diff --git a/front/src/stories/layout/navbar/NavItem.stories.tsx b/front/src/layout/navbar/__stories__/NavItem.stories.tsx
similarity index 100%
rename from front/src/stories/layout/navbar/NavItem.stories.tsx
rename to front/src/layout/navbar/__stories__/NavItem.stories.tsx
diff --git a/front/src/stories/layout/navbar/Navbar.stories.tsx b/front/src/layout/navbar/__stories__/Navbar.stories.tsx
similarity index 81%
rename from front/src/stories/layout/navbar/Navbar.stories.tsx
rename to front/src/layout/navbar/__stories__/Navbar.stories.tsx
index 841b4c6df7..63dca6b2a2 100644
--- a/front/src/stories/layout/navbar/Navbar.stories.tsx
+++ b/front/src/layout/navbar/__stories__/Navbar.stories.tsx
@@ -1,6 +1,6 @@
import { MemoryRouter } from 'react-router-dom';
-import Navbar from '../../../layout/navbar/Navbar';
+import Navbar from '../Navbar';
export default {
title: 'Navbar',
diff --git a/front/src/tests/layout/navbar/NavItem.test.tsx b/front/src/layout/navbar/__tests__/NavItem.test.tsx
similarity index 80%
rename from front/src/tests/layout/navbar/NavItem.test.tsx
rename to front/src/layout/navbar/__tests__/NavItem.test.tsx
index 7d94194eb3..f235428b40 100644
--- a/front/src/tests/layout/navbar/NavItem.test.tsx
+++ b/front/src/layout/navbar/__tests__/NavItem.test.tsx
@@ -1,6 +1,6 @@
import { render, fireEvent } from '@testing-library/react';
-import { NavItemDefault } from '../../../stories/layout/navbar/NavItem.stories'; //👈 Our stories imported here.
+import { NavItemDefault } from '../__stories__/NavItem.stories';
const mockedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
diff --git a/front/src/tests/layout/navbar/Navbar.test.tsx b/front/src/layout/navbar/__tests__/Navbar.test.tsx
similarity index 81%
rename from front/src/tests/layout/navbar/Navbar.test.tsx
rename to front/src/layout/navbar/__tests__/Navbar.test.tsx
index 0e813259e7..b0bdb95535 100644
--- a/front/src/tests/layout/navbar/Navbar.test.tsx
+++ b/front/src/layout/navbar/__tests__/Navbar.test.tsx
@@ -1,6 +1,6 @@
import { render } from '@testing-library/react';
-import { NavbarOnInsights } from '../../../stories/layout/navbar/Navbar.stories';
+import { NavbarOnInsights } from '../__stories__/Navbar.stories';
it('Checks the NavItem renders', () => {
const { getByRole } = render();
diff --git a/front/src/pages/inbox/Inbox.tsx b/front/src/pages/inbox/Inbox.tsx
index 4a0779ee3a..6d876e6816 100644
--- a/front/src/pages/inbox/Inbox.tsx
+++ b/front/src/pages/inbox/Inbox.tsx
@@ -1,10 +1,10 @@
import FullWidthContainer from '../../layout/containers/FullWidthContainer';
-import TaskList from './TaskList';
+import ListPanel from './ListPanel';
function Inbox() {
return (
-
+
);
}
diff --git a/front/src/pages/inbox/TaskList.tsx b/front/src/pages/inbox/ListPanel.tsx
similarity index 79%
rename from front/src/pages/inbox/TaskList.tsx
rename to front/src/pages/inbox/ListPanel.tsx
index 102885df60..cf1752d894 100644
--- a/front/src/pages/inbox/TaskList.tsx
+++ b/front/src/pages/inbox/ListPanel.tsx
@@ -1,6 +1,6 @@
import styled from '@emotion/styled';
-import TaskListHeader from './TaskListHeader';
-import TaskListItem from './TaskListItem';
+import ListPanelHeader from './ListPanelHeader';
+import ListPanelItem from './ListPanelItem';
const StyledList = styled.div`
display: flex;
@@ -17,7 +17,7 @@ export type Task = {
lastMessage: string;
};
-function TaskList() {
+function ListPanel() {
const tasks: Task[] = [
{
id: 1,
@@ -38,13 +38,13 @@ function TaskList() {
return (
<>
-
+
{tasks.map((item) => (
-
+
))}
>
);
}
-export default TaskList;
+export default ListPanel;
diff --git a/front/src/pages/inbox/TaskListHeader.tsx b/front/src/pages/inbox/ListPanelHeader.tsx
similarity index 82%
rename from front/src/pages/inbox/TaskListHeader.tsx
rename to front/src/pages/inbox/ListPanelHeader.tsx
index 78627cc4c5..1d0a0ad81e 100644
--- a/front/src/pages/inbox/TaskListHeader.tsx
+++ b/front/src/pages/inbox/ListPanelHeader.tsx
@@ -10,8 +10,8 @@ const StyledHeader = styled.div`
border-bottom: 1px solid #eaecee;
`;
-function TaskListHeader() {
+function ListPanelHeader() {
return 6 tasks waiting;
}
-export default TaskListHeader;
+export default ListPanelHeader;
diff --git a/front/src/pages/inbox/TaskListItem.tsx b/front/src/pages/inbox/ListPanelItem.tsx
similarity index 94%
rename from front/src/pages/inbox/TaskListItem.tsx
rename to front/src/pages/inbox/ListPanelItem.tsx
index 510a038000..c1a7d570df 100644
--- a/front/src/pages/inbox/TaskListItem.tsx
+++ b/front/src/pages/inbox/ListPanelItem.tsx
@@ -1,5 +1,5 @@
import styled from '@emotion/styled';
-import { Task } from './TaskList';
+import { Task } from './ListPanel';
type OwnProps = {
task: Task;
@@ -72,7 +72,7 @@ const StyledContent = styled.div`
margin-top: 8px;
`;
-function TaskListItem({ task }: OwnProps) {
+function ListPanelItem({ task }: OwnProps) {
return (
@@ -95,4 +95,4 @@ function TaskListItem({ task }: OwnProps) {
);
}
-export default TaskListItem;
+export default ListPanelItem;
diff --git a/front/src/pages/inbox/PluginPanel.tsx b/front/src/pages/inbox/PluginPanel.tsx
new file mode 100644
index 0000000000..cf1752d894
--- /dev/null
+++ b/front/src/pages/inbox/PluginPanel.tsx
@@ -0,0 +1,50 @@
+import styled from '@emotion/styled';
+import ListPanelHeader from './ListPanelHeader';
+import ListPanelItem from './ListPanelItem';
+
+const StyledList = styled.div`
+ display: flex;
+ width: 325px;
+ flex-direction: column;
+ border-right: 2px solid #eaecee;
+`;
+
+export type Task = {
+ id: number;
+ targetUser: string;
+ label: string;
+ time: string;
+ lastMessage: string;
+};
+
+function ListPanel() {
+ const tasks: Task[] = [
+ {
+ id: 1,
+ targetUser: 'Sylvie Vartan',
+ label: 'Guest at #xxx property',
+ time: '3h',
+ lastMessage:
+ 'I’m looking for my order but couldn’t find it. Could you help me find it. I don’t know where ...',
+ },
+ {
+ id: 2,
+ targetUser: 'Johnny Halliday',
+ label: 'Guest at #xxx property',
+ time: '4h',
+ lastMessage: 'Hello, this is Johnny',
+ },
+ ];
+ return (
+
+ <>
+
+ {tasks.map((item) => (
+
+ ))}
+ >
+
+ );
+}
+
+export default ListPanel;
diff --git a/front/src/stories/pages/inbox/Inbox.stories.tsx b/front/src/pages/inbox/__stories__/Inbox.stories.tsx
similarity index 80%
rename from front/src/stories/pages/inbox/Inbox.stories.tsx
rename to front/src/pages/inbox/__stories__/Inbox.stories.tsx
index 97aa92fa97..b91c1fe470 100644
--- a/front/src/stories/pages/inbox/Inbox.stories.tsx
+++ b/front/src/pages/inbox/__stories__/Inbox.stories.tsx
@@ -1,5 +1,5 @@
import { MemoryRouter } from 'react-router-dom';
-import Inbox from '../../../pages/inbox/Inbox';
+import Inbox from '../Inbox';
export default {
title: 'Inbox',
diff --git a/front/src/pages/inbox/__stories__/ListPanel.stories.tsx b/front/src/pages/inbox/__stories__/ListPanel.stories.tsx
new file mode 100644
index 0000000000..5ff9c50e3b
--- /dev/null
+++ b/front/src/pages/inbox/__stories__/ListPanel.stories.tsx
@@ -0,0 +1,8 @@
+import ListPanel from '../ListPanel';
+
+export default {
+ title: 'Inbox',
+ component: ListPanel,
+};
+
+export const ListPanelDefault = () => ;
diff --git a/front/src/pages/inbox/__stories__/ListPanelHeader.stories.tsx b/front/src/pages/inbox/__stories__/ListPanelHeader.stories.tsx
new file mode 100644
index 0000000000..8564816bb9
--- /dev/null
+++ b/front/src/pages/inbox/__stories__/ListPanelHeader.stories.tsx
@@ -0,0 +1,9 @@
+import { MemoryRouter } from 'react-router-dom';
+import ListPanelHeader from '../ListPanelHeader';
+
+export default {
+ title: 'Inbox',
+ component: ListPanelHeader,
+};
+
+export const ListPanelHeaderDefault = () => ;
diff --git a/front/src/stories/pages/inbox/TaskListItem.stories.tsx b/front/src/pages/inbox/__stories__/ListPanelItem.stories.tsx
similarity index 70%
rename from front/src/stories/pages/inbox/TaskListItem.stories.tsx
rename to front/src/pages/inbox/__stories__/ListPanelItem.stories.tsx
index 143dce87a9..d089994dbd 100644
--- a/front/src/stories/pages/inbox/TaskListItem.stories.tsx
+++ b/front/src/pages/inbox/__stories__/ListPanelItem.stories.tsx
@@ -1,13 +1,13 @@
import { MemoryRouter } from 'react-router-dom';
-import TaskListItem from '../../../pages/inbox/TaskListItem';
+import ListPanelItem from '../ListPanelItem';
export default {
title: 'Inbox',
- component: TaskListItem,
+ component: ListPanelItem,
};
-export const TaskListItemDefault = () => (
- (
+ {
const { getAllByRole } = render();
diff --git a/front/src/tests/pages/inbox/TaskList.test.tsx b/front/src/pages/inbox/__tests__/ListPanel.test.tsx
similarity index 58%
rename from front/src/tests/pages/inbox/TaskList.test.tsx
rename to front/src/pages/inbox/__tests__/ListPanel.test.tsx
index 8ae9b42f54..c342947774 100644
--- a/front/src/tests/pages/inbox/TaskList.test.tsx
+++ b/front/src/pages/inbox/__tests__/ListPanel.test.tsx
@@ -1,9 +1,9 @@
import { render } from '@testing-library/react';
-import { TaskListDefault } from '../../../stories/pages/inbox/TaskList.stories';
+import { ListPanelDefault } from '../__stories__/ListPanel.stories';
it('Checks the task list render', () => {
- const { getAllByRole } = render();
+ const { getAllByRole } = render();
const button = getAllByRole('button');
expect(button[0]).toHaveTextContent('Sylvie Vartan');
diff --git a/front/src/pages/inbox/__tests__/ListPanelHeader.test.tsx b/front/src/pages/inbox/__tests__/ListPanelHeader.test.tsx
new file mode 100644
index 0000000000..5c18987bac
--- /dev/null
+++ b/front/src/pages/inbox/__tests__/ListPanelHeader.test.tsx
@@ -0,0 +1,10 @@
+import { render } from '@testing-library/react';
+
+import { ListPanelHeaderDefault } from '../__stories__/ListPanelHeader.stories';
+
+it('Checks the ListPanelHeader render', () => {
+ const { getAllByText } = render();
+
+ const text = getAllByText('6 tasks waiting');
+ expect(text).toBeDefined();
+});
diff --git a/front/src/pages/inbox/__tests__/ListPanelItem.test.tsx b/front/src/pages/inbox/__tests__/ListPanelItem.test.tsx
new file mode 100644
index 0000000000..efe251375d
--- /dev/null
+++ b/front/src/pages/inbox/__tests__/ListPanelItem.test.tsx
@@ -0,0 +1,10 @@
+import { render } from '@testing-library/react';
+
+import { ListPanelItemDefault } from '../__stories__/ListPanelItem.stories';
+
+it('Checks the ListPanelItem render', () => {
+ const { getAllByText } = render();
+
+ const text = getAllByText('Sylvie Vartan');
+ expect(text).toBeDefined();
+});
diff --git a/front/src/stories/pages/inbox/TaskList.stories.tsx b/front/src/stories/pages/inbox/TaskList.stories.tsx
deleted file mode 100644
index 70eec25ec0..0000000000
--- a/front/src/stories/pages/inbox/TaskList.stories.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import TaskList from '../../../pages/inbox/TaskList';
-
-export default {
- title: 'Inbox',
- component: TaskList,
-};
-
-export const TaskListDefault = () => ;
diff --git a/front/src/stories/pages/inbox/TaskListHeader.stories.tsx b/front/src/stories/pages/inbox/TaskListHeader.stories.tsx
deleted file mode 100644
index 58a5aa3b26..0000000000
--- a/front/src/stories/pages/inbox/TaskListHeader.stories.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { MemoryRouter } from 'react-router-dom';
-import TaskListHeader from '../../../pages/inbox/TaskListHeader';
-
-export default {
- title: 'Inbox',
- component: TaskListHeader,
-};
-
-export const TaskListHeaderDefault = () => ;
diff --git a/front/src/tests/pages/inbox/TaskListHeader.test.tsx b/front/src/tests/pages/inbox/TaskListHeader.test.tsx
deleted file mode 100644
index e5ce2625c9..0000000000
--- a/front/src/tests/pages/inbox/TaskListHeader.test.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { render } from '@testing-library/react';
-
-import { TaskListHeaderDefault } from '../../../stories/pages/inbox/TaskListHeader.stories';
-
-it('Checks the TaskListHeader render', () => {
- const { getAllByText } = render();
-
- const text = getAllByText('6 tasks waiting');
- expect(text).toBeDefined();
-});
diff --git a/front/src/tests/pages/inbox/TaskListItem.test.tsx b/front/src/tests/pages/inbox/TaskListItem.test.tsx
deleted file mode 100644
index a9d9bf64a5..0000000000
--- a/front/src/tests/pages/inbox/TaskListItem.test.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { render } from '@testing-library/react';
-
-import { TaskListItemDefault } from '../../../stories/pages/inbox/TaskListItem.stories';
-
-it('Checks the TaskListItem render', () => {
- const { getAllByText } = render();
-
- const text = getAllByText('Sylvie Vartan');
- expect(text).toBeDefined();
-});