|
@@ -1,10 +1,7 @@
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
|
import PropTypes from 'prop-types';
|
|
import PropTypes from 'prop-types';
|
|
|
import { withTranslation } from 'react-i18next';
|
|
import { withTranslation } from 'react-i18next';
|
|
|
-import {
|
|
|
|
|
- Card, CardBody,
|
|
|
|
|
- // UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem,
|
|
|
|
|
-} from 'reactstrap';
|
|
|
|
|
|
|
+import { Card, CardBody } from 'reactstrap';
|
|
|
|
|
|
|
|
import { withUnstatedContainers } from '../../UnstatedUtils';
|
|
import { withUnstatedContainers } from '../../UnstatedUtils';
|
|
|
import { toastSuccess, toastError } from '../../../util/apiNotification';
|
|
import { toastSuccess, toastError } from '../../../util/apiNotification';
|
|
@@ -42,37 +39,6 @@ class CustomizeFunctionSetting extends React.Component {
|
|
|
render() {
|
|
render() {
|
|
|
const { t, adminCustomizeContainer } = this.props;
|
|
const { t, adminCustomizeContainer } = this.props;
|
|
|
|
|
|
|
|
- // const dropdownGroupMapping = {
|
|
|
|
|
- // S: {
|
|
|
|
|
- // label: 'admin:customize_setting.function_options.list_num_s',
|
|
|
|
|
- // pageLimitation: adminCustomizeContainer.state.pageLimitationS,
|
|
|
|
|
- // switchPageListLimitation: adminCustomizeContainer.switchPageListLimitationS,
|
|
|
|
|
- // desc: 'admin:customize_setting.function_options.list_num_desc_s',
|
|
|
|
|
- // dropdownMenu: [10, 20, 50, 100],
|
|
|
|
|
- // },
|
|
|
|
|
- // M: {
|
|
|
|
|
- // label: 'admin:customize_setting.function_options.list_num_m',
|
|
|
|
|
- // pageLimitation: adminCustomizeContainer.state.pageLimitationM,
|
|
|
|
|
- // switchPageListLimitation: adminCustomizeContainer.switchPageListLimitationM,
|
|
|
|
|
- // desc: 'admin:customize_setting.function_options.list_num_desc_m',
|
|
|
|
|
- // dropdownMenu: [5, 10, 20, 50, 100],
|
|
|
|
|
- // },
|
|
|
|
|
- // L: {
|
|
|
|
|
- // label: 'admin:customize_setting.function_options.list_num_l',
|
|
|
|
|
- // pageLimitation: adminCustomizeContainer.state.pageLimitationL,
|
|
|
|
|
- // switchPageListLimitation: adminCustomizeContainer.switchPageListLimitationL,
|
|
|
|
|
- // desc: 'admin:customize_setting.function_options.list_num_desc_l',
|
|
|
|
|
- // dropdownMenu: [20, 50, 100, 200],
|
|
|
|
|
- // },
|
|
|
|
|
- // XL: {
|
|
|
|
|
- // label: 'admin:customize_setting.function_options.list_num_xl',
|
|
|
|
|
- // pageLimitation: adminCustomizeContainer.state.pageLimitationXL,
|
|
|
|
|
- // switchPageListLimitation: adminCustomizeContainer.switchPageListLimitationXL,
|
|
|
|
|
- // desc: 'admin:customize_setting.function_options.list_num_desc_xl',
|
|
|
|
|
- // dropdownMenu: [5, 10, 20, 50, 100],
|
|
|
|
|
- // },
|
|
|
|
|
- // };
|
|
|
|
|
-
|
|
|
|
|
return (
|
|
return (
|
|
|
<React.Fragment>
|
|
<React.Fragment>
|
|
|
<div className="row">
|
|
<div className="row">
|
|
@@ -144,35 +110,6 @@ class CustomizeFunctionSetting extends React.Component {
|
|
|
dropdownItemOnClickHandler={adminCustomizeContainer.switchPageListLimitationXL}
|
|
dropdownItemOnClickHandler={adminCustomizeContainer.switchPageListLimitationXL}
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- {/* {Object.entries(dropdownGroupMapping).map(([key, value]) => {
|
|
|
|
|
- return (
|
|
|
|
|
- <div className="form-group row" key={key}>
|
|
|
|
|
- <div className="offset-md-3 col-md-6 text-left">
|
|
|
|
|
- <div className="my-0 w-100">
|
|
|
|
|
- <label>{t(value.label)}</label>
|
|
|
|
|
- </div>
|
|
|
|
|
- <UncontrolledDropdown>
|
|
|
|
|
- <DropdownToggle className="text-right col-6" caret>
|
|
|
|
|
- <span className="float-left">{value.pageLimitation}</span>
|
|
|
|
|
- </DropdownToggle>
|
|
|
|
|
- <DropdownMenu className="dropdown-menu" role="menu">
|
|
|
|
|
- {value.dropdownMenu.map((num) => {
|
|
|
|
|
- return (
|
|
|
|
|
- <DropdownItem key={num} role="presentation" onClick={() => { value.switchPageListLimitation(num) }}>
|
|
|
|
|
- <a role="menuitem">{num}</a>
|
|
|
|
|
- </DropdownItem>
|
|
|
|
|
- );
|
|
|
|
|
- })}
|
|
|
|
|
- </DropdownMenu>
|
|
|
|
|
- </UncontrolledDropdown>
|
|
|
|
|
- <p className="form-text text-muted">
|
|
|
|
|
- {t(value.desc)}
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- );
|
|
|
|
|
- })} */}
|
|
|
|
|
-
|
|
|
|
|
<div className="form-group row">
|
|
<div className="form-group row">
|
|
|
<div className="offset-md-3 col-md-6 text-left">
|
|
<div className="offset-md-3 col-md-6 text-left">
|
|
|
<CustomizeFunctionOption
|
|
<CustomizeFunctionOption
|