Merge branches 'dev_aliyun' and 'dev_ysm' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_ysm

dev_auth
杨树明 5 years ago
commit a5c43f94b8

@ -5,7 +5,10 @@ class Competitions::PrizesController < Competitions::BaseController
self_prizes = current_competition.competition_prize_users.where(user_id: current_user.id).includes(:competition_team)
@leader = self_prizes.any?(&:leader?) # 是否为队长
@bank_account = self_prizes.find(&:leader?).extra if @leader
if @leader
@bank_account = self_prizes.find(&:leader?).extra
@bank_account_editable = self_prizes.select(&:leader?).all?(&:pending?)
end
@self_prizes = self_prizes.select(&:certificate_exist?) # 个人证书quit
@team_prizes = self_prizes.map(&:competition_team).uniq.select(&:certificate_exists?) # 团队证书

@ -1,6 +1,9 @@
json.leader @leader
json.bank_account @bank_account if @leader
if @leader
json.bank_account @bank_account
json.bank_account_editable @bank_account_editable
end
json.personal_certifications do
json.array! @self_prizes do |prize_user|

@ -132,8 +132,17 @@ function CourseGroupListTable(props) {
render: (none, record, index) => {
return <React.Fragment>
{!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除分班</WordsBtn>}
{isAdmin && <WordsBtn style2={{ marginRight: '12px' }} data-clipboard-text={record.invite_code}
className={`copyBtn_${record.id}`} style={''}>复制邀请码</WordsBtn> }
{isAdmin &&
<Tooltip title={
<div>
<div>成员可以通过邀请码主动加入分班</div>
<div>点击复制邀请码</div>
</div>
}>
<WordsBtn style2={{ marginRight: '12px' }} data-clipboard-text={record.invite_code}
className={`copyBtn_${record.id}`} style={''}>复制邀请码</WordsBtn>
</Tooltip>
}
{isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>}
<WordsBtn onClick={() => onGoDetail(record)} style={''}>查看</WordsBtn>
</React.Fragment>

@ -870,7 +870,7 @@ class CoursesNew extends Component {
"shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group",
],
})(
<Checkbox.Group style={{width: "800px", marginTop: "10px"}}>
<Checkbox.Group style={{ marginTop: "10px"}}>
<Checkbox value={"announcement"} className="fl">公告栏</Checkbox>
<Checkbox value={"shixun_homework"} className="fl">实训作业</Checkbox>
<Checkbox value={"common_homework"} className="fl">普通作业</Checkbox>

@ -992,7 +992,7 @@ class Goldsubject extends Component {
"announcement","online_learning","shixun_homework","common_homework",
],
})(
<Checkbox.Group style={{width: "800px", marginTop: "10px"}}>
<Checkbox.Group style={{ marginTop: "10px"}}>
<Checkbox value={"announcement"} className="fl" defaultChecked disabled>公告栏</Checkbox>
<Checkbox value={"online_learning"} className="fl" defaultChecked disabled>在线学习</Checkbox>
<Checkbox value={"shixun_homework"} className="fl">实训作业</Checkbox>

@ -606,7 +606,14 @@ submittojoinclass=(value)=>{
)
}
//头部获取是否已经登录了
getUser=(url)=>{
getUser=(url,type)=>{
if(type==="projects"){
if(!this.props.user&&this.props.user.email){
this.openNotification("请先绑定邮箱,谢谢");
return
}
}
// console.log("点击了503")
// console.log(url);
let{user} =this.state;
@ -1254,7 +1261,7 @@ submittojoinclass=(value)=>{
{this.props.Headertop===undefined?"":
<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>
}
<li><a onClick={(url)=>this.getUser("/projects/new")} target="_blank">新建开发项目</a></li>
<li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>
</ul>
<ul className="fl with50 edu-txt-center">

@ -313,7 +313,7 @@ export default class TPManswer extends Component {
<style>{`
.tpmAnswer .ant-input { width: 230px }
.tpmAnswer .score.ant-input-number { width: 54px; }
.tpmAnswer .score.ant-input-number { width: 62px; }
.levelSection { margin-top: 16px }
`}</style>

@ -133,7 +133,9 @@ class InfosProject extends Component{
{/* 289 */}
{
page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ?
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建开发项目"} index="4"></Create>:""
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建开发项目"} index="4" Createtype={"projects"}
{...this.props} {...this.state}
></Create>:""
}
{
(!data || (data && data.projects.length==0)) && category && <NoneData></NoneData>

@ -14,17 +14,36 @@ class publicCreateNew extends Component{
constructor(props){
super(props);
}
//头部获取是否已经登录了
getUser=(url)=> {
console.log(this.props)
if (!this.props.user && this.props.user.email) {
this.props.showNotification("请先绑定邮箱,谢谢");
return
}
if(url !== undefined || url!==""){
window.location.href = url;
}
}
render() {
let {href,name,index}=this.props;
return (
<div className="square-Item" style={{"height":`${index=="1"?"289":index=="2"?"298":index=="3"?"295":"289"}px`}}>
<div className="substance substancepad">
<a href={`${href}`}>
<div className="substancenenew">
<div className="leftten"></div>
<div className="topten"></div>
</div>
</a>
{this.props.Createtype==="projects"?<a onClick={()=>this.getUser(href)}>
<div className="substancenenew">
<div className="leftten"></div>
<div className="topten"></div>
</div>
</a>: <a href={`${href}`}>
<div className="substancenenew">
<div className="leftten"></div>
<div className="topten"></div>
</div>
</a>}
</div>
<div className="edu-txt-center course-bottom">
<div className="inline color-grey-6">

Loading…
Cancel
Save