From e9c7c4a065287b2890582dbef73feed436d70cb5 Mon Sep 17 00:00:00 2001 From: Chunxian Zhang <1836891291@qq.com> Date: Tue, 7 Jun 2022 01:05:11 +0800 Subject: [PATCH] =?UTF-8?q?fe-12=20=E5=AE=8C=E6=88=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lazy-timer-fe/src/pages/Calendar.jsx | 50 ++++ lazy-timer-fe/src/pages/Charts/Calendar.jsx | 50 ---- lazy-timer-fe/src/pages/Charts/ColorPicker.jsx | 31 --- lazy-timer-fe/src/pages/Charts/Customers.jsx | 35 --- lazy-timer-fe/src/pages/Charts/Ecommerce.jsx | 333 ------------------------- lazy-timer-fe/src/pages/Charts/Editor.jsx | 16 -- lazy-timer-fe/src/pages/Charts/Kanban.jsx | 24 -- lazy-timer-fe/src/pages/Charts/Orders.jsx | 31 --- lazy-timer-fe/src/pages/ColorPicker.jsx | 31 +++ lazy-timer-fe/src/pages/Customers.jsx | 35 +++ lazy-timer-fe/src/pages/Ecommerce.jsx | 333 +++++++++++++++++++++++++ lazy-timer-fe/src/pages/Editor.jsx | 16 ++ lazy-timer-fe/src/pages/Employees.jsx | 34 +++ lazy-timer-fe/src/pages/Kanban.jsx | 24 ++ lazy-timer-fe/src/pages/Orders.jsx | 31 +++ 15 files changed, 554 insertions(+), 520 deletions(-) create mode 100644 lazy-timer-fe/src/pages/Calendar.jsx delete mode 100644 lazy-timer-fe/src/pages/Charts/Calendar.jsx delete mode 100644 lazy-timer-fe/src/pages/Charts/ColorPicker.jsx delete mode 100644 lazy-timer-fe/src/pages/Charts/Customers.jsx delete mode 100644 lazy-timer-fe/src/pages/Charts/Ecommerce.jsx delete mode 100644 lazy-timer-fe/src/pages/Charts/Editor.jsx delete mode 100644 lazy-timer-fe/src/pages/Charts/Kanban.jsx delete mode 100644 lazy-timer-fe/src/pages/Charts/Orders.jsx create mode 100644 lazy-timer-fe/src/pages/ColorPicker.jsx create mode 100644 lazy-timer-fe/src/pages/Customers.jsx create mode 100644 lazy-timer-fe/src/pages/Ecommerce.jsx create mode 100644 lazy-timer-fe/src/pages/Editor.jsx create mode 100644 lazy-timer-fe/src/pages/Employees.jsx create mode 100644 lazy-timer-fe/src/pages/Kanban.jsx create mode 100644 lazy-timer-fe/src/pages/Orders.jsx diff --git a/lazy-timer-fe/src/pages/Calendar.jsx b/lazy-timer-fe/src/pages/Calendar.jsx new file mode 100644 index 0000000..ac202e9 --- /dev/null +++ b/lazy-timer-fe/src/pages/Calendar.jsx @@ -0,0 +1,50 @@ +import React, { useState } from 'react' +import { ScheduleComponent, ViewsDirective, ViewDirective, Day, Week, WorkWeek, Month, Agenda, Inject, Resize, DragAndDrop } from '@syncfusion/ej2-react-schedule' +import { DatePickerComponent } from '@syncfusion/ej2-react-calendars' + +import { scheduleData } from '../data/dummy' +import { Header } from '../components' + +// eslint-disable-next-line react/destructuring-assignment +const PropertyPane = props =>
{props.children}
+ +const Scheduler = () => { + const [scheduleObj, setScheduleObj] = useState() + + const change = args => { + scheduleObj.selectedDate = args.value + scheduleObj.dataBind() + } + + const onDragStart = arg => { + // eslint-disable-next-line no-param-reassign + arg.navigation.enable = true + } + + return ( +
+
+ setScheduleObj(schedule)} selectedDate={new Date(2021, 0, 10)} eventSettings={{ dataSource: scheduleData }} dragStart={onDragStart}> + + {['Day', 'Week', 'WorkWeek', 'Month', 'Agenda'].map(item => ( + + ))} + + + + + + + + + + +
+ +
+
+
+ ) +} + +export default Scheduler diff --git a/lazy-timer-fe/src/pages/Charts/Calendar.jsx b/lazy-timer-fe/src/pages/Charts/Calendar.jsx deleted file mode 100644 index ac202e9..0000000 --- a/lazy-timer-fe/src/pages/Charts/Calendar.jsx +++ /dev/null @@ -1,50 +0,0 @@ -import React, { useState } from 'react' -import { ScheduleComponent, ViewsDirective, ViewDirective, Day, Week, WorkWeek, Month, Agenda, Inject, Resize, DragAndDrop } from '@syncfusion/ej2-react-schedule' -import { DatePickerComponent } from '@syncfusion/ej2-react-calendars' - -import { scheduleData } from '../data/dummy' -import { Header } from '../components' - -// eslint-disable-next-line react/destructuring-assignment -const PropertyPane = props =>
{props.children}
- -const Scheduler = () => { - const [scheduleObj, setScheduleObj] = useState() - - const change = args => { - scheduleObj.selectedDate = args.value - scheduleObj.dataBind() - } - - const onDragStart = arg => { - // eslint-disable-next-line no-param-reassign - arg.navigation.enable = true - } - - return ( -
-
- setScheduleObj(schedule)} selectedDate={new Date(2021, 0, 10)} eventSettings={{ dataSource: scheduleData }} dragStart={onDragStart}> - - {['Day', 'Week', 'WorkWeek', 'Month', 'Agenda'].map(item => ( - - ))} - - - - - - - - - - -
- -
-
-
- ) -} - -export default Scheduler diff --git a/lazy-timer-fe/src/pages/Charts/ColorPicker.jsx b/lazy-timer-fe/src/pages/Charts/ColorPicker.jsx deleted file mode 100644 index 3c9c678..0000000 --- a/lazy-timer-fe/src/pages/Charts/ColorPicker.jsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react' -import { ColorPickerComponent } from '@syncfusion/ej2-react-inputs' - -import { Header } from '../components' - -const change = args => { - document.getElementById('preview').style.backgroundColor = args.currentValue.hex -} - -const CustomColorPicker = ({ id, mode }) => - -const ColorPicker = () => ( -
-
-
-
-
-
-

Inline Pallete

- -
-
-

Inline Picker

- -
-
-
-
-) - -export default ColorPicker diff --git a/lazy-timer-fe/src/pages/Charts/Customers.jsx b/lazy-timer-fe/src/pages/Charts/Customers.jsx deleted file mode 100644 index 599e895..0000000 --- a/lazy-timer-fe/src/pages/Charts/Customers.jsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { GridComponent, ColumnsDirective, ColumnDirective, Page, Selection, Inject, Edit, Toolbar, Sort, Filter } from '@syncfusion/ej2-react-grids'; - -import { customersData, customersGrid } from '../data/dummy'; -import { Header } from '../components'; - -const Customers = () => { - const selectionsettings = { persistSelection: true }; - const toolbarOptions = ['Delete']; - const editing = { allowDeleting: true, allowEditing: true }; - - return ( -
-
- - - {/* eslint-disable-next-line react/jsx-props-no-spreading */} - {customersGrid.map((item, index) => )} - - - -
- ); -}; - -export default Customers; diff --git a/lazy-timer-fe/src/pages/Charts/Ecommerce.jsx b/lazy-timer-fe/src/pages/Charts/Ecommerce.jsx deleted file mode 100644 index 5308178..0000000 --- a/lazy-timer-fe/src/pages/Charts/Ecommerce.jsx +++ /dev/null @@ -1,333 +0,0 @@ -import React from 'react'; -import { BsCurrencyDollar } from 'react-icons/bs'; -import { GoPrimitiveDot } from 'react-icons/go'; -import { IoIosMore } from 'react-icons/io'; -import { DropDownListComponent } from '@syncfusion/ej2-react-dropdowns'; - -import { Stacked, Pie, Button, LineChart, SparkLine } from '../components'; -import { earningData, medicalproBranding, recentTransactions, weeklyStats, dropdownData, SparklineAreaData, ecomPieChartData } from '../data/dummy'; -import { useStateContext } from '../contexts/ContextProvider'; -import product9 from '../data/product9.jpg'; - -const DropDown = ({ currentMode }) => ( -
- -
-); - -const Ecommerce = () => { - const { currentColor, currentMode } = useStateContext(); - - return ( -
-
-
-
-
-

Earnings

-

$63,448.78

-
- -
-
-
-
-
- {earningData.map((item) => ( -
- -

- {item.amount} - - {item.percentage} - -

-

{item.title}

-
- ))} -
-
- -
-
-
-

Revenue Updates

-
-

- - - - Expense -

-

- - - - Budget -

-
-
-
-
-
-

- $93,438 - - 23% - -

-

Budget

-
-
-

$48,487

- -

Expense

-
- -
- -
-
-
-
-
- -
-
-
-
-
-
-

Earnings

- -
-

$63,448.78

-

Monthly revenue

-
-
- -
- -
-
- -
-
-

$43,246

-

Yearly sales

-
- -
- -
-
-
-
- -
-
-
-

Recent Transactions

- -
-
- {recentTransactions.map((item) => ( -
-
- -
-

{item.title}

-

{item.desc}

-
-
-

{item.amount}

-
- ))} -
-
-
-
- -

36 Recent Transactions

-
-
-
-
-

Sales Overview

- -
-
- -
-
-
- -
-
-
-

Weekly Stats

- -
- -
- {weeklyStats.map((item) => ( -
-
- -
-

{item.title}

-

{item.desc}

-
-
- -

{item.amount}

-
- ))} -
- -
-
- -
-
-
-

MedicalPro Branding

- -
-

- 16 APR, 2021 -

- -
- {medicalproBranding.data.map((item) => ( -
-

{item.title}

-

{item.desc}

-
- ))} -
-
-

Teams

- -
- {medicalproBranding.teams.map((item) => ( -

- {item.name} -

- ))} -
-
-
-

Leaders

-
- {medicalproBranding.leaders.map((item, index) => ( - - ))} -
-
-
-
-
- -

36 Recent Transactions

-
-
-
-
-

Daily Activities

- -
-
- -
-

React 18 coming soon!

-

By Johnathan Doe

-

- This will be the small description for the news you have shown - here. There could be some great info. -

-
-
-
-
-
-
-
- ); -}; - -export default Ecommerce; diff --git a/lazy-timer-fe/src/pages/Charts/Editor.jsx b/lazy-timer-fe/src/pages/Charts/Editor.jsx deleted file mode 100644 index ac855b6..0000000 --- a/lazy-timer-fe/src/pages/Charts/Editor.jsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { HtmlEditor, Image, Inject, Link, QuickToolbar, RichTextEditorComponent, Toolbar } from '@syncfusion/ej2-react-richtexteditor'; - -import { Header } from '../components'; -import { EditorData } from '../data/dummy'; - -const Editor = () => ( -
-
- - - - -
-); -export default Editor; diff --git a/lazy-timer-fe/src/pages/Charts/Kanban.jsx b/lazy-timer-fe/src/pages/Charts/Kanban.jsx deleted file mode 100644 index 99a9870..0000000 --- a/lazy-timer-fe/src/pages/Charts/Kanban.jsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import { KanbanComponent, ColumnsDirective, ColumnDirective } from '@syncfusion/ej2-react-kanban'; - -import { kanbanData, kanbanGrid } from '../data/dummy'; -import { Header } from '../components'; - -const Kanban = () => ( -
-
- - - {/* eslint-disable-next-line react/jsx-props-no-spreading */} - {kanbanGrid.map((item, index) => )} - - -
-); - -export default Kanban; diff --git a/lazy-timer-fe/src/pages/Charts/Orders.jsx b/lazy-timer-fe/src/pages/Charts/Orders.jsx deleted file mode 100644 index 818b4fa..0000000 --- a/lazy-timer-fe/src/pages/Charts/Orders.jsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { GridComponent, ColumnsDirective, ColumnDirective, Resize, Sort, ContextMenu, Filter, Page, ExcelExport, PdfExport, Edit, Inject } from '@syncfusion/ej2-react-grids'; - -import { ordersData, contextMenuItems, ordersGrid } from '../data/dummy'; -import { Header } from '../components'; - -const Orders = () => { - const editing = { allowDeleting: true, allowEditing: true }; - return ( -
-
- - - {/* eslint-disable-next-line react/jsx-props-no-spreading */} - {ordersGrid.map((item, index) => )} - - - -
- ); -}; -export default Orders; diff --git a/lazy-timer-fe/src/pages/ColorPicker.jsx b/lazy-timer-fe/src/pages/ColorPicker.jsx new file mode 100644 index 0000000..3c9c678 --- /dev/null +++ b/lazy-timer-fe/src/pages/ColorPicker.jsx @@ -0,0 +1,31 @@ +import React from 'react' +import { ColorPickerComponent } from '@syncfusion/ej2-react-inputs' + +import { Header } from '../components' + +const change = args => { + document.getElementById('preview').style.backgroundColor = args.currentValue.hex +} + +const CustomColorPicker = ({ id, mode }) => + +const ColorPicker = () => ( +
+
+
+
+
+
+

Inline Pallete

+ +
+
+

Inline Picker

+ +
+
+
+
+) + +export default ColorPicker diff --git a/lazy-timer-fe/src/pages/Customers.jsx b/lazy-timer-fe/src/pages/Customers.jsx new file mode 100644 index 0000000..599e895 --- /dev/null +++ b/lazy-timer-fe/src/pages/Customers.jsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { GridComponent, ColumnsDirective, ColumnDirective, Page, Selection, Inject, Edit, Toolbar, Sort, Filter } from '@syncfusion/ej2-react-grids'; + +import { customersData, customersGrid } from '../data/dummy'; +import { Header } from '../components'; + +const Customers = () => { + const selectionsettings = { persistSelection: true }; + const toolbarOptions = ['Delete']; + const editing = { allowDeleting: true, allowEditing: true }; + + return ( +
+
+ + + {/* eslint-disable-next-line react/jsx-props-no-spreading */} + {customersGrid.map((item, index) => )} + + + +
+ ); +}; + +export default Customers; diff --git a/lazy-timer-fe/src/pages/Ecommerce.jsx b/lazy-timer-fe/src/pages/Ecommerce.jsx new file mode 100644 index 0000000..5308178 --- /dev/null +++ b/lazy-timer-fe/src/pages/Ecommerce.jsx @@ -0,0 +1,333 @@ +import React from 'react'; +import { BsCurrencyDollar } from 'react-icons/bs'; +import { GoPrimitiveDot } from 'react-icons/go'; +import { IoIosMore } from 'react-icons/io'; +import { DropDownListComponent } from '@syncfusion/ej2-react-dropdowns'; + +import { Stacked, Pie, Button, LineChart, SparkLine } from '../components'; +import { earningData, medicalproBranding, recentTransactions, weeklyStats, dropdownData, SparklineAreaData, ecomPieChartData } from '../data/dummy'; +import { useStateContext } from '../contexts/ContextProvider'; +import product9 from '../data/product9.jpg'; + +const DropDown = ({ currentMode }) => ( +
+ +
+); + +const Ecommerce = () => { + const { currentColor, currentMode } = useStateContext(); + + return ( +
+
+
+
+
+

Earnings

+

$63,448.78

+
+ +
+
+
+
+
+ {earningData.map((item) => ( +
+ +

+ {item.amount} + + {item.percentage} + +

+

{item.title}

+
+ ))} +
+
+ +
+
+
+

Revenue Updates

+
+

+ + + + Expense +

+

+ + + + Budget +

+
+
+
+
+
+

+ $93,438 + + 23% + +

+

Budget

+
+
+

$48,487

+ +

Expense

+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+
+

Earnings

+ +
+

$63,448.78

+

Monthly revenue

+
+
+ +
+ +
+
+ +
+
+

$43,246

+

Yearly sales

+
+ +
+ +
+
+
+
+ +
+
+
+

Recent Transactions

+ +
+
+ {recentTransactions.map((item) => ( +
+
+ +
+

{item.title}

+

{item.desc}

+
+
+

{item.amount}

+
+ ))} +
+
+
+
+ +

36 Recent Transactions

+
+
+
+
+

Sales Overview

+ +
+
+ +
+
+
+ +
+
+
+

Weekly Stats

+ +
+ +
+ {weeklyStats.map((item) => ( +
+
+ +
+

{item.title}

+

{item.desc}

+
+
+ +

{item.amount}

+
+ ))} +
+ +
+
+ +
+
+
+

MedicalPro Branding

+ +
+

+ 16 APR, 2021 +

+ +
+ {medicalproBranding.data.map((item) => ( +
+

{item.title}

+

{item.desc}

+
+ ))} +
+
+

Teams

+ +
+ {medicalproBranding.teams.map((item) => ( +

+ {item.name} +

+ ))} +
+
+
+

Leaders

+
+ {medicalproBranding.leaders.map((item, index) => ( + + ))} +
+
+
+
+
+ +

36 Recent Transactions

+
+
+
+
+

Daily Activities

+ +
+
+ +
+

React 18 coming soon!

+

By Johnathan Doe

+

+ This will be the small description for the news you have shown + here. There could be some great info. +

+
+
+
+
+
+
+
+ ); +}; + +export default Ecommerce; diff --git a/lazy-timer-fe/src/pages/Editor.jsx b/lazy-timer-fe/src/pages/Editor.jsx new file mode 100644 index 0000000..ac855b6 --- /dev/null +++ b/lazy-timer-fe/src/pages/Editor.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { HtmlEditor, Image, Inject, Link, QuickToolbar, RichTextEditorComponent, Toolbar } from '@syncfusion/ej2-react-richtexteditor'; + +import { Header } from '../components'; +import { EditorData } from '../data/dummy'; + +const Editor = () => ( +
+
+ + + + +
+); +export default Editor; diff --git a/lazy-timer-fe/src/pages/Employees.jsx b/lazy-timer-fe/src/pages/Employees.jsx new file mode 100644 index 0000000..b2918ef --- /dev/null +++ b/lazy-timer-fe/src/pages/Employees.jsx @@ -0,0 +1,34 @@ +import React from 'react'; +import { GridComponent, Inject, ColumnsDirective, ColumnDirective, Search, Page } from '@syncfusion/ej2-react-grids'; + +import { employeesData, employeesGrid } from '../data/dummy'; +import { Header } from '../components'; + +const Employees = () => { + const toolbarOptions = ['Search']; + + const editing = { allowDeleting: true, allowEditing: true }; + + return ( +
+
+ + + {/* eslint-disable-next-line react/jsx-props-no-spreading */} + {employeesGrid.map((item, index) => )} + + + + +
+ ); +}; +export default Employees; diff --git a/lazy-timer-fe/src/pages/Kanban.jsx b/lazy-timer-fe/src/pages/Kanban.jsx new file mode 100644 index 0000000..99a9870 --- /dev/null +++ b/lazy-timer-fe/src/pages/Kanban.jsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { KanbanComponent, ColumnsDirective, ColumnDirective } from '@syncfusion/ej2-react-kanban'; + +import { kanbanData, kanbanGrid } from '../data/dummy'; +import { Header } from '../components'; + +const Kanban = () => ( +
+
+ + + {/* eslint-disable-next-line react/jsx-props-no-spreading */} + {kanbanGrid.map((item, index) => )} + + +
+); + +export default Kanban; diff --git a/lazy-timer-fe/src/pages/Orders.jsx b/lazy-timer-fe/src/pages/Orders.jsx new file mode 100644 index 0000000..818b4fa --- /dev/null +++ b/lazy-timer-fe/src/pages/Orders.jsx @@ -0,0 +1,31 @@ +import React from 'react'; +import { GridComponent, ColumnsDirective, ColumnDirective, Resize, Sort, ContextMenu, Filter, Page, ExcelExport, PdfExport, Edit, Inject } from '@syncfusion/ej2-react-grids'; + +import { ordersData, contextMenuItems, ordersGrid } from '../data/dummy'; +import { Header } from '../components'; + +const Orders = () => { + const editing = { allowDeleting: true, allowEditing: true }; + return ( +
+
+ + + {/* eslint-disable-next-line react/jsx-props-no-spreading */} + {ordersGrid.map((item, index) => )} + + + +
+ ); +}; +export default Orders;