/*
 * @Author: zhangleyuan
 * @Date: 2021-02-20 16:45:51
 * @LastEditors: zhangleyuan
 * @LastEditTime: 2021-03-10 15:50:02
 * @Description: 描述一下
 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
 */
import React from 'react';
import { Button } from 'antd';
import { withRouter } from 'react-router-dom';
import User from '@/common/js/user';
import './PlanOpt.less';
function PlanOpt() {
  function  handleCreatePlan(){
    window.RCHistory.push({
      pathname: '/create-plan?type=add',
    })
  }
  return (
    <div className="plan-opt">
      { (User.getUserRole() === "CloudManager" || User.getUserRole() === "StoreManager") &&
          <Button
            type="primary"
            className="mr12"
            onClick={handleCreatePlan}
          >新建培训计划</Button>
      }
    </div>
  );
}
export default withRouter(PlanOpt)
