admins: add school name and hidden phone to laboratory users add modal

dev_sync_trustie
p31729568 5 years ago
parent 097f20bebf
commit a547aebe0b

@ -135,7 +135,7 @@ $(document).on('turbolinks:load', function() {
},
templateResult: function (item) {
if(!item.id || item.id === '') return item.text;
return item.real_name;
return $("<span>" + item.real_name + " <span class='font-12'>" + item.school_name + ' ' + item.hidden_phone + "</span></span>");
},
templateSelection: function(item){
if (item.id) {

@ -27,7 +27,7 @@ $(document).on('turbolinks:load', function() {
},
templateResult: function (item) {
if(!item.id || item.id === '') return item.text;
return item.real_name + "--" + item.identity;
return $("<span>" + item.real_name + " <span class='font-12'>" + item.school_name + ' ' + item.hidden_phone + "</span></span>");
},
templateSelection: function(item){
if (item.id) {

@ -2,9 +2,14 @@ class Cooperative::UsersController < Cooperative::BaseController
def index
params[:sort_by] = params[:sort_by].presence || 'created_on'
params[:sort_direction] = params[:sort_direction].presence || 'desc'
params[:school_id] = current_laboratory.school_id
users = Admins::UserQuery.call(params)
users = Admins::UserQuery.call(search_params)
@users = paginate users.includes(user_extension: :school)
end
private
def search_params
params.permit(:name, :sort_by, :sort_direction)
end
end

@ -60,7 +60,7 @@ module Util
return if str.blank?
case type
when :phone then "#{str[0..2]}***#{str[-3..-1]}"
when :phone then "#{str[0..2]}****#{str[-4..-1]}"
when :email then "#{str[0]}***#{str[(str.rindex('@')-1)..-1]}"
else "#{str[0..2]}***#{str[-3..-1]}"
end

@ -1,6 +1,6 @@
json.count @users.total_count
json.users do
json.array! @users.each do |user|
json.extract! user, :id, :login, :real_name, :identity, :school_name
json.extract! user, :id, :login, :real_name, :identity, :school_name, :hidden_phone
end
end

@ -1,6 +1,6 @@
json.count @users.total_count
json.users do
json.array! @users.each do |user|
json.extract! user, :id, :login, :real_name, :identity, :school_name
json.extract! user, :id, :login, :real_name, :identity, :school_name, :hidden_phone
end
end

File diff suppressed because one or more lines are too long

@ -24796,68 +24796,93 @@ input.form-control {
}
/* line 37, app/assets/stylesheets/common.scss */
.font-20 {
font-size: 20px !important;
}
/* line 38, app/assets/stylesheets/common.scss */
.font-24 {
font-size: 24px !important;
}
/* line 39, app/assets/stylesheets/common.scss */
.padding10-5 {
padding: 10px 5px;
}
/* line 38, app/assets/stylesheets/common.scss */
/* line 40, app/assets/stylesheets/common.scss */
.width100 {
width: 100%;
}
/* line 39, app/assets/stylesheets/common.scss */
/* line 41, app/assets/stylesheets/common.scss */
.mb10 {
margin-bottom: 10px;
}
/* line 40, app/assets/stylesheets/common.scss */
/* line 42, app/assets/stylesheets/common.scss */
.mt10 {
margin-top: 10px;
}
/* line 41, app/assets/stylesheets/common.scss */
/* line 43, app/assets/stylesheets/common.scss */
.mr10 {
margin-right: 10px;
}
/* line 42, app/assets/stylesheets/common.scss */
/* line 44, app/assets/stylesheets/common.scss */
.ml10 {
margin-left: 10px;
}
/* line 44, app/assets/stylesheets/common.scss */
.ml20 {
margin-left: 20px;
}
/* line 45, app/assets/stylesheets/common.scss */
.textarea-width-100 {
width: 100%;
resize: none;
border: 1px solid #ccc;
}
/* line 43, app/assets/stylesheets/common.scss */
/* line 46, app/assets/stylesheets/common.scss */
.padding10 {
padding: 10px;
}
/* line 44, app/assets/stylesheets/common.scss */
/* line 47, app/assets/stylesheets/common.scss */
.padding5-10 {
padding: 5px 10px;
}
/* line 45, app/assets/stylesheets/common.scss */
/* line 48, app/assets/stylesheets/common.scss */
.position-r {
position: relative;
}
/* line 46, app/assets/stylesheets/common.scss */
/* line 49, app/assets/stylesheets/common.scss */
.color-grey-c {
color: #ccc;
}
/* line 47, app/assets/stylesheets/common.scss */
/* line 50, app/assets/stylesheets/common.scss */
.color-blue {
color: #4CACFF;
}
/* line 51, app/assets/stylesheets/common.scss */
.inline-block {
display: inline-block;
}
/* line 48, app/assets/stylesheets/common.scss */
/* line 52, app/assets/stylesheets/common.scss */
.hide {
display: none;
}
/* line 49, app/assets/stylesheets/common.scss */
/* line 53, app/assets/stylesheets/common.scss */
.show {
display: block;
}
@ -25171,6 +25196,47 @@ input.form-control {
background: #fff;
}
/* line 3, app/assets/stylesheets/admins/competition_settings.scss */
.admins-competition-settings-index-page .competition-mode-container .row {
height: 35px;
}
/* line 7, app/assets/stylesheets/admins/competition_settings.scss */
.admins-competition-settings-index-page .competition-mode-container .des-row {
height: auto;
}
/* line 11, app/assets/stylesheets/admins/competition_settings.scss */
.admins-competition-settings-index-page .competition-mode-container .form-control {
font-size: 14px;
}
/* line 22, app/assets/stylesheets/admins/competition_settings.scss */
.admins-competition-settings-index-page .col-md-label {
-webkit-box-flex: 0;
flex: 0 0 10%;
max-width: 10%;
min-width: 30px;
padding-right: 15px;
padding-left: 15px;
position: relative;
}
/* line 31, app/assets/stylesheets/admins/competition_settings.scss */
.admins-competition-settings-index-page .col-md-label-s {
-webkit-box-flex: 0;
flex: 0 0 30px;
padding-right: 15px;
padding-left: 15px;
position: relative;
}
/* line 38, app/assets/stylesheets/admins/competition_settings.scss */
.admins-competition-settings-index-page .setBtn_s {
height: 35px;
line-height: 5px;
}
/* line 4, app/assets/stylesheets/admins/cooperatives.scss */
.admins-cooperatives-index-page .coo-img-card .coo-img-item > .drag {
cursor: move;

@ -15788,68 +15788,93 @@ input.form-control {
}
/* line 37, app/assets/stylesheets/common.scss */
.font-20 {
font-size: 20px !important;
}
/* line 38, app/assets/stylesheets/common.scss */
.font-24 {
font-size: 24px !important;
}
/* line 39, app/assets/stylesheets/common.scss */
.padding10-5 {
padding: 10px 5px;
}
/* line 38, app/assets/stylesheets/common.scss */
/* line 40, app/assets/stylesheets/common.scss */
.width100 {
width: 100%;
}
/* line 39, app/assets/stylesheets/common.scss */
/* line 41, app/assets/stylesheets/common.scss */
.mb10 {
margin-bottom: 10px;
}
/* line 40, app/assets/stylesheets/common.scss */
/* line 42, app/assets/stylesheets/common.scss */
.mt10 {
margin-top: 10px;
}
/* line 41, app/assets/stylesheets/common.scss */
/* line 43, app/assets/stylesheets/common.scss */
.mr10 {
margin-right: 10px;
}
/* line 42, app/assets/stylesheets/common.scss */
/* line 44, app/assets/stylesheets/common.scss */
.ml10 {
margin-left: 10px;
}
/* line 44, app/assets/stylesheets/common.scss */
.ml20 {
margin-left: 20px;
}
/* line 45, app/assets/stylesheets/common.scss */
.textarea-width-100 {
width: 100%;
resize: none;
border: 1px solid #ccc;
}
/* line 43, app/assets/stylesheets/common.scss */
/* line 46, app/assets/stylesheets/common.scss */
.padding10 {
padding: 10px;
}
/* line 44, app/assets/stylesheets/common.scss */
/* line 47, app/assets/stylesheets/common.scss */
.padding5-10 {
padding: 5px 10px;
}
/* line 45, app/assets/stylesheets/common.scss */
/* line 48, app/assets/stylesheets/common.scss */
.position-r {
position: relative;
}
/* line 46, app/assets/stylesheets/common.scss */
/* line 49, app/assets/stylesheets/common.scss */
.color-grey-c {
color: #ccc;
}
/* line 47, app/assets/stylesheets/common.scss */
/* line 50, app/assets/stylesheets/common.scss */
.color-blue {
color: #4CACFF;
}
/* line 51, app/assets/stylesheets/common.scss */
.inline-block {
display: inline-block;
}
/* line 48, app/assets/stylesheets/common.scss */
/* line 52, app/assets/stylesheets/common.scss */
.hide {
display: none;
}
/* line 49, app/assets/stylesheets/common.scss */
/* line 53, app/assets/stylesheets/common.scss */
.show {
display: block;
}

@ -24796,68 +24796,93 @@ input.form-control {
}
/* line 37, app/assets/stylesheets/common.scss */
.font-20 {
font-size: 20px !important;
}
/* line 38, app/assets/stylesheets/common.scss */
.font-24 {
font-size: 24px !important;
}
/* line 39, app/assets/stylesheets/common.scss */
.padding10-5 {
padding: 10px 5px;
}
/* line 38, app/assets/stylesheets/common.scss */
/* line 40, app/assets/stylesheets/common.scss */
.width100 {
width: 100%;
}
/* line 39, app/assets/stylesheets/common.scss */
/* line 41, app/assets/stylesheets/common.scss */
.mb10 {
margin-bottom: 10px;
}
/* line 40, app/assets/stylesheets/common.scss */
/* line 42, app/assets/stylesheets/common.scss */
.mt10 {
margin-top: 10px;
}
/* line 41, app/assets/stylesheets/common.scss */
/* line 43, app/assets/stylesheets/common.scss */
.mr10 {
margin-right: 10px;
}
/* line 42, app/assets/stylesheets/common.scss */
/* line 44, app/assets/stylesheets/common.scss */
.ml10 {
margin-left: 10px;
}
/* line 44, app/assets/stylesheets/common.scss */
.ml20 {
margin-left: 20px;
}
/* line 45, app/assets/stylesheets/common.scss */
.textarea-width-100 {
width: 100%;
resize: none;
border: 1px solid #ccc;
}
/* line 43, app/assets/stylesheets/common.scss */
/* line 46, app/assets/stylesheets/common.scss */
.padding10 {
padding: 10px;
}
/* line 44, app/assets/stylesheets/common.scss */
/* line 47, app/assets/stylesheets/common.scss */
.padding5-10 {
padding: 5px 10px;
}
/* line 45, app/assets/stylesheets/common.scss */
/* line 48, app/assets/stylesheets/common.scss */
.position-r {
position: relative;
}
/* line 46, app/assets/stylesheets/common.scss */
/* line 49, app/assets/stylesheets/common.scss */
.color-grey-c {
color: #ccc;
}
/* line 47, app/assets/stylesheets/common.scss */
/* line 50, app/assets/stylesheets/common.scss */
.color-blue {
color: #4CACFF;
}
/* line 51, app/assets/stylesheets/common.scss */
.inline-block {
display: inline-block;
}
/* line 48, app/assets/stylesheets/common.scss */
/* line 52, app/assets/stylesheets/common.scss */
.hide {
display: none;
}
/* line 49, app/assets/stylesheets/common.scss */
/* line 53, app/assets/stylesheets/common.scss */
.show {
display: block;
}

@ -134069,7 +134069,7 @@ $(document).on('turbolinks:load', function() {
},
templateResult: function (item) {
if(!item.id || item.id === '') return item.text;
return item.real_name + "--" + item.identity;
return $("<span>" + item.real_name + " <span class='font-12'>" + item.school_name + ' ' + item.hidden_phone + "</span></span>");
},
templateSelection: function(item){
if (item.id) {
Loading…
Cancel
Save