add new schedules page stub

This commit is contained in:
Maxim 2022-06-15 15:13:44 +03:00
parent e0ff1e29ad
commit b83fcb092c
6 changed files with 89 additions and 1 deletions

View file

@ -9,6 +9,7 @@ module.exports = {
'^assets|^components|^containers|^declare|^icons|^img|^interceptors|^models|^network|^pages|^services|^state|^utils',
},
rules: {
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: false }],
'react/prop-types': 'warn',
'react/display-name': 'warn',
'react/jsx-key': 'warn',
@ -16,7 +17,7 @@ module.exports = {
'react/jsx-no-target-blank': 'warn',
'no-restricted-imports': 'warn',
eqeqeq: 'warn',
'no-duplicate-imports': 'warn',
'no-duplicate-imports': 'error',
'rulesdir/no-relative-import-paths': ['error', { allowSameFolder: true }],
'import/order': [
'error',

View file

@ -13,7 +13,9 @@ import MaintenancePage2 from 'pages/maintenance/Maintenance';
import MigrationTool from 'pages/migration-tool/MigrationTool';
import OrganizationLogPage2 from 'pages/organization-logs/OrganizationLog';
import OutgoingWebhooks2 from 'pages/outgoing_webhooks/OutgoingWebhooks';
import SchedulePage from 'pages/schedule/Schedule';
import SchedulesPage2 from 'pages/schedules/Schedules';
import SchedulesPage from 'pages/schedules_NEW/Schedules';
import SettingsPage2 from 'pages/settings/SettingsPage';
import Test from 'pages/test/Test';
import UsersPage2 from 'pages/users/Users';
@ -62,9 +64,22 @@ export const pages: PageDefinition[] = [
{
component: SchedulesPage2,
icon: 'calendar-alt',
id: 'schedules-old',
text: 'Schedules OLD',
},
{
component: SchedulesPage,
icon: 'calendar-alt',
id: 'schedules',
text: 'Schedules',
},
{
component: SchedulePage,
icon: 'calendar-alt',
id: 'schedule',
text: 'Schedule',
hideFromTabs: true,
},
{
component: ChatOpsPage,
icon: 'comments-alt',

View file

@ -0,0 +1,4 @@
.root {
margin-top: 24px;
}

View file

@ -0,0 +1,30 @@
import React from 'react';
import cn from 'classnames/bind';
import { observer } from 'mobx-react';
import PluginLink from 'components/PluginLink/PluginLink';
import GSelect from 'containers/GSelect/GSelect';
import { PRIVATE_CHANNEL_NAME } from 'models/slack_channel/slack_channel.config';
import { withMobXProviderContext } from 'state/withStore';
import styles from './Schedule.module.css';
const cx = cn.bind(styles);
interface SchedulePageProps {}
interface SchedulePageState {}
@observer
class SchedulePage extends React.Component<SchedulePageProps, SchedulePageState> {
async componentDidMount() {}
componentDidUpdate() {}
render() {
return <div className={cx('root')}>Hello!</div>;
}
}
export default withMobXProviderContext(SchedulePage);

View file

@ -0,0 +1,4 @@
.root {
margin-top: 24px;
}

View file

@ -0,0 +1,34 @@
import React from 'react';
import cn from 'classnames/bind';
import { observer } from 'mobx-react';
import PluginLink from 'components/PluginLink/PluginLink';
import GSelect from 'containers/GSelect/GSelect';
import { PRIVATE_CHANNEL_NAME } from 'models/slack_channel/slack_channel.config';
import { withMobXProviderContext } from 'state/withStore';
import styles from './Schedules.module.css';
const cx = cn.bind(styles);
interface SchedulesPageProps {}
interface SchedulesPageState {}
@observer
class SchedulesPage extends React.Component<SchedulesPageProps, SchedulesPageState> {
async componentDidMount() {}
componentDidUpdate() {}
render() {
return (
<div className={cx('root')}>
<PluginLink query={{ page: 'schedule', id: '1' }}>Schedule 1</PluginLink>
</div>
);
}
}
export default withMobXProviderContext(SchedulesPage);