parent
de677a3a1b
commit
9c74374499
@ -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,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
|
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.
Loading…
Reference in new issue