You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dashboard/src/components/kpi/ObjectPanel.jsx

23 lines
1002 B
JavaScript

import { observer } from 'mobx-react';
import KPISettings from './KPISettings';
import { bu, KPISubjects } from '../../libs/ht';
const sort = { DateType: 10, years: 11 };
const yearInitial = {};
const searchFormItemSet = {
'bu': { shows: ['DateType', 'years', 'HTBusinessUnits'], sort },
'dept': { shows: ['DateType', 'years', 'DepartmentList'], sort, fieldProps: { DepartmentList: { allowClear: true,isLeaf: true, show_all: false } }, },
'operator': { shows: ['DateType', 'years', 'DepartmentList', 'operator'], fieldProps: { DepartmentList: { allowClear: true, isLeaf: true }, operator: { param: { is_assign: 1 } } }, sort },
'destination': { shows: ['DateType', 'years', 'destination'], sort },
'country': { shows: ['DateType', 'years', 'country'], sort },
};
export default observer((props) => {
const searchProps = searchFormItemSet?.[props.curObject] || {};
return (
<>
<KPISettings {...{ searchProps, KPISubjects }} {...props} />
</>
);
});