Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
2ce8565e94
@ -0,0 +1,12 @@
|
||||
$(document).on('turbolinks:load', function(){
|
||||
$(document).on('click', '.batch-all-check-box', function(){
|
||||
var $checkAll = $(this);
|
||||
|
||||
$('.batch-check-box').prop('checked', $checkAll.is(':checked'));
|
||||
})
|
||||
|
||||
$(document).on('click', '.batch-check-box', function(){
|
||||
var allChecked = $('.batch-check-box:checked').length === $('.batch-check-box').length
|
||||
$('.batch-all-check-box').prop('checked', allChecked);
|
||||
})
|
||||
});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,4 @@
|
||||
class SubjectAppointment < ApplicationRecord
|
||||
belongs_to :subject
|
||||
belongs_to :user
|
||||
end
|
@ -0,0 +1,26 @@
|
||||
class Admins::IdentityAuths::RevokeApplyService < ApplicationService
|
||||
attr_reader :apply, :user
|
||||
|
||||
def initialize(apply)
|
||||
@apply = apply
|
||||
@user = apply.user
|
||||
end
|
||||
|
||||
def call
|
||||
ActiveRecord::Base.transaction do
|
||||
apply.revoke!
|
||||
user.update!(authentication: false)
|
||||
|
||||
deal_tiding!
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def deal_tiding!
|
||||
Tiding.create!(user_id: apply.user_id, trigger_user_id: 0,
|
||||
container_id: apply.id, container_type: 'CancelUserAuthentication',
|
||||
belong_container_id: apply.user_id, belong_container_type: 'User',
|
||||
status: 1, tiding_type: 'System')
|
||||
end
|
||||
end
|
@ -0,0 +1,26 @@
|
||||
class Admins::ProfessionalAuths::RevokeApplyService < ApplicationService
|
||||
attr_reader :apply, :user
|
||||
|
||||
def initialize(apply)
|
||||
@apply = apply
|
||||
@user = apply.user
|
||||
end
|
||||
|
||||
def call
|
||||
ActiveRecord::Base.transaction do
|
||||
apply.revoke!
|
||||
user.update!(professional_certification: false)
|
||||
|
||||
deal_tiding!
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def deal_tiding!
|
||||
Tiding.create!(user_id: apply.user_id, trigger_user_id: 0,
|
||||
container_id: apply.id, container_type: 'CancelUserProCertification',
|
||||
belong_container_id: apply.user_id, belong_container_type: 'User',
|
||||
status: 1, tiding_type: 'System')
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class AddCourseMemberToSubjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :subjects, :student_count, :integer, :default => 0
|
||||
add_column :subjects, :participant_count, :integer, :default => 0
|
||||
end
|
||||
end
|
@ -0,0 +1,10 @@
|
||||
class CreateSubjectAppointments < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :subject_appointments do |t|
|
||||
t.references :subject, index: true
|
||||
t.references :user, index: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,47 +1,56 @@
|
||||
import React, { Component } from 'react';
|
||||
import {getImageUrl} from 'educoder';
|
||||
import { Spin, Icon , Modal} from 'antd';
|
||||
class Modals extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
funmodalsType:false,
|
||||
istype:false
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const antIcons = <Icon type="loading" style={{ fontSize: 24 }} spin />
|
||||
return(
|
||||
<Modal
|
||||
className={this.props.className}
|
||||
keyboard={false}
|
||||
title="提示"
|
||||
visible={this.props.modalsType===undefined?false:this.props.modalsType}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
centered={true}
|
||||
width="530px"
|
||||
>
|
||||
<Spin indicator={antIcons} spinning={this.props.antIcon===undefined?false:this.props.antIcon} >
|
||||
<div className="task-popup-content">
|
||||
<p className="task-popup-text-center font-16">{this.props.modalsTopval}</p>
|
||||
<p className="task-popup-text-center font-16 mt5">{this.props.modalsBottomval}</p>
|
||||
{this.props.loadtype===true?
|
||||
<div className="clearfix edu-txt-center mt20">
|
||||
<a className="task-btn task-btn-orange pop_close" onClick={this.props.modalSave}>知道啦</a>
|
||||
</div>
|
||||
:
|
||||
<div className="clearfix mt30 edu-txt-center">
|
||||
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a>
|
||||
<a className="task-btn task-btn-orange" onClick={this.props.modalSave}>{this.props.okText || '确定'}</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import {getImageUrl} from 'educoder';
|
||||
import { Spin, Icon , Modal} from 'antd';
|
||||
class Modals extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
funmodalsType:false,
|
||||
istype:false
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const antIcons = <Icon type="loading" style={{ fontSize: 24 }} spin />
|
||||
return(
|
||||
<Modal
|
||||
className={this.props.className}
|
||||
keyboard={false}
|
||||
title="提示"
|
||||
visible={this.props.modalsType===undefined?false:this.props.modalsType}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
centered={true}
|
||||
width="530px"
|
||||
>
|
||||
{this.props.modalsType===true?<style>
|
||||
{
|
||||
`
|
||||
body{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>:""}
|
||||
<Spin indicator={antIcons} spinning={this.props.antIcon===undefined?false:this.props.antIcon} >
|
||||
<div className="task-popup-content">
|
||||
<p className="task-popup-text-center font-16">{this.props.modalsTopval}</p>
|
||||
<p className="task-popup-text-center font-16 mt5">{this.props.modalsBottomval}</p>
|
||||
{this.props.loadtype===true?
|
||||
<div className="clearfix edu-txt-center mt20">
|
||||
<a className="task-btn task-btn-orange pop_close" onClick={this.props.modalSave}>知道啦</a>
|
||||
</div>
|
||||
:
|
||||
<div className="clearfix mt30 edu-txt-center">
|
||||
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a>
|
||||
<a className="task-btn task-btn-orange" onClick={this.props.modalSave}>{this.props.okText || '确定'}</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Modals;
|
@ -1,47 +1,47 @@
|
||||
.tpmComment .-fit {
|
||||
position: inherit;
|
||||
}
|
||||
.tpmComment .rc-pagination {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.tpmComment .paginationSection {
|
||||
background: #FAFAFA;
|
||||
}
|
||||
.tpmComment .comment_item_cont.df.clearfix:nth-last-child(1) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/*.tpmComment .fl.edu-back-white {*/
|
||||
/*min-height: 600px;*/
|
||||
/*}*/
|
||||
|
||||
|
||||
.user_watch_btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*md编辑器*/
|
||||
.tpmComment .commentItemMDEditor a.task-btn {
|
||||
background: #4cacff!important;
|
||||
margin-right: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
/* md编辑器 resizeBar*/
|
||||
.tpmComment .commentItemMDEditor .editor__resize {
|
||||
transform: translateX(-176%)
|
||||
}
|
||||
|
||||
#ratePanel > div > div > div.fr div.rateYo.fl.mt3 {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
cursor: default;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.tpmComment .icon-jiangli {
|
||||
/* margin-top: 2px; */
|
||||
.tpmComment .-fit {
|
||||
position: inherit;
|
||||
}
|
||||
.tpmComment .rc-pagination {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.tpmComment .paginationSection {
|
||||
background: #FAFAFA;
|
||||
}
|
||||
.tpmComment .comment_item_cont.df.clearfix:nth-last-child(1) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/*.tpmComment .fl.edu-back-white {*/
|
||||
/*min-height: 600px;*/
|
||||
/*}*/
|
||||
|
||||
|
||||
.user_watch_btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*md编辑器*/
|
||||
.tpmComment .commentItemMDEditor a.task-btn {
|
||||
background: #4cacff!important;
|
||||
margin-right: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
/* md编辑器 resizeBar*/
|
||||
.tpmComment .commentItemMDEditor .editor__resize {
|
||||
transform: translateX(-176%)
|
||||
}
|
||||
|
||||
#ratePanel > div > div > div.fr div.rateYo.fl.mt3 {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
cursor: default;
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.tpmComment .icon-jiangli {
|
||||
/* margin-top: 2px; */
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe SubjectAppointment, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in new issue