diff --git a/src/App.tsx b/src/App.tsx index a63710d..e6a5ac8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,10 +1,9 @@ import localForageDataProvider from 'ra-data-local-forage'; import { useEffect, useState } from 'react'; import { Admin, type DataProvider, Resource } from 'react-admin'; +import { Route } from 'react-router-dom'; -import StreamPlansCreate from './resources/stream_plans/StreamPlansCreate'; -import StreamPlansEdit from './resources/stream_plans/StreamPlansEdit'; -import StreamPlansList from './resources/stream_plans/StreamPlansList'; +import streamPlans, { StreamPlansCalendar } from './resources/stream_plans'; import defaultData from '../defaultData.json'; import i18nProvider from './i18nProvider'; @@ -31,12 +30,9 @@ function App() { return ( - + + } /> + ); } diff --git a/src/resources/stream_plans/StreamPlansCalendar.tsx b/src/resources/stream_plans/StreamPlansCalendar.tsx new file mode 100644 index 0000000..12808e8 --- /dev/null +++ b/src/resources/stream_plans/StreamPlansCalendar.tsx @@ -0,0 +1,31 @@ +import { + CreateButton, + Datagrid, + List, + ListButton, + TextField, + TopToolbar, +} from 'react-admin'; +import RecurrenceDayField from '../../atoms/RecurrenceDayField'; + +const ListActions = () => ( + + + + + +); + +function StreamPlansCalendar() { + return ( + }> + + + + + + + ); +} + +export default StreamPlansCalendar; diff --git a/src/resources/stream_plans/StreamPlansList.tsx b/src/resources/stream_plans/StreamPlansList.tsx index 272056c..4288893 100644 --- a/src/resources/stream_plans/StreamPlansList.tsx +++ b/src/resources/stream_plans/StreamPlansList.tsx @@ -1,9 +1,30 @@ -import { Datagrid, List, TextField } from 'react-admin'; +import CalendarMonthIcon from '@mui/icons-material/CalendarMonth'; +import { + Button, + CreateButton, + Datagrid, + Link, + List, + TextField, + TopToolbar, +} from 'react-admin'; import RecurrenceDayField from '../../atoms/RecurrenceDayField'; +const ListActions = () => { + return ( + + + + + + ); +}; + function StreamPlansList() { return ( - + }> diff --git a/src/resources/stream_plans/index.ts b/src/resources/stream_plans/index.ts new file mode 100644 index 0000000..3925bc9 --- /dev/null +++ b/src/resources/stream_plans/index.ts @@ -0,0 +1,12 @@ +import StreamPlansCalendar from './StreamPlansCalendar'; +import StreamPlansCreate from './StreamPlansCreate'; +import StreamPlansEdit from './StreamPlansEdit'; +import StreamPlansList from './StreamPlansList'; + +export default { + list: StreamPlansList, + create: StreamPlansCreate, + edit: StreamPlansEdit, +}; + +export { StreamPlansCalendar };