Removed unused data and columns from datatables

This commit is contained in:
Andrew Kvalheim
2022-03-18 08:35:07 -07:00
parent ed8a2696bb
commit edec5a98be
3 changed files with 1 additions and 15 deletions

View File

@@ -14,7 +14,6 @@ class RegistrationDatatable < AjaxDatatablesRails::ActiveRecord
@view_columns ||= {
id: { source: 'Registration.id', cond: :eq },
name: { source: 'User.name' },
roles: { source: 'Role.name' },
email: { source: 'User.email' },
accepted_code_of_conduct: { source: 'Registration.accepted_code_of_conduct', searchable: false },
actions: { source: 'Registration.id', searchable: false, orderable: false }
@@ -41,7 +40,6 @@ class RegistrationDatatable < AjaxDatatablesRails::ActiveRecord
roles: conference_role_titles(record.user),
email: record.email,
accepted_code_of_conduct: !!record.accepted_code_of_conduct, # rubocop:disable Style/DoubleNegation
questions: {},
edit_url: edit_admin_conference_registration_path(conference, record),
DT_RowId: record.id
}

View File

@@ -21,9 +21,7 @@ class UserDatatable < AjaxDatatablesRails::ActiveRecord
email: { source: 'User.email' },
name: { source: 'User.name' },
attended: { source: 'attended_count', searchable: false },
roles: { source: 'Role.name' },
view_url: { source: 'User.id', searchable: false, orderable: false },
edit_url: { source: 'User.id', searchable: false, orderable: false }
roles: { source: 'Role.name' }
}
end

View File

@@ -26,7 +26,6 @@
%tr
%th{ width: '0' } ID#
%th{ width: '25%' } Name
%th{ width: '0' } Roles
%th{ width: '0' } E-Mail
%th{ width: '0' }
%abbr{ title: 'Code of Conduct' } CoC
@@ -63,14 +62,6 @@
return content;
}
},
{
"name": "roles",
"data": "roles",
"className": "truncate",
"render": function(data, type, row) {
return data.join(', ');
}
},
{
"data": "email"
},
@@ -94,5 +85,4 @@
});
registrationsDataTable.columns(3).visible(codeOfConductPresent);
registrationsDataTable.columns(2).visible(false);
});